This commit is contained in:
2018-11-23 08:42:01 +01:00
parent c6cd6123b0
commit bf5d1b8d7c
32 changed files with 1961 additions and 20 deletions

22
script/test/TestChanel.py Normal file
View File

@@ -0,0 +1,22 @@
import ch.psi.pshell.epics.CAS as CAS
import random
class Waveform(ReadonlyRegisterBase, ReadonlyRegisterArray):
def doRead(self):
ret = []
for i in range(self.getSize()):
ret.append(random.random())
ret = to_array(ret, 'd')
return ret
def getSize(self):
return 1000
wf = Waveform("wf")
wf.initialize()
print wf.read()[0]
casN = CAS("TESTCAS:VAL", wf, 'double')
print casN
print caget("TESTCAS:VAL")