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