a DiagnosticTask based on a boost::function. More...
#include <diagnostic_updater.h>
Public Member Functions | |
GenericFunctionDiagnosticTask (const std::string &name, boost::function< void(T &)> fn) | |
virtual void | run (DiagnosticStatusWrapper &stat) |
Fills out this Task's DiagnosticStatusWrapper. 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 | |
const TaskFunction | fn_ |
const std::string | name_ |
a DiagnosticTask based on a boost::function.
The GenericFunctionDiagnosticTask calls the function when it updates. The function updates the DiagnosticStatusWrapper and collects data.
This is useful for gathering information about a device or driver, like temperature, calibration, etc.
Definition at line 140 of file diagnostic_updater.h.
|
inline |
Constructs a GenericFunctionDiagnosticTask based on the given name and function.
name | Name of the function. |
fn | Function to be called when DiagnosticTask::run is called. |
Definition at line 151 of file diagnostic_updater.h.
|
inlinevirtual |
Fills out this Task's DiagnosticStatusWrapper.
Implements diagnostic_updater::DiagnosticTask.
Definition at line 155 of file diagnostic_updater.h.
|
private |
Definition at line 162 of file diagnostic_updater.h.
|
private |
Definition at line 161 of file diagnostic_updater.h.