update phytron driver
+ fixes in secop_psi/sea.py (iodev)
This commit is contained in:
@ -62,7 +62,7 @@ service = %(service)s
|
||||
CFG_MODULE = """
|
||||
[%(module)s]
|
||||
class = secop_psi.sea.%(modcls)s
|
||||
iodev = %(seaconn)s
|
||||
io = %(seaconn)s
|
||||
sea_object = %(module)s
|
||||
"""
|
||||
|
||||
@ -367,7 +367,7 @@ def get_datatype(paramdesc):
|
||||
|
||||
|
||||
class SeaModule(Module):
|
||||
iodev = Attached()
|
||||
io = Attached()
|
||||
|
||||
# pollerClass=None
|
||||
path2param = None
|
||||
@ -380,7 +380,7 @@ class SeaModule(Module):
|
||||
else:
|
||||
extra_modules = {}
|
||||
srv.extra_sea_modules = extra_modules
|
||||
json_file = cfgdict.pop('json_file', None) or SeaClient.default_json_file[cfgdict['iodev']]
|
||||
json_file = cfgdict.pop('json_file', None) or SeaClient.default_json_file[cfgdict['io']]
|
||||
visibility_level = cfgdict.pop('visibility_level', 2)
|
||||
|
||||
single_module = cfgdict.pop('single_module', None)
|
||||
@ -518,7 +518,7 @@ class SeaModule(Module):
|
||||
# print('override %s.read_%s' % (cls.__name__, key))
|
||||
|
||||
def rfunc(self, cmd='hval %s/%s' % (base, path)):
|
||||
reply = self._iodev.query(cmd)
|
||||
reply = self.io.query(cmd)
|
||||
try:
|
||||
reply = float(reply)
|
||||
except ValueError:
|
||||
@ -538,7 +538,7 @@ class SeaModule(Module):
|
||||
value = int(value)
|
||||
# TODO: check if more has to be done for valid tcl data (strings?)
|
||||
cmd = "%s %s" % (command, value)
|
||||
self._iodev.query(cmd)
|
||||
self.io.query(cmd)
|
||||
return Done
|
||||
|
||||
attributes['write_' + key] = wfunc
|
||||
@ -584,7 +584,7 @@ class SeaModule(Module):
|
||||
self.DISPATCHER.broadcast_event(make_update(self.name, pobj))
|
||||
|
||||
def initModule(self):
|
||||
self._iodev.register_obj(self, self.sea_object)
|
||||
self.io.register_obj(self, self.sea_object)
|
||||
super().initModule()
|
||||
|
||||
|
||||
@ -623,7 +623,7 @@ class SeaDrivable(SeaModule, Drivable):
|
||||
# return self.target
|
||||
|
||||
def write_target(self, value):
|
||||
self._iodev.query('run %s %s' % (self.sea_object, value))
|
||||
self.io.query('run %s %s' % (self.sea_object, value))
|
||||
#self.status = [self.Status.BUSY, 'driving']
|
||||
return value
|
||||
|
||||
@ -656,4 +656,4 @@ class SeaDrivable(SeaModule, Drivable):
|
||||
- on stdsct drivables this will call the halt script
|
||||
- on EaseDriv this will set the stopped state
|
||||
"""
|
||||
self._iodev.query('%s is_running 0' % self.sea_object)
|
||||
self.io.query('%s is_running 0' % self.sea_object)
|
||||
|
Reference in New Issue
Block a user