|
Easy Navigation
|
Detects real-time cycles that start late. More...
#include <RtMonitor.hpp>
Public Types | |
| using | Clock = std::chrono::steady_clock |
| enum class | Status : uint8_t { OK = 0 , LATE = 1 , ERROR = 2 } |
Public Member Functions | |
| void | configure (double period, double max_period_factor, int max_late_cycles) |
Sets the expected period (s) and the thresholds, and starts over. | |
| int | consecutive_late_cycles () const |
| Late cycles in a row, up to now. | |
| Status | cycle_started (Clock::time_point now) |
A cycle starts at now. | |
| double | last_period () const |
| Time (s) between the last two cycle starts, 0 if none yet. | |
| uint64_t | late_cycles () const |
| Late cycles since the last reset(). | |
| void | reset () |
| Starts over (e.g. on activation): the next cycle has no previous one to be late from. | |
| Status | status () const |
Detects real-time cycles that start late.
A cycle is late if it starts more than max_period_factor periods after the previous one. The status is LATE after a late cycle, ERROR after max_late_cycles late cycles in a row, and OK again after a cycle on time.
| using Clock = std::chrono::steady_clock |
|
strong |
| void configure | ( | double | period, |
| double | max_period_factor, | ||
| int | max_late_cycles ) |
Sets the expected period (s) and the thresholds, and starts over.
|
nodiscard |
Late cycles in a row, up to now.
| RtMonitor::Status cycle_started | ( | Clock::time_point | now | ) |
A cycle starts at now.
|
nodiscard |
Time (s) between the last two cycle starts, 0 if none yet.
|
nodiscard |
Late cycles since the last reset().
| void reset | ( | ) |
Starts over (e.g. on activation): the next cycle has no previous one to be late from.
|
nodiscard |