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

Public Member Functions

def __init__ (self, *args, **kwds)
 
def add (self, key, val)
 
def clearSummary (self)
 
def mergeSummary (self, *args)
 
def summary (self, *args)
 

Public Attributes

 level
 
 message
 

Detailed Description

Wrapper for the :diagnostic_msgs:`DiagnosticStatus` message that makes it
easier to update.

This class handles common string formatting and vector handling issues
for filling the :diagnostic_msgs:`DiagnosticStatus` message. It is a subclass of
:diagnostic_msgs:`DiagnosticStatus`, so it can be passed directly to
diagnostic publish calls.

Definition at line 46 of file _diagnostic_status_wrapper.py.

Constructor & Destructor Documentation

◆ __init__()

def diagnostic_updater._diagnostic_status_wrapper.DiagnosticStatusWrapper.__init__ (   self,
args,
**  kwds 
)
Constructor. Any message fields that are implicitly/explicitly
set to None will be assigned a default value. The recommend
use is keyword arguments as this is more robust to future message
changes.  You cannot mix in-order arguments and keyword arguments.

The available fields are:
level,name,message,hardware_id,values

:param args: complete set of field values, in .msg order
:param kwds: use keyword arguments corresponding to message field names
     to set specific fields.

Definition at line 56 of file _diagnostic_status_wrapper.py.

Member Function Documentation

◆ add()

def diagnostic_updater._diagnostic_status_wrapper.DiagnosticStatusWrapper.add (   self,
  key,
  val 
)
Add a key-value pair.

This method adds a key-value pair.

:type key: string
:param key: Key to be added.
:type any: string
:param value: Value to be added.

Definition at line 135 of file _diagnostic_status_wrapper.py.

◆ clearSummary()

def diagnostic_updater._diagnostic_status_wrapper.DiagnosticStatusWrapper.clearSummary (   self)
Clears the summary, setting the level to zero and the message to "".

Definition at line 90 of file _diagnostic_status_wrapper.py.

◆ mergeSummary()

def diagnostic_updater._diagnostic_status_wrapper.DiagnosticStatusWrapper.mergeSummary (   self,
args 
)
Merges a level and message with the existing ones.

It is sometimes useful to merge two :diagnostic_msgs:`DiagnosticStatus` messages. In that case,
the key value pairs can be unioned, but the level and summary message
have to be merged more intelligently. This function does the merge in
an intelligent manner, combining the summary in this, with the one
that is passed in.

The combined level is the greater of the two levels to be merged.
If both levels are non-zero (not OK), the messages are combined with a
semicolon separator. If only one level is zero, and the other is
non-zero, the message for the zero level is discarded. If both are
zero, the new message is ignored.

Usage:

`mergeSummary(diagnostic_status)`: merge from a :diagnostic_msgs:`DiagnosticStatus` message

`mergeSummary(lvl,msg)`: sets from lvl and msg

Definition at line 96 of file _diagnostic_status_wrapper.py.

◆ summary()

def diagnostic_updater._diagnostic_status_wrapper.DiagnosticStatusWrapper.summary (   self,
args 
)
Fills out the level and message fields of the :diagnostic_msgs:`DiagnosticStatus`.

Usage:

`summary(diagnostic_status)`: Copies the summary from a :diagnostic_msgs:`DiagnosticStatus` message

`summary(lvl,msg)`: sets from lvl and messages

Definition at line 73 of file _diagnostic_status_wrapper.py.

Member Data Documentation

◆ level

diagnostic_updater._diagnostic_status_wrapper.DiagnosticStatusWrapper.level

Definition at line 83 of file _diagnostic_status_wrapper.py.

◆ message

diagnostic_updater._diagnostic_status_wrapper.DiagnosticStatusWrapper.message

Definition at line 84 of file _diagnostic_status_wrapper.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 Tue May 6 2025 02:17:37