12 #include <type_traits> 28 typedef ::std::remove_pointer_t<decltype(::diagnostic_updater::FrequencyStatusParam::max_freq_)>
RateType;
34 RateType
maxRate {::std::numeric_limits<RateType>::infinity()};
51 typedef ::std::remove_pointer_t<decltype(::diagnostic_updater::FrequencyStatusParam::max_freq_)>
RateType;
57 RateType
maxRate {::std::numeric_limits<RateType>::infinity()};
78 template <
typename Message>
93 static constexpr NoHeaderParam _1Hz {1, 1};
95 static constexpr HeaderParam delayed1Hz {1, 1};
97 static constexpr HeaderParam fast1Hz {1, 1, 0.1, 5, -1, 0.1};
100 static constexpr NoHeaderParam _10Hz {10, 10};
102 static constexpr HeaderParam delayed10Hz {10, 10};
104 static constexpr HeaderParam fast10Hz {10, 10, 0.1, 5, -1, 0.1};
107 static constexpr NoHeaderParam _100Hz {100, 100};
109 static constexpr HeaderParam delayed100Hz {100, 100};
111 static constexpr HeaderParam fast100Hz {100, 100, 0.1, 5, -1, 0.1};
129 FrequencyStatusParam(
double *min_freq,
double *max_freq,
double tolerance = 0.1,
int window_size = 5);
140 double min_freq = 0.0,
double max_freq = ::std::numeric_limits<double>::infinity(),
141 double tolerance = 0.1,
int window_size = 5);
186 double getExpectedRate()
const;
193 void copyAdditionalData(const ::cras::FrequencyStatusParam& other);
196 double minFreq {0.0};
199 double maxFreq {::std::numeric_limits<double>::infinity()};
203 bool usesInternalPointers {
false};
224 double* min_freq,
double* max_freq,
double tolerance = 0.1,
int window_size = 5,
225 double min_acceptable = -1.0,
double max_acceptable = 5.0);
238 double min_freq = 0.0,
double max_freq = ::std::numeric_limits<double>::infinity(),
239 double tolerance = 0.1,
int window_size = 5,
double min_acceptable = -1.0,
double max_acceptable = 5.0);
259 const ::diagnostic_updater::FrequencyStatusParam& freqParam,
260 const ::diagnostic_updater::TimeStampStatusParam& stampParam);
268 const ::cras::SimpleTopicStatusParamWithHeader& params);
278 template <
typename Message>
279 using TopicStatusParam = ::std::conditional_t<::ros::message_traits::HasHeader<Message>::value,
An extension of diagnostic_updater::FrequencyStatusParam that allows passing non-pointer min/max freq...
::std::conditional_t<::ros::message_traits::HasHeader< Message >::value, ::cras::SimpleTopicStatusParamWithHeader, ::cras::SimpleTopicStatusParamNoHeader > SimpleTopicStatusParam
Helper struct for easy brace-initialization of TopicStatusParam objects.
::cras::SimpleTopicStatusParamWithHeader HeaderParam
The type of parameters for topics with header.
::std::conditional_t<::ros::message_traits::HasHeader< Message >::value, ::cras::TopicStatusParamWithHeader, ::cras::FrequencyStatusParam > TopicStatusParam
Helper struct for automatic choosing of the correct topic status parameter object based on whether th...
::cras::SimpleTopicStatusParamNoHeader NoHeaderParam
The type of parameters for topics without a header.
Utility class with various predefined topic diagnostic parameters.