7#include "../core/instance_specifier.h"
8#include "../core/result.h"
54 const uint8_t cDefaultEventStatus{0x02};
68 ~Event()
noexcept =
default;
AUTOSAR shortname-path wrapper.
Definition: instance_specifier.h:14
A wrapper around the callee's return value and its possible error.
Definition: result.h:16
Diagnostic event class that represents a fault path of a system.
Definition: event.h:52
void SetFaultDetectionCounter(int8_t fdc) noexcept
Set the event Fault Detection Counter (FDC) value.
Definition: event.cpp:160
ara::core::Result< void > SetEventStatusChangedNotifier(std::function< void(EventStatusByte)> notifier)
Set a notifier on the event status changed.
Definition: event.cpp:75
ara::core::Result< uint32_t > GetDTCNumber(DTCFormatType dtcFormat)
Get the Diagnostic Trouble Code (DTC) number relates to the event.
Definition: event.cpp:96
ara::core::Result< int8_t > GetFaultDetectionCounter()
Get the event Fault Detection Counter (FDC) value.
Definition: event.cpp:154
void SetEventStatusBits(std::map< EventStatusBit, bool > statusBits)
Set the bits of the event status.
Definition: event.cpp:24
ara::core::Result< EventStatusByte > GetEventStatus()
Get the event status.
Definition: event.cpp:18
Event(const ara::core::InstanceSpecifier &specifier)
Constructor.
Definition: event.cpp:10
ara::core::Result< void > SetLatchedWIRStatus(bool status)
Set the Warning Indicator Requested bit status.
Definition: event.cpp:89
void SetDTCNumber(uint32_t dtcNumber) noexcept
Set the Diagnostic Trouble Code (DTC) number relates to the event.
Definition: event.cpp:110
ara::core::Result< bool > GetLatchedWIRStatus()
Get the Warning Indicator Requested bit status.
Definition: event.cpp:83
ara::core::Result< DebouncingState > GetDebouncingStatus()
Get the event debounding state.
Definition: event.cpp:115
ara::core::Result< bool > GetTestComplete()
Indicates whether the event has matured to test completed or not.
Definition: event.cpp:144
DTCFormatType
Diagnostic Trouble Code (DTC) number format.
Definition: event.h:16
@ kDTCFormatUDS
ISO 14229-1 format.
@ kDTCFormatJ1939
SAE J1939-73 format.
@ kDTCFormatOBD
ISO 15031-6 format.
DebouncingState
Debouncing state of an event.
Definition: event.h:40
@ kFinallyHealed
FDC equal to -128.
@ kTemporarilyHealed
FDC less than zero and greater than -128.
@ kFinallyDefective
FDC equal to 127.
@ kNeutral
Zero Fault Detection Counter (FDC)
@ kTemporarilyDefective
FDC greater than zero and less than 127.
EventStatusBit
Specific bit of the event status byte.
Definition: event.h:25
@ kTestFailed
Bit 0: Failed test.
@ kTestFailedThisOperationCycle
Bit 1: Failed test during the current operation cycle.
@ kTestNotCompletedThisOperationCycle
Bit 6: Incomplete test during the current operation cyle.
Byte that specifies an event status.
Definition: event.h:33
uint8_t encodedBits
Event status byte containing the EventStatusBit.
Definition: event.h:35