DEENESPTFRRUARHIKOZHNL

AUTOSAR Classic Diagnostic Services

Die Diagnostic Services der AUTOSAR Classic Platform implementieren normierte Diagnoseprotokolle nach ISO 14229 (UDS) und ISO 15765-4 (OBD), Fehlererkennung und -speicherung im Fehlerspeicher (DEM), Entwicklungsfehler-Tracing (DET) sowie strukturiertes Logging (DLT).

Topic map

DCM

123
Dcm_BndMWriteBlockFinishDcm_ComM_FullComModeEnteredDcm_ComM_NoComModeEnteredDcm_ComM_SilentComModeEnteredDcm_CopyRxDataDcm_CopyTxDataDcm_CsmAsyncJobFinishedDcm_DemTriggerOnDTCStatusDcm_GetActiveProtocolDcm_GetProgConditionsDcm_GetSecurityLevelDcm_GetSesCtrlTypeDcm_GetVersionInfoDcm_GetVinDcm_InitDcm_KeyMAsyncCertificateVerifyFinishedDcm_MainFunctionDcm_ProcessRequestAddFileDcm_ProcessRequestDeleteFileDcm_ProcessRequestReadDirDcm_ProcessRequestReadFileDcm_ProcessRequestReplaceFileDcm_ReadFileOrDirDcm_ReadMemoryDcm_ResetToDefaultSessionDcm_SetActiveDiagnosticDcm_SetDeauthenticatedRoleDcm_SetProgConditionsDcm_StartOfReceptionDcm_TpRxIndicationDcm_TpTxConfirmationDcm_TriggerOnEventDcm_TxConfirmationDcm_WriteFileDcm_WriteMemoryXxx_ClearDTCCheckFncXxx_CompareKeyXxx_ConditionCheckReadXxx_ConditionCheckRead#2Xxx_ConfirmationXxx_FreezeCurrentStateXxx_FreezeCurrentState#2Xxx_GetInfotypeValueDataXxx_GetScalingInformationXxx_GetScalingInformation#2Xxx_GetSecurityAttemptCounterXxx_GetSeedXxx_GetSeed#2Xxx_IndicationXxx_IsDidAvailableXxx_ProcessRequestDownloadXxx_ProcessRequestTransferExitXxx_ProcessRequestUploadXxx_ProcessTransferDataReadXxx_ProcessTransferDataWriteXxx_ReadDataXxx_ReadData#2Xxx_ReadData#3Xxx_ReadDataLengthXxx_ReadDataLength#2Xxx_ReadDidDataXxx_ReadDidRangeDataLengthXxx_RequestControlXxx_RequestResultsXxx_RequestResultsConfirmationXxx_ResetToDefaultXxx_ResetToDefault#2Xxx_ReturnControlToECUXxx_SetSecurityAttemptCounterXxx_ShortTermAdjustmentXxx_ShortTermAdjustment#2Xxx_StartXxx_StartConfirmationXxx_StartProtocolXxx_StopXxx_StopConfirmationXxx_StopProtocolXxx_WriteDataXxx_WriteData#2Xxx_WriteData#3Xxx_WriteData#4Xxx_WriteDidDataControlDTCSettingModeSwitchInterfaceDcm_AuthenticationRoleTypeDcm_CommunicationModeTypeDcm_ConfigTypeDcm_ConfirmationStatusTypeDcm_DataArrayTypeDcm_DidSupportedTypeDcm_EcuStartModeTypeDcm_ExtendedOpStatusTypeDcm_FileAndDirNameTypeDcm_IdContextTypeDcm_InfoTypeDcm_InputOutputControlParameterTypeDcm_IOOperationResponseTypeDcm_MsgAddInfoTypeDcm_MsgContextTypeDcm_MsgItemTypeDcm_MsgLenTypeDcm_MsgTypeDcm_NegativeResponseCodeTypeDcm_OpStatusTypeDcm_ProgConditionsTypeDcm_ProtocolTypeDcm_RequestDataArrayTypeDcm_ResponseDataArrayTypeDcm_ReturnReadMemoryTypeDcm_ReturnWriteMemoryTypeDcm_SecLevelTypeDcm_SesCtrlTypeDcm_StatusTypeDcmCommunicationControlDcmControlDTCSettingDcmDiagnosticSessionControlDcmEcuResetDcmModeRapidPowerShutDownDcmResponseOnEventDcmSecurityAccessDiagnosticSessionControlModeSwitchInterfaceEcuResetModeSwitchInterfaceModeRapidPowerShutDownModeSwitchInterfaceSecurityAccessModeSwitchInterface

DEM

141
Dem_CallbackEventSyncStorageProcessedDem_ClearDTCDem_ClearPrestoredFreezeFrameDem_DcmGetAvailableOBDMIDsDem_DcmGetDTCOfOBDFreezeFrameDem_DcmGetDTRDataDem_DcmGetInfoTypeValue08Dem_DcmGetInfoTypeValue0BDem_DcmGetNumTIDsOfOBDMIDDem_DcmReadDataOfOBDFreezeFrameDem_DcmReadDataOfPID01Dem_DcmReadDataOfPID1CDem_DcmReadDataOfPID21Dem_DcmReadDataOfPID30Dem_DcmReadDataOfPID31Dem_DcmReadDataOfPID41Dem_DcmReadDataOfPID4DDem_DcmReadDataOfPID4EDem_DcmReadDataOfPID91Dem_DisableDTCRecordUpdateDem_DisableDTCSettingDem_EnableDTCRecordUpdateDem_EnableDTCSettingDem_GetB1CounterDem_GetComponentFailedDem_GetCycleQualifiedDem_GetDataOfPID21Dem_GetDebouncingOfEventDem_GetDTCByOccurrenceTimeDem_GetDTCOfEventDem_GetDTCSelectionResultDem_GetDTCSelectionResultForClearDTCDem_GetDTCSeverityAvailabilityMaskDem_GetDTCStatusAvailabilityMaskDem_GetDTCSuppressionDem_GetEventAvailableDem_GetEventExtendedDataRecordExDem_GetEventFreezeFrameDataExDem_GetEventMemoryOverflowDem_GetEventUdsStatusDem_GetFaultDetectionCounterDem_GetFunctionalUnitOfDTCDem_GetIndicatorStatusDem_GetIUMPRDenConditionDem_GetMonitorStatusDem_GetNextExtendedDataRecordDem_GetNextFilteredDTCDem_GetNextFilteredDTCAndFDCDem_GetNextFilteredDTCAndSeverityDem_GetNextFilteredRecordDem_GetNextFreezeFrameDataDem_GetNumberOfEventMemoryEntriesDem_GetNumberOfFilteredDTCDem_GetNumberOfFreezeFrameRecordsDem_GetSeverityOfDTCDem_GetSizeOfExtendedDataRecordSelectionDem_GetSizeOfFreezeFrameSelectionDem_GetStatusOfDTCDem_GetTranslationTypeDem_GetVersionInfoDem_InitDem_J1939DcmClearDTCDem_J1939DcmFirstDTCwithLampStatusDem_J1939DcmGetNextDTCwithLampStatusDem_J1939DcmGetNextFilteredDTCDem_J1939DcmGetNextFilteredRatioDem_J1939DcmGetNextFreezeFrameDem_J1939DcmGetNextSPNInFreezeFrameDem_J1939DcmGetNumberOfFilteredDTCDem_J1939DcmReadDiagnosticReadiness1Dem_J1939DcmReadDiagnosticReadiness2Dem_J1939DcmReadDiagnosticReadiness3Dem_J1939DcmSetDTCFilterDem_J1939DcmSetFreezeFrameFilterDem_J1939DcmSetRatioFilterDem_MainFunctionDem_PreInitDem_PrestoreFreezeFrameDem_ReadDataOfPID01Dem_RepIUMPRDenReleaseDem_RepIUMPRFaultDetectDem_ResetEventDebounceStatusDem_ResetEventStatusDem_RestartOperationCycleDem_SelectDTCDem_SelectExtendedDataRecordDem_SelectFreezeFrameDataDem_SetComponentAvailableDem_SetCycleQualifiedDem_SetDataOfPID21Dem_SetDataOfPID31Dem_SetDataOfPID4DDem_SetDataOfPID4EDem_SetDTCFilterDem_SetDTCSuppressionDem_SetDTRDem_SetEnableConditionDem_SetEventAvailableDem_SetEventConfirmationThresholdCounterDem_SetEventDisabledDem_SetEventFailedWithSyncFreezeFrameDem_SetEventStatusDem_SetEventStatusWithMonitorDataDem_SetFreezeFrameRecordFilterDem_SetIUMPRDenConditionDem_SetPtoStatusDem_SetStorageConditionDem_SetWIRStatusDem_ShutdownDem_ComponentIdTypeDem_ConfigTypeDem_DataArrayTypeDem_DataPrimitiveTypeDem_DataTypeDem_DebounceResetStatusTypeDem_DTCFormatTypeDem_DTCKindTypeDem_DTCOriginTypeDem_DTCRequestTypeDem_DTCTranslationFormatTypeDem_DTRControlTypeDem_EventIdTypeDem_EventStatusTypeDem_IndicatorStatusTypeDem_InitMonitorReasonTypeDem_IumprDenomCondIdTypeDem_IumprDenomCondStatusTypeDem_J1939DcmDiagnosticReadiness1TypeDem_J1939DcmDiagnosticReadiness2TypeDem_J1939DcmDiagnosticReadiness3TypeDem_J1939DcmDTCStatusFilterTypeDem_J1939DcmLampStatusTypeDem_J1939DcmSetClearFilterTypeDem_J1939DcmSetFreezeFrameFilterTypeDem_MaxDataValueTypeDem_MonitorDataTypeDem_PID21valueTypeDem_PID31valueTypeDem_PID4DvalueTypeDem_PID4EvalueTypeDem_RatioIdType

Detail view

Select an entry in the outline.

DCM

Called by BndM to indicate that a block write operation has finished.

void Dcm_BndMWriteBlockFinish (BndM_BlockIdType BlockId, BndM_ResultType result);

This call informs the DCM module about a ComM mode change to COMM_FULL_ COMMUNICATION.

void Dcm_ComM_FullComModeEntered (uint8 NetworkId);

