Files
dev/script/test/TestNested.py
2018-01-24 12:03:38 +01:00

22 lines
384 B
Python

index=0
def calc():
global index
index += 1
ret= tscan(sin, 10, 0.1, tag="scan " + str(index))
#ret= tscan(sin, 10, 0.1)
v = max(ret.getReadable(0))
return float(v)
class PseudoDev(Readable):
def read(self):
return calc()
d= PseudoDev()
ret= lscan(inp, (d), 0, 40, 5, 0.2, tag="output")
#ret= lscan(inp, (d), 0, 40, 5, 0.2)