Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::phm::RecoveryAction Class Referenceabstract

An abstract class to wrap the action for recovering a supervised entity. More...

#include <recovery_action.h>

Inheritance diagram for ara::phm::RecoveryAction:
application::helper::LogRecoveryAction

Public Member Functions

 RecoveryAction (RecoveryAction &&ra) noexcept
 
 RecoveryAction (const RecoveryAction &ra)=delete
 
RecoveryActionoperator= (const RecoveryAction &ra)=delete
 
virtual void RecoveryHandler (const exec::ExecutionErrorEvent &executionError, TypeOfSupervision supervision)=0
 Perform the action to handle the recovery. More...
 
core::Result< void > Offer ()
 Start offering the recovery action. More...
 
void StopOffer () noexcept
 Stop offering the recovery action. More...
 

Protected Member Functions

 RecoveryAction (const core::InstanceSpecifier &instance)
 Constructor. More...
 
bool IsOffered () const noexcept
 Indicate whether the action has been already offered or not. More...
 

Detailed Description

An abstract class to wrap the action for recovering a supervised entity.

Note
The class is not fully aligned with the ARA standard.
See also
SupervisedEntity

Constructor & Destructor Documentation

◆ RecoveryAction()

ara::phm::RecoveryAction::RecoveryAction ( const core::InstanceSpecifier instance)
explicitprotected

Constructor.

Parameters
instanceAdaptive application instance that owns the entity

Member Function Documentation

◆ IsOffered()

bool ara::phm::RecoveryAction::IsOffered ( ) const
protectednoexcept

Indicate whether the action has been already offered or not.

Returns
True if the action has been already offered; otherwise false

◆ Offer()

core::Result< void > ara::phm::RecoveryAction::Offer ( )

Start offering the recovery action.

Returns
Empty result in case of successful offering
Remarks
It is safe to call the function, if the action has been already offered.

◆ RecoveryHandler()

virtual void ara::phm::RecoveryAction::RecoveryHandler ( const exec::ExecutionErrorEvent executionError,
TypeOfSupervision  supervision 
)
pure virtual

Perform the action to handle the recovery.

Parameters
executionErrorOccurred error while supervising
supervisionFailed supervision algorithm type
Note
The action should be offered beforehand to enable the invocation.
See also
Offer

Implemented in application::helper::LogRecoveryAction.

◆ StopOffer()

void ara::phm::RecoveryAction::StopOffer ( )
noexcept

Stop offering the recovery action.

Remarks
It is safe to call the function, if the action offer has been already stopped.