Wrapper for ROS publisher that automatically diagnoses the rate and delay of published messages. More...
#include <diagnosed_pub_sub.hpp>

Public Member Functions | |
| DiagnosedPublisher (const ::ros::Publisher &pub, ::diagnostic_updater::Updater &updater, const ::cras::BoundParamHelperPtr ¶ms) | |
| DiagnosedPublisher (const ::ros::Publisher &pub, ::diagnostic_updater::Updater &updater, const ::cras::BoundParamHelperPtr ¶ms, const ::ros::Rate &defaultRate) | |
| DiagnosedPublisher (const ::ros::Publisher &pub, ::diagnostic_updater::Updater &updater, const ::cras::BoundParamHelperPtr ¶ms, const ::ros::Rate &defaultRate, const ::ros::Rate &defaultMinRate, const ::ros::Rate &defaultMaxRate) | |
| DiagnosedPublisher (const ::ros::Publisher &pub, const ::cras::BoundParamHelperPtr ¶ms) | |
| Add a topic diagnostic task to the publisher. More... | |
| DiagnosedPublisher (const ::ros::Publisher &pub, const ::cras::BoundParamHelperPtr ¶ms, const ::cras::SimpleTopicStatusParam< Message > &defaultParams) | |
| Add a topic diagnostic task to the publisher. More... | |
| DiagnosedPublisher (const ::ros::Publisher &pub, const ::std::shared_ptr<::cras::TopicStatus< Message >> &diag) | |
| Add the given diagnostic task to the publisher. More... | |
| DiagnosedPublisher (const ::ros::Publisher &pub, const ::std::string &name, const ::cras::TopicStatusParam< Message > &diagParams) | |
| Add a topic diagnostic task to the publisher. More... | |
| ::ros::Rate | getDesiredRate () const |
| ::ros::Publisher & | getPublisher () |
| Get the ROS publisher. More... | |
| const ::ros::Publisher & | getPublisher () const |
| Get the ROS publisher. More... | |
| virtual void | publish (const Message &message) |
| Publish a message. More... | |
| virtual void | publish (const typename Message::Ptr &message) |
| Publish a message. More... | |
| void | setPublisher (const ::ros::Publisher &pub) |
| Change the ROS publisher. More... | |
Public Member Functions inherited from cras::DiagnosedPubSub< Message > | |
| virtual void | attach (::diagnostic_updater::Updater &updater) |
| Add the diagnostic task to the given updater. More... | |
| DiagnosedPubSub (const ::cras::BoundParamHelperPtr ¶ms) | |
| Configure the diagnostic task from the given ROS parameter helper. More... | |
| DiagnosedPubSub (const ::cras::BoundParamHelperPtr ¶ms, const ::cras::SimpleTopicStatusParam< Message > &defaultParams) | |
| Configure the diagnostic task from the given ROS parameter helper. More... | |
| DiagnosedPubSub (const ::std::shared_ptr<::cras::TopicStatus< Message >> &diag) | |
| Use the given diagnostic task to diagnose the publisher/subscriber. More... | |
| DiagnosedPubSub (const ::std::string &name, const ::cras::TopicStatusParam< Message > &diagParams) | |
| Create the diagnostic task from the given params. More... | |
| virtual ::std::shared_ptr<::cras::TopicStatus< Message > > | getDiagnosticTask () const |
| Get the topic diagnostic task. More... | |
| virtual | ~DiagnosedPubSub ()=default |
Protected Attributes | |
| ::ros::Publisher | publisher |
| The ROS publisher. More... | |
Protected Attributes inherited from cras::DiagnosedPubSub< Message > | |
| ::std::shared_ptr<::cras::TopicStatus< Message > > | diag |
| The diagnostic task. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from cras::DiagnosedPubSub< Message > | |
| void | addDelayParams (::cras::SimpleTopicStatusParam< Message > &topicStatusParam, const ::cras::BoundParamHelperPtr ¶ms) |
| When configuring from ROS params, load the delay configuration. More... | |
| void | addDelayParams (::cras::SimpleTopicStatusParam< Message > &topicStatusParam, const ::cras::BoundParamHelperPtr ¶ms) |
| When configuring from ROS params for a headerless message type, this function does nothing. More... | |
Wrapper for ROS publisher that automatically diagnoses the rate and delay of published messages.
| Message | Type of the published message. |
| Enable | SFINAE only. Do not set explicitly. |
publish() method from this class, not the one from the ROS publisher. Definition at line 136 of file diagnosed_pub_sub.hpp.
| cras::DiagnosedPublisher< Message, Enable >::DiagnosedPublisher | ( | const ::ros::Publisher & | pub, |
| const ::std::shared_ptr<::cras::TopicStatus< Message >> & | diag | ||
| ) |
Add the given diagnostic task to the publisher.
| [in] | pub | The ROS publisher. |
| [in] | diag | The topic diagnostics task. |
| cras::DiagnosedPublisher< Message, Enable >::DiagnosedPublisher | ( | const ::ros::Publisher & | pub, |
| const ::std::string & | name, | ||
| const ::cras::TopicStatusParam< Message > & | diagParams | ||
| ) |
Add a topic diagnostic task to the publisher.
| [in] | pub | The ROS publisher. |
| [in] | name | Name of the diagnostic task |
| [in] | diagParams | Parameters of the topic diagnostics task. |
| cras::DiagnosedPublisher< Message, Enable >::DiagnosedPublisher | ( | const ::ros::Publisher & | pub, |
| const ::cras::BoundParamHelperPtr & | params, | ||
| const ::cras::SimpleTopicStatusParam< Message > & | defaultParams | ||
| ) |
Add a topic diagnostic task to the publisher.
| [in] | pub | The ROS publisher. |
| [in] | params | ROS parameters from which the configuration of the diagnostic task is taken. |
| [in] | defaultParams | Default parameters used when no ROS parameter exists. |
| cras::DiagnosedPublisher< Message, Enable >::DiagnosedPublisher | ( | const ::ros::Publisher & | pub, |
| const ::cras::BoundParamHelperPtr & | params | ||
| ) |
Add a topic diagnostic task to the publisher.
| [in] | pub | The ROS publisher. |
| [in] | params | ROS parameters from which the configuration of the diagnostic task is taken. |
| cras::DiagnosedPublisher< Message, Enable >::DiagnosedPublisher | ( | const ::ros::Publisher & | pub, |
| ::diagnostic_updater::Updater & | updater, | ||
| const ::cras::BoundParamHelperPtr & | params | ||
| ) |
| cras::DiagnosedPublisher< Message, Enable >::DiagnosedPublisher | ( | const ::ros::Publisher & | pub, |
| ::diagnostic_updater::Updater & | updater, | ||
| const ::cras::BoundParamHelperPtr & | params, | ||
| const ::ros::Rate & | defaultRate | ||
| ) |
| cras::DiagnosedPublisher< Message, Enable >::DiagnosedPublisher | ( | const ::ros::Publisher & | pub, |
| ::diagnostic_updater::Updater & | updater, | ||
| const ::cras::BoundParamHelperPtr & | params, | ||
| const ::ros::Rate & | defaultRate, | ||
| const ::ros::Rate & | defaultMinRate, | ||
| const ::ros::Rate & | defaultMaxRate | ||
| ) |
| ::ros::Rate cras::DiagnosedPublisher< Message, Enable >::getDesiredRate | ( | ) | const |
| ::ros::Publisher& cras::DiagnosedPublisher< Message, Enable >::getPublisher | ( | ) |
Get the ROS publisher.
| const ::ros::Publisher& cras::DiagnosedPublisher< Message, Enable >::getPublisher | ( | ) | const |
Get the ROS publisher.
|
virtual |
Publish a message.
| [in] | message | The message to publish. |
|
virtual |
Publish a message.
| [in] | message | The message to publish. |
| void cras::DiagnosedPublisher< Message, Enable >::setPublisher | ( | const ::ros::Publisher & | pub | ) |
Change the ROS publisher.
| [in] | pub | The new ROS publisher. |
|
protected |
The ROS publisher.
Definition at line 221 of file diagnosed_pub_sub.hpp.