This commit is contained in:
2018-04-17 12:05:48 +02:00
parent 14edc0e745
commit 58a1260003
428 changed files with 41350 additions and 477 deletions

21
script/test/DataLink.py Normal file
View File

@@ -0,0 +1,21 @@
import random
positioner = DummyPositioner("positioner")
class Sensor(Readable):
def __init__(self):
self.index = -1
def read(self):
#time.sleep(0.001)
self.index +=1
return self.index
#noise = (random.random() - 0.5) / 10.0
#return math.sin(time.time()) + noise
sensor = Sensor()
ret = lscan(positioner, sensor, scan_start, scan_stop, scan_steps, 0.01)
av = mean(ret.getReadable(0))
set_exec_pars(open=False)
print ret.path
set_return([av, ret.path + sensor.name])