Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::diag::Monitor Class Referencefinal

A class to monitor the correct functionality of a system part. More...

#include <monitor.h>

Public Member Functions

 Monitor (const core::InstanceSpecifier &specifier, std::function< void(InitMonitorReason)> initMonitor, CounterBased defaultValues)
 Monitor constructor with a counter-based debouncing. More...
 
 Monitor (const core::InstanceSpecifier &specifier, std::function< void(InitMonitorReason)> initMonitor, TimeBased defaultValues)
 Monitor constructor with a time-based debouncing. More...
 
void ReportMonitorAction (MonitorAction action)
 Report a monitor action. More...
 
void AttachEvent (Event *event)
 Attach an event to the monitor object. More...
 
core::Result< void > Offer ()
 Start offering monitoring requests handling. More...
 
void StopOffer ()
 Stop offering monitoring requests handling.
 

Detailed Description

A class to monitor the correct functionality of a system part.

Note
In constrast with the ARA standard, internal debouncing is not supported.

Constructor & Destructor Documentation

◆ Monitor() [1/2]

ara::diag::Monitor::Monitor ( const core::InstanceSpecifier specifier,
std::function< void(InitMonitorReason)>  initMonitor,
CounterBased  defaultValues 
)

Monitor constructor with a counter-based debouncing.

Parameters
specifierInstance specifer that owns the monitor
initMonitorMonitor re-initialization callback
defaultValuesCounter-based debouncing default parameters

◆ Monitor() [2/2]

ara::diag::Monitor::Monitor ( const core::InstanceSpecifier specifier,
std::function< void(InitMonitorReason)>  initMonitor,
TimeBased  defaultValues 
)

Monitor constructor with a time-based debouncing.

Parameters
specifierInstance specifer that owns the monitor
initMonitorMonitor re-initialization callback
defaultValuesTime-based debouncing default parameters

Member Function Documentation

◆ AttachEvent()

void ara::diag::Monitor::AttachEvent ( Event event)

Attach an event to the monitor object.

Parameters
eventEvent pointer to be attached
Note
This function is not part of the ARA standard.

◆ Offer()

core::Result< void > ara::diag::Monitor::Offer ( )

Start offering monitoring requests handling.

Returns
Error result if the handler has been already offered

◆ ReportMonitorAction()

void ara::diag::Monitor::ReportMonitorAction ( MonitorAction  action)

Report a monitor action.

Parameters
actionLatest diagnostic monitor action
Exceptions
std::invalid_argumentThrows when the action is not supported