This call informs the DCM module about a ComM mode change to COMM_NO_ COMMUNICATION.

void Dcm_ComM_NoComModeEntered (uint8 NetworkId);

This call informs the DCM module about a ComM mode change to COMM_SILENT_ COMMUNICATION.

void Dcm_ComM_SilentComModeEntered (uint8 NetworkId);

This function is called to provide the received data of an I-PDU segment (N-PDU) to the upper layer. Each call to this function provides the next part of the I-PDU data. The size of the remaining buffer is written to the position indicated by bufferSizePtr. This function might be called in interrupt context.

BufReq_ReturnType Dcm_CopyRxData (PduIdType id, const PduInfoType* info, PduLengthType* bufferSizePtr);

This function is called to acquire the transmit data of an I-PDU segment (N-PDU). Each call to this function provides the next part of the I-PDU data unless retry->TpDataState is TP_ DATARETRY. In this case the function restarts to copy the data beginning at the offset from the current position indicated by retry->TxTpDataCnt. The size of the remaining data is written to the position indicated by availableDataPtr. This function might be called in interrupt context.

BufReq_ReturnType Dcm_CopyTxData (PduIdType id, const PduInfoType* info, const RetryInfoType* retry, PduLengthType* availableDataPtr);

Can be called from CSM upon finishing an asynchronous job processing. The integrator will configure this name as callback function within the CSM ECUC configuration for asynchronous jobs. Only one such callback is available, the DCM detects the job that has finished by evaluating the job parameter. API availability: This API will be available only if ({ecuc(DCM/DCM Dsp/DcmDspAuthentication/DcmDspAuthenticationConnection} != null).

Std_ReturnType Dcm_CsmAsyncJobFinished (Csm_ResultType result);

Triggers on changes of the UDS status byte. Allows to trigger on ROE Event for subservice On DTCStatusChanged.

Std_ReturnType Dcm_DemTriggerOnDTCStatus (uint32 DTC, Dem_UdsStatusByteType DTCStatusOld, Dem_UdsStatusByteType DTCStatusNew);

This function returns the active UDS protocol details

Std_ReturnType Dcm_GetActiveProtocol (Dcm_ProtocolType* ActiveProtocolType, uint16* ConnectionId, uint16* TesterSourceAddress);

The Dcm_GetProgConditions callout is called upon DCM initialization and allows to determine if a response ($50 or $51) has to be sent. The context parameters are defined in Dcm_Prog ConditionsType.

Dcm_EcuStartModeType Dcm_GetProgConditions (Dcm_ProgConditionsType* ProgConditions);

This function provides the active security level value.

Std_ReturnType Dcm_GetSecurityLevel (Dcm_SecLevelType* SecLevel);

This function provides the active session control type value.

Std_ReturnType Dcm_GetSesCtrlType (Dcm_SesCtrlType* SesCtrlType);

Returns the version information of this module

void Dcm_GetVersionInfo (Std_VersionInfoType* versionInfo);
Dcm_GetVin function

Function to get the VIN (as defined in SAE J1979-DA)

Std_ReturnType Dcm_GetVin (uint8* Data);
Dcm_Init function

Service for basic initialization of DCM module.

void Dcm_Init (const Dcm_ConfigType* ConfigPtr);

Can be called from Key upon finishing an asynchronous certificate verification. The integrator will configure this name as callback function within the KeyM ECUC configuration for asynchronous jobs. Only one such callback is available, the DCM detects the certificate that has finished by evaluating the certId parameter. API availability: This API will be available only if ({ecuc(DCM/DcmDsp/DcmDspAuthentication/DcmDspAuthenticationConnection} != null).

Std_ReturnType Dcm_KeyMAsyncCertificateVerifyFinished (KeyM_CertificateIdType CertID, KeyM_CertificateStatusType Result);

This service is used for processing the tasks of the main loop.

void Dcm_MainFunction (void);

Callout function. DCM shall call this function to start a RequestFileTransfer process with mode OfOperation equal to 0x01 (AddFile).

Std_ReturnType Dcm_ProcessRequestAddFile (Dcm_OpStatusType OpStatus, uint16 filePathAndNameLength, const uint8* filePathAndName, uint8 dataFormatIdentifier, uint64 fileSizeUncompressed, uint64 fileSizeCompressed, uint64* maxNumberOfBlockLength, Dcm_NegativeResponseCodeType* ErrorCode);

Callout function. DCM shall call this function to start a RequestFileTransfer process with mode OfOperation equal to 0x02 (DeleteFile). Manager

Std_ReturnType Dcm_ProcessRequestDeleteFile (Dcm_OpStatusType OpStatus, uint16 filePathAndNameLength, const uint8* filePathAndName, Dcm_NegativeResponseCodeType* ErrorCode);

Callout function. DCM shall call this function to start a RequestFileTransfer process with mode OfOperation equal to 0x05 (ReadDir).

Std_ReturnType Dcm_ProcessRequestReadDir (Dcm_OpStatusType OpStatus, uint16 filePathAndNameLength, const uint8* filePathAndName, uint64* dirInfoLength, uint64* maxNumberOfBlockLength, Dcm_NegativeResponseCodeType* ErrorCode);

Callout function. DCM shall call this function to start a RequestFileTransfer process with mode OfOperation equal to 0x04 (ReadFile).

Std_ReturnType Dcm_ProcessRequestReadFile (Dcm_OpStatusType OpStatus, uint16 filePathAndNameLength, const uint8* filePathAndName, uint8 dataFormatIdentifier, uint64 fileSizeUncompressed, uint64 fileSizeCompressed, uint64* maxNumberOfBlockLength, Dcm_NegativeResponseCodeType* ErrorCode);

Callout function. DCM shall call this function to start a RequestFileTransfer process with mode OfOperation equal to 0x03 (ReplaceFile).

Std_ReturnType Dcm_ProcessRequestReplaceFile (Dcm_OpStatusType OpStatus, uint16 filePathAndNameLength, const uint8* filePathAndName, uint8 dataFormatIdentifier, uint64 fileSizeUncompressed, uint64 fileSizeCompressed, uint64* maxNumberOfBlockLength, Dcm_NegativeResponseCodeType* ErrorCode);

Callout function. DCM shall call this function when data shall be sent as a response to UDS service TransferData if there's an ongoing RequestFileTransfer process started with 0x04 (ReadFile) or 0x05 (ReadDir).

Std_ReturnType Dcm_ReadFileOrDir (Dcm_OpStatusType OpStatus, uint64* DataLength, uint8* Data, Dcm_NegativeResponseCodeType* ErrorCode);

The Dcm_ReadMemory callout is used to request memory data identified by the parameter memoryAddress and memorySize from the UDS request message. This service is needed for the implementation of UDS services: • ReadMemoryByAddress • RequestUpload • ReadDataByIdentifier (in case of Dynamical DID defined by memory address) • TransferData

Dcm_ReturnReadMemoryType Dcm_ReadMemory (Dcm_OpStatusType OpStatus, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, uint8* MemoryData, Dcm_NegativeResponseCodeType* ErrorCode);

The call to this function allows the application to reset the current session to Default session. Example: Automatic termination of an extended diagnostic session upon exceeding of a speed limit.

Std_ReturnType Dcm_ResetToDefaultSession (void);

Allows to activate and deactivate the call of ComM_DCM_ActiveDiagnostic() function.

Std_ReturnType Dcm_SetActiveDiagnostic (boolean active);

Sets a new role used in deauthenticated state for that connection. The set role is valid until the connection switches into authenticated state or the ECU is reset.

Std_ReturnType Dcm_SetDeauthenticatedRole (uint16 connectionId, Dcm_AuthenticationRoleType deauthenticatedRole);

The Dcm_SetProgConditions callout allows the integrator to store relevant information prior to jumping to bootloader / jump due to ECUReset request. The context parameter are defined in Dcm_ProgConditionsType.

Std_ReturnType Dcm_SetProgConditions (Dcm_OpStatusType OpStatus, const Dcm_ProgConditionsType* ProgConditions);

This function is called at the start of receiving an N-SDU. The N-SDU might be fragmented into multiple N-PDUs (FF with one or more following CFs) or might consist of a single N-PDU (SF). The service shall provide the currently available maximum buffer size when invoked with TpSdu Length equal to 0. This function might be called in interrupt context.

BufReq_ReturnType Dcm_StartOfReception (PduIdType id, const PduInfoType* info, PduLengthType TpSduLength, PduLengthType* bufferSizePtr);

Called after an I-PDU has been received via the TP API, the result indicates whether the transmission was successful or not. This function might be called in interrupt context.

void Dcm_TpRxIndication (PduIdType id, Std_ReturnType result);

This function is called after the I-PDU has been transmitted on its network, the result indicates whether the transmission was successful or not. This function might be called in interrupt context.

void Dcm_TpTxConfirmation (PduIdType id, Std_ReturnType result);

The call to this function allows to trigger an event linked to a ResponseOnEvent request. On the function call, the DCM will execute the associated service if the corresponding Mode of the Roe EventId is 'ROE started'.

Std_ReturnType Dcm_TriggerOnEvent (uint8 RoeEventId);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU. This function might be called in interrupt context.

void Dcm_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);
Dcm_WriteFile function

Callout function. DCM shall call this function when data is received using UDS service Transfer Data if there's an ongoing RequestFileTransfer process started with 0x01 (AddFile) or 0x03 (ReplaceFile).

Std_ReturnType Dcm_WriteFile (Dcm_OpStatusType OpStatus, uint64 DataLength, uint8* Data, Dcm_NegativeResponseCodeType* ErrorCode);

The Dcm_WriteMemory callout is used to write memory data identified by the parameter memoryAddress and memorySize. This service is needed for the implementation of UDS services : • WriteMemoryByAddress • RequestDownload • TransferData

Dcm_ReturnWriteMemoryType Dcm_WriteMemory (Dcm_OpStatusType OpStatus, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, const uint8* MemoryData, Dcm_NegativeResponseCodeType* ErrorCode);

Callout function for condition check, manufacturer / supplier specific checks on the groupOf DTC, which is requested to clear.

Std_ReturnType Xxx_ClearDTCCheckFnc (uint32 GoDTC, Dcm_NegativeResponseCodeType* ErrorCode);

Request to application for asynchronous comparing key (DcmDspSecurityUsePort = USE_ ASYNCH_CLIENT_SERVER)

Std_ReturnType Xxx_CompareKey (const uint8* Key, Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);

This function requests to the application if the conditions to read the Data are correct.

Std_ReturnType Xxx_ConditionCheckRead (Dcm_NegativeResponseCodeType* ErrorCode);

This function requests to the application if the conditions to read the Data are correct.

Std_ReturnType Xxx_ConditionCheckRead (Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);

This function confirms to the application the successful transmission or a transmission error of a diagnostic service.

Std_ReturnType Xxx_Confirmation (uint8 SID, uint8 ReqType, uint16 ConnectionId, Dcm_ConfirmationStatusType ConfirmationStatus, Dcm_ProtocolType ProtocolType, uint16 TesterSourceAddress);

This function requests to the application to freeze the current state of an IOControl.

Std_ReturnType Xxx_FreezeCurrentState ([ Dcm_ControlMask_{DID}Type controlMask ], [ uint8* controlMask2 ], Dcm_NegativeResponseCodeType* ErrorCode);

This function requests to the application to freeze the current state of an IOControl.

Std_ReturnType Xxx_FreezeCurrentState (Dcm_OpStatusType OpStatus, [ Dcm_ControlMask_{DID}Type controlMask ], [ uint8* controlMask2 ], Dcm_NegativeResponseCodeType* ErrorCode);

The function provides the data related to the requested Infotype.

Std_ReturnType Xxx_GetInfotypeValueData (Dcm_OpStatusType OpStatus, uint8* DataValueBuffer, uint8* DataValueBufferSize);

This function requests to the application for the scaling information of a Data.

Std_ReturnType Xxx_GetScalingInformation (uint8* ScalingInfo, Dcm_NegativeResponseCodeType* ErrorCode);

This function requests to the application for the scaling information of a Data.

Std_ReturnType Xxx_GetScalingInformation (Dcm_OpStatusType OpStatus, uint8* ScalingInfo, Dcm_NegativeResponseCodeType* ErrorCode);

Read the attempt counter for a specific security level from the application

Std_ReturnType Xxx_GetSecurityAttemptCounter (Dcm_OpStatusType OpStatus, uint8* AttemptCounter);
Xxx_GetSeed function

Request to application for asynchronous provision of seed value

Std_ReturnType Xxx_GetSeed (const uint8* SecurityAccessDataRecord, Dcm_OpStatusType OpStatus, uint8* Seed, Dcm_NegativeResponseCodeType* ErrorCode);
Xxx_GetSeed#2 function

Request to application for asynchronous provision of seed value

Std_ReturnType Xxx_GetSeed (Dcm_OpStatusType OpStatus, uint8* Seed, Dcm_NegativeResponseCodeType* ErrorCode);

This function indicates to the application that a service is about to be executed and allows the application to reject the execution of the service request

Std_ReturnType Xxx_Indication (uint8 SID, const uint8* RequestData, uint32 DataSize, uint8 ReqType, uint16 ConnectionId, Dcm_NegativeResponseCodeType* ErrorCode, Dcm_ProtocolType ProtocolType, uint16 TesterSourceAddress);

This function requests if a specific DID is available within the range or not.

Std_ReturnType Xxx_IsDidAvailable (uint16 DID, Dcm_OpStatusType OpStatus, Dcm_DidSupportedType* supported);

Callout function. DCM shall call this callout function to start a download process. This service is needed for the implementation of UDS service RequestDownload.

Std_ReturnType Xxx_ProcessRequestDownload (Dcm_OpStatusType OpStatus, uint8 DataFormatIdentifier, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, uint32* BlockLength, Dcm_NegativeResponseCodeType* ErrorCode);

Callout function. DCM shall call this callout function to terminate a download or upload process. This callout is needed for the implementation of UDS service RequestTransferExit.

Std_ReturnType Xxx_ProcessRequestTransferExit (Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);

Callout function. DCM shall call this callout function to start an upload process. This service is needed for the implementation of UDS service RequestUpload.

Std_ReturnType Xxx_ProcessRequestUpload (Dcm_OpStatusType OpStatus, uint8 DataFormatIdentifier, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, uint32* BlockLength, Dcm_NegativeResponseCodeType* ErrorCode);

The ProcessTransferDataRead callout is used to request memory data identified by the parameter memoryAddress and memorySize from the UDS request message. This service is needed for the implementation of UDS services: • ReadMemoryByAddress • RequestUpload • ReadDataByIdentifier (in case of Dynamical DID defined by memory address) • TransferData

Dcm_ReturnReadMemoryType Xxx_ProcessTransferDataRead (Dcm_OpStatusType OpStatus, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, Dcm_RequestDataArrayType MemoryData, Dcm_NegativeResponseCodeType* ErrorCode);

The ProcessTransferDataWrite callout is used to write memory data identified by the parameter memoryAddress and memorySize. This service is needed for the implementation of UDS services : • WriteMemoryByAddress • RequestDownload • TransferData

Dcm_ReturnWriteMemoryType Xxx_ProcessTransferDataWrite (Dcm_OpStatusType OpStatus, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, const Dcm_RequestDataArrayType MemoryData, Dcm_NegativeResponseCodeType* ErrorCode);
Xxx_ReadData function

This function requests to the application a data value of a DID/PID if DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER.

Std_ReturnType Xxx_ReadData (uint8* Data);

This function requests to the application a data value of a DID/PID if DcmDspDataUsePort is set to USE_DATA_ASYNCH_CLIENT_SERVER.

Std_ReturnType Xxx_ReadData (Dcm_OpStatusType OpStatus, uint8* Data);

This function requests to the application a data value of a DID/PID if DcmDspDataUsePort is set to USE_DATA_ASYNCH_CLIENT_SERVER.

Std_ReturnType Xxx_ReadData (Dcm_OpStatusType OpStatus, uint8* Data, Dcm_NegativeResponseCodeType* ErrorCode);

This function requests the application to return the data length in byte of a Data.

Std_ReturnType Xxx_ReadDataLength (uint16* DataLength);

This function requests the application to return the data length in byte of a Data.

Std_ReturnType Xxx_ReadDataLength (Dcm_OpStatusType OpStatus, uint16* DataLength);

This function requests to the application a data value of a DID

Std_ReturnType Xxx_ReadDidData (uint16 DID, uint8* Data, Dcm_OpStatusType OpStatus, uint16 DataLength, Dcm_NegativeResponseCodeType ErrorCode);

This function requests the application to return the data length of a DID Range.

Std_ReturnType Xxx_ReadDidRangeDataLength (uint16 DID, Dcm_OpStatusType OpStatus, uint16* DataLength);

Invokes a TID-specific function taking a configured number of bytes as input and returing a fixed number of bytes as output. This is typically used to implement OBD Service $08

Std_ReturnType Xxx_RequestControl (uint8* OutBuffer, const uint8* InBuffer);

This function requests to the application the result of a routine execution

Std_ReturnType Xxx_RequestResults (Dcm_OpStatusType OpStatus, [ DcmDspRoutineSignalType* dataIn_1, ... DcmDspRoutineSignalType* dataIn_n ], [ const uint8* dataInVar ], [ DcmDspRoutineSignalType* dataOut_1, ... DcmDspRoutineSignalType* dataOut_n ], [ uint8* dataOutVar ], [ uint16* variableDataLength ], Dcm_NegativeResponseCodeType* ErrorCode);

This function indicates the transmission of a response to a RequestRoutineResults request

Std_ReturnType Xxx_RequestResultsConfirmation (Dcm_ConfirmationStatusType ConfirmationStatus);

This function requests to the application to reset an IOControl to default value.

Std_ReturnType Xxx_ResetToDefault ([ Dcm_ControlMask_{DID}Type controlMask ], [ uint8* controlMask2 ], Dcm_NegativeResponseCodeType* ErrorCode);

This function requests to the application to reset an IOControl to default value.

Std_ReturnType Xxx_ResetToDefault (Dcm_OpStatusType OpStatus, [ Dcm_ControlMask_{DID}Type controlMask ], [ uint8* controlMask2 ], Dcm_NegativeResponseCodeType* ErrorCode);

This function requests to the application to return control to ECU of an IOControl.

Std_ReturnType Xxx_ReturnControlToECU ([ Dcm_ControlMask_{DID}Type controlMask ], [ uint8* controlMask2 ], Dcm_NegativeResponseCodeType* ErrorCode);

Set the attempt counter for a specific security level in the application

Std_ReturnType Xxx_SetSecurityAttemptCounter (Dcm_OpStatusType OpStatus, uint8 AttemptCounter);

This function requests to the application to adjust the IO signal.

Std_ReturnType Xxx_ShortTermAdjustment (const uint8* ControlStateInfo, [ Dcm_ControlMask_{DID}Type controlMask ], [ uint8* controlMask2 ], Dcm_NegativeResponseCodeType* ErrorCode);

This function requests to the application to adjust the IO signal.

Std_ReturnType Xxx_ShortTermAdjustment (const uint8* ControlStateInfo, uint16 DataLength, Dcm_OpStatusType OpStatus, [ Dcm_ControlMask_{DID}Type controlMask ], [ uint8* controlMask2 ], Dcm_NegativeResponseCodeType* ErrorCode);
Xxx_Start function

This function requests to the application to start the execution of a routine.

Std_ReturnType Xxx_Start ([ DcmDspRoutineSignalType dataIn_1, ... DcmDspRoutineSignalType dataIn_n ], [ const uint8* dataInVar ], Manager Dcm_OpStatusType OpStatus, [ DcmDspRoutineSignalType dataOut_1, ... DcmDspRoutineSignalType dataOut_n ], [ uint8* dataOutVar ], [ uint16* currentDataLength ], Dcm_NegativeResponseCodeType ErrorCode); ⚠️

This function indicates the transmission of a response to a StartRoutine request

Std_ReturnType Xxx_StartConfirmation (Dcm_ConfirmationStatusType ConfirmationStatus);

This function allows the application to examine the environment conditions and enable/disable further processing of the protocol.

Std_ReturnType Xxx_StartProtocol (Dcm_ProtocolType ProtocolType, uint16 TesterSourceAddress, uint16 ConnectionId);
Xxx_Stop function

This function requests to the application to stop the execution of a routine

Std_ReturnType Xxx_Stop ([ DcmDspRoutineSignalType dataIn_1, ... DcmDspRoutineSignalType dataIn_n ], [ const uint8* dataInVar ], [ DcmDspRoutineSignalType dataOut_1, ... DcmDspRoutineSignalType dataOut_n ], [ uint8* dataOutVar ], [ uint16* currentDataLength ], Dcm_NegativeResponseCodeType* ErrorCode);

This function indicates the transmission of a response to a StopRoutine request

Std_ReturnType Xxx_StopConfirmation (Dcm_ConfirmationStatusType ConfirmationStatus);

This function informs the application of the protocol stop.

Std_ReturnType Xxx_StopProtocol (Dcm_ProtocolType ProtocolType, uint16 TesterSourceAddress, uint16 ConnectionId);
Xxx_WriteData function

This function requests the application to write a data value of a DID.

Std_ReturnType Xxx_WriteData (const uint8* Data, Dcm_NegativeResponseCodeType* ErrorCode);

This function requests the application to write a data value of a DID.

Std_ReturnType Xxx_WriteData (const uint8* Data, uint16 DataLength, Dcm_NegativeResponseCodeType* ErrorCode);

This function requests the application to write a data value of a DID.

Std_ReturnType Xxx_WriteData (const uint8* Data, Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);

This function requests the application to write a data value of a DID.

Std_ReturnType Xxx_WriteData (const uint8* Data, uint16 DataLength, Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);

This function requests the application to write a data value of a DID.

Std_ReturnType Xxx_WriteDidData (uint16 DID, const uint8* Data, Dcm_OpStatusType OpStatus, uint16 DataLength, Dcm_NegativeResponseCodeType ErrorCode);

A ModeSwitchInterface PPortPrototype used to notify SW-Cs about the DTC Setting mode

This type defines a data structure for the post build parameters of the DCM . At initialization the DCM gets a pointer to a structure of this type to get access to its configuration data, which is necessary for initialization.

Allows the DCM to know if a diagnostic response shall be sent in the case of a jump from bootloader

This message context identifier can be used to determine the relation between request and response confirmation.

Additional information on message request. Datastructure: Bitfield

This data structure contains all information which is necessary to process a diagnostic message from request to response and response confirmation.

Base type for diagnostic message item

Length of diagnostic message (request, positive or negative response). The maximum length is dependent of the underlying transport protocol/media.

Base type for diagnostic message (request, positive or negative response)

Type Dcm_NegativeResponseCodeType.

Used in Dcm_SetProgConditions() to allow the integrator to store relevant information prior to jumping to bootloader / jump due to ECUReset request.

Type Dcm_ProtocolType.

Return values of Callout Dcm_ReadMemory

Return type of callout Dcm_WriteMemory

Security Level type definition

Session type definition. 0, 127 and all values above 127 are reserved by ISO.

Base item type to transport status information.

ModeDeclarationGroup representing the different communication control states

ModeDeclarationGroup representing the enable/disable state for DTC storage

ModeDeclarationGroup representing the different diagnostic sessions Further modes to be added: {ecuc(DCM/DcmConfigSet/DcmDsp/DcmDspSession/ DcmDspSessionRow.SHORT-NAME)}

ModeDeclarationGroup representing the different ECU reset types

ModeDeclarationGroup representing the enable/disable state of rapid power shutdown

ModeDeclarationGroup representing the state of a Response On Event

ModeDeclarationGroup representing the different diagnostic security levels Further modes to be added: {ecuc(DCM/DcmConfigSet/DcmDsp/DcmDsp Security/DcmDspSecurityRow.SHORT-NAME)}

A ModeSwitchInterface PPortPrototype used to notify SW-Cs about the current Diagnostic Session

A ModeSwitchInterface PPortPrototype used to notify SW-Cs about an upcoming ECU Reset and its type

A ModeSwitchInterface PPortPrototype used to notify SW-Cs about the rapid power shut down mode

A ModeSwitchInterface PPortPrototype used to notify SW-Cs about the current Security Level

DEM

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

Std_ReturnType Dem_CallbackEventSyncStorageProcessed (void);
Dem_ClearDTC function

Clears single DTCs, as well as groups of DTCs.

Std_ReturnType Dem_ClearDTC (uint8 ClientId);

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)

