duration_status_param.h
Go to the documentation of this file.
1 #pragma once
2 
11 #include <ros/duration.h>
12 
13 namespace cras
14 {
15 
16 struct SimpleDurationStatusParam;
17 
22 {
31  explicit DurationStatusParam(
32  const ::ros::Duration& minDuration = {0, 0}, const ::ros::Duration& maxDuration = ::ros::DURATION_MAX,
33  double tolerance = 0.1, size_t windowSize = 5, bool noEventsIsOk = true);
34 
39  DurationStatusParam(const ::cras::DurationStatusParam& other); // NOLINT
40 
45  DurationStatusParam(const ::cras::SimpleDurationStatusParam& params); // NOLINT
46 
51  ::cras::DurationStatusParam& operator=(const ::cras::DurationStatusParam& other);
52 
55 
57  ::ros::Duration maxDuration {::ros::DURATION_MAX};
58 
60  double tolerance {0.1};
61 
63  size_t windowSize {5u};
64 
66  bool noEventsIsOk {true};
67 };
68 
75 {
78 
80  decltype(::cras::DurationStatusParam::minDuration) maxDuration {::ros::DURATION_MAX};
81 
84 
87 
90 };
91 
92 
93 }
Parameters of DurationStatus diagnostic task.
size_t windowSize
Number of updates during which the duration is computed.
::ros::Duration maxDuration
Maximum duration considered as valid.
DurationStatusParam(const ::ros::Duration &minDuration={0, 0}, const ::ros::Duration &maxDuration=::ros::DURATION_MAX, double tolerance=0.1, size_t windowSize=5, bool noEventsIsOk=true)
Construct the parameter object using the passed values.
::cras::DurationStatusParam & operator=(const ::cras::DurationStatusParam &other)
Copy assignment operator.
Helper struct for easy brace-initialization of DurationStatusParam objects. On supported compilers...
double tolerance
Tolerance of the duration.
Definition: any.hpp:15
bool noEventsIsOk
Whether it is okay when there are no events between two update calls.
::ros::Duration minDuration
Minimum duration considered as valid.


cras_cpp_common
Author(s): Martin Pecka
autogenerated on Sat Jun 17 2023 02:32:53