def doStatus(self, maxage=0): if self.scanmode == 'DIFF': return multiStatus(((name, self._adevs[name]) for name in ['mono', 'phi', 'psi', 'alpha']), maxage) else: return multiStatus(((name, self._adevs[name]) for name in ['mono', 'ana', 'phi', 'psi', 'alpha']), maxage)
def doStatus(self, maxage=0): # if the underlying device is moving or in error state, # reflect its status move_status = multiStatus(self.devices, maxage) if move_status[0] not in (status.OK, status.WARN): return move_status return MappedReadable.doStatus(self, maxage)
def doStatus(self, maxage=0): st, text = multiStatus(self._adevs) if st == status.BUSY: return st, text if self.read(maxage) == 'unknown': return status.NOTREACHED, 'unknown polarization setting' return status.OK, 'idle'
def doStatus(self, maxage=0): st, text = multiStatus(self._getWaiters(), maxage) if st == status.ERROR: return st, text for master in self._masters: for (name, value) in self._channel_presets.get(master, ()): if master.presetReached(name, value, maxage): return status.OK, text return st, text
def doStatus(self, maxage=0): # order is important here. const, text = multiStatus( ((name, self._adevs[name]) for name in ['theta', 'twotheta', 'focush', 'focusv']), maxage) if const == status.OK: # all idle; check also angle relation tt, th = self._get_angles(maxage) if abs(tt - 2.0 * th) > self._axisprecision: return status.NOTREACHED, \ 'two theta and 2*theta axis mismatch: %s <-> %s = 2 * %s' % \ (tt, 2.0*th, th) return const, text
def doStatus(self, maxage=0): move_status = multiStatus(self._adevs, maxage) # if any of the underlying devices has an error, return it if move_status[0] > status.BUSY: return move_status try: # if the enable bit is not active, return "disabled" status if not self._attached_is_enabled.read(maxage): return status.DISABLED, 'disabled' r = self.doRead(maxage) # the the device is in the fallback position, it is considered # still moving if r == self.fallback: return status.BUSY, 'target not yet reached' return status.OK, 'idle' except PositionError as e: return status.NOTREACHED, str(e)
def doStatus(self, maxage=0): general_epics_status, _ = self._get_mapped_epics_status() message = self._get_status_message() if general_epics_status == status.ERROR: return status.ERROR, message or 'Unknown problem in record' state = self._get_pv('statepv', as_string=True) if state not in self._mapped_state: return status.UNKNOWN, state or 'Unknown detector state' st, text = multiStatus(self._getWaiters(), maxage) if '=' in text: _, text = text.split('=') if st != status.OK: return st, text return self._mapped_state[state], state
def doStatus(self, maxage=0): return multiStatus(list(zip(self._axnames, self._axes)))
def doStatus(self, maxage=0): return multiStatus(list(zip(self._slitnames, self._slits)))
def doStatus(self, maxage=0): return multiStatus(((name, self._adevs[name]) for name in ['chi', 'omega']), maxage)
def doStatus(self, maxage=0): return multiStatus(self._attached_images, maxage)