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

List of all members.

Public Member Functions

def __init__
def add
def clearSummary
def mergeSummary
def summary

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 48 of file _diagnostic_status_wrapper.py.


Constructor & Destructor Documentation

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 58 of file _diagnostic_status_wrapper.py.


Member Function Documentation

Add a key-value pair.

This method adds a key-value pair. Any type that has a << stream
operator can be passed as the second argument.  Formatting is done
using a std::stringstream.

@type key string
@param key Key to be added.
@type value string
@param value Value to be added.

Definition at line 133 of file _diagnostic_status_wrapper.py.

Clears the summary, setting the level to zero and the message to "".

Definition at line 90 of file _diagnostic_status_wrapper.py.

Merges a level and message with the existing ones.

It is sometimes useful to merge two 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 DiagnosticStatus message
mergeSummary(lvl,msg): sets from lvl and msg

Definition at line 96 of file _diagnostic_status_wrapper.py.

Fills out the level and message fields of the DiagnosticStatus.

Usage:
summary(diagnostic_status): Copies the summary from a DiagnosticStatus message
summary(lvl,msg): sets from lvl and messages

Definition at line 75 of file _diagnostic_status_wrapper.py.


Member Data Documentation

Definition at line 80 of file _diagnostic_status_wrapper.py.

Definition at line 80 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 Sun Oct 5 2014 23:27:19