Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::phm::supervisors::AliveSupervision Class Reference

Supervision method to check an entity aliveness periodically. More...

#include <alive_supervision.h>

Inheritance diagram for ara::phm::supervisors::AliveSupervision:
ara::phm::supervisors::ElementarySupervision

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...
 

Detailed Description

Supervision method to check an entity aliveness periodically.

Constructor & Destructor Documentation

◆ AliveSupervision()

ara::phm::supervisors::AliveSupervision::AliveSupervision ( uint16_t  expectedAliveIndications,
uint16_t  minMargin,
uint16_t  maxMargin,
std::chrono::milliseconds  aliveReferenceCycle,
uint8_t  failedReferenceCyclesTolerance 
)

Constructor.

Parameters
expectedAliveIndicationsExpected number of checkpoint reports within a certain period
minMarginNegative deviation from the expected checkpoint report number
maxMarginPositive deviation from the expected checkpoint report number
aliveReferenceCycleTime window to check the number of reported checkpoints
failedReferenceCyclesToleranceMaximum allowed number of failures
Exceptions
std::invalid_argumentThrown if the alive supervision configuration is invalid