Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::diag::Event Class Reference

Diagnostic event class that represents a fault path of a system. More...

#include <event.h>

Public Member Functions

 Event (const ara::core::InstanceSpecifier &specifier)
 Constructor. More...
 
ara::core::Result< EventStatusByteGetEventStatus ()
 Get the event status. More...
 
void SetEventStatusBits (std::map< EventStatusBit, bool > statusBits)
 Set the bits of the event status. More...
 
ara::core::Result< void > SetEventStatusChangedNotifier (std::function< void(EventStatusByte)> notifier)
 Set a notifier on the event status changed. More...
 
ara::core::Result< bool > GetLatchedWIRStatus ()
 Get the Warning Indicator Requested bit status. More...
 
ara::core::Result< void > SetLatchedWIRStatus (bool status)
 Set the Warning Indicator Requested bit status. More...
 
ara::core::Result< uint32_t > GetDTCNumber (DTCFormatType dtcFormat)
 Get the Diagnostic Trouble Code (DTC) number relates to the event. More...
 
void SetDTCNumber (uint32_t dtcNumber) noexcept
 Set the Diagnostic Trouble Code (DTC) number relates to the event. More...
 
ara::core::Result< DebouncingStateGetDebouncingStatus ()
 Get the event debounding state. More...
 
ara::core::Result< bool > GetTestComplete ()
 Indicates whether the event has matured to test completed or not. More...
 
ara::core::Result< int8_t > GetFaultDetectionCounter ()
 Get the event Fault Detection Counter (FDC) value. More...
 
void SetFaultDetectionCounter (int8_t fdc) noexcept
 Set the event Fault Detection Counter (FDC) value. More...
 

Detailed Description

Diagnostic event class that represents a fault path of a system.

See also
Monitor
Note
The class interface is not fully compatible with the ARA standard.

Constructor & Destructor Documentation

◆ Event()

ara::diag::Event::Event ( const ara::core::InstanceSpecifier specifier)
explicit

Constructor.

Parameters
specifierInstance specifier which owns the event

Member Function Documentation

◆ GetDebouncingStatus()

ara::core::Result< DebouncingState > ara::diag::Event::GetDebouncingStatus ( )

Get the event debounding state.

Returns
Event current debouncing state

◆ GetDTCNumber()

ara::core::Result< uint32_t > ara::diag::Event::GetDTCNumber ( DTCFormatType  dtcFormat)

Get the Diagnostic Trouble Code (DTC) number relates to the event.

Parameters
dtcFormatDTC number format
Returns
DTC number in the requested format
Warning
Currently only the UDS format is supported.

◆ GetEventStatus()

ara::core::Result< EventStatusByte > ara::diag::Event::GetEventStatus ( )

Get the event status.

Returns
Current event status

◆ GetFaultDetectionCounter()

ara::core::Result< int8_t > ara::diag::Event::GetFaultDetectionCounter ( )

Get the event Fault Detection Counter (FDC) value.

Returns
Current FDC value byte

◆ GetLatchedWIRStatus()

ara::core::Result< bool > ara::diag::Event::GetLatchedWIRStatus ( )

Get the Warning Indicator Requested bit status.

Returns
Current warning indicator status

◆ GetTestComplete()

ara::core::Result< bool > ara::diag::Event::GetTestComplete ( )

Indicates whether the event has matured to test completed or not.

Returns
True if the debouncing state is finally healed or defective, otherwise false

◆ SetDTCNumber()

void ara::diag::Event::SetDTCNumber ( uint32_t  dtcNumber)
noexcept

Set the Diagnostic Trouble Code (DTC) number relates to the event.

Parameters
dtcNumberDTC number in the UDS format
Note
The function is not ARA compatible.

◆ SetEventStatusBits()

void ara::diag::Event::SetEventStatusBits ( std::map< EventStatusBit, bool >  statusBits)

Set the bits of the event status.

Parameters
statusBitsA dictionary of event status bits and their corresponding values
Exceptions
std::out_of_rangeThrows if a bit is out of range
Note
The function is not ARA compatible.

◆ SetEventStatusChangedNotifier()

ara::core::Result< void > ara::diag::Event::SetEventStatusChangedNotifier ( std::function< void(EventStatusByte)>  notifier)

Set a notifier on the event status changed.

Parameters
notifierCallback to be invoked when the event status is changed
Returns
Invalid argument result if the callback pointer is invalid

◆ SetFaultDetectionCounter()

void ara::diag::Event::SetFaultDetectionCounter ( int8_t  fdc)
noexcept

Set the event Fault Detection Counter (FDC) value.

Parameters
fdcCurrent FDC value byte
Note
The function is not ARA compatible.

◆ SetLatchedWIRStatus()

ara::core::Result< void > ara::diag::Event::SetLatchedWIRStatus ( bool  status)

Set the Warning Indicator Requested bit status.

Parameters
statusCurrent warning indicator status
Returns
No error nor exception