$search
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. | |
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 107 of file diagnostic_updater.h.
diagnostic_updater::GenericFunctionDiagnosticTask< T >::GenericFunctionDiagnosticTask | ( | const std::string & | name, | |
boost::function< void(T &)> | fn | |||
) | [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 118 of file diagnostic_updater.h.
virtual void diagnostic_updater::GenericFunctionDiagnosticTask< T >::run | ( | DiagnosticStatusWrapper & | stat | ) | [inline, virtual] |
Fills out this Task's DiagnosticStatusWrapper.
Implements diagnostic_updater::DiagnosticTask.
Definition at line 122 of file diagnostic_updater.h.
const TaskFunction diagnostic_updater::GenericFunctionDiagnosticTask< T >::fn_ [private] |
Definition at line 129 of file diagnostic_updater.h.
const std::string diagnostic_updater::GenericFunctionDiagnosticTask< T >::name_ [private] |
Reimplemented from diagnostic_updater::DiagnosticTask.
Definition at line 128 of file diagnostic_updater.h.