Public Member Functions | Private Attributes
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]

List of all members.

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_

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 
) [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 118 of file diagnostic_updater.h.


Member Function Documentation

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


Member Data Documentation

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

Definition at line 129 of file diagnostic_updater.h.

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

Reimplemented from diagnostic_updater::DiagnosticTask.

Definition at line 128 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 Fri Aug 28 2015 10:29:58