Std_ReturnType Dem_ClearPrestoredFreezeFrame (Dem_EventIdType EventId);

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)

Std_ReturnType Dem_DcmGetAvailableOBDMIDs (uint8 Obdmid, uint32* Obdmidvalue);

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)

Std_ReturnType Dem_DcmGetDTCOfOBDFreezeFrame (uint8 FrameNumber, uint32* DTC, Dem_DTCFormatType DTCFormat);

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)

Std_ReturnType Dem_DcmGetDTRData (uint8 Obdmid, uint8 TIDindex, uint8* TIDvalue, uint8* UaSID, uint16* Testvalue, uint16* Lowlimvalue, uint16* Upplimvalue);

Service is used for requesting IUMPR data according to InfoType $08. This interface is derived from the prototype _GetInfotypeValueData() defined by the DCM. Therefore Dcm_Op StatusType and Std_ReturnType are contained. 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)

Std_ReturnType Dem_DcmGetInfoTypeValue08 (Dcm_OpStatusType OpStatus, uint8* Iumprdata08, uint8* Iumprdata08BufferSize);

Service is used for requesting IUMPR data according to InfoType $0B. This interface is derived from the prototype _GetInfotypeValueData() defined by the DCM. Therefore Dcm_Op StatusType and Std_ReturnType are contained. 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)

