This commit is contained in:
2023-05-01 11:28:04 +02:00
parent 3a83f3cf34
commit abe3bcb19c
265 changed files with 28663 additions and 1295 deletions

24
script/test/TestConfig.py Normal file
View File

@@ -0,0 +1,24 @@
#Jython BUG: Sometimes getConfig(self) won'' override ProcessVariableBase.getConfig.
#E.g.: energy.getUnit() fails (calls getConfig)
#But energy.getConfig() works
class Energy(ControlledVariableBase):
def __init__(self, name):
ControlledVariableBase.__init__(self, name, None)
self.setReadback(phi.readback)
def doRead(self):
return phi.read()
def doWrite(self, val):
print "Do something"
phi.write(val)
def getConfig(self):
print "Get"
return phi.getConfig()
add_device(Energy("energy",), True)