Diagnostic task for topic frequency and timestamp delay (combining FrequencyStatus and TimeStampStatus tasks). More...
#include <topic_status.hpp>
Public Member Functions | |
::ros::Rate | getExpectedRate () const |
Get the expected/average rate. If min and max are the same, their value will be returned. If min rate is non-positive, the max rate is returned. Otherwise, if max rate is infinite, the min rate will be returned. If min is positive and max is finite, their arithmetic mean is returned. More... | |
template<typename M = Message, typename = ::std::enable_if_t<::ros::message_traits::HasHeader<M>::value>> | |
::ros::Duration | getMaxDelay () const |
Max acceptable delay (in s). It can be negative if timestamps in future are expected. More... | |
::ros::Rate | getMaxRate () const |
Maximum allowed frequency. More... | |
template<typename M = Message, typename = ::std::enable_if_t<::ros::message_traits::HasHeader<M>::value>> | |
::ros::Duration | getMinDelay () const |
Min acceptable delay (in s). It can be negative if timestamps in future are expected. More... | |
::ros::Rate | getMinRate () const |
Minimum allowed frequency. More... | |
double | getRateTolerance () const |
Tolerance of frequency. More... | |
int | getRateWindowSize () const |
Number of updates during which the frequency is computed. More... | |
virtual void | tick (const ::ros::Time &stamp) |
Record that a message has arrived now with the given timestamp. More... | |
virtual void | tick (const Message &message) |
Record that a message has arrived. More... | |
virtual void | tick (const typename Message::Ptr &message) |
Record that a message has arrived. More... | |
virtual void | tick (const typename Message::ConstPtr &message) |
Record that a message has arrived. More... | |
virtual void | tick (const ::ros::MessageEvent< Message > &event) |
Record that a message has arrived. More... | |
template<typename M = Message, ::std::enable_if_t<!::ros::message_traits::HasHeader< M >::value, bool > = true> | |
TopicStatus (const ::std::string &name, const ::cras::TopicStatusParam< Message > ¶ms) | |
Create the diagnostic task for a header-less message (checking frequency only). More... | |
template<typename M = Message, ::std::enable_if_t<!::ros::message_traits::HasHeader< M >::value, bool > = true> | |
TopicStatus (const ::std::string &name, const double minRate=0.0, const double maxRate=::std::numeric_limits< double >::infinity(), const double rateTolerance=0.1, const int rateWindowSize=5) | |
Create the diagnostic task for a header-less message (checking frequency only). More... | |
template<typename M = Message, ::std::enable_if_t<::ros::message_traits::HasHeader< M >::value, bool > = true> | |
TopicStatus (const ::std::string &name, const ::cras::TopicStatusParam< Message > ¶ms) | |
Create the diagnostic task for a message with header (checking frequency and timestamp delay). More... | |
template<typename M = Message, ::std::enable_if_t<::ros::message_traits::HasHeader< M >::value, bool > = true> | |
TopicStatus (const ::std::string &name, const double minRate=0.0, const double maxRate=::std::numeric_limits< double >::infinity(), const double rateTolerance=0.1, const int rateWindowSize=5, const double minDelay=-1.0, const double maxDelay=5.0) | |
Create the diagnostic task for a message with header (checking frequency and timestamp delay). More... | |
TopicStatus (const ::std::string &name, const ::cras::SimpleTopicStatusParam< Message > ¶ms) | |
Create the diagnostic task checking frequency of messages and timestamp delay (if the message has header). More... | |
~TopicStatus () override | |
![]() | |
void | addTask (DiagnosticTask *t) |
CompositeDiagnosticTask (const std::string name) | |
virtual void | run (DiagnosticStatusWrapper &stat) |
![]() | |
DiagnosticTask (const std::string name) | |
const std::string & | getName () |
virtual | ~DiagnosticTask () |
Protected Attributes | |
::std::unique_ptr<::diagnostic_updater::FrequencyStatus > | freqTask |
The frequency-checking diagnostic task. This will always be non-null. More... | |
::cras::TopicStatusParam< Message > | origParams |
The parameters via which this task has been configured. More... | |
::std::unique_ptr<::diagnostic_updater::SlowTimeStampStatus > | stampTask |
The delay-checking diagnostic task. It will be non-null only for messages with header. More... | |
Diagnostic task for topic frequency and timestamp delay (combining FrequencyStatus and TimeStampStatus tasks).
Message | Type of the message. If it contains a header field, the task will automatically check both frequency and timestamp delay. Header-less messages will only have their frequency checked. |
Definition at line 34 of file topic_status.hpp.
|
inline |
Create the diagnostic task for a header-less message (checking frequency only).
M | SFINAE only. Do not set explicitly. |
[in] | name | Name of the diagnostic task. |
[in] | params | Parameters of the task. |
Definition at line 44 of file topic_status.hpp.
|
inlineexplicit |
Create the diagnostic task for a header-less message (checking frequency only).
M | SFINAE only. Do not set explicitly. |
[in] | name | Name of the diagnostic task. |
[in] | minRate | Minimum allowed frequency. |
[in] | maxRate | Maximum allowed frequency. |
[in] | rateTolerance | Tolerance of the rate. |
[in] | rateWindowSize | Number of updates during which the frequency is computed. |
Definition at line 61 of file topic_status.hpp.
|
inline |
Create the diagnostic task for a message with header (checking frequency and timestamp delay).
M | SFINAE only. Do not set explicitly. |
[in] | name | Name of the diagnostic task. |
[in] | params | Parameters of the task. |
Definition at line 75 of file topic_status.hpp.
|
inlineexplicit |
Create the diagnostic task for a message with header (checking frequency and timestamp delay).
M | SFINAE only. Do not set explicitly. |
[in] | name | Name of the diagnostic task. |
[in] | minRate | Minimum allowed frequency. |
[in] | maxRate | Maximum allowed frequency. |
[in] | rateTolerance | Tolerance of the rate. |
[in] | rateWindowSize | Number of updates during which the frequency is computed. |
[in] | minDelay | Min acceptable delay (in s). It can be negative if timestamps in future are expected. |
[in] | maxDelay | Max acceptable delay (in s). It can be negative if timestamps in future are expected. |
Definition at line 97 of file topic_status.hpp.
|
inline |
Create the diagnostic task checking frequency of messages and timestamp delay (if the message has header).
[in] | name | Name of the diagnostic task. |
[in] | params | Parameters of the task. |
Definition at line 111 of file topic_status.hpp.
|
inlineoverride |
Definition at line 116 of file topic_status.hpp.
|
inline |
Get the expected/average rate. If min and max are the same, their value will be returned. If min rate is non-positive, the max rate is returned. Otherwise, if max rate is infinite, the min rate will be returned. If min is positive and max is finite, their arithmetic mean is returned.
Definition at line 175 of file topic_status.hpp.
|
inline |
Max acceptable delay (in s). It can be negative if timestamps in future are expected.
M | SFINAE only. Do not set explicitly. |
Definition at line 233 of file topic_status.hpp.
|
inline |
Maximum allowed frequency.
Definition at line 193 of file topic_status.hpp.
|
inline |
Min acceptable delay (in s). It can be negative if timestamps in future are expected.
M | SFINAE only. Do not set explicitly. |
Definition at line 222 of file topic_status.hpp.
|
inline |
Minimum allowed frequency.
Definition at line 184 of file topic_status.hpp.
|
inline |
Tolerance of frequency.
Definition at line 202 of file topic_status.hpp.
|
inline |
Number of updates during which the frequency is computed.
Definition at line 211 of file topic_status.hpp.
|
inlinevirtual |
Record that a message has arrived now with the given timestamp.
[in] | stamp | Timestamp in the message header. |
Definition at line 124 of file topic_status.hpp.
|
inlinevirtual |
Record that a message has arrived.
[in] | message | The message that arrived. |
Definition at line 135 of file topic_status.hpp.
|
inlinevirtual |
Record that a message has arrived.
[in] | message | The message that arrived. |
Definition at line 146 of file topic_status.hpp.
|
inlinevirtual |
Record that a message has arrived.
[in] | message | The message that arrived. |
Definition at line 155 of file topic_status.hpp.
|
inlinevirtual |
Record that a message has arrived.
[in] | event | The message event describing the message that arrived. |
Definition at line 164 of file topic_status.hpp.
|
protected |
The frequency-checking diagnostic task. This will always be non-null.
Definition at line 240 of file topic_status.hpp.
|
protected |
The parameters via which this task has been configured.
Definition at line 246 of file topic_status.hpp.
|
protected |
The delay-checking diagnostic task. It will be non-null only for messages with header.
Definition at line 243 of file topic_status.hpp.