Std_ReturnType Dem_DcmGetInfoTypeValue0B (Dcm_OpStatusType OpStatus, uint8* Iumprdata0B, uint8* Iumprdata0BBufferSize);

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)

Std_ReturnType Dem_DcmGetNumTIDsOfOBDMID (uint8 Obdmid, uint8* numberOfTIDs);

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)

Std_ReturnType Dem_DcmReadDataOfOBDFreezeFrame (uint8 PID, uint8 DataElementIndexOfPID, uint8* DestBuffer, uint16* BufSize);

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)

Std_ReturnType Dem_DcmReadDataOfPID01 (uint8* PID01value);

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)

Std_ReturnType Dem_DcmReadDataOfPID1C (uint8* PID1Cvalue);

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)

Std_ReturnType Dem_DcmReadDataOfPID21 (uint8* PID21value);

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)

Std_ReturnType Dem_DcmReadDataOfPID30 (uint8* PID30value);

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)

Std_ReturnType Dem_DcmReadDataOfPID31 (uint8* PID31value);

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)

Std_ReturnType Dem_DcmReadDataOfPID41 (uint8* PID41value);

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)

Std_ReturnType Dem_DcmReadDataOfPID4D (uint8* PID4Dvalue);

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)

Std_ReturnType Dem_DcmReadDataOfPID4E (uint8* PID4Evalue);

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)

Std_ReturnType Dem_DcmReadDataOfPID91 (uint8* PID91value);

Disables the event memory update of a specific DTC (only one at one time).

Std_ReturnType Dem_DisableDTCRecordUpdate (uint8 ClientId);

Disables the DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client.

Std_ReturnType Dem_DisableDTCSetting (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.

Std_ReturnType Dem_EnableDTCRecordUpdate (uint8 ClientId);

(Re)-Enables the DTC setting for all DTCs assigned to the DemEventMemorySet of the addressed client.

Std_ReturnType Dem_EnableDTCSetting (uint8 ClientId);

Service to report the value of the B1 counter computed by the DEM. API is needed in WWH-OBD relevant ECUs only

Std_ReturnType Dem_GetB1Counter (uint16* B1Counter);

Gets the failed status of a DemComponent.

Std_ReturnType Dem_GetComponentFailed (Dem_ComponentIdType ComponentId, boolean* ComponentFailed);

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)

Std_ReturnType Dem_GetCycleQualified (uint8 OperationCycleId, boolean* isQualified);

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)

Std_ReturnType Dem_GetDataOfPID21 (uint8* PID21value);

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.

Std_ReturnType Dem_GetDebouncingOfEvent (Dem_EventIdType EventId, Dem_DebouncingStateType* DebouncingState);

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.

Std_ReturnType Dem_GetDTCByOccurrenceTime (uint8 ClientId, Dem_DTCRequestType DTCRequest, uint32* DTC);

Gets the DTC of an event.

Std_ReturnType Dem_GetDTCOfEvent (Dem_EventIdType EventId, Dem_DTCFormatType DTCFormat, uint32* DTCOfEvent);

Provides information if the last call to Dem_SelectDTC has selected a valid DTC or group of DTCs.

Std_ReturnType Dem_GetDTCSelectionResult (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.

Std_ReturnType Dem_GetDTCSelectionResultForClearDTC (uint8 ClientId);

Gets the DTC Severity availability mask.

Std_ReturnType Dem_GetDTCSeverityAvailabilityMask (uint8 ClientId, Dem_DTCSeverityType* DTCSeverityMask);

Gets the DTC Status availability mask of the selected fault memory.

Std_ReturnType Dem_GetDTCStatusAvailabilityMask (uint8 ClientId, Dem_UdsStatusByteType* DTCStatusMask, Dem_DTCOriginType DTCOrigin);

Returns the suppression status of a specific DTC. API Availability: This API will be available only if ({ecuc(DEM/DemGeneral.DemSuppressionSupport)} == DEM_DTC_SUPPRESSION)

Std_ReturnType Dem_GetDTCSuppression (uint8 ClientId, boolean* SuppressionStatus);

Get the Event's availability.

Std_ReturnType Dem_GetEventAvailable (Dem_EventIdType EventId, boolean* AvailableStatus);

Gets the data of an extended data record by event.

Std_ReturnType Dem_GetEventExtendedDataRecordEx (Dem_EventIdType EventId, uint8 RecordNumber, uint8* DestBuffer, uint16* BufSize);

Gets the data of a freeze frame by event.

Std_ReturnType Dem_GetEventFreezeFrameDataEx (Dem_EventIdType EventId, uint8 RecordNumber, uint16 DataId, uint8* DestBuffer, uint16* BufSize);

Gets the event memory overflow indication status.

Std_ReturnType Dem_GetEventMemoryOverflow (uint8 ClientId, Dem_DTCOriginType DTCOrigin, boolean* OverflowIndication);

Gets the current UDS status byte assigned to the DTC for the event

Std_ReturnType Dem_GetEventUdsStatus (Dem_EventIdType EventId, Dem_UdsStatusByteType* UDSStatusByte);

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.

Std_ReturnType Dem_GetFaultDetectionCounter (Dem_EventIdType EventId, sint8* FaultDetectionCounter);

Gets the functional unit of the requested DTC.

Std_ReturnType Dem_GetFunctionalUnitOfDTC (uint8 ClientId, uint8* DTCFunctionalUnit);

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)

