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.
Funktionen — Übersicht
void Dcm_Init (const Dcm_ConfigType* ConfigPtr);Service for basic initialization of DCM module.void Dcm_GetVersionInfo (Std_VersionInfoType* versionInfo);Returns the version information of this moduleStd_ReturnType Dcm_DemTriggerOnDTCStatus (uint32 DTC, Dem_UdsStatusByteType DTCStatusOld, Dem_UdsStatusByteType DTCStatusNew);Triggers on changes of the UDS status byte.Std_ReturnType Dcm_GetVin (uint8* Data);Function to get the VIN (as defined in SAE J1979-DA)void Dcm_BndMWriteBlockFinish (BndM_BlockIdType BlockId, BndM_ResultType result);Called by BndM to indicate that a block write operation has finished.Std_ReturnType Dcm_SetDeauthenticatedRole (uint16 connectionId, Dcm_AuthenticationRoleType deauthenticatedRole);Sets a new role used in deauthenticated state for that connection.Std_ReturnType Dcm_GetSecurityLevel (Dcm_SecLevelType* SecLevel);This function provides the active security level value.Std_ReturnType Dcm_GetSesCtrlType (Dcm_SesCtrlType* SesCtrlType);This function provides the active session control type value.Std_ReturnType Dcm_GetActiveProtocol (Dcm_ProtocolType* ActiveProtocolType, uint16* ConnectionId, uint16* TesterSourceAddress);This function returns the active UDS protocol detailsStd_ReturnType Dcm_ResetToDefaultSession (void);The call to this function allows the application to reset the current session to Default session.Std_ReturnType Dcm_TriggerOnEvent (uint8 RoeEventId);The call to this function allows to trigger an event linked to a ResponseOnEvent request.Std_ReturnType Dcm_SetActiveDiagnostic (boolean active);Allows to activate and deactivate the call of ComM_DCM_ActiveDiagnostic() function.BufReq_ReturnType Dcm_StartOfReception (PduIdType id, const PduInfoType* info, PduLengthType TpSduLength, PduLengthType* bufferSizePtr);This function is called at the start of receiving an N-SDU.BufReq_ReturnType Dcm_CopyRxData (PduIdType id, const PduInfoType* info, PduLengthType* bufferSizePtr);This function is called to provide the received data of an I-PDU segment (N-PDU) to the upper layer.void Dcm_TpRxIndication (PduIdType id, Std_ReturnType result);Called after an I-PDU has been received via the TP API, the result indicates whether the transmission was successful or not.BufReq_ReturnType Dcm_CopyTxData (PduIdType id, const PduInfoType* info, const RetryInfoType* retry, PduLengthType* availableDataPtr);This function is called to acquire the transmit data of an I-PDU segment (N-PDU).void Dcm_TpTxConfirmation (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...void Dcm_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.void Dcm_ComM_NoComModeEntered (uint8 NetworkId);This call informs the Dcm module about a ComM mode change to COMM_NO_ COMMUNICATION.void Dcm_ComM_SilentComModeEntered (uint8 NetworkId);This call informs the Dcm module about a ComM mode change to COMM_SILENT_ COMMUNICATION.void Dcm_ComM_FullComModeEntered (uint8 NetworkId);This call informs the Dcm module about a ComM mode change to COMM_FULL_ COMMUNICATION.Std_ReturnType Dcm_CsmAsyncJobFinished (Csm_ResultType result);Can be called from Csm upon finishing an asynchronous job processing.Std_ReturnType Dcm_KeyMAsyncCertificateVerifyFinished (KeyM_CertificateIdType CertID, KeyM_CertificateStatusType Result);Can be called from Key upon finishing an asynchronous certificate verification.Dcm_ReturnReadMemoryType Dcm_ReadMemory (Dcm_OpStatusType OpStatus, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, uint8* MemoryData, Dcm_NegativeResponseCodeType* ErrorCode);The Dcm_ReadMemory callout is used to request memory data identified by the parameter memoryAddress and memorySize from the...Dcm_ReturnWriteMemoryType Dcm_WriteMemory (Dcm_OpStatusType OpStatus, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, const uint8* MemoryData, Dcm_NegativeResponseCodeType* ErrorCode);The Dcm_WriteMemory callout is used to write memory data identified by the parameter memoryAddress and memorySize.Std_ReturnType Dcm_SetProgConditions (Dcm_OpStatusType OpStatus, const Dcm_ProgConditionsType* ProgConditions);The Dcm_SetProgConditions callout allows the integrator to store relevant information prior to jumping to bootloader / jump...Dcm_EcuStartModeType Dcm_GetProgConditions (Dcm_ProgConditionsType* ProgConditions);The Dcm_GetProgConditions callout is called upon Dcm initialization and allows to determine if a response ($50 or $51) has to...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.Std_ReturnType Dcm_ProcessRequestDeleteFile (Dcm_OpStatusType OpStatus, uint16 filePathAndNameLength, const uint8* filePathAndName, Dcm_NegativeResponseCodeType* ErrorCode);Callout function.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.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.Std_ReturnType Dcm_ProcessRequestReadDir (Dcm_OpStatusType OpStatus, uint16 filePathAndNameLength, const uint8* filePathAndName, uint64* dirInfoLength, uint64* maxNumberOfBlockLength, Dcm_NegativeResponseCodeType* ErrorCode);Callout function.Std_ReturnType Dcm_WriteFile (Dcm_OpStatusType OpStatus, uint64 DataLength, uint8* Data, Dcm_NegativeResponseCodeType* ErrorCode);Callout function.Std_ReturnType Dcm_ReadFileOrDir (Dcm_OpStatusType OpStatus, uint64* DataLength, uint8* Data, Dcm_NegativeResponseCodeType* ErrorCode);Callout function.void Dcm_MainFunction (void);This service is used for processing the tasks of the main loop.Std_ReturnType Xxx_GetSeed (const uint8* SecurityAccessDataRecord, Dcm_OpStatusType OpStatus, uint8* Seed, Dcm_NegativeResponseCodeType* ErrorCode);Request to application for asynchronous provision of seed valueStd_ReturnType Xxx_GetSeed (Dcm_OpStatusType OpStatus, uint8* Seed, Dcm_NegativeResponseCodeType* ErrorCode);Request to application for asynchronous provision of seed valueStd_ReturnType Xxx_CompareKey (const uint8* Key, Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);Request to application for asynchronous comparing key (DcmDspSecurityUsePort = USE_ ASYNCH_CLIENT_SERVER)Std_ReturnType Xxx_GetSecurityAttemptCounter (Dcm_OpStatusType OpStatus, uint8* AttemptCounter);Read the attempt counter for a specific security level from the applicationStd_ReturnType Xxx_SetSecurityAttemptCounter (Dcm_OpStatusType OpStatus, uint8 AttemptCounter);Set the attempt counter for a specific security level in the applicationStd_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_SYNCH_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 to the application a data value of a DID/PID if DcmDspDataUsePort is set to USE_DATA_ASYNCH_CLIENT_SERVER.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_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 the application to return the data length in byte of a Data.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 requests to the application if the conditions to read the Data are correct.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);This function requests to the application for the scaling information of a Data.Std_ReturnType Xxx_ReturnControlToECU ([ 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_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 reset an IOControl to default value.Std_ReturnType Xxx_FreezeCurrentStateManager ([ 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_FreezeCurrentStateManager (Dcm_OpStatusType OpStatus, [ 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_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);This function requests to the application to adjust the IO signal.Std_ReturnType Xxx_IsDidAvailable (uint16 DID, Dcm_OpStatusType OpStatus, Dcm_DidSupportedType* supported);This function requests if a specific DID is available within the range or not.Std_ReturnType Xxx_ReadDidData (uint16 DID, uint8* Data, Dcm_OpStatusType OpStatus, uint16 DataLength, Dcm_NegativeResponseCodeType ErrorCode);This function requests to the application a data value of a DIDStd_ReturnType Xxx_WriteDidData (uint16 DID, const uint8* Data, Dcm_OpStatusType OpStatus, uint16 DataLength, Dcm_NegativeResponseCodeType ErrorCode);This function requests the application to write a data value of a DID.Std_ReturnType Xxx_ReadDidRangeDataLength (uint16 DID, Dcm_OpStatusType OpStatus, uint16* DataLength);This function requests the application to return the data length of a DID Range.Std_ReturnType Xxx_GetInfotypeValueData (Dcm_OpStatusType OpStatus, uint8* DataValueBuffer, uint8* DataValueBufferSize);The function provides the data related to the requested Infotype.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 requests to the application to start the execution of a routine.Std_ReturnType Xxx_StartConfirmation (Dcm_ConfirmationStatusType ConfirmationStatus);This function indicates the transmission of a response to a StartRoutine requestStd_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 requests to the application to stop the execution of a routineStd_ReturnType Xxx_StopConfirmation (Dcm_ConfirmationStatusType ConfirmationStatus);This function indicates the transmission of a response to a StopRoutine requestStd_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 requests to the application the result of a routine executionStd_ReturnType Xxx_RequestResultsConfirmation (Dcm_ConfirmationStatusType ConfirmationStatus);This function indicates the transmission of a response to a RequestRoutineResults requestStd_ReturnType Xxx_RequestControl (uint8* OutBuffer, const uint8* InBuffer);Invokes a TID-specific function taking a configured number of bytes as input and returing a fixed number of bytes as output.Std_ReturnType Xxx_StartProtocol (Dcm_ProtocolType ProtocolType, uint16 TesterSourceAddress, uint16 ConnectionId);This function allows the application to examine the environment conditions and enable/disable further processing of the protocol.Std_ReturnType Xxx_StopProtocol (Dcm_ProtocolType ProtocolType, uint16 TesterSourceAddress, uint16 ConnectionId);This function informs the application of the protocol stop.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 indicates to the application that a service is about to be executed and allows the application to reject the...Std_ReturnType Xxx_Confirmation (uint8 SID, uint8 ReqType, uint16 ConnectionId, Dcm_ConfirmationStatusType ConfirmationStatus, Dcm_ProtocolType ProtocolType, uint16 TesterSourceAddress);This function confirms to the application the successful transmission or a transmission error of a diagnostic service.Std_ReturnType Xxx_ClearDTCCheckFnc (uint32 GoDTC, Dcm_NegativeResponseCodeType* ErrorCode);Callout function for condition check, manufacturer / supplier specific checks on the groupOf DTC, which is requested to clear.Std_ReturnType Xxx_ProcessRequestDownload (Dcm_OpStatusType OpStatus, uint8 DataFormatIdentifier, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, uint32* BlockLength, Dcm_NegativeResponseCodeType* ErrorCode);Callout function.Std_ReturnType Xxx_ProcessRequestTransferExit (Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);Callout function.Std_ReturnType Xxx_ProcessRequestUpload (Dcm_OpStatusType OpStatus, uint8 DataFormatIdentifier, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, uint32* BlockLength, Dcm_NegativeResponseCodeType* ErrorCode);Callout function.Dcm_ReturnReadMemoryType Xxx_ProcessTransferDataRead (Dcm_OpStatusType OpStatus, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, Dcm_RequestDataArrayType MemoryData, Dcm_NegativeResponseCodeType* ErrorCode);The ProcessTransferDataRead callout is used to request memory data identified by the parameter memoryAddress and memorySize...Dcm_ReturnWriteMemoryType Xxx_ProcessTransferDataWrite (Dcm_OpStatusType OpStatus, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, const Dcm_RequestDataArrayType MemoryData, Dcm_NegativeResponseCodeType* ErrorCode);The ProcessTransferDataWrite callout is used to write memory data identified by the parameter memoryAddress and memorySize.
Typen — Übersicht
enum Dcm_StatusTypeBase item type to transport status information.enum Dcm_CommunicationModeType Managerstruct Dcm_ConfigTypeThis type defines a data structure for the post build parameters of the DCM.Dcm_ReturnReadMemoryTypeReturn values of Callout Dcm_ReadMemoryDcm_ReturnWriteMemoryTypeReturn type of callout Dcm_WriteMemoryenum Dcm_EcuStartModeTypeAllows the DCM to know if a diagnostic response shall be sent in the case of a jump from bootloaderDcm_ProgConditionsTypeUsed in Dcm_SetProgConditions() to allow the integrator to store relevant information prior to jumping to bootloader / jump...Dcm_MsgItemTypeBase type for diagnostic message itemDcm_MsgTypeBase type for diagnostic message (request, positive or negative response)Dcm_MsgLenTypeLength of diagnostic message (request, positive or negative response).struct Dcm_MsgAddInfoTypeAdditional information on message request.Dcm_IdContextTypeThis message context identifier can be used to determine the relation between request and response confirmation.struct Dcm_MsgContextTypeThis data structure contains all information which is necessary to process a diagnostic message from request to response and...enum Dcm_ExtendedOpStatusTypeenum Dcm_OpStatusTypeenum Dcm_ConfirmationStatusTypeDcm_SecLevelTypeSecurity Level type definitionDcm_SesCtrlTypeSession type definition.Dcm_ProtocolTypeType Dcm_ProtocolType.Dcm_NegativeResponseCodeTypeType Dcm_NegativeResponseCodeType.Dcm_DataArrayTypeDcm_InfoTypeDcm_RequestDataArrayTypeDcm_InputOutputControlParameterTypeDcm_IOOperationResponseTypeDcm_DidSupportedTypeDcm_FileAndDirNameTypeDcm_ResponseDataArrayTypeDcm_AuthenticationRoleTypeDiagnosticSessionControlModeSwitchInterfaceA ModeSwitchInterface PPortPrototype used to notify SW-Cs about the current Diagnostic SessionEcuResetModeSwitchInterfaceA ModeSwitchInterface PPortPrototype used to notify SW-Cs about an upcoming ECU Reset and its typeModeRapidPowerShutDownModeSwitchInterfaceA ModeSwitchInterface PPortPrototype used to notify SW-Cs about the rapid power shut down modeControlDTCSettingModeSwitchInterfaceA ModeSwitchInterface PPortPrototype used to notify SW-Cs about the DTC Setting modeSecurityAccessModeSwitchInterfaceA ModeSwitchInterface PPortPrototype used to notify SW-Cs about the current Security LevelDcmDiagnosticSessionControlModeDeclarationGroup representing the different diagnostic sessions Further modes to be added:...DcmEcuResetModeDeclarationGroup representing the different ECU reset typesDcmModeRapidPowerShutDownModeDeclarationGroup representing the enable/disable state of rapid power shutdownDcmCommunicationControlModeDeclarationGroup representing the different communication control statesDcmControlDTCSettingModeDeclarationGroup representing the enable/disable state for DTC storageDcmResponseOnEventModeDeclarationGroup representing the state of a Response On EventDcmSecurityAccessModeDeclarationGroup representing the different diagnostic security levels Further modes to be added:...
Funktionen & Typen — Detailansicht
function Dcm_Init [SWS_Dcm_00037] 📄 PDF
void Dcm_Init (const Dcm_ConfigType* ConfigPtr);
Service for basic initialization of DCM module.
The synchronous and non-reentrant function Dcm_Init serves the fundamental initialization of the DCM module [SWS_Dcm_00037]. Via the parameter ConfigPtr, it accepts a pointer to the configuration set in post-build variants and has no return value [SWS_Dcm_00037]. During execution, the module initializes all global DCM variables with the values from the configuration [SWS_Dcm_00334].
As part of the initialization sequence, various functional areas and states are configured:
- DDDID management: If the configuration parameter
DcmDDDIDStorageis set toFALSE, the DCM initializes all dynamically defined data identifiers (DDDIDs) as not present during startup [SWS_Dcm_00866]. If the parameter is set toTRUE, the DDDID definitions are restored from the NvM [SWS_Dcm_00867]. - Response on Event (ROE): The DCM transitions the state of each event during
Dcm_Initinto the status 'ROE cleared' [SWS_Dcm_00872]. - Authentication status: If
DcmDspAuthenticationPersistStateModeRuleRefis not configured or the referenced mode rule evaluates tofalse, the module sets all authentication states to the state 'deauthenticated' [SWS_Dcm_01480]. - Communication status: After completion of
Dcm_Init, the DCM sets the parameterActiveDiagnosticto 'DCM_COMM_ACTIVE' [SWS_Dcm_01069].
Regarding the execution environment, it is specified that Dcm_Init is non-reentrant [SWS_Dcm_00037]. Specific error codes and standardized error messages to DET or DEM are not identified for this initialization service in the interface specification [SWS_Dcm_00037].
This usage note was generated automatically based on the AUTOSAR specification.
Implementer's Guide to follow (complexity I2)
function Dcm_GetVersionInfo [SWS_Dcm_00065] 📄 PDF
void Dcm_GetVersionInfo (Std_VersionInfoType* versionInfo);
Returns the version information of this module
function Dcm_DemTriggerOnDTCStatus [SWS_Dcm_00614] 📄 PDF
Std_ReturnType Dcm_DemTriggerOnDTCStatus (uint32 DTC, Dem_UdsStatusByteType DTCStatusOld, Dem_UdsStatusByteType DTCStatusNew);
Triggers on changes of the UDS status byte. Allows to trigger on ROE Event for subservice On DTCStatusChanged.
use
The synchronous interface Dcm_DemTriggerOnDTCStatus (Service ID 0x2B) is available via the header Dcm_Dem.h and serves to report changes to the UDS status byte to the DCM [SWS_Dcm_00614]. This allows the DCM to trigger response-on-event (ROE) events for the diagnostic service subservice OnDTCStatusChanged [SWS_Dcm_00614]. When called, the function accepts three input parameters: the affected error code DTC (uint32), the previous state DTCStatusOld (Dem_UdsStatusByteType), and the updated state DTCStatusNew (Dem_UdsStatusByteType) [SWS_Dcm_00614]. Input/output parameters do not exist [SWS_Dcm_00614].
Return Values and Error Handling
As return value, the function provides the type Std_ReturnType, whereby according to the specification E_OK is returned without exception [SWS_Dcm_00614]. Specific error codes, fallback values, or separate notifications to DEM or DET are not indicated for this call.
Concurrency and Interaction
The function is classified as reentrant and possesses synchronous execution semantics [SWS_Dcm_00614]. Regarding interaction with diagnostic requests, a fixed constraint applies: If a request to clear the event memory (EventMemory) is currently being processed in the DCM, the DCM must ignore incoming calls of the callback Dcm_DemTriggerOnDTCStatus [SWS_Dcm_01410].
This usage note is based on the specifications of AUTOSAR Classic Release R20-11.
Implementer's Guide to follow (complexity I2)
function Dcm_GetVin [SWS_Dcm_00950] 📄 PDF
Std_ReturnType Dcm_GetVin (uint8* Data);
Function to get the VIN (as defined in SAE J1979-DA)
function Dcm_BndMWriteBlockFinish [SWS_Dcm_91088] 📄 PDF
void Dcm_BndMWriteBlockFinish (BndM_BlockIdType BlockId, BndM_ResultType result);
Called by BndM to indicate that a block write operation has finished.
The function Dcm_BndMWriteBlockFinish serves as a notification interface from the BndM to the DCM to indicate the completion of a block write operation [SWS_Dcm_91088]. The function is declared in header file Dcm.h, has the service ID 0x7a, provides no return value (void), and is executed synchronously [SWS_Dcm_91088].
The interface expects two passing parameters [SWS_Dcm_91088]:
BlockId(type:BndM_BlockIdType): Identifies the block whose write operation has been completed.result(type:BndM_ResultType): Transmits the result of the write operation to the DCM.
The functional interaction and the error handling behavior are coupled to atomic BndM write operations previously initiated by the DCM:
- If
Dcm_BndMWriteBlockFinishis called with statusresult = E_OK, the DCM sends a positive diagnostic response to the pending request [SWS_Dcm_01584]. - If the function is called with
result = E_NOT_OK, the DCM reacts with a negative diagnostic response0x72(generalProgrammingFailure) in case of an error [SWS_Dcm_01585].
Regarding concurrency, Dcm_BndMWriteBlockFinish is specified as non-reentrant (Non Reentrant) [SWS_Dcm_91088]. Callers must therefore ensure that the function is not called concurrently or preemptively by multiple contexts.
This usage note was generated by an AI and is based on the AUTOSAR specification R20-11.
function Dcm_SetDeauthenticatedRole [SWS_Dcm_91069] 📄 PDF
Std_ReturnType Dcm_SetDeauthenticatedRole (uint16 connectionId, Dcm_AuthenticationRoleType deauthenticatedRole);
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.
Usage and Call Context
The function Dcm_SetDeauthenticatedRole is executed synchronously and reentrantly ([SWS_Dcm_91069]). It allows a software component to assign a new role deauthenticatedRole of type Dcm_AuthenticationRoleType for the deauthenticated state to a connection identified by connectionId ([SWS_Dcm_91069], [SWS_Dcm_01486]). The return value is invariably E_OK ([SWS_Dcm_91069]).
State Conditions and Error Handling
A call is processed by the DCM only if the connection is in the deauthenticated state (deauthenticated state) ([SWS_Dcm_01487]). Since the signature provides no alternative error values and always returns E_OK ([SWS_Dcm_91069]), a call outside this state is presumably discarded without an error message. Question Q-6f14770eae6ce896 (open) Specific DET or DEM events are not defined in the specification.
Period of Validity and Lifecycle
If the role for the deauthenticated state is accepted successfully ([SWS_Dcm_01486]), this assignment persists temporarily:
- The set role is discarded as soon as the connection transitions to the authenticated state (authenticated state) ([SWS_Dcm_01488]).
- Validity ends at the latest upon a reset of the ECU ([SWS_Dcm_91069]).
This usage note was generated automatically based on the AUTOSAR specification.
Implementer's Guide to follow (complexity I2)
function Dcm_GetSecurityLevel [SWS_Dcm_00338] 📄 PDF
Std_ReturnType Dcm_GetSecurityLevel (Dcm_SecLevelType* SecLevel);
This function provides the active security level value.
The synchronous and reentrant function Dcm_GetSecurityLevel queries the currently active security level of the DCM and provides it [SWS_Dcm_00338]. The function is declared via the header Dcm.h and passes the determined status value to the caller via the output parameter SecLevel of type Dcm_SecLevelType*. According to the specification, E_OK is returned without exception [SWS_Dcm_00338].
The determination of the internal security level is based on the parameter SecurityAccessType transmitted by the tester as part of the service SecurityAccess according to the fixed conversion formula SecurityLevel = (SecurityAccessType + 1) / 2 [SWS_Dcm_00338].
In interaction with higher-level diagnostic service processing, the DSP submodule, among others, accesses this value: If the module receives a configured request with the subfunction type “requestSeed” (odd value) and the associated access level is already active according to Dcm_GetSecurityLevel, the DSP submodule sets the seed content to 0x00 [SWS_Dcm_00323].
Regarding concurrency and error handling, the function is defined as reentrant [SWS_Dcm_00338]. Since no specific error codes or DET checks are specified and E_OK is always returned, no null-pointer check is likely performed; callers must therefore presumably always pass a valid pointer to memory for SecLevel. Question Q-5402d82ac0151b22 (open)
This text was created by an AI. Information may be incomplete; the AUTOSAR specification is authoritative.
Implementer's Guide to follow (complexity I1)
function Dcm_GetSesCtrlType [SWS_Dcm_00339] 📄 PDF
Std_ReturnType Dcm_GetSesCtrlType (Dcm_SesCtrlType* SesCtrlType);
This function provides the active session control type value.
function Dcm_GetActiveProtocol [SWS_Dcm_00340] 📄 PDF
Std_ReturnType Dcm_GetActiveProtocol (Dcm_ProtocolType* ActiveProtocolType, uint16* ConnectionId, uint16* TesterSourceAddress);
This function returns the active UDS protocol details
function Dcm_ResetToDefaultSession [SWS_Dcm_00520] 📄 PDF
Std_ReturnType Dcm_ResetToDefaultSession (void);
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.
The synchronous function Dcm_ResetToDefaultSession allows the application to reset the active diagnostic session to the default session [SWS_Dcm_00520]. A typical use case is the automatic termination of an extended diagnostic session as soon as a vehicle exceeds a predefined speed threshold [SWS_Dcm_00520].
Usage and Error Handling
-
Interface and parameters: The function is available via
Dcm.hwith service ID0x2a, has the signatureStd_ReturnType Dcm_ResetToDefaultSession (void), and requires no passed parameters [SWS_Dcm_00520]. -
Return value and errors:
Std_ReturnTypeis returned as the return type, returning the valueE_OKwithout exception [SWS_Dcm_00520]. Specific error codes, DET runtime checks, or DEM events are not specified in the requirements for this call.
Concurrency and Interaction
Execution is synchronous and declared as reentrant [SWS_Dcm_00520].
In addition to the actual session change, Dcm_ResetToDefaultSession mandatorily initiates a mode change for the ModeDeclarationGroupPrototype DcmDiagnosticSessionControl [SWS_Dcm_01062]. In doing so, the function internally calls SchM_Switch_<bsnp>_DcmDiagnosticSessionControl(RTE_MODE_DcmDiagnosticSessionControl_DCM_DEFAULT_SESSION) to notify the system environment about the transition to the default session [SWS_Dcm_01062].
This usage note was generated automatically based on the specification of AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I1)
function Dcm_TriggerOnEvent [SWS_Dcm_00521] 📄 PDF
Std_ReturnType Dcm_TriggerOnEvent (uint8 RoeEventId);
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'.
The synchronous function Dcm_TriggerOnEvent (service ID 0x2D), provided via the header Dcm.h, serves to trigger an event linked to a ResponseOnEvent request (ROE) [SWS_Dcm_00521].
Call and Operation
The caller passes RoeEventId (input parameter of type uint8) as the only parameter, which identifies the event to be triggered; in/out or output parameters do not exist [SWS_Dcm_00521]. As soon as the function is called, the DCM checks the state of the event: if the passed RoeEvent is active, the DCM triggers the corresponding event [SWS_Dcm_00920]. The DCM executes the service associated with the event provided that the associated mode of the RoeEventId is set to 'ROE started' [SWS_Dcm_00521].
Return Values and Validation
The call synchronously returns a status of type Std_ReturnType providing information about the validity of the parameter [SWS_Dcm_00521]:
E_OK: The passed value forRoeEventIdis valid [SWS_Dcm_00521].E_NOT_OK: The value ofRoeEventIdis invalid [SWS_Dcm_00521].
Concurrency and Properties
The interface is specified as reentrant [SWS_Dcm_00521]. It can therefore be called concurrently to report events synchronously to the DCM [SWS_Dcm_00521].
This usage note was generated automatically based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I1)
function Dcm_SetActiveDiagnostic [SWS_Dcm_01068] 📄 PDF
Std_ReturnType Dcm_SetActiveDiagnostic (boolean active);
Allows to activate and deactivate the call of ComM_DCM_ActiveDiagnostic() function.
function Dcm_StartOfReception [SWS_Dcm_00094] 📄 PDF
BufReq_ReturnType Dcm_StartOfReception (PduIdType id, const PduInfoType* info, PduLengthType TpSduLength, PduLengthType* bufferSizePtr);
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.
The synchronous and reentrant function Dcm_StartOfReception ([SWS_Dcm_00094]) is called by a transport protocol module at the start of receiving an N-SDU—both for single frames (SF) and for segmented messages (First Frame, FF). It can be called in interrupt context ([SWS_Dcm_00094]). Among other things, the call causes the S3Server timer to stop at the start of reception ([SWS_Dcm_00141]).
Payload data and metadata are passed via info; for generic connections, this is used, among other things, to store SOURCE_ADDRESS_16 ([SWS_Dcm_00848]) and check TARGET_ADDRESS_16 ([SWS_Dcm_01347]). If neither payload nor metadata is present, NULL_PTR is passed ([SWS_Dcm_00094]). Via bufferSizePtr, the function reports back the available buffer for calculating the Block Size (BS) ([SWS_Dcm_00094]). Upon successful acceptance, it returns BUFREQ_OK, whereupon subsequent data is copied via Dcm_CopyRxData ([SWS_Dcm_00443]).
Error and rejection cases are signaled via the return value:
BUFREQ_E_OVFL: Returned if the requested lengthTpSduLengthis greater than the buffer available in the DCM ([SWS_Dcm_00094], [SWS_Dcm_00444]).bufferSizePtrremains unchanged ([SWS_Dcm_00094]).BUFREQ_E_NOT_OK: Returned ifTpSduLengthis equal to 0 ([SWS_Dcm_00642]) or an ongoing request on the same connection is blocking ([SWS_Dcm_00557]). For another connection, the parameterDcmDslDiagRespOnSecondDeclinedRequestdecides whether it is rejected withBUFREQ_E_NOT_OK([SWS_Dcm_00790]) or accepted withBUFREQ_OK([SWS_Dcm_00788]). Concurrent TesterPresent requests are likewise acknowledged withBUFREQ_OK([SWS_Dcm_00557]).
This text was created by an AI. All details are based exclusively on the AUTOSAR R20-11 specification excerpt.
Implementer's Guide to follow (complexity I2)
function Dcm_CopyRxData [SWS_Dcm_00556] 📄 PDF
BufReq_ReturnType Dcm_CopyRxData (PduIdType id, const PduInfoType* info, PduLengthType* bufferSizePtr);
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.
use
The synchronous function Dcm_CopyRxData is called to pass received data of an I-PDU segment (N-PDU) to the upper layer in the DCM [SWS_Dcm_00556]. Each call provides the next part of the I-PDU data [SWS_Dcm_00556]. The received I-PDU is identified via the parameter id [SWS_Dcm_00556]. The pointer info provides the source buffer via SduDataPtr and the number of bytes to be copied via SduLength [SWS_Dcm_00556]. After completion of the copy process, the remaining free buffer size in the DCM is returned via bufferSizePtr [SWS_Dcm_00556], [SWS_Dcm_00443].
If Dcm_CopyRxData is called with an SduLength of 0, this serves purely for buffer querying [SWS_Dcm_00556]. In this case, SduDataPtr may be a NULL_PTR; the function returns BUFREQ_OK and enters the remaining size of the receive buffer into bufferSizePtr [SWS_Dcm_00556], [SWS_Dcm_00996].
Interaction
Prior to copying, Dcm_StartOfReception must have been completed with BUFREQ_OK; subsequent calls of Dcm_CopyRxData copy the data from the provided buffer into the DCM buffer and update bufferSizePtr [SWS_Dcm_00443].
Error handling
The function returns the status as BufReq_ReturnType: BUFREQ_OK confirms the successful copying or the buffer query, while BUFREQ_E_NOT_OK indicates that no data was copied due to an error [SWS_Dcm_00556], [SWS_Dcm_00996].
Concurrency and Limitations
Dcm_CopyRxData is specified as reentrant and may be called in interrupt context [SWS_Dcm_00556]. The interface is provided via Dcm.h [SWS_Dcm_00556].
This usage note was generated by an AI based on the AUTOSAR CP R20-11 specification.
Implementer's Guide to follow (complexity I1)
function Dcm_TpRxIndication [SWS_Dcm_00093] 📄 PDF
void Dcm_TpRxIndication (PduIdType id, Std_ReturnType result);
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.
Usage and Call Context
The synchronous function Dcm_TpRxIndication is called after reception of an I-PDU via the TP API, typically by the module PduR [SWS_Dcm_00093], [SWS_Dcm_00112]. It passes the PDU identification (id) as well as the reception result (result) and returns no return value [SWS_Dcm_00093]. Since the function is reentrant and may be called in interrupt context, caller and module states must be designed for corresponding concurrency [SWS_Dcm_00093].
Behavior on Erroneous Reception
If Dcm_TpRxIndication is called with a result value that differs from E_OK, the module Dcm must not evaluate the buffer assigned to the referenced I-PDU [SWS_Dcm_00344].
Interaction of the Submodules
The DSL submodule forwards received data to the DSD submodule exclusively if the call was made with the parameter value result = E_OK [SWS_Dcm_00111]. Specific rules apply to diagnostic requests:
- If the successfully received request (
Result = E_OK) is the commandTesterPresentwithsuppressPosRspMsgIndicationBitset (SID0x3E, subfunction0x80), the DSL submodule resets the session timeout timerS3Server[SWS_Dcm_00112]. - In this case, the request is not forwarded by the DSL submodule to the DSD submodule for further interpretation [SWS_Dcm_00113].
This usage note was generated automatically based on the specification AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I2)
function Dcm_CopyTxData [SWS_Dcm_00092] 📄 PDF
BufReq_ReturnType Dcm_CopyTxData (PduIdType id, const PduInfoType* info, const RetryInfoType* retry, PduLengthType* availableDataPtr);
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.
Usage and Semantics
The synchronous and reentrant function Dcm_CopyTxData is called by lower-layer modules (such as transport protocols) to retrieve data of an I-PDU segment (N-PDU) for transmission [SWS_Dcm_00092]. Via the parameter info, the caller passes the destination buffer SduDataPtr and the requested byte length SduLength. A value of 0 for SduLength can be used to signal status changes via retry or to query the amount of available data; in this case, SduDataPtr may be a NULL_PTR [SWS_Dcm_00092]. Via availableDataPtr, the DCM reports the remaining number of bytes in the transmit buffer, which can be used by TP modules to determine subsequent segment sizes and must not exceed the number of bytes still to be sent [SWS_Dcm_00092], [SWS_Dcm_00350].
Buffer Management and Transmission Retry
Acknowledgment or retry of data is controlled via the parameter retry [SWS_Dcm_00092]:
- If
retryis aNULL_PTR, the data may be removed from the buffer immediately after the copy process [SWS_Dcm_00092]. - With
TP_CONFPENDING, previously copied data must remain in the TP buffer for potential error recovery [SWS_Dcm_00092]. TP_DATACONFconfirms all data copied prior to this call for release [SWS_Dcm_00092].TP_DATARETRYrecopies data starting from the offsetTxTpDataCntrelative to the current position [SWS_Dcm_00092].
Return Values and Error Handling
If the data was copied successfully and completely, the function returns BUFREQ_OK [SWS_Dcm_00092], [SWS_Dcm_00346]. If not enough transmit data is available, no copy process is performed and BUFREQ_E_BUSY is returned; the lower layer can repeat the call later [SWS_Dcm_00092]. If the request fails, the function returns BUFREQ_E_NOT_OK [SWS_Dcm_00092]. In this case, the transmit request from PduR_DcmTransmit() is not yet completed; only a concluding call of Dcm_TpTxConfirmation terminates the process and enables new transmissions [SWS_Dcm_00350].
Concurrency
The function is reentrant and may also be called in interrupt context [SWS_Dcm_00092].
This usage note is based on the specifications of the AUTOSAR Classic Platform Release R20-11.
Implementer's Guide to follow (complexity I2)
function Dcm_TpTxConfirmation [SWS_Dcm_00351] 📄 PDF
void Dcm_TpTxConfirmation (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.
The callback function Dcm_TpTxConfirmation ([SWS_Dcm_00351]) is called synchronously by the lower transport layer after a diagnostic I-PDU has been transmitted on the network. The affected I-PDU is identified via the parameter id, while result reports the success or failure of the transmission process ([SWS_Dcm_00351]). The function has no return value, is reentrant, and may explicitly be executed in interrupt context ([SWS_Dcm_00351]).
When Dcm_TpTxConfirmation is called, the DCM module performs central cleanup and state transitions:
- The assigned transmit buffer is unlocked ([SWS_Dcm_00352]).
- Running error monitorings such as page buffer timeouts as well as
P2ServerMaxandP2*ServerMaxtimeouts are stopped ([SWS_Dcm_00353]). - The
DcmPduIdof the connection, which had been locked since reception (Dcm_TpRxIndication), is released so that subsequent requests can be received ([SWS_Dcm_00241]). - The active protocol is not terminated by the confirmation of the DSL response (no call of
xxx_StopProtocol) ([SWS_Dcm_00624]).
In the event of an error (if result indicates an error or an abort after a failed Dcm_CopyTxData is confirmed), [SWS_Dcm_00350] mandatorily requires this final call in order to formally conclude the transmission order and enable new transmissions via PduR_DcmTransmit(). Upon an erroneous confirmation, the DSD submodule must not retransmit the diagnostic response ([SWS_Dcm_00118]).
In addition, confirmation of a response (other than NRC 0x78) marks the regular completion of a diagnostic request ([SWS_Dcm_01378]). Following confirmation of a positive response to a EcuReset, the DCM ignores all further requests during reset processing ([SWS_Dcm_00834]).
This text was created by an AI; accuracy cannot be guaranteed.
Implementer's Guide to follow (complexity I2)
function Dcm_TxConfirmation [SWS_Dcm_01092] 📄 PDF
void Dcm_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);
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.
use
According to [SWS_Dcm_01092], the synchronous interface Dcm_TxConfirmation (service ID 0x40, declared in Dcm.h) is called by the underlying communication interface module to confirm the transmission of a PDU or to report the failure of the transmission. The function has no return value and processes two input parameters:
TxPduId: Identifier (PduIdType) of the transmitted PDU.result: Status of the transmission (Std_ReturnType). Valid values areE_OKin the case of successful transmission andE_NOT_OKif the transmission of the PDU failed.
Error Handling and Status Feedback
The result of the transmission is signaled directly to the DCM via the parameter result ([SWS_Dcm_01092]). Specific DET or DEM error messages are not defined for this function in the provided specification excerpt.
Concurrency and Call Context
Regarding reentrancy, Dcm_TxConfirmation is reentrant for calls with different PDU IDs, but not reentrant for the same TxPduId ([SWS_Dcm_01092]). It should be noted that the call by the underlying module can take place in the interrupt context ([SWS_Dcm_01092]).
Interaction
In the case of a periodic transmission (PeriodicTransmission), the DCM is called according to [SWS_Dcm_01073] via Dcm_TxConfirmation to be notified of the respective transmission result.
This usage note was created automatically based on the AUTOSAR specification for R20-11.
Implementer's Guide to follow (complexity I1)
function Dcm_ComM_NoComModeEntered [SWS_Dcm_00356] 📄 PDF
void Dcm_ComM_NoComModeEntered (uint8 NetworkId);
This call informs the Dcm module about a ComM mode change to COMM_NO_ COMMUNICATION.
The synchronous and reentrant function Dcm_ComM_NoComModeEntered (service ID 0x21) informs the DCM module about the transition of a communication network to the state COMM_NO_COMMUNICATION [SWS_Dcm_00356]. The interface is provided via the header Dcm_ComM.h, has no return value, and identifies the affected network via the input parameter NetworkId of type uint8 [SWS_Dcm_00356].
With this call, the DCM shuts down any communication on the specified network, completely disabling both reception and transmission of messages [SWS_Dcm_00148]. This mandatorily includes the following transmission types:
- suppression of ResponseOnEvent transmissions [SWS_Dcm_00149],
- deactivation of periodic transmissions via
ReadDataByPeriodicIdentifier(periodicId) [SWS_Dcm_00150], and - shutdown of normal transmissions [SWS_Dcm_00151].
Consequently, following execution of Dcm_ComM_NoComModeEntered, the DCM module must no longer call the PduR function PduR_DcmTransmit() for this context [SWS_Dcm_00152].
If the function is called with a NetworkId that does not correspond to any ComM channel referenced in the DCM via configuration parameter DcmDslProtocolComMChannelRef, the DCM module does not perform any actions and returns immediately [SWS_Dcm_01324].
This text was generated by an AI and quality-assured by autodocs.
Implementer's Guide to follow (complexity I2)
function Dcm_ComM_SilentComModeEntered [SWS_Dcm_00358] 📄 PDF
void Dcm_ComM_SilentComModeEntered (uint8 NetworkId);
This call informs the Dcm module about a ComM mode change to COMM_SILENT_ COMMUNICATION.
The synchronous and reentrant function Dcm_ComM_SilentComModeEntered ([SWS_Dcm_00358]) serves to inform the DCM module about the transition of a communication network to the state COMM_SILENT_COMMUNICATION. The interface has the service ID 0x22, provides no return value, and expects the identifier of the affected network as input parameter NetworkId ([SWS_Dcm_00358]). It is provided via the header file Dcm_ComM.h ([SWS_Dcm_00358]).
As soon as this call occurs, the DCM must completely stop all transmission activities on the affected network channel ([SWS_Dcm_00153]). In detail, this includes the following measures:
- deactivation of all normal transmissions ([SWS_Dcm_00156]),
- suppression of response-on-event transmissions ([SWS_Dcm_00154]), and
- deactivation of periodic transmissions in the context of
ReadDataByPeriodicIdentifier([SWS_Dcm_00155]).
Regarding error handling and boundary conditions, it is specified that the DCM must return without any further action if the passed NetworkId corresponds to a ComM channel that is not referenced in the DCM via configuration parameter DcmDslProtocolComMChannelRef ([SWS_Dcm_01325]). Specific development errors or error return values are not specified for this call.
Interpretation: The call is typically expected to be made by the ComM module as soon as the transition into silent communication mode is carried out. Question Q-fc9b6303ae0c0e41 (open)
This usage note was generated by an AI system and is based exclusively on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I2)
function Dcm_ComM_FullComModeEntered [SWS_Dcm_00360] 📄 PDF
void Dcm_ComM_FullComModeEntered (uint8 NetworkId);
This call informs the Dcm module about a ComM mode change to COMM_FULL_ COMMUNICATION.
The synchronous and reentrant function Dcm_ComM_FullComModeEntered is provided via the header file Dcm_ComM.h and informs the DCM module about the transition of a communication network into the state COMM_FULL_COMMUNICATION [SWS_Dcm_00360]. Input parameter NetworkId serves to identify the network affected by the mode change [SWS_Dcm_00360].
The call activates any communication for this network, enabling both message reception and transmission [SWS_Dcm_00157]. This includes the following transmission types:
- normal transmissions [SWS_Dcm_00161],
- response-on-event transmissions [SWS_Dcm_00159], and
- periodic transmissions via
ReadDataByPeriodicIdentifier[SWS_Dcm_00160].
As soon as Dcm_ComM_FullComModeEntered has been called, the DCM processes the internal functions DslInternal_ResponseOnOneDataByPeriodicId() and DslInternal_ResponseOnOneEvent() without restrictions [SWS_Dcm_00162]. In terms of timing, the DCM must wait for this call before transmission of a diagnostic response is initiated; the waiting time must not exceed P2ServerMax starting from the time of request receipt [SWS_Dcm_01142].
In the event of an error, if the passed NetworkId concerns a ComM channel that is not configured in the DCM (parameter DcmDslProtocolComMChannelRef), the function returns immediately and without further actions [SWS_Dcm_01326].
This usage note was generated by an AI based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I2)
function Dcm_CsmAsyncJobFinished [SWS_Dcm_91076] 📄 PDF
Std_ReturnType Dcm_CsmAsyncJobFinished (Csm_ResultType result);
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).
Usage and Semantics
The synchronous and reentrant callback function Dcm_CsmAsyncJobFinished is called by the Crypto Service Manager (CSM) as soon as asynchronous job processing is completed [SWS_Dcm_91076]. As an input parameter, it receives the result of the finished CSM job via result of type Csm_ResultType [SWS_Dcm_91076]. As a return value, the function always returns E_OK [SWS_Dcm_91076].
Configuration and Constraints
Integrators must configure the name of this function in the ECUC configuration of the CSM as a callback for asynchronous jobs [SWS_Dcm_91076]. For the DCM, only a single such callback is available; according to the specification, identification of the finished job takes place by evaluating the job parameter [SWS_Dcm_91076]. However, since the C function signature only passes result, the DCM is likely to determine the associated job internally via the transaction state of the ongoing authentication. Question Q-04ad1d5fb514f467 (open)
The interface is only available if the parameter DcmDspAuthenticationConnection is set in the configuration (not equal to null) [SWS_Dcm_91076]. Specific error handlings or DET messages are not specified for this call, since the return value is unalterably E_OK [SWS_Dcm_91076].
This text was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function Dcm_KeyMAsyncCertificateVerifyFinished [SWS_Dcm_91077] 📄 PDF
Std_ReturnType Dcm_KeyMAsyncCertificateVerifyFinished (KeyM_CertificateIdType CertID, KeyM_CertificateStatusType Result);
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).
The synchronous and reentrant callback function Dcm_KeyMAsyncCertificateVerifyFinished is called by module KeyM after completion of an asynchronous certificate verification [SWS_Dcm_91077]. It informs the DCM about the completion as well as the result of the verification process and always returns E_OK as return value [SWS_Dcm_91077].
Parameters and Operation
CertID: Identifier of the certificate whose verification has been completed. Based on this identifier, the DCM determines which verification job was completed [SWS_Dcm_91077].Result: Return value and status of the asynchronous verification job from the KeyM [SWS_Dcm_91077].
Configuration and Constraints
Integrators must configure this function name in the ECUC configuration of the KeyM as a callback for asynchronous jobs [SWS_Dcm_91077]. Since only a single callback is available for this notification, the DCM relies on resolving the respective certificate via the parameter CertID [SWS_Dcm_91077].
The interface is available exclusively if the configuration parameter DcmDspAuthenticationConnection is configured in the path Dcm/DcmDsp/DcmDspAuthentication (!= null) [SWS_Dcm_91077]. Special error codes or DET messages are not specified for this call [SWS_Dcm_91077].
This usage note was generated automatically.
Implementer's Guide to follow (complexity I2)
function Dcm_ReadMemory [SWS_Dcm_00539] 📄 PDF
Dcm_ReturnReadMemoryType Dcm_ReadMemory (Dcm_OpStatusType OpStatus, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, uint8* MemoryData, 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
The callout function Dcm_ReadMemory ([SWS_Dcm_00539]), declared in Dcm_Externals.h, serves the DCM for reading server memory data based on start address (MemoryAddress) and byte size (MemorySize). The function is required for the UDS services ReadMemoryByAddress (0x23) ([SWS_Dcm_00495]), ReadDataByIdentifier (0x22) for dynamic DIDs in the address range 0xF200 to 0xF3FF ([SWS_Dcm_00653]), RequestUpload, and TransferData ([SWS_Dcm_00539]). If the parameter MemoryIdentifier is not used, it must be set to 0 ([SWS_Dcm_00539]).
The interface is asynchronous and non-reentrant ([SWS_Dcm_00539]). The call status is passed via OpStatus with the values DCM_INITIAL, DCM_PENDING, DCM_CANCEL, or DCM_FORCE_RCRRP_OK. As long as the read operation is in progress, the function returns DCM_READ_PENDING ([SWS_Dcm_00985]). If the call returns DCM_READ_FORCE_RCRRP, the DCM immediately initiates transmission of an RCR-RP message (NRC 0x78) and pauses further calls until transmission confirmation ([SWS_Dcm_00839]). After confirmation of the RCR-RP, the DCM calls the function from Dcm_MainFunction again with OpStatus = DCM_FORCE_RCRRP_OK ([SWS_Dcm_00840]).
In case of success, the read data is written to buffer MemoryData and DCM_READ_OK is returned ([SWS_Dcm_00539], [SWS_Dcm_00985]). If the operation fails, the function returns DCM_READ_FAILED and sets ErrorCode. The DCM then sends a negative response with the corresponding NRC value ([SWS_Dcm_00644]).
Automatically generated usage note based on the AUTOSAR specification.
Implementer's Guide to follow (complexity I2)
function Dcm_WriteMemory [SWS_Dcm_00540] 📄 PDF
Dcm_ReturnWriteMemoryType Dcm_WriteMemory (Dcm_OpStatusType OpStatus, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, const uint8* MemoryData, 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
The callout function Dcm_WriteMemory declared in Dcm_Externals.h is called asynchronously and non-reentrantly by the DCM to write memory data based on start address and byte size [SWS_Dcm_00540]. It serves to implement the UDS services WriteMemoryByAddress (0x3D), RequestDownload, and TransferData [SWS_Dcm_00540]. Upon receiving WriteMemoryByAddress, the DCM calls the callout only after verifying the request [SWS_Dcm_00491].
OpStatus is passed to control the sequence (possible values: DCM_INITIAL, DCM_PENDING, DCM_CANCEL, or DCM_FORCE_RCRRP_OK) [SWS_Dcm_00540]. The parameters MemoryAddress and MemorySize determine the target memory area, while MemoryData points to the diagnostic buffer of the DCM [SWS_Dcm_00540]. If MemoryIdentifier or MemoryAddress are not used (for example with compressed data), they must be set to 0 [SWS_Dcm_00540].
The return value Dcm_ReturnWriteMemoryType [SWS_Dcm_00986] defines further processing in the DCM:
DCM_WRITE_OK: The write operation was successful [SWS_Dcm_00540], [SWS_Dcm_00986].DCM_WRITE_PENDING: The operation is not yet completed and requires subsequent calls [SWS_Dcm_00540], [SWS_Dcm_00986].DCM_WRITE_FORCE_RCRRP: The DCM immediately initiates transmission of a response pending (NRC 0x78) and suspends further calls until transmission confirmation [SWS_Dcm_00837]. Thereafter, the recall fromDcm_MainFunctionis performed withDCM_FORCE_RCRRP_OK[SWS_Dcm_00838].DCM_WRITE_FAILED: In the event of an error, the DCM transmits a negative response with the NRC value passed via output parameterErrorCode[SWS_Dcm_00540], [SWS_Dcm_00643].
This text was generated by an AI based on the AUTOSAR Classic R20-11 specification.
Implementer's Guide to follow (complexity I2)
function Dcm_SetProgConditions [SWS_Dcm_00543] 📄 PDF
Std_ReturnType Dcm_SetProgConditions (Dcm_OpStatusType OpStatus, const Dcm_ProgConditionsType* ProgConditions);
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.
The callout function Dcm_SetProgConditions enables the integrator to persistently save relevant information before transitioning to the bootloader or performing a reset as a result of an ECUReset request [SWS_Dcm_00543]. The relevant context data is passed via a pointer to structure Dcm_ProgConditionsType, which bundles, among other things, connection and tester source addresses, service and sub-function IDs, as well as control flags such as ReprogramingRequest and ResponseRequired [SWS_Dcm_00988]. Upon receipt of a UDS service 0x10 with sub-function 0x02, the DCM sets these flags and calls the interface [SWS_Dcm_01182].
The call is asynchronous and non-reentrant (Non Reentrant) [SWS_Dcm_00543]. The states DCM_INITIAL, DCM_PENDING, DCM_CANCEL, or DCM_FORCE_RCRRP_OK are controlled via parameter OpStatus [SWS_Dcm_00543]. If execution is ongoing and the function returns DCM_E_PENDING, the DCM calls the interface again in the next main function cycle to complete the setting [SWS_Dcm_00543], [SWS_Dcm_01184]. By means of DCM_E_FORCE_RCRRP, the transmission of a response pending reply (NRC 0x78) can be forced [SWS_Dcm_00543]. Depending on the configuration, the call by the DCM takes place only after successful transmission of NRC 0x78 [SWS_Dcm_00535].
If the conditions were set without errors and the callout returns E_OK, the DCM initiates the mode switch of ModeDeclarationGroupPrototype DcmEcuReset to EXECUTE [SWS_Dcm_00719], [SWS_Dcm_01163], [SWS_Dcm_01180]. If, on the other hand, the state cannot be saved and the function responds with E_NOT_OK, the reset as well as the bootloader jump are omitted, the mode switch is prevented, and the DCM sends the negative response NRC 0x22 (Conditions not correct) [SWS_Dcm_00715], [SWS_Dcm_01181].
This usage note was generated by an AI based on the AUTOSAR Classic Release R20-11 specification.
Implementer's Guide to follow (complexity I2)
function Dcm_GetProgConditions [SWS_Dcm_00544] 📄 PDF
Dcm_EcuStartModeType Dcm_GetProgConditions (Dcm_ProgConditionsType* ProgConditions);
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.
The callout function Dcm_GetProgConditions with service ID 0x62 is called during initialization of the DCM to determine whether a pending diagnostic response to service $50 or $51 must be sent [SWS_Dcm_00544]. The declaration of the interface is provided via header file Dcm_Externals.h [SWS_Dcm_00544].
Usage and Parameters
Function execution is synchronous, with no regular input or input/output parameters being passed [SWS_Dcm_00544]:
- Output parameter: Via pointer
ProgConditionsof typeDcm_ProgConditionsType*, the callout returns the conditions under which the previous jump from the bootloader was requested [SWS_Dcm_00544]. The relevant context parameters are stored in data typeDcm_ProgConditionsType[SWS_Dcm_00544]. - Return value: The function returns a status value of type
Dcm_EcuStartModeTypeto the caller [SWS_Dcm_00544].
Concurrency and Error Handling
The function is classified as non-reentrant (Non Reentrant) and must therefore not be executed concurrently [SWS_Dcm_00544]. No specific DET or DEM error codes are defined for this callout in the interface specification [SWS_Dcm_00544].
This usage note was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function Dcm_ProcessRequestAddFile [SWS_Dcm_91078] 📄 PDF
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 0x01 (AddFile).
The callout function Dcm_ProcessRequestAddFile is called by the DCM to initiate the service RequestFileTransfer with the operating mode 0x01 (AddFile) ([SWS_Dcm_91078]). It is available via Dcm_Externals.h, has the service ID 0x72, and is specified as non-reentrant (Non Reentrant) and asynchronous ([SWS_Dcm_91078]).
Control of the asynchronous call sequence takes place via the parameter OpStatus:
DCM_INITIAL: All input parameters are valid. These include file path and name (filePathAndNamewithfilePathAndNameLength), the bytedataFormatIdentifier(high nibble for compression, low nibble for encryption), and the uncompressed and compressed file size (fileSizeUncompressed,fileSizeCompressed) ([SWS_Dcm_91078]).DCM_PENDING,DCM_CANCEL, andDCM_FORCE_RCRRP_OK: In these subsequent calls, all input parameters are set to0x00([SWS_Dcm_91078]).
As return values, the function returns E_OK upon successful execution, DCM_E_PENDING upon ongoing processing, or DCM_E_FORCE_RCRRP if the application requests sending a preliminary response (NRC 0x78) ([SWS_Dcm_91078], [SWS_Dcm_91086]). In case of success, maxNumberOfBlockLength defines the maximum allowed block length of future TransferData messages without SID and block counter ([SWS_Dcm_91078]).
In the event of an error, the function returns E_NOT_OK. In this case, a negative response code (NRC) must be passed via the parameter ErrorCode, which the DCM sends to the client in a negative diagnostic response ([SWS_Dcm_91078]). If configuration DcmRequestFileTransferUsePort is enabled, this functionality is alternatively provided as port operation ProcessRequestAddFile of interface RequestFileTransfer ([SWS_Dcm_91086]).
This usage note was generated automatically based on the AUTOSAR CP R20-11 specification.
Implementer's Guide to follow (complexity I2)
function Dcm_ProcessRequestDeleteFile [SWS_Dcm_91079] 📄 PDF
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 0x02 (DeleteFile). Manager
Usage and invocation semantics
The callout function Dcm_ProcessRequestDeleteFile is called by the DCM to initiate the deletion of a file (modeOfOperation = 0x02) on the server within the scope of the diagnostic service RequestFileTransfer [SWS_Dcm_91079]. The function is declared in Dcm_Externals.h and operates asynchronously and non-reentrant (Non Reentrant) [SWS_Dcm_91079].
Passing and evaluation take place based on parameter OpStatus:
DCM_INITIAL: Indicates the start of the operation. Here, all input parameters are valid;filePathAndNamepasses the storage location and name of the file to be deleted, the byte length of which is specified viafilePathAndNameLength[SWS_Dcm_91079].DCM_PENDING,DCM_CANCEL, orDCM_FORCE_RCRRP_OK: During continued processing or cancellation, all input parameters are set to0x00[SWS_Dcm_91079].
As return values, the function returns E_OK upon successful execution, DCM_E_PENDING if execution is still ongoing and requires further calls, or DCM_E_FORCE_RCRRP if the application requests sending an interim message with NRC 0x78 (Response Pending) [SWS_Dcm_91079], analogous to the service RequestFileTransfer [SWS_Dcm_91086].
Error handling
If processing fails, the function returns E_NOT_OK. In this case, a negative response code must be provided via the output parameter ErrorCode, which the DCM transmits to the tester as a negative response (NRC) [SWS_Dcm_91079].
This usage note was generated automatically based on the specification AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I2)
function Dcm_ProcessRequestReplaceFile [SWS_Dcm_91080] 📄 PDF
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 to start a RequestFileTransfer process with mode OfOperation equal to 0x03 (ReplaceFile).
The callout function Dcm_ProcessRequestReplaceFile is called by the DCM to initiate a diagnostic process for RequestFileTransfer with the operating mode 0x03 (ReplaceFile) [SWS_Dcm_91080]. The function is defined as non-reentrant (Non Reentrant) and asynchronous and is provided via the header Dcm_Externals.h [SWS_Dcm_91080].
Control of the asynchronous processing sequence takes place via parameter OpStatus:
- During the initial call with
DCM_INITIAL, the DCM passes all input parameters validly, including path and file name (filePathAndNamewith length specificationfilePathAndNameLength), the identifier for compression and encryption (dataFormatIdentifier), and the uncompressed and compressed file size (fileSizeUncompressed,fileSizeCompressed) [SWS_Dcm_91080]. - For subsequent calls or a cancellation (
DCM_PENDING,DCM_CANCEL,DCM_FORCE_RCRRP_OK), all in-parameters are set to0x00[SWS_Dcm_91080]. - In case of success, the function returns the maximum payload length for subsequent
TransferDatarequests (without SID and block sequence counter) to the DCM via the out-parametermaxNumberOfBlockLength[SWS_Dcm_91080].
The intended return values are E_OK upon successful execution, DCM_E_PENDING upon still ongoing processing, and DCM_E_FORCE_RCRRP to request a response-pending notification (NRC 0x78) [SWS_Dcm_91080], [SWS_Dcm_91086]. If execution fails, the function returns E_NOT_OK and assigns the corresponding negative diagnostic response code (NRC) to the parameter ErrorCode, which the DCM transmits to the tester [SWS_Dcm_91080].
This usage note was generated automatically based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I2)
function Dcm_ProcessRequestReadFile [SWS_Dcm_91081] 📄 PDF
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 0x04 (ReadFile).
The callout function Dcm_ProcessRequestReadFile is called by the DCM to start a file transfer process (Service RequestFileTransfer) with the operating mode ReadFile (modeOfOperation 0x04) [SWS_Dcm_91081]. The function is declared in the header Dcm_Externals.h, operates asynchronously, and is non-reentrant (Non Reentrant) [SWS_Dcm_91081].
The call is made via the status parameter OpStatus: During the initial call DCM_INITIAL, all input parameters are valid, whereas in subsequent calls with DCM_PENDING, DCM_CANCEL, or DCM_FORCE_RCRRP_OK they are set to 0x00 [SWS_Dcm_91081]. The application receives path and file name via filePathAndName (length in filePathAndNameLength), the format for compression and encryption via dataFormatIdentifier, and the file sizes via fileSizeUncompressed and fileSizeCompressed [SWS_Dcm_91081]. As an output parameter, the application must populate maxNumberOfBlockLength with the maximum byte count for subsequent TransferData responses (without SID and block sequence counter) [SWS_Dcm_91081].
As return values of Std_ReturnType, E_OK is defined upon successful execution, DCM_E_PENDING upon still ongoing asynchronous processing, or DCM_E_FORCE_RCRRP to request a \"Response Pending\" response (NRC 0x78) [SWS_Dcm_91081]. If the operation fails, it returns E_NOT_OK; in this case, the DCM transmits a negative response with the NRC value set in the output parameter ErrorCode to the tester [SWS_Dcm_91081]. The interaction corresponds to the general processing of the service RequestFileTransfer, as configured analogously for other file operations such as ProcessRequestAddFile [SWS_Dcm_91086].
This text was generated by an AI system and is based exclusively on the AUTOSAR Classic R20-11 specification.
Implementer's Guide to follow (complexity I2)
function Dcm_ProcessRequestReadDir [SWS_Dcm_91082] 📄 PDF
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 0x05 (ReadDir).
use
The callout function Dcm_ProcessRequestReadDir is declared via header file Dcm_Externals.h and called by the DCM to asynchronously start the service RequestFileTransfer with the operating mode 0x05 (ReadDir) [SWS_Dcm_91082]. The processing progress is controlled via the passing parameter OpStatus [SWS_Dcm_91082]. Upon the initial call with DCM_INITIAL, the DCM passes the path or name via filePathAndName together with the byte length filePathAndNameLength [SWS_Dcm_91082]. In subsequent calls or upon cancellation (DCM_PENDING, DCM_CANCEL, DCM_FORCE_RCRRP_OK), all input parameters are set to 0x00 [SWS_Dcm_91082].
As output values, the application must provide the size of the directory data via dirInfoLength and the maximum allowed block size for subsequent transfers via maxNumberOfBlockLength [SWS_Dcm_91082]. In addition to E_OK upon successful execution, the function can return DCM_E_PENDING if the operation is still ongoing, or DCM_E_FORCE_RCRRP to cause the sending of an interim response (NRC 0x78) [SWS_Dcm_91082].
Error handling
If an error occurs, the function must return E_NOT_OK. In this case, the DCM reads the parameter ErrorCode and transmits its value as a negative response code (NRC) to the tester [SWS_Dcm_91082]. Specific DET or DEM messages are not provided for the interface; error checks of the passed path are therefore likely to be entirely the responsibility of the application-specific implementation. Question Q-278dbc3db7b4363b (open)
Concurrency and Interaction
The function is specified as non-reentrant (Non Reentrant) and therefore must not be called concurrently for multiple diagnostic requests [SWS_Dcm_91082]. It is part of the interface group of the service RequestFileTransfer, the integration of which can be influenced via configuration parameters [SWS_Dcm_91086].
This usage note was generated automatically based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I2)
function Dcm_WriteFile [SWS_Dcm_91083] 📄 PDF
Std_ReturnType Dcm_WriteFile (Dcm_OpStatusType OpStatus, uint64 DataLength, uint8* Data, Dcm_NegativeResponseCodeType* ErrorCode);
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).
Usage and Call Context
The callout function Dcm_WriteFile is called by the DCM when data is received via the UDS service TransferData (0x36) and a download process previously started via RequestFileTransfer with the modes 0x01 (AddFile) or 0x03 (ReplaceFile) is active [SWS_Dcm_01444]. The interface is available via Dcm_Externals.h [SWS_Dcm_91083].
Parameter population depends on the progress status OpStatus [SWS_Dcm_91083]:
DCM_INITIAL: All input parameters are valid. The pointerDatapoints to the payload to be written, andDataLengthindicates its byte length. The value ofDataLengthdoes not exceed the maximum block length previously negotiated forDcm_ProcessRequestFileTransfer(NumberOfBlockLength).DCM_PENDING,DCM_CANCEL, andDCM_FORCE_RCRRP_OK: All input parameters are set to0x00.
Asynchronous Semantics and Return Values
The function operates asynchronously and is non-reentrant (Non Reentrant) [SWS_Dcm_91083]. It returns the following status values:
E_OK: The write operation was completed successfully.DCM_E_PENDING: Processing is not yet completed and requires further calls.DCM_E_FORCE_RCRRP: The application requests sending a wait response (Response Pending, NRC 0x78).E_NOT_OK: The operation failed.
Error handling
If Dcm_WriteFile returns the value E_NOT_OK, the DCM module sends a negative UDS response whose NRC corresponds to the value provided via the output parameter ErrorCode [SWS_Dcm_91083].
This text was generated by an AI-assisted system and is subject to verification against the AUTOSAR specification.
Implementer's Guide to follow (complexity I2)
function Dcm_ReadFileOrDir [SWS_Dcm_91085] 📄 PDF
Std_ReturnType Dcm_ReadFileOrDir (Dcm_OpStatusType OpStatus, uint64* DataLength, uint8* Data, 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).
The callout function Dcm_ReadFileOrDir is called by the DCM module when, within the scope of an ongoing file or directory upload (previously started via UDS service RequestFileTransfer with mode 0x04 for ReadFile or 0x05 for ReadDir), a format-compliant request for the UDS service TransferData (0x36) is received [SWS_Dcm_01445]. The function serves to provide the data to be sent to the client as a response [SWS_Dcm_91085]. The interface declaration is available via the header Dcm_Externals.h [SWS_Dcm_91085].
Execution occurs asynchronously and is specified as non-reentrant (Non Reentrant) [SWS_Dcm_91085]. The interaction and parameter population depend on the passed operating status:
- Operating status (
OpStatus): Upon the initial call withDCM_INITIAL, all input parameters are valid. For subsequent or cancellation calls withDCM_PENDING,DCM_CANCEL, orDCM_FORCE_RCRRP_OK, all input parameters are set to0x00[SWS_Dcm_91085]. - Buffer and block length: The parameter
DataLengthpasses the maximum allowed block length on the input side (corresponding to the valuemaxNumberOfBlockLengthreported to the client) and returns on the output side the byte length actually provided inData, which must not exceed the input value [SWS_Dcm_91085]. Interpretation: AlthoughDatais formally declared as an in-parameter in the interface, it is likely used to pass the payload to be read. Question Q-53de8a0bdbc4a2b4 (open) - Return values: The operation returns
E_OKupon successful data provision,DCM_E_PENDINGupon not yet completed processing, orDCM_E_FORCE_RCRRPif the application wants to force the sending of an interim message (Response Pending, NRC 0x78) [SWS_Dcm_91085].
If processing in the application fails, E_NOT_OK is returned. In this error case, the DCM module transmits a negative UDS response (NRC) to the client whose error code corresponds to the value set in output parameter ErrorCode [SWS_Dcm_91085].
This text was generated by an AI and serves as guidance. The official AUTOSAR specifications are authoritative.
Implementer's Guide to follow (complexity I2)
function Dcm_MainFunction [SWS_Dcm_00053] 📄 PDF
void Dcm_MainFunction (void);
This service is used for processing the tasks of the main loop.
The function Dcm_MainFunction serves to process the central tasks of the main loop of the Diagnostic Communication Manager ([SWS_Dcm_00053]). It has the signature void Dcm_MainFunction(void) and provides no return values. Since it is provided via the header SchM_Dcm.h, its invocation likely occurs cyclically in the context of a basic software scheduler task. Question Q-e083a72aae447ab5 (open)
An essential task is the control and cross-cycle continuation of asynchronous processes:
- If an operation with
Dcm_OpStatusTypereturns the return valueDCM_E_PENDING, the DCM invokes the operation again withOpStatus = DCM_PENDINGupon every call ofDcm_MainFunctionas long as this status persists ([SWS_Dcm_00530]). - If
Dem_ClearDTC()returns the statusDEM_PENDING, the function is called again in the next cycle ofDcm_MainFunction; the DCM sends NRC 78 (ResponsePending) if necessary ([SWS_Dcm_00703]). - Calls of
Dem_SetDTCFilter()with parameterFilterForFault-DetectionCounterset must imperatively take place in the context ofDcm_MainFunction([SWS_Dcm_00519]). - After confirmation of an RCR-RP transmission, the DCM calls operations such as
Dcm_WriteMemoryorDcm_ReadMemoryfromDcm_MainFunctionagain withOpStatus = DCM_FORCE_RCRRP_OK([SWS_Dcm_00529], [SWS_Dcm_00838], [SWS_Dcm_00840]). - If the value
DCM_E_PENDINGis reported forXxx_GetSecurityAttemptCounter, the call is interrupted and resumed in the next cycle ([SWS_Dcm_01351]); if the configured timeout is exceeded, the DCM aborts the pending operation withOpStatus = DCM_CANCEL([SWS_Dcm_01352]).
This usage note was generated automatically based on the AUTOSAR specification.
Implementer's Guide to follow (complexity I2)
function Xxx_GetSeed [SWS_Dcm_01151] 📄 PDF
Std_ReturnType Xxx_GetSeed (const uint8* SecurityAccessDataRecord, Dcm_OpStatusType OpStatus, uint8* Seed, Dcm_NegativeResponseCodeType* ErrorCode);
Request to application for asynchronous provision of seed value
The function Xxx_GetSeed (provided via Dcm_Externals.h) serves the asynchronous provision of a seed value by the application for the DCM module [SWS_Dcm_01151]. It is called as soon as a UDS request of the service SecurityAccess (0x27) with the subfunction type "requestSeed" is received and the requested security level is not yet active [SWS_Dcm_00862], [SWS_Dcm_00324].
Call Context and Parameters
The interface is defined as non-reentrant (Non Reentrant) and operates asynchronously [SWS_Dcm_01151]:
SecurityAccessDataRecord: Pointer to additional input data for the seed calculation; the minimum size is one byte according toDcmDspSecurityADRSize[SWS_Dcm_01151].OpStatus: Indicates the current status of the asynchronous operation [SWS_Dcm_01151].Seed: Output pointer via which the application provides the calculated seed [SWS_Dcm_01151].ErrorCode: Output parameter for returning a negative error code (NRC) [SWS_Dcm_01151].
Return Values and Error Handling
E_OK: The seed was successfully determined and provided [SWS_Dcm_01151].DCM_E_PENDING: The calculation is not yet completed; subsequent calculations or calls are necessary for completion [SWS_Dcm_01151].E_NOT_OK: The request failed. In this case, the DCM module sends a negative UDS response with the NRC value passed in the parameterErrorCode[SWS_Dcm_01151], [SWS_Dcm_00659].
Integration Notes
Depending on the configuration of DcmDspSecurityUsePort, the connection is established as a C function in USE_ASYNCH_FNC (referenced via DcmDspSecurityGetSeedFnc) [SWS_Dcm_00862] or as an Rte operation in USE_ASYNCH_CLIENT_SERVER [SWS_Dcm_00324]. If no additional access data needs to be passed, the alternative function signature without the parameter SecurityAccessDataRecord is used [SWS_Dcm_91003].
This usage note was created automatically based on the AUTOSAR CP R20-11 specification.
Implementer's Guide to follow (complexity I2)
function Xxx_GetSeed [SWS_Dcm_91003] 📄 PDF
Std_ReturnType Xxx_GetSeed (Dcm_OpStatusType OpStatus, uint8* Seed, Dcm_NegativeResponseCodeType* ErrorCode);
Request to application for asynchronous provision of seed value
The function Xxx_GetSeed serves as an asynchronous interface of the module DCM to the application in order to provide a seed value in the context of the UDS service SecurityAccess (0x27) for a request of type "requestSeed" [SWS_Dcm_91003], [SWS_Dcm_00862]. The call is performed by the DCM DSP submodule provided that the security level is not yet active and the configuration specifies USE_ASYNCH_CLIENT_SERVER or USE_ASYNCH_FNC [SWS_Dcm_00324], [SWS_Dcm_00862].
The interface is implemented as asynchronous and non-reentrant (Non Reentrant) [SWS_Dcm_91003]. Control of the processing progress is performed via the input parameter OpStatus (type Dcm_OpStatusType) [SWS_Dcm_91003]. Defined return values are E_OK upon successful provision, E_NOT_OK in the event of an error, and DCM_E_PENDING if seed generation is still ongoing and further calls are required [SWS_Dcm_91003]. The generated value is passed via the pointer Seed (inout/out buffer) [SWS_Dcm_91003].
If the operation fails and Xxx_GetSeed returns E_NOT_OK, the DCM module must send a negative response (NRC) with the error code that was set via output parameter ErrorCode (Dcm_NegativeResponseCodeType) [SWS_Dcm_91003], [SWS_Dcm_00659]. The service is declared via header Dcm_Externals.h [SWS_Dcm_91003].
This text was generated by an AI based on the AUTOSAR standard R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_CompareKey [SWS_Dcm_91004] 📄 PDF
Std_ReturnType Xxx_CompareKey (const uint8* Key, Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);
Request to application for asynchronous comparing key (DcmDspSecurityUsePort = USE_ ASYNCH_CLIENT_SERVER)
The function Xxx_CompareKey is called asynchronously and non-reentrantly by the Diagnostic Communication Manager ([SWS_Dcm_91004]) to compare a received key against the internal logic of the application within the scope of the UDS service SecurityAccess (0x27, subfunction sendKey) ([SWS_Dcm_00863]). It is used when the access status is not yet active, the seed request was successful, and the configuration parameter DcmDspSecurityUsePort is set to USE_ASYNCH_CLIENT_SERVER ([SWS_Dcm_00324]) or, according to [SWS_Dcm_00863], the function interface was configured via USE_ASYNCH_FNC/DcmDspSecurityCompareKeyFnc. The interface is declared in Dcm_Externals.h ([SWS_Dcm_91004]).
The passed arguments comprise the pointer to the key to be checked Key, the current operation status OpStatus (of type Dcm_OpStatusType), and the pointer ErrorCode for the negative response code to be output in case of an error ([SWS_Dcm_91004]). The following return values are specified:
E_OK: Key verification successful ([SWS_Dcm_91004]).DCM_E_PENDING: Verification not yet completed; further calls by the DCM module are required for completion ([SWS_Dcm_91004]).E_NOT_OK: Processing not successful. The DCM then sends a negative UDS response with the NRC set inErrorCodewithout changing the internal security level or incrementing the attempt counter (AttemptCounter) ([SWS_Dcm_01150]).DCM_E_COMPARE_KEY_FAILED: Key does not match ([SWS_Dcm_91004]).
If the key comparison fails (DCM_E_COMPARE_KEY_FAILED) and DcmDspSecurityNumAttDelay is configured, the AttemptCounter is incremented ([SWS_Dcm_01397]). If the counter is below the limit, the DCM sends NRC 0x35 (InvalidKey) ([SWS_Dcm_00660]). If the number of failed attempts reaches or exceeds the configured limit DcmDspSecurityNumAttDelay, the DCM starts the SecurityDelayTimer with duration DcmDspSecurityDelayTime and sends NRC 0x36 (exceededNumberOfAttempts) ([SWS_Dcm_01349]). In both cases, the security level remains unchanged.
This usage note was generated automatically and is based on the specifications of the AUTOSAR Classic R20-11 DCM module.
Implementer's Guide to follow (complexity I3)
function Xxx_GetSecurityAttemptCounter [SWS_Dcm_01152] 📄 PDF
Std_ReturnType Xxx_GetSecurityAttemptCounter (Dcm_OpStatusType OpStatus, uint8* AttemptCounter);
Read the attempt counter for a specific security level from the application
During the initialization of the DCM, the asynchronous and non-reentrant function [SWS_Dcm_01152] reads the current failed attempt counter for a configured security level from the application. The call is made for each entry in DcmDspSecurityRow for which the configuration parameter DcmDspSecurityAttemptCounterEnabled is set to TRUE [SWS_Dcm_01154].
Flow control is managed via the parameter OpStatus with the values DCM_INITIAL, DCM_PENDING, or DCM_CANCEL [SWS_Dcm_01152]. If the function returns DCM_E_PENDING, the DCM interrupts the call chain and resumes it in the subsequent cycle of Dcm_MainFunction() [SWS_Dcm_01351]. If the timeout DcmDspSecurityMaxAttemptCounterReadoutTime configured after the first cycle is exceeded, the DCM aborts the still pending process with DCM_CANCEL [SWS_Dcm_01352].
In case of success, the interface returns E_OK and passes the counter value via the output parameter AttemptCounter [SWS_Dcm_01152]. If the call returns E_NOT_OK, the DCM automatically sets the counter to the value configured for this security level DcmDspSecurityNumAttDelay [SWS_Dcm_01156].
As long as not all counter values have been definitively determined or aborted, the DCM rejects any request for SecurityAccess (0x27) to request a seed with the negative response code conditionsNotCorrect (0x22) [SWS_Dcm_01354]. After completion of the query chain, the DCM checks the counter values: If at least one counter reaches or exceeds the threshold value DcmDspSecurityNumAttDelay, the DCM starts the SecurityDelayTimer with the higher value of DcmDspSecurityDelayTimeOnBoot and DcmDspSecurityDelayTime [SWS_Dcm_01355].
This usage note was generated automatically based on the AUTOSAR R20-11 specification.
Implementer's Guide to follow (complexity I2)
function Xxx_SetSecurityAttemptCounter [SWS_Dcm_01153] 📄 PDF
Std_ReturnType Xxx_SetSecurityAttemptCounter (Dcm_OpStatusType OpStatus, uint8 AttemptCounter);
Set the attempt counter for a specific security level in the application
The function Xxx_SetSecurityAttemptCounter serves to set the attempt counter for a specific security level in the application ([SWS_Dcm_01153]). It is provided via the header Dcm_Externals.h.
Call and Semantics
Execution is asynchronous and specified as non-reentrant (Non Reentrant) ([SWS_Dcm_01153]). The call controls the flow via the parameter OpStatus with the values DCM_INITIAL, DCM_PENDING, or DCM_CANCEL. The new counter value is passed via the input parameter AttemptCounter (uint8).
Return Values and Error Handling
Std_ReturnType is used as the return type ([SWS_Dcm_01153]):
E_OK: The request was completed successfully.E_NOT_OK: The execution was not successful.DCM_E_PENDING: Processing is not yet finished; further calls are required for completion.
If an ongoing asynchronous operation is cancelled, the DCM passes the status DCM_CANCEL ([SWS_Dcm_01153]).
Interaction and Boundary Conditions
The DCM module calls Xxx_SetSecurityAttemptCounter as soon as it has changed the attempt counter in order to notify the application of the update ([SWS_Dcm_01155]). This requires that the configuration parameter DcmDspSecurityAttemptCounterEnabled for the associated DcmDspSecurityRow is configured to TRUE ([SWS_Dcm_01155]). Since the interface is non-reentrant, the application must prevent concurrent execution for the same instance ([SWS_Dcm_01153]).
This text was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_ReadData [SWS_Dcm_00793] 📄 PDF
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_SYNCH_CLIENT_SERVER.
The synchronous function Xxx_ReadData requests the current data value of a DID or PID from the application if the configuration parameter DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER [SWS_Dcm_00793]. The interface is provided via the header Dcm_Externals.h and has the service ID 0x34 [SWS_Dcm_00793]. The called application copies the requested payload directly into the passed buffer Data [SWS_Dcm_00793].
Regarding the return value, it is defined that the call returns E_OK without exception [SWS_Dcm_00793]. Specific error codes, negative responses, or DET/DEM messages are not specified for this signature. Interpretation: A failure of the data provision is presumably not intended at this interface level, since, unlike the asynchronous variant [SWS_Dcm_91005], neither a parameter ErrorCode for negative response codes (NRC) nor return values such as E_NOT_OK or DCM_E_PENDING exist. Question Q-adcf0171ecfd37c4 (open)
Regarding concurrency and constraints, the function is specified as non-reentrant (Non Reentrant) and operates fully synchronously [SWS_Dcm_00793]. Interaction with diagnostic requests occurs in several scenarios:
- Upon receiving an OBD service $01 request with non-availability PIDs, the DCM calls the respectively configured
Xxx_ReadDatafunctions for all data of the PID to capture the response values [SWS_Dcm_00408]. - For a UDS request of service 0x22 (ReadDataByIdentifier) with non-availability identifiers, the DCM calls the functions for all data of the
OBDDataIdentifier[SWS_Dcm_01380] as well as theOBDInfoTypeDataIdentifier[SWS_Dcm_01389]. - If, however, asynchronous behavior is required, the separate signatures with
OpStatusaccording to [SWS_Dcm_91006] or [SWS_Dcm_91005] take effect.
This text was created by an AI and is based exclusively on the specifications of Release R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_ReadData [SWS_Dcm_91006] 📄 PDF
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.
The function Xxx_ReadData is used to query data values of a DID or PID asynchronously from the application, provided the parameter DcmDspDataUsePort is configured to USE_DATA_ASYNCH_CLIENT_SERVER ([SWS_Dcm_91006]). It is declared via the header file Dcm_Externals.h ([SWS_Dcm_91006]).
Upon invocation, the parameter OpStatus (type Dcm_OpStatusType) controls the progress of the ongoing operation, while via pointer Data (type uint8*) the output buffer into which the requested data is to be copied is passed ([SWS_Dcm_91006]). Defined return values are E_OK upon successful completion and DCM_E_PENDING if processing is still ongoing and requires further calls for completion ([SWS_Dcm_91006]).
The DCM module integrates this function into the following diagnostic sequences:
- Upon receiving an OBD Service $01, the DCM reads the current PID values (except availability PIDs) via the configured
Xxx_ReadDatafunctions ([SWS_Dcm_00408]). - For UDS Service 0x22 (
ReadDataByIdentifier), the DCM calls the function for OBDDataIdentifier ([SWS_Dcm_01380]) and OBDInfoTypeDataIdentifier ([SWS_Dcm_01389]).
Regarding execution, the function is specified as non-reentrant (Non Reentrant) ([SWS_Dcm_91006]). In contrast to the synchronous interface ([SWS_Dcm_00793]) or the asynchronous variant with an additional ErrorCode parameter ([SWS_Dcm_91005]), this function variant does not provide for a direct return of a negative response code.
This text was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I3)
function Xxx_ReadData [SWS_Dcm_91005] 📄 PDF
Std_ReturnType Xxx_ReadData (Dcm_OpStatusType OpStatus, uint8* Data, Dcm_NegativeResponseCodeType* ErrorCode);
This function requests to the application a data value of a DID/PID if DcmDspDataUsePort is set to USE_DATA_ASYNCH_CLIENT_SERVER.
The function Xxx_ReadData asynchronously requests the data value of a DID or PID from the application, provided configuration parameter DcmDspDataUsePort is set to USE_DATA_ASYNCH_CLIENT_SERVER [SWS_Dcm_91005]. The function declaration is provided via interface file Dcm_Externals.h [SWS_Dcm_91005].
The interface has the following invocation and operational characteristics:
- Semantics and parameters: Input parameter
OpStatuscontrols the progress of the ongoing operation [SWS_Dcm_91005]. Upon successful completion, the requested payload data is copied into output bufferDataandE_OKis returned [SWS_Dcm_91005]. If the application requires further processing time, it signalsDCM_E_PENDING, whereupon follow-up operations are required [SWS_Dcm_91005]. - Error handling: If the operation fails and returns
E_NOT_OK, the DCM module evaluates output parameterErrorCodeand transmits a negative diagnostic response with this NRC code [SWS_Dcm_91005]. - Concurrency: The function is defined as non-reentrant (
Non Reentrant) [SWS_Dcm_91005]. Interpretation: Repeated invocations during pending processing are likely executed sequentially within the cycle of the DCM main processing. Question Q-541226d5f242f7c2 (open) - Interaction: The DCM module calls the function for requests of OBD Service $01 for non-availability PIDs [SWS_Dcm_00408] as well as for UDS Service ReadDataByIdentifier (0x22) for
OBDDataIdentifier[SWS_Dcm_01380] andOBDInfoTypeDataIdentifier[SWS_Dcm_01389]. Compared to synchronous variant [SWS_Dcm_00793] or asynchronous interfaces without an NRC parameter [SWS_Dcm_91006], this signature enables a specific negative error transmission.
This text was generated by an AI and is based exclusively on the specification requirements of AUTOSAR release R20-11.
Implementer's Guide to follow (complexity I3)
function Xxx_WriteData [SWS_Dcm_00794] 📄 PDF
Std_ReturnType Xxx_WriteData (const uint8* Data, Dcm_NegativeResponseCodeType* ErrorCode);
This function requests the application to write a data value of a DID.
use
The function Xxx_WriteData is called by the Diagnostic Communication Manager (DCM) to request the application to write a DID data value (Data Identifier) ([SWS_Dcm_00794]). The declaration is provided via header Dcm_Externals.h. The call is synchronous under service ID 0x51 ([SWS_Dcm_00794]).
Parameters and return values:
Data(in): Pointer to the buffer containing the payload data to be written ([SWS_Dcm_00794]).ErrorCode(out): Pointer to the variable into which the negative diagnostic code (NRC) is to be entered in case of a failure ([SWS_Dcm_00794]).- Return value (
Std_ReturnType):E_OKsignals successful writing,E_NOT_OKindicates failure of the operation ([SWS_Dcm_00794]).
Error handling
If the function returns E_NOT_OK, the DCM module reads out parameter ErrorCode and sends a negative diagnostic response with this NRC code ([SWS_Dcm_00794]).
Concurrency and Limitations
The function is specified as non-reentrant (Non Reentrant) ([SWS_Dcm_00794]) and must not be executed concurrently.
Interaction
Since no length parameter exists, this variant is likely intended for DIDs with fixed data length. Question Q-ebc074ac1cb66aaa (open) For variable-length DIDs, AUTOSAR provides the synchronous signature with parameter DataLength ([SWS_Dcm_91007]). In addition, asynchronous variants with OpStatus and possible return of DCM_E_PENDING exist for prolonged operations, both with fixed data length ([SWS_Dcm_91008]) and with a variable length parameter ([SWS_Dcm_91009]).
This text was generated by an AI based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_WriteData [SWS_Dcm_91007] 📄 PDF
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.
The callback function Xxx_WriteData is used to request the application to write the data value of a Data Identifier (DID) [SWS_Dcm_91007]. The interface is declared via the header Dcm_Externals.h and has the service ID 0x52 [SWS_Dcm_91007]. The call is synchronous and is specified as non-reentrant (Non Reentrant), which is why no concurrent calls may occur for the same function [SWS_Dcm_91007].
As parameters, the function receives the buffer Data containing the payload to be written as well as DataLength with the length specification in bytes [SWS_Dcm_91007]. As return value, it returns the type Std_ReturnType with E_OK upon successful execution or E_NOT_OK in case of error [SWS_Dcm_91007]. If the operation fails and returns E_NOT_OK, the DCM module must send a negative response to the diagnostic tester; the Negative Response Code (NRC) corresponds to the value transmitted via the pointer parameter ErrorCode [SWS_Dcm_91007].
In the overall system, [SWS_Dcm_91007] represents the synchronous variant for DIDs with an explicit length specification. In addition, with [SWS_Dcm_00794] (service ID 0x51), a synchronous variant without the parameter DataLength exists. For longer write operations, the standard provides asynchronous interfaces: [SWS_Dcm_91008] (service ID 0x35) without length specification and [SWS_Dcm_91009] (service ID 0x3e) with DataLength. Both asynchronous functions are controlled via OpStatus and can return DCM_E_PENDING in addition to E_OK and E_NOT_OK [SWS_Dcm_91008] [SWS_Dcm_91009].
This usage note was generated automatically based on the AUTOSAR Classic Release R20-11 specification.
Implementer's Guide to follow (complexity I2)
function Xxx_WriteData [SWS_Dcm_91008] 📄 PDF
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.
use
The function Xxx_WriteData requests the application to write the data value of a Data Identifier (DID) [SWS_Dcm_91008]. It is declared in the header file Dcm_Externals.h and has asynchronous execution semantics with the service ID 0x35 [SWS_Dcm_91008].
The parameters and return values are structured as follows [SWS_Dcm_91008]:
Data(IN): Pointer to the buffer containing the data to be written.OpStatus(IN): Status of the current operation to control the asynchronous call sequence.ErrorCode(OUT): Pointer to the error code (NRC) that is set in case of error.- Return value (
Std_ReturnType):E_OKconfirms the successful write operation,E_NOT_OKreports a failure, andDCM_E_PENDINGindicates that the operation is still ongoing and requires further calls for completion.
Error Handling and Concurrency
If the call returns the value E_NOT_OK, the DCM module must transmit a negative response with the NRC value passed in the output parameter ErrorCode [SWS_Dcm_91008]. The function is specified as non-reentrant [SWS_Dcm_91008], so concurrent or overlapping calls for the same instance are not permitted.
Interaction and Variants
This interface according to [SWS_Dcm_91008] covers asynchronous write access without a separate length parameter. In this regard, AUTOSAR defines related variants in the DCM: a synchronous signature without length specification [SWS_Dcm_00794] as well as signatures with an additional parameter DataLength for synchronous [SWS_Dcm_91007] and asynchronous sequences [SWS_Dcm_91009].
This usage note was generated by an AI system based on the AUTOSAR CP R20-11 specification.
Implementer's Guide to follow (complexity I2)
function Xxx_WriteData [SWS_Dcm_91009] 📄 PDF
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.
Usage and Semantics
The function Xxx_WriteData requests the application to write the data value of a Data Identifier (DID) [SWS_Dcm_91009]. It is declared via the header file Dcm_Externals.h and has the service ID 0x3e [SWS_Dcm_91009]. Execution is asynchronous (Asynchronous), for which the following parameters are passed:
Data(IN): Pointer to the buffer containing the payload to be written [SWS_Dcm_91009].DataLength(IN): Length of the data to be written in bytes [SWS_Dcm_91009].OpStatus(IN): Operation status (Dcm_OpStatusType) to control the asynchronous processing progress [SWS_Dcm_91009].ErrorCode(OUT): Pointer to receive a negative response code (NRC) in case of error [SWS_Dcm_91009].
Defined return values of type Std_ReturnType are E_OK (write request completed successfully), E_NOT_OK (request failed), and DCM_E_PENDING [SWS_Dcm_91009]. The status DCM_E_PENDING signals that the process is not yet finished and further subsequent calls are required for completion [SWS_Dcm_91009]. Interpretation: The DCM is likely to call the function again cyclically upon return of DCM_E_PENDING with continued OpStatus until a final result is available. Question Q-fdbd734dab052f5c (open)
Error Handling and Concurrency
If the function returns the value E_NOT_OK, the corresponding error code must be provided via the parameter ErrorCode; the DCM module then sends a negative response with this NRC value [SWS_Dcm_91009]. Specific DET or DEM messages are not defined in the payload for this interface. Regarding concurrency, the function is specified as non-reentrant (Non Reentrant) [SWS_Dcm_91009].
Interaction and Interface Variants
The signature [SWS_Dcm_91009] covers asynchronous write accesses with explicit length specification. Further variants of Xxx_WriteData exist in the DCM:
- Synchronous execution without length specification: [SWS_Dcm_00794] (service ID
0x51). - Synchronous execution with length specification: [SWS_Dcm_91007] (service ID
0x52). - Asynchronous execution without length specification: [SWS_Dcm_91008] (service ID
0x35).
Note: This usage note was created automatically based on the AUTOSAR Classic specification for Release R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_ReadDataLength [SWS_Dcm_00796] 📄 PDF
Std_ReturnType Xxx_ReadDataLength (uint16* DataLength);
This function requests the application to return the data length in byte of a Data.
use
With the function Xxx_ReadDataLength, the DCM module requests the application to determine and return the data length of a data element in bytes [SWS_Dcm_00796]. The interface is declared in the header Dcm_Externals.h and has the Service ID 0x36 [SWS_Dcm_00796]. The query is executed synchronously [SWS_Dcm_00796]. Via the output parameter DataLength of type uint16*, the application passes the byte length of the data to be read to the DCM [SWS_Dcm_00796]. Input or input/output parameters are not defined [SWS_Dcm_00796]. As return value, the function always returns E_OK of type Std_ReturnType [SWS_Dcm_00796].
Concurrency and Limitations
The interface is specified as non-reentrant (Non Reentrant) [SWS_Dcm_00796]. Since the function operates synchronously and, according to the specification, always reports E_OK, no specific error codes or differing status returns are intended for this call [SWS_Dcm_00796].
Interaction
In addition to the synchronous function, an asynchronous variant of the same name exists with the Service ID 0x4c, which is likewise provided via Dcm_Externals.h [SWS_Dcm_91010]. While the synchronous version [SWS_Dcm_00796] does without an operation status, the asynchronous counterpart requires the input parameter OpStatus of type Dcm_OpStatusType [SWS_Dcm_91010]. In addition, the asynchronous interface can return the return value DCM_E_PENDING besides E_OK if the request is not yet completed and requires further calls for completion [SWS_Dcm_91010].
This text was generated by an AI and serves as guidance. The requirements of the respective AUTOSAR specification are binding.
Implementer's Guide to follow (complexity I1)
function Xxx_ReadDataLength [SWS_Dcm_91010] 📄 PDF
Std_ReturnType Xxx_ReadDataLength (Dcm_OpStatusType OpStatus, uint16* DataLength);
This function requests the application to return the data length in byte of a Data.
The function [SWS_Dcm_91010] (Service ID 0x4c) requests the application to determine the data length of a data element in bytes. It is declared in header Dcm_Externals.h and serves the Diagnostic Communication Manager (DCM) for flexible length querying of diagnostic data.
Usage and Semantics
Upon the call, the DCM module passes the current progress via the input parameter OpStatus of type Dcm_OpStatusType ([SWS_Dcm_91010]). The application writes the result of the query into the output parameter DataLength (type uint16*). If the data length is not immediately available, the function signals via the return value DCM_E_PENDING that processing is ongoing and further calls are required ([SWS_Dcm_91010]). As soon as the result is available, the application reports completion with E_OK.
Concurrency and Limitations
According to the specification, the function is classified as non-reentrant ([SWS_Dcm_91010]), which is why concurrent calls by the DCM must be excluded. Since the specification provides no specific error values other than DCM_E_PENDING, the DCM can probably always assume a validly set byte size upon return of E_OK. Question Q-e7ecd3a518e2cbcb (open)
Interaction
The asynchronous interface [SWS_Dcm_91010] differs from the related synchronous variant [SWS_Dcm_00796] (Service ID 0x36). The latter has no OpStatus parameter, is executed synchronously, and always returns the length immediately with E_OK. In contrast, [SWS_Dcm_91010] allows the application to spread time-intensive calculations asynchronously over multiple call cycles.
This text was created by an AI based on the AUTOSAR specification.
Implementer's Guide to follow (complexity I2)
function Xxx_ConditionCheckRead [SWS_Dcm_00797] 📄 PDF
Std_ReturnType Xxx_ConditionCheckRead (Dcm_NegativeResponseCodeType* ErrorCode);
This function requests to the application if the conditions to read the Data are correct.
The synchronous callout function Xxx_ConditionCheckRead is provided via the header file Dcm_Externals.h and serves to query the application as to whether the conditions for reading out the diagnostic data are fulfilled [SWS_Dcm_00797].
The interface has no input parameters and signals the status of the check via the return value of type Std_ReturnType [SWS_Dcm_00797]:
E_OK: The check was successful; the conditions for reading the data are fulfilled [SWS_Dcm_00797].E_NOT_OK: The check failed; reading out is not permitted [SWS_Dcm_00797].
If the function returns E_NOT_OK, the DCM module sends a negative response with the error code that the application passed via output parameter ErrorCode (type Dcm_NegativeResponseCodeType*) [SWS_Dcm_00797].
Regarding concurrency, the function is specified as non-reentrant (Non Reentrant) and is executed synchronously with service ID 0x49 [SWS_Dcm_00797]. The check should therefore presumably be evaluated application-side immediately without blocking wait times to avoid delaying the synchronous DCM caller. Question Q-ada29c78c29d961e (open)
In contrast to this synchronous operation, [SWS_Dcm_91011] defines an asynchronous variant under service ID 0x37. This additionally uses the input parameter OpStatus (type Dcm_OpStatusType) and, besides E_OK and E_NOT_OK, can also return DCM_E_PENDING if subsequent steps are required to finish the check [SWS_Dcm_91011].
This usage note was generated automatically based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function Xxx_ConditionCheckRead [SWS_Dcm_91011] 📄 PDF
Std_ReturnType Xxx_ConditionCheckRead (Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);
This function requests to the application if the conditions to read the Data are correct.
Usage and Semantics
The function Xxx_ConditionCheckRead is provided via the header file Dcm_Externals.h and serves to query the application software whether the conditions for reading diagnostic data are fulfilled [SWS_Dcm_91011]. Execution takes place under Service ID 0x37 asynchronously [SWS_Dcm_91011]. The current status of the ongoing operation is passed via the input parameter OpStatus (type Dcm_OpStatusType) [SWS_Dcm_91011].
Return Values and Error Handling
As return value, the function provides a status of type Std_ReturnType [SWS_Dcm_91011]:
E_OK: The request was successful and the read conditions are fulfilled [SWS_Dcm_91011].E_NOT_OK: The check failed [SWS_Dcm_91011]. In this case, the application must set a negative response code (NRC) of typeDcm_NegativeResponseCodeTypevia the output parameterErrorCode; the DCM module then sends a negative response with this NRC [SWS_Dcm_91011].DCM_E_PENDING: The check is not yet completed, so further calls are required for completion [SWS_Dcm_91011].
Concurrency and Distinction
The interface is specified as non-reentrant (Non Reentrant) [SWS_Dcm_91011]. In contrast to this asynchronous variant, [SWS_Dcm_00797] defines a synchronous signature without the OpStatus parameter under Service ID 0x49, which exclusively returns E_OK or E_NOT_OK [SWS_Dcm_00797].
This usage note was generated by an AI based on the AUTOSAR R20-11 specification.
Implementer's Guide to follow (complexity I2)
function Xxx_GetScalingInformation [SWS_Dcm_00798] 📄 PDF
Std_ReturnType Xxx_GetScalingInformation (uint8* ScalingInfo, Dcm_NegativeResponseCodeType* ErrorCode);
This function requests to the application for the scaling information of a Data.
function Xxx_GetScalingInformation [SWS_Dcm_91012] 📄 PDF
Std_ReturnType Xxx_GetScalingInformation (Dcm_OpStatusType OpStatus, uint8* ScalingInfo, Dcm_NegativeResponseCodeType* ErrorCode);
This function requests to the application for the scaling information of a Data.
The asynchronous interface Xxx_GetScalingInformation is provided via the header Dcm_Externals.h and serves to request scaling information of a data element from the application [SWS_Dcm_91012]. The DCM module calls this function as soon as a diagnostic request for the UDS service ReadScalingByIdentifier is received, specifically for each datum configured for the requested DID [SWS_Dcm_00394].
Parameters and Return Values
The function defines the following parameters and semantics [SWS_Dcm_91012]:
OpStatus(in): Passes the current status of the ongoing operation.ScalingInfo(out): Buffer for receiving the scaling information (scalingByteandscalingByteExtension).ErrorCode(out): Receives the negative response code if the operation fails.
As return values, E_OK upon successful completion, E_NOT_OK in case of an error, as well as DCM_E_PENDING if processing is not yet completed and requires further calls for completion are specified [SWS_Dcm_91012].
Error Handling and Concurrency
If the call returns E_NOT_OK, the DCM module must send a negative response whose NRC corresponds to the value provided via output parameter ErrorCode [SWS_Dcm_91012]. The function is specified as non-reentrant (Non Reentrant) [SWS_Dcm_91012]. Interpretation: Whether this asynchronous function with OpStatus or the alternatively specified synchronous variant without OpStatus [SWS_Dcm_00798] is called probably depends on the configuration of the respective DID. Question Q-c4054a798f17a52c (open)
This text was created by an AI; the correctness and completeness of the information cannot be guaranteed.
Implementer's Guide to follow (complexity I2)
function Xxx_ReturnControlToECU [SWS_Dcm_01285] 📄 PDF
Std_ReturnType Xxx_ReturnControlToECU ([ Dcm_ControlMask_{DID}Type controlMask ], [ uint8* controlMask2 ], Dcm_NegativeResponseCodeType* ErrorCode);
This function requests to the application to return control to ECU of an IOControl.
The function Xxx_ReturnControlToECU is provided via the header Dcm_Externals.h and requests the application to return control of an input/output control (IOControl) to the ECU [SWS_Dcm_01285]. The call takes place synchronously and is specified as non-reentrant [SWS_Dcm_01285].
Parameters and Variants
The function signature depends on the configuration of the external control mask [SWS_Dcm_01285]:
- If
DcmDspDidControlMaskis set toDCM_CONTROLMASK_EXTERNALand the mask size is up to four bytes (DcmDspDidControlMaskSize <= 0x04), the input parametercontrolMaskof typeDcm_ControlMask_{DID}Typeis passed [SWS_Dcm_01285]. - If the mask size is five or more bytes (
DcmDspDidControlMaskSize >= 0x05), the pointercontrolMask2of typeuint8*is used instead [SWS_Dcm_01285]. - Via the output parameter
ErrorCode(typeDcm_NegativeResponseCodeType*), the function transmits the specific negative response code (NRC) to the DCM in case of error [SWS_Dcm_01285].
Return Values and Error Handling
The function returns the status Std_ReturnType. Upon successful return of control, the application reports E_OK [SWS_Dcm_01285]. If the operation fails, the function must return E_NOT_OK; in this case, the DCM module sends a negative response with the NRC stored in ErrorCode to the diagnostic tester [SWS_Dcm_01285].
Interaction and Call Context
The DCM calls the configured function interface (parameter DcmDspDataReturnControlToEcuFnc) when DcmDspDataUsePort is configured to USE_DATA_SYNCH_FNC, USE_DATA_ASYNCH_FNC, or USE_DATA_ASYNCH_FNC_ERROR [SWS_Dcm_01435]. In addition to regular diagnostic actions, Xxx_ReturnControlToECU is called by the DCM in particular when an active IO control sequence must be aborted [SWS_Dcm_01435].
This usage note was generated automatically based on the specification.
Implementer's Guide to follow (complexity I1)
function Xxx_ResetToDefault [SWS_Dcm_01286] 📄 PDF
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.
The synchronous function interface Xxx_ResetToDefault is provided via the header Dcm_Externals.h and serves to request an application to reset an I/O control (IOControl) to the default value [SWS_Dcm_01286].
Call Context and Parameters
The function has the Service ID 0x4d, operates synchronously, and is specified as non-reentrant [SWS_Dcm_01286]. Depending on the configured size of the external control mask, one of two alternative input parameters is passed:
controlMask(typeDcm_ControlMask_{DID}Type) is used whenDcmDspDataUsePortis configured toUSE_DATA_SYNCH_FNC,DcmDspDidControlMaskis set toDCM_CONTROLMASK_EXTERNAL, andDcmDspDidControlMaskSizeis at most0x04[SWS_Dcm_01286].controlMask2(typeuint8*) is used when, under identical boundary conditions,DcmDspDidControlMaskSizeis configured to be greater than or equal to0x05[SWS_Dcm_01286].
Return Values and Error Handling
If the reset could be performed successfully, the function returns E_OK [SWS_Dcm_01286]. If the operation fails, E_NOT_OK must be returned. In this case, the application sets the output parameter ErrorCode (type Dcm_NegativeResponseCodeType*) to the corresponding negative response code (NRC), which the DCM module transmits to the tester as negative feedback [SWS_Dcm_01286].
Interaction and Distinction
If the system is designed for asynchronous interface handling via USE_DATA_ASYNCH_FNC or USE_DATA_ASYNCH_FNC_ERROR, the asynchronous variant with the additional parameter OpStatus and the Service ID 0x3c is used instead of this synchronous function [SWS_Dcm_01314].
This text was generated by an AI and is based on the specifications of AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I1)
function Xxx_ResetToDefault [SWS_Dcm_01314] 📄 PDF
Std_ReturnType Xxx_ResetToDefault (Dcm_OpStatusType OpStatus, [ Dcm_ControlMask_{DID}Type controlMask ], [ uint8* controlMask2 ], Dcm_NegativeResponseCodeType* ErrorCode);
This function requests to the application to reset an IOControl to default value.
The asynchronous function [SWS_Dcm_01314] requests the application to reset an input/output control (IOControl) to its default value. It is declared in Dcm_Externals.h and has the Service ID 0x3c. The progress of the operation is controlled via the parameter OpStatus. If processing is not yet completed, the function returns DCM_E_PENDING, whereas a successful completion is confirmed with E_OK.
Depending on the configuration and the mask size (DcmDspDidControlMaskSize up to 4 bytes or 5 bytes and above), controlMask or controlMask2 is additionally passed in the case of external masking [SWS_Dcm_01314]. If the reset fails, the function returns E_NOT_OK. In this case, a negative response code (NRC) must be passed via the output parameter ErrorCode, which the DCM module sends to the tester as a negative response [SWS_Dcm_01314].
The function is specified as non-reentrant (Non Reentrant) [SWS_Dcm_01314]. It is used when DcmDspDataUsePort is set to USE_DATA_ASYNCH_FNC or USE_DATA_ASYNCH_FNC_ERROR. For synchronous interface configurations (USE_DATA_SYNCH_FNC), the synchronous variant without OpStatus exists alternatively [SWS_Dcm_01286].
This text was generated by an AI and is based on the specification state of AUTOSAR R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_FreezeCurrentStateManager [SWS_Dcm_01290] 📄 PDF
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.
use
The synchronous function Xxx_FreezeCurrentState (listed in the element catalog as Xxx_FreezeCurrentStateManager) serves to request an application to freeze the current state of an input or output control (IOControl) [SWS_Dcm_01290]. The function is available via the header file Dcm_Externals.h and has the service ID 0x4a AUTOSAR_SWS_DiagnosticCommunicationManager p. 279. (Interpretation: The prefix Xxx is likely to act as a placeholder for the respective application module.) Question Q-f8c864cda732acc2 (open)
The interface parameters depend on the configuration of the external control mask (DcmDspDidControlMask to DCM_CONTROLMASK_EXTERNAL) [SWS_Dcm_01290]:
controlMask(input, typeDcm_ControlMask_{DID}Type): Is passed if the mask sizeDcmDspDidControlMaskSizeis configured to be less than or equal to 4 bytes (<= 0x04).controlMask2(input, typeuint8*): Is used instead if the mask size comprises at least 5 bytes (=> 0x05).ErrorCode(output, typeDcm_NegativeResponseCodeType*): Pointer to receive a negative response code in case of errors.
Error Handling and Return Values
As Std_ReturnType, the function returns either E_OK upon successful execution or E_NOT_OK if the request was not successful [SWS_Dcm_01290]. If an error occurs and E_NOT_OK is returned, the application must enter a specific negative response code (NRC) in parameter ErrorCode; the DCM module then sends a negative diagnostic response with this NRC code AUTOSAR_SWS_DiagnosticCommunicationManager p. 279.
Concurrency and Limitations
The operation is specified as non-reentrant (Non Reentrant) [SWS_Dcm_01290]. Callers must ensure that calls for the same instance are processed synchronously and without concurrent overlap.
This text was created by an AI and serves as guidance. The AUTOSAR specification is binding.
Implementer's Guide to follow (complexity I1)
function Xxx_FreezeCurrentStateManager [SWS_Dcm_01315] 📄 PDF
Std_ReturnType Xxx_FreezeCurrentState (Dcm_OpStatusType OpStatus, [ Dcm_ControlMask_{DID}Type controlMask ], [ uint8* controlMask2 ], Dcm_NegativeResponseCodeType* ErrorCode);
This function requests to the application to freeze the current state of an IOControl.
Usage and Call Context
The asynchronous function Xxx_FreezeCurrentState is called by the DCM module to request the application software to freeze the current state of an input/output control (IOControl) [SWS_Dcm_01315]. The declaration is provided via the header Dcm_Externals.h [SWS_Dcm_01315].
Parameters and Control Masks
The call occurs with the following parameters [SWS_Dcm_01315]:
OpStatus: Transmits the current status of the asynchronous operation (Dcm_OpStatusType).controlMaskorcontrolMask2: If the control mask is configured externally (DcmDspDidControlMask == DCM_CONTROLMASK_EXTERNAL) and the asynchronous function interface is used, the DCM passes the parametercontrolMask(of typeDcm_ControlMask_{DID}Type) for up to 4 bytes and the pointercontrolMask2(uint8*) for 5 bytes or more, depending onDcmDspDidControlMaskSize.ErrorCode: Pointer toDcm_NegativeResponseCodeTypefor returning an error code.
Return Values and Error Handling
The function returns a status of type Std_ReturnType [SWS_Dcm_01315]:
E_OK: Freezing the state was successfully completed.DCM_E_PENDING: The request is still in progress and requires subsequent feeds.E_NOT_OK: The operation has failed. In this case, the DCM sends a negative diagnostic response with the NRC value set viaErrorCode.
Concurrency
The interface is defined as non-reentrant (Non Reentrant) and therefore requires synchronized processing per control instance [SWS_Dcm_01315].
This text was created by an AI and curated according to editorial guidelines.
Implementer's Guide to follow (complexity I2)
function Xxx_ShortTermAdjustment [SWS_Dcm_00802] 📄 PDF
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.
The synchronous function Xxx_ShortTermAdjustment requests the application to temporarily adjust a specific I/O signal [SWS_Dcm_00802]. It is provided via the header Dcm_Externals.h and has the Service ID 0x50 [SWS_Dcm_00802].
Via the pointer ControlStateInfo, the function receives the control state information from the parameter ControlOptionRecord of the diagnostic request InputOutputControlByIdentifier [SWS_Dcm_00802]. If an external control mask is configured (DcmDspDidControlMask == DCM_CONTROLMASK_EXTERNAL), either controlMask (up to 4 bytes) of type Dcm_ControlMask_{DID}Type or controlMask2 (from 5 bytes) as uint8* is additionally passed depending on DcmDspDidControlMaskSize [SWS_Dcm_00802].
As return value, the operation returns Std_ReturnType [SWS_Dcm_00802]:
E_OK: The adjustment of the I/O signal was executed successfully [SWS_Dcm_00802].E_NOT_OK: The adjustment failed [SWS_Dcm_00802]. In this case, the application must set a specific negative response code (Dcm_NegativeResponseCodeType) via the output parameterErrorCode, which the DCM module returns to the tester in the negative diagnostic response [SWS_Dcm_00802].
The function is non-reentrant (Non Reentrant) and is called synchronously [SWS_Dcm_00802]. This synchronous variant is used if the data element is configured for synchronous function calls (DcmDspDataUsePort == USE_DATA_SYNCH_FNC) [SWS_Dcm_00802]. For asynchronously configured ports (USE_DATA_ASYNCH_FNC or USE_DATA_ASYNCH_FNC_ERROR), on the other hand, the asynchronous variant with Service ID 0x55 and an extended parameter set including OpStatus and DataLength exists [SWS_Dcm_01316].
This text was generated by an AI and is based on AUTOSAR R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_ShortTermAdjustment [SWS_Dcm_01316] 📄 PDF
Std_ReturnType Xxx_ShortTermAdjustment (const uint8* ControlStateInfo, uint16 DataLength, Dcm_OpStatusType OpStatus, [ Dcm_ControlMask_{DID}Type controlMask ], [ uint8* controlMask2 ], Dcm_NegativeResponseCodeType* ErrorCode);
This function requests to the application to adjust the IO signal.
Usage and Call Context
The function [SWS_Dcm_01316] is called by the Diagnostic Communication Manager (DCM) and provided via Dcm_Externals.h. It asynchronously requests the application to adjust an IO signal within the scope of the diagnostic service InputOutputControlByIdentifier. The control data is passed via the pointer ControlStateInfo (from the parameter ControlOptionRecord), supplemented by the byte length DataLength. The flow is controlled via OpStatus: As long as the adjustment is ongoing, the application returns DCM_E_PENDING; after successful completion, it reports E_OK.
Variants and Mask Parameters
If the control mask is configured externally (DCM_CONTROLMASK_EXTERNAL), additional parameters are passed [SWS_Dcm_01316]:
- If the mask size is less than or equal to 4 bytes,
controlMaskof typeDcm_ControlMask_{DID}Typeis passed. - If the mask size is at least 5 bytes,
controlMask2is passed as a pointer touint8instead.
Error Handling and Concurrency
If the signal control fails, the function returns E_NOT_OK and sets the negative response code (NRC) via the pointer ErrorCode, which the DCM transmits in the negative response [SWS_Dcm_01316]. The function is specified as non-reentrant.
Interaction and Distinction
The interface is used when the DID data port is configured to USE_DATA_ASYNCH_FNC or USE_DATA_ASYNCH_FNC_ERROR and the data type to UINT8_DYN [SWS_Dcm_01316]. It differs from the synchronous variant [SWS_Dcm_00802], which uses neither OpStatus nor DataLength and is intended for synchronous ports with static data types.
This text was generated automatically by an AI curation assistant based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_IsDidAvailable [SWS_Dcm_00803] 📄 PDF
Std_ReturnType Xxx_IsDidAvailable (uint16 DID, Dcm_OpStatusType OpStatus, Dcm_DidSupportedType* supported);
This function requests if a specific DID is available within the range or not.
The function Xxx_IsDidAvailable serves for the asynchronous check of whether a requested Diagnostic Identifier (DID) is available within a defined DID range [SWS_Dcm_00803]. It is provided via the header Dcm_Externals.h and has the Service ID 0x53 [SWS_Dcm_00803].
Usage and Parameters
The call occurs with the following parameters [SWS_Dcm_00803]:
DID(In): The identifier value of the DID to be queried [SWS_Dcm_00803].OpStatus(In): The current status of the operation for controlling the asynchronous flow [SWS_Dcm_00803].supported(Out): Indicates whether the DID is available in the range;DCM_DID_SUPPORTEDdenotes support, whileDCM_DID_NOT_SUPPORTEDindicates non-support [SWS_Dcm_00803].
Asynchronous Semantics and Return Values
Since the function is executed asynchronously, the determination may require multiple call steps [SWS_Dcm_00803]. The return value DCM_E_PENDING signals that the request is not yet completed and further calls are necessary for completion [SWS_Dcm_00803]. The return value E_OK is reported when the check is completed [SWS_Dcm_00803] (Interpretation: Presumably E_OK completes the query, whereupon the parameter supported contains the valid result). Question Q-22c62d306a7ac4f1 (open)
Concurrency and Limitations
The interface is specified as non-reentrant (Non Reentrant) [SWS_Dcm_00803]. Parallel calls for the same or other DIDs within the same instance are therefore impermissible.
This text was generated by an AI and is based exclusively on specification data from AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_ReadDidData [SWS_Dcm_00804] 📄 PDF
Std_ReturnType Xxx_ReadDidData (uint16 DID, uint8* Data, Dcm_OpStatusType OpStatus, uint16 DataLength, Dcm_NegativeResponseCodeType ErrorCode);
This function requests to the application a data value of a DID
Usage and Parameter Interface
The function Xxx_ReadDidData (service ID 0x40) is available via Dcm_Externals.h and requests the data values of a data identifier (DID) from the application [SWS_Dcm_00804]. Passing and feedback take place via the following parameters:
DID: Identifier of the requested Data Identifier [SWS_Dcm_00804].Data: Pointer to the buffer into which the read payload data must be copied [SWS_Dcm_00804].OpStatus: Progress or operation status of the current request [SWS_Dcm_00804].DataLength: Length of the data to be read [SWS_Dcm_00804].ErrorCode: Output parameter for receiving a negative response code (NRC) [SWS_Dcm_00804].
Asynchronous Semantics and Return Values
The function is defined as asynchronous (Asynchronous) and returns a status of type Std_ReturnType [SWS_Dcm_00804]:
E_OK: Reading the data was successful [SWS_Dcm_00804].DCM_E_PENDING: The request is not yet completed; further calls are required for completion [SWS_Dcm_00804].E_NOT_OK: The operation was not successful [SWS_Dcm_00804].
Error Handling and Concurrency
If the application returns the return value E_NOT_OK for Xxx_ReadDidData, the DCM module sends a negative response with the NRC code set via the parameter ErrorCode to the diagnostic tester [SWS_Dcm_00804]. The function is specified as non-reentrant (Non Reentrant) [SWS_Dcm_00804]. Interpretation: Due to the asynchronous processing with DCM_E_PENDING, the call is likely to typically take place in the cyclic task context of the DCM. Question Q-5e41e9fb7dc261b9 (open)
This usage note was generated automatically based on the specification in SWS_Dcm_00804.
Implementer's Guide to follow (complexity I2)
function Xxx_WriteDidData [SWS_Dcm_00805] 📄 PDF
Std_ReturnType Xxx_WriteDidData (uint16 DID, const uint8* Data, Dcm_OpStatusType OpStatus, uint16 DataLength, Dcm_NegativeResponseCodeType ErrorCode);
This function requests the application to write a data value of a DID.
The function Xxx_WriteDidData is called by the DCM module to request the application to write the data value of a DID [SWS_Dcm_00805]. The declaration is available via the header Dcm_Externals.h [SWS_Dcm_00805].
Call and Semantics
The call is asynchronous and is defined as non-reentrant (Non Reentrant) [SWS_Dcm_00805]. The following parameters are passed upon the call [SWS_Dcm_00805]:
DID: Identifier of the data identifier to be written.Data: Pointer to the buffer with the data to be written.OpStatus: Status of the current operation.DataLength: Length of the data to be written in bytes.ErrorCode: Output parameter for the negative response code (NRC).
Return Values and Error Handling
As a return value, the function returns Std_ReturnType with the following meanings [SWS_Dcm_00805]:
E_OK: The write request was executed successfully.DCM_E_PENDING: The operation is not yet completed; further calls are required for completion.E_NOT_OK: The operation was not successful. In this case, the DCM module sends a negative response with the NRC value passed in the output parameterErrorCode.
This text was generated by an AI based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_ReadDidRangeDataLength [SWS_Dcm_01271] 📄 PDF
Std_ReturnType Xxx_ReadDidRangeDataLength (uint16 DID, Dcm_OpStatusType OpStatus, uint16* DataLength);
This function requests the application to return the data length of a DID Range.
The function Xxx_ReadDidRangeDataLength serves to request the application software to return the data length for a DID range [SWS_Dcm_01271]. It is part of the AUTOSAR module Dcm, has the service ID 0x5e, and is provided via the header file Dcm_Externals.h [SWS_Dcm_01271].
The call takes place with asynchronous semantics (Asynchronous) via the following interface parameters [SWS_Dcm_01271]:
DID(IN,uint16): Identifies the specific data identifier (Data ID value) of the requested DID range [SWS_Dcm_01271].OpStatus(IN,Dcm_OpStatusType): Indicates the current processing status of the running operation [SWS_Dcm_01271].DataLength(OUT,uint16*): Pointer to the length of the data to be read or written [SWS_Dcm_01271].
The return value of type Std_ReturnType signals the result of the length query [SWS_Dcm_01271]:
E_OK: The request was successful and the determined length is ready [SWS_Dcm_01271].E_NOT_OK: The request was not successful [SWS_Dcm_01271].DCM_E_PENDING: Execution is not yet completed and requires further subsequent calls for completion [SWS_Dcm_01271].
Regarding concurrency, the interface is specified as non-reentrant (Non Reentrant) [SWS_Dcm_01271].
Usage note generated based on the specification of DCM in AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_GetInfotypeValueData [SWS_Dcm_91014] 📄 PDF
Std_ReturnType Xxx_GetInfotypeValueData (Dcm_OpStatusType OpStatus, uint8* DataValueBuffer, uint8* DataValueBufferSize);
The function provides the data related to the requested Infotype.
The asynchronous interface Xxx_GetInfotypeValueData is called by the DCM module as soon as a diagnostic request for OBD Service $09 is received and the requested InfoType is not an availability InfoType [SWS_Dcm_00423]. To provide the data, the DCM calls all functions configured for this InfoType and aggregates the values as a response to Service $09 [SWS_Dcm_00423]. The declaration is available via Dcm_Externals.h [SWS_Dcm_91014].
The passing and returning of data takes place via defined buffer and status parameters [SWS_Dcm_91014]:
OpStatus(in): Indicates the current progress status of the ongoing operation.DataValueBuffer(out): Buffer for receiving the specific InfoType payload.DataValueBufferSize(inout): Contains the maximum writable buffer size in bytes upon call and is populated by the called function with the actual number of written data bytes.
As an asynchronous function, it returns E_OK upon successful completion, E_NOT_OK upon errors, or DCM_E_PENDING if the operation is not yet complete and requires further calls for completion [SWS_Dcm_91014]. Since the function is specified as non-reentrant (Non Reentrant), concurrent calls must not occur for the same function [SWS_Dcm_91014].
This text was generated by an AI and serves as a guidance. The official AUTOSAR specification is authoritative.
Implementer's Guide to follow (complexity I2)
function Xxx_Start [SWS_Dcm_01203] 📄 PDF
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 requests to the application to start the execution of a routine.
The function Xxx_Start is declared via the header file Dcm_Externals.h and requests the application software to start the execution of a diagnostic routine [SWS_Dcm_01203]. The DCM module calls this function as soon as a UDS service request for RoutineControl (0x31) with the subfunction startRoutine has been received and successfully verified [SWS_Dcm_00400], or when a RoutineControl request with a non-availability OBDTestId is received [SWS_Dcm_01392].
The interface supports fixed as well as variable data formats and is operated asynchronously [SWS_Dcm_01203]:
- Input parameters: Fixed input signals
dataIn_1todataIn_nor variable data via the byte arraydataInVaras well as the operation statusOpStatus[SWS_Dcm_01203]. - Output parameters: Fixed output signals
dataOut_1todataOut_nor variable output datadataOutVaras well as the error codeErrorCodefor negative response messages [SWS_Dcm_01203]. - Length parameter: In the case of variable data length, the input/output parameter
currentDataLengthcarries the number of payload bytes indataInVarordataOutVar[SWS_Dcm_01203]. - Return values:
E_OKconfirms the successful start,E_NOT_OKreports a failure,DCM_E_PENDINGsignals ongoing processing steps, andDCM_E_FORCE_RCRRPrequests the premature sending of a pending response (NRC 0x78) [SWS_Dcm_01203].
Regarding concurrency, Xxx_Start is defined as non-reentrant (Non Reentrant) [SWS_Dcm_01203]. In asynchronous sequences with the return value DCM_E_PENDING, the DCM module calls the function cyclically again with progressed OpStatus until the operation is completed [SWS_Dcm_01203].
If the operation finishes successfully with E_OK, the DCM module returns a positive UDS response with the data provided via dataOut as routineStatusRecord [SWS_Dcm_00401]. If execution fails with E_NOT_OK, the DCM transmits a negative response with the NRC specified in parameter ErrorCode [SWS_Dcm_01203]. In the context of OBD routines, a return value other than E_OK leads to sending NRC 0x22 [SWS_Dcm_01394].
This text was generated by an AI and serves for guidance. Exclusively the AUTOSAR specification is authoritative.
Implementer's Guide to follow (complexity I2)
function Xxx_StartConfirmation [SWS_Dcm_91016] 📄 PDF
Std_ReturnType Xxx_StartConfirmation (Dcm_ConfirmationStatusType ConfirmationStatus);
This function indicates the transmission of a response to a StartRoutine request
use
According to [SWS_Dcm_91016], the function Xxx_StartConfirmation bindingly indicates the transmission of a response to a preceding StartRoutine request. The interface is declared in the header file Dcm_Externals.h and has synchronous execution semantics ([SWS_Dcm_91016]). As the only input parameter, ConfirmationStatus of type Dcm_ConfirmationStatusType is passed, which describes the confirmation status of the routine transmission. Additional input and output parameters do not exist according to the specification ([SWS_Dcm_91016]).
Error Handling and Return Values
As a return value, the function returns a status value of type Std_ReturnType ([SWS_Dcm_91016]). Here, the value E_OK confirms the successful execution of the request, whereas E_NOT_OK signals unsuccessful processing. Specific error codes or explicit notifications to the Development Error Tracer (DET) or Diagnostic Event Manager (DEM) are not defined in the payload for this function.
Concurrency and Limitations
Regarding concurrency, Xxx_StartConfirmation is classified as non-reentrant (Non Reentrant) ([SWS_Dcm_91016]). This requires the caller to strictly avoid concurrent or overlapping executions. Interpretation: The function is likely called by the DCM to notify the application-side routine implementation about the completion of the transmission process. Question Q-be2dafd63bf2a9a5 (open)
This text was created by an AI and is based on the AUTOSAR standard Release R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_Stop [SWS_Dcm_01204] 📄 PDF
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 requests to the application to stop the execution of a routine
use
The function [SWS_Dcm_01204] is called by the DCM to terminate the execution of a running diagnostic routine in the application. The call takes place within the scope of the UDS service RoutineControl (0x31) with the subfunction stopRoutine as soon as the required pre-checks have been completed successfully [SWS_Dcm_00402]. The interface has the service ID 0x5c and is declared via the header file Dcm_Externals.h [SWS_Dcm_01204].
Parameters and Return Values
Depending on the configuration of the routine, the DCM passes fixed or variable input data (dataIn_1 to dataIn_n or dataInVar) and buffer references for output data (dataOut_1 to dataOut_n or dataOutVar) [SWS_Dcm_01204], [SWS_Dcm_00402]. In case of variable data length, currentDataLength contains the number of bytes of the input or output data [SWS_Dcm_01204]. The following are defined as return values of Std_ReturnType:
E_OK: Routine successfully terminated; the DCM transmits a positive UDS response with the generated output data as routineStatusRecord [SWS_Dcm_01204], [SWS_Dcm_00403].E_NOT_OK: Termination of the routine failed; the DCM sends a negative UDS response with the NRC stored inErrorCode[SWS_Dcm_01204].DCM_E_PENDING: Operation is still in progress; the DCM calls the function again for completion [SWS_Dcm_01204].DCM_E_FORCE_RCRRP: The application requests the DCM to transmit a pending response (NRC 0x78) [SWS_Dcm_01204].
Concurrency and Limitations
The operation is specified as asynchronous and non-reentrant (Non Reentrant) [SWS_Dcm_01204]. If an error occurs during execution, the application must write the appropriate Dcm_NegativeResponseCodeType to parameter ErrorCode and return E_NOT_OK [SWS_Dcm_01204].
This usage note was automatically generated based on the AUTOSAR Classic R20-11 specification.
Implementer's Guide to follow (complexity I1)
function Xxx_StopConfirmation [SWS_Dcm_91017] 📄 PDF
Std_ReturnType Xxx_StopConfirmation (Dcm_ConfirmationStatusType ConfirmationStatus);
This function indicates the transmission of a response to a StopRoutine request
The synchronous function Xxx_StopConfirmation serves to indicate the transmission of a response to a previous StopRoutine request [SWS_Dcm_91017]. Upon the call, the system passes the concrete confirmation status of the routine stop via input parameter ConfirmationStatus of type Dcm_ConfirmationStatusType [SWS_Dcm_91017]. As a return value, the interface returns a value of type Std_ReturnType: Here, E_OK indicates that the request was processed successfully, while E_NOT_OK signals an unsuccessful request [SWS_Dcm_91017].
Regarding concurrency and calling conditions, the interface is specified as non-reentrant (Non Reentrant) and has Service ID 0x69 [SWS_Dcm_91017]. The declaration is provided via header file Dcm_Externals.h [SWS_Dcm_91017]. Interpretation: Due to the provision via Dcm_Externals.h and the customizable prefix Xxx_, the function is likely called by the DCM module and implemented by an application-specific software component or the responsible routine handler. Question Q-743e69ff8cf92321 (open)
Specific error codes or notifications to the development error management (DET) or Diagnostic Event Manager (DEM) are not designated in the requirements. The error handling behavior at this interface level is formally limited to returning the error value E_NOT_OK if processing could not be successfully completed [SWS_Dcm_91017].
This usage note is based on the AUTOSAR Classic R20-11 specification.
Implementer's Guide to follow (complexity I2)
function Xxx_RequestResults [SWS_Dcm_91013] 📄 PDF
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 requests to the application the result of a routine execution
The function [SWS_Dcm_91013] is called by the DCM module to query the result of a routine execution from the application. This takes place within the scope of the UDS service RoutineControl (0x31) with the subfunction requestRoutineResults as soon as all input-side checks have been passed successfully [SWS_Dcm_00404]. The interface is available via Dcm_Externals.h, operates asynchronously, and is specified as non-reentrant [SWS_Dcm_91013].
The DCM module controls the progress of the operation via the parameter OpStatus. The function accepts fixed input data (dataIn_1 to dataIn_n) or variable data (dataInVar) derived from routineControlOptionRecord [SWS_Dcm_00404]. The application passes the result data to the DCM via fixed output parameters (dataOut_1 to dataOut_n) or variable output buffers (dataOutVar and variableDataLength) [SWS_Dcm_91013].
If the query is completed successfully with E_OK, the DCM module consolidates the output data into a routineStatusRecord based on the configuration parameter DcmDspRequestRoutineResultsOut and transmits a positive response [SWS_Dcm_00405]. If the operation is still ongoing, the application can return DCM_E_PENDING for subsequent calls or DCM_E_FORCE_RCRRP to send a preliminary response (NRC 0x78) [SWS_Dcm_91013].
In the event of an error, the function returns E_NOT_OK and sets ErrorCode to the applicable NRC value, whereupon the DCM module transmits a corresponding negative response [SWS_Dcm_91013]. Since the function is non-reentrant, it must not be called concurrently for the same routine [SWS_Dcm_91013].
Automatically generated usage note based on AUTOSAR R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_RequestResultsConfirmation [SWS_Dcm_91018] 📄 PDF
Std_ReturnType Xxx_RequestResultsConfirmation (Dcm_ConfirmationStatusType ConfirmationStatus);
This function indicates the transmission of a response to a RequestRoutineResults request
Usage and Semantics
The function Xxx_RequestResultsConfirmation serves to confirm a transmitted diagnostic response to a RequestRoutineResults request [SWS_Dcm_91018]. It is declared in header file Dcm_Externals.h and has Service ID 0x70 [SWS_Dcm_91018]. Via the input parameter ConfirmationStatus of type Dcm_ConfirmationStatusType, the implementation receives information about the status with which the transmission of the routine results was completed [SWS_Dcm_91018]. The call is executed synchronously and returns a Std_ReturnType, where E_OK indicates successful processing and E_NOT_OK signals failure [SWS_Dcm_91018].
Concurrency and Limitations
According to the specification, the function is classified as non-reentrant (Non Reentrant) [SWS_Dcm_91018]. Therefore, concurrent calls for the same instance must not occur. Interpretation: The call by the DCM module occurs sequentially in the context of the response confirmation, which is why the function should be executed without blocking operations. Question Q-935a06744e7b9af7 (open)
Error Handling and Interaction
Error handling is limited to the return value E_NOT_OK, as separate development errors (DET) or production errors (DEM) are not specified for this call [SWS_Dcm_91018]. Interpretation: The function serves as an application-specific confirmation endpoint (callback) for the DCM to synchronize the completion of the diagnostic request at user level after sending the routine results. Question Q-d3dd0142a30e1363 (open)
This text was created by an AI. Information is based on AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_RequestControl [SWS_Dcm_01338] 📄 PDF
Std_ReturnType Xxx_RequestControl (uint8* OutBuffer, const uint8* InBuffer);
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
The function Xxx_RequestControl serves to execute a TID-specific control function and is typically used to implement OBD Service $08 ([SWS_Dcm_01338]). The DCM module calls the configured function synchronously as soon as an OBD Service $08 request is received whose Test ID (TID) does not represent an availability TID ([SWS_Dcm_00419]). The declaration of the interface is provided via the header file Dcm_Externals.h ([SWS_Dcm_01338]).
Parameters and Buffer Handling
InBuffer: Pointer to the payload of the received OBD request. The byte count of this input data must exactly match the size configured in the DCM module ([SWS_Dcm_00419], [SWS_Dcm_01338]).OutBuffer: Pointer to the output buffer in which the called control function stores its results. The buffer size is fixed and is taken from the configuration of the DCM module ([SWS_Dcm_00419], [SWS_Dcm_01338]).
Return Values and Error Handling
The function returns Std_ReturnType as status value: The value E_OK indicates successful processing, whereas E_NOT_OK indicates an error condition ([SWS_Dcm_01338]). If Xxx_RequestControl returns a result other than E_OK, the DCM module responds with the negative response code NRC 0x22 (Conditions Not Correct) to the diagnostic tester ([SWS_Dcm_01192]).
Concurrency and Limitations
The function is specified as non-reentrant (Non Reentrant) and has the service ID 0x63 ([SWS_Dcm_01338]).
AI note: This text was automatically generated based on the AUTOSAR Classic R20-11 specification.
Implementer's Guide to follow (complexity I1)
function Xxx_StartProtocol [SWS_Dcm_01339] 📄 PDF
Std_ReturnType Xxx_StartProtocol (Dcm_ProtocolType ProtocolType, uint16 TesterSourceAddress, uint16 ConnectionId);
This function allows the application to examine the environment conditions and enable/disable further processing of the protocol.
The callback function Xxx_StartProtocol is provided via the header Dcm_Externals.h and allows the application, upon the first request of a diagnostic protocol, to check current environmental conditions and to enable or reject further protocol processing [SWS_Dcm_01339].
Call Context and Parameters
The call is performed by the DSL submodule of the DCM synchronously and non-reentrantly for all configured functions [SWS_Dcm_00036], [SWS_Dcm_01339]. The following input parameters are passed to the function [SWS_Dcm_01339]:
ProtocolType: Type of the diagnostic protocol to be started,TesterSourceAddress: Source address of the requesting tester,ConnectionId: Unique identifier of the connection.
Return Values and Error Handling
As a return value, the function returns Std_ReturnType with E_OK upon successful release, E_NOT_OK if the check was unsuccessful, or E_PROTOCOL_NOT_ALLOWED if the protocol is invalid [SWS_Dcm_01339]. If at least one configured Xxx_StartProtocol function does not return E_OK, the DCM aborts protocol start and responds with NRC 0x22 [SWS_Dcm_00674].
Initialization after Successful Release
Only after all configured Xxx_StartProtocol callbacks have returned E_OK does the DCM execute the further initialization steps:
- Loading of the standard timing parameters from the default session configuration [SWS_Dcm_00144],
- Activation of the service table [SWS_Dcm_00145],
- Resetting of the security status (Security State) [SWS_Dcm_00146],
- Resetting of the session status to the default diagnostic session as well as executing the mode switch via
SchM_Switch_<bsnp>_DcmDiagnosticSessionControltoRTE_MODE_DcmDiagnosticSessionControl_DEFAULT_SESSION[SWS_Dcm_00147].
This usage note was generated automatically based on the specification requirements of AUTOSAR R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_StopProtocol [SWS_Dcm_01340] 📄 PDF
Std_ReturnType Xxx_StopProtocol (Dcm_ProtocolType ProtocolType, uint16 TesterSourceAddress, uint16 ConnectionId);
This function informs the application of the protocol stop.
The synchronous callback function Xxx_StopProtocol informs the application about the termination of a diagnostic protocol ([SWS_Dcm_01340]). It is declared via the header file Dcm_Externals.h and is specified as non-reentrant (Non Reentrant) ([SWS_Dcm_01340]).
The invocation of all configured Xxx_StopProtocol functions (configured via the parameter DcmDslCallbackDCMRequestService) is triggered by the DSL submodule in the following preemption scenarios:
- An ongoing diagnostic request is preempted by a higher-priority request of another protocol ([SWS_Dcm_00459]).
- A request with lower or equal priority preempts a higher-priority protocol, provided the latter is in the Default Session and no active request is in the execution phase ([SWS_Dcm_00625]).
Upon invocation, the protocol type (ProtocolType), the tester source address (TesterSourceAddress), and the connection identifier (ConnectionId) are passed ([SWS_Dcm_01340]). As a return value, the function returns E_OK upon successful execution or E_NOT_OK ([SWS_Dcm_01340]). If the function does not return E_OK, the DCM responds with the negative response code NRC 0x22 ([SWS_Dcm_01190]).
This text was generated automatically and is based exclusively on the specification requirements for AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I1)
function Xxx_Indication [SWS_Dcm_01341] 📄 PDF
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 indicates to the application that a service is about to be executed and allows the application to reject the execution of the service request
The synchronous, non-reentrant function Xxx_Indication is declared via the header Dcm_Externals.h [SWS_Dcm_01341]. It indicates the impending execution of a diagnostic service to the application and allows it to reject the execution of the service request [SWS_Dcm_01341]. The call is made synchronously by the DSD submodule at all configured ServiceRequestIndication ports if the configuration containers DcmDsdServiceRequestManufacturerNotification [SWS_Dcm_00218] or DcmDsdServiceRequestSupplierNotification [SWS_Dcm_00516] are present.
The service ID (SID), the request data without SID (RequestData, DataSize), the addressing type (ReqType), the connection ID (ConnectionId), the protocol type (ProtocolType), and the source address of the tester (TesterSourceAddress) are passed as input parameters [SWS_Dcm_01341].
Via the return value of type Std_ReturnType, the application controls the response of the DSD submodule [SWS_Dcm_01341]:
E_OK: The request was successful and is processed further normally [SWS_Dcm_01341].E_REQUEST_NOT_ACCEPTED: The request is not accepted. If at least one called indication function returnsE_REQUEST_NOT_ACCEPTED, the DSD submodule suppresses any response to the tester [SWS_Dcm_00462], [SWS_Dcm_00517].E_NOT_OK: The request was not successful. In this case, the application writes a negative response code to the output parameterErrorCode[SWS_Dcm_01341]. Provided that no call returnsE_REQUEST_NOT_ACCEPTED, the DSD submodule sends a negative response with this NRC [SWS_Dcm_00463], [SWS_Dcm_00518].
If multiple functions return E_NOT_OK and no function returns E_REQUEST_NOT_ACCEPTED when multiple notifications are configured, the DSD submodule mandatorily uses the ErrorCode of the first function responding with E_NOT_OK for the negative response [SWS_Dcm_01321], [SWS_Dcm_01322].
This text was generated by an AI based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_Confirmation [SWS_Dcm_01342] 📄 PDF
Std_ReturnType Xxx_Confirmation (uint8 SID, uint8 ReqType, uint16 ConnectionId, Dcm_ConfirmationStatusType ConfirmationStatus, Dcm_ProtocolType ProtocolType, uint16 TesterSourceAddress);
This function confirms to the application the successful transmission or a transmission error of a diagnostic service.
The callback function Xxx_Confirmation serves to synchronously notify the application of the completion of a diagnostic transmission—either the successful transmission or a transmission error ([SWS_Dcm_01342]). The declaration is provided via the header Dcm_Externals.h ([SWS_Dcm_01342]).
When called by the DCM submodule DSD (Diagnostic Service Dispatcher), essential context data of the diagnostic order is passed ([SWS_Dcm_01342], [SWS_Dcm_00741]):
SID: Identifier of the diagnostic service ([SWS_Dcm_01342]).ReqType: Addressing type (0for physical,1for functional) ([SWS_Dcm_01342]).ConnectionId,ProtocolType, andTesterSourceAddress: Unique connection and protocol attributes as well as the source address of the tester ([SWS_Dcm_01342]).ConfirmationStatus: Status information about the success or error of the transmission ([SWS_Dcm_01342]).
The operation returns Std_ReturnType as return value (E_OK upon successful confirmation processing, otherwise E_NOT_OK) ([SWS_Dcm_01342]). The DSD calls the function on all ports that use the interface ServiceRequestNotification (configured via DcmDsdServiceRequestManufacturerNotification or DcmDsdServiceRequestSupplierNotification) ([SWS_Dcm_00741]).
Regarding the call sequence, Xxx_Confirmation is regularly executed directly after DspInternal_DcmConfirmation() ([SWS_Dcm_00742]). However, if the special case according to [SWS_Dcm_01172] applies, the DSD exclusively calls Xxx_Confirmation, while the internal call is omitted.
Since Xxx_Confirmation is specified as non-reentrant (Non Reentrant) and synchronous ([SWS_Dcm_01342]), the application-side implementation should presumably contain no blocking processes and trigger no reentrant callbacks into the DCM (interpretation). Question Q-58ce3e44dc61540b (open)
This text was generated by an AI. All statements are based exclusively on the AUTOSAR specification scope of release R20-11.
Implementer's Guide to follow (complexity I2)
function Xxx_ClearDTCCheckFnc [SWS_Dcm_01270] 📄 PDF
Std_ReturnType Xxx_ClearDTCCheckFnc (uint32 GoDTC, Dcm_NegativeResponseCodeType* ErrorCode);
Callout function for condition check, manufacturer / supplier specific checks on the groupOf DTC, which is requested to clear.
use
The synchronous callout function Xxx_ClearDTCCheckFnc is provided for the application via the header file Dcm_Externals.h [SWS_Dcm_01270]. It serves for manufacturer- and supplier-specific checking of conditions before clearing a requested group of diagnostic trouble codes (Group of DTC). The identifier GoDTC of type uint32, which specifies the DTC group to be cleared, is passed to it as an input parameter [SWS_Dcm_01270].
Error Handling and Return Values
The release of the clear request takes place via the return value of type Std_ReturnType in conjunction with the output parameter ErrorCode [SWS_Dcm_01270]:
E_OK: The application permits clearing the requested trouble code groupGoDTC[SWS_Dcm_01270].E_NOT_OK: The application prohibits clearing the group. In this error case, a negative response code must be set via the output parameterErrorCodeof typeDcm_NegativeResponseCodeType*. The DCM module then sends a negative response with the NRC value specified inErrorCode[SWS_Dcm_01270].
Concurrency and Limitations
The function is provided with the service ID 0x5f, operates synchronously, and is defined as non-reentrant (Non Reentrant) [SWS_Dcm_01270]. The call context must therefore ensure that calls take place sequentially and without concurrent overlapping.
This usage note was generated by an AI based on the specification SWS_Dcm_01270 from AUTOSAR R20-11.
function Xxx_ProcessRequestDownload [SWS_Dcm_00754] 📄 PDF
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 start a download process. This service is needed for the implementation of UDS service RequestDownload.
The callout function Xxx_ProcessRequestDownload ([SWS_Dcm_00754]) is called by the module Dcm to initiate a download process during processing of the UDS service RequestDownload. It is defined as asynchronous and non-reentrant and is provided via the header Dcm_Externals.h ([SWS_Dcm_00754]).
Usage and Parameters
The call takes place step by step via the parameter OpStatus with the values DCM_INITIAL, DCM_PENDING, or DCM_CANCEL ([SWS_Dcm_00754]). The compression and encryption methods (DataFormatIdentifier), the memory block (MemoryIdentifier), the start address (MemoryAddress), and the uncompressed memory size in bytes (MemorySize) are passed as input parameters ([SWS_Dcm_00754]). Prior to the call, the Dcm writes the maximum possible buffer size to the inout parameter BlockLength ([SWS_Dcm_01417]). The function adjusts this value to the maximum permissible block length for subsequent write operations ([SWS_Dcm_00754]).
Return Values and Interaction
The function returns E_OK upon successful execution, DCM_E_PENDING if processing is still ongoing, or E_NOT_OK in the event of an error ([SWS_Dcm_00754]):
- If the call returns
E_OKand the negotiated valueBlockLengthis less than or equal to the supported buffer length of the current protocol connection, theDcmsends a positive response with this value asmaxNumberOfBlockLength([SWS_Dcm_01419]). - If the returned buffer length exceeds the supported buffer size of the protocol connection, the
Dcmreports the DET errorDCM_E_INTERFACE_BUFFER_OVERFLOW([SWS_Dcm_01418]). - Upon return of
E_NOT_OK, theDcmsends a negative UDS response (NRC) with the value set in the output parameterErrorCode([SWS_Dcm_00754], [SWS_Dcm_00757]).
This usage note was generated automatically and serves as guidance for the AUTOSAR specification.
Implementer's Guide to follow (complexity I2)
function Xxx_ProcessRequestTransferExit [SWS_Dcm_00755] 📄 PDF
Std_ReturnType Xxx_ProcessRequestTransferExit (Dcm_OpStatusType OpStatus, 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.
The callout function Xxx_ProcessRequestTransferExit is called by the DCM module to terminate an ongoing download or upload process within the scope of the UDS service RequestTransferExit [SWS_Dcm_00755]. The declaration of the interface is provided via the header Dcm_Externals.h [SWS_Dcm_00755].
Usage and Semantics
The function is operated asynchronously and is defined as non-reentrant [SWS_Dcm_00755]. The call is made by passing the current execution status OpStatus (possible values: DCM_INITIAL, DCM_PENDING, or DCM_CANCEL) [SWS_Dcm_00755]. The following return values of type Std_ReturnType are specified:
E_OK: The transfer was completed successfully [SWS_Dcm_00755].DCM_E_PENDING: The transfer termination is not yet completed and requires subsequent calls [SWS_Dcm_00755].E_NOT_OK: The termination failed or the response buffer is too small [SWS_Dcm_00755].
Error Handling and Interaction
If the operation Xxx_ProcessRequestTransferExit returns the error value E_NOT_OK, a negative response code must be passed via the output parameter ErrorCode. The DCM module then sends a negative UDS response (NRC) with this exact error code to the diagnostic tester [SWS_Dcm_00759]. In case of an abort call, the DCM module passes the status DCM_CANCEL to the function [SWS_Dcm_00755].
This text was created automatically. All statements are based exclusively on the AUTOSAR specification.
Implementer's Guide to follow (complexity I2)
function Xxx_ProcessRequestUpload [SWS_Dcm_00756] 📄 PDF
Std_ReturnType Xxx_ProcessRequestUpload (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 start an upload process. This service is needed for the implementation of UDS service RequestUpload.
The callout function Xxx_ProcessRequestUpload is called by the DCM module to initiate the UDS service RequestUpload ([SWS_Dcm_00756]). It is provided via Dcm_Externals.h and is specified as non-reentrant and asynchronous ([SWS_Dcm_00756]). Via the parameter OpStatus (with the states DCM_INITIAL, DCM_PENDING, DCM_CANCEL, or DCM_FORCE_RCRRP_OK), the DCM controls the sequence of the operation ([SWS_Dcm_00756]).
Upon the call, the DCM passes, among other things, the compression and encryption method (DataFormatIdentifier), the memory block (MemoryIdentifier), the starting address (MemoryAddress), and the uncompressed memory size in bytes (MemorySize) ([SWS_Dcm_00756]). The in/out parameter BlockLength defines the maximum number of bytes for a subsequent Dcm_ReadMemory call; prior to the call, the DCM writes the maximum possible buffer size into this parameter ([SWS_Dcm_00756], [SWS_Dcm_01420]).
The return values of Xxx_ProcessRequestUpload are defined as E_OK upon a successful request, E_NOT_OK upon errors, and DCM_E_PENDING when processing is not yet completed ([SWS_Dcm_00756]):
- If the function returns
E_NOT_OK, the DCM module sends a negative UDS response with the NRC value set in the output parameterErrorCode([SWS_Dcm_00756], [SWS_Dcm_00758]). - If the function returns a requested buffer value in
BlockLengththat is less than or equal to the supported buffer length of the current protocol connection, the DCM uses this value asmaxNumberOfBlockLengthin the positive response ([SWS_Dcm_01422]). - If, on the other hand, the returned buffer length is greater than the buffer length supported by the protocol connection, the DCM reports the DET error
DCM_E_INTERFACE_BUFFER_OVERFLOW([SWS_Dcm_01421]).
This text was created by an AI. It is based exclusively on the specifications of the provided AUTOSAR payload.
Implementer's Guide to follow (complexity I2)
function Xxx_ProcessTransferDataRead [SWS_Dcm_91070] 📄 PDF
Dcm_ReturnReadMemoryType Xxx_ProcessTransferDataRead (Dcm_OpStatusType OpStatus, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, Dcm_RequestDataArrayType MemoryData, 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
The callout function Xxx_ProcessTransferDataRead is used to asynchronously read memory data from the ECU based on starting address (MemoryAddress) and length (MemorySize) according to [SWS_Dcm_91070]. It is provided via header Dcm_Externals.h and supports the UDS services ReadMemoryByAddress, RequestUpload, TransferData, and ReadDataByIdentifier for DIDs defined dynamically via memory addresses [SWS_Dcm_91070].
The invocation is non-reentrant (Non Reentrant) and is controlled via parameter OpStatus ([SWS_Dcm_91070]):
DCM_INITIAL: Starts the read operation.DCM_PENDING: Continues a read operation that has not yet completed.DCM_CANCEL: Cancels the ongoing operation.DCM_FORCE_RCRRP_OK: Confirms the transmission of a pending response.
For addressing, a memory block or range can be selected via MemoryIdentifier; if this parameter is not used, it must be set to 0 [SWS_Dcm_91070]. The read data is returned via output parameter MemoryData, which directly references the diagnostic buffer of the DCM [SWS_Dcm_91070].
Defined return values are DCM_READ_OK on success, DCM_READ_PENDING while reading is still ongoing, and DCM_READ_FORCE_RCRRP if the process is pending and a response-pending message is to be transmitted immediately [SWS_Dcm_91070]. If the read operation fails, the function returns DCM_READ_FAILED; in this case, a negative response code (NRC) must be passed via pointer ErrorCode, which the DCM transmits in a negative response [SWS_Dcm_91070]. (Interpretation: Although the specification note for ErrorCode mentions Dcm_ReadMemory, it likely refers analogously to the failure of this callout here.) Question Q-fe76e2599624baf7 (open)
This usage note is based on the specification AUTOSAR CP R20-11 and was generated automatically.
Implementer's Guide to follow (complexity I2)
function Xxx_ProcessTransferDataWrite [SWS_Dcm_91071] 📄 PDF
Dcm_ReturnWriteMemoryType Xxx_ProcessTransferDataWrite (Dcm_OpStatusType OpStatus, uint8 MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, const 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
Usage and Semantics
The asynchronous callout Xxx_ProcessTransferDataWrite (service ID 0x27) is available via Dcm_Externals.h and is called by the DCM module to write memory data for the UDS services WriteMemoryByAddress, RequestDownload, and TransferData [SWS_Dcm_91071]. The execution of the write operation is controlled via parameter OpStatus with the values DCM_INITIAL, DCM_PENDING, DCM_CANCEL, or DCM_FORCE_RCRRP_OK [SWS_Dcm_91071].
Parameters and Return Values
The function processes the following parameters [SWS_Dcm_91071]:
MemoryIdentifier: Identifier of the memory block; if this parameter is not used, it must be set to 0 [SWS_Dcm_91071].MemoryAddress: Starting address of the server memory into which the data is copied; if not used (e.g. for compressed data), the value 0 must be passed [SWS_Dcm_91071].MemorySize: Number of bytes to write inMemoryData[SWS_Dcm_91071].MemoryData: Pointer to the data to be written in the diagnostic buffer of the DCM [SWS_Dcm_91071].ErrorCode: Output parameter for the negative response code (NRC) in case of an error [SWS_Dcm_91071].
The return value of type Dcm_ReturnWriteMemoryType signals the result of the operation [SWS_Dcm_91071]:
DCM_WRITE_OK: Write operation completed successfully [SWS_Dcm_91071].DCM_WRITE_PENDING: Write operation is not yet completed [SWS_Dcm_91071].DCM_WRITE_FORCE_RCRRP: Write operation is still pending; transmission of the pending response (Response Pending) starts immediately [SWS_Dcm_91071].DCM_WRITE_FAILED: Write operation failed [SWS_Dcm_91071].
Error Handling and Concurrency
If the callout returns the value DCM_WRITE_FAILED, the DCM module sends a negative response with the NRC value passed in parameter ErrorCode [SWS_Dcm_91071]. The callout is specified as non-reentrant (Non Reentrant) and must therefore not be executed concurrently [SWS_Dcm_91071].
This usage note was generated automatically based on the AUTOSAR specification.
Implementer's Guide to follow (complexity I2)
type Dcm_StatusType [SWS_Dcm_00976] 📄 PDF
Base item type to transport status information.
The type Dcm_StatusType serves as a basic status and return type for transferring status information within the module Dcm and is provided via the header file Dcm.h [SWS_Dcm_00976]. It is based on the standard type uint8 and defines standardized status values for feedback from specific DCM interfaces [SWS_Dcm_00976].
Defined Status Values and Error Handling
The specification defines the following status and error codes for Dcm_StatusType [SWS_Dcm_00976]:
DCM_E_OK(0x00): Indicates that the requested operation was successfully executed or accepted [SWS_Dcm_00976].DCM_E_ROE_NOT_ACCEPTED(0x06): Indicates that a ResponseOnOneEvent request was rejected by the DCM, for example because a previous ResponseOnOneEvent process is not yet completed; the value is used at the interfaceDcm_ResponseOnOneEvent()[SWS_Dcm_00976].DCM_E_PERIODICID_NOT_ACCEPTED(0x07): Signals that a periodic transmission request was not accepted by the DCM, for example because an ongoing periodic transmission is not yet finished; this status is used at the interfaceDcm_ResponseOnOneDataByPeriodicId()[SWS_Dcm_00976].
Constraints and Call Conditions
Callers of the mentioned interfaces must evaluate the return value of type Dcm_StatusType to determine whether new requests can be accepted immediately or were discarded due to transmissions that are still in progress [SWS_Dcm_00976]. A repeated request is only likely to have a prospect of success once previous event or transmission processes have been fully completed [SWS_Dcm_00976]. Question Q-901ec7e3aac8901c (open)
This text was created by an AI and is based on the AUTOSAR specification.
Implementer's Guide to follow (complexity I1)
type Dcm_CommunicationModeType [SWS_Dcm_00981] 📄 PDF
Manager
The data type Dcm_CommunicationModeType is an enumeration type declared in Dcm.h based on uint8 ([SWS_Dcm_00981]). It defines the communication modes for selectively controlling the transmission (Tx) and reception (Rx) paths. The value range comprises the values 0x00 to 0x0B for normal application data (NORM), network management (NM), and both communication branches combined (NORM_NM) ([SWS_Dcm_00981]).
The type is used as a parameter in calls to the BSW interface BswM_Dcm_CommunicationMode_CurrentState. Via this interface, the DCM forwards the current mode to the BSW Mode Manager after confirmation (Sent Confirmation) of a UDS service request CommunicationControl (Service 0x28) ([SWS_Dcm_00512], [SWS_Dcm_00785]). The specific mode value corresponds to the parameters communicationType and controlType of the received diagnostic request ([SWS_Dcm_00512]).
The interaction and the affected networks depend on the subnet parameter of the UDS request:
- For subnet
0x00, the update is performed for all network channels configured inDcmDspComControlAllChannel([SWS_Dcm_00512]). - For subnet
0x0F, the communication mode of the current diagnostic reception channel is reported ([SWS_Dcm_00785]). - For subnets from
0x01to0x0E, support is checked; unsupported subnets are rejected with the negative response code 0x31 ([SWS_Dcm_00786]). - For subfunctions with enhanced addressing (such as
enableRxAndDisableTxWithEnhancedAddressInformationorenableRxAndTxWithEnhancedAddressInformation), the call is made for the channel referenced via the sub-node ID ([SWS_Dcm_01077], [SWS_Dcm_01079]).
This text was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I2)
type Dcm_ConfigType [SWS_Dcm_00982] 📄 PDF
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.
type Dcm_ReturnReadMemoryType [SWS_Dcm_00985] 📄 PDF
Return values of Callout Dcm_ReadMemory
type Dcm_ReturnWriteMemoryType [SWS_Dcm_00986] 📄 PDF
Return type of callout Dcm_WriteMemory
type Dcm_EcuStartModeType [SWS_Dcm_00987] 📄 PDF
Allows the DCM to know if a diagnostic response shall be sent in the case of a jump from bootloader
The data type Dcm_EcuStartModeType is derived from uint8 and is provided via the header Dcm.h [SWS_Dcm_00987]. It serves the Diagnostic Communication Manager (DCM) to determine the startup mode and signals whether a diagnostic response is to be transmitted after a transition from the bootloader [SWS_Dcm_00987].
The value range comprises two defined states [SWS_Dcm_00987]:
DCM_COLD_START(0x00): The ECU starts regularly in normal operation [SWS_Dcm_00987].DCM_WARM_START(0x01): The ECU starts as a result of a jump from the bootloader [SWS_Dcm_00987].
In the interplay of the interfaces, Dcm_EcuStartModeType acts as the synchronous return value of the callout Dcm_GetProgConditions, which is available via Dcm_Externals.h [SWS_Dcm_00544]. This function is called during DCM initialization to determine whether a positive response ($50 or $51) must be sent [SWS_Dcm_00544]. The detailed boundary conditions of the bootloader jump are passed to the DCM via the output parameter ProgConditions [SWS_Dcm_00544].
With respect to execution and error handling, the querying callout is defined as synchronous and non-reentrant [SWS_Dcm_00544]. Specific error codes or direct notifications to DET or DEM are not defined for this data type.
This usage note was automatically generated based on the AUTOSAR Classic R20-11 specification.
Implementer's Guide to follow (complexity I1)
type Dcm_ProgConditionsType [SWS_Dcm_00988] 📄 PDF
Used in Dcm_SetProgConditions() to allow the integrator to store relevant information prior to jumping to bootloader / jump due to ECUReset request.
The structure Dcm_ProgConditionsType serves to exchange state and context data between application and bootloader during programming sequences or an ECU reset [SWS_Dcm_00988]. It bundles connection information such as ConnectionId and TesterAddress, diagnostic identifiers such as Sid and SubFncId, and control flags such as ReprogramingRequest, ApplUpdated, and ResponseRequired [SWS_Dcm_00988].
Usage takes place via two central interfaces:
- Prior to jumping to the bootloader or upon a reset, the DCM passes the structure to the asynchronous, non-reentrant function
Dcm_SetProgConditions()[SWS_Dcm_00543]. Possible return values areE_OK,E_NOT_OK,DCM_E_PENDING, andDCM_E_FORCE_RCRRPwhen requesting a response-pending message (NRC 0x78) [SWS_Dcm_00543]. - After the restart, the DCM calls the synchronous, non-reentrant callout
Dcm_GetProgConditions()during its initialization to read the stored conditions and determine theDcm_EcuStartModeType[SWS_Dcm_00544]. Storage of this data by the integrator is presumably typically done via reset-safe RAM or non-volatile memory (interpretation). Question Q-026bc7bc93f5502c (open)
In further system interaction, the DCM evaluates the structure: As soon as the ComM reports full communication capability, the DCM transmits the pending diagnostic response for the service identifier stored in Sid [SWS_Dcm_00767]. If ApplUpdated == True indicates an update completed via flash download after a bootloader jump, the DCM notifies the BswM via BswM_Dcm_ApplicationUpdated() [SWS_Dcm_00768].
This usage note was generated automatically and is based exclusively on the specifications of AUTOSAR version R20-11.
Implementer's Guide to follow (complexity I1)
type Dcm_MsgItemType [SWS_Dcm_00989] 📄 PDF
Base type for diagnostic message item
type Dcm_MsgType [SWS_Dcm_00990] 📄 PDF
Base type for diagnostic message (request, positive or negative response)
Usage and Type Definition
The data type Dcm_MsgType is the central pointer type for diagnostic messages in the Diagnostic Communication Manager and is available via the header Dcm.h [SWS_Dcm_00990]. It is declared as a pointer to Dcm_MsgItemType* and serves as a common basis for referencing requests as well as positive and negative response messages [SWS_Dcm_00990]. Interpretation: Since the base type Dcm_MsgItemType is not detailed further in the specification, it is likely to typically represent a single data byte (such as uint8) through which the linear message buffer is accessed sequentially. Question Q-2b6f46b51d3cb8e0 (open)
Interplay and Structure Context
The primary use of Dcm_MsgType occurs within the context structure Dcm_MsgContextType [SWS_Dcm_00994]. There, the type references two separate data areas:
reqData: Points to the payload data of the diagnostic request, beginning immediately after the service identifier (SID), which itself is not part of this data [SWS_Dcm_00994].resData: Points to the data of a positive response and likewise begins immediately after the service identifier [SWS_Dcm_00994].
Buffer Limits and Constraints
When processing and populating the response buffers addressed via Dcm_MsgType, users must strictly adhere to the associated buffer limits [SWS_Dcm_00994]. The actual response length resDataLen must under no circumstances exceed the buffer capacity defined by resMaxDataLen, since the maximum response size is strictly limited by the allocation of the assigned buffer [SWS_Dcm_00994].
This text was generated by an AI based on the specification AUTOSAR Classic Release R20-11.
type Dcm_MsgLenType [SWS_Dcm_00991] 📄 PDF
Length of diagnostic message (request, positive or negative response). The maximum length is dependent of the underlying transport protocol/media.
The data type Dcm_MsgLenType is available via the header Dcm.h and derived from the base type uint32 [SWS_Dcm_00991]. It is used in the Diagnostic Communication Manager (DCM) to describe the length of diagnostic messages. This includes both diagnostic requests and positive and negative response messages (responses) [SWS_Dcm_00991].
Regarding the value range limits, the specification defines that the maximum transmittable length of a diagnostic message depends on the respective underlying transport protocol or transmission medium [SWS_Dcm_00991]. Interpretation: Although the underlying data type uint32 can represent message lengths of up to 4 GiB on the software side, the actual maximum length in practice is likely to always be limited by the communication medium and the buffer sizes. Question Q-ac43639ecb32605d (open)
Dcm_MsgLenType plays a central role in the structure Dcm_MsgContextType, which encapsulates the context of a diagnostic job [SWS_Dcm_00994]. Within this structure, it typifies several fundamental length specifications:
reqDataLen: Represents the length of the request data. Counting begins immediately after the service identifier, so that it is not included in the length specification [SWS_Dcm_00994].resDataLen: Specifies the length of the positive response data, likewise excluding the service identifier [SWS_Dcm_00994].resMaxDataLen: Specifies the maximum possible length of a response, which is limited by the size of the allocated buffer [SWS_Dcm_00994].
When implementing service handlers, strict care must therefore be taken to ensure that length calculations for reqDataLen and resDataLen are always performed without the service identifier and that response data does not exceed the buffer limit specified by resMaxDataLen [SWS_Dcm_00994].
This usage note was generated by an AI based on the specification AUTOSAR CP R20-11.
type Dcm_MsgAddInfoType [SWS_Dcm_00992] 📄 PDF
Additional information on message request. Datastructure: Bitfield
According to [SWS_Dcm_00992], the data type Dcm_MsgAddInfoType is defined as a bit field structure and serves to provide supplementary status and control information for a diagnostic message. The type is provided in classic AUTOSAR via the header file Dcm.h and is used as element msgAddInfo within the higher-level context structure Dcm_MsgContextType ([SWS_Dcm_00994]) to consistently bundle additional information on service requests and associated responses.
According to [SWS_Dcm_00992], the bit field structure specifies individual control flags with a precisely defined bit position:
reqType(position LSB+0): Identifies the addressing type of the diagnostic request. A value of0signals a physical request (physical request), while a value of1indicates a functional request (functional request).suppressPosResponse(position LSB+1): Determines the behavior regarding positive responses. With0, the positive response is not suppressed (do not suppress), whereas a value of1specifies that no positive response may be sent (no positive response will be sent).
Since Dcm_MsgAddInfoType represents a pure data structure for parameter and context passing, no synchronous or asynchronous invocation semantics, return values, reentrancy rules, or dedicated error notifications for DET or DEM exist for this type itself. The actual evaluation and consideration of the set bits in the further course is presumably the responsibility of the internal processing routines of the Diagnostic Communication Manager when they access the message context from [SWS_Dcm_00994]. Question Q-b27248cc452ba1b1 (open)
This text was generated by an AI and serves as guidance in the AUTOSAR environment.
type Dcm_IdContextType [SWS_Dcm_00993] 📄 PDF
This message context identifier can be used to determine the relation between request and response confirmation.
type Dcm_MsgContextType [SWS_Dcm_00994] 📄 PDF
This data structure contains all information which is necessary to process a diagnostic message from request to response and response confirmation.
The data structure Dcm_MsgContextType provides all necessary information to control a diagnostic request from processing through response to confirmation [SWS_Dcm_00994]. It is passed as input/output parameter pMsgContext to asynchronous and reentrant service routines [SWS_Dcm_00763], [SWS_Dcm_00764]. The payload data pointers reqData and resData always point immediately after the service identifier (SID), and the length specifications reqDataLen and resDataLen do not include the SID [SWS_Dcm_00994]. The DSD submodule reinserts the response SID at the first position when copying into the transmit buffer [SWS_Dcm_00223], [SWS_Dcm_00224].
When using it, the following aspects must be observed:
- Response length and error case: If the generated response length exceeds the buffer limit defined via protocol-dependent field
resMaxDataLenandDcmPagedBufferEnabled == FALSEholds, the DCM responds with the negative response code 0x14 (DCM_E_RESPONSETOOLONG) [SWS_Dcm_01059]. If processing in the service handler fails, the application reports backE_NOT_OKwith an error code [SWS_Dcm_00763]. - Additional information and response suppression: Among other things,
suppressPosRspMsgIndicationBitis transported viamsgAddInfo; if this is set, the DSD suppresses positive responses [SWS_Dcm_00202], [SWS_Dcm_00231]. - Lifetime and context assignment: Upon reaching confirmation, the structure loses its validity and all message data is lost [SWS_Dcm_00994]. Applications must already save identifier
idContextat request start in order to associate a subsequent confirmation with the original request [SWS_Dcm_00994]. - Protocol reference: Field
dcmRxPduIdidentifies the receive PDU and allows differentiated handling depending on the diagnostic protocol, for example between OBD and enhanced diagnostics [SWS_Dcm_00994].
Interpretation: Since the context becomes invalid at confirmation, the underlying memory buffer is likely released or overwritten immediately by the DSL for subsequent communications after transmission of the response. Question Q-88e3cf2f3d8f6076 (open)
This text was generated by an AI based on the specification AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I2)
type Dcm_ExtendedOpStatusType [SWS_Dcm_91015] 📄 PDF
The type Dcm_ExtendedOpStatusType is based on uint8 and is provided via header file Dcm.h [SWS_Dcm_91015]. As input parameter OpStatus, it controls the execution phases and confirmations for asynchronous diagnostic and sub-service functions such as <Module>_<DiagnosticService> [SWS_Dcm_00763] and <Module>_<DiagnosticService>_<SubService> [SWS_Dcm_00764].
The defined state values signal the operational progress and feedback of the DCM [SWS_Dcm_91015]:
DCM_INITIAL(0x00): Initial call of the operation.DCM_PENDING(0x01): Subsequent call after an intermediate state (Pending) reported in the previous call.DCM_CANCEL(0x02): Request by the DCM to cancel the ongoing operation.DCM_FORCE_RCRRP_OK(0x03): Confirmation of the transmission of a pending response (Response Pending).DCM_POS_RESPONSE_SENT(0x04) andDCM_POS_RESPONSE_FAILED(0x05): Acknowledgment of the successful and failed transmission of a positive response, respectively.DCM_NEG_RESPONSE_SENT(0x06) andDCM_NEG_RESPONSE_FAILED(0x07): Acknowledgment of the successful and failed transmission of a negative response, respectively.
Regarding concurrency, the called diagnostic interfaces are specified as reentrant and asynchronous [SWS_Dcm_00763] [SWS_Dcm_00764]. In case of errors, the service function returns the return value E_NOT_OK and assigns a negative response code (NRC) to the output parameter ErrorCode, whereupon the DCM module sends a negative response with this code [SWS_Dcm_00763] [SWS_Dcm_00764].
This text was generated by an AI based on the specification.
Implementer's Guide to follow (complexity I2)
type Dcm_OpStatusType [SWS_Dcm_00984] 📄 PDF
The type Dcm_OpStatusType is based on uint8 and is provided via the header file Rte_Dcm_Type.h [SWS_Dcm_00984]. It controls the execution and lifecycle state of asynchronous diagnostic operations of the Diagnostic Communication Manager (DCM), such as Dcm_ReadMemory [SWS_Dcm_00539], Dcm_WriteMemory [SWS_Dcm_00540], or Dcm_SetProgConditions [SWS_Dcm_00543].
Four status values are defined for controlling the operation flow [SWS_Dcm_00984]:
DCM_INITIAL(0x00): Identifies the first call of an operation by the DCM [SWS_Dcm_00527].DCM_PENDING(0x01): Signals a subsequent call after previously returning a pending state [SWS_Dcm_00984]. If an operation returns the error valueDCM_E_PENDING, the DCM calls this operation again withOpStatus = DCM_PENDINGin each subsequent cycle ofDcm_MainFunctionuntil processing is completed [SWS_Dcm_00530].DCM_CANCEL(0x02): Explicitly requests the called entity to cancel a still pending asynchronous operation [SWS_Dcm_00984].DCM_FORCE_RCRRP_OK(0x03): Confirms that a response-pending message (NRC 0x78) has been transmitted [SWS_Dcm_00984]. If the operation replies withDCM_E_FORCE_RCRRP, the DCM initiates the sending of RCR-RP and suspends further calls to the operation until sending is completed [SWS_Dcm_00528].
With respect to concurrency and constraints, operations that accept Dcm_OpStatusType as a passed parameter are designed to be asynchronous and specified as non-reentrant [SWS_Dcm_00539] [SWS_Dcm_00754].
This text was generated by an AI and serves as guidance on the specification.
Implementer's Guide to follow (complexity I2)
type Dcm_ConfirmationStatusType [SWS_Dcm_00983] 📄 PDF
Usage and Value Range
The data type Dcm_ConfirmationStatusType is an enumeration type derived from uint8, provided via the header file Rte_Dcm_Type.h [SWS_Dcm_00983]. It is used to report the status of a transmitted diagnostic response—both in the event of successful transmission and in the event of transmission errors—to the application or internal service handlers [SWS_Dcm_01342]. The value range comprises four discrete states [SWS_Dcm_00983]:
DCM_RES_POS_OK(0x00): Interpretation: The positive diagnostic response was successfully transmitted. Question (open)DCM_RES_POS_NOT_OK(0x01): Interpretation: An error occurred during the transmission of the positive diagnostic response. Question (open)DCM_RES_NEG_OK(0x02): Interpretation: The negative diagnostic response (NRC) was successfully transmitted. Question (open)DCM_RES_NEG_NOT_OK(0x03): Interpretation: An error occurred during the transmission of the negative diagnostic response. Question (open)
Interaction and Interfaces
The confirmation status is passed as an input parameter (IN) in synchronous callback functions. In the generic confirmation interface Xxx_Confirmation, the parameter is transmitted together with the service identifier (SID), addressing type (ReqType), connection ID (ConnectionId), protocol type, and tester source address [SWS_Dcm_01342]. Interface ServiceRequestNotification also integrates this status via operation Confirmation [SWS_Dcm_00694].
During the execution of routine services, the type is used specifically to report back the transmission status after completion of individual routine operations. The callbacks Xxx_StartConfirmation [SWS_Dcm_91016], Xxx_StopConfirmation [SWS_Dcm_91017], and Xxx_RequestResultsConfirmation [SWS_Dcm_91018] declared in Dcm_Externals.h serve this purpose.
Concurrency and Execution
The confirmation functions return a Std_ReturnType (e.g. E_OK or E_NOT_OK) [SWS_Dcm_01342], [SWS_Dcm_91016]. All mentioned interface calls are executed synchronously and are declared as non-reentrant (Non Reentrant) [SWS_Dcm_01342], [SWS_Dcm_91016], [SWS_Dcm_91017], [SWS_Dcm_91018].
This usage note was generated automatically based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I2)
type Dcm_SecLevelType [SWS_Dcm_00977] 📄 PDF
Security Level type definition
type Dcm_SesCtrlType [SWS_Dcm_00978] 📄 PDF
Session type definition. 0, 127 and all values above 127 are reserved by ISO.
type Dcm_ProtocolType [SWS_Dcm_00979] 📄 PDF
Type Dcm_ProtocolType.
type Dcm_NegativeResponseCodeType [SWS_Dcm_00980] 📄 PDF
Type Dcm_NegativeResponseCodeType.
type Dcm_DataArrayType [SWS_Dcm_01121] 📄 PDF
type Dcm_InfoType [SWS_Dcm_01013] 📄 PDF
type Dcm_RequestDataArrayType [SWS_Dcm_01165] 📄 PDF
type Dcm_InputOutputControlParameterType [SWS_Dcm_01305] 📄 PDF
type Dcm_IOOperationResponseType [SWS_Dcm_01307] 📄 PDF
type Dcm_DidSupportedType [SWS_Dcm_01138] 📄 PDF
type Dcm_FileAndDirNameType [SWS_Dcm_91066] 📄 PDF
type Dcm_ResponseDataArrayType [SWS_Dcm_91064] 📄 PDF
type Dcm_AuthenticationRoleType [SWS_Dcm_91068] 📄 PDF
The data type Dcm_AuthenticationRoleType is specified as a byte array (uint8), the size of which is determined by the configuration parameter DcmDspAuthenticationRoleSize [SWS_Dcm_91068]. It is provided via the header file Rte_Dcm_Type.h and serves in the DCM module for the formal representation of authentication roles [SWS_Dcm_91068].
In practical application, the type serves as an input parameter for defining roles for unauthenticated diagnostic connections:
- Usage and semantics: The type is passed as input parameter
deauthenticatedRolein the C functionDcm_SetDeauthenticatedRole(available viaDcm.h) [SWS_Dcm_91069] and operationSetDeauthenticatedRoleof the service interfaceAuthentication[SWS_Dcm_91072]. This synchronously assigns a deauthenticated role to a connection identified viaconnectionId[SWS_Dcm_91069]. - Concurrency and validity: The C API
Dcm_SetDeauthenticatedRoleis specified as reentrant [SWS_Dcm_91069]. An assigned role remains active for the respective connection until it transitions to the authenticated state or the ECU is reset [SWS_Dcm_91069], [SWS_Dcm_91072]. - Error handling: No specific error codes exist for the type and the associated operations; the function always returns
E_OKby default [SWS_Dcm_91069], [SWS_Dcm_91072].
This text was generated by an AI based on the specification.
Implementer's Guide to follow (complexity I1)
type DiagnosticSessionControlModeSwitchInterface [SWS_Dcm_91033] 📄 PDF
A ModeSwitchInterface PPortPrototype used to notify SW-Cs about the current Diagnostic Session
use
According to [SWS_Dcm_91033], the interface element DiagnosticSessionControlModeSwitchInterface is declared as a provided port (PPortPrototype or ProvidedPort) of the module DCM and uses the interface Dcm_DiagnosticSessionControlModeSwitchInterface. According to the specification in [SWS_Dcm_91033], this port serves to notify software components (SW-Cs) about the change and current state of the active diagnostic session (Diagnostic Session).
Interpretation: Here, the module DCM presumably assumes the role of the sender, which forwards status changes of the diagnostic session via the RTE to interested software components. Question Q-6af0e97b6910087d (open) Connected SW-Cs are likely to receive and process these mode switches via configured mode-switch events in order to adapt internal sequences, permissions, or their functional behavior to the currently active diagnostic session.
Error Handling and Boundary Conditions
No specific error codes, return values, or notifications to DET or DEM are defined for this port in [SWS_Dcm_91033]. Interpretation: Any error conditions during transmission are therefore likely to be completely monitored and handled by the general mechanisms of the AUTOSAR RTE and the basic module DCM. Question Q-a8055458432174f6 (open) Special restrictions regarding reentrancy or call context are not contained in the specification data and are therefore not further considered.
This text was generated by an AI based on the AUTOSAR R20-11 specification.
Implementer's Guide to follow (complexity I1)
type EcuResetModeSwitchInterface [SWS_Dcm_91034] 📄 PDF
A ModeSwitchInterface PPortPrototype used to notify SW-Cs about an upcoming ECU Reset and its type
According to [SWS_Dcm_91034], the port element EcuResetModeSwitchInterface is specified as a provided port (ProvidedPort or PPortPrototype) of the module DCM. It uses the interface Dcm_EcuResetModeSwitchInterface and serves to inform software components (SW-Cs) about an impending reset of the ECU as well as the exact reset type [SWS_Dcm_91034].
The following aspects apply to the usage and interaction in the system:
- Communication role: The DCM acts as the sender of the mode switch. Interested SW-Cs connect via corresponding receiver ports (R-ports) to react to the notification [SWS_Dcm_91034].
- Mode switch semantics: As
ModeSwitchInterface, no client-server return values or data parameters are transmitted here, but state transitions are signaled via the RTE [SWS_Dcm_91034]. The notification thus occurs via mode declarations of the interface. - Reaction of the components: Via the communicated reset type, the SW-Cs obtain knowledge of the type of the impending restart [SWS_Dcm_91034]. This is likely to allow the applications to systematically store volatile runtime data in non-volatile memory or to put peripheral hardware into a safe state before the restart (interpretation). Question Q-4dcf9314d84b53a0 (open)
- Error handling: The interface definition itself does not contain any error messages or return channels for error conditions of the SW-Cs [SWS_Dcm_91034].
This text was generated by an AI and is based on AUTOSAR Release R20-11.
Implementer's Guide to follow (complexity I1)
type ModeRapidPowerShutDownModeSwitchInterface [SWS_Dcm_91035] 📄 PDF
A ModeSwitchInterface PPortPrototype used to notify SW-Cs about the rapid power shut down mode
According to [SWS_Dcm_91035], the interface ModeRapidPowerShutDownModeSwitchInterface is specified as PPortPrototype (ProvidedPort) for the interface Dcm_ModeRapidPowerShutDownModeSwitchInterface in module Dcm. It serves to notify software components (SW-Cs) about the rapid power shut down mode (Rapid Power Shut Down Mode).
Regarding usage, behavior, and interaction, the following aspects are relevant:
- Usage and semantics: Via the
ModeSwitchInterface, the DCM signals mode switches to connected SW-Cs. The call context lies within the DCM module, which initiates the mode change; transmission to the receivers occurs asynchronously via the RTE [SWS_Dcm_91035]. - Error handling: The port definition does not contain any specific error codes, return values, or DET/DEM events. Errors during mode transmission are therefore likely to be completely intercepted by the standard mechanisms of the AUTOSAR RTE for mode-switch ports. Question Q-16537a6a4e19e40b (open)
- Concurrency and restrictions: Notification takes place in the execution context of the DCM. Receiving SW-Cs are presumably activated via mode-triggered runnables and must be designed in such a way that they execute the actions for rapid power shutdown without blocking delays. Question Q-20f196c7af208288 (open)
This text was generated by an AI based on the AUTOSAR specification.
Implementer's Guide to follow (complexity I1)
type ControlDTCSettingModeSwitchInterface [SWS_Dcm_91037] 📄 PDF
A ModeSwitchInterface PPortPrototype used to notify SW-Cs about the DTC Setting mode
Usage and purpose
According to [SWS_Dcm_91037], the element ControlDTCSettingModeSwitchInterface is a ModeSwitchInterface of the Diagnostic Communication Manager (DCM) provided as a provided port (PPortPrototype). Its primary task consists in notifying connected software components (SW-Cs) about the current state of the DTC setting mode (DTC Setting mode).
Here, Dcm_ControlDTCSettingModeSwitchInterface is used as the port interface [SWS_Dcm_91037]. Because the DCM declares this port as a provided port, the diagnostic module assumes the role of mode manager or sender. Application components can connect via corresponding required ports to receive status changes and adapt their internal behavior.
Interaction and System Integration
The interaction in the system network focuses on decoupling diagnostic commands from application logic:
- Mode propagation: Via the provided port, the DCM informs the SW-Cs whether the storage and updating of diagnostic trouble codes is active or disabled [SWS_Dcm_91037]. The notification of the SW-Cs is likely to occur in the AUTOSAR runtime environment via standard mode-switch events of the RTE. Question Q-8c0918099f2aa797 (open)
- Diagnostic origin: Switching the DTC setting mode is presumably in direct context with UDS diagnostic services such as ControlDTCSetting (Service 0x85), via which an external tester can temporarily disable error logging. Question Q-f2555e0641476955 (open)
Error Handling and Boundary Conditions
Since the specification in [SWS_Dcm_91037] defines neither specific error codes nor DET messages or return values, mode transmission occurs purely declaratively via the mechanisms of the RTE. No special call contexts or reentrancy requirements are indicated for the port declaration itself.
This text was generated by an AI based on the AUTOSAR Classic R20-11 specification.
Implementer's Guide to follow (complexity I1)
type SecurityAccessModeSwitchInterface [SWS_Dcm_91039] 📄 PDF
A ModeSwitchInterface PPortPrototype used to notify SW-Cs about the current Security Level
The port element SecurityAccessModeSwitchInterface provides a provided port (PPortPrototype) based on the interface Dcm_SecurityAccessModeSwitchInterface in the module DCM [SWS_Dcm_91039]. The purpose of this interface is to notify software components (SW-Cs) about the currently active security level (Security Level) [SWS_Dcm_91039].
Usage and Interaction
Notification occurs via the port of the DCM to connected components [SWS_Dcm_91039]. Provision is likely implemented as mode-switch communication via the AUTOSAR RTE, allowing connected SW-Cs to react to state changes of the security level via mode-switch events (interpretation). Question Q-d86dacdb91979b87 (open) Parameters, return values, or specific synchronous function calls are not defined in the port description [SWS_Dcm_91039]; transmission is therefore likely to correspond to the asynchronous broadcast semantics of a mode manager (interpretation). Question Q-9d750df4f73b1634 (open)
Error Handling and Restrictions
Since this is a pure mode switch, the specification does not state any specific error codes, parameter checks, or messages to DET or DEM [SWS_Dcm_91039]. Direct error handling during notification is likely not intended in the interface itself (interpretation). Question (open) Restrictions regarding reentrancy or deviating variants are not specified for the port element [SWS_Dcm_91039].
This usage note was generated automatically and is based on the specifications of AUTOSAR Release R20-11.
Implementer's Guide to follow (complexity I1)
type DcmDiagnosticSessionControl [SWS_Dcm_91019] 📄 PDF
ModeDeclarationGroup representing the different diagnostic sessions Further modes to be added: {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSession/ DcmDspSessionRow.SHORT-NAME)}
type DcmEcuReset [SWS_Dcm_91021] 📄 PDF
ModeDeclarationGroup representing the different ECU reset types
type DcmModeRapidPowerShutDown [SWS_Dcm_91023] 📄 PDF
ModeDeclarationGroup representing the enable/disable state of rapid power shutdown
The ModeDeclarationGroup DcmModeRapidPowerShutDown serves to represent the activation state for rapid power shutdown (Rapid Power Shutdown) in the ECU [SWS_Dcm_91023]. The element is assigned to category EXPLICIT_ORDER and defines two concrete modes: the initial mode DCM_ENABLE_RAPIDPOWERSHUTDOWN with the numerical value 0 and DCM_DISABLE_RAPIDPOWERSHUTDOWN with the value 1 [SWS_Dcm_91023]. For mode transitions, the transition value 255 (On transition value) is specified [SWS_Dcm_91023].
Interaction and Mode Management
In the overall system, the module DCM acts as mode manager for a series of diagnostic modes, which also includes DcmModeRapidPowerShutDown in the context of the diagnostic service 0x11 (ECU Reset) [SWS_Dcm_00775]. Within the basic software, the DCM defines the ModeDeclarationGroupPrototype DcmModeRapidPowerShutDown as provided-ModeGroup in its BSW module instance for this purpose based on this ModeDeclarationGroup [SWS_Dcm_00807].
Application software components (SW-Cs) that need to be informed about the current activation state of the rapid power shutdown connect the standardized service interface Dcm_ModeRapidPowerShutDownModeSwitchInterface [SWS_Dcm_91024]. Via its mode group modeRapidPowerShutDown, they receive corresponding mode switches of the DCM at runtime [SWS_Dcm_91024].
This usage note was generated automatically based on the specification requirements of AUTOSAR R20-11.
Implementer's Guide to follow (complexity I1)
type DcmCommunicationControl [SWS_Dcm_91025] 📄 PDF
ModeDeclarationGroup representing the different communication control states
type DcmControlDTCSetting [SWS_Dcm_91027] 📄 PDF
ModeDeclarationGroup representing the enable/disable state for DTC storage
type DcmResponseOnEvent [SWS_Dcm_91029] 📄 PDF
ModeDeclarationGroup representing the state of a Response On Event
type DcmSecurityAccess [SWS_Dcm_91031] 📄 PDF
ModeDeclarationGroup representing the different diagnostic security levels Further modes to be added: {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDsp Security/DcmDspSecurityRow.SHORT-NAME)}
The ModeDeclarationGroup DcmSecurityAccess of category EXPLICIT_ORDER represents the various diagnostic security levels of an ECU for the UDS service 0x27 (SecurityAccess) [SWS_Dcm_91031], [SWS_Dcm_00775]. As the initial mode, DCM_SEC_LEV_LOCKED with the fixed value 0 is specified by default [SWS_Dcm_91031], [SWS_Dcm_01327]. Additional security levels from DCM_SEC_LEV_1 to DCM_SEC_LEV_63 are added in a project- and application-specific manner via the configuration of the security rows under DcmDspSecurityRow [SWS_Dcm_91031], [SWS_Dcm_01327].
The DCM module assumes the central role as mode manager for this diagnostic mode [SWS_Dcm_00775]. With every change of the security level, the DCM updates the mode group DcmSecurityAccess with the newly assumed security status [SWS_Dcm_01329]. During an ongoing state transition between individual modes, the system signals the defined transition value 255 (On transition value) [SWS_Dcm_91031].
The propagation of the current security status to software components takes place via the service interface Dcm_SecurityAccessModeSwitchInterface [SWS_Dcm_91032]:
- The DCM provides the
ModeDeclarationGroupPrototypeDcmSecurityAccessas a provided mode group (provided-ModeGroup) via the interface for this purpose [SWS_Dcm_01327], [SWS_Dcm_91032]. - Each software component (SW-C) that needs to be informed about the current security level declares a dependency on the ModeSwitch interface
Dcm_SecurityAccessModeSwitchInterfaceand integrates it as a required port [SWS_Dcm_91032]. - The availability of the individual modes in the interface is subject to the same configuration variants as the underlying security rows [SWS_Dcm_91032].
This text was generated by an AI.
Implementer's Guide to follow (complexity I2)
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_Dcm- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_Dcm@rel:R20-11#a5bbe3f9- Content hash
a5bbe3f9- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_DiagnosticCommunicationManager.pdf#nameddest=SWS_Dcm_00037
gemini-3.8-flash-low· 2026-10-13 · German original