def subscribe(self): """Subscribe to the global Timer Service""" service = getTimerService(self) if service: service.subscribe(self) return "Subscribed to Timer Service" return "TimerService not available"
def unsubscribe(self): """Unsubscribe from the global Timer Service""" service = getTimerService(self) if service: service.unsubscribe(self) return "Usubscribed from Timer Service" return "TimerService not available"
def unsubscribe(self): """ Unsubscribe from the global Timer Service. """ service = getTimerService(self) if not service: LOG('AlarmTool', INFO, 'TimerService not available') return service.unsubscribe(self) return "Usubscribed from Timer Service"
def subscribe(self): """ Subscribe to the global Timer Service. """ service = getTimerService(self) if not service: LOG('AlarmTool', INFO, 'TimerService not available') return service.subscribe(self) return "Subscribed to Timer Service"
def isSubscribed(self): """ return True, if we are subscribed to TimerService. Otherwise return False. """ service = getTimerService(self) if not service: LOG('AlarmTool', INFO, 'TimerService not available') return False path = '/'.join(self.getPhysicalPath()) if path in service.lisSubscriptions(): return True return False
def isSubscribed(self): """Return True if we are subscribed to TimerService, otherwise return False """ service = getTimerService(self) return service and \ '/'.join(self.getPhysicalPath()) in service.lisSubscriptions()