Diagnostic task for topic frequency and timestamp delay (combining FrequencyStatus and TimeStampStatus tasks).
More...
|
::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 () |
|
template<typename Message, typename = ::std::enable_if_t<::ros::message_traits::IsMessage<Message>::value>>
class cras::TopicStatus< Message, typename >
Diagnostic task for topic frequency and timestamp delay (combining FrequencyStatus and TimeStampStatus tasks).
- Template Parameters
-
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.
template<typename Message , typename = ::std::enable_if_t<::ros::message_traits::IsMessage<Message>::value>>
template<typename M = Message, ::std::enable_if_t<!::ros::message_traits::HasHeader< M >::value, bool > = true>
cras::TopicStatus< Message, typename >::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 |
|
) |
| |
|
inlineexplicit |
Create the diagnostic task for a header-less message (checking frequency only).
- Template Parameters
-
M | SFINAE only. Do not set explicitly. |
- Parameters
-
[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.
template<typename Message , typename = ::std::enable_if_t<::ros::message_traits::IsMessage<Message>::value>>
template<typename M = Message, ::std::enable_if_t<::ros::message_traits::HasHeader< M >::value, bool > = true>
cras::TopicStatus< Message, typename >::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 |
|
) |
| |
|
inlineexplicit |
Create the diagnostic task for a message with header (checking frequency and timestamp delay).
- Template Parameters
-
M | SFINAE only. Do not set explicitly. |
- Parameters
-
[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.
template<typename Message , typename = ::std::enable_if_t<::ros::message_traits::IsMessage<Message>::value>>
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.
- Returns
- The expected rate (in Hz).
Definition at line 175 of file topic_status.hpp.