Woman, Life, Freedom


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

An abstract class the enables a supervision method to report its elementary supervion status. More...

#include <elementary_supervision.h>

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

Public Member Functions

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

Protected Member Functions

 ElementarySupervision (TypeOfSupervision supervisionType) noexcept
 Constructor. More...
 
void Report (SupervisionStatus status)
 Report the new supervision status. More...
 

Detailed Description

An abstract class the enables a supervision method to report its elementary supervion status.

Constructor & Destructor Documentation

◆ ElementarySupervision()

ara::phm::supervisors::ElementarySupervision::ElementarySupervision ( TypeOfSupervision  supervisionType)
protectednoexcept

Constructor.

Parameters
supervisionTypeType of supervision method

Member Function Documentation

◆ GetStatus()

SupervisionStatus ara::phm::supervisors::ElementarySupervision::GetStatus ( ) const
noexcept

Get the supervision status.

Returns
Current elementary supervision status

◆ GetType()

TypeOfSupervision ara::phm::supervisors::ElementarySupervision::GetType ( ) const
noexcept

Get the type of supervision.

Returns
Supervision method type

◆ Report()

void ara::phm::supervisors::ElementarySupervision::Report ( SupervisionStatus  status)
protected

Report the new supervision status.

Parameters
statusNew status of the supervision method

◆ SetCallback()

void ara::phm::supervisors::ElementarySupervision::SetCallback ( std::function< void(SupervisionStatus)> &&  callback)

Set a callback to be invoked on the supervision status change.

Parameters
callbackOn supervision status changed callback