Diagnostic Event Manager (DEM)
The DEM is responsible for processing and storing diagnostic events, fault memories, DTC statuses, and associated freeze frame data.
Funktionen — Übersicht
void Dem_GetVersionInfo (Std_VersionInfoType* versioninfo);Returns the version information of this module.void Dem_PreInit (void);Initializes the internal states necessary to process events reported by BSW-modules.void Dem_Init (const Dem_ConfigType* ConfigPtr);Initializes or reinitializes this module.void Dem_Shutdown (void);Shuts down this module.Std_ReturnType Dem_ClearDTC (uint8 ClientId);Clears single DTCs, as well as groups of DTCs.Std_ReturnType Dem_ClearPrestoredFreezeFrame (Dem_EventIdType EventId);Clears a prestored freeze frame of a specific event.Std_ReturnType Dem_GetComponentFailed (Dem_ComponentIdType ComponentId, boolean* ComponentFailed);Gets the failed status of a DemComponent.Std_ReturnType Dem_GetDTCSelectionResult (uint8 ClientId);Provides information if the last call to Dem_SelectDTC has selected a valid DTC or group of DTCs.Std_ReturnType Dem_GetDTCSelectionResultForClearDTC (uint8 ClientId);Provides information if the last call to Dem_SelectDTC has selected a valid DTC or group of DTCs, respecting the settings if...Std_ReturnType Dem_GetEventUdsStatus (Dem_EventIdType EventId, Dem_UdsStatusByteType* UDSStatusByte);Gets the current UDS status byte assigned to the DTC for the eventStd_ReturnType Dem_GetMonitorStatus (Dem_EventIdType EventID, Dem_MonitorStatusType* MonitorStatus);Gets the current monitor status for an event.Std_ReturnType Dem_GetDebouncingOfEvent (Dem_EventIdType EventId, Dem_DebouncingStateType* DebouncingState);Gets the debouncing status of an event.Std_ReturnType Dem_GetDTCOfEvent (Dem_EventIdType EventId, Dem_DTCFormatType DTCFormat, uint32* DTCOfEvent);Gets the DTC of an event.Std_ReturnType Dem_GetDTCSuppression (uint8 ClientId, boolean* SuppressionStatus);Returns the suppression status of a specific DTC.Std_ReturnType Dem_GetEventAvailable (Dem_EventIdType EventId, boolean* AvailableStatus);Get the Event's availability.Std_ReturnType Dem_GetFaultDetectionCounter (Dem_EventIdType EventId, sint8* FaultDetectionCounter);Gets the fault detection counter of an event.Std_ReturnType Dem_GetIndicatorStatus (uint8 IndicatorId, Dem_IndicatorStatusType* IndicatorStatus);Gets the indicator status derived from the UDS status.Std_ReturnType Dem_GetEventFreezeFrameDataEx (Dem_EventIdType EventId, uint8 RecordNumber, uint16 DataId, uint8* DestBuffer, uint16* BufSize);Gets the data of a freeze frame by event.Std_ReturnType Dem_GetEventExtendedDataRecordEx (Dem_EventIdType EventId, uint8 RecordNumber, uint8* DestBuffer, uint16* BufSize);Gets the data of an extended data record by event.Std_ReturnType Dem_GetEventMemoryOverflow (uint8 ClientId, Dem_DTCOriginType DTCOrigin, boolean* OverflowIndication);Gets the event memory overflow indication status.Std_ReturnType Dem_GetNumberOfEventMemoryEntries (uint8 ClientId, Dem_DTCOriginType DTCOrigin, uint8* NumberOfEventMemoryEntries);Returns the number of entries currently stored in the requested event memory.Std_ReturnType Dem_ResetEventDebounceStatus (Dem_EventIdType EventId, Dem_DebounceResetStatusType DebounceResetStatus);Control the internal debounce counter/timer by BSW modules and SW-Cs.Std_ReturnType Dem_ResetEventStatus (Dem_EventIdType EventId);Resets the event failed status.Std_ReturnType Dem_RestartOperationCycle (uint8 OperationCycleId);Sets an operation cycle state.Std_ReturnType Dem_PrestoreFreezeFrame (Dem_EventIdType EventId);Captures the freeze frame data for a specific event.Std_ReturnType Dem_SelectDTC (uint8 ClientId, uint32 DTC, Dem_DTCFormatType DTCFormat, Dem_DTCOriginType DTCOrigin);Selects a DTC or DTC group as target for further operations.Std_ReturnType Dem_SetComponentAvailable (Dem_ComponentIdType ComponentId, boolean AvailableStatus);Set the availability of a specific DemComponent.Std_ReturnType Dem_SetDTCSuppression (uint8 ClientId, boolean SuppressionStatus);Set the suppression status of a specific DTC.Std_ReturnType Dem_SetEnableCondition (uint8 EnableConditionID, boolean ConditionFulfilled);Sets an enable condition.Std_ReturnType Dem_SetEventAvailable (Dem_EventIdType EventId, boolean AvailableStatus);Set the available status of a specific Event.Std_ReturnType Dem_SetEventConfirmationThresholdCounter (Dem_EventIdType EventId, uint8 FailureCycleCounterThreshold);Set the failure confirmation threshold of an event.Std_ReturnType Dem_SetEventStatus (Dem_EventIdType EventId, Dem_EventStatusType EventStatus);Called by SW-Cs or BSW modules to report monitor status information to the Dem.Std_ReturnType Dem_SetEventStatusWithMonitorData (Dem_EventIdType EventId, Dem_EventStatusType EventStatus, Dem_MonitorDataType monitorData0, Dem_MonitorDataType monitorData1);This API will be available only if ({Dem/DemConfigSet/DemEventParameter/DemEvent ReportingType} ==...Std_ReturnType Dem_SetStorageCondition (uint8 StorageConditionID, boolean ConditionFulfilled);Sets a storage condition.Std_ReturnType Dem_SetWIRStatus (Dem_EventIdType EventId, boolean WIRStatus);Sets the WIR status bit via failsafe SW-Cs.void Dem_SetEventFailedWithSyncFreezeFrame (Dem_EventIdType EventId);If called the Dem sets the event to failed and this failed event requires that a snapshot record is captured, the Dem...Dem_DTCTranslationFormatType Dem_GetTranslationType (uint8 ClientId);Gets the supported DTC formats of the ECU.Std_ReturnType Dem_GetDTCStatusAvailabilityMask (uint8 ClientId, Dem_UdsStatusByteType* DTCStatusMask, Dem_DTCOriginType DTCOrigin);Gets the DTC Status availability mask of the selected fault memory.Std_ReturnType Dem_GetStatusOfDTC (uint8 ClientId, uint8* DTCStatus);Gets the status of a DTC.Std_ReturnType Dem_GetSeverityOfDTC (Dem_DTCSeverityType* DTCSeverity, uint8 ClientId);Gets the severity of the requested DTC.Std_ReturnType Dem_GetFunctionalUnitOfDTC (uint8 ClientId, uint8* DTCFunctionalUnit);Gets the functional unit of the requested DTC.Std_ReturnType Dem_SetDTCFilter (uint8 ClientId, uint8 DTCStatusMask, Dem_DTCFormatType DTCFormat, Dem_DTCOriginType DTCOrigin, boolean FilterWithSeverity, Dem_DTCSeverityType DTCSeverityMask, boolean FilterForFaultDetectionCounter);Sets the DTC Filter.Std_ReturnType Dem_GetNumberOfFilteredDTC (uint8 ClientId, uint16* NumberOfFilteredDTC);Gets the number of a filtered DTC.Std_ReturnType Dem_GetNextFilteredDTC (uint8 ClientId, uint32* DTC, uint8* DTCStatus);Gets the next filtered DTC matching the filter criteria.Std_ReturnType Dem_GetNextFilteredDTCAndFDC (uint8 ClientId, uint32* DTC, sint8* DTCFaultDetectionCounter);Gets the next filtered DTC and its associated Fault Detection Counter (FDC) matching the filter criteria.Std_ReturnType Dem_GetNextFilteredDTCAndSeverity (uint8 ClientId, uint32* DTC, uint8* DTCStatus, Dem_DTCSeverityType* DTCSeverity, uint8* DTCFunctionalUnit);Gets the next filtered DTC and its associated Severity matching the filter criteria.Std_ReturnType Dem_SetFreezeFrameRecordFilter (uint8 ClientId, Dem_DTCFormatType DTCFormat);Sets a freeze frame record filter.Std_ReturnType Dem_GetNextFilteredRecord (uint8 ClientId, uint32* DTC, uint8* RecordNumber);Gets the next freeze frame record number and its associated DTC stored in the event memory.Std_ReturnType Dem_GetDTCByOccurrenceTime (uint8 ClientId, Dem_DTCRequestType DTCRequest, uint32* DTC);Gets the DTC by occurrence time.Std_ReturnType Dem_DisableDTCRecordUpdate (uint8 ClientId);Disables the event memory update of a specific DTC (only one at one time).Std_ReturnType Dem_EnableDTCRecordUpdate (uint8 ClientId);Enables the event memory update of the DTC disabled by Dem_DisableDTCRecordUpdate() before.Std_ReturnType Dem_GetSizeOfExtendedDataRecordSelection (uint8 ClientId, uint32* SizeOfExtendedDataRecord);Gets the size of Extended Data Record by DTC selected by the call of Dem_SelectExtended DataRecord.Std_ReturnType Dem_GetSizeOfFreezeFrameSelection (uint8 ClientId, uint32* SizeOfFreezeFrame);Gets the size of freeze frame data by DTC selected by the call of Dem_SelectFreezeFrame Data.Std_ReturnType Dem_GetNextExtendedDataRecord (uint8 ClientId, uint8* DestBuffer, uint16* BufSize);Gets extended data record for the DTC selected by Dem_SelectExtendedDataRecord.Std_ReturnType Dem_GetNextFreezeFrameData (uint8 ClientId, uint8* DestBuffer, uint16* BufSize);Gets freeze frame data by the DTC selected by Dem_SelectFreezeFrameData.Std_ReturnType Dem_SelectExtendedDataRecord (uint8 ClientId, uint8 ExtendedDataNumber);Sets the filter to be used by Dem_GetNextExtendedDataRecord and Dem_GetSizeOfExtended DataRecordSelection.Std_ReturnType Dem_SelectFreezeFrameData (uint8 ClientId, uint8 RecordNumber);Sets the filter to be used by Dem_GetNextFreezeFrameData and Dem_GetSizeOfFreezeFrame Selection.Std_ReturnType Dem_GetNumberOfFreezeFrameRecords (uint8 ClientId, uint16* NumberOfFilteredRecords);This function returns the number of all freeze frame records currently stored in the primary event memoryStd_ReturnType Dem_DisableDTCSetting (uint8 ClientId);Disables the DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client.Std_ReturnType Dem_EnableDTCSetting (uint8 ClientId);(Re)-Enables the DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client.Std_ReturnType Dem_DcmGetInfoTypeValue08 (Dcm_OpStatusType OpStatus, uint8* Iumprdata08, uint8* Iumprdata08BufferSize);Service is used for requesting IUMPR data according to InfoType $08.Std_ReturnType Dem_DcmGetInfoTypeValue0B (Dcm_OpStatusType OpStatus, uint8* Iumprdata0B, uint8* Iumprdata0BBufferSize);Service is used for requesting IUMPR data according to InfoType $0B.Std_ReturnType Dem_DcmReadDataOfPID01 (uint8* PID01value);Service to report the value of PID $01 computed by the Dem.Std_ReturnType Dem_DcmReadDataOfPID1C (uint8* PID1Cvalue);Service to report the value of PID $1C computed by the Dem.Std_ReturnType Dem_DcmReadDataOfPID21 (uint8* PID21value);Service to report the value of PID $21 computed by the Dem.Std_ReturnType Dem_DcmReadDataOfPID30 (uint8* PID30value);Service to report the value of PID $30 computed by the Dem.Std_ReturnType Dem_DcmReadDataOfPID31 (uint8* PID31value);Service to report the value of PID $31 computed by the Dem.Std_ReturnType Dem_DcmReadDataOfPID41 (uint8* PID41value);Service to report the value of PID $41 computed by the Dem.Std_ReturnType Dem_DcmReadDataOfPID4D (uint8* PID4Dvalue);Service to report the value of PID $4D computed by the Dem.Std_ReturnType Dem_DcmReadDataOfPID4E (uint8* PID4Evalue);Service to report the value of PID $4E computed by the Dem.Std_ReturnType Dem_DcmReadDataOfPID91 (uint8* PID91value);Service to report the value of PID $91 computed by the Dem.Std_ReturnType Dem_DcmReadDataOfOBDFreezeFrame (uint8 PID, uint8 DataElementIndexOfPID, uint8* DestBuffer, uint16* BufSize);Gets data element per PID and index of the most important freeze frame being selected for the output of service $02.Std_ReturnType Dem_DcmGetDTCOfOBDFreezeFrame (uint8 FrameNumber, uint32* DTC, Dem_DTCFormatType DTCFormat);Gets DTC by freeze frame record number.Std_ReturnType Dem_DcmGetAvailableOBDMIDs (uint8 Obdmid, uint32* Obdmidvalue);Reports the value of a requested "availability-OBDMID" to the DCM upon a Service $06 request.Std_ReturnType Dem_DcmGetNumTIDsOfOBDMID (uint8 Obdmid, uint8* numberOfTIDs);Gets the number of TIDs per (functional) OBDMID.Std_ReturnType Dem_DcmGetDTRData (uint8 Obdmid, uint8 TIDindex, uint8* TIDvalue, uint8* UaSID, uint16* Testvalue, uint16* Lowlimvalue, uint16* Upplimvalue);Reports a DTR data along with TID-value, UaSID, test result with lower and upper limit.Std_ReturnType Dem_J1939DcmSetDTCFilter (Dem_J1939DcmDTCStatusFilterType DTCStatusFilter, Dem_DTCKindType DTCKind, Dem_DTCOriginType DTCOrigin, uint8 ClientId, Dem_J1939DcmLampStatusType* LampStatus);The function sets the DTC filter for a specific node and returns the composite lamp status of the filtered DTCs.Std_ReturnType Dem_J1939DcmGetNumberOfFilteredDTC (uint16* NumberOfFilteredDTC, uint8 ClientId);Gets the number of currently filtered DTCs set by the function Dem_J1939DcmSetDTCFilter.Std_ReturnType Dem_J1939DcmGetNextFilteredDTC (uint32* J1939DTC, uint8* OccurenceCounter, uint8 ClientId);Gets the next filtered J1939 DTC.void Dem_J1939DcmFirstDTCwithLampStatus (uint8 ClientId);The function sets the filter to the first applicable DTC for the DM31 response for a specific node.Std_ReturnType Dem_J1939DcmGetNextDTCwithLampStatus (Dem_J1939DcmLampStatusType* LampStatus, uint32* J1939DTC, uint8* OccurenceCounter, uint8 ClientId);Gets the next filtered J1939 DTC for DM31 including current LampStatus.Std_ReturnType Dem_J1939DcmClearDTC (Dem_J1939DcmSetClearFilterType DTCTypeFilter, Dem_DTCOriginType DTCOrigin, uint8 ClientId);Clears the status of all event(s) related to the specified DTC(s), as well as all associated event memory entries for these...Std_ReturnType Dem_J1939DcmSetFreezeFrameFilter (Dem_J1939DcmSetFreezeFrameFilterType FreezeFrameKind, uint8 ClientId);The function sets the FreezeFrame filter for a specific node.Std_ReturnType Dem_J1939DcmGetNextFreezeFrame (uint32* J1939DTC, uint8* OccurenceCounter, uint8* DestBuffer, uint16* BufSize, uint8 ClientId);Gets next freeze frame data.Std_ReturnType Dem_J1939DcmGetNextSPNInFreezeFrame (uint32* SPNSupported, uint8* SPNDataLength, uint8 ClientId);Gets next SPN.Std_ReturnType Dem_J1939DcmSetRatioFilter (uint16* IgnitionCycleCounter, uint16* OBDMonitoringConditionsEncountered, uint8 ClientId);The function sets the Ratio filter for a specific node and returns the corresponding Ignition Cycle Counter and General...Std_ReturnType Dem_J1939DcmGetNextFilteredRatio (uint32* SPN, uint16* Numerator, uint16* Denominator, uint8 ClientId);Gets the next filtered Ratio.Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness (Dem_J1939DcmDiagnosticReadiness1Type* DataValue, uint8 ClientId);Service to report the value of Diagnostic Readiness 1 (DM05) computed by the Dem.Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness (Dem_J1939DcmDiagnosticReadiness2Type* DataValue, uint8 ClientId);Service to report the value of Diagnostic Readiness 2 (DM21) computed by the Dem.Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness (Dem_J1939DcmDiagnosticReadiness3Type* DataValue, uint8 ClientId);Service to report the value of Diagnostic Readiness 3 (DM26) computed by the Dem.Std_ReturnType Dem_SetEventDisabled (Dem_EventIdType EventId);Service for reporting the event as disabled to the Dem for the PID $41 computation.Std_ReturnType Dem_RepIUMPRFaultDetect (Dem_RatioIdType RatioID);Service for reporting that faults are possibly found because all conditions are fullfilled.Std_ReturnType Dem_SetIUMPRDenCondition (Dem_IumprDenomCondIdType ConditionId, Dem_IumprDenomCondStatusType ConditionStatus);In order to communicate the status of the (additional) denominator conditions among the OBD relevant ECUs, the API is used to...Std_ReturnType Dem_GetIUMPRDenCondition (Dem_IumprDenomCondIdType ConditionId, Dem_IumprDenomCondStatusType* ConditionStatus);In order to communicate the status of the (additional) denominator conditions among the OBD relevant ECUs, the API is used to...Std_ReturnType Dem_RepIUMPRDenRelease (Dem_RatioIdType RatioID);Service is used to release a denominator of a specific monitor.Std_ReturnType Dem_SetPtoStatus (boolean PtoStatus);API is needed in OBD-relevant ECUs only API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.Std_ReturnType Dem_ReadDataOfPID01 (uint8* PID01value);Service to report the value of PID $01 computed by the Dem.Std_ReturnType Dem_GetDataOfPID21 (uint8* PID21value);Service to get the value of PID $21 from the Dem by a software component.Std_ReturnType Dem_SetDataOfPID21 (const uint8* PID21value);Service to set the value of PID $21 in the Dem by a software component.Std_ReturnType Dem_SetDataOfPID31 (const uint8* PID31value);Service to set the value of PID $31 in the Dem by a software component.Std_ReturnType Dem_SetDataOfPID4D (const uint8* PID4Dvalue);Service to set the value of PID $4D in the Dem by a software component.Std_ReturnType Dem_SetDataOfPID4E (const uint8* PID4Evalue);Service to set the value of PID $4E in the Dem by a software component.Std_ReturnType Dem_GetCycleQualified (uint8 OperationCycleId, boolean* isQualified);Returns the qualification state of the dependent operation cycle.Std_ReturnType Dem_SetCycleQualified (uint8 OperationCycleId);Sets a dependent operation cycle as qualified, so it may be processed along with its leading cycle.Std_ReturnType Dem_GetDTCSeverityAvailabilityMask (uint8 ClientId, Dem_DTCSeverityType* DTCSeverityMask);Gets the DTC Severity availability mask.Std_ReturnType Dem_GetB1Counter (uint16* B1Counter);Service to report the value of the B1 counter computed by the Dem.Std_ReturnType Dem_SetDTR (uint16 DTRId, sint32 TestResult, sint32 LowerLimit, sint32 UpperLimit, Dem_DTRControlType Ctrlval);Reports a DTR result with lower and upper limit.Std_ReturnType Dem_CallbackEventSyncStorageProcessed (void);Called by the Dem after the internal processing of Dem_SetEventFailedWithSyncFreezeFrame is done and a further call of...void Dem_MainFunction (void);Processes all not event based Dem internal functions.
Typen — Übersicht
Dem_ComponentIdTypeIdentification of a DemComponent by assigned ComponentId.struct Dem_ConfigTypeThis type of the external data structure shall contain the post build initialization data for the Dem.Dem_DTCKindTypeThis type is used to filter DTCs for their kind.Dem_DTCRequestTypeThis type is used to request a DTC with specific attributes.Dem_DTCTranslationFormatTypeDTC translation format as defined in ISO14229-1.Dem_J1939DcmDTCStatusFilterTypeThe type to distinguish which DTCs should be filtered.Dem_J1939DcmSetClearFilterTypeThe type to distinguish which DTCs gets clearedDem_J1939DcmSetFreezeFrameFilterTypeThe type to distinguish which DTCs gets clearedenum Dem_J1939DcmLampStatusTypeFor details refer SAE J1939-73struct Dem_J1939DcmDiagnosticReadiness1TypeThis structure represents all data elemets of the DM05 message.struct Dem_J1939DcmDiagnosticReadiness2TypeThis structure represents all data elemets of the DM21 message.struct Dem_J1939DcmDiagnosticReadiness3TypeThis structure represents all data elemets of the DM26 message.Dem_DataTypeData type definition for external data elementsDem_DataPrimitiveTypeDem_DataArrayTypeArray data type definition for external data elementsenum Dem_DTCOriginTypeThis enum is used to define the location of the events.enum Dem_DebounceResetStatusTypeThis type contains all definitions to control an internal debounce counter/timer via the function Dem_ResetEventDebounceStatus().Dem_DTRControlTypeControl parameter for the interpretation of the reported test results.Dem_EventIdTypeIdentification of an event by assigned EventId.enum Dem_EventStatusTypeThis type contains all monitor test result values, which can be reported via Dem_SetEventStatus().Dem_DTCFormatTypeThis type is used to select the format of the DTC value.enum Dem_InitMonitorReasonType(Re-)Initialization reason returned by the callback _DemInitMonitorFor().Dem_IumprDenomCondIdTypeThis type contains all possible additional IUMPR denominator conditions to be broadcasted among OBD-relevant ECUs.enum Dem_IumprDenomCondStatusTypeThis type contains all possible states of an additional IUMPR denominator condition to be broadcasted among OBD-relevant ECUs.Dem_MaxDataValueTypeDem_MonitorDataTypeThis type is used to pass monitoring data to the Dem.enum Dem_IndicatorStatusTypeIndicator mode used by Dem_GetIndicatorStatus().Dem_PID21valueTypeDem_PID31valueTypeDem_RatioIdTypeOBD specific ratio Id (related to a specific event, a FID, and an IUMPR group).Dem_PID4DvalueTypeDem_PID4EvalueType
Funktionen & Typen — Detailansicht
function Dem_GetVersionInfo [SWS_Dem_00177] 📄 PDF
void Dem_GetVersionInfo (Std_VersionInfoType* versioninfo);
Returns the version information of this module. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemVersionInfoApi)} == true)
function Dem_PreInit [SWS_Dem_00179] 📄 PDF
void Dem_PreInit (void);
Initializes the internal states necessary to process events reported by BSW-modules.
The function Dem_PreInit is used during system startup for the pre-initialization of internal states of the DEM module that are required for the early processing of event reports from BSW modules ([SWS_Dem_00179], [SWS_Dem_00180]). The call is performed synchronously, is non-reentrant, and has neither passing parameters nor a return value ([SWS_Dem_00179]).
Calling Dem_PreInit initializes the internal debouncing mechanisms including counters and timers ([SWS_Dem_01213]). If DEM-internal debouncing is configured, the module resets the corresponding debouncing algorithm ([SWS_Dem_00438]).
After successful completion of Dem_PreInit and prior to the call of Dem_Init, selected interfaces and behaviors are enabled:
- Event status and debouncing: Calls to
Dem_SetEventStatusare supported for debouncing with statesDEM_EVENT_STATUS_PREPASSEDandDEM_EVENT_STATUS_PREFAILED([SWS_Dem_01212]). However, any events reported beforeDem_Initdo not trigger callbacks for monitor status changes ([SWS_Dem_01289]). - Controlling debounce status: The function
Dem_ResetEventDebounceStatusfor resetting or freezing debounce counters is available to BSW modules after completion ofDem_PreInit([SWS_Dem_00180], [SWS_Dem_00683]). - Confirmation thresholds and operation cycles: Following
Dem_PreInit, the DEM supports calls toDem_SetEventConfirmationThresholdCounter([SWS_Dem_01242]). A call toDem_RestartOperationCycleis likewise only permissible from this point forward; if an operation cycle is restarted beforeDem_Init, the actual restart processing occurs only afterDem_Init([SWS_Dem_01318]).
This text was generated by an AI based on the specification.
Implementer's Guide to follow (complexity I2)
function Dem_Init [SWS_Dem_00181] 📄 PDF
void Dem_Init (const Dem_ConfigType* ConfigPtr);
Initializes or reinitializes this module.
The synchronous, non-reentrant function Dem_Init initializes or reinitializes the Diagnostic Event Manager (DEM) module completely according to [SWS_Dem_00181]. After completion of this call, the DEM is fully operational ([SWS_Dem_00340]). Via the input parameter ConfigPtr, a pointer to the post-build configuration data set is passed in VARIANT-POST-BUILD ([SWS_Dem_00181]).
As part of the initialization sequence, Dem_Init performs essential restoration and synchronization steps:
- State and monitor initialization: The monitor and component states are initialized ([SWS_Dem_01324]). While calls to
Dem_GetMonitorStatusreturnE_NOT_OKprior to completion of the initialization ([SWS_Dem_01326]),Dem_GetMonitorStatusandDem_GetComponentFailedreturnE_OKafter this point in time ([SWS_Dem_01324]). - Non-volatile memory (NVM): If configured (
DemDebounceCounterStorage == True), the DEM restores the internal debounce counter at the latest inDem_Init([SWS_Dem_00675]). Likewise, preconfigured freeze frame data is loaded from the NVM before the function returns ([SWS_Dem_01322]), for which the DEM relies on NvM APIs such asNvM_ReadBlock([SWS_Dem_00164]). CallingDem_Initalso releases the lock on the event memory after a previousDem_Shutdown([SWS_Dem_00102]). - Interaction and buffering: If
DemTriggerFiMReportsis set toTrue,Dem_InitcallsFiM_DemInitexclusively at this point in time to initialize permissions in the Function Inhibition Manager ([SWS_Dem_01189]). Events buffered prior toDem_Init([SWS_Dem_00167], [SWS_Dem_01079]) do not trigger monitor status change callbacks beforeDem_Init([SWS_Dem_01289]). A cycle restart requested beforeDem_InitviaDem_RestartOperationCycleis not processed until afterDem_Init([SWS_Dem_01318]).
Regarding error handling: If Dem_Shutdown has been called and development error detection is active, the DEM acknowledges calls to most APIs with the error DEM_E_UNINIT until Dem_Init is executed again ([SWS_Dem_00368]).
This text was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I2)
function Dem_Shutdown [SWS_Dem_00182] 📄 PDF
void Dem_Shutdown (void);
Shuts down this module.
The synchronous and non-reentrant function Dem_Shutdown serves to shut down the Diagnostic Event Manager module ([SWS_Dem_00182]) in an orderly manner. It has neither input nor return parameters ([SWS_Dem_00182]). The call context is presumably within the central ECU shutdown sequence. Question Q-a0e6a5700c49d786 (open)
When called, Dem_Shutdown completes all remaining pending operations of the DEM module to prepare the internal states and data for transfer to NVRAM ([SWS_Dem_00102]). For modified non-volatile data, the DEM triggers storage in NVRAM before or during Dem_Shutdown ([SWS_Dem_00341]). Where necessary, the module uses interfaces NvM_WriteBlock and NvM_ReadBlock of the NVRAM Manager ([SWS_Dem_00164]) to save and restore data between Dem_Init and Dem_Shutdown. If the DEM was configured to store pre-stored freeze frame data non-volatilely, this storage occurs once and at the latest during Dem_Shutdown ([SWS_Dem_01321]).
Upon execution of the shutdown, the event memory is locked and must not be modified again until a subsequent call of Dem_Init ([SWS_Dem_00102]). In addition, the following error conditions apply when development error detection (Development Error Detection) is enabled:
- If a DEM API is called after
Dem_Shutdown—with the exception ofDem_SetEventStatus,Dem_ResetEventDebounceStatus,Dem_GetVersionInfo, andDem_MainFunction—the module sets error codeDEM_E_UNINITuntil the nextDem_Init([SWS_Dem_00368]). - If
Dem_SetEventStatusorDem_ResetEventDebounceStatusis called afterDem_Shutdownfor events whereDemDebounceCounterStorageis set toTrue, the DEM reports error codeDEM_E_WRONG_CONDITION([SWS_Dem_00676]).
This text was generated by an AI and serves as guidance. The definitions in the respective AUTOSAR specification are binding.
Implementer's Guide to follow (complexity I2)
function Dem_ClearDTC [SWS_Dem_00665] 📄 PDF
Std_ReturnType Dem_ClearDTC (uint8 ClientId);
Clears single DTCs, as well as groups of DTCs.
The asynchronous function Dem_ClearDTC serves to clear individual diagnostic trouble codes (DTCs) or entire DTC groups in the Diagnostic Event Manager [SWS_Dem_00665]. Prior to the call, the target selection of DTC, format, and memory destination must have been set by means of Dem_SelectDTC for the respective ClientId [SWS_Dem_01253]. The function is reentrant for different ClientId values, but non-reentrant for the same client [SWS_Dem_00665].
The clearing process is confirmed with E_OK as soon as it is successfully completed [SWS_Dem_00665]. As long as the clearing is ongoing, the API returns DEM_PENDING, whereupon the caller must call the function again at a later time [SWS_Dem_00665]. If another operation dependent on Dem_SelectDTC is active in parallel for the same client, DEM_BUSY is reported [SWS_Dem_00665]. The DEM processes multiple parallel client requests internally [SWS_Dem_00661], whereby concurrent calls during an ongoing clearing process may receive DEM_PENDING [SWS_Dem_00664] or DEM_CLEAR_BUSY [SWS_Dem_00665].
The API acknowledges faulty calls with specific return values:
E_NOT_OK: No DTC was previously selected [SWS_Dem_00665].DEM_WRONG_DTC: The DTC does not exist [SWS_Dem_00665], is suppressed [SWS_Dem_01100], or configurationDemClearDTCLimitationforcesDEM_ONLY_CLEAR_ALL_DTCS[SWS_Dem_00670].DEM_WRONG_DTCORIGIN: The selected memory destination does not exist [SWS_Dem_00665].DEM_CLEAR_FAILEDorDEM_CLEAR_MEMORY_ERROR: Clearing failed, or an error occurred while clearing in non-volatile memory [SWS_Dem_00665].
Within the scope of clearing, for combined DTCs all associated events are cleared [SWS_Dem_00440] and their monitor initialization via InitMonitorForEvent with DEM_INIT_MONITOR_CLEAR is triggered [SWS_Dem_00680]. If DemTriggerMonitorInitBeforeClearOk is set, the return of E_OK occurs only after this trigger [SWS_Dem_00573]. If all DTCs of an event memory are cleared, the DEM resets its overflow indication [SWS_Dem_00399]; furthermore, for OBD service $04, unassigned DTR data are reset [SWS_Dem_00764] and non-memory-related events are cleared [SWS_Dem_01249].
This text was generated by an AI and serves for technical orientation.
Implementer's Guide to follow (complexity I2)
function Dem_ClearPrestoredFreezeFrame [SWS_Dem_00193] 📄 PDF
Std_ReturnType Dem_ClearPrestoredFreezeFrame (Dem_EventIdType EventId);
Clears a prestored freeze frame of a specific event. This API can only be used through the RTE and therefore no declaration is exported via Dem.h. API Availability: This API will be available only if ({ecuc(Dem/DemConfigSet/DemEvent Parameter.DemFFPrestorageSupported)} == true)
Usage and Call Context
The synchronous function Dem_ClearPrestoredFreezeFrame clears a previously buffered freeze frame for a specific diagnostic event ([SWS_Dem_00193]). The call occurs exclusively via the RTE; a declaration in the header file Dem.h is not provided ([SWS_Dem_00193]). The API is implemented in the system only if at least one event has been configured for prestorage (configuration parameter DemFFPrestorageSupported) ([SWS_Dem_00193], [SWS_Dem_00334]). The function returns E_OK upon successful clearing and E_NOT_OK if the operation fails ([SWS_Dem_00193]).
Concurrency and Limitations
The interface is reentrant for different event IDs (EventId), but must not be executed concurrently for the same EventId ([SWS_Dem_00193]). A call with events configured as slave events (DemMultiEventTriggeringSlaveEventRef) or as replacement events (DemStorageConditionReplacementEventRef) is not supported; the behavior of the DEM is undefined in this case ([SWS_Dem_01339]). If an event is set to unavailable, it is treated like an unconfigured event ([SWS_Dem_01108]); interpretation: the call in this case is likely rejected with E_NOT_OK. Question Q-d8ebaf6883138fdf (open)
Interaction in Multi-Event Triggering
Provided DemMultiEventTriggering is configured and the function is called for a master event (DemMultiEventTriggeringMasterEventRef), the DEM automatically triggers the clear call with identical parameters for all assigned slave events (DemMultiEventTriggeringSlaveEventRef) ([SWS_Dem_01250]).
This usage note was generated by an AI based on the AUTOSAR Classic Release R20-11 specification.
Implementer's Guide to follow (complexity I1)
function Dem_GetComponentFailed [SWS_Dem_01115] 📄 PDF
Std_ReturnType Dem_GetComponentFailed (Dem_ComponentIdType ComponentId, boolean* ComponentFailed);
Gets the failed status of a DemComponent.
function Dem_GetDTCSelectionResult [SWS_Dem_91023] 📄 PDF
Std_ReturnType Dem_GetDTCSelectionResult (uint8 ClientId);
Provides information if the last call to Dem_SelectDTC has selected a valid DTC or group of DTCs.
function Dem_GetDTCSelectionResultForClearDTC [SWS_Dem_91020] 📄 PDF
Std_ReturnType Dem_GetDTCSelectionResultForClearDTC (uint8 ClientId);
Provides information if the last call to Dem_SelectDTC has selected a valid DTC or group of DTCs, respecting the settings if the Dem shall clear only all DTCs.
function Dem_GetEventUdsStatus [SWS_Dem_91008] 📄 PDF
Std_ReturnType Dem_GetEventUdsStatus (Dem_EventIdType EventId, Dem_UdsStatusByteType* UDSStatusByte);
Gets the current UDS status byte assigned to the DTC for the event
function Dem_GetMonitorStatus [SWS_Dem_91007] 📄 PDF
Std_ReturnType Dem_GetMonitorStatus (Dem_EventIdType EventID, Dem_MonitorStatusType* MonitorStatus);
Gets the current monitor status for an event.
function Dem_GetDebouncingOfEvent [SWS_Dem_00730] 📄 PDF
Std_ReturnType Dem_GetDebouncingOfEvent (Dem_EventIdType EventId, Dem_DebouncingStateType* DebouncingState);
Gets the debouncing status of an event. This function shall not be used for EventId with native debouncing within their functions. It is rather for EventIds using debouncing within the Dem.
function Dem_GetDTCOfEvent [SWS_Dem_00198] 📄 PDF
Std_ReturnType Dem_GetDTCOfEvent (Dem_EventIdType EventId, Dem_DTCFormatType DTCFormat, uint32* DTCOfEvent);
Gets the DTC of an event.
function Dem_GetDTCSuppression [SWS_Dem_91025] 📄 PDF
Std_ReturnType Dem_GetDTCSuppression (uint8 ClientId, boolean* SuppressionStatus);
Returns the suppression status of a specific DTC. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemSuppressionSupport)} == DEM_DTC_SUPPRESSION)
function Dem_GetEventAvailable [SWS_Dem_91040] 📄 PDF
Std_ReturnType Dem_GetEventAvailable (Dem_EventIdType EventId, boolean* AvailableStatus);
Get the Event's availability.
function Dem_GetFaultDetectionCounter [SWS_Dem_00203] 📄 PDF
Std_ReturnType Dem_GetFaultDetectionCounter (Dem_EventIdType EventId, sint8* FaultDetectionCounter);
Gets the fault detection counter of an event. This API can only be used through the RTE, and therefore no declaration is exported via Dem.h.
function Dem_GetIndicatorStatus [SWS_Dem_00205] 📄 PDF
Std_ReturnType Dem_GetIndicatorStatus (uint8 IndicatorId, Dem_IndicatorStatusType* IndicatorStatus);
Gets the indicator status derived from the UDS status. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemEventMemory Set/DemIndicator)} != NULL)
function Dem_GetEventFreezeFrameDataEx [SWS_Dem_01191] 📄 PDF
Std_ReturnType Dem_GetEventFreezeFrameDataEx (Dem_EventIdType EventId, uint8 RecordNumber, uint16 DataId, uint8* DestBuffer, uint16* BufSize);
Gets the data of a freeze frame by event.
function Dem_GetEventExtendedDataRecordEx [SWS_Dem_01190] 📄 PDF
Std_ReturnType Dem_GetEventExtendedDataRecordEx (Dem_EventIdType EventId, uint8 RecordNumber, uint8* DestBuffer, uint16* BufSize);
Gets the data of an extended data record by event.
function Dem_GetEventMemoryOverflow [SWS_Dem_00559] 📄 PDF
Std_ReturnType Dem_GetEventMemoryOverflow (uint8 ClientId, Dem_DTCOriginType DTCOrigin, boolean* OverflowIndication);
Gets the event memory overflow indication status.
function Dem_GetNumberOfEventMemoryEntries [SWS_Dem_00652] 📄 PDF
Std_ReturnType Dem_GetNumberOfEventMemoryEntries (uint8 ClientId, Dem_DTCOriginType DTCOrigin, uint8* NumberOfEventMemoryEntries);
Returns the number of entries currently stored in the requested event memory.
function Dem_ResetEventDebounceStatus [SWS_Dem_00683] 📄 PDF
Std_ReturnType Dem_ResetEventDebounceStatus (Dem_EventIdType EventId, Dem_DebounceResetStatusType DebounceResetStatus);
Control the internal debounce counter/timer by BSW modules and SW-Cs. The event qualification will not be affected by these debounce state changes. This API is available for BSW modules as soon as Dem_PreInit has been completed (refer to SWS_Dem_00438 and SWS_Dem_00167).
The synchronous function Dem_ResetEventDebounceStatus is used by BSW modules and software components (SW-Cs) to selectively freeze or reset the internal debouncing counter or timer of a diagnostic event without influencing event qualification [SWS_Dem_00683].
Usage and Parameters
The desired action is controlled via parameter DebounceResetStatus: The value DEM_DEBOUNCE_STATUS_FREEZE freezes the internal debouncing timer [SWS_Dem_00685], while DEM_DEBOUNCE_STATUS_RESET resets the associated fault detection counter [SWS_Dem_00684] [SWS_Dem_00927]. The function returns E_OK upon successful execution and E_NOT_OK exclusively in case of a development error [SWS_Dem_00683].
Error Handling and Lifecycle
The API is already available to BSW modules after completion of Dem_PreInit and is therefore exempt from the general initialization check prior to full initialization [SWS_Dem_00124] [SWS_Dem_00683]. When development error detection is enabled, the following conditions apply:
- If the function is called before pre-initialization, the DEM reports error
DEM_E_UNINIT[SWS_Dem_00364]. - If the call for events with a persistent debouncing counter (
DemDebounceCounterStorageset to True) occurs beforeDem_Initor afterDem_Shutdown,DEM_E_WRONG_CONDITIONis set [SWS_Dem_00676]. - If an event is marked as not available, it is treated like an unconfigured event [SWS_Dem_01108].
Concurrency and Limitations
Dem_ResetEventDebounceStatus is reentrant for different EventId values, but non-reentrant for the same event [SWS_Dem_00683]. If DemMultiEventTriggering is configured, a call with a master event triggers identical calls for all assigned slave events [SWS_Dem_01250]. Direct calls for purely internal slave events or events referenced via DemStorageConditionReplacementEventRef are not supported and lead to undefined behavior [SWS_Dem_01339].
This text was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I2)
function Dem_ResetEventStatus [SWS_Dem_00185] 📄 PDF
Std_ReturnType Dem_ResetEventStatus (Dem_EventIdType EventId);
Resets the event failed status. This API can only be used through the RTE and therefore no declaration is exported via Dem.h.
The function Dem_ResetEventStatus serves to reset the fault status of a diagnostic event and is available exclusively via the RTE [SWS_Dem_00185]. The invocation occurs with EventId and has asynchronous semantics: Upon successful acceptance of the request, the function returns E_OK [SWS_Dem_00185]. The DEM module subsequently resets status bit 0 (TestFailed) to 0 with a time delay and, if appropriately configured, resets the internal debouncing algorithm to its initial values [SWS_Dem_00187].
The request fails with return value E_NOT_OK if the event has already been tested in the current operation cycle (UDS status bit 6 is 0) [SWS_Dem_00185], [SWS_Dem_00638], or if the event is configured or set as not available [SWS_Dem_01108]. An invocation prior to complete initialization of the DEM does not lead to reporting of error DEM_E_UNINIT even with development error detection (DemDevErrorDetect) enabled [SWS_Dem_00124].
Regarding concurrency, Dem_ResetEventStatus is reentrant for different EventId values, but non-reentrant for the same EventId [SWS_Dem_00185]. If DemMultiEventTriggering is configured and the function is called with a master event, the DEM automatically triggers the same invocation for all linked slave events [SWS_Dem_01250]. Direct invocations with an EventId configured as a slave event or as DemStorageConditionReplacementEventRef are not supported and lead to undefined behavior [SWS_Dem_01339].
This text was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I2)
function Dem_RestartOperationCycle [SWS_Dem_00194] 📄 PDF
Std_ReturnType Dem_RestartOperationCycle (uint8 OperationCycleId);
Sets an operation cycle state. This API can only be used through the RTE and therefore no declaration is exported via Dem.h. The interface has an asynchronous behavior to avoid exceeding of typical timing requirements on APIs if a large number of events has to be processed and during the re-initializations of the related monitors. The asynchronous acknowledgements are the related InitMonitorForEvent callbacks.
The function Dem_RestartOperationCycle serves to restart an operation cycle ([SWS_Dem_00194]). It is invoked exclusively via the RTE, which is why no declaration is exported via Dem.h ([SWS_Dem_00194]).
Semantics and Parameters
The operation cycle to be restarted is identified via input parameter OperationCycleId (e.g., Power Cycle or Driving Cycle) ([SWS_Dem_00194]). The function operates reentrantly as well as asynchronously ([SWS_Dem_00194]):
E_OK: Setting the operation cycle was accepted and is processed further asynchronously ([SWS_Dem_00194]).E_NOT_OK: The request to set the cycle was rejected ([SWS_Dem_00194]).
Interaction and Asynchronous Flow
The asynchronous behavior prevents violations of typical timing requirements when a large number of events must be processed and monitors reinitialized ([SWS_Dem_00194]). The associated callbacks InitMonitorForEvent serve as asynchronous feedback ([SWS_Dem_00194]). During the restart, the DEM reinitializes the diagnostic monitors of all affected events by calling their callback InitMonitorForEvent with parameter InitMonitorReason set to DEM_INIT_MONITOR_RESTART ([SWS_Dem_00679]).
If an operation cycle is restarted via Dem_RestartOperationCycle, all operation cycles dependent on it must also be restarted, provided they are qualified ([SWS_Dem_01224]).
This text was generated by an AI and serves as guidance. The AUTOSAR specification is authoritative.
Implementer's Guide to follow (complexity I2)
function Dem_PrestoreFreezeFrame [SWS_Dem_00188] 📄 PDF
Std_ReturnType Dem_PrestoreFreezeFrame (Dem_EventIdType EventId);
Captures the freeze frame data for a specific event. This API can only be used through the RTE and therefore no declaration is exported via Dem.h. API Availability: This API will be available only if ({ecuc(Dem/DemConfigSet/DemEvent Parameter.DemFFPrestorageSupported)} == true)
The function serves for the synchronous capturing and buffering of freeze frame data for a specific diagnostic event [SWS_Dem_00188]. The interface is provided exclusively via the RTE and is not exported via Dem.h [SWS_Dem_00188]. It exists in the module only if pre-storage is configured for at least one event (DemFFPrestorageSupported) [SWS_Dem_00334].
Return values and error handling:
E_OK: The freeze frame was buffered successfully [SWS_Dem_00188].E_NOT_OK: Buffering fails [SWS_Dem_00188], particularly if no buffer is free anymore (limited byDemMaxNumberPrestoredFF) [SWS_Dem_00808] or the specified event is set to unavailable [SWS_Dem_01108].
Concurrency and calling conditions: The function is reentrant for different event IDs, but not for the same EventId [SWS_Dem_00188].
Interaction in multi-event triggering: If the function is called with a configured master event (DemMultiEventTriggeringMasterEventRef), the DEM automatically triggers identical calls for all associated slave events (DemMultiEventTriggeringSlaveEventRef) [SWS_Dem_01250]. Direct calls with a slave event ID or with a replacement event for storage conditions (DemStorageConditionReplacementEventRef) are not supported and lead to undefined behavior [SWS_Dem_01339].
This text was generated by an AI based on the specification AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I1)
function Dem_SelectDTC [SWS_Dem_91016] 📄 PDF
Std_ReturnType Dem_SelectDTC (uint8 ClientId, uint32 DTC, Dem_DTCFormatType DTCFormat, Dem_DTCOriginType DTCOrigin);
Selects a DTC or DTC group as target for further operations.
The synchronous function Dem_SelectDTC selects a DTC or a DTC group in the defined format (DTCFormat) and event memory (DTCOrigin) for a specific ClientId as the target for subsequent operations [SWS_Dem_91016]. It triggers the DEM's internal selection process on the event memory assigned to this ClientId [SWS_Dem_01254].
Regarding concurrency and call context, the function is reentrant for different ClientIds, but non-reentrant for the same ClientId [SWS_Dem_91016]. The defined return values are [SWS_Dem_91016]:
E_OK: The DTC or group was successfully selected [SWS_Dem_91016].DEM_BUSY: Another call ofDem_SelectDTCor an operation of this client dependent thereon is currently already being executed [SWS_Dem_91016].
The result of the selection is reflected in the return values of subsequent API calls [SWS_Dem_01254]. The DEM uses the selected DTC or DTC group as the target for subsequent function calls of the same client, such as Dem_ClearDTC, Dem_DisableDTCRecordUpdate, Dem_GetFunctionalUnitOfDTC, Dem_GetSeverityOfDTC, Dem_GetStatusOfDTC, Dem_SelectFreezeFrameData, Dem_SelectExtendedDataRecord, and Dem_SetDTCSuppression [SWS_Dem_01253], among others. Furthermore, Dem_SelectFreezeFrameData and Dem_SelectExtendedDataRecord build upon this selected DTC [SWS_Dem_01268], [SWS_Dem_01272].
If one of the dependent APIs is called without a prior valid selection or if the passed DTC is invalid in the specified format, the DEM returns DEM_WRONG_DTC [SWS_Dem_01261]. If the requested memory area (DTCOrigin) does not exist or is invalid, subsequent calls report DEM_WRONG_DTCORIGIN [SWS_Dem_01258], [SWS_Dem_01262]. By means of Dem_GetDTCSelectionResult, it can be checked explicitly whether selection with E_OK was successful and the DTC is ready for further processing [SWS_Dem_01256], [SWS_Dem_01257].
This usage note was created by an AI and is based exclusively on specification data from AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I2)
function Dem_SetComponentAvailable [SWS_Dem_01117] 📄 PDF
Std_ReturnType Dem_SetComponentAvailable (Dem_ComponentIdType ComponentId, boolean AvailableStatus);
Set the availability of a specific DemComponent.
function Dem_SetDTCSuppression [SWS_Dem_01047] 📄 PDF
Std_ReturnType Dem_SetDTCSuppression (uint8 ClientId, boolean SuppressionStatus);
Set the suppression status of a specific DTC. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemSuppression Support)} == DEM_DTC_SUPPRESSION)
function Dem_SetEnableCondition [SWS_Dem_00201] 📄 PDF
Std_ReturnType Dem_SetEnableCondition (uint8 EnableConditionID, boolean ConditionFulfilled);
Sets an enable condition. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemEnable Condition)} != NULL)
function Dem_SetEventAvailable [SWS_Dem_01080] 📄 PDF
Std_ReturnType Dem_SetEventAvailable (Dem_EventIdType EventId, boolean AvailableStatus);
Set the available status of a specific Event.
function Dem_SetEventConfirmationThresholdCounter [SWS_Dem_91004] 📄 PDF
Std_ReturnType Dem_SetEventConfirmationThresholdCounter (Dem_EventIdType EventId, uint8 FailureCycleCounterThreshold);
Set the failure confirmation threshold of an event.
function Dem_SetEventStatus [SWS_Dem_00183] 📄 PDF
Std_ReturnType Dem_SetEventStatus (Dem_EventIdType EventId, Dem_EventStatusType EventStatus);
Called by SW-Cs or BSW modules to report monitor status information to the Dem. BSW modules calling Dem_SetEventStatus can safely ignore the return value. This API will be available only if ({Dem/DemConfigSet/DemEventParameter/DemEventReportingType} == STANDARD_REPORTING)
The function Dem_SetEventStatus serves SW-Cs and BSW modules to report monitor test results to the DEM [SWS_Dem_00183], [SWS_Dem_00330]. It is available if STANDARD_REPORTING is configured for the event [SWS_Dem_00183]. Status values passed are qualified results (DEM_EVENT_STATUS_PASSED, DEM_EVENT_STATUS_FAILED), pre-qualifications for DEM-internal debouncing (DEM_EVENT_STATUS_PREPASSED, DEM_EVENT_STATUS_PREFAILED), or the reaching of the debounce threshold DEM_EVENT_STATUS_FDC_THRESHOLD_REACHED [SWS_Dem_00926].
Regarding concurrency, the API is reentrant for different EventId values, but non-reentrant for the same EventId [SWS_Dem_00183]. Prior to pre-initialization via Dem_PreInit, a call results in error DEM_E_UNINIT if development error detection is active [SWS_Dem_00364]. After Dem_PreInit, but still before Dem_Init, the call is permitted, however [SWS_Dem_00124], [SWS_Dem_00180]; qualifying events are buffered in a queue whose size is determined via DemBswErrorBufferSize, while FDC thresholds are not buffered [SWS_Dem_00167], [SWS_Dem_00207]. Even after Dem_Shutdown, the function does not generate a DEM_E_UNINIT error [SWS_Dem_00368].
The return value is E_OK upon successful acceptance or E_NOT_OK in case of errors or if the event is set to not available [SWS_Dem_00183], [SWS_Dem_01108]. BSW modules may ignore the return value [SWS_Dem_00183]. Reports are accepted as soon as assigned enable conditions are fulfilled [SWS_Dem_00450]; if DTC setting is disabled, the DEM ignores the report for the UDS status [SWS_Dem_00626].
Synchronous actions can be triggered in the call context:
- Notification of the FiM on status change via
FiM_DemTriggerOnEventStatus, providedDemTriggerFiMReportsis active [SWS_Dem_00029]. - Capture of synchronous freeze frame data and extended data records when option
DEM_CAPTURE_SYNCHRONOUS_TO_REPORTINGis configured [SWS_Dem_00805], [SWS_Dem_01082]. - Cascading calls for configured slave events when
DemMultiEventTriggeringconfiguration is active [SWS_Dem_01250].
This note was generated automatically based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I2)
function Dem_SetEventStatusWithMonitorData [SWS_Dem_91037] 📄 PDF
Std_ReturnType Dem_SetEventStatusWithMonitorData (Dem_EventIdType EventId, Dem_EventStatusType EventStatus, Dem_MonitorDataType monitorData0, Dem_MonitorDataType monitorData1);
This API will be available only if ({Dem/DemConfigSet/DemEventParameter/DemEvent ReportingType} == STANDARD_REPORTING_WITH_MONITOR_DATA)
The function Dem_SetEventStatusWithMonitorData serves to report a monitor test result (EventStatus) for a specific diagnostic event (EventId) together with monitor-specific additional data (monitorData0 and monitorData1) to the DEM [SWS_Dem_91037]. It possesses the same functionality as Dem_SetEventStatus, but passes additional parameters for storage in event-related data [SWS_Dem_01333].
In conjunction with read operations, the following applies: If a read-data operation is configured to provide monitorData0, the DEM adds the passed monitorData0 from Dem_SetEventStatusWithMonitorData to parameter monitorData0 of this read-data operation [SWS_Dem_01330].
The following conditions apply to usage and concurrency:
- Availability: The API via
Dem.his only available ifDemEventReportingTypeis configured toSTANDARD_REPORTING_WITH_MONITOR_DATA[SWS_Dem_91037]. - Execution and reentrancy: Execution is synchronous/asynchronous. The function is reentrant for different
EventId, but not reentrant for the sameEventId[SWS_Dem_91037]. - Return values: It returns
E_OKupon successfully setting the event status, andE_NOT_OKif setting or processing failed or could not be accepted [SWS_Dem_91037].
This usage note was created automatically based on the specification.
Implementer's Guide to follow (complexity I1)
function Dem_SetStorageCondition [SWS_Dem_00556] 📄 PDF
Std_ReturnType Dem_SetStorageCondition (uint8 StorageConditionID, boolean ConditionFulfilled);
Sets a storage condition. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemStorage Condition)} != NULL)
function Dem_SetWIRStatus [SWS_Dem_00839] 📄 PDF
Std_ReturnType Dem_SetWIRStatus (Dem_EventIdType EventId, boolean WIRStatus);
Sets the WIR status bit via failsafe SW-Cs. This API can only be used through the RTE and therefore no declaration is exported via Dem.h.
Usage and Call Context
The asynchronous function Dem_SetWIRStatus serves failsafe software components (failsafe SW-Cs) for targeted requesting of the Warning-Indicator-Requested status bit (WIR bit) of a diagnostic event [SWS_Dem_00839], [SWS_Dem_01303]. Because the call occurs exclusively via the RTE, no declaration exists in the header file Dem.h [SWS_Dem_00839].
Functional behavior and interaction
Setting and resetting the bit depends on the input parameter WIRStatus as well as the status of configured indicators:
- If
WIRStatus = TRUEis passed, the DEM sets the WIR bit of the respective event to 1 [SWS_Dem_00833]. - With
WIRStatus = FALSE, the WIR bit is reset to 0 only if no referenced DEM indicators are set [SWS_Dem_00834]. - A WIR bit set via
Dem_SetWIRStatusadditionally prevents the DEM from automatically resetting UDS status bit 7 (WarningIndicatorRequested) to 0 upon reaching debounce or healing cycles [SWS_Dem_00503], [SWS_Dem_01233].
Concurrency and Error Handling
The API is reentrant for different events, but not reentrant for the same EventId [SWS_Dem_00839]. Upon successful acceptance, the function returns E_OK [SWS_Dem_00839]. The return value E_NOT_OK signals that the request was rejected and should be repeated; this is in particular the case if DTC setting is disabled (disabled ControlDTCSetting) or the event is marked as not available [SWS_Dem_00836], [SWS_Dem_01108], [SWS_Dem_00839].
This usage note was generated automatically based on the specification AUTOSAR R20-11.
Implementer's Guide to follow (complexity I2)
function Dem_SetEventFailedWithSyncFreezeFrame [SWS_Dem_91041] 📄 PDF
void Dem_SetEventFailedWithSyncFreezeFrame (Dem_EventIdType EventId);
If called the Dem sets the event to failed and this failed event requires that a snapshot record is captured, the Dem synchronously retrieves the data within the call of this API. Tags: atp.Status=draft
function Dem_GetTranslationType [SWS_Dem_00230] 📄 PDF
Dem_DTCTranslationFormatType Dem_GetTranslationType (uint8 ClientId);
Gets the supported DTC formats of the ECU.The supported formats are configured via Dem TypeOfDTCSupported.
function Dem_GetDTCStatusAvailabilityMask [SWS_Dem_00213] 📄 PDF
Std_ReturnType Dem_GetDTCStatusAvailabilityMask (uint8 ClientId, Dem_UdsStatusByteType* DTCStatusMask, Dem_DTCOriginType DTCOrigin);
Gets the DTC Status availability mask of the selected fault memory.
function Dem_GetStatusOfDTC [SWS_Dem_00212] 📄 PDF
Std_ReturnType Dem_GetStatusOfDTC (uint8 ClientId, uint8* DTCStatus);
Gets the status of a DTC. For large configurations and DTC-calibration, the interface behavior can be asynchronous (splitting the DTC-search into segments). The DTCs of OBD Events Suppression shall be reported as Dem_WRONG_DTC.
function Dem_GetSeverityOfDTC [SWS_Dem_00232] 📄 PDF
Std_ReturnType Dem_GetSeverityOfDTC (Dem_DTCSeverityType* DTCSeverity, uint8 ClientId);
Gets the severity of the requested DTC. For large configurations and DTC-calibration, the interface behavior can be asynchronous (splitting the DTC-search into segments).
function Dem_GetFunctionalUnitOfDTC [SWS_Dem_00594] 📄 PDF
Std_ReturnType Dem_GetFunctionalUnitOfDTC (uint8 ClientId, uint8* DTCFunctionalUnit);
Gets the functional unit of the requested DTC.
function Dem_SetDTCFilter [SWS_Dem_00208] 📄 PDF
Std_ReturnType Dem_SetDTCFilter (uint8 ClientId, uint8 DTCStatusMask, Dem_DTCFormatType DTCFormat, Dem_DTCOriginType DTCOrigin, boolean FilterWithSeverity, Dem_DTCSeverityType DTCSeverityMask, boolean FilterForFaultDetectionCounter);
Sets the DTC Filter. The server shall perform a bit-wise logical AND-ing operation between the parameter DTCStatusMask and the current UDS status in the server. In addition to the DTCStatus AvailabilityMask, the server shall return all DTCs for which the result of the AND-ing operation is non-zero [i.e. (statusOfDTC & DTCStatusMask) != 0]. The server shall process only the DTC Status bits that it is supporting. OBD Events Suppression shall be ignored for this computation. If no DTCs within the server match the masking criteria specified in the clients request, no DTC or status information shall be provided following the DTCStatusAvailabilityMask byte in the positive response message (((statusOfDTC & DTCStatusMask) != 0) && ((severity & DTCSeverityMask) != 0)) == TRUE
function Dem_GetNumberOfFilteredDTC [SWS_Dem_00214] 📄 PDF
Std_ReturnType Dem_GetNumberOfFilteredDTC (uint8 ClientId, uint16* NumberOfFilteredDTC);
Gets the number of a filtered DTC.
function Dem_GetNextFilteredDTC [SWS_Dem_00215] 📄 PDF
Std_ReturnType Dem_GetNextFilteredDTC (uint8 ClientId, uint32* DTC, uint8* DTCStatus);
Gets the next filtered DTC matching the filter criteria. For UDS services, the interface has an asynchronous behavior, because a large number of DTCs has to be processed.
function Dem_GetNextFilteredDTCAndFDC [SWS_Dem_00227] 📄 PDF
Std_ReturnType Dem_GetNextFilteredDTCAndFDC (uint8 ClientId, uint32* DTC, sint8* DTCFaultDetectionCounter);
Gets the next filtered DTC and its associated Fault Detection Counter (FDC) matching the filter criteria. The interface has an asynchronous behavior, because a large number of DTCs has to be processed and the FDC might be received asynchronously from a SW-C, too.
function Dem_GetNextFilteredDTCAndSeverity [SWS_Dem_00281] 📄 PDF
Std_ReturnType Dem_GetNextFilteredDTCAndSeverity (uint8 ClientId, uint32* DTC, uint8* DTCStatus, Dem_DTCSeverityType* DTCSeverity, uint8* DTCFunctionalUnit);
Gets the next filtered DTC and its associated Severity matching the filter criteria. The interface has an asynchronous behavior, because a large number of DTCs has to be processed.
function Dem_SetFreezeFrameRecordFilter [SWS_Dem_00209] 📄 PDF
Std_ReturnType Dem_SetFreezeFrameRecordFilter (uint8 ClientId, Dem_DTCFormatType DTCFormat);
Sets a freeze frame record filter.
function Dem_GetNextFilteredRecord [SWS_Dem_00224] 📄 PDF
Std_ReturnType Dem_GetNextFilteredRecord (uint8 ClientId, uint32* DTC, uint8* RecordNumber);
Gets the next freeze frame record number and its associated DTC stored in the event memory. The interface has an asynchronous behavior, because NvRAM access might be required.
function Dem_GetDTCByOccurrenceTime [SWS_Dem_00218] 📄 PDF
Std_ReturnType Dem_GetDTCByOccurrenceTime (uint8 ClientId, Dem_DTCRequestType DTCRequest, uint32* DTC);
Gets the DTC by occurrence time. There is no explicit parameter for the DTC-origin as the origin always is DEM_DTC_ORIGIN_PRIMARY_MEMORY.
function Dem_DisableDTCRecordUpdate [SWS_Dem_00233] 📄 PDF
Std_ReturnType Dem_DisableDTCRecordUpdate (uint8 ClientId);
Disables the event memory update of a specific DTC (only one at one time).
Usage and Flow
The asynchronous function Dem_DisableDTCRecordUpdate ([SWS_Dem_00233]) disables the update of the event memory for a DTC previously selected via Dem_SelectDTC ([SWS_Dem_01253]). The objective of this call is to protect the event-related data of the selected fault in the respective DTCOrigin from being overwritten or cleared, in order to ensure subsequent consistent read accesses to freeze frame data and extended data records ([SWS_Dem_00270]). The calling module instance is identified via the parameter ClientId ([SWS_Dem_00233]).
Return Values and Error Handling
The function indicates the processing status via specific return values ([SWS_Dem_00233]):
E_OK: Update of the event memory was successfully disabled.DEM_PENDING: The disabling is performed asynchronously; the caller must call the function again at a later time.DEM_BUSY: Another operation dependent onDem_SelectDTCis already in progress for this client.E_NOT_OK: No DTC was selected in advance.DEM_WRONG_DTC: The selected DTC does not exist in the selected format, or a DTC group was selected impermissibly.DEM_WRONG_DTCORIGIN: The specified origin (DTCOrigin) does not exist.
Concurrency and Limitations
Dem_DisableDTCRecordUpdate is reentrant for calls with different ClientId, but not reentrant for the same ClientId ([SWS_Dem_00233]). The update can only be disabled for exactly one DTC at a time ([SWS_Dem_00233]). After reading out the diagnostic data, the update of the record must be released again via Dem_EnableDTCRecordUpdate ([SWS_Dem_00234], [SWS_Dem_00270]).
This usage note was generated automatically based on the AUTOSAR specification.
Implementer's Guide to follow (complexity I1)
function Dem_EnableDTCRecordUpdate [SWS_Dem_00234] 📄 PDF
Std_ReturnType Dem_EnableDTCRecordUpdate (uint8 ClientId);
Enables the event memory update of the DTC disabled by Dem_DisableDTCRecordUpdate() before. Note: As the call to Dem_EnableDTCRecordUpdate is the last action in the sequence of disabling/enabling a DTC, the caller is not interested in the return value. Therefore E_OK should be returned even if the DTC is enabled asynchronously.
The asynchronous function Dem_EnableDTCRecordUpdate ([SWS_Dem_00234]) serves to release the event memory update for a previously locked DTC. According to [SWS_Dem_00271], the function re-releases the DTC currently protected by Dem_DisableDTCRecordUpdate so that its data can be updated again in the DEM.
As a passed parameter, the function expects the ClientId, which uniquely identifies the instance of the calling module ([SWS_Dem_00234]). Since the call of Dem_EnableDTCRecordUpdate represents the concluding action in the sequence of disabling and enabling a DTC, the caller is not interested in the actual return value; therefore, according to [SWS_Dem_00234], E_OK shall be returned even in the case of an asynchronous release.
Regarding error handling and return values, the following statuses are defined ([SWS_Dem_00234]):
E_OK: Updating of the DTC record was successfully enabled.E_NOT_OK: No DTC is selected.
Regarding concurrency and constraints, Dem_EnableDTCRecordUpdate is reentrant for calls with different client IDs, but not reentrant for the same ClientId ([SWS_Dem_00234]).
This usage note was generated by an AI based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I1)
function Dem_GetSizeOfExtendedDataRecordSelection [SWS_Dem_00240] 📄 PDF
Std_ReturnType Dem_GetSizeOfExtendedDataRecordSelection (uint8 ClientId, uint32* SizeOfExtendedDataRecord);
Gets the size of Extended Data Record by DTC selected by the call of Dem_SelectExtended DataRecord.
function Dem_GetSizeOfFreezeFrameSelection [SWS_Dem_00238] 📄 PDF
Std_ReturnType Dem_GetSizeOfFreezeFrameSelection (uint8 ClientId, uint32* SizeOfFreezeFrame);
Gets the size of freeze frame data by DTC selected by the call of Dem_SelectFreezeFrame Data.
function Dem_GetNextExtendedDataRecord [SWS_Dem_00239] 📄 PDF
Std_ReturnType Dem_GetNextExtendedDataRecord (uint8 ClientId, uint8* DestBuffer, uint16* BufSize);
Gets extended data record for the DTC selected by Dem_SelectExtendedDataRecord. The function stores the data in the provided DestBuffer.
function Dem_GetNextFreezeFrameData [SWS_Dem_00236] 📄 PDF
Std_ReturnType Dem_GetNextFreezeFrameData (uint8 ClientId, uint8* DestBuffer, uint16* BufSize);
Gets freeze frame data by the DTC selected by Dem_SelectFreezeFrameData. The function stores the data in the provided DestBuffer.
function Dem_SelectExtendedDataRecord [SWS_Dem_91017] 📄 PDF
Std_ReturnType Dem_SelectExtendedDataRecord (uint8 ClientId, uint8 ExtendedDataNumber);
Sets the filter to be used by Dem_GetNextExtendedDataRecord and Dem_GetSizeOfExtended DataRecordSelection.
The asynchronous function Dem_SelectExtendedDataRecord initializes the filter for reading extended diagnostic data of a DTC previously defined with Dem_SelectDTC [SWS_Dem_91017] [SWS_Dem_01253]. It initiates the internal selection process in the assigned event memory of the client [SWS_Dem_01273] and defines the target record for subsequent queries via Dem_GetSizeOfExtendedDataRecordSelection and Dem_GetNextExtendedDataRecord [SWS_Dem_01272].
The following specifications apply to parameterization and sequence:
- Parameters: In addition to specific record numbers,
ExtendedDataNumberaccepts the values0xFE(overall size of all OBD records) and0xFF(overall size of all records) [SWS_Dem_91017]. To avoid data inconsistencies during reading, the record can be protected beforehand withDem_DisableDTCRecordUpdate[SWS_Dem_00270]. - Return values and errors: Upon successful selection,
E_OKis returned [SWS_Dem_91017]. This also applies when a valid record number is requested for which no entry is stored; in this case, subsequent reading returns buffer size 0 [SWS_Dem_00631]. If not a single fault code but a DTC group was selected viaDem_SelectDTC, or if the DTC does not exist, the call fails withDEM_WRONG_DTC[SWS_Dem_91017] [SWS_Dem_01349]. If the memory location does not exist,DEM_WRONG_DTCORIGINis reported [SWS_Dem_91017]. - Concurrency: If selection is still in progress,
DEM_PENDINGsignals the need for a recall [SWS_Dem_91017]. The statusDEM_BUSYindicates that another DTC-dependent operation is still active for thisClientId[SWS_Dem_91017]. The function is reentrant for differentClientIdvalues, but not reentrant for the same instance [SWS_Dem_91017].
This usage note was generated automatically based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I2)
function Dem_SelectFreezeFrameData [SWS_Dem_91015] 📄 PDF
Std_ReturnType Dem_SelectFreezeFrameData (uint8 ClientId, uint8 RecordNumber);
Sets the filter to be used by Dem_GetNextFreezeFrameData and Dem_GetSizeOfFreezeFrame Selection.
Usage and Semantics
The asynchronous function Dem_SelectFreezeFrameData sets the filter for subsequent reading of freeze frame data via Dem_GetSizeOfFreezeFrameSelection and Dem_GetNextFreezeFrameData [SWS_Dem_91015], [SWS_Dem_01268]. The calling module instance is identified via the parameter ClientId, while RecordNumber specifies the snapshot record number according to ISO 14229-1; here, 0xFF stands for all snapshot records of the DTC and 0x00 for the DTC-specific WWH-OBD snapshot [SWS_Dem_91015]. The call initiates the internal selection in the assigned event memory [SWS_Dem_01269].
Return Values and Error Handling
If the selection process was successfully initiated, the function returns E_OK [SWS_Dem_91015]. If the selection is still in progress, DEM_PENDING signals that the caller must call the function again at a later point in time [SWS_Dem_91015]. If another dependent operation is already active for the client, the API returns DEM_BUSY [SWS_Dem_91015], [SWS_Dem_01253]. If the target DTC does not exist in the requested format, or if a DTC group was selected via Dem_SelectDTC instead of a single DTC, DEM_WRONG_DTC is returned [SWS_Dem_91015], [SWS_Dem_01348]. An invalid memory location results in DEM_WRONG_DTCORIGIN [SWS_Dem_91015]. If dependent read functions are called without prior selection, the DEM reports a DET error [SWS_Dem_01270], [SWS_Dem_01271].
Sequence and Concurrency
The function is reentrant for different callers (ClientId), but not reentrant for the same client [SWS_Dem_91015]. A mandatory prerequisite is the prior call of Dem_SelectDTC to define the target DTC and the memory location [SWS_Dem_01253]. To ensure consistent reading, Dem_DisableDTCRecordUpdate can be called to protect the event-related data against modifications or deletion [SWS_Dem_00270].
This usage note was generated automatically by an AI based on the specification.
Implementer's Guide to follow (complexity I2)
function Dem_GetNumberOfFreezeFrameRecords [SWS_Dem_91191] 📄 PDF
Std_ReturnType Dem_GetNumberOfFreezeFrameRecords (uint8 ClientId, uint16* NumberOfFilteredRecords);
This function returns the number of all freeze frame records currently stored in the primary event memory
function Dem_DisableDTCSetting [SWS_Dem_00242] 📄 PDF
Std_ReturnType Dem_DisableDTCSetting (uint8 ClientId);
Disables the DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client.
Usage and Semantics
The function Dem_DisableDTCSetting disables DTC setting for all diagnostic events that are assigned to the DemEventMemorySet of the calling client [SWS_Dem_00242], [SWS_Dem_01290]. The call is asynchronous and requires passing a unique ClientId [SWS_Dem_00242]. In addition to successful completion via E_OK, the return value DEM_PENDING signals that the operation is still in progress; in this case, the caller must call the function again at a later time [SWS_Dem_00242].
Functional Impacts
When Dem_DisableDTCSetting is called, the DEM prevents the storage of the associated events as well as the updating of the UDS status bytes [SWS_Dem_00079]. If the configuration parameter DemDebounceBehavior is additionally set to DEM_DEBOUNCE_RESET, the call also causes the corresponding fault detection counters to be reset [SWS_Dem_00677].
Concurrency and Limitations
The function is reentrant for calls with different client IDs, but not reentrant for the same ClientId [SWS_Dem_00242]. The disabling affects only events and UDS status bytes of the DemEventMemorySet referenced by the ClientId; DTCs outside this memory area are not affected [SWS_Dem_01290].
This usage note is based on the requirements of the AUTOSAR specification.
Implementer's Guide to follow (complexity I1)
function Dem_EnableDTCSetting [SWS_Dem_00243] 📄 PDF
Std_ReturnType Dem_EnableDTCSetting (uint8 ClientId);
(Re)-Enables the DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client.
The asynchronous function Dem_EnableDTCSetting enables or re-enables DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client [SWS_Dem_00243]. Upon call, the unique identifier ClientId of the calling module instance is passed [SWS_Dem_00243].
The following return values are defined [SWS_Dem_00243]:
E_OK: The operation was completed successfully.DEM_PENDING: The process is performed asynchronously; the caller must call the function again at a later time.
Regarding concurrency, Dem_EnableDTCSetting is reentrant for different ClientId values, but must not be called concurrently for the same ClientId [SWS_Dem_00243].
In interaction with event processing, the function ensures that the DEM enables the storage of the associated events and the UDS status byte [SWS_Dem_00080]. If DTC setting is enabled again for the events, Dem_EnableDTCSetting triggers the callback function InitMonitorForEvent of the affected events with parameter InitMonitorReason set to DEM_INIT_MONITOR_REENABLED [SWS_Dem_00682].
This text was generated by an AI and serves for guidance. Only the specifications of the respective AUTOSAR releases are binding.
Implementer's Guide to follow (complexity I1)
function Dem_DcmGetInfoTypeValue08 [SWS_Dem_00316] 📄 PDF
Std_ReturnType Dem_DcmGetInfoTypeValue08 (Dcm_OpStatusType OpStatus, uint8* Iumprdata08, uint8* Iumprdata08BufferSize);
Service is used for requesting IUMPR data according to InfoType $08. This interface is derived from the prototype
use
The synchronous function Dem_DcmGetInfoTypeValue08 ([SWS_Dem_00316]) is called by the DCM to query IUMPR data (In-Use Monitor Performance Ratio) for InfoType $08 as part of OBD service $09 ([SWS_Dem_00298]). Since processing is synchronous, the DCM exclusively passes the value DCM_INITIAL for the parameter OpStatus ([SWS_Dem_00316]). The payload data as well as the number of data elements according to ISO-15031-5 are written into the buffer Iumprdata08 provided by the DCM; the maximum writable buffer size is specified via the inout parameter Iumprdata08BufferSize ([SWS_Dem_00316]).
Error handling
The function always returns E_OK as its return value ([SWS_Dem_00316]). Specific error codes or development error notifications (DET) are not specified for this call.
Concurrency and Configuration
The interface is non-reentrant (Non Reentrant) and declared via Dem_Dcm.h ([SWS_Dem_00316]). It exists exclusively in OBD-relevant ECUs with active OBD support (DemOBDSupport != DEM_OBD_NO_OBD_SUPPORT) ([SWS_Dem_00316]) and is provided when DemOBDEngineType is configured to DEM_IGNITION_SPARK for spark ignition engines ([SWS_Dem_00357]).
Interaction
Suppressed fault codes (suppressed DTCs) must not be visible during the query and are to be treated as if the filter does not match ([SWS_Dem_01101]). Together with Dem_DcmGetInfoTypeValue0B, the function serves to support data requests in service $09 ([SWS_Dem_00298]).
This usage note was created automatically based on the AUTOSAR CP R20-11 specification.
Implementer's Guide to follow (complexity I2)
function Dem_DcmGetInfoTypeValue0B [SWS_Dem_00317] 📄 PDF
Std_ReturnType Dem_DcmGetInfoTypeValue0B (Dcm_OpStatusType OpStatus, uint8* Iumprdata0B, uint8* Iumprdata0BBufferSize);
Service is used for requesting IUMPR data according to InfoType $0B. This interface is derived from the prototype
Usage and Parameter Interface
The synchronous function Dem_DcmGetInfoTypeValue0B (service ID 0x6c, available via Dem_Dcm.h) serves the DCM to query IUMPR data (In-Use Performance Ratio) according to InfoType $0B within the scope of OBD service $09 [SWS_Dem_00317] [SWS_Dem_00298]. The function interface is derived from the DCM prototype <Module>_GetInfotypeValueData(), which is why it uses Dcm_OpStatusType and Std_ReturnType [SWS_Dem_00317]:
OpStatus(in): Since the function exhibits synchronous behavior, only the stateDCM_INITIALoccurs upon invocation [SWS_Dem_00317].Iumprdata0BBufferSize(inout): Defines the maximum number of data bytes that may be written into the buffer [SWS_Dem_00317].Iumprdata0B(out): A buffer provided by the DCM that accommodates the number of data elements according to ISO-15031-5 and the contents of InfoType $0B [SWS_Dem_00317].
E_OK is always returned as the return value [SWS_Dem_00317].
Error Handling and Concurrency
Specific error codes or error responses (such as DET notifications) are not defined in the specification for this function; formally, the call always returns E_OK [SWS_Dem_00317]. The API is classified as non-reentrant (Non Reentrant) [SWS_Dem_00317]. Therefore, the caller (DCM) presumably must not execute this service concurrently for multiple diagnostic requests in parallel. Question Q-636518c23ec3801a (open)
Configuration dependency and interaction
The API exists exclusively in OBD-relevant ECUs for which the configuration parameter DemOBDSupport is configured not equal to DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_00317]. Furthermore, it is provided when DemOBDEngineType is set to DEM_IGNITION_COMPRESSION [SWS_Dem_00358]. In interaction with DTC suppression, suppressed DTCs are invisible to this query function and must be treated as if the filter does not match [SWS_Dem_01101].
This text was created by an AI; the guidelines require review by the user against the AUTOSAR specification.
Implementer's Guide to follow (complexity I2)
function Dem_DcmReadDataOfPID01 [SWS_Dem_00318] 📄 PDF
Std_ReturnType Dem_DcmReadDataOfPID01 (uint8* PID01value);
Service to report the value of PID $01 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
The synchronous function Dem_DcmReadDataOfPID01 serves to pass the content of OBD parameter PID $01 calculated by the DEM to the DCM [SWS_Dem_00318]. The interface is declared in header file Dem_Dcm.h and is available exclusively in OBD-relevant ECUs in which DemOBDSupport is not set to DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_00318].
Via output parameter PID01value, the DCM passes a pointer to the destination buffer into which the DEM writes the data [SWS_Dem_00318]. The DCM is responsible for providing this buffer with sufficient size; sizing is performed during configuration based on the largest occurring PID for setting up PIDBuffer [SWS_Dem_00318].
The function is implemented as non-reentrant (Non Reentrant) [SWS_Dem_00318]. The return value is always E_OK, as an error condition with E_NOT_OK never occurs according to the specification [SWS_Dem_00318].
In interaction with fault queries, suppressed DTCs must not be visible to Dem_DcmReadDataOfPID01 [SWS_Dem_01101]. The DEM must treat suppressed DTCs during evaluation as if the filter does not match [SWS_Dem_01101].
Note: This documentation was generated automatically by an AI system based on the AUTOSAR Classic R20-11 specification.
Implementer's Guide to follow (complexity I1)
function Dem_DcmReadDataOfPID1C [SWS_Dem_00325] 📄 PDF
Std_ReturnType Dem_DcmReadDataOfPID1C (uint8* PID1Cvalue);
Service to report the value of PID $1C computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
Usage and Call Context
The function Dem_DcmReadDataOfPID1C provides a synchronous service of the Diagnostic Event Manager via which the Diagnostic Communication Module (DCM) queries the calculated content of OBD PID $1C [SWS_Dem_00325].
-
Parameters: Via the output parameter
PID1Cvalue(pointer touint8), the DEM writes the data into a buffer of the DCM. The required buffer size is dimensioned during configuration of the DCM based on the largest PID in order to provide a suitablePIDBuffer[SWS_Dem_00325]. -
Return value: The service always returns the status value
E_OK. An error case withE_NOT_OKnever occurs according to the specification [SWS_Dem_00325].
Technical Content and Interaction
According to [SWS_Dem_00748], the interface returns the OBD requirements to which the vehicle or the engine is certified (for example OBD, OBDII, or JOBD). The value to be output in PID1Cvalue is defined via the configuration parameter DemOBDCompliancy [SWS_Dem_00325] [SWS_Dem_00748].
Concurrency and Availability
The function is specified as non-reentrant (Non Reentrant) [SWS_Dem_00325]. It is declared in the header file Dem_Dcm.h and is available exclusively in ECUs with active OBD support where DemGeneral.DemOBDSupport is not set to DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_00325].
This usage note was generated automatically based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I1)
function Dem_DcmReadDataOfPID21 [SWS_Dem_00319] 📄 PDF
Std_ReturnType Dem_DcmReadDataOfPID21 (uint8* PID21value);
Service to report the value of PID $21 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
The synchronous function Dem_DcmReadDataOfPID21 (service ID 0x64) serves the Diagnostic Communication Manager (DCM) to query the current value of the OBD parameter PID $21 calculated by the DEM [SWS_Dem_00319], [SWS_Dem_01098]. The interface is declared via the header Dem_Dcm.h and is available exclusively in ECUs with OBD relevance, provided that the configuration parameter DemOBDSupport is not set to DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_00319].
The following provisions apply to usage and operational interaction:
- Buffer provision: The pointer
PID21valueis passed as an output parameter [SWS_Dem_00319]. The caller (DCM) must provide this buffer and dimensions it during configuration to match the largest configured PID [SWS_Dem_00319]. When called, the DEM writes the current value of PID $21 into this buffer [SWS_Dem_01098]. - Return value: The function always returns
E_OK, as an error value such asE_NOT_OKnever occurs according to the specification [SWS_Dem_00319]. - Initial state / error handling: If
Dem_DcmReadDataOfPID21is called before values have been set viaDem_SetDataOfPID21, the DEM returns the replacement value0xFFFFas the content of PID $21 [SWS_Dem_01099]. - Concurrency: The function is specified as non-reentrant (Non Reentrant) [SWS_Dem_00319]. Concurrent calls by multiple contexts are therefore impermissible.
This usage note was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function Dem_DcmReadDataOfPID30 [SWS_Dem_00320] 📄 PDF
Std_ReturnType Dem_DcmReadDataOfPID30 (uint8* PID30value);
Service to report the value of PID $30 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
The synchronous function Dem_DcmReadDataOfPID30 serves to pass the data content of the parameter PID $30 calculated by the DEM to the DCM [SWS_Dem_00320]. It is declared via the header file Dem_Dcm.h and is available exclusively in ECUs with OBD relevance if the configuration parameter DemOBDSupport is not equal to DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_00320].
The following provisions apply to the use of the interface:
- Passed parameters: Via the output parameter
PID30value, the caller provides a buffer into which the DEM writes the calculated data of PID $30 [SWS_Dem_00320]. The DCM is responsible for providing this buffer in a suitable size; the DCM determines the dimensioning during configuration based on the largest PID [SWS_Dem_00320]. - Return value and error handling: The interface always returns
E_OKasStd_ReturnType[SWS_Dem_00320]. According to the specification, the error valueE_NOT_OKnever occurs, and no specific error codes or dedicated error handling routines are provided [SWS_Dem_00320]. - Concurrency: The function is defined as non-reentrant (
Non Reentrant) [SWS_Dem_00320]. Since the specification does not provide for internal synchronization mechanisms, the caller is likely responsible for preventing conflicting calls [SWS_Dem_00320]. Question Q-976bc8dc189021a1 (open)
This usage note was generated by an AI based on the AUTOSAR Classic R20-11 specification.
function Dem_DcmReadDataOfPID31 [SWS_Dem_00321] 📄 PDF
Std_ReturnType Dem_DcmReadDataOfPID31 (uint8* PID31value);
Service to report the value of PID $31 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} == DEM_OBD_MASTER_ECU)
The synchronous function Dem_DcmReadDataOfPID31 serves to pass the value of the OBD parameter PID $31 calculated by the DEM to the DCM [SWS_Dem_00321]. The interface is provided via the header file Dem_Dcm.h and has the service ID 0x66 [SWS_Dem_00321].
Usage and Parameters
The call is synchronous and is defined as non-reentrant [SWS_Dem_00321]:
- PID31value (output parameter): Pointer to a buffer (
uint8*) that receives the calculated data for PID $31 [SWS_Dem_00321]. Providing the buffer in an appropriate size is the responsibility of the calling DCM; it determines the required buffer size during configuration based on the largest PID to dimension aPIDBuffer[SWS_Dem_00321]. - Return value: The service always returns
E_OKasStd_ReturnType; according to the specification, the error valueE_NOT_OKnever occurs [SWS_Dem_00321].
Restrictions and Configuration
The API is intended exclusively for OBD-relevant ECUs [SWS_Dem_00321]. It is only available if the configuration parameter DemGeneral.DemOBDSupport is set to the value DEM_OBD_MASTER_ECU [SWS_Dem_00321]. Since the function is non-reentrant, parallel calls by the DCM must not occur [SWS_Dem_00321].
This usage note was generated automatically and is based exclusively on the specification data from release R20-11.
function Dem_DcmReadDataOfPID41 [SWS_Dem_00322] 📄 PDF
Std_ReturnType Dem_DcmReadDataOfPID41 (uint8* PID41value);
Service to report the value of PID $41 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
The synchronous function Dem_DcmReadDataOfPID41 serves to pass the content of PID $41 calculated by the DEM to the DCM [SWS_Dem_00322]. It is declared via the header Dem_Dcm.h and has the service ID 0x67 [SWS_Dem_00322].
Usage and Parameters
The call is synchronous and specified as non-reentrant (Non Reentrant) [SWS_Dem_00322]. As an output parameter, the interface expects the pointer PID41value (uint8*):
PID41valuereceives the calculated data of PID $41 [SWS_Dem_00322].- The buffer must be provided in an appropriate size by the DCM; for this purpose, the DCM already determines the required size for configuring the
PIDBufferbased on the largest occurring PID during configuration [SWS_Dem_00322].
Return Values and Error Handling
As a return value, the function always returns E_OK, as an error value E_NOT_OK never occurs according to the specification [SWS_Dem_00322]. Specific error codes or error responses are not provided for this interface [SWS_Dem_00322].
Configuration Dependency and Availability
The API is required exclusively in OBD-relevant ECUs [SWS_Dem_00322]. It is only available if the configuration parameter DemOBDSupport in DemGeneral is configured not equal to DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_00322].
This text was created by an AI and is based exclusively on specification R20-11.
function Dem_DcmReadDataOfPID4D [SWS_Dem_00323] 📄 PDF
Std_ReturnType Dem_DcmReadDataOfPID4D (uint8* PID4Dvalue);
Service to report the value of PID $4D computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} == DEM_OBD_MASTER_ECU)
Usage and Call Context
The synchronous function Dem_DcmReadDataOfPID4D serves to transmit the value of the OBD parameter PID $4D calculated by the DEM to the DCM [SWS_Dem_00323]. The service is provided via the header Dem_Dcm.h with service ID 0x68 [SWS_Dem_00323].
The output pointer PID4Dvalue serves as the sole passed parameter, pointing to a destination buffer provided by the DCM [SWS_Dem_00323]. The DCM provides this buffer with an appropriate size by already determining the required size for the PIDBuffer based on the largest occurring PID during configuration [SWS_Dem_00323].
Return Values and Error Handling
The function has the return type Std_ReturnType and returns E_OK without exception [SWS_Dem_00323]. A return value of E_NOT_OK is precluded according to the specification and never occurs [SWS_Dem_00323]. Special error handling or specific error codes do not exist for this call.
Concurrency and Configuration Dependency
The interface is declared as non-reentrant (Non Reentrant) and therefore must not be executed concurrently [SWS_Dem_00323].
In addition, the function is required exclusively in OBD-relevant ECUs [SWS_Dem_00323]. It is only available if, in the configuration, the parameter DemOBDSupport within DemGeneral is set to the value DEM_OBD_MASTER_ECU [SWS_Dem_00323].
This usage note is based on the specification of the Diagnostic Event Manager in AUTOSAR CP R20-11.
function Dem_DcmReadDataOfPID4E [SWS_Dem_00324] 📄 PDF
Std_ReturnType Dem_DcmReadDataOfPID4E (uint8* PID4Evalue);
Service to report the value of PID $4E computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} == DEM_OBD_MASTER_ECU)
The synchronous function Dem_DcmReadDataOfPID4E serves to transmit the content of the OBD parameter ID PID $4E calculated by the DEM to the DCM [SWS_Dem_00324]. The function has the service ID 0x69 and is declared via the header file Dem_Dcm.h [SWS_Dem_00324].
Invocation and Buffer Management
The call is synchronous and is defined as non-reentrant (Non Reentrant) [SWS_Dem_00324]. As an output parameter, the function accepts the pointer PID4Evalue (type uint8*), via which the DEM stores the calculated data [SWS_Dem_00324]. The calling DCM must provide a buffer of suitable size for this purpose [SWS_Dem_00324]. The DCM determines the required buffer size during configuration based on the largest occurring PID in order to dimension the shared PIDBuffer accordingly [SWS_Dem_00324].
Return Values and Error Handling
The interface always returns E_OK of type Std_ReturnType, as the return value E_NOT_OK never occurs according to the specification [SWS_Dem_00324]. No specific error codes for an error case and no DET or DEM error notifications are designated in the specification scope [SWS_Dem_00324].
Restrictions and Availability
The API is required exclusively in OBD-relevant ECUs [SWS_Dem_00324]. Its availability is bound to the configuration condition DemGeneral.DemOBDSupport == DEM_OBD_MASTER_ECU; in other configurations, the function is not available [SWS_Dem_00324].
This text was created by an AI; it does not replace studying the AUTOSAR specification.
function Dem_DcmReadDataOfPID91 [SWS_Dem_01187] 📄 PDF
Std_ReturnType Dem_DcmReadDataOfPID91 (uint8* PID91value);
Service to report the value of PID $91 computed by the Dem. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
The synchronous function Dem_DcmReadDataOfPID91 (service ID 0x6a) serves to pass the data of OBD parameter PID $91 calculated by the DEM to the DCM [SWS_Dem_01187]. The interface is declared via the header Dem_Dcm.h and is exclusively available in OBD-relevant ECUs where DemOBDSupport is not configured to DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_01187].
As output parameter, the function requires the pointer PID91value, which points to a buffer provided by the DCM [SWS_Dem_01187]. The DCM is responsible for providing this buffer in an appropriate size; the required size is already determined during configuration based on the largest PID in order to allocate the buffer PIDBuffer [SWS_Dem_01187].
The function is specified as non-reentrant (Non Reentrant) and must be processed synchronously [SWS_Dem_01187]. A parallel call from different contexts is therefore inadmissible. An error return value does not exist: as Std_ReturnType, the function always returns E_OK, since according to the specification the error value E_NOT_OK never occurs [SWS_Dem_01187].
This usage note was generated automatically and is based exclusively on the specification data of AUTOSAR Classic R20-11.
function Dem_DcmReadDataOfOBDFreezeFrame [SWS_Dem_00327] 📄 PDF
Std_ReturnType Dem_DcmReadDataOfOBDFreezeFrame (uint8 PID, uint8 DataElementIndexOfPID, uint8* DestBuffer, uint16* BufSize);
Gets data element per PID and index of the most important freeze frame being selected for the output of service $02. The function stores the data in the provided DestBuffer. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
The synchronous function Dem_DcmReadDataOfOBDFreezeFrame reads data of a data element for a PID for the most important freeze frame selected for output of OBD service $02 [SWS_Dem_00327].
Call Context and Parameters
The call is performed by the DCM via the header Dem_Dcm.h [SWS_Dem_00327]. The following parameters are passed to the function:
PID: Identifier of the PID according to ISO 15031-5 [SWS_Dem_00327].DataElementIndexOfPID: Zero-based, consecutive index of the data element within the PID. The sequence is derived directly from the position of the data elements in the PID layout of the DCM configuration [SWS_Dem_00327], [SWS_Dem_00597].DestBuffer: Pointer to the buffer into which the data element is written in hexadecimal raw format without header information [SWS_Dem_00327].BufSize: Serves as an input and output parameter; contains the maximum buffer capacity upon call and returns the number of actually written data bytes [SWS_Dem_00327].
Restrictions and Error Handling
The function is non-reentrant (Non Reentrant) and is available exclusively in ECUs with enabled OBD support (DemOBDSupport != DEM_OBD_NO_OBD_SUPPORT) [SWS_Dem_00327]. Upon successful data provision, E_OK is returned, otherwise E_NOT_OK [SWS_Dem_00327]. A suppressed DTC is not visible to this query function [SWS_Dem_01101]; presumably, the function returns E_NOT_OK in such a case. Question Q-09c77cdccc138247 (open)
This text was created by an AI; the referenced specification is authoritative.
Implementer's Guide to follow (complexity I1)
function Dem_DcmGetDTCOfOBDFreezeFrame [SWS_Dem_00624] 📄 PDF
Std_ReturnType Dem_DcmGetDTCOfOBDFreezeFrame (uint8 FrameNumber, uint32* DTC, Dem_DTCFormatType DTCFormat);
Gets DTC by freeze frame record number. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
The synchronous, non-reentrant function Dem_DcmGetDTCOfOBDFreezeFrame reads out the DTC for a specified freeze frame record number [SWS_Dem_00624]. It primarily serves the DCM for output within the scope of OBD service $02 (PID $02) to determine the DTC of the most relevant selected freeze frame [SWS_Dem_00623].
Call and Parameters
FrameNumber(IN): Unique identifier of the freeze frame record according to ISO 15031-5. The value0x00denotes the complete OBD freeze frame; further values are reserved [SWS_Dem_00624].DTCFormat(IN): Desired output format of the DTC value [SWS_Dem_00624].DTC(OUT): Pointer to the storage location for the determined fault code in OBD format [SWS_Dem_00624].
Return Values and Error Handling
The function returns E_OK if the DTC could be successfully determined. If no matching DTC is available, the call returns E_NOT_OK; in this case, output parameter DTC does not contain valid data [SWS_Dem_00624].
Conditions and Interaction
The interface is available via header Dem_Dcm.h and exists exclusively in ECUs with OBD support (configuration DemOBDSupport != DEM_OBD_NO_OBD_SUPPORT) [SWS_Dem_00624]. Suppressed DTCs (suppressed DTCs) are treated by the function as if there were no match and are not visible for this query [SWS_Dem_01101].
This text was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function Dem_DcmGetAvailableOBDMIDs [SWS_Dem_00766] 📄 PDF
Std_ReturnType Dem_DcmGetAvailableOBDMIDs (uint8 Obdmid, uint32* Obdmidvalue);
Reports the value of a requested "availability-OBDMID" to the DCM upon a Service $06 request. Derived from that the tester displays the supported tests a mechanic can select from. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
The synchronous and reentrant function Dem_DcmGetAvailableOBDMIDs (Service ID 0xa3) is called by the DCM to read out the value of a requested availability OBDMID within the scope of an OBD service $06 request [SWS_Dem_00766]. Via input parameter Obdmid (type uint8), the caller passes a standardized availability identifier such as $00, $20, or $40. The DEM reports the supported test identifiers back as bit-coded information via the 32-bit output pointer Obdmidvalue [SWS_Dem_00766]. From this data, the diagnostic tester derives which tests are displayed to workshop personnel for selection [SWS_Dem_00766].
The function is declared via header Dem_Dcm.h. It is intended exclusively for OBD-relevant ECUs and is available in the module only if configuration option DemGeneral.DemOBDSupport is set to not equal DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_00766].
Upon error-free transmission of the DTR availability, the interface returns E_OK [SWS_Dem_00766]. If the function is called before the DEM is fully initialized or after it has been shut down, error code DEM_E_UNINIT applies [SWS_Dem_00173]. Likewise, calls with an invalid pointer (DEM_E_PARAM_POINTER) or with faulty parameter values (DEM_E_PARAM_DATA) lead to development errors according to [SWS_Dem_00173]. In such error cases, E_NOT_OK is presumably returned as the return value. Question Q-b42d268116fb8df7 (open)
This usage note was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function Dem_DcmGetNumTIDsOfOBDMID [SWS_Dem_00767] 📄 PDF
Std_ReturnType Dem_DcmGetNumTIDsOfOBDMID (uint8 Obdmid, uint8* numberOfTIDs);
Gets the number of TIDs per (functional) OBDMID. This can be used by the DCM to iteratively request for OBD/TID result data within a loop from 0....numberOfTIDs-1 API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
The synchronous and reentrant function Dem_DcmGetNumTIDsOfOBDMID (service ID 0xa4) is declared via the header file Dem_Dcm.h [SWS_Dem_00767]. It serves the Diagnostic Communication Manager (DCM) to query, upon request, the number of assigned test identifiers (TIDs) for a specified functional OBDMID [SWS_Dem_00761].
Upon invocation, the DCM passes the identifier of the relevant OBDMID in input parameter Obdmid and receives the number of assigned TIDs back via pointer numberOfTIDs [SWS_Dem_00767]. This output value serves the DCM as the upper limit for a counting loop from 0 to numberOfTIDs - 1, in which the individual DTR result values, test results, and limit values are subsequently queried sequentially via Dem_DcmGetDTRData [SWS_Dem_00761] [SWS_Dem_00768].
The function returns return value E_OK if the number of TIDs could be determined successfully, and E_NOT_OK if the query fails [SWS_Dem_00767]. Specific development errors (DET) or detailed root causes for the error case are not separately identified in the specification.
The call is intended exclusively for OBD-relevant ECUs. The interface is only available in the DEM if configuration parameter DemOBDSupport is not set to DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_00767].
This usage note was generated by an AI and relies exclusively on the specification documents of AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I1)
function Dem_DcmGetDTRData [SWS_Dem_00768] 📄 PDF
Std_ReturnType Dem_DcmGetDTRData (uint8 Obdmid, uint8 TIDindex, uint8* TIDvalue, uint8* UaSID, uint16* Testvalue, uint16* Lowlimvalue, uint16* Upplimvalue);
Reports a DTR data along with TID-value, UaSID, test result with lower and upper limit. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
The synchronous and reentrant function Dem_DcmGetDTRData serves the Diagnostic Communication Manager (DCM) to retrieve DTR (Diagnostic Test Results) data including TID value, UaSID, and current test result with lower and upper limit [SWS_Dem_00768]. It is available exclusively in ECUs with OBD support when DemOBDSupport != DEM_OBD_NO_OBD_SUPPORT is configured [SWS_Dem_00768].
Usage and Interaction
The DCM calls the function to retrieve the available DTR data for a specific Obdmid and TIDindex [SWS_Dem_00762]. The query typically occurs iteratively via index TIDindex from 0 to numberOfTIDs - 1, with the total number being determined beforehand via Dem_DcmGetNumTIDsOfOBDMID() [SWS_Dem_00768], [SWS_Dem_00762]. Via the output parameters TIDvalue, UaSID, Testvalue, Lowlimvalue, and Upplimvalue, the values are provided for the tester response [SWS_Dem_00768].
Error Handling and Boundary Conditions
The function returns E_OK upon successful determination of the DTR results and E_NOT_OK in case of an error [SWS_Dem_00768]. An error occurs in particular if the referenced diagnostic event is not available:
- If an event is set as not available, it is treated like an unconfigured event and
Dem_DcmGetDTRDatafails [SWS_Dem_01108]. - If the function is called for a DTR whose event referenced via
DemDtrEventRefis configured withDemEventAvailable == FALSE, the DEM mandatorily returnsE_NOT_OK[SWS_Dem_01336]. In this case, all output parameters are undefined [SWS_Dem_01336].
This usage note was generated automatically based on the specification requirements.
Implementer's Guide to follow (complexity I1)
function Dem_J1939DcmSetDTCFilter [SWS_Dem_00970] 📄 PDF
Std_ReturnType Dem_J1939DcmSetDTCFilter (Dem_J1939DcmDTCStatusFilterType DTCStatusFilter, Dem_DTCKindType DTCKind, Dem_DTCOriginType DTCOrigin, uint8 ClientId, Dem_J1939DcmLampStatusType* LampStatus);
The function sets the DTC filter for a specific node and returns the composite lamp status of the filtered DTCs.
use
The synchronous function Dem_J1939DcmSetDTCFilter (service ID 0x90, declared in Dem_J1939Dcm.h) sets the filter mask attributes for selecting J1939 DTCs for a J1939 node addressed via ClientId [SWS_Dem_00970], [SWS_Dem_00855]. Status filter DTCStatusFilter (possible values: DEM_J1939DTC_ACTIVE, DEM_J1939DTC_PREVIOUSLY_ACTIVE, DEM_J1939DTC_PENDING, DEM_J1939DTC_PERMANENT, or DEM_J1939DTC_CURRENTLY_ACTIVE), functional group DTCKind, and source memory DTCOrigin serve as filter criteria [SWS_Dem_00970]. Via output parameter LampStatus, the call returns the current combined lamp status of the filtered DTCs [SWS_Dem_00970], [SWS_Dem_00857]. In addition, an internal counter is reset to the first matching event [SWS_Dem_00855]. Interpretation: The caller of the interface is likely the J1939Dcm module preparing diagnostic read operations. Question Q-5f25345851de686f (open)
Error Handling and Return Values
As return value, the function returns E_OK upon successful configuration of the filter, or E_NOT_OK if the filter could not be set [SWS_Dem_00970]. Suppressed DTCs are not covered by filtering and are treated as if the filter criterion does not match; they remain invisible for queries [SWS_Dem_01101].
Concurrency and Limitations
The function is reentrant for different ClientId values, but non-reentrant for the same ClientId [SWS_Dem_00970]. Concurrent filter calls on the same J1939 event memory must therefore be avoided.
Interaction
Setting the filter forms the basis for subsequent processing:
- determination of the number of matching fault paths via
Dem_J1939DcmGetNumberOfFilteredDTC[SWS_Dem_00855], [SWS_Dem_00874], [SWS_Dem_00972], - iterative readout of matching events via
Dem_J1939DcmGetNextFilteredDTC[SWS_Dem_00855], [SWS_Dem_00875], as well as - provision of the number of active or previously active DTCs for readiness messages (DM05) via
Dem_J1939DcmReadDiagnosticReadiness1[SWS_Dem_00909].
This usage note was generated automatically based on the specification AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I2)
function Dem_J1939DcmGetNumberOfFilteredDTC [SWS_Dem_00972] 📄 PDF
Std_ReturnType Dem_J1939DcmGetNumberOfFilteredDTC (uint16* NumberOfFilteredDTC, uint8 ClientId);
Gets the number of currently filtered DTCs set by the function Dem_J1939DcmSetDTCFilter.
The function [SWS_Dem_00972] asynchronously determines the number of J1939 DTCs that match the filter criteria previously defined with Dem_J1939DcmSetDTCFilter in the primary event memory of the passed ClientId ([SWS_Dem_00874]). A preceding call to Dem_J1939DcmSetDTCFilter is required, as it sets the filter mask attributes and resets the internal counter to the first event ([SWS_Dem_00855]).
The counting result is provided via the output parameter NumberOfFilteredDTC. The following rules apply to the sequence and return values:
- Success: As soon as the total number of matching DTCs has been completely determined, the function returns
E_OK([SWS_Dem_00874]). - Interruption: If the search process must be interrupted due to internal restrictions, the function returns
DEM_PENDING. In this case, the output parameter does not yet have to be valid; a subsequent call continues the determination after the interrupted element ([SWS_Dem_00874]). - Error codes: In addition, the specification provides for the status values
DEM_NO_SUCH_ELEMENTandDEM_BUFFER_TOO_SMALL([SWS_Dem_00972]).
With respect to visibility, [SWS_Dem_01101] specifies that suppressed DTCs must be treated as if the filter criterion does not match. The function is defined as non-reentrant ([SWS_Dem_00972]), which is why concurrent calls must be avoided.
This usage note was created by an AI and summarizes the core aspects of the AUTOSAR specification.
Implementer's Guide to follow (complexity I1)
function Dem_J1939DcmGetNextFilteredDTC [SWS_Dem_00973] 📄 PDF
Std_ReturnType Dem_J1939DcmGetNextFilteredDTC (uint32* J1939DTC, uint8* OccurenceCounter, uint8 ClientId);
Gets the next filtered J1939 DTC.
The asynchronous and non-reentrant function Dem_J1939DcmGetNextFilteredDTC (service ID 0x92) reads the next filtered J1939 DTC from the J1939 event memory addressed via ClientId [SWS_Dem_00973]. It is declared via header Dem_J1939Dcm.h [SWS_Dem_00973].
If the function finds an event that matches the filter criterion, it returns E_OK and provides the corresponding J1939DTC and the associated OccurenceCounter via the output parameters [SWS_Dem_00877], [SWS_Dem_00973]. If the occurrence counter is above 126 (0x7E), the returned value is fixedly capped at 126 (0x7E) [SWS_Dem_00877].
If the search process must be interrupted due to internal limitations or implementation details, the function returns DEM_PENDING [SWS_Dem_00877], [SWS_Dem_00973]. In this case, the output parameters contain no valid data; the next call resumes the search directly after the interrupted element [SWS_Dem_00877]. If no further matching element is present, the return value is DEM_NO_SUCH_ELEMENT; if the buffer is too small, DEM_BUFFER_TOO_SMALL is reported [SWS_Dem_00973].
Suppressed diagnostic events (suppressed DTCs) are not visible to the query function; they are treated by Dem_J1939DcmGetNextFilteredDTC as if the filter criterion does not match [SWS_Dem_01101].
This text was generated automatically by an AI and does not replace the official AUTOSAR specification.
Implementer's Guide to follow (complexity I1)
function Dem_J1939DcmFirstDTCwithLampStatus [SWS_Dem_00974] 📄 PDF
void Dem_J1939DcmFirstDTCwithLampStatus (uint8 ClientId);
The function sets the filter to the first applicable DTC for the DM31 response for a specific node.
use
The synchronous interface Dem_J1939DcmFirstDTCwithLampStatus initializes filtering to the first matching Diagnostic Trouble Code (DTC) for the DM31 response of a specific node [SWS_Dem_00974]. ClientId of type uint8 serves as the only input parameter, addressing the associated J1939 event memory [SWS_Dem_00974]. The function has neither input nor output parameters and provides no return value (void) [SWS_Dem_00974]. It is declared via header file Dem_J1939Dcm.h with service ID 0x93 [SWS_Dem_00974]. Interpretation: The function is likely called primarily by module J1939Dcm to initialize filtering before transmitting DM31 lamp status messages. Question Q-064513be4f06584b (open)
Filter Logic and Interaction
Each invocation of the function resets the internal counter to the first event to which a J1939DTC is assigned for the specified ClientId [SWS_Dem_00880]. Regarding the status of diagnostic events, the specification dictates that a suppressed DTC must remain invisible to DCM query functions [SWS_Dem_01101]. Accordingly, Dem_J1939DcmFirstDTCwithLampStatus treats suppressed DTCs as if the filter criterion were not fulfilled [SWS_Dem_01101].
Concurrency and Limitations
Regarding concurrency behavior, the interface is reentrant for calls with different ClientId values, but not reentrant for the same ClientId value [SWS_Dem_00974]. Parallel queries via identical client IDs to the same J1939 event memory are consequently impermissible.
This text was automatically generated by an AI curation assistant.
Implementer's Guide to follow (complexity I1)
function Dem_J1939DcmGetNextDTCwithLampStatus [SWS_Dem_00975] 📄 PDF
Std_ReturnType Dem_J1939DcmGetNextDTCwithLampStatus (Dem_J1939DcmLampStatusType* LampStatus, uint32* J1939DTC, uint8* OccurenceCounter, uint8 ClientId);
Gets the next filtered J1939 DTC for DM31 including current LampStatus.
Usage and Call Context
The function Dem_J1939DcmGetNextDTCwithLampStatus is executed synchronously and is non-reentrant ([SWS_Dem_00975]). Within the scope of J1939 diagnostic communication (DM31), it serves to iteratively query the next filtered J1939 DTC along with the associated lamp status and the event counter (OccurenceCounter) from the event memory addressed via ClientId ([SWS_Dem_00975]). The iteration requires that the event memory was previously prepared by Dem_J1939DcmFirstDTCwithLampStatus ([SWS_Dem_00881]).
Sequence and Return Values
Each call searches the memory for the next event with an assigned J1939 DTC ([SWS_Dem_00881]). Suppressed DTCs (suppressed DTC) are treated like non-matching events and skipped ([SWS_Dem_01101]).
-
E_OK: A matching event was found. The parametersLampStatus,J1939DTC, andOccurenceCountercontain valid values ([SWS_Dem_00882]). Interpretation: The conditionDEM_FILTERED_OKmentioned in the parameter specification is likely to refer toE_OK, asDEM_FILTERED_OKis not declared as a return value for this function ([SWS_Dem_00975]). Question Q-5284fb30b98babf6 (open) -
DEM_PENDING: The internal search had to be interrupted due to implementation limits. The output parameters do not contain valid data, and the next call continues the search after the interrupted element ([SWS_Dem_00882]). -
DEM_NO_SUCH_ELEMENT: No further matching events are present in memory; the output parameters are invalid ([SWS_Dem_00881]). -
DEM_BUFFER_TOO_SMALL: The passed buffer is too small ([SWS_Dem_00975]).
Lamp status and value range
To determine the lamp status, the DEM checks UDS status bit 7 (WarningIndicator) as well as the respective indicator reference: The Malfunction Indicator Lamp ([SWS_Dem_00883]), Red Stop Lamp ([SWS_Dem_00887]), and Amber Warning Lamp ([SWS_Dem_00891]) are each set to Lamp On if the bit is active and the reference is assigned; otherwise, they are Lamp Off. For counter values above 126 (0x7F), the OccurenceCounter is capped at exactly 126 ([SWS_Dem_00882]).
This usage note was generated automatically based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I2)
function Dem_J1939DcmClearDTC [SWS_Dem_00976] 📄 PDF
Std_ReturnType Dem_J1939DcmClearDTC (Dem_J1939DcmSetClearFilterType DTCTypeFilter, Dem_DTCOriginType DTCOrigin, uint8 ClientId);
Clears the status of all event(s) related to the specified DTC(s), as well as all associated event memory entries for these event(s).
use
The function Dem_J1939DcmClearDTC ([SWS_Dem_00976]) is provided to the J1939Dcm module via header Dem_J1939Dcm.h to clear all active or previously active diagnostic trouble codes (DTCs) from the event memory ([SWS_Dem_00878]). The invocation operates asynchronously. As input parameters, the interface expects filter type DTCTypeFilter to determine the DTCs to be cleared, DTCOrigin to select the source memory, and ClientId to address the J1939 event memory.
Error Handling and Return Values
The result of execution is signaled via return type Std_ReturnType:
E_OK: The deletion process completed successfully.DEM_PENDING: Clearing is in progress; the caller must call the function again at a later time.DEM_CLEAR_BUSY: Another client is performing a clear operation concurrently; the operation is not started and must be repeated later.DEM_WRONG_DTC: The selected DTC does not exist in the selected format, or clearing is restricted to groups by configuration.DEM_WRONG_DTCORIGIN: The specified source memory does not exist.DEM_CLEAR_FAILEDorDEM_CLEAR_MEMORY_ERROR: Clearing failed or an error occurred while clearing a memory area (e.g. in case of incomplete clearing of non-volatile memory).
Concurrency and Limitations
According to [SWS_Dem_00976], the function is reentrant for different Client IDs, but non-reentrant for the same ClientId. Parallel clear calls via identical clients are therefore not permitted.
Interaction
According to [SWS_Dem_00879], clearing resets the status of all affected events and removes the associated event memory entries. In addition, according to [SWS_Dem_00878], the clear operation triggers a re-initialization of the affected SW-Cs and BSW modules according to [SWS_Dem_00003].
This text was generated automatically based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function Dem_J1939DcmSetFreezeFrameFilter [SWS_Dem_00977] 📄 PDF
Std_ReturnType Dem_J1939DcmSetFreezeFrameFilter (Dem_J1939DcmSetFreezeFrameFilterType FreezeFrameKind, uint8 ClientId);
The function sets the FreezeFrame filter for a specific node.
The synchronous function Dem_J1939DcmSetFreezeFrameFilter serves to set the freeze frame filter for a specific node via the header Dem_J1939Dcm.h [SWS_Dem_00977]. It configures filter mask attributes for subsequent queries by means of Dem_J1939DcmGetNextFreezeFrame and thereby resets an internal counter to the first freeze frame [SWS_Dem_00899].
Parameters and Return Values
FreezeFrameKind: Determines the filter type [SWS_Dem_00977]. Available types areDEM_J1939DCM_FREEZEFRAME(filtering the data inDemJ1939FreezeFrameClassRef),DEM_J1939DCM_EXPANDED_FREEZEFRAME(filtering the data inDemJ1939ExpandedFreezeFrameClassRef), andDEM_J1939DCM_SPNS_IN_EXPANDED_FREEZEFRAME([SWS_Dem_00977], [SWS_Dem_00899]).ClientId: Passes the identifier for addressing the J1939 event memory [SWS_Dem_00977].- Return value: Returns
E_OKupon successful execution orE_NOT_OKif the filter could not be set [SWS_Dem_00977].
Concurrency and Validity
With respect to concurrency, the function is reentrant for different values of ClientId, but not reentrant for identical ClientId values [SWS_Dem_00977]. The set filter mask attributes remain in effect after the call until a new call to Dem_J1939DcmSetFreezeFrameFilter occurs or the DEM module is reinitialized [SWS_Dem_00899].
This text was generated by an AI based on the specification.
Implementer's Guide to follow (complexity I1)
function Dem_J1939DcmGetNextFreezeFrame [SWS_Dem_00978] 📄 PDF
Std_ReturnType Dem_J1939DcmGetNextFreezeFrame (uint32* J1939DTC, uint8* OccurenceCounter, uint8* DestBuffer, uint16* BufSize, uint8 ClientId);
Gets next freeze frame data. The function stores the data in the provided DestBuffer.
use
The asynchronous and non-reentrant function Dem_J1939DcmGetNextFreezeFrame incrementally reads freeze frame data for a specific event memory [SWS_Dem_00978]. The iteration is oriented towards the filter criteria FreezeFrameKind and ClientId previously set via Dem_J1939DcmSetFreezeFrameFilter [SWS_Dem_00900]. The payload is copied into buffer DestBuffer (in the case of expanded freeze frames without SPN information and with unused bits padded with 0), while BufSize passes the buffer size and reports back the byte quantity actually written [SWS_Dem_00978], [SWS_Dem_00903]. In addition, the call returns the associated J1939DTC and the OccurenceCounter, which is capped at 0x7F for values above 126 [SWS_Dem_00903].
Return Values and Error Handling
The return values control the flow of the iteration:
E_OK: A record was successfully found and transmitted [SWS_Dem_00978], [SWS_Dem_00903]. The mention ofDEM_FILTERED_OKin the parameter description should presumably be understood as an editorial synonym forE_OK. Question Q-e941066640c694b9 (open)DEM_NO_SUCH_ELEMENT: There are no further records that match the filter criteria [SWS_Dem_00900].DEM_PENDING: The internal search was interrupted; the subsequent call resumes the search at the interrupted location [SWS_Dem_00902].DEM_BUFFER_TOO_SMALLorDEM_FILTERED_BUFFER_TOO_SMALL: The buffer is insufficient; the operation aborts without data acceptance [SWS_Dem_00978], [SWS_Dem_00903].
If an unsupported filter type is passed, the function reports DET error DEM_E_WRONG_CONDITION; only DEM_J1939DCM_FREEZEFRAME and DEM_J1939DCM_EXPANDED_FREEZEFRAME are valid [SWS_Dem_00901]. As long as the return value is not equal to success, the output parameters contain no valid data [SWS_Dem_00978], [SWS_Dem_00900], [SWS_Dem_00902], [SWS_Dem_00903].
Restrictions and Interaction
Suppressed DTCs are ignored by the query and treated like non-matching filter criteria [SWS_Dem_01101].
This usage note was generated in an automated manner and relies exclusively on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I1)
function Dem_J1939DcmGetNextSPNInFreezeFrame [SWS_Dem_00979] 📄 PDF
Std_ReturnType Dem_J1939DcmGetNextSPNInFreezeFrame (uint32* SPNSupported, uint8* SPNDataLength, uint8 ClientId);
Gets next SPN.
Usage and Semantics
Function Dem_J1939DcmGetNextSPNInFreezeFrame incrementally reads the next SPN (Suspect Parameter Number) from the expanded freeze frame ([SWS_Dem_00979]). Each call iterates to the next element of the SPN definition for the event memory addressed via ClientId ([SWS_Dem_00904]). Upon successful retrieval, the call returns E_OK as well as the found SPN via SPNSupported and its data length via SPNDataLength ([SWS_Dem_00979], [SWS_Dem_00907]).
Asynchronous Processing and Return Values
The operation is specified as asynchronous ([SWS_Dem_00979]). If the search run must be interrupted due to internal restrictions, the function returns DEM_PENDING; in this case, the output parameters are not necessarily valid, and the subsequent call resumes the search at the interrupted location ([SWS_Dem_00905]). If no further SPNs are present in the definition, DEM_NO_SUCH_ELEMENT is reported, whereby the output parameters also do not have to be valid ([SWS_Dem_00904]). If the provided buffer is insufficient, the interface reports DEM_BUFFER_TOO_SMALL ([SWS_Dem_00979]).
Error Handling and Concurrency
If an unsupported freeze frame type is requested, the module triggers DET error DEM_E_WRONG_CONDITION; exclusively Dem_SPNsInExpandedFreezeFrame is valid ([SWS_Dem_00906]). Because the function is defined as non-reentrant ([SWS_Dem_00979]), it must not be called concurrently for the same context. Header file Dem_J1939Dcm.h provides the interface ([SWS_Dem_00979]).
This usage note was generated automatically based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I1)
function Dem_J1939DcmSetRatioFilter [SWS_Dem_00980] 📄 PDF
Std_ReturnType Dem_J1939DcmSetRatioFilter (uint16* IgnitionCycleCounter, uint16* OBDMonitoringConditionsEncountered, uint8 ClientId);
The function sets the Ratio filter for a specific node and returns the corresponding Ignition Cycle Counter and General Denominator.
The synchronous function Dem_J1939DcmSetRatioFilter sets the ratio filter for a specific J1939 node and initializes the filtering of IUMPR ratios according to [SWS_Dem_00980]. In doing so, it resets an internal counter to the first valid SPN with defined DemRatioId in order to prepare the subsequent step-by-step query via Dem_J1939DcmGetNextFilteredRatio [SWS_Dem_00912].
Via the output parameters, the function provides higher-level counter values:
IgnitionCycleCounter: Provides the ignition cycle counter according to SAE J1939-73 (chapter 5.7.20.1) [SWS_Dem_00912].OBDMonitoringConditionsEncountered: Provides the counter for occurred OBD monitoring conditions according to SAE J1939-73 (chapter 5.7.20.2), defined by CARB as General Denominator [SWS_Dem_00912].ClientId: Identifies the calling client for addressing the J1939 event memory [SWS_Dem_00980].
Regarding concurrency, the function is reentrant for different ClientId values, but not reentrant for the same ClientId [SWS_Dem_00980]. Interpretation: The call is likely to occur synchronously from the execution of the J1939 Diagnostic Communication Manager (J1939Dcm) in order to query IUMPR diagnostic data. Question Q-e577651b88f64132 (open) If the filter is set successfully, the function returns E_OK; if setting fails, E_NOT_OK is reported [SWS_Dem_00980].
In interaction with diagnostic events, suppressed DTCs must not be visible to query functions such as Dem_J1939DcmSetRatioFilter and must be treated as if the filter did not match [SWS_Dem_01101].
This usage note was generated automatically based on AUTOSAR R20-11.
Implementer's Guide to follow (complexity I1)
function Dem_J1939DcmGetNextFilteredRatio [SWS_Dem_00981] 📄 PDF
Std_ReturnType Dem_J1939DcmGetNextFilteredRatio (uint32* SPN, uint16* Numerator, uint16* Denominator, uint8 ClientId);
Gets the next filtered Ratio.
use
The synchronous and non-reentrant function Dem_J1939DcmGetNextFilteredRatio ([SWS_Dem_00981]) is used to iteratively read the next filtered IUMPR ratio. Via parameter ClientId, the respective J1939 event memory is addressed. Upon successful call, the function returns the Suspect Parameter Number as well as the numerator and denominator of the applicable system monitor via the output parameters SPN, Numerator, and Denominator ([SWS_Dem_00981]).
Sequence and Interaction
For correct iteration, the filter must be initialized in advance via Dem_J1939DcmSetRatioFilter ([SWS_Dem_00912]). This call resets an internal counter to the first valid SPN with defined DemRatioId, upon which subsequent calls of Dem_J1939DcmGetNextFilteredRatio build. A suppressed DTC is not visible to the query and is treated as if the filter did not match ([SWS_Dem_01101]).
Return Values and Error Handling
According to [SWS_Dem_00981], the following return values are defined:
E_OK: The operation was successful. Only in this case doSPN,Numerator, andDenominatorcontain valid data (the mention ofDEM_FILTERED_OKin the parameter description is likely an interpretation forE_OK). Question Q-57774bbc88fe3c0b (open)DEM_NO_SUCH_ELEMENT: No further matching element is present.DEM_PENDING: The operation was successful, but the result is still pending.DEM_BUFFER_TOO_SMALL: The passed buffer is too small.
Concurrency
Since the function is declared as non-reentrant ([SWS_Dem_00981]), it must not be called concurrently for the same ClientId.
This text was generated by an AI and serves as guidance. The referenced AUTOSAR specifications are authoritative.
Implementer's Guide to follow (complexity I1)
function Dem_J1939DcmReadDiagnosticReadiness [SWS_Dem_00982] 📄 PDF
Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness1 (Dem_J1939DcmDiagnosticReadiness1Type* DataValue, uint8 ClientId);
Service to report the value of Diagnostic Readiness 1 (DM05) computed by the Dem.
The synchronous interface Dem_J1939DcmReadDiagnosticReadiness1 (listed in the Classic standard under Dem_J1939DcmReadDiagnosticReadiness) serves to query the value of Diagnostic Readiness 1 (DM05) calculated by the Diagnostic Event Manager [SWS_Dem_00982]. It is declared via the header file Dem_J1939Dcm.h and has the service ID 0x9b [SWS_Dem_00982].
Usage and Parameters
The call is performed synchronously and uses the following function parameters [SWS_Dem_00982]:
ClientId(IN,uint8): Identifies the J1939 event memory to be addressed [SWS_Dem_00982].DataValue(OUT, pointer toDem_J1939DcmDiagnosticReadiness1Type): Points to an 8-byte buffer into which the DEM writes the calculated content of Diagnostic Readiness 1 (DM05) [SWS_Dem_00982].
Return Values and Error Handling
The function returns a status of type Std_ReturnType [SWS_Dem_00982]:
E_OK: The service was executed successfully and the readiness data was stored in the output buffer [SWS_Dem_00982].E_NOT_OK: The operation has failed [SWS_Dem_00982]. Specific error codes, DEM events, or DET messages are not designated in the function specification [SWS_Dem_00982].
Concurrency and Limitations
With respect to concurrent access, the service is specified as reentrant for different ClientIds, but expressly defined as non-reentrant for the same ClientId [SWS_Dem_00982].
This usage note was generated automatically based on AUTOSAR R20-11 specification data.
function Dem_J1939DcmReadDiagnosticReadiness [SWS_Dem_00983] 📄 PDF
Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness2 (Dem_J1939DcmDiagnosticReadiness2Type* DataValue, uint8 ClientId);
Service to report the value of Diagnostic Readiness 2 (DM21) computed by the Dem.
The synchronous function Dem_J1939DcmReadDiagnosticReadiness2 (service ID 0x9c) serves to query the value of Diagnostic Readiness 2 (DM21) calculated by the DEM [SWS_Dem_00983]. The interface is provided via the header file Dem_J1939Dcm.h [SWS_Dem_00983].
Two parameters are defined for the call [SWS_Dem_00983]:
ClientId(input): Addresses the respective J1939 event memory [SWS_Dem_00983].DataValue(output): Pointer to an 8-byte buffer of typeDem_J1939DcmDiagnosticReadiness2Typefor receiving the calculated DM21 data [SWS_Dem_00983].
As return value, the function provides Std_ReturnType; upon successful query, E_OK is returned, whereas in case of an error, E_NOT_OK is reported [SWS_Dem_00983]. Specific error causes are not identified separately; for E_NOT_OK, the caller is likely to have to assume that the buffer contains no valid data. Question Q-97b94d15a8634712 (open)
Regarding concurrency, the service is reentrant for different ClientId values, but not reentrant for the same ClientId [SWS_Dem_00983]. Concurrent calls for the same ClientId must therefore be serialized in the calling context.
This text was generated by an AI based on the AUTOSAR R20-11 specification.
function Dem_J1939DcmReadDiagnosticReadiness [SWS_Dem_00770] 📄 PDF
Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness3 (Dem_J1939DcmDiagnosticReadiness3Type* DataValue, uint8 ClientId);
Service to report the value of Diagnostic Readiness 3 (DM26) computed by the Dem.
The service Dem_J1939DcmReadDiagnosticReadiness (specified in the signature as Dem_J1939DcmReadDiagnosticReadiness3) serves to synchronously read out the Diagnostic Readiness 3 (DM26) data determined by the DEM [SWS_Dem_00770]. The declaration is provided via header file Dem_J1939Dcm.h [SWS_Dem_00770]. According to the interface name, the call is likely made primarily by the J1939Dcm module. Question Q-dc204541dfc23d6b (open)
The interface expects two parameters [SWS_Dem_00770]:
ClientId(in): Addresses the respective J1939 event memory [SWS_Dem_00770].DataValue(out): Pointer to an 8-byte buffer of typeDem_J1939DcmDiagnosticReadiness3Typefor receiving the calculated DM26 data [SWS_Dem_00770].
As a return value, the function returns E_OK if the operation was successful, or E_NOT_OK in case of an error during execution [SWS_Dem_00770].
With respect to concurrency, the function is reentrant for different values of ClientId, but not reentrant for identical ClientId values [SWS_Dem_00770]. Parallel calls for the same client must therefore be excluded or synchronized by the caller.
This text was generated by an AI based on the AUTOSAR specification R20-11.
function Dem_SetEventDisabled [SWS_Dem_00312] 📄 PDF
Std_ReturnType Dem_SetEventDisabled (Dem_EventIdType EventId);
Service for reporting the event as disabled to the Dem for the PID $41 computation. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
function Dem_RepIUMPRFaultDetect [SWS_Dem_00313] 📄 PDF
Std_ReturnType Dem_RepIUMPRFaultDetect (Dem_RatioIdType RatioID);
Service for reporting that faults are possibly found because all conditions are fullfilled. API is needed in OBD-relevant ECUs only API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
use
The synchronous function Dem_RepIUMPRFaultDetect serves to report that an OBD monitor has fulfilled all execution conditions and thus could have found potential faults [SWS_Dem_00313]. The interface is provided via header Dem.h and is available exclusively in ECUs with OBD support, provided DemOBDSupport is not configured to DEM_OBD_NO_OBD_SUPPORT [SWS_Dem_00313], [SWS_Dem_00360].
The identifier RatioID of type Dem_RatioIdType is passed as a parameter if the interface option “API” is selected [SWS_Dem_00313]. Upon successful recording of the IUMPR result, the function returns status E_OK [SWS_Dem_00313].
Concurrency and Error Behavior
Regarding concurrency, the service is reentrant for different identifiers RatioID, but not reentrant for the same RatioID value [SWS_Dem_00313]. Concurrent calls with identical identifier must therefore be avoided by the caller.
If a corresponding event is set to unavailable, the DEM module treats it as if it were not configured in the system [SWS_Dem_01108]. Dem_RepIUMPRFaultDetect is also explicitly affected by this deactivation [SWS_Dem_01108]; interpretation: in this state, analogous to the other affected status APIs, the call presumably returns E_NOT_OK. Question Q-6d1775c9bff08f42 (open)
This text was generated by an AI based on the AUTOSAR Classic R20-11 specification.
Implementer's Guide to follow (complexity I1)
function Dem_SetIUMPRDenCondition [SWS_Dem_00733] 📄 PDF
Std_ReturnType Dem_SetIUMPRDenCondition (Dem_IumprDenomCondIdType ConditionId, Dem_IumprDenomCondStatusType ConditionStatus);
In order to communicate the status of the (additional) denominator conditions among the OBD relevant ECUs, the API is used to forward the condition status to a Dem of a particular ECU. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
function Dem_GetIUMPRDenCondition [SWS_Dem_00734] 📄 PDF
Std_ReturnType Dem_GetIUMPRDenCondition (Dem_IumprDenomCondIdType ConditionId, Dem_IumprDenomCondStatusType* ConditionStatus);
In order to communicate the status of the (additional) denominator conditions among the OBD relevant ECUs, the API is used to retrieve the condition status from the Dem of the ECU where the conditions are computed. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
function Dem_RepIUMPRDenRelease [SWS_Dem_00315] 📄 PDF
Std_ReturnType Dem_RepIUMPRDenRelease (Dem_RatioIdType RatioID);
Service is used to release a denominator of a specific monitor. API is needed in OBD-relevant ECUs only API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
The synchronous and reentrant function Dem_RepIUMPRDenRelease serves to enable the denominator of a specific monitor for physical reasons, such as reaching certain temperature conditions or minimum activity [SWS_Dem_00315]. The DEM provides this interface for IUMPR-relevant software components (SW-C) to specifically control the denominator belonging to the respective RatioID [SWS_Dem_00308].
The provision and behavior of the function are subject to fixed configuration and runtime conditions:
- Availability and configuration: The API is available exclusively in OBD-relevant ECUs if
DemOBDSupportis configured not equal toDEM_OBD_NO_OBD_SUPPORT[SWS_Dem_00315]. In addition, the interface for enabling under special conditions is provided ifDemIUMPRDenGroupis configured asDEM_IUMPR_DEN_PHYS_API[SWS_Dem_00362]. - Parameters and return values: The identifier
RatioIDis passed as an input parameter. The function returnsE_OKif the status of the IUMPR denominator was reported successfully, otherwiseE_NOT_OK[SWS_Dem_00315]. - Error behavior with inactive events: If a corresponding event is set to unavailable, it is treated as if it were not configured in the system; the call of
Dem_RepIUMPRDenReleaseis directly affected by this and returnsE_NOT_OK[SWS_Dem_01108].
Thanks to the reentrant design, the function can be called concurrently from different SW-C contexts if needed [SWS_Dem_00315].
This text was created by an AI and does not replace the authoritative AUTOSAR specification.
Implementer's Guide to follow (complexity I1)
function Dem_SetPtoStatus [SWS_Dem_00627] 📄 PDF
Std_ReturnType Dem_SetPtoStatus (boolean PtoStatus);
API is needed in OBD-relevant ECUs only API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
use
The synchronous function Dem_SetPtoStatus ([SWS_Dem_00627]) serves to set the power take-off (PTO) status in the Diagnostic Event Manager (DEM). The interface is declared in the header Dem.h and has the service ID 0x79 ([SWS_Dem_00627]).
- Parameters: The input parameter
PtoStatus(typeboolean) passes the status of the power take-off, whereTRUEstands for active andFALSEfor inactive ([SWS_Dem_00627]). Input/output parameters or output parameters are not present. - Return value: The return type is
Std_ReturnType. The function returnsE_OKif the new PTO status was accepted by the DEM, andE_NOT_OKin all other cases ([SWS_Dem_00627]).
Concurrency and Limitations
The function operates synchronously and is specified as non-reentrant (Non Reentrant) ([SWS_Dem_00627]).
System Context and Configuration
The interface is required exclusively in OBD-relevant ECUs ([SWS_Dem_00627]). It is available only if the configuration parameter DemGeneral.DemOBDSupport is not set to DEM_OBD_NO_OBD_SUPPORT ([SWS_Dem_00627]).
This text was generated by an AI and is based on the specifications of the DEM module in AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I1)
function Dem_ReadDataOfPID01 [SWS_Dem_01167] 📄 PDF
Std_ReturnType Dem_ReadDataOfPID01 (uint8* PID01value);
Service to report the value of PID $01 computed by the Dem. API is needed in OBD relevant ECUs only
Usage and Parameters
The synchronous function Dem_ReadDataOfPID01 (service ID 0xb3) serves to query the value of PID $01 calculated by the Diagnostic Event Manager (DEM) [SWS_Dem_01167]. The interface is provided via the header Dem.h [SWS_Dem_01167]. As output parameter, the function expects PID01value, which is passed as a pointer to a buffer [SWS_Dem_01167]. This buffer must imperatively be allocated and provided by the calling application with a fixed size of 4 bytes to receive the calculated data [SWS_Dem_01167].
Error Handling and Return Values
As return type, the interface formally returns Std_ReturnType, but according to the specification returns E_OK without exception [SWS_Dem_01167]. The error value E_NOT_OK never occurs [SWS_Dem_01167]. Neither specific error codes nor reports to DET or DEM are specified for this interface [SWS_Dem_01167].
Concurrency and Limitations
The function is specified as non-reentrant (Non Reentrant) [SWS_Dem_01167]. Callers must therefore ensure that no concurrent calls take place. In addition, the API is functionally restricted and is exclusively required in ECUs with OBD relevance [SWS_Dem_01167].
This usage note was generated automatically based on the AUTOSAR specification R20-11.
function Dem_GetDataOfPID21 [SWS_Dem_01093] 📄 PDF
Std_ReturnType Dem_GetDataOfPID21 (uint8* PID21value);
Service to get the value of PID $21 from the Dem by a software component. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral/DemGeneral OBD.DemOBDCentralizedPID21Handling)} == true) && ({ecuc(Dem/DemGeneral.Dem OBDSupport)} == DEM_OBD_MASTER_ECU)
function Dem_SetDataOfPID21 [SWS_Dem_00735] 📄 PDF
Std_ReturnType Dem_SetDataOfPID21 (const uint8* PID21value);
Service to set the value of PID $21 in the Dem by a software component. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
function Dem_SetDataOfPID31 [SWS_Dem_00736] 📄 PDF
Std_ReturnType Dem_SetDataOfPID31 (const uint8* PID31value);
Service to set the value of PID $31 in the Dem by a software component. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
function Dem_SetDataOfPID4D [SWS_Dem_00737] 📄 PDF
Std_ReturnType Dem_SetDataOfPID4D (const uint8* PID4Dvalue);
Service to set the value of PID $4D in the Dem by a software component. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
function Dem_SetDataOfPID4E [SWS_Dem_00738] 📄 PDF
Std_ReturnType Dem_SetDataOfPID4E (const uint8* PID4Evalue);
Service to set the value of PID $4E in the Dem by a software component. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
function Dem_GetCycleQualified [SWS_Dem_00740] 📄 PDF
Std_ReturnType Dem_GetCycleQualified (uint8 OperationCycleId, boolean* isQualified);
Returns the qualification state of the dependent operation cycle. API Availability: This API will be available only if any of the ({ecuc(Dem/DemGeneral/Dem OperationCycle.DemLeadingCycleRef)} != NULL)
function Dem_SetCycleQualified [SWS_Dem_91001] 📄 PDF
Std_ReturnType Dem_SetCycleQualified (uint8 OperationCycleId);
Sets a dependent operation cycle as qualified, so it may be processed along with its leading cycle.
function Dem_GetDTCSeverityAvailabilityMask [SWS_Dem_01168] 📄 PDF
Std_ReturnType Dem_GetDTCSeverityAvailabilityMask (uint8 ClientId, Dem_DTCSeverityType* DTCSeverityMask);
Gets the DTC Severity availability mask.
function Dem_GetB1Counter [SWS_Dem_01169] 📄 PDF
Std_ReturnType Dem_GetB1Counter (uint16* B1Counter);
Service to report the value of the B1 counter computed by the Dem. API is needed in WWH-OBD relevant ECUs only
function Dem_SetDTR [SWS_Dem_00765] 📄 PDF
Std_ReturnType Dem_SetDTR (uint16 DTRId, sint32 TestResult, sint32 LowerLimit, sint32 UpperLimit, Dem_DTRControlType Ctrlval);
Reports a DTR result with lower and upper limit. The internal eventstatus serves as master whether the DTR values are forwarded or ignored, also taking the DTRUpdateKind into account. The EventId that is related to the DTR is assigned per configuration (and derived from ServiceNeeds). Processing takes enable/storage conditions into account. API is needed in OBD-relevant ECUs only. API Availability: This API will be available only if ({ecuc(Dem/DemGeneral.DemOBDSupport)} != DEM_OBD_NO_OBD_SUPPORT)
function Dem_CallbackEventSyncStorageProcessed [SWS_Dem_91042] 📄 PDF
Std_ReturnType Dem_CallbackEventSyncStorageProcessed (void);
Called by the Dem after the internal processing of Dem_SetEventFailedWithSyncFreezeFrame is done and a further call of Dem_SetEventFailedWithSyncFreezeFrame with the same event ID can be processed by the Dem. Tags: atp.Status=draft
The callback function Dem_CallbackEventSyncStorageProcessed is called synchronously by the Diagnostic Event Manager (DEM) as soon as the internal processing of Dem_SetEventFailedWithSyncFreezeFrame is completed ([SWS_Dem_91042]). It informs the calling component that another call of Dem_SetEventFailedWithSyncFreezeFrame for the same event ID can be processed by the DEM ([SWS_Dem_91042]).
The following interface and execution properties apply to usage and integration:
- Parameters and return value: The interface has neither input, output, nor input/output parameters ([SWS_Dem_91042]). The return type is
Std_ReturnType, where for reasons of RTE compatibility, only the return valueE_OKis permissible and returned ([SWS_Dem_91042]). - Concurrency: The function is specified as reentrant ([SWS_Dem_91042]).
- Error handling: No specific error codes or messages to development error tracking (DET) are provided ([SWS_Dem_91042]).
With respect to interaction and configuration, a fixed prerequisite exists: Dem_CallbackEventSyncStorageProcessed may only be configured for diagnostic events whose parameter DemEventReportingType is set to IMMEDIATE_FAIL_AND_SYNCHRONOUS_PROCESSING ([SWS_Dem_01356]). In addition, the element is annotated with the status draft in release R20-11 ([SWS_Dem_91042], [SWS_Dem_01356]).
This usage note was generated automatically based on the specification requirements.
Implementer's Guide to follow (complexity I2)
function Dem_MainFunction [SWS_Dem_00266] 📄 PDF
void Dem_MainFunction (void);
Processes all not event based Dem internal functions.
The basic function Dem_MainFunction has the signature void Dem_MainFunction(void) with service ID 0x55 and is provided via the header file SchM_Dem.h ([SWS_Dem_00266]). It takes no parameters, returns no value, and serves to execute all non-event-based internal processes of the DEM module ([SWS_Dem_00266], [SWS_Dem_00125]).
Special exceptions in the module lifecycle apply to the call context and error handling: If the development error detection DemDevErrorDetect is set to TRUE, calling regular DEM interfaces prior to complete initialization leads to reporting the error DEM_E_UNINIT; however, Dem_MainFunction is explicitly exempted from this error generation ([SWS_Dem_00124]). Similarly, after calling Dem_Shutdown, the function is exempt from reporting error DEM_E_UNINIT until Dem_Init is called again ([SWS_Dem_00368]).
In interaction with the fault memory, the function significantly controls the acquisition and buffering of diagnostic data:
- If
DemEnvironmentDataCaptureis configured toDEM_CAPTURE_ASYNCHRONOUS_TO_REPORTING(related toDemPrimaryMemoryorDemUserDefinedMemory), event-specific freeze frame data ([SWS_Dem_00461]) and extended data records ([SWS_Dem_01081]) must be captured at the latest in the next cycle ofDem_MainFunction. - If
DemEnvironmentDataCaptureis set toDEM_CAPTURE_SYNCHRONOUS_TO_REPORTING, the DEM module enqueues the environmental data until the next call ofDem_MainFunction([SWS_Dem_01083]). The module buffers at least the configured number according toDemMaxNumberEventEntryEventBuffer; if the queue is full, the data is captured during event processing withinDem_MainFunction([SWS_Dem_01083]).
This usage note was generated automatically based on the specification AUTOSAR Classic Release R20-11.
Implementer's Guide to follow (complexity I1)
type Dem_ComponentIdType [SWS_Dem_01114] 📄 PDF
Identification of a DemComponent by assigned ComponentId. The ComponentId is automatically assigned by the Dem.
type Dem_ConfigType [SWS_Dem_00924] 📄 PDF
This type of the external data structure shall contain the post build initialization data for the Dem.
type Dem_DTCKindType [SWS_Dem_00932] 📄 PDF
This type is used to filter DTCs for their kind.
type Dem_DTCRequestType [SWS_Dem_00935] 📄 PDF
This type is used to request a DTC with specific attributes.
Usage and Value Range
Data type Dem_DTCRequestType is derived from uint8 and available via header Dem.h [SWS_Dem_00935]. It serves to request a Diagnostic Trouble Code (DTC) based on specific temporal attributes [SWS_Dem_00935].
The permissible value range comprises the following enumeration values [SWS_Dem_00935]:
DEM_FIRST_FAILED_DTC(0x01): Requests the DTC that failed first chronologically.DEM_MOST_RECENT_FAILED_DTC(0x02): Requests the most recently failed DTC.DEM_FIRST_DET_CONFIRMED_DTC(0x03): Requests the DTC first detected as confirmed.DEM_MOST_REC_DET_CONFIRMED_DTC(0x04): Requests the DTC most recently detected as confirmed.
Interaction, Concurrency, and Error Handling
The type is passed as input parameter DTCRequest of synchronous function Dem_GetDTCByOccurrenceTime [SWS_Dem_00218]. This parameter defines the criterion according to which the DTC is to be queried [SWS_Dem_00218]. The result is returned in UDS format via output parameter DTC [SWS_Dem_00218].
The interface is reentrant for different callers across different ClientId values, but not reentrant for the same ClientId [SWS_Dem_00218]. Possible return values are E_OK upon a successful query, E_NOT_OK in case of errors, and DEM_NO_SUCH_ELEMENT if no matching entry is stored [SWS_Dem_00218]. If the function result differs from DEM_OCCURR_OK, parameter DTC contains no valid data [SWS_Dem_00218].
This usage note was generated by an AI based on the specification AUTOSAR CP R20-11.
type Dem_DTCTranslationFormatType [SWS_Dem_00936] 📄 PDF
DTC translation format as defined in ISO14229-1.
type Dem_J1939DcmDTCStatusFilterType [SWS_Dem_00945] 📄 PDF
The type to distinguish which DTCs should be filtered.
Usage and Value Range
Type Dem_J1939DcmDTCStatusFilterType is an enumeration type based on uint8 that is provided via header file Dem.h [SWS_Dem_00945]. It serves to define according to which J1939 status diagnostic trouble codes (DTCs) are to be distinguished and selected during filter operations [SWS_Dem_00945].
The following status filter values are specified:
DEM_J1939DTC_ACTIVE(0): Filters for active trouble codes [SWS_Dem_00945].DEM_J1939DTC_PREVIOUSLY_ACTIVE(1): Filters for previously active trouble codes [SWS_Dem_00945].DEM_J1939DTC_PENDING(2): Filters for pending trouble codes [SWS_Dem_00945].DEM_J1939DTC_PERMANENT(3): Filters for permanent trouble codes [SWS_Dem_00945].DEM_J1939DTC_CURRENTLY_ACTIVE(4): Filters for currently active trouble codes [SWS_Dem_00945].
Interaction and Call Context
The filter type is used as handover parameter DTCStatusFilter in interface Dem_J1939DcmSetDTCFilter [SWS_Dem_00970]. The function operates synchronously and sets the filter taking into account trouble category (DTCKind), memory origin (DTCOrigin), and the respective ClientId for the J1939 event memory [SWS_Dem_00970]. Interpretation: the call is likely typically made from the Diagnostic Communication Manager for J1939.
Question Q-898d508b7b341ef8 (open)
Concurrency and Error Handling
Service Dem_J1939DcmSetDTCFilter is reentrant for different ClientId values, but explicitly not reentrant for the same ClientId [SWS_Dem_00970]. A successful filter configuration is acknowledged by the service with return value E_OK [SWS_Dem_00970].
This text was generated by an AI based on the specification documents.
Implementer's Guide to follow (complexity I1)
type Dem_J1939DcmSetClearFilterType [SWS_Dem_00946] 📄 PDF
The type to distinguish which DTCs gets cleared
type Dem_J1939DcmSetFreezeFrameFilterType [SWS_Dem_00947] 📄 PDF
The type to distinguish which DTCs gets cleared
type Dem_J1939DcmLampStatusType [SWS_Dem_00948] 📄 PDF
For details refer SAE J1939-73
Structure type Dem_J1939DcmLampStatusType is declared in Dem.h according to [SWS_Dem_00948] and serves to acquire the J1939 lamp status according to SAE J1939-73. The data structure bundles two status pieces of information as uint8 elements: LampStatus for the current lamp status and FlashLampStatus for the associated flash behavior.
In the J1939 DTC filtering of the Diagnostic Event Manager, the type functions as a pointer output parameter in two synchronous interfaces:
- Via
Dem_J1939DcmSetDTCFilter([SWS_Dem_00970]), the initial lamp status is queried when initializing the DTC filter for a specific J1939 event memory (addressed viaClientId). - Via
Dem_J1939DcmGetNextDTCwithLampStatus([SWS_Dem_00975]), the structure is iteratively populated with the associated lamp status for each matching fault memory entry.
During error handling, it must strictly be noted that Dem_J1939DcmGetNextDTCwithLampStatus according to [SWS_Dem_00975] only writes valid values to the output parameter if the return value of the function is DEM_FILTERED_OK. If the call yields a different return value, the structure contains no valid data.
Regarding concurrency and invocation conditions, the structure itself has no internal protection. Reentrancy depends on the respective call context: Dem_J1939DcmSetDTCFilter is reentrant for different client IDs, but non-reentrant for the same ClientId ([SWS_Dem_00970]). The iterative query via Dem_J1939DcmGetNextDTCwithLampStatus is specified as completely non-reentrant ([SWS_Dem_00975]).
This text was generated by an AI and is based on the specifications of AUTOSAR release R20-11.
Implementer's Guide to follow (complexity I1)
type Dem_J1939DcmDiagnosticReadiness1Type [SWS_Dem_00949] 📄 PDF
This structure represents all data elemets of the DM05 message. The encoding shall be done acording SAE J1939-73
Structure Dem_J1939DcmDiagnosticReadiness1Type maps all data elements of J1939 diagnostic message DM05 and is defined in header file Dem.h according to [SWS_Dem_00949]. The encoding of the fields is performed according to SAE J1939-73 [SWS_Dem_00949].
The structure comprises eight data fields of type uint8, which together represent an 8-byte buffer for Diagnostic Readiness 1 [SWS_Dem_00949], [SWS_Dem_00982]:
ActiveTroubleCodes: Number of active DTCs [SWS_Dem_00949].PreviouslyActiveDiagnosticTroubleCodes: Number of previously active DTCs [SWS_Dem_00949].OBDCompliance: OBD compliance [SWS_Dem_00949].ContinuouslyMonitoredSystemsSupport_Status: Support and status of continuously monitored systems [SWS_Dem_00949].NonContinuouslyMonitoredSystemsSupport5andNonContinuouslyMonitoredSystemsSupport6: System support of non-continuously monitored systems (byte 5 and 6) [SWS_Dem_00949].NonContinuouslyMonitoredSystemsStatus7andNonContinuouslyMonitoredSystemsStatus8: Status of non-continuously monitored systems (byte 7 and 8) [SWS_Dem_00949].
The primary interaction takes place with the synchronous API Dem_J1939DcmReadDiagnosticReadiness1 (available via Dem_J1939Dcm.h) [SWS_Dem_00982]. Callers pass a pointer to an instance of Dem_J1939DcmDiagnosticReadiness1Type via output parameter DataValue together with the respective ClientId for the J1939 event memory [SWS_Dem_00982].
Regarding concurrency and error handling, the following applies to read access: The querying function returns E_OK upon successful calculation and provisioning of the DM05 values by the DEM, and E_NOT_OK in case of error [SWS_Dem_00982]. Access is reentrant for different ClientId values, but not reentrant for the same ClientId [SWS_Dem_00982]. It is therefore likely necessary to protect instances of this type from concurrent calls within the context of the same client. Question Q-7613ded1aa18fd2b (open)
This text was created by an AI. Citations originate exclusively from the specifications of release R20-11.
type Dem_J1939DcmDiagnosticReadiness2Type [SWS_Dem_00950] 📄 PDF
This structure represents all data elemets of the DM21 message. The encoding shall be done acording SAE J1939-73
Structure type Dem_J1939DcmDiagnosticReadiness2Type represents the data elements of diagnostic message DM21 (Diagnostic Readiness 2) according to SAE J1939-73 and is declared via header file Dem.h [SWS_Dem_00950]. The structure combines four 16-bit counters (uint16) in an 8-byte buffer [SWS_Dem_00950], [SWS_Dem_00983]:
DistanceTraveledWhileMILisActivated: Cumulative distance in kilometers with active malfunction indicator lamp (MIL) [SWS_Dem_00950].DistanceSinceDTCsCleared: Cumulative distance since clearing emission-related diagnostic trouble codes (DTCs) [SWS_Dem_00950].MinutesRunbyEngineWhileMILisActivated: Cumulative engine run time in minutes with active MIL [SWS_Dem_00950].TimeSinceDiagnosticTroubleCodesCleared: Cumulative engine run time since clearing emission-related DTCs [SWS_Dem_00950].
This type is used as output buffer DataValue of synchronous service Dem_J1939DcmReadDiagnosticReadiness2, which is defined in Dem_J1939Dcm.h [SWS_Dem_00983]. Upon invocation, the J1939-DCM passes a ClientId to address the specific event memory in the DEM [SWS_Dem_00983]. The function determines the current counter values and confirms successful provisioning with return value E_OK or signals errors with E_NOT_OK [SWS_Dem_00983].
Regarding concurrency, the reading service is reentrant for different ClientId values, but not reentrant for identical ClientId values [SWS_Dem_00983].
This usage note was generated automatically by an AI. All statements are based exclusively on the provided specification scope of AUTOSAR R20-11.
type Dem_J1939DcmDiagnosticReadiness3Type [SWS_Dem_00951] 📄 PDF
This structure represents all data elemets of the DM26 message. The encoding shall be done acording SAE J1939-73
Structure type Dem_J1939DcmDiagnosticReadiness3Type maps all data elements of diagnostic message DM26 (Diagnostic Readiness 3) according to [SWS_Dem_00951]. The encoding of the contained fields is bindingly governed by SAE J1939-73 [SWS_Dem_00951].
The structure comprises a data buffer of 8 bytes and consists of the following individual fields [SWS_Dem_00951]:
TimeSinceEngineStart(uint16): Engine run time since ignition on.NumberofWarmupsSinceDTCsCleared(uint8): Number of OBD warm-up cycles since clearing all trouble codes.ContinuouslyMonitoredSystemsEnableCompletedStatus(uint8): Enable and completion status of continuously monitored systems.NonContinuouslyMonitoredSystemsEnableStatus5andNonContinuouslyMonitoredSystemsEnableStatus6(eachuint8): Enable status of non-continuous monitors in the current cycle (byte 5 and 6).NonContinuouslyMonitoredSystems7andNonContinuouslyMonitoredSystems8(eachuint8): Completion status of non-continuous monitors in the current cycle (byte 7 and 8).
Usage and interaction: An instance of this type is passed as output parameter DataValue to synchronous function Dem_J1939DcmReadDiagnosticReadiness3 [SWS_Dem_00770]. The DEM determines the DM26 values for the passed ClientId of the J1939 event memory and returns return value E_OK upon successful execution or E_NOT_OK in case of an error [SWS_Dem_00770].
Concurrency and limitations: The reading function call is reentrant for different ClientId values, but must not take place concurrently for the same ClientId [SWS_Dem_00770]. Module J1939Dcm is likely to act as the primary caller. Question Q-e001ad1880fee789 (open) The type is declared in Dem.h [SWS_Dem_00951], while the associated read service is provided via Dem_J1939Dcm.h [SWS_Dem_00770].
This usage note is based on the definitions of the AUTOSAR specification for the Diagnostic Event Manager.
type Dem_DataType [SWS_Dem_91026] 📄 PDF
Data type definition for external data elements
type Dem_DataPrimitiveType [SWS_Dem_91033] 📄 PDF
type Dem_DataArrayType [SWS_Dem_91034] 📄 PDF
Array data type definition for external data elements
type Dem_DTCOriginType [SWS_Dem_00934] 📄 PDF
This enum is used to define the location of the events. The definition and use of the different memory types is OEM-specific.
type Dem_DebounceResetStatusType [SWS_Dem_00927] 📄 PDF
This type contains all definitions to control an internal debounce counter/timer via the function Dem_ResetEventDebounceStatus().
The data type Dem_DebounceResetStatusType controls the behavior of internal debounce counters and debounce timers in the Diagnostic Event Manager [SWS_Dem_00927]. It is defined as uint8, available via the header file Rte_Dem_Type.h, and provides two defined control states [SWS_Dem_00927]:
DEM_DEBOUNCE_STATUS_FREEZE(0x00): Freezes the internal debounce counter or debounce timer of the addressed event [SWS_Dem_00927].DEM_DEBOUNCE_STATUS_RESET(0x01): Resets the internal debounce counter or debounce timer [SWS_Dem_00927].
Values in the range from 0x02 to 0xFF are reserved [SWS_Dem_00927]. The type is passed as parameter DebounceResetStatus to the service function Dem_ResetEventDebounceStatus() [SWS_Dem_00683]. This call is executed synchronously and controls the internal debouncing status without directly influencing the qualification of the respective event [SWS_Dem_00683].
Regarding concurrency, Dem_ResetEventDebounceStatus() is reentrant for different EventId values, but must not be called concurrently for the same EventId [SWS_Dem_00683]. BSW modules can use the interface as soon as the base initialization Dem_PreInit is completed [SWS_Dem_00683]. For software components, provision is likely to occur via port-specific interfaces such as DiagnosticMonitor, which allow the modification of event information [SWS_Dem_00598]. Question Q-32468003718a4933 (open) In case of an error, the calling function returns E_NOT_OK, which according to the specification occurs exclusively upon development errors [SWS_Dem_00683].
This usage note was generated automatically based on the specification requirements.
Implementer's Guide to follow (complexity I1)
type Dem_DTRControlType [SWS_Dem_00941] 📄 PDF
Control parameter for the interpretation of the reported test results.
type Dem_EventIdType [SWS_Dem_00925] 📄 PDF
Identification of an event by assigned EventId. The EventId is assigned by the Dem. Example: 1 refers to monitor x, 2 refers to monitor y, etc.
type Dem_EventStatusType [SWS_Dem_00926] 📄 PDF
This type contains all monitor test result values, which can be reported via Dem_SetEventStatus().
Data type Dem_EventStatusType is derived from uint8 and is available via header Rte_Dem_Type.h ([SWS_Dem_00926]). It serves software components (SW-Cs) and BSW modules to report the test results of a diagnostic monitor to the DEM ([SWS_Dem_00926], [SWS_Dem_00183]).
The type defines the following monitor result values ([SWS_Dem_00926]):
DEM_EVENT_STATUS_PASSED(0x00) andDEM_EVENT_STATUS_FAILED(0x01): Transmission of qualified test results (passed or failed).DEM_EVENT_STATUS_PREPASSED(0x02) andDEM_EVENT_STATUS_PREFAILED(0x03): Preliminary, unqualified monitor test results whose debouncing takes place internally in the DEM.DEM_EVENT_STATUS_FDC_THRESHOLD_REACHED(0x04): Triggers storage of FreezeFrames and ExtendedDataRecords when the FDC threshold (ON_FDC_THRESHOLD) is reached.- The value ranges 0x05 to 0xFF are reserved.
The type is used as input parameter EventStatus in BSW APIs Dem_SetEventStatus() ([SWS_Dem_00183]) and Dem_SetEventStatusWithMonitorData() ([SWS_Dem_91037]) as well as via interfaces DiagnosticMonitor ([SWS_Dem_00598]) and DiagnosticMonitor_MonitorData ([SWS_Dem_91038]). The call is synchronous or asynchronous ([SWS_Dem_00183], [SWS_Dem_91037]).
The functions return Std_ReturnType (E_OK on success, E_NOT_OK on errors or rejection), where calling BSW modules may ignore the return value of Dem_SetEventStatus() ([SWS_Dem_00183]). Regarding concurrency, the calls are reentrant for different EventId, but non-reentrant for the same EventId ([SWS_Dem_00183], [SWS_Dem_91037]). In addition, the availability of the target APIs depends on the configuration of parameter DemEventReportingType ([SWS_Dem_00183], [SWS_Dem_91037]).
This text was generated by an AI and serves as guidance. The AUTOSAR specification is authoritative.
Implementer's Guide to follow (complexity I1)
type Dem_DTCFormatType [SWS_Dem_00933] 📄 PDF
This type is used to select the format of the DTC value.
type Dem_InitMonitorReasonType [SWS_Dem_00942] 📄 PDF
(Re-)Initialization reason returned by the callback
Usage and Value Range
Data type Dem_InitMonitorReasonType is based on uint8 and is available via Rte_Dem_Type.h [SWS_Dem_00942]. It indicates the concrete cause for a (re-)initialization of a diagnostic monitor so that it can select and execute the corresponding initialization routine for the affected event [SWS_Dem_00942] [SWS_Dem_00256].
The following values are defined for the type [SWS_Dem_00942]:
DEM_INIT_MONITOR_CLEAR(0x01): The diagnostic event was cleared; all internal values and states are reset.DEM_INIT_MONITOR_RESTART(0x02): The operation cycle of the event was restarted.DEM_INIT_MONITOR_REENABLED(0x03): Enable conditions or DTC settings were re-enabled.DEM_INIT_MONITOR_STORAGE_REENABLED(0x04): A storage condition was re-enabled.
Call Context and Interfaces
The value is passed synchronously and reentrantly as input parameter InitMonitorReason via the event-specific C callback <Module>_DemInitMonitorFor<EventName>(), which is declared in Dem_Externals.h [SWS_Dem_00256]. If a port interface to the software component exists, the handover takes place to operation InitMonitorForEvent of service interface CallbackInitMonitorForEvent [SWS_Dem_00613].
Error Handling and Return Values
For the C callback, the return value of type Std_ReturnType is unused and merely serves compatibility with the corresponding RTE operation [SWS_Dem_00256]. If the interface is called via the RTE, operation InitMonitorForEvent returns the error values E_OK (successful) or E_NOT_OK (failed) [SWS_Dem_00613]. Dedicated error codes or DET/DEM messages are not defined for this data type.
This text was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
type Dem_IumprDenomCondIdType [SWS_Dem_00943] 📄 PDF
This type contains all possible additional IUMPR denominator conditions to be broadcasted among OBD-relevant ECUs.
type Dem_IumprDenomCondStatusType [SWS_Dem_00944] 📄 PDF
This type contains all possible states of an additional IUMPR denominator condition to be broadcasted among OBD-relevant ECUs.
use
Type Dem_IumprDenomCondStatusType is based on uint8 and defines the possible status states of an additional IUMPR denominator condition for distribution between OBD-relevant ECUs [SWS_Dem_00944]. The type is available via Rte_Dem_Type.h and comprises the following values [SWS_Dem_00944]:
DEM_IUMPR_DEN_STATUS_NOT_REACHED(0x00): The condition is not (yet) fulfilled.DEM_IUMPR_DEN_STATUS_REACHED(0x01): The condition is fulfilled.DEM_IUMPR_DEN_STATUS_INHIBITED(0x02): The condition is inhibited and cannot be reached.
Values in the range from 0x03 to 0xFF are reserved [SWS_Dem_00944].
Interaction and Service Interfaces
Within the scope of service interface IUMPRDenominatorCondition, the status is transmitted for conditions such as General Denominator, Cold start, EVAP, or 500mi [SWS_Dem_00733] [SWS_Dem_00742]. Two central service functions exist:
Dem_SetIUMPRDenCondition: Forwards the status via input parameterConditionStatussynchronously or asynchronously to the DEM of an ECU [SWS_Dem_00733].Dem_GetIUMPRDenCondition: Queries the status synchronously via pointer output parameterConditionStatusfrom the ECU on which the conditions are calculated [SWS_Dem_00734].
Error Handling and Concurrency
Both functions are specified as reentrant [SWS_Dem_00733] [SWS_Dem_00734]. Upon successful execution, the APIs return E_OK; if setting or querying fails or the condition cannot be accepted, they return E_NOT_OK [SWS_Dem_00733] [SWS_Dem_00734].
This usage note was generated automatically by an AI based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I1)
type Dem_MaxDataValueType [SWS_Dem_01072] 📄 PDF
type Dem_MonitorDataType [SWS_Dem_91036] 📄 PDF
This type is used to pass monitoring data to the Dem.
type Dem_IndicatorStatusType [SWS_Dem_00930] 📄 PDF
Indicator mode used by Dem_GetIndicatorStatus().
The data type Dem_IndicatorStatusType is based on uint8 and is provided via Rte_Dem_Type.h [SWS_Dem_00930]. It maps the operating modes of warning indicators derived from the UDS status [SWS_Dem_00205]. The spectrum of states ranges from DEM_INDICATOR_OFF (0x00) through DEM_INDICATOR_CONTINUOUS (0x01), DEM_INDICATOR_BLINKING (0x02), DEM_INDICATOR_BLINK_CONT (0x03), DEM_INDICATOR_SLOW_FLASH (0x04), DEM_INDICATOR_FAST_FLASH (0x05), and DEM_INDICATOR_ON_DEMAND (0x06) up to DEM_INDICATOR_SHORT (0x07) [SWS_Dem_00930].
The type is used as an output parameter in the synchronous C function Dem_GetIndicatorStatus() [SWS_Dem_00205] as well as in the operation GetIndicatorStatus of the service port IndicatorStatus [SWS_Dem_00606]. For each configured indicator, the DEM service component provides a dedicated port, where the respective IndicatorId acts as a port-defined argument [SWS_Dem_00606]. The querying software component is likely to typically use the determined status to control visual or acoustic display instruments. Question Q-6bfabb33805bd0e8 (open)
Callers must note that Dem_GetIndicatorStatus() is specified as non-reentrant (Non Reentrant) [SWS_Dem_00205]. Furthermore, the query API is only available if at least one indicator is configured under DemIndicator [SWS_Dem_00205]. The operation reports the execution status via the return value Std_ReturnType with E_OK upon successful evaluation or E_NOT_OK in case of an error [SWS_Dem_00205][SWS_Dem_00606].
This text was generated by an AI and serves as guidance in the AUTOSAR environment.
Implementer's Guide to follow (complexity I1)
type Dem_PID21valueType [SWS_Dem_01073] 📄 PDF
type Dem_PID31valueType [SWS_Dem_01074] 📄 PDF
type Dem_RatioIdType [SWS_Dem_00940] 📄 PDF
OBD specific ratio Id (related to a specific event, a FID, and an IUMPR group). This type depends on the Dem configuration.
type Dem_PID4DvalueType [SWS_Dem_91028] 📄 PDF
type Dem_PID4EvalueType [SWS_Dem_91029] 📄 PDF
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_Dem- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_Dem@rel:R20-11#78a5dbd3- Content hash
78a5dbd3- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_DiagnosticEventManager.pdf#nameddest=SWS_Dem_00177
gemini-3.8-flash-low· 2026-10-13 · German original