Woman, Life, Freedom


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

An abstract class to communicate a checkpoint between an application and the PHM cluster. More...

#include <checkpoint_communicator.h>

Inheritance diagram for ara::phm::CheckpointCommunicator:
application::helper::FifoCheckpointCommunicator

Public Types

using CheckpointReception = std::function< void(uint32_t)>
 Callback type for checkpoint reception.
 

Public Member Functions

virtual bool TrySend (uint32_t checkpoint)=0
 Try to send a checkpoint occurrence. More...
 
void SetCallback (CheckpointReception &&callback)
 Set a callback to be invoked at a checkpoint reception. More...
 
void ResetCallback () noexcept
 Reset the callback to be invoked at a checkpoint reception.
 

Protected Attributes

CheckpointReception Callback
 Callback to be invoked at a checkpoint reception.
 

Detailed Description

An abstract class to communicate a checkpoint between an application and the PHM cluster.

Note
The class is not part of the ARA standard.

Member Function Documentation

◆ SetCallback()

void ara::phm::CheckpointCommunicator::SetCallback ( CheckpointReception &&  callback)

Set a callback to be invoked at a checkpoint reception.

Parameters
callbackCallback to be invoked

◆ TrySend()

virtual bool ara::phm::CheckpointCommunicator::TrySend ( uint32_t  checkpoint)
pure virtual

Try to send a checkpoint occurrence.

Parameters
checkpointOccurred checkpoint
Returns
True if the checkpoint is successfully queued for sending; otherwise false

Implemented in application::helper::FifoCheckpointCommunicator.