2024-06-14 10:22:33 +08:00
|
|
|
from min_artiq import *
|
|
|
|
from numpy import int32
|
|
|
|
|
|
|
|
@nac3
|
|
|
|
class Demo:
|
2025-01-16 12:42:13 +08:00
|
|
|
attr1: Kernel[str]
|
|
|
|
attr2: Kernel[int32]
|
2024-06-14 10:22:33 +08:00
|
|
|
|
2025-01-16 12:42:13 +08:00
|
|
|
@kernel
|
2024-06-14 10:22:33 +08:00
|
|
|
def __init__(self):
|
|
|
|
self.attr2 = 32
|
|
|
|
self.attr1 = "SAMPLE"
|
|
|
|
|
|
|
|
@kernel
|
|
|
|
def run(self):
|
|
|
|
print_int32(self.attr2)
|
|
|
|
self.attr1
|
|
|
|
|