Public Member Functions | |
def | __init__ (self) |
def | addedTaskCallback (self, task) |
def | broadcast (self, lvl, msg) |
def | force_update (self) |
def | publish (self, msg) |
def | setHardwareID (self, hwid) |
def | update (self) |
![]() | |
def | add (self, *args) |
def | removeByName (self, name) |
Public Attributes | |
hwid | |
last_time | |
last_time_period_checked | |
period | |
publisher | |
verbose | |
warn_nohwid_done | |
![]() | |
lock | |
tasks | |
Private Member Functions | |
def | _check_diagnostic_period (self) |
Manages a list of diagnostic tasks, and calls them in a rate-limited manner. This class manages a list of diagnostic tasks. Its update function should be called frequently. At some predetermined rate, the update function will cause all the diagnostic tasks to run, and will collate and publish the resulting diagnostics. The publication rate is determined by the `~diagnostic_period` ros parameter. The class also allows an update to be forced when something significant has happened, and allows a single message to be broadcast on all the diagnostics if normal operation of the node is suspended for some reason.
Definition at line 242 of file _diagnostic_updater.py.
def diagnostic_updater._diagnostic_updater.Updater.__init__ | ( | self | ) |
Constructs an updater class.
Reimplemented from diagnostic_updater._diagnostic_updater.DiagnosticTaskVector.
Definition at line 257 of file _diagnostic_updater.py.
|
private |
Recheck the `~diagnostic_period` on the parameter server.
Definition at line 340 of file _diagnostic_updater.py.
def diagnostic_updater._diagnostic_updater.Updater.addedTaskCallback | ( | self, | |
task | |||
) |
Allows an action to be taken when a task is added. The :class:`Updater` class uses this to immediately publish a diagnostic that says that the node is loading. :param DiagnosticTask task: the added task.
Reimplemented from diagnostic_updater._diagnostic_updater.DiagnosticTaskVector.
Definition at line 374 of file _diagnostic_updater.py.
def diagnostic_updater._diagnostic_updater.Updater.broadcast | ( | self, | |
lvl, | |||
msg | |||
) |
Outputs a message on all the known DiagnosticStatus. Useful if something drastic is happening such as shutdown or a self-test. :param int lvl: Level of the diagnostic being output. :param str msg: Status message to output.
Definition at line 315 of file _diagnostic_updater.py.
def diagnostic_updater._diagnostic_updater.Updater.force_update | ( | self | ) |
Forces the diagnostics to update. Useful if the node has undergone a drastic state change that should be published immediately.
Definition at line 278 of file _diagnostic_updater.py.
def diagnostic_updater._diagnostic_updater.Updater.publish | ( | self, | |
msg | |||
) |
Publishes a single diagnostic status or a vector of diagnostic statuses. :param msg: The status(es) to publish. :type msg: diagnostic_msgs.msg.DiagnosticStatus
Definition at line 357 of file _diagnostic_updater.py.
def diagnostic_updater._diagnostic_updater.Updater.setHardwareID | ( | self, | |
hwid | |||
) |
:param str hwid: The hardware ID.
Definition at line 334 of file _diagnostic_updater.py.
def diagnostic_updater._diagnostic_updater.Updater.update | ( | self | ) |
Causes the diagnostics to update if the inter-update interval has been exceeded.
Definition at line 270 of file _diagnostic_updater.py.
diagnostic_updater._diagnostic_updater.Updater.hwid |
Definition at line 267 of file _diagnostic_updater.py.
diagnostic_updater._diagnostic_updater.Updater.last_time |
Definition at line 262 of file _diagnostic_updater.py.
diagnostic_updater._diagnostic_updater.Updater.last_time_period_checked |
Definition at line 263 of file _diagnostic_updater.py.
diagnostic_updater._diagnostic_updater.Updater.period |
Definition at line 264 of file _diagnostic_updater.py.
diagnostic_updater._diagnostic_updater.Updater.publisher |
Definition at line 260 of file _diagnostic_updater.py.
diagnostic_updater._diagnostic_updater.Updater.verbose |
Definition at line 266 of file _diagnostic_updater.py.
diagnostic_updater._diagnostic_updater.Updater.warn_nohwid_done |
Definition at line 268 of file _diagnostic_updater.py.