Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
application::helper::FifoCheckpointCommunicator Class Reference

Supervision checkpoint communicator over the FIFO medium. More...

#include <fifo_checkpoint_communicator.h>

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

Public Member Functions

 FifoCheckpointCommunicator (AsyncBsdSocketLib::Poller *poller, std::string fifoPath)
 Constructor. More...
 
bool TrySend (uint32_t checkpoint) override
 Try to send a checkpoint occurrence. More...
 
- Public Member Functions inherited from ara::phm::CheckpointCommunicator
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.
 

Additional Inherited Members

- Public Types inherited from ara::phm::CheckpointCommunicator
using CheckpointReception = std::function< void(uint32_t)>
 Callback type for checkpoint reception.
 
- Protected Attributes inherited from ara::phm::CheckpointCommunicator
CheckpointReception Callback
 Callback to be invoked at a checkpoint reception.
 

Detailed Description

Supervision checkpoint communicator over the FIFO medium.

Constructor & Destructor Documentation

◆ FifoCheckpointCommunicator()

application::helper::FifoCheckpointCommunicator::FifoCheckpointCommunicator ( AsyncBsdSocketLib::Poller *  poller,
std::string  fifoPath 
)

Constructor.

Parameters
pollerMaster poller
fifoPathFIFO file path
Exceptions
std::runtime_errorThrown when the FIFO communication setup failed

Member Function Documentation

◆ TrySend()

bool application::helper::FifoCheckpointCommunicator::TrySend ( uint32_t  checkpoint)
overridevirtual

Try to send a checkpoint occurrence.

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

Implements ara::phm::CheckpointCommunicator.