Std_ReturnType Dem_GetIndicatorStatus (uint8 IndicatorId, Dem_IndicatorStatusType* IndicatorStatus);

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)

Std_ReturnType Dem_GetIUMPRDenCondition (Dem_IumprDenomCondIdType ConditionId, Dem_IumprDenomCondStatusType* ConditionStatus);

Gets the current monitor status for an event.

Std_ReturnType Dem_GetMonitorStatus (Dem_EventIdType EventID, Dem_MonitorStatusType* MonitorStatus);

Gets extended data record for the DTC selected by Dem_SelectExtendedDataRecord. The function stores the data in the provided DestBuffer.

Std_ReturnType Dem_GetNextExtendedDataRecord (uint8 ClientId, uint8* DestBuffer, uint16* BufSize);

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.

Std_ReturnType Dem_GetNextFilteredDTC (uint8 ClientId, uint32* DTC, uint8* DTCStatus);

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.

Std_ReturnType Dem_GetNextFilteredDTCAndFDC (uint8 ClientId, uint32* DTC, sint8* DTCFaultDetectionCounter);

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.

Std_ReturnType Dem_GetNextFilteredDTCAndSeverity (uint8 ClientId, uint32* DTC, uint8* DTCStatus, Dem_DTCSeverityType* DTCSeverity, uint8* DTCFunctionalUnit);

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.

Std_ReturnType Dem_GetNextFilteredRecord (uint8 ClientId, uint32* DTC, uint8* RecordNumber);

Gets freeze frame data by the DTC selected by Dem_SelectFreezeFrameData. The function stores the data in the provided DestBuffer.

Std_ReturnType Dem_GetNextFreezeFrameData (uint8 ClientId, uint8* DestBuffer, uint16* BufSize);

Returns the number of entries currently stored in the requested event memory.

Std_ReturnType Dem_GetNumberOfEventMemoryEntries (uint8 ClientId, Dem_DTCOriginType DTCOrigin, uint8* NumberOfEventMemoryEntries);

Gets the number of a filtered DTC.

Std_ReturnType Dem_GetNumberOfFilteredDTC (uint8 ClientId, uint16* NumberOfFilteredDTC);

This function returns the number of all freeze frame records currently stored in the primary event memory

Std_ReturnType Dem_GetNumberOfFreezeFrameRecords (uint8 ClientId, uint16* NumberOfFilteredRecords);

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).

Std_ReturnType Dem_GetSeverityOfDTC (Dem_DTCSeverityType* DTCSeverity, uint8 ClientId);

Gets the size of Extended Data Record by DTC selected by the call of Dem_SelectExtended DataRecord.

Std_ReturnType Dem_GetSizeOfExtendedDataRecordSelection (uint8 ClientId, uint32* SizeOfExtendedDataRecord);

Gets the size of freeze frame data by DTC selected by the call of Dem_SelectFreezeFrame Data.

Std_ReturnType Dem_GetSizeOfFreezeFrameSelection (uint8 ClientId, uint32* SizeOfFreezeFrame);

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.

Std_ReturnType Dem_GetStatusOfDTC (uint8 ClientId, uint8* DTCStatus);

Gets the supported DTC formats of the ECU.The supported formats are configured via DEM TypeOfDTCSupported.

Dem_DTCTranslationFormatType Dem_GetTranslationType (uint8 ClientId);

Returns the version information of this module. API Availability: This API will be available only if ({ecuc(DEM/DemGeneral.DemVersionInfoApi)} == true)

void Dem_GetVersionInfo (Std_VersionInfoType* versioninfo);
Dem_Init function

Initializes or reinitializes this module.

void Dem_Init (const Dem_ConfigType* ConfigPtr);

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).

Std_ReturnType Dem_J1939DcmClearDTC (Dem_J1939DcmSetClearFilterType DTCTypeFilter, Dem_DTCOriginType DTCOrigin, uint8 ClientId);

The function sets the filter to the first applicable DTC for the DM31 response for a specific node.

void Dem_J1939DcmFirstDTCwithLampStatus (uint8 ClientId);

Gets the next filtered J1939 DTC for DM31 including current LampStatus.

Std_ReturnType Dem_J1939DcmGetNextDTCwithLampStatus (Dem_J1939DcmLampStatusType* LampStatus, uint32* J1939DTC, uint8* OccurenceCounter, uint8 ClientId);

Gets the next filtered J1939 DTC.

Std_ReturnType Dem_J1939DcmGetNextFilteredDTC (uint32* J1939DTC, uint8* OccurenceCounter, uint8 ClientId);

Gets the next filtered Ratio.

Std_ReturnType Dem_J1939DcmGetNextFilteredRatio (uint32* SPN, uint16* Numerator, uint16* Denominator, uint8 ClientId);

Gets next freeze frame data. The function stores the data in the provided DestBuffer.

Std_ReturnType Dem_J1939DcmGetNextFreezeFrame (uint32* J1939DTC, uint8* OccurenceCounter, uint8* DestBuffer, uint16* BufSize, uint8 ClientId);

Gets next SPN.

Std_ReturnType Dem_J1939DcmGetNextSPNInFreezeFrame (uint32* SPNSupported, uint8* SPNDataLength, uint8 ClientId);

Gets the number of currently filtered DTCs set by the function Dem_J1939DcmSetDTCFilter.

Std_ReturnType Dem_J1939DcmGetNumberOfFilteredDTC (uint16* NumberOfFilteredDTC, uint8 ClientId);

Service to report the value of Diagnostic Readiness 1 (DM05) computed by the DEM.

Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness1 (Dem_J1939DcmDiagnosticReadiness1Type* DataValue, uint8 ClientId);

Service to report the value of Diagnostic Readiness 2 (DM21) computed by the DEM.

Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness2 (Dem_J1939DcmDiagnosticReadiness2Type* DataValue, uint8 ClientId);

Service to report the value of Diagnostic Readiness 3 (DM26) computed by the DEM.

Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness3 (Dem_J1939DcmDiagnosticReadiness3Type* DataValue, uint8 ClientId);

The function sets the DTC filter for a specific node and returns the composite lamp status of the filtered DTCs.

Std_ReturnType Dem_J1939DcmSetDTCFilter (Dem_J1939DcmDTCStatusFilterType DTCStatusFilter, Dem_DTCKindType DTCKind, Dem_DTCOriginType DTCOrigin, uint8 ClientId, Dem_J1939DcmLampStatusType* LampStatus);

The function sets the FreezeFrame filter for a specific node.

Std_ReturnType Dem_J1939DcmSetFreezeFrameFilter (Dem_J1939DcmSetFreezeFrameFilterType FreezeFrameKind, uint8 ClientId);

The function sets the Ratio filter for a specific node and returns the corresponding Ignition Cycle Counter and General Denominator.

Std_ReturnType Dem_J1939DcmSetRatioFilter (uint16* IgnitionCycleCounter, uint16* OBDMonitoringConditionsEncountered, uint8 ClientId);

Processes all not event based DEM internal functions.

void Dem_MainFunction (void);
Dem_PreInit function

Initializes the internal states necessary to process events reported by BSW-modules.

void Dem_PreInit (void);

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)

Std_ReturnType Dem_PrestoreFreezeFrame (Dem_EventIdType EventId);

Service to report the value of PID $01 computed by the DEM. API is needed in OBD relevant ECUs only

Std_ReturnType Dem_ReadDataOfPID01 (uint8* PID01value);

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)

Std_ReturnType Dem_RepIUMPRDenRelease (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)

Std_ReturnType Dem_RepIUMPRFaultDetect (Dem_RatioIdType RatioID);

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).

Std_ReturnType Dem_ResetEventDebounceStatus (Dem_EventIdType EventId, Dem_DebounceResetStatusType DebounceResetStatus);

Resets the event failed status. This API can only be used through the RTE and therefore no declaration is exported via Dem.h.

Std_ReturnType Dem_ResetEventStatus (Dem_EventIdType EventId);

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.

Std_ReturnType Dem_RestartOperationCycle (uint8 OperationCycleId);
Dem_SelectDTC function

Selects a DTC or DTC group as target for further operations.

Std_ReturnType Dem_SelectDTC (uint8 ClientId, uint32 DTC, Dem_DTCFormatType DTCFormat, Dem_DTCOriginType DTCOrigin);

Sets the filter to be used by Dem_GetNextExtendedDataRecord and Dem_GetSizeOfExtended DataRecordSelection.

Std_ReturnType Dem_SelectExtendedDataRecord (uint8 ClientId, uint8 ExtendedDataNumber);

Sets the filter to be used by Dem_GetNextFreezeFrameData and Dem_GetSizeOfFreezeFrame Selection.

Std_ReturnType Dem_SelectFreezeFrameData (uint8 ClientId, uint8 RecordNumber);

Set the availability of a specific DemComponent.

Std_ReturnType Dem_SetComponentAvailable (Dem_ComponentIdType ComponentId, boolean AvailableStatus);

Sets a dependent operation cycle as qualified, so it may be processed along with its leading cycle.

Std_ReturnType Dem_SetCycleQualified (uint8 OperationCycleId);

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)

Std_ReturnType Dem_SetDataOfPID21 (const uint8* PID21value);

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)

Std_ReturnType Dem_SetDataOfPID31 (const uint8* PID31value);

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)

Std_ReturnType Dem_SetDataOfPID4D (const uint8* PID4Dvalue);

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)

Std_ReturnType Dem_SetDataOfPID4E (const uint8* PID4Evalue);

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

Std_ReturnType Dem_SetDTCFilter (uint8 ClientId, uint8 DTCStatusMask, Dem_DTCFormatType DTCFormat, Dem_DTCOriginType DTCOrigin, boolean FilterWithSeverity, Dem_DTCSeverityType DTCSeverityMask, boolean FilterForFaultDetectionCounter);

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)

