Public Member Functions | Public Attributes | Private Member Functions | List of all members
diagnostic_updater._diagnostic_updater.Updater Class Reference
Inheritance diagram for diagnostic_updater._diagnostic_updater.Updater:
Inheritance graph
[legend]

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)
 
- Public Member Functions inherited from diagnostic_updater._diagnostic_updater.DiagnosticTaskVector
def __init__ (self)
 
def add (self, args)
 
def addedTaskCallback (self, task)
 
def removeByName (self, name)
 

Public Attributes

 hwid
 
 last_time
 
 last_time_period_checked
 
 period
 
 publisher
 
 verbose
 
 warn_nohwid_done
 
- Public Attributes inherited from diagnostic_updater._diagnostic_updater.DiagnosticTaskVector
 lock
 
 tasks
 

Private Member Functions

def _check_diagnostic_period (self)
 

Detailed Description

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 216 of file _diagnostic_updater.py.

Constructor & Destructor Documentation

def diagnostic_updater._diagnostic_updater.Updater.__init__ (   self)
Constructs an updater class.

Definition at line 231 of file _diagnostic_updater.py.

Member Function Documentation

def diagnostic_updater._diagnostic_updater.Updater._check_diagnostic_period (   self)
private
Recheck the diagnostic_period on the parameter server.

Definition at line 311 of file _diagnostic_updater.py.

def diagnostic_updater._diagnostic_updater.Updater.addedTaskCallback (   self,
  task 
)

Definition at line 341 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 289 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 252 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 328 of file _diagnostic_updater.py.

def diagnostic_updater._diagnostic_updater.Updater.setHardwareID (   self,
  hwid 
)

Definition at line 308 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 244 of file _diagnostic_updater.py.

Member Data Documentation

diagnostic_updater._diagnostic_updater.Updater.hwid

Definition at line 241 of file _diagnostic_updater.py.

diagnostic_updater._diagnostic_updater.Updater.last_time

Definition at line 236 of file _diagnostic_updater.py.

diagnostic_updater._diagnostic_updater.Updater.last_time_period_checked

Definition at line 237 of file _diagnostic_updater.py.

diagnostic_updater._diagnostic_updater.Updater.period

Definition at line 238 of file _diagnostic_updater.py.

diagnostic_updater._diagnostic_updater.Updater.publisher

Definition at line 234 of file _diagnostic_updater.py.

diagnostic_updater._diagnostic_updater.Updater.verbose

Definition at line 240 of file _diagnostic_updater.py.

diagnostic_updater._diagnostic_updater.Updater.warn_nohwid_done

Definition at line 242 of file _diagnostic_updater.py.


The documentation for this class was generated from the following file:


diagnostic_updater
Author(s): Kevin Watts, Brice Rebsamen , Jeremy Leibs, Blaise Gassend
autogenerated on Wed Mar 27 2019 03:02:22