Nodelet class based on ConnectionBasedNodelet and publish diagnostic infromation periodicaly. More...
#include <diagnostic_nodelet.h>
Public Types | |
typedef boost::shared_ptr < DiagnosticNodelet > | Ptr |
Public Member Functions | |
DiagnosticNodelet (const std::string &name) | |
Constructor and subclass need to call this. | |
Protected Member Functions | |
virtual void | onInit () |
Initialize method. Subclass should call this method in its onInit method. | |
virtual void | updateDiagnostic (diagnostic_updater::DiagnosticStatusWrapper &stat) |
Method which is called periodically. | |
Protected Attributes | |
TimeredDiagnosticUpdater::Ptr | diagnostic_updater_ |
Pointer to TimeredDiagnosticUpdater to call updateDiagnostic(diagnostic_updater::DiagnosticStatusWrapper&) periodically. | |
const std::string | name_ |
Name of subclass. It is set by constructor and used as Diagnostic method. | |
jsk_topic_tools::VitalChecker::Ptr | vital_checker_ |
VitalChecker object wihch is used in default configuration. |
Nodelet class based on ConnectionBasedNodelet and publish diagnostic infromation periodicaly.
In default, diagnostic status is determined by vital_checker_ status. If vital_checker_ is not poked for seconds, which is specified by ~vital_rate param and defaults to 1.0 second, diagnostic status will be ERROR.
In order to utilize this, need to call VitalChecker::poke method in your callback function.
Definition at line 65 of file diagnostic_nodelet.h.
typedef boost::shared_ptr<DiagnosticNodelet> jsk_topic_tools::DiagnosticNodelet::Ptr |
Reimplemented in jsk_topic_tools::StringRelay.
Definition at line 68 of file diagnostic_nodelet.h.
jsk_topic_tools::DiagnosticNodelet::DiagnosticNodelet | ( | const std::string & | name | ) |
Constructor and subclass need to call this.
name | name of subclass |
Definition at line 40 of file diagnostic_nodelet.cpp.
void jsk_topic_tools::DiagnosticNodelet::onInit | ( | ) | [protected, virtual] |
Initialize method. Subclass should call this method in its onInit method.
Reimplemented from jsk_topic_tools::ConnectionBasedNodelet.
Reimplemented in jsk_topic_tools::VitalCheckerNodelet, and jsk_topic_tools::StringRelay.
Definition at line 46 of file diagnostic_nodelet.cpp.
void jsk_topic_tools::DiagnosticNodelet::updateDiagnostic | ( | diagnostic_updater::DiagnosticStatusWrapper & | stat | ) | [protected, virtual] |
Method which is called periodically.
In default, it check vitality of vital_checker_ and if vital_checker_ is not poked for seconds, diagnostic status will be ERROR.
stat | Modofy stat to change status of diagnostic information. |
Reimplemented in jsk_topic_tools::VitalCheckerNodelet.
Definition at line 65 of file diagnostic_nodelet.cpp.
Pointer to TimeredDiagnosticUpdater to call updateDiagnostic(diagnostic_updater::DiagnosticStatusWrapper&) periodically.
Definition at line 106 of file diagnostic_nodelet.h.
const std::string jsk_topic_tools::DiagnosticNodelet::name_ [protected] |
Name of subclass. It is set by constructor and used as Diagnostic method.
Definition at line 99 of file diagnostic_nodelet.h.
VitalChecker object wihch is used in default configuration.
Definition at line 111 of file diagnostic_nodelet.h.