Class CompositeDiagnosticTask

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class CompositeDiagnosticTask : public diagnostic_updater::DiagnosticTask

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.

Subclassed by diagnostic_updater::HeaderlessTopicDiagnostic

Public Functions

inline explicit CompositeDiagnosticTask(const std::string name)

Constructs a CompositeDiagnosticTask with the given name.

inline virtual void run(DiagnosticStatusWrapper &stat)

Runs each child and merges their outputs.

inline void addTask(DiagnosticTask *t)

Adds a child CompositeDiagnosticTask.

This CompositeDiagnosticTask will be called each time this CompositeDiagnosticTask is run.