Public Member Functions | Private Attributes | List of all members
diagnostic_updater::GenericFunctionDiagnosticTask< T > Class Template Reference

a DiagnosticTask based on a boost::function. More...

#include <diagnostic_updater.h>

Inheritance diagram for diagnostic_updater::GenericFunctionDiagnosticTask< T >:
Inheritance graph
[legend]

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_
 

Detailed Description

template<class T>
class diagnostic_updater::GenericFunctionDiagnosticTask< T >

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

Constructor & Destructor Documentation

template<class T >
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.

Parameters
nameName of the function.
fnFunction to be called when DiagnosticTask::run is called.

Definition at line 119 of file diagnostic_updater.h.

Member Function Documentation

template<class T >
virtual void diagnostic_updater::GenericFunctionDiagnosticTask< T >::run ( DiagnosticStatusWrapper stat)
inlinevirtual

Fills out this Task's DiagnosticStatusWrapper.

Implements diagnostic_updater::DiagnosticTask.

Definition at line 123 of file diagnostic_updater.h.

Member Data Documentation

template<class T >
const TaskFunction diagnostic_updater::GenericFunctionDiagnosticTask< T >::fn_
private

Definition at line 130 of file diagnostic_updater.h.

template<class T >
const std::string diagnostic_updater::GenericFunctionDiagnosticTask< T >::name_
private

Definition at line 129 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 Thu Oct 8 2020 03:19:34