Public Member Functions | List of all members
cras::TopicStatusParamWithHeader Class Reference

A combined parameter defining both rate diagnostics and delay diagnostics (for messages with a header). More...

#include <topic_status_param.hpp>

Inheritance diagram for cras::TopicStatusParamWithHeader:
Inheritance graph
[legend]

Public Member Functions

 TopicStatusParamWithHeader (const ::cras::SimpleTopicStatusParamWithHeader &params)
 Initialize this object from SimpleTopicStatusParam. Internal pointers for min/max rate will be used, so the params object may cease to exist. More...
 
 TopicStatusParamWithHeader (const ::diagnostic_updater::FrequencyStatusParam &freqParam)
 Construct the object from a FrequencyStatusParam using default timestamp delay values. More...
 
 TopicStatusParamWithHeader (const ::diagnostic_updater::FrequencyStatusParam &freqParam, const ::diagnostic_updater::TimeStampStatusParam &stampParam)
 Construct the object from a FrequencyStatusParam and TimeStampStatusParam. More...
 
 TopicStatusParamWithHeader (const ::diagnostic_updater::TimeStampStatusParam &stampParam)
 Construct the object from a TimeStampStatusParam using default rate values. More...
 
 TopicStatusParamWithHeader (double *min_freq, double *max_freq, double tolerance=0.1, int window_size=5, double min_acceptable=-1.0, double max_acceptable=5.0)
 Construct the param object. More...
 
 TopicStatusParamWithHeader (double min_freq=0.0, double max_freq=::std::numeric_limits< double >::infinity(), double tolerance=0.1, int window_size=5, double min_acceptable=-1.0, double max_acceptable=5.0)
 Construct the param object. More...
 
- Public Member Functions inherited from cras::FrequencyStatusParam
 FrequencyStatusParam (const ::cras::FrequencyStatusParam &other)
 Copy values from another object of this type. If it uses the internal pointers, their values are copied and a new set of internal pointers is created for this object, making it independent of the other one. If the other object uses explicit pointer, this object will use pointers to the same memory. More...
 
 FrequencyStatusParam (const ::cras::SimpleTopicStatusParamNoHeader &params)
 Initialize this object from SimpleTopicStatusParam. Internal pointers for min/max rate will be used, so the params object may cease to exist. More...
 
 FrequencyStatusParam (const ::diagnostic_updater::FrequencyStatusParam &other)
 Copy values from the original diagnostic_updater::FrequencyStatusParam. This object will use pointers to the same memory for min/max rate as the other one. More...
 
 FrequencyStatusParam (double *min_freq, double *max_freq, double tolerance=0.1, int window_size=5)
 The original constructor from diagnostic_updater::FrequencyStatusParam. More...
 
 FrequencyStatusParam (double min_freq=0.0, double max_freq=::std::numeric_limits< double >::infinity(), double tolerance=0.1, int window_size=5)
 The added constructor not requiring pointers. More...
 
double 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...
 
::cras::FrequencyStatusParamoperator= (const ::cras::FrequencyStatusParam &other)
 Copy values from another object of this type. If it uses the internal pointers, their values are copied and a new set of internal pointers is created for this object, making it independent of the other one. If the other object uses explicit pointer, this object will use pointers to the same memory. More...
 
::cras::FrequencyStatusParamoperator= (const ::diagnostic_updater::FrequencyStatusParam &other)
 Copy values from the original diagnostic_updater::FrequencyStatusParam. This object will use pointers to the same memory for min/max rate as the other one. More...
 
- Public Member Functions inherited from diagnostic_updater::FrequencyStatusParam
 FrequencyStatusParam (double *min_freq, double *max_freq, double tolerance=0.1, int window_size=5)
 
- Public Member Functions inherited from diagnostic_updater::TimeStampStatusParam
 TimeStampStatusParam (const double min_acceptable=-1, const double max_acceptable=5)
 

Additional Inherited Members

