This commit is contained in:
22
script/test/TestChanel.py
Normal file
22
script/test/TestChanel.py
Normal 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")
|
||||
Reference in New Issue
Block a user