A class to process Diagnostic Trouble Code (DTC) information. More...
#include <dtc_information.h>
Public Member Functions | |
DTCInformation (const core::InstanceSpecifier &specifier) | |
Constructor. More... | |
core::Result< UdsDtcStatusByteType > | GetCurrentStatus (uint32_t dtc) |
Get UDS DTC status byte of a certain DTC. More... | |
void | SetCurrentStatus (uint32_t dtc, UdsDtcStatusBitType mask, UdsDtcStatusByteType status) |
Set UDS DTC status byte of a certain DTC. More... | |
core::Result< void > | SetDTCStatusChangedNotifier (std::function< void(uint32_t, UdsDtcStatusByteType, UdsDtcStatusByteType)> notifier) |
Set a notifer on any DTC status change. More... | |
core::Result< uint32_t > | GetNumberOfStoredEntries () |
Get the number of stored DTC. More... | |
core::Result< void > | SetNumberOfStoredEntriesNotifier (std::function< void(uint32_t)> notifier) |
Set a notifer on the number of stored DTC change. More... | |
core::Result< void > | Clear (uint32_t dtc) |
Clear a DTC. More... | |
core::Result< ControlDtcStatusType > | GetControlDTCStatus () |
Indicate whether the UDS DTC byte update is enabled or not. More... | |
core::Result< void > | SetControlDtcStatusNotifier (std::function< void(ControlDtcStatusType)> notifier) |
Set a notifer on the control DTC status change. More... | |
core::Result< void > | EnableControlDtc () |
Enforce enabling the USD DTC status byte update. More... | |
A class to process Diagnostic Trouble Code (DTC) information.
|
explicit |
Constructor.
specifier | Instance specifier that owns the DTC information |
core::Result< void > ara::diag::DTCInformation::Clear | ( | uint32_t | dtc | ) |
Clear a DTC.
dtc | ID of the DTC that should be removed |
core::Result< void > ara::diag::DTCInformation::EnableControlDtc | ( | ) |
Enforce enabling the USD DTC status byte update.
core::Result< ControlDtcStatusType > ara::diag::DTCInformation::GetControlDTCStatus | ( | ) |
Indicate whether the UDS DTC byte update is enabled or not.
core::Result< UdsDtcStatusByteType > ara::diag::DTCInformation::GetCurrentStatus | ( | uint32_t | dtc | ) |
Get UDS DTC status byte of a certain DTC.
dtc | DTC ID of interest |
core::Result< uint32_t > ara::diag::DTCInformation::GetNumberOfStoredEntries | ( | ) |
Get the number of stored DTC.
core::Result< void > ara::diag::DTCInformation::SetControlDtcStatusNotifier | ( | std::function< void(ControlDtcStatusType)> | notifier | ) |
Set a notifer on the control DTC status change.
notifier | Callback to be invoked if the control DTC status is changed |
void ara::diag::DTCInformation::SetCurrentStatus | ( | uint32_t | dtc, |
UdsDtcStatusBitType | mask, | ||
UdsDtcStatusByteType | status | ||
) |
Set UDS DTC status byte of a certain DTC.
dtc | DTC ID of interest |
mask | DTC status byte mask |
status | DTC status byte |
core::Result< void > ara::diag::DTCInformation::SetDTCStatusChangedNotifier | ( | std::function< void(uint32_t, UdsDtcStatusByteType, UdsDtcStatusByteType)> | notifier | ) |
Set a notifer on any DTC status change.
notifier | Callback to be invoked if the status of any DTC is changed |
core::Result< void > ara::diag::DTCInformation::SetNumberOfStoredEntriesNotifier | ( | std::function< void(uint32_t)> | notifier | ) |
Set a notifer on the number of stored DTC change.
notifier | Callback to be invoked if the number of stored DTC is changed |