Std_ReturnType Dem_SetDTCSuppression (uint8 ClientId, boolean SuppressionStatus);
Dem_SetDTR function

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)

Std_ReturnType Dem_SetDTR (uint16 DTRId, sint32 TestResult, sint32 LowerLimit, sint32 UpperLimit, Dem_DTRControlType Ctrlval);

Sets an enable condition. API Availability: This API will be available only if ({ecuc(DEM/DemGeneral/DemEnable Condition)} != NULL)

Std_ReturnType Dem_SetEnableCondition (uint8 EnableConditionID, boolean ConditionFulfilled);

Set the available status of a specific Event.

Std_ReturnType Dem_SetEventAvailable (Dem_EventIdType EventId, boolean AvailableStatus);

Set the failure confirmation threshold of an event.

Std_ReturnType Dem_SetEventConfirmationThresholdCounter (Dem_EventIdType EventId, uint8 FailureCycleCounterThreshold);

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)

Std_ReturnType Dem_SetEventDisabled (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

void Dem_SetEventFailedWithSyncFreezeFrame (Dem_EventIdType EventId);

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)

Std_ReturnType Dem_SetEventStatus (Dem_EventIdType EventId, Dem_EventStatusType EventStatus);

This API will be available only if ({DEM/DemConfigSet/DemEventParameter/DemEvent ReportingType} == STANDARD_REPORTING_WITH_MONITOR_DATA)

Std_ReturnType Dem_SetEventStatusWithMonitorData (Dem_EventIdType EventId, Dem_EventStatusType EventStatus, Dem_MonitorDataType monitorData0, Dem_MonitorDataType monitorData1);

Sets a freeze frame record filter.

Std_ReturnType Dem_SetFreezeFrameRecordFilter (uint8 ClientId, Dem_DTCFormatType DTCFormat);

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)

Std_ReturnType Dem_SetIUMPRDenCondition (Dem_IumprDenomCondIdType ConditionId, Dem_IumprDenomCondStatusType ConditionStatus);

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)

Std_ReturnType Dem_SetPtoStatus (boolean PtoStatus);

Sets a storage condition. API Availability: This API will be available only if ({ecuc(DEM/DemGeneral/DemStorage Condition)} != NULL)

Std_ReturnType Dem_SetStorageCondition (uint8 StorageConditionID, boolean ConditionFulfilled);

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.

Std_ReturnType Dem_SetWIRStatus (Dem_EventIdType EventId, boolean WIRStatus);
Dem_Shutdown function

Shuts down this module.

void Dem_Shutdown (void);

Identification of a DemComponent by assigned ComponentId. The ComponentId is automatically assigned by the DEM.

This type of the external data structure shall contain the post build initialization data for the DEM.

Array data type definition for external data elements

Data type definition for external data elements

This type contains all definitions to control an internal debounce counter/timer via the function Dem_ResetEventDebounceStatus().

This type is used to select the format of the DTC value.

This type is used to filter DTCs for their kind.

This enum is used to define the location of the events. The definition and use of the different memory types is OEM-specific.

This type is used to request a DTC with specific attributes.

DTC translation format as defined in ISO14229-1.

Control parameter for the interpretation of the reported test results.

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.

This type contains all monitor test result values, which can be reported via Dem_SetEventStatus().

Indicator mode used by Dem_GetIndicatorStatus().

(Re-)Initialization reason returned by the callback _DemInitMonitorFor().

This type contains all possible additional IUMPR denominator conditions to be broadcasted among OBD-relevant ECUs.

This type contains all possible states of an additional IUMPR denominator condition to be broadcasted among OBD-relevant ECUs.

This structure represents all data elemets of the DM05 message. The encoding shall be done acording SAE J1939-73

This structure represents all data elemets of the DM21 message. The encoding shall be done acording SAE J1939-73

This structure represents all data elemets of the DM26 message. The encoding shall be done acording SAE J1939-73

The type to distinguish which DTCs should be filtered.

For details refer SAE J1939-73

The type to distinguish which DTCs gets cleared

The type to distinguish which DTCs gets cleared

This type is used to pass monitoring data to the DEM.

OBD specific ratio Id (related to a specific event, a FID, and an IUMPR group). This type depends on the DEM configuration.

DET

-

Std_ReturnType <DetReportRuntimeErrorCallout> (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId);

-

Std_ReturnType <DetReportTransientFaultCallout> (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 FaultId);

-

Std_ReturnType <User_Error_Hooks> (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId);

Returns the version information of this module.

void Det_GetVersionInfo (Std_VersionInfoType* versioninfo);
Det_Init function

Service to initialize the Default Error Tracer.

void Det_Init (const Det_ConfigType* ConfigPtr);

Service to report development errors.

Std_ReturnType Det_ReportError (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId);

Service to report runtime errors. If a callout has been configured then this callout shall be called.

Std_ReturnType Det_ReportRuntimeError (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, faultErrorTracer uint8 ErrorId);

Service to report transient faults. If a callout has been configured than this callout shall be called and the returned value of the callout shall be returned. Otherwise it returns immediately with E_ OK.

Std_ReturnType Det_ReportTransientFault (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 FaultId);
Det_Start function

Service to start the Default Error Tracer.

void Det_Start (void);

Configuration data structure of the DET module.

Dlt

Service Dlt_CopyRxData.

BufReq_ReturnType Dlt_CopyRxData (PduIdType id, const PduInfoType* info, PduLengthType* bufferSizePtr);

Service Dlt_CopyTxData.

BufReq_ReturnType Dlt_CopyTxData (PduIdType id, const PduInfoType* info, const RetryInfoType* retry, PduLengthType* availableDataPtr);

Service to fo rward error reports from DET to Dlt.

void Dlt_DetForwardErrorTrace (uint16 moduleId, uint8 instanceId, uint8 apiId, uint8 errorId);

Returns the Default Log Level currently used by the Dlt module. The returned Log Level might differ from the one which is stored no n volatile.

Std_ReturnType Dlt_GetDefaultLogLevel (Dlt_MessageLogLevelType* defaultLogLevel);

Called to request information about registered Application Ids, their Context Ids and the corresponding log level.

Std_ReturnType Dlt_GetLogInfo (uint8 options, Dlt_ApplicationIDType appId, Dlt_ContextIDType contextId, uint8* status, Dlt_LogInfoType* logInfo);

Returns the current Trace Status for a given tuple Application Id/ Context Id.

Std_ReturnType Dlt_GetTraceStatus (Dlt_ApplicationIDType appId, Dlt_ContextIDType contextId, boolean* traceStatus);

Returns the version information of this module.

void Dlt_GetVersionInfo (Std_VersionInfoType* versioninfo);
Dlt_Init function

Dlt is using the NVRam Manager and is to be initialized very late in the ECU startup phase. The Dlt_ Init() function should be called after the NVRam Manager is initialized.

void Dlt_Init (const Dlt_ConfigType* config);

The service Dlt_ Reset To Factory Default sets the Log Level and Trace Status back to the pers istently stored default values. If the feature Nv MRAM support is enabled, all stored Dlt values in the Nv M are deleted.

Std_ReturnType Dlt_ResetToFactoryDefault (void);

Indication of a received PDU from a lower layer communication interface module.

void Dlt_RxIndication (PduIdType RxPduId, const PduInfoType* PduInfoPtr);

The service represents the interface to be used by basic software modules or by software component to send Log Messages.

Std_ReturnType Dlt_SendLogMessage (Dlt_SessionIDType sessionId, const Dlt_MessageLogInfoType* logInfo, const uint8* logData, uint16 logDataLength);

The service represents the interface to be used by basic software modules or by software components to trace parameters.

Std_ReturnType Dlt_SendTraceMessage (Dlt_SessionIDType sessionId, const Dlt_MessageTraceInfoType* traceInfo, const uint8* traceData, uint16 traceDataLength);

Called to modify the pass through range for Log Messages for all not explicit set Context Ids.

Std_ReturnType Dlt_SetDefaultLogLevel (Dlt_MessageLogLevelType newLogLevel);

This service is used to change the Log Level for the given tuple of Application ID/ Context ID.

Std_ReturnType Dlt_SetLogLevel (Dlt_ApplicationIDType appId, Dlt_ContextIDType contextId, Dlt_MessageLogLevelType newLogLevel);

Switches on/ off the mes sage filtering functionality of the Dlt module.

Std_ReturnType Dlt_SetMessageFiltering (boolean status);

The service Dlt_ Set Trace Status sets the trace status for a specific tuple of Application ID and Context ID.

Std_ReturnType Dlt_SetTraceStatus (Dlt_ApplicationIDType appId, Dlt_ContextIDType contextId, boolean newTraceStatus);

This function is called at the start of receiving an N -

BufReq_ReturnType Dlt_StartOfReception (PduIdType id, const PduInfoType* info, PduLengthType TpSduLength, PduLengthType* bufferSizePtr);

Copies the current Dlt configuration to Nv RAM by calling Nv M_ Write Block().

Std_ReturnType Dlt_StoreConfiguration (void);

Called after an I - PDU has been received via the TP API, the result indicates whether the transmission was successful or not.

void Dlt_TpRxIndication (PduIdType id, Std_ReturnType result);

This function is called after the I - PDU has been transmitted on its network, the result indicates whether the transmission was succe ssful or not.

void Dlt_TpTxConfirmation (PduIdType id, Std_ReturnType result);

Within this API , the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and update the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr.

Std_ReturnType Dlt_TriggerTransmit (PduIdType TxPduId, PduInfoType* PduInfoPtr);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

void Dlt_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);

-

void Dlt_TxFunction (void);

The service has to be called when a software module is going to be stopped. Available vi a Dlt.h

Std_ReturnType Dlt_UnregisterContext (Dlt_SessionIDType sessionId, Dlt_ApplicationIDType appId, Dlt_ContextIDType contextId);

Information about Applications

This type describes the Application Id. 0x00000000 means the so - called wildcard.

Adding or removing a Log Channel assignment for the given tuple of Application Id/ Context Id.

This is the type of the data structure containing the initialization data for Dlt.

Context Information

This type describes the Context Id. 0x00000000 means the so - called wildcard.

This type describes the count of arguments provided to a message.

