Public Member Functions | |
def | __init__ |
def | addedTaskCallback |
def | broadcast |
def | force_update |
def | publish |
def | setHardwareID |
def | update |
Public Attributes | |
hwid | |
last_time | |
last_time_period_checked | |
period | |
publisher | |
verbose | |
warn_nohwid_done | |
Private Member Functions | |
def | _check_diagnostic_period |
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 211 of file _diagnostic_updater.py.
Constructs an updater class.
Reimplemented from diagnostic_updater._diagnostic_updater.DiagnosticTaskVector.
Definition at line 226 of file _diagnostic_updater.py.
def diagnostic_updater._diagnostic_updater.Updater._check_diagnostic_period | ( | self | ) | [private] |
Recheck the diagnostic_period on the parameter server.
Definition at line 306 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 Updater class uses this to immediately publish a diagnostic that says that the node is loading.
Reimplemented from diagnostic_updater._diagnostic_updater.DiagnosticTaskVector.
Definition at line 336 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 lvl Level of the diagnostic being output. @param msg Status message to output.
Definition at line 284 of file _diagnostic_updater.py.
Forces the diagnostics to update. Useful if the node has undergone a drastic state change that should be published immediately.
Definition at line 247 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.
Definition at line 323 of file _diagnostic_updater.py.
def diagnostic_updater._diagnostic_updater.Updater.setHardwareID | ( | self, | |
hwid | |||
) |
Definition at line 303 of file _diagnostic_updater.py.
Causes the diagnostics to update if the inter-update interval has been exceeded.
Definition at line 239 of file _diagnostic_updater.py.
Definition at line 226 of file _diagnostic_updater.py.
Definition at line 226 of file _diagnostic_updater.py.
Definition at line 226 of file _diagnostic_updater.py.
Definition at line 226 of file _diagnostic_updater.py.
Definition at line 226 of file _diagnostic_updater.py.
Definition at line 226 of file _diagnostic_updater.py.
Definition at line 226 of file _diagnostic_updater.py.