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

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 107 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 

Constructs a GenericFunctionDiagnosticTask based on the given name and function.

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

Definition at line 118 of file diagnostic_updater.h.

Member Function Documentation

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

Fills out this Task's DiagnosticStatusWrapper.

Implements diagnostic_updater::DiagnosticTask.

Definition at line 122 of file diagnostic_updater.h.

Member Data Documentation

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

Definition at line 129 of file diagnostic_updater.h.

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

Definition at line 128 of file diagnostic_updater.h.

The documentation for this class was generated from the following file:

Author(s): Kevin Watts, Brice Rebsamen , Jeremy Leibs, Blaise Gassend
autogenerated on Wed Mar 27 2019 03:02:22