Public Member Functions | Private Attributes | List of all members
diagnostic_updater::CompositeDiagnosticTask Class Reference

Merges CompositeDiagnosticTask into a single DiagnosticTask. More...

#include <diagnostic_updater.h>

Inheritance diagram for diagnostic_updater::CompositeDiagnosticTask:
Inheritance graph
[legend]

Public Member Functions

void addTask (DiagnosticTask *t)
 Adds a child CompositeDiagnosticTask. More...
 
 CompositeDiagnosticTask (const std::string name)
 Constructs a CompositeDiagnosticTask with the given name. More...
 
virtual void run (DiagnosticStatusWrapper &stat)
 Runs each child and merges their outputs. More...
 
- Public Member Functions inherited from diagnostic_updater::DiagnosticTask
 DiagnosticTask (const std::string name)
 Constructs a DiagnosticTask setting its name in the process. More...
 
const std::string & getName ()
 Returns the name of the DiagnosticTask. More...
 
virtual ~DiagnosticTask ()
 

Private Attributes

std::vector< DiagnosticTask * > tasks_
 

Detailed Description

Merges CompositeDiagnosticTask into a single DiagnosticTask.

The CompositeDiagnosticTask allows multiple DiagnosticTask instances to be combined into a single task that produces a 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 179 of file diagnostic_updater.h.

Constructor & Destructor Documentation

◆ CompositeDiagnosticTask()

diagnostic_updater::CompositeDiagnosticTask::CompositeDiagnosticTask ( const std::string  name)
inline

Constructs a CompositeDiagnosticTask with the given name.

Definition at line 185 of file diagnostic_updater.h.

Member Function Documentation

◆ addTask()

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 219 of file diagnostic_updater.h.

◆ run()

virtual void diagnostic_updater::CompositeDiagnosticTask::run ( DiagnosticStatusWrapper stat)
inlinevirtual

Runs each child and merges their outputs.

Implements diagnostic_updater::DiagnosticTask.

Definition at line 191 of file diagnostic_updater.h.

Member Data Documentation

◆ tasks_

std::vector<DiagnosticTask *> diagnostic_updater::CompositeDiagnosticTask::tasks_
private

Definition at line 225 of file diagnostic_updater.h.


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 Tue Nov 15 2022 03:17:19