diagnostic_updater::DiagnosedPublisher< T > Class Template Reference

A TopicDiagnostic combined with a ros::Publisher. More...

#include <publisher.h>

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

List of all members.

Public Member Functions

 DiagnosedPublisher (const ros::Publisher &pub, diagnostic_updater::Updater &diag, const diagnostic_updater::FrequencyStatusParam &freq, const diagnostic_updater::TimeStampStatusParam &stamp)
 Constructs a DiagnosedPublisher.
ros::Publisher getPublisher () const
 Returns the publisher.
virtual void publish (const T &message)
 Collects statistics and publishes the message.
virtual void publish (const boost::shared_ptr< T > &message)
 Collects statistics and publishes the message.
void setPublisher (ros::Publisher pub)
 Changes the publisher.
virtual ~DiagnosedPublisher ()

Private Attributes

ros::Publisher publisher_

Detailed Description

template<class T>
class diagnostic_updater::DiagnosedPublisher< T >

A TopicDiagnostic combined with a ros::Publisher.

For a standard ros::Publisher, this class allows the ros::Publisher and the TopicDiagnostic to be combined for added convenience.

Definition at line 242 of file publisher.h.


Constructor & Destructor Documentation

template<class T >
diagnostic_updater::DiagnosedPublisher< T >::DiagnosedPublisher ( const ros::Publisher &  pub,
diagnostic_updater::Updater diag,
const diagnostic_updater::FrequencyStatusParam freq,
const diagnostic_updater::TimeStampStatusParam stamp 
) [inline]

Constructs a DiagnosedPublisher.

Parameters:
pub The publisher on which statistics are being collected.
diag The diagnostic_updater that the CompositeDiagnosticTask should add itself to.
freq The parameters for the FrequencyStatus class that will be computing statistics.
stamp The parameters for the TimeStampStatus class that will be computing statistics.

Definition at line 260 of file publisher.h.

template<class T >
virtual diagnostic_updater::DiagnosedPublisher< T >::~DiagnosedPublisher (  )  [inline, virtual]

Definition at line 268 of file publisher.h.


Member Function Documentation

template<class T >
ros::Publisher diagnostic_updater::DiagnosedPublisher< T >::getPublisher (  )  const [inline]

Returns the publisher.

Definition at line 292 of file publisher.h.

template<class T >
virtual void diagnostic_updater::DiagnosedPublisher< T >::publish ( const T &  message  )  [inline, virtual]

Collects statistics and publishes the message.

The timestamp to be used by the TimeStampStatus class will be extracted from message.header.stamp.

Definition at line 286 of file publisher.h.

template<class T >
virtual void diagnostic_updater::DiagnosedPublisher< T >::publish ( const boost::shared_ptr< T > &  message  )  [inline, virtual]

Collects statistics and publishes the message.

The timestamp to be used by the TimeStampStatus class will be extracted from message.header.stamp.

Definition at line 277 of file publisher.h.

template<class T >
void diagnostic_updater::DiagnosedPublisher< T >::setPublisher ( ros::Publisher  pub  )  [inline]

Changes the publisher.

Definition at line 300 of file publisher.h.


Member Data Documentation

template<class T >
ros::Publisher diagnostic_updater::DiagnosedPublisher< T >::publisher_ [private]

Definition at line 306 of file publisher.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs


diagnostic_updater
Author(s): Jeremy Leibs, Blaise Gassend
autogenerated on Fri Jan 11 09:12:25 2013