$search
Merges CompositeDiagnosticTask into a single DiagnosticTask. More...
#include <diagnostic_updater.h>
Public Member Functions | |
void | addTask (DiagnosticTask *t) |
Adds a child CompositeDiagnosticTask. | |
CompositeDiagnosticTask (const std::string name) | |
Constructs a CompositeDiagnosticTask with the given name. | |
virtual void | run (DiagnosticStatusWrapper &stat) |
Runs each child and merges their outputs. | |
Private Attributes | |
std::vector< DiagnosticTask * > | tasks_ |
Merges CompositeDiagnosticTask into a single DiagnosticTask.
The CompositeDiagnosticTask allows multiple DiagnosticTask instances to be combined into a single task that produces a single single DiagnosticStatusWrapped. The output of the combination has the max of the status levels, and a concatenation of the non-zero-level messages.
For instance, this could be used to combine the calibration and offset data from an IMU driver.
Definition at line 146 of file diagnostic_updater.h.
diagnostic_updater::CompositeDiagnosticTask::CompositeDiagnosticTask | ( | const std::string | name | ) | [inline] |
Constructs a CompositeDiagnosticTask with the given name.
Definition at line 152 of file diagnostic_updater.h.
void diagnostic_updater::CompositeDiagnosticTask::addTask | ( | DiagnosticTask * | t | ) | [inline] |
Adds a child CompositeDiagnosticTask.
This CompositeDiagnosticTask will be called each time this CompositeDiagnosticTask is run.
Definition at line 186 of file diagnostic_updater.h.
virtual void diagnostic_updater::CompositeDiagnosticTask::run | ( | DiagnosticStatusWrapper & | stat | ) | [inline, virtual] |
Runs each child and merges their outputs.
Implements diagnostic_updater::DiagnosticTask.
Definition at line 158 of file diagnostic_updater.h.
std::vector<DiagnosticTask *> diagnostic_updater::CompositeDiagnosticTask::tasks_ [private] |
Definition at line 192 of file diagnostic_updater.h.