Supervision method to check an entity aliveness periodically. More...
#include <alive_supervision.h>
Public Member Functions | |
AliveSupervision (uint16_t expectedAliveIndications, uint16_t minMargin, uint16_t maxMargin, std::chrono::milliseconds aliveReferenceCycle, uint8_t failedReferenceCyclesTolerance) | |
Constructor. More... | |
void | ReportAliveness () noexcept |
Report the expected checkpoint. | |
Public Member Functions inherited from ara::phm::supervisors::ElementarySupervision | |
SupervisionStatus | GetStatus () const noexcept |
Get the supervision status. More... | |
TypeOfSupervision | GetType () const noexcept |
Get the type of supervision. More... | |
void | SetCallback (std::function< void(SupervisionStatus)> &&callback) |
Set a callback to be invoked on the supervision status change. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ara::phm::supervisors::ElementarySupervision | |
ElementarySupervision (TypeOfSupervision supervisionType) noexcept | |
Constructor. More... | |
void | Report (SupervisionStatus status) |
Report the new supervision status. More... | |
Supervision method to check an entity aliveness periodically.
ara::phm::supervisors::AliveSupervision::AliveSupervision | ( | uint16_t | expectedAliveIndications, |
uint16_t | minMargin, | ||
uint16_t | maxMargin, | ||
std::chrono::milliseconds | aliveReferenceCycle, | ||
uint8_t | failedReferenceCyclesTolerance | ||
) |
Constructor.
expectedAliveIndications | Expected number of checkpoint reports within a certain period |
minMargin | Negative deviation from the expected checkpoint report number |
maxMargin | Positive deviation from the expected checkpoint report number |
aliveReferenceCycle | Time window to check the number of reported checkpoints |
failedReferenceCyclesTolerance | Maximum allowed number of failures |
std::invalid_argument | Thrown if the alive supervision configuration is invalid |