Public Member Functions | Private Attributes | List of all members
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]

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. More...
 
ros::Publisher getPublisher () const
 Returns the publisher. More...
 
virtual void publish (const boost::shared_ptr< T > &message)
 Collects statistics and publishes the message. More...
 
virtual void publish (const T &message)
 Collects statistics and publishes the message. More...
 
void setPublisher (ros::Publisher pub)
 Changes the publisher. More...
 
virtual ~DiagnosedPublisher ()
 
- Public Member Functions inherited from diagnostic_updater::TopicDiagnostic
virtual void tick ()
 
virtual void tick (const ros::Time &stamp)
 Collects statistics and publishes the message. More...
 
 TopicDiagnostic (std::string name, diagnostic_updater::Updater &diag, const diagnostic_updater::FrequencyStatusParam &freq, const diagnostic_updater::TimeStampStatusParam &stamp)
 Constructs a TopicDiagnostic. More...
 
virtual ~TopicDiagnostic ()
 
- Public Member Functions inherited from diagnostic_updater::HeaderlessTopicDiagnostic
virtual void clear_window ()
 Clears the frequency statistics. More...
 
 HeaderlessTopicDiagnostic (std::string name, diagnostic_updater::Updater &diag, const diagnostic_updater::FrequencyStatusParam &freq)
 Constructs a HeaderlessTopicDiagnostic. More...
 
virtual ~HeaderlessTopicDiagnostic ()
 
- Public Member Functions inherited from diagnostic_updater::CompositeDiagnosticTask
void addTask (DiagnosticTask *t)
 Adds a child CompositeDiagnosticTask. More...
 
 CompositeDiagnosticTask (const std::string name)
 Constructs a CompositeDiagnosticTask with the given name. More...
 
virtual void run (DiagnosticStatusWrapper &stat)
 Runs each child and merges their outputs. 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

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 174 of file publisher.h.

Constructor & Destructor Documentation

◆ DiagnosedPublisher()

Constructs a DiagnosedPublisher.

Parameters
pubThe publisher on which statistics are being collected.
diagThe diagnostic_updater that the CompositeDiagnosticTask should add itself to.
freqThe parameters for the FrequencyStatus class that will be computing statistics.
stampThe parameters for the TimeStampStatus class that will be computing statistics.

Definition at line 192 of file publisher.h.

◆ ~DiagnosedPublisher()

template<class T >
virtual diagnostic_updater::DiagnosedPublisher< T >::~DiagnosedPublisher ( )
inlinevirtual

Definition at line 200 of file publisher.h.

Member Function Documentation

◆ getPublisher()

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

Returns the publisher.

Definition at line 224 of file publisher.h.

◆ publish() [1/2]

template<class T >
virtual void diagnostic_updater::DiagnosedPublisher< T >::publish ( const boost::shared_ptr< T > &  message)
inlinevirtual

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 209 of file publisher.h.

◆ publish() [2/2]

template<class T >
virtual void diagnostic_updater::DiagnosedPublisher< T >::publish ( const T &  message)
inlinevirtual

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 218 of file publisher.h.

◆ setPublisher()

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

Changes the publisher.

Definition at line 232 of file publisher.h.

Member Data Documentation

◆ publisher_

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

Definition at line 238 of file publisher.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 Wed Mar 27 2019 02:34:25