- Public Attributes inherited from diagnostic_updater::FrequencyStatusParam
double * max_freq_
 
double * min_freq_
 
double tolerance_
 
int window_size_
 
- Public Attributes inherited from diagnostic_updater::TimeStampStatusParam
double max_acceptable_
 
double min_acceptable_
 

Detailed Description

A combined parameter defining both rate diagnostics and delay diagnostics (for messages with a header).

Note
This is a combination of FrequencyStatusParam and TimeStampStatusParam.

Definition at line 210 of file topic_status_param.hpp.

Constructor & Destructor Documentation

◆ TopicStatusParamWithHeader() [1/6]

cras::TopicStatusParamWithHeader::TopicStatusParamWithHeader ( double *  min_freq,
double *  max_freq,
double  tolerance = 0.1,
int  window_size = 5,
double  min_acceptable = -1.0,
double  max_acceptable = 5.0 
)

Construct the param object.

Parameters
[in]min_freqPointer to a double containing the minimum allowed frequency. Cannot be nullptr.
[in]max_freqPointer to a double containing the maximum allowed frequency. Cannot be nullptr.
[in]toleranceTolerance of the rate.
[in]window_sizeNumber of updates during which the frequency is computed.
[in]min_acceptableMin acceptable delay (in s). It can be negative if timestamps in future are expected.
[in]max_acceptableMax acceptable delay (in s). It can be negative if timestamps in future are expected.

◆ TopicStatusParamWithHeader() [2/6]

cras::TopicStatusParamWithHeader::TopicStatusParamWithHeader ( double  min_freq = 0.0,
double  max_freq = ::std::numeric_limits< double >::infinity(),
double  tolerance = 0.1,
int  window_size = 5,
double  min_acceptable = -1.0,
double  max_acceptable = 5.0 
)

Construct the param object.

Parameters
[in]min_freqMinimum allowed frequency.
[in]max_freqMaximum allowed frequency.
[in]toleranceTolerance of the rate.
[in]window_sizeNumber of updates during which the frequency is computed.
[in]min_acceptableMin acceptable delay (in s). It can be negative if timestamps in future are expected.
[in]max_acceptableMax acceptable delay (in s). It can be negative if timestamps in future are expected.
Note
Internal pointers for min/max rate are used.

◆ TopicStatusParamWithHeader() [3/6]

cras::TopicStatusParamWithHeader::TopicStatusParamWithHeader ( const ::diagnostic_updater::FrequencyStatusParam freqParam)
explicit

Construct the object from a FrequencyStatusParam using default timestamp delay values.

Parameters
[in]freqParamThe param to initialize from.

◆ TopicStatusParamWithHeader() [4/6]

cras::TopicStatusParamWithHeader::TopicStatusParamWithHeader ( const ::diagnostic_updater::TimeStampStatusParam stampParam)
explicit

Construct the object from a TimeStampStatusParam using default rate values.

Parameters
[in]stampParamThe param to initialize from.

◆ TopicStatusParamWithHeader() [5/6]

cras::TopicStatusParamWithHeader::TopicStatusParamWithHeader ( const ::diagnostic_updater::FrequencyStatusParam freqParam,
const ::diagnostic_updater::TimeStampStatusParam stampParam 
)

Construct the object from a FrequencyStatusParam and TimeStampStatusParam.

Parameters
[in]freqParamThe rate param to initialize from.
[in]stampParamThe timestamp delay param to initialize from.

◆ TopicStatusParamWithHeader() [6/6]

cras::TopicStatusParamWithHeader::TopicStatusParamWithHeader ( const ::cras::SimpleTopicStatusParamWithHeader params)

Initialize this object from SimpleTopicStatusParam. Internal pointers for min/max rate will be used, so the params object may cease to exist.

Parameters
[in]paramsThe parameters to initialize with.

The documentation for this class was generated from the following file:


cras_cpp_common
Author(s): Martin Pecka
autogenerated on Sun Jan 14 2024 03:48:14