def make_tagged_alarm(self, name): ''' Makes a blank alarm with the node_name of the alarm_server so that users know it is the initial state ''' alarm = Alarm.blank(name) alarm.node_name = 'alarm_server' return alarm
def _on_get_alarm(self, srv): ''' Either returns the alarm request if it exists or a blank alarm ''' rospy.logdebug("Got request for alarm: {}".format(srv.alarm_name)) return self.alarms.get(srv.alarm_name, Alarm.blank(srv.alarm_name)).as_srv_resp()