Contains the unique Message Id for a message. This is only relevant in non - verbose mode.

This type describes the log lev el for each log message.

This type describes transported type of a Dlt BUSMESSAGE.

This type describes labels for trace messages.

This type describes the type of the message.

This type identifies the session.

Type type

This type describes the Log Channel name.

FiM

Service CBFidStatusChanged.

Std_ReturnType CBFidStatusChanged(FiM_FidStatusChangeType Status, boolean Permission);
FiM_DemInit function

This service re-initializes the FIM.

void FiM_DemInit(void);

Triggers on changes of the component failed status.

void FiM_DemTriggerOnComponentStatus(Dem_ComponentIdType ComponentId, boolean ComponentFailedStatus);

This service is provided to be called by the DEM in order to inform the Fim about monitor status changes.

void FiM_DemTriggerOnMonitorStatus(Dem_EventIdType EventId);

This service reports the permission state to the functionality.

Std_ReturnType FiM_GetFunctionPermission(FiM_FunctionIdType FID, boolean* Permission);

This service returns the version information of this module.

void FiM_GetVersionInfo(Std_VersionInfoType* versioninfo);
FiM_Init function

This service initializes the FIM.

void FiM_Init(const FiM_ConfigType* FiMConfigPtr);

Service FiM_MainFunction.

void FiM_MainFunction(void);

This service sets the availability of a function. The function is only available if FiMAvailability Support is configured as True.

Std_ReturnType FiM_SetFunctionAvailable(FiM_FunctionIdType FID, boolean Availability);

This type defines a data structure for the post build parameters of the FIM. At initialization the FIM gets a pointer to a structure of this type to get access to its configuration data, which is necessary for initializsation.

Type for the FunctionID Variation –

Cluster guideAI-GENERATED

Central cluster for handling UDS and OBD diagnostic services, event storage, and system error tracing.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 44f18f16182b Provenance Open questions (1)
Causal anchor: R20-11 Valid from R20-11 Synthesized for this specification release.
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Central cluster for handling UDS and OBD diagnostic services, event storage, and system error tracing.

The Diagnostic Services module cluster (DCM, DEM, DET, Dlt) bundles protocol processing for UDS and OBD diagnostic services as well as central error management and tracing in the AUTOSAR Classic Platform (SWS DiagnosticCommunicationManager p. 56). The DCM processes incoming tester requests via PduR buffers and queries status, snapshot, and freeze frame data from the DEM ([SWS_Dcm_00094], [SWS_Dem_00215]). Concurrently, DET and Dlt record development errors and runtime logs for fault diagnosis ([SWS_Det_00181], [SWS_Dlt_00241]).

The Diagnostic Services module cluster of the AUTOSAR Classic Platform consists of the four modules DCM, DEM, DET, and Dlt. It forms the central foundation for handling external diagnostic sessions (UDS in accordance with ISO 14229, OBD in accordance with ISO 15031-5), for ECU error management, and for development and operational monitoring (SWS DiagnosticCommunicationManager p. 56, SWS DiagnosticEventManager p. 247).

Diagnostic requests from testers are initiated by the PduR module via Dcm_StartOfReception and, after reception, passed to the DCM via Dcm_TpRxIndication ([SWS_Dcm_00094], [SWS_Dcm_00093]). The DCM decodes the protocols and directly accesses the DEM for status queries, DTC lists, or freeze frame data (e.g., via Dem_GetStatusOfDTC or Dem_GetNextFilteredDTC) ([SWS_Dem_00212], [SWS_Dem_00215]). Asynchronous interfaces signal via DEM_PENDING or DCM_E_PENDING that computations are continued in the context of the cyclic MainFunctions ([SWS_Dem_00236], [SWS_Dcm_00539]).

diag_cluster_arch cluster_diag Diagnostic Services Cluster Dcm DCM Dem DEM Dcm->Dem Dem_GetStatusOfDTC / Dem_DcmReadDataOfPID... PduR PduR Dcm->PduR PduR_DcmTransmit NvM NvM Dem->NvM NvM_WriteBlock / NvM_ReadBlock Det DET Dlt Dlt Dlt->PduR PduR_DltTransmit Dlt->NvM NvM_WriteBlock / NvM_ReadBlock PduR->Dcm Dcm_StartOfReception / Dcm_TpRxIndication ComM ComM ComM->Dcm Dcm_ComM_<Mode>Entered SWC SWC SWC->Dem Dem_SetEventStatus SWC->Det Det_ReportError SWC->Dlt Dlt_SendLogMessage

Context diagram: Embedding of the cluster modules DCM, DEM, DET, and DLT into the AUTOSAR architecture. Sources: SWS DiagnosticEventManager p. 247, SWS DiagnosticCommunicationManager p. 55

The DEM qualifies errors via time- or counter-based debouncing ([SWS_Dem_00426], [SWS_Dem_00683]) and manages primary and user memory with configurable displacement strategies ([SWS_Dem_00400]). In parallel, the DET captures development errors via Det_ReportError ([SWS_Det_00009]), while the Dlt module filters logging and tracing messages via Dlt_SendLogMessage and provides them via configured log channels ([SWS_Dlt_00241], [SWS_Dlt_00740]).

Ablauf UDS-DTC-Statusabfrage (Service 0x19)TesterPduRDcmDemUse Case: Reception of the diagnostic requestUDS Request (0x19 0x02)Dcm_StartOfReception(id, TpSduLength)BUFREQ_OKDcm_TpRxIndication(id, E_OK)Use Case: Processing in the clusterDem_GetNextFilteredDTC(ClientId, &DTC, &Status)E_OK (DTC-Daten)Use Case: Response transmissionPduR_DcmTransmit(TxPduId, PduInfo)UDS Positive Response (0x59 0x02)Dcm_TpTxConfirmation(TxPduId, E_OK)

Sequence diagram: Execution of a UDS DTC status query between tester, DCM, and DEM. Sources: SWS DiagnosticCommunicationManager p. 55, [SWS_Dem_00215]

The operating modes of the DCM are primarily synchronized by the ComM via callbacks such as Dcm_ComM_FullComModeEntered and Dcm_ComM_NoComModeEntered ([SWS_Dcm_00356], [SWS_Dcm_00360]). Dem and Dlt secure non-volatile states via the NvM module ([SWS_Dem_00181], [SWS_Dlt_00453]).

1. System Architecture & Role of the Module Cluster

The Diagnostic Services module cluster of the AUTOSAR Classic Platform bundles all core functions for on-board and off-board diagnostics, error detection, and system monitoring in the System Services layer. It consists of the four Basic Software modules DCM (Diagnostic Communication Manager), DEM (Diagnostic Event Manager), DET (Default Error Tracer), and Dlt (Diagnostic Log and Trace). Together, these modules form the standardized link between off-board diagnostic testers, the internal functional software, and the standardized protocols in accordance with ISO 14229 (UDS) as well as ISO 15031-5 and SAE J1979 (OBD) (SWS DiagnosticCommunicationManager p. 56, SWS DiagnosticEventManager p. 186).

The DCM acts as protocol manager for diagnostic requests from testers. Internally, it is divided into the submodules Diagnostic Session Layer (DSL), Diagnostic Service Dispatcher (DSD), and Diagnostic Service Processing (DSP). The DCM handles session control and security levels ([SWS_Dcm_00338], [SWS_Dcm_00339]), receives diagnostic PDUs via the PduR module ([SWS_Dcm_00094]), and forwards service-related requests to application SW-Cs or the DEM ([SWS_Dcm_00111]). The DEM acts as central diagnostic memory: it processes error reports from monitors, executes debouncing algorithms ([SWS_Dem_00426], [SWS_Dem_00683]), manages Diagnostic Trouble Codes (DTCs), status masks ([SWS_Dem_00213]), and associated snapshot and extended data records ([SWS_Dem_00039], [SWS_Dem_00239]).

In addition, the DET handles the capture of development, runtime, and transient errors of the Basic Software ([SWS_Det_00181], [SWS_Det_01003]), while the Dlt module aggregates, filters, and transmits standardized logging and tracing messages from applications and BSW modules to external tools ([SWS_Dlt_00224], [SWS_Dlt_00241], [SWS_Dlt_00243]).

diag_cluster_arch cluster_diag Diagnostic Services Cluster Dcm DCM Dem DEM Dcm->Dem Dem_GetStatusOfDTC / Dem_DcmReadDataOfPID... PduR PduR Dcm->PduR PduR_DcmTransmit NvM NvM Dem->NvM NvM_WriteBlock / NvM_ReadBlock Det DET Dlt Dlt Dlt->PduR PduR_DltTransmit Dlt->NvM NvM_WriteBlock / NvM_ReadBlock PduR->Dcm Dcm_StartOfReception / Dcm_TpRxIndication ComM ComM ComM->Dcm Dcm_ComM_<Mode>Entered SWC SWC SWC->Dem Dem_SetEventStatus SWC->Det Det_ReportError SWC->Dlt Dlt_SendLogMessage

Context diagram: Embedding of the cluster modules DCM, DEM, DET, and DLT into the AUTOSAR architecture. Sources: SWS DiagnosticEventManager p. 247, SWS DiagnosticCommunicationManager p. 55, SWS DiagnosticLogAndTrace p. 46

2. Interplay & Interaction Paths between the Modules

The primary external interaction path is initiated by incoming diagnostic messages from the tester. When a transport protocol signals new diagnostic data via the PduR, the PduR calls Dcm_StartOfReception ([SWS_Dcm_00094], [SWS_Dcm_01672]). If buffer capacity is sufficient, the DCM reserves the resources and acknowledges with BUFREQ_OK; otherwise, the transmission is rejected with BUFREQ_E_OVFL or BUFREQ_E_NOT_OK ([SWS_Dcm_00444], [SWS_Dcm_00642]). Upon complete reception of the I-PDU, the PduR calls Dcm_TpRxIndication, whereupon the payload is passed from the DSL to the DSD ([SWS_Dcm_00093], [SWS_Dcm_00111]).

For diagnostic requests such as UDS Service 0x19 (ReadDTCInformation) or OBD services ($01, $02, $03, $06), the DCM accesses standardized DEM interfaces synchronously and asynchronously (AUTOSAR SWS DiagnosticEventManager p. 370, AUTOSAR SWS DCM p. 87). For instance, the DCM reads status information via Dem_GetStatusOfDTC ([SWS_Dem_00212]) or filters DTCs successively by means of Dem_GetNextFilteredDTC ([SWS_Dem_00215]) or Dem_GetNextFilteredDTCAndFDC ([SWS_Dem_00227]). Freeze frame data and extended records are queried via Dem_GetSizeOfFreezeFrameSelection, Dem_GetNextFreezeFrameData, and Dem_GetNextExtendedDataRecord ([SWS_Dem_00071], [SWS_Dem_00074], [SWS_Dem_00236], [SWS_Dem_00239]). For emission-related PIDs, the DEM provides specific data buffers, such as for PID $01 via Dem_DcmReadDataOfPID01 ([SWS_Dem_00318]) or OBDMID test results via Dem_DcmGetAvailableOBDMIDs and Dem_DcmGetDTRData ([SWS_Dem_00766], [SWS_Dem_00768]).

In parallel, SW-Cs and BSW modules feed event reports into the DEM via Dem_SetEventStatus ([SWS_Dem_00183]) or reset debouncing states with Dem_ResetEventDebounceStatus ([SWS_Dem_00683]). All participating modules report errors in parameter checking or illegal API calls within the cluster to the DET via Det_ReportError ([SWS_Det_00009], [SWS_Det_00501]). For advanced tracing, applications pass structured messages to the Dlt via Dlt_SendLogMessage ([SWS_Dlt_00241], [SWS_Dlt_00236]) or Dlt_SendTraceMessage ([SWS_Dlt_00243], [SWS_Dlt_00237]).

Ablauf UDS-DTC-Statusabfrage (Service 0x19)TesterPduRDcmDemUse Case: Reception of the diagnostic requestUDS Request (0x19 0x02)Dcm_StartOfReception(id, TpSduLength)BUFREQ_OKDcm_TpRxIndication(id, E_OK)Use Case: Processing in the clusterDem_GetNextFilteredDTC(ClientId, &DTC, &Status)E_OK (DTC-Daten)Use Case: Response transmissionPduR_DcmTransmit(TxPduId, PduInfo)UDS Positive Response (0x59 0x02)Dcm_TpTxConfirmation(TxPduId, E_OK)

Sequence diagram: Execution of a UDS DTC status query between tester, DCM, and DEM. Sources: SWS DiagnosticCommunicationManager p. 55, AUTOSAR SWS DiagnosticEventManager p. 370, [SWS_Dem_00215]

3. Synchronization, Reentrancy, and Task Contexts

The cluster combines synchronous interface calls for fast status queries with asynchronous patterns for resource-intensive processing. Low-level callbacks of the PduR such as Dcm_TpRxIndication or Dlt_TxConfirmation can potentially be executed from interrupt context ([SWS_Dcm_00093], [SWS_Dlt_00273]). They must not contain blocking computations, but signal events to the responsible modules.

Cyclic processing occurs at task level via the main functions scheduled by the SchM, such as Dem_MainFunction (SWS DiagnosticEventManager p. 247). There, time-based debouncing ([SWS_Dem_00426]), NvM write operations, and memory clearing are processed. To avoid asynchronous conflicts, APIs such as Dem_GetStatusOfDTC or Dem_GetNextFilteredDTC are designed to be reentrant with respect to different ClientId instances, but strictly non-reentrant for the same ClientId ([SWS_Dem_00212], [SWS_Dem_00215]). Dem_SetEventStatus behaves similarly, which can be called reentrantly for different EventIds ([SWS_Dem_00183]).

For long-running operations, such as reading extensive snapshot data records or memory operations (e.g., Dcm_ReadMemory, Dcm_WriteMemory), return values such as DEM_PENDING or DCM_E_PENDING signal that processing is still ongoing and must be completed by subsequent calls in the cyclic task context ([SWS_Dem_00215], [SWS_Dem_00236], [SWS_Dcm_00539], [SWS_Dcm_00540]).

4. Typical Lifecycles and Operating Modes

The lifecycle of the cluster modules is subject to fixed initialization and deinitialization sequences. During the early startup phase, Det_Start starts the error tracer ([SWS_Det_00010]). The DEM undergoes a two-stage initialization: after Dem_PreInit, basic monitoring and debouncing are enabled ([SWS_Dem_00683]); the full initialization Dem_Init occurs after the start of the NvM ([SWS_Dem_00181]). Dlt_Init is called after the NvM to restore persisted filter and channel states via NvM_ReadBlock ([SWS_Dlt_00239], [SWS_Dlt_00453]). During system shutdown, the DEM saves its fault memory contents via Dem_Shutdown ([SWS_Dem_00182]).

During ongoing operation, the Communication Manager (ComM) controls the communication modes of the DCM via callback functions: Dcm_ComM_FullComModeEntered activates regular send and receive capability as well as periodic IDs ([SWS_Dcm_00360], SWS DiagnosticCommunicationManager p. 479). Dcm_ComM_SilentComModeEntered deactivates normal transmission ([SWS_Dcm_00358]), and Dcm_ComM_NoComModeEntered prevents any communication ([SWS_Dcm_00356]). During reprogramming or ECU resets, bootloader transfer parameters are exchanged via Dcm_SetProgConditions and Dcm_GetProgConditions ([SWS_Dcm_00543], [SWS_Dcm_00544]). A reset to the default session can be forced at any time via Dcm_ResetToDefaultSession ([SWS_Dcm_00520]).

diag_comm_modes NO_COM COMM_NO_COMMUNICATION (Kommunikation inaktiv) FULL_COM COMM_FULL_COMMUNICATION (Senden & Empfang aktiv) NO_COM->FULL_COM Dcm_ComM_FullComModeEntered() SILENT_COM COMM_SILENT_COMMUNICATION (Empfang aktiv, Senden inaktiv) SILENT_COM->NO_COM Dcm_ComM_NoComModeEntered() SILENT_COM->FULL_COM Dcm_ComM_FullComModeEntered() FULL_COM->NO_COM Dcm_ComM_NoComModeEntered() FULL_COM->SILENT_COM Dcm_ComM_SilentComModeEntered()

State diagram: Communication states of the DCM controlled by the ComM. Sources: AUTOSAR CP SWS DiagnosticCommunicationManager p. 478, [SWS_Dcm_00356], [SWS_Dcm_00358], [SWS_Dcm_00360]

5. Error Handling, DET Tracing, and Degradation

The diagnostic and error handling architecture strictly differentiates between development errors (DET) and operational system faults (DEM). The DET intercepts runtime and development errors via configured user callouts ([SWS_Det_00181], [SWS_Det_00501]). Transient errors were signaled via Det_ReportTransientFault ([SWS_Det_01003]). In the DCM, transmission errors due to missing confirmations are intercepted via Dcm_TxConfirmation, whereupon transmit buffers are released and timeouts are cleared ([SWS_Dcm_00351], ErrorDescription p. 26).

In the DEM, functional errors are qualified via debouncing filters ([SWS_Dem_00427], [SWS_Dem_00683]). Storage or debouncing can be selectively suppressed via enable and storage conditions (Dem_SetEnableCondition, Dem_SetStorageCondition) ([SWS_Dem_00201], [SWS_Dem_00556]). If the event memory threatens to become full, the displacement strategy takes effect, replacing existing entries of lower priority or passive entries ([SWS_Dem_00400], [SWS_Dem_00401], AUTOSAR SWS DiagnosticEventManager p. 98). Memory overflows are reported to clients via Dem_GetEventMemoryOverflow ([SWS_Dem_00559]). To deactivate limp-home programs, Dem_ResetEventStatus allows early resetting of the failed status ([SWS_Dem_00185], SWS DiagnosticEventManager p. 79).

The Dlt module supports error analysis through dynamic filtering of log levels (Dlt_SetDefaultLogLevel) and trace states (Dlt_SetTraceStatus, Dlt_SetMessageFiltering) ([SWS_Dlt_00254], [SWS_Dlt_00740], [SWS_Dlt_00770]). Configurations can be permanently saved (Dlt_StoreConfiguration) or reset to factory defaults via Dlt_ResetToFactoryDefault ([SWS_Dlt_00736], [SWS_Dlt_00739]). Interpretation: Direct coupling between DET and Dlt for automated forwarding of error messages is likely to take place in release R20-11 via standardized callout hooks or application tracing (SWS DefaultErrorTracer p. 1). Question Q-c1cf364915fb6635 (open)

This guide normatively summarizes the core architecture and functional interplay of the Diagnostic Services (DCM, DEM, DET, Dlt) according to AUTOSAR specifications R20-11.

Module im Cluster

Debugging (Dbg)

AUTOSAR Classic System Services-Modul Debugging (Dbg, Spezifikation: AUTOSAR_SWS_Debugging.pdf).

BSW ID 57 Keine C-API · 0 Records #include "Dbg.h"

Diagnostic Communication Manager (DCM)

The DCM implements unified diagnostic services according to ISO 14229-1 (UDS) and ISO 15765-4 (OBD). It manages diagnostic sessions, security levels, and service routing.

BSW ID 53 123 APIs (82 Funktionen, 41 Typen) #include "Dcm.h"

Diagnostic Event Manager (DEM)

The DEM is responsible for processing and storing diagnostic events, fault memories, DTC statuses, and associated freeze frame data.

BSW ID 54 141 APIs (109 Funktionen, 32 Typen) #include "Dem.h"

Default Error Tracer (DET)

The DET handles development errors, runtime errors, and transient faults across all BSW modules and SW-Cs.

BSW ID 15 10 APIs (9 Funktionen, 1 Typen) #include "Det.h"

Diagnostic Log and Trace (DLT)

The DLT module collects log messages and trace points and formats them into standardized DLT frames for external tooling.

BSW ID 55 42 APIs (24 Funktionen, 18 Typen) #include "Dlt.h"

Function Inhibition Manager (FiM)

AUTOSAR Classic System Services-Modul Function Inhibition Manager (FiM, Spezifikation: AUTOSAR_CP_SWS_FunctionInhibitionManager.pdf, AUTOSAR_SWS_FIM.pdf, AUTOSAR_SWS_FunctionInhibitionManager.pdf).

BSW ID 11 11 APIs (9 Funktionen, 2 Typen) #include "FiM.h"