Public Member Functions | |
def | __init__ |
def | addedTaskCallback |
def | broadcast |
def | force_update |
def | getPeriod |
def | publish |
def | setHardwareID |
def | update |
def | update_diagnostic_period |
Public Attributes | |
hwid | |
next_time | |
period | |
publisher | |
verbose | |
warn_nohwid_done |
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 181 of file _diagnostic_updater.py.
Constructs an updater class.
Reimplemented from diagnostic_updater._diagnostic_updater.DiagnosticTaskVector.
Definition at line 196 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 301 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 260 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 218 of file _diagnostic_updater.py.
Returns the interval between updates.
Definition at line 256 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 288 of file _diagnostic_updater.py.
def diagnostic_updater._diagnostic_updater.Updater.setHardwareID | ( | self, | |
hwid | |||
) |
Definition at line 279 of file _diagnostic_updater.py.
Causes the diagnostics to update if the inter-update interval has been exceeded.
Definition at line 208 of file _diagnostic_updater.py.
Recheck the diagnostic_period on the parameter server. (Cached)
Definition at line 282 of file _diagnostic_updater.py.
Definition at line 196 of file _diagnostic_updater.py.
Definition at line 196 of file _diagnostic_updater.py.
Definition at line 196 of file _diagnostic_updater.py.
Definition at line 196 of file _diagnostic_updater.py.
Definition at line 196 of file _diagnostic_updater.py.
Definition at line 196 of file _diagnostic_updater.py.