def axesnames(self, axesnames): """Name of axes to set as list of strings (not tuple!) or None to skip.""" if axesnames is None: self._axesnames = None else: assert isinstance(axesnames, list), 'axesnames must be list' self._axesnames = axesnames debug('ControllerStartup.axesnames = %s', itemstostr(self._axesnames))
def refmodes(self, refmodes): """Referencing command as string (for all stages) or list (not tuple!) or None to skip. Skip single axes with "" or None as item in the list. """ if refmodes is None: self._refmodes = None else: self._refmodes = refmodes if isinstance(refmodes, list) else [refmodes] * len(self.pidevice.allaxes) debug('ControllerStartup.refmodes = %s', itemstostr(self._refmodes))
def stages(self, stages): """Name of stages to initialize as string or list (not tuple!) or None to skip. Skip single axes with "" or None as item in the list. """ if stages is None: self._stages = None else: self._stages = stages if isinstance(stages, list) else [stages] * len(self.pidevice.allaxes) debug('ControllerStartup.stages = %s', itemstostr(self._stages))
def __init__(self, pidevice, **kwargs): """Provide a "ready to use" PI device. @type pidevice : pipython.gcscommands.GCSCommands @param kwargs : Optional arguments with keywords that are passed to sub functions. """ debug('create an instance of ControllerStartup(kwargs=%s)', itemstostr(kwargs)) if not isdeviceavailable([GCS2Commands], pidevice): raise TypeError('Type %s of pidevice is not supported!' % type(pidevice).__name__) self.pidevice = pidevice self._stages = None self._refmodes = None self._servo = None self._axesnames = None self._kwargs = kwargs self._databuf = {'servobuf': {}, } self.prop = { 'devname': self.pidevice.devname, 'skipcst': False, 'forcecst': False, 'skipsai': False, 'forcesai': False, 'showlog': False, 'skipini': False, 'skiponl': False, 'skipeax': False, 'skipref': False, 'forceref': False, }
def servostates(self, servo): """Desired servo states as boolean (for all stages) or dict {axis: state} or None to skip.""" self._servo = servo debug('ControllerStartup.servostates = %s', itemstostr(self._servo))