#include <RateOptions.hpp>

Public Member Functions | |
| virtual bool | isValid () const |
| RateOptions & | operator= (const RateOptions &other) |
| RateOptions (std::string name="", const double timeStep=0.0, const double maxTimeStepFactorWarning=1.0, const double maxTimeStepFactorError=10.0, const bool enforceRate=true, const clockid_t clockId=CLOCK_MONOTONIC) | |
| RateOptions (const RateOptions &other) | |
| RateOptions (RateOptions &&other) noexcept | |
| virtual | ~RateOptions ()=default |
Public Attributes | |
| std::atomic< clockid_t > | clockId_ { CLOCK_MONOTONIC } |
| Linux clock ID. More... | |
| std::atomic< bool > | enforceRate_ { true } |
| Boolean indicating whether the rate should be enforced. More... | |
| std::atomic< double > | maxTimeStepFactorError_ { 10.0 } |
| If the awake time is bigger than the time step multiplied by this factor, it counts as an error. More... | |
| std::atomic< double > | maxTimeStepFactorWarning_ { 1.0 } |
| If the awake time is bigger than the time step multiplied by this factor, it counts as an warning. More... | |
| std::string | name_ {} |
| Name for printing. More... | |
| std::atomic< double > | timeStep_ { 0.0 } |
| Time step in seconds. More... | |
RateOptions class.
Definition at line 54 of file RateOptions.hpp.
|
inlineexplicit |
Constructor. Starts the clock. Call reset() to restart it if you do not intend to call sleep() immediately.
| name | Name for printing. |
| timeStep | Time step in seconds. |
| maxTimeStepFactorWarning | Max time step factor for warnings. |
| maxTimeStepFactorError | Max time step factor for errors. |
| enforceRate | Enforce the rate. |
| clockId | Linux clock ID. |
Definition at line 79 of file RateOptions.hpp.
|
inline |
Copy constructor.
| other | Rate options to copy from. |
Definition at line 95 of file RateOptions.hpp.
|
inlinenoexcept |
Move constructor.
| other | Rate options to move. |
Definition at line 104 of file RateOptions.hpp.
|
virtualdefault |
Destructor.
|
inlinevirtual |
Check if the rate options are valid.
Definition at line 138 of file RateOptions.hpp.
|
inline |
| std::atomic<clockid_t> bota_worker::RateOptions::clockId_ { CLOCK_MONOTONIC } |
Linux clock ID.
Definition at line 67 of file RateOptions.hpp.
| std::atomic<bool> bota_worker::RateOptions::enforceRate_ { true } |
Boolean indicating whether the rate should be enforced.
Definition at line 65 of file RateOptions.hpp.
| std::atomic<double> bota_worker::RateOptions::maxTimeStepFactorError_ { 10.0 } |
If the awake time is bigger than the time step multiplied by this factor, it counts as an error.
Definition at line 63 of file RateOptions.hpp.
| std::atomic<double> bota_worker::RateOptions::maxTimeStepFactorWarning_ { 1.0 } |
If the awake time is bigger than the time step multiplied by this factor, it counts as an warning.
Definition at line 61 of file RateOptions.hpp.
| std::string bota_worker::RateOptions::name_ {} |
Name for printing.
Definition at line 57 of file RateOptions.hpp.
| std::atomic<double> bota_worker::RateOptions::timeStep_ { 0.0 } |
Time step in seconds.
Definition at line 59 of file RateOptions.hpp.