Пример #1
0
 def doStatus(self, maxage=0):
     st = Moveable.doStatus(self, maxage)
     if st[0] == status.OK:
         return st[0], self.name  # display device name
     return st
Пример #2
0
 def fix(self, reason=''):
     # fix the base as well, avoids surprises
     Moveable.fix(self, reason)
     return self._attached_base.fix(reason)
Пример #3
0
 def release(self):
     Moveable.release(self)
     return self._attached_base.release()
Пример #4
0
 def doStatus(self, maxage=0):
     code, text = Moveable.doStatus(self, maxage)
     if code == status.OK and self.read(maxage) == 'unknown':
         return status.NOTREACHED, 'unknown position'
     return code, text
Пример #5
0
 def isCompleted(self):
     if self._iscompleted_exception is not None:
         raise self._iscompleted_exception  # pylint: disable=raising-bad-type
     return Moveable.isCompleted(self)
Пример #6
0
 def read(self, maxage=0):
     # fix bad overwrite from StringIO
     return Moveable.read(self, maxage)
Пример #7
0
 def isCompleted(self):
     if self._iscompleted_exception is not None:
         raise self._iscompleted_exception
     return Moveable.isCompleted(self)
Пример #8
0
 def _setMode(self, mode):
     Moveable._setMode(self, mode)
     if mode == MASTER:
         self._rfthread = createThread('RF thread', self._rfcontrol)