ppms driver now uses command handlers
this is a simplicifcation for the ppms driver - the derivation of a changecmd from a querycmd is moved to CmdHandler.__init__ - the special treatment of handlers when writing configured parameters has moved to CmdHandler.write - introduced Drivable.isDriving, changed Module.isBusy Change-Id: I8862ecda9c8cc998bb018bd960f31c9488146707 Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/22033 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -36,6 +36,13 @@ class CmdHandler(secop.commandhandler.CmdHandler):
|
||||
CMDARGS = ['channel']
|
||||
CMDSEPARATOR = ';'
|
||||
|
||||
def __init__(self, name, querycmd, replyfmt):
|
||||
changecmd = querycmd.replace('?', ' ')
|
||||
if not querycmd.endswith('?'):
|
||||
changecmd += ','
|
||||
super().__init__(name, querycmd, replyfmt, changecmd)
|
||||
|
||||
|
||||
rdgrng = CmdHandler('rdgrng', 'RDGRNG?%(channel)d', '%d,%d,%d,%d,%d')
|
||||
inset = CmdHandler('inset', 'INSET?%(channel)d', '%d,%d,%d,%d,%d')
|
||||
filterhdl = CmdHandler('filt', 'FILTER?%(channel)d', '%d,%d,%d')
|
||||
|
Reference in New Issue
Block a user