def doInit(self, mode): MultiSwitcher.doInit(self, mode) self._sm_values = sorted( [x for x in self.mapping if isinstance(x, number_types)])[1:] named_vals = {k: v[0] for k, v in self.mapping.items()} self.valuetype = oneofdict_or(named_vals, floatrange(0, self._sm_values[-1]))
def doInit(self, mode): if len(self._attached_moveables) != 3: raise ConfigurationError('I need exactly 3 attached moveables, %d ' 'given' % len(self._attached_moveables)) MultiSwitcher.doInit(self, mode)
def doInit(self, mode): GenericMultiSwitcher.doInit(self, mode) self._xdev = self._attached_moveables[0] if self._xdev.name != 'x_m': raise NicosError(self, 'first attached device must be x_m')