Diagnostic task for topic frequency and timestamp delay (combining FrequencyStatus and TimeStampStatus tasks). More...
#include <duration_status.h>
Public Member Functions | |
DurationStatus (const ::std::string &name, const ::cras::BoundParamHelperPtr ¶ms, const ::cras::DurationStatusParam &defaultParams) | |
DurationStatus (const ::std::string &name, const ::cras::BoundParamHelperPtr ¶ms, const ::cras::SimpleDurationStatusParam &defaultParams) | |
DurationStatus (const ::std::string &name, const ::cras::DurationStatusParam ¶ms) | |
Create the diagnostic task for a header-less message (checking frequency only). More... | |
DurationStatus (const ::std::string &name, const ::cras::SimpleDurationStatusParam ¶ms) | |
Create the diagnostic task checking frequency of messages and timestamp delay (if the message has header). More... | |
DurationStatus (const ::std::string &name, const ::ros::Duration &minDuration={0, 0}, const ::ros::Duration &maxDuration=::ros::DURATION_MAX, double tolerance=0.1, size_t windowSize=5u, bool noEventsIsOk=true) | |
Create the diagnostic task for a header-less message (checking frequency only). More... | |
const ::ros::Duration & | getMaxDuration () const |
Maximum allowed duration. More... | |
const ::ros::Duration & | getMinDuration () const |
Minimum allowed duration. More... | |
double | getTolerance () const |
Tolerance of duration. More... | |
size_t | getWindowSize () const |
Number of updates during which the duration is computed. More... | |
void | run (::diagnostic_updater::DiagnosticStatusWrapper &stat) override |
void | start (const ::ros::Time &time=::ros::Time::now()) |
Start a single duration measurement. More... | |
void | start (const ::ros::WallTime &time) |
Start a single duration measurement. More... | |
void | stop (const ::ros::Time &time=::ros::Time::now()) |
Stop a single duration measurement. More... | |
void | stop (const ::ros::WallTime &time) |
Stop a single duration measurement. More... | |
~DurationStatus () override | |
Public Member Functions inherited from diagnostic_updater::DiagnosticTask | |
DiagnosticTask (const std::string name) | |
const std::string & | getName () |
virtual void | run (diagnostic_updater::DiagnosticStatusWrapper &stat)=0 |
virtual | ~DiagnosticTask () |
Protected Attributes | |
size_t | count {0u} |
size_t | historyIndex {0u} |
::std::vector<::cras::RunningStats<::ros::Duration > > | historyStats |
::std::vector<::ros::Time > | historyTimes |
::cras::optional<::ros::Time > | lastStartTime |
::std::mutex | lock |
::std::vector<::ros::Duration > | maxDurations |
::std::vector<::ros::Duration > | minDurations |
::cras::DurationStatusParam | params |
The parameters via which this task has been configured. More... | |
::cras::RunningStats<::ros::Duration > | stats |
bool | wallTimeMode {false} |
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 duration_status.h.
cras::DurationStatus::DurationStatus | ( | const ::std::string & | name, |
const ::cras::DurationStatusParam & | params | ||
) |
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. |
|
explicit |
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] | minDuration | Minimum allowed duration. |
[in] | maxDuration | Maximum allowed duration. |
[in] | tolerance | Tolerance of duration. |
[in] | windowSize | Number of updates during which the duration is computed. |
[in] | noEventsIsOk | Whether it should be treated as correct if there was no event during an update window. |
cras::DurationStatus::DurationStatus | ( | const ::std::string & | name, |
const ::cras::SimpleDurationStatusParam & | params | ||
) |
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. |
cras::DurationStatus::DurationStatus | ( | const ::std::string & | name, |
const ::cras::BoundParamHelperPtr & | params, | ||
const ::cras::DurationStatusParam & | defaultParams | ||
) |
cras::DurationStatus::DurationStatus | ( | const ::std::string & | name, |
const ::cras::BoundParamHelperPtr & | params, | ||
const ::cras::SimpleDurationStatusParam & | defaultParams | ||
) |
|
override |
const ::ros::Duration& cras::DurationStatus::getMaxDuration | ( | ) | const |
Maximum allowed duration.
const ::ros::Duration& cras::DurationStatus::getMinDuration | ( | ) | const |
Minimum allowed duration.
double cras::DurationStatus::getTolerance | ( | ) | const |
Tolerance of duration.
size_t cras::DurationStatus::getWindowSize | ( | ) | const |
Number of updates during which the duration is computed.
|
override |
void cras::DurationStatus::start | ( | const ::ros::Time & | time = ::ros::Time::now() | ) |
Start a single duration measurement.
[in] | time | Time of start. |
void cras::DurationStatus::start | ( | const ::ros::WallTime & | time | ) |
Start a single duration measurement.
[in] | time | Time of start. |
void cras::DurationStatus::stop | ( | const ::ros::Time & | time = ::ros::Time::now() | ) |
Stop a single duration measurement.
[in] | time | Time of end. |
void cras::DurationStatus::stop | ( | const ::ros::WallTime & | time | ) |
Stop a single duration measurement.
[in] | time | Time of end. |
|
protected |
Definition at line 129 of file duration_status.h.
|
protected |
Definition at line 136 of file duration_status.h.
|
protected |
Definition at line 135 of file duration_status.h.
|
protected |
Definition at line 134 of file duration_status.h.
|
protected |
Definition at line 131 of file duration_status.h.
|
protected |
Definition at line 137 of file duration_status.h.
|
protected |
Definition at line 133 of file duration_status.h.
|
protected |
Definition at line 132 of file duration_status.h.
|
protected |
The parameters via which this task has been configured.
Definition at line 126 of file duration_status.h.
|
protected |
Definition at line 130 of file duration_status.h.
|
protected |
Definition at line 128 of file duration_status.h.