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