56 const ::ros::Duration& minDuration = {0, 0}, const ::ros::Duration& maxDuration = ::ros::DURATION_MAX,
57 double tolerance = 0.1,
size_t windowSize = 5u,
bool noEventsIsOk =
true);
64 DurationStatus(const ::std::string& name, const ::cras::SimpleDurationStatusParam& params);
67 const ::cras::DurationStatusParam& defaultParams);
70 const ::cras::SimpleDurationStatusParam& defaultParams);
84 void start(const ::ros::WallTime& time);
96 void stop(const ::ros::WallTime& time);
Template specializations of RunningStats for ros::Duration and ros::WallDuration. ...
Parameters of DurationStatus diagnostic task.
::cras::RunningStats<::ros::Duration > stats
::std::vector<::cras::RunningStats<::ros::Duration > > historyStats
A C++11 shim for std::optional. Uses std::optional when used in C++17 mode.
Definitions of parameters for a DurationStatus diagnostic task.
~DurationStatus() override
const ::ros::Duration & getMinDuration() const
Minimum allowed duration.
DurationStatus(const ::std::string &name, const ::cras::DurationStatusParam ¶ms)
Create the diagnostic task for a header-less message (checking frequency only).
::cras::optional<::ros::Time > lastStartTime
::std::vector<::ros::Duration > maxDurations
size_t getWindowSize() const
Number of updates during which the duration is computed.
void stop(const ::ros::Time &time=::ros::Time::now())
Stop a single duration measurement.
double getTolerance() const
Tolerance of duration.
const ::ros::Duration & getMaxDuration() const
Maximum allowed duration.
::std::shared_ptr<::cras::BoundParamHelper > BoundParamHelperPtr
::std::shared_ptr<::cras::DurationStatus > DurationStatusPtr
Diagnostic task for topic frequency and timestamp delay (combining FrequencyStatus and TimeStampStatu...
Computation of running average and variance using Welford's algorithm.
::std::vector<::ros::Time > historyTimes
::std::vector<::ros::Duration > minDurations
::cras::DurationStatusParam params
The parameters via which this task has been configured.
void run(::diagnostic_updater::DiagnosticStatusWrapper &stat) override
void start(const ::ros::Time &time=::ros::Time::now())
Start a single duration measurement.
Bound param helper (allows omitting the param adapter in each getParam call).