36 #ifndef __DIAGNOSTIC_UPDATER__DRIVER_H__ 37 #define __DIAGNOSTIC_UPDATER__DRIVER_H__ 148 virtual void tick() {
ROS_FATAL(
"tick(void) has been called on a TopicDiagnostic. This is never correct. Use tick(ros::Time &) instead."); }
210 tick(message->header.stamp); publisher_.publish(message); }
218 virtual void publish(
const T& message) {
tick(message.header.stamp);
219 publisher_.publish(message); }
A class to facilitate making diagnostics for a topic using a FrequencyStatus and TimeStampStatus.
A structure that holds the constructor parameters for the FrequencyStatus class.
virtual void publish(const T &message)
Collects statistics and publishes the message.
void add(const std::string &name, TaskFunction f)
Add a DiagnosticTask embodied by a name and function to the DiagnosticTaskVector. ...
ros::Publisher getPublisher() const
Returns the publisher.
virtual void publish(const boost::shared_ptr< T > &message)
Collects statistics and publishes the message.
A structure that holds the constructor parameters for the TimeStampStatus class.
virtual void tick(const ros::Time &stamp)
Collects statistics and publishes the message.
TopicDiagnostic(std::string name, diagnostic_updater::Updater &diag, const diagnostic_updater::FrequencyStatusParam &freq, const diagnostic_updater::TimeStampStatusParam &stamp)
Constructs a TopicDiagnostic.
Manages a list of diagnostic tasks, and calls them in a rate-limited manner.
A diagnostic task that monitors the frequency of an event.
void tick()
Signals that an event has occurred.
Diagnostic task to monitor the interval between events.
virtual ~TopicDiagnostic()
void clear()
Resets the statistics.
void setPublisher(ros::Publisher pub)
Changes the publisher.
A TopicDiagnostic combined with a ros::Publisher.
ros::Publisher publisher_
Merges CompositeDiagnosticTask into a single DiagnosticTask.
DiagnosedPublisher(const ros::Publisher &pub, diagnostic_updater::Updater &diag, const diagnostic_updater::FrequencyStatusParam &freq, const diagnostic_updater::TimeStampStatusParam &stamp)
Constructs a DiagnosedPublisher.
virtual ~DiagnosedPublisher()
void addTask(DiagnosticTask *t)
Adds a child CompositeDiagnosticTask.