Dcm provides some general interfaces to implement diagnostic services, enabling communication and data interaction with diagnostic tools through standard UDS (ISO14229-1)/OBD (SAEJ1979, ISO15031-5) protocols as well as independent network-related protocols (ISO15765-3, 15765-4).
Dcm为车辆在开发、生产和后续客户服务过程中提供诊断车辆内部信息的功能。
Dcm provides the function of diagnosing the internal information of the vehicle during the development, production and subsequent customer service processes of the vehicle.
In the Autosar architecture, Dcm is located in the communication service layer and is applicable to any network bus (CAN/FLEXRAY/LIN/MOST, etc.). Therefore, the implementations specific to the network environment are all located in other modules (such as CanTp/DoIP, etc.).
Dcm performs actual data sending and receiving by calling the general interface of the independent network bus provided by PduR or providing a callback interface. PduR determines the bus type used for message sending and receiving according to the configuration.
After receiving a diagnostic request, Dcm will analyze the content and judge whether the content is correct according to the protocol requirements. If it is incorrect, it will reply with the corresponding NRC; if it is correct, it will reply with a positive response.
In the process of handling services, Dcm may involve the acquisition of some external data (such as DTC status, DID data, RID routines, etc.), which will interact with other BSW modules or SWC (through RTE).
Dcm分成三大功能主题DSL, DSD和DSP。
Dcm is divided into three major functional themes: DSL, DSD and DSP.
As shown in the Dcm Module Hierarchy Diagram, the Dcm module is located in the communication service layer of the AUTOSAR architecture, with the PduR module as its lower-layer module and the RTE as its upper-layer module.
Communicate with the TP module through the PduR module to receive diagnostic requests in TP mode. It starts with PduR calling Dcm_StartOfReception, followed by calling Dcm_CopyRxData to copy the received data, and finally ends with Dcm_TpRxIndication to complete the reception.
功能寻址并发3E80(Functional addressing for concurrent 3E80)¶
Communicate with the TP module through the PduR module to send diagnostic responses in TP mode. It starts with Dcm calling PduR_DcmTransmit, followed by PduR calling Dcm_CopyTxData to copy the data to be sent, and finally ends with Dcm_TpTxConfirmation to complete the transmission.
Pass in metaData during TP reception, Dcm obtains SA and TA. When sending a diagnostic response, swap SA and TA, and also pass in metaData for transmission.
If a diagnostic response cannot be sent within the P2Server time (the service is still being processed or DCM_E_PENDING is replied), NRC 0x78 is sent to inform the diagnostic tool that more time is needed for processing, and the response will be sent later.
The first Pending message must be sent within the P2Server time, and each subsequent Pending message is sent at intervals of P2StarServer time.
The maximum number of NRC 0x78 that can be sent can be determined by configuration. If the specified number is exceeded, NRC 0x10 is sent, and the processing of this diagnostic request is ended.
When the length of the content to be sent exceeds the allocated TxBuffer size, paged transmission can be triggered (usually applicable to UDS 0x19 and 0x22 services). First, obtain part of the data, then initiate a transmission request.
Subsequently, when part of the copyTxData is completed, part of the TxBuffer can be released, making it possible to obtain subsequent data until the transmission is completed.
An application (application callout interface or custom diagnostic service) can immediately initiate a Pending NRC 0x78 response by replying with DCM_E_FORCE_RCRRP, regardless of whether the P2Server time has been reached.
By internally implementing the UDS 0x27 service, security level control is achieved, allowing session switching (initially LOCKED). Security levels can be configured independently (determining seed length, number of attempts, unlocking methods, etc.), and services, DIDs, RIDs, etc., supported under each security level can be determined through configuration.
By internally implementing the UDS 0x10 service, session control is achieved, enabling session switching (usually including default session, programming session, extended session, etc.). Sessions can be configured independently, and services, DIDs, RIDs, etc., supported under each session can be determined through configuration.
By internally implementing the UDS 0x29 service, security authentication is achieved, enabling security authentication with information security-related modules (Csm, KeyM). Services, DIDs, RIDs, etc., supported under each security authentication Role can be determined through configuration.
Timeout situations can be monitored according to the main function cycle, thereby implementing timeouts such as P2Server/S3Server.
S3Server can be configured to determine the time that Dcm can maintain a non-default session without receiving external requests; beyond this time, it will return to the default session.
P2Server and P2StarServer can also be configured to determine the timing of sending the first and subsequent NRC 0x78.
In the default session, protocol parallelism with non-shared Buffers is supported, allowing multiple protocols to simultaneously send/receive diagnostic messages and process diagnostic services. Protocols are relatively independent and have independent management units.
Parallelism is not supported in non-default sessions or between protocols that share Buffers. A protocol with higher priority will preempt a protocol with lower priority, and the preempted protocol will immediately cancel the current diagnostic request processing, including message sending and receiving.
ComM can make Dcm enter the corresponding communication mode by calling the corresponding interfaces (Dcm_ComM_NoComModeEntered/Dcm_ComM_SilentComModeEntered/Dcm_ComM_FullComModeEntered), which correspond to prohibiting sending and receiving, only receiving but not sending, and allowing sending and receiving, respectively.
Based on the configured service table, general checks are performed on the requested diagnostic service/sub - service. These mainly include checks on manufacturer/supplier permissions, whether the service/sub - service is supported, whether the specified session level, security level, security authentication, and mode rules are met. If there is a sub - service, it also checks whether the length is at least 2, and other general checks.
After processing the request, it is transmitted to the DSP according to the standard parameters of the interface. Then, the response is received from the DSP, assembled, and prepared for sending.
Diagnostic service requests with sub - services support positive response suppression. By setting bit7 of the sub - service to 1, Dcm is informed that there is no need to reply to the positive response of this diagnostic request, such as 3E80.
In functional addressing, NRC 0x11/0x12/0x31/0x7E/0x7F do not send diagnostic responses, and the processing of the diagnostic service is ended directly.
After obtaining the transmission confirmation from the DSP, the Confirmation Callout interface is called to notify the application of the result of the diagnostic service processing (positive response sent successfully/positive response failed to send or suppressed/negative response sent successfully/negative response failed to send or suppressed).
In accordance with the Autosar specification, the following UDS services are implemented internally, all of which refer to ISO14229 - 1. For specific logic, please refer to the document. Some services specified by Autosar are not implemented, and you can refer to the subsequent deviations:
In accordance with the Autosar specification, the following OBD services are implemented internally, all of which are implemented in accordance with the standard ISO15031-5. For specific logic, please refer to the document:
The jump interaction with the Bootloader is realized through the internally implemented 0x10/0x11 services. The received service requests, whether they are programming requests and other information are set by calling the Dcm_SetProgConditions interface.
On the Bootloader side, relevant information can be accessed to determine whether a diagnostic reply needs to be sent and whether to perform programming and other actions.
Through configuration, it can be determined whether the data reading interface is through a user-defined callout or through SWC/RTE (selecting CS/SR/NV), and whether the interface itself is synchronous or asynchronous,
whether it contains ErrorCode, etc. Depending on the configuration, the parameters of the interface that Dcm needs to call (the interface that the application needs to implement) will be different.
Some services themselves or service-related variables need to use NvM for storage reading and writing. They will reference NvM blocks and perform operations such as reading, writing, and querying block status through standard interfaces.
该功能可以指定某些DID以及某个RID,在对这些DID发起写入前需要前置29 04服务,发送证书,执行2E服务写入时将不会直接写入,
而是暂存需要写入的内容,后续在执行指定RID的startRoutine时会执行证书验证,验证通过后会对这些DID进行写入。
This function can specify certain DIDs and a certain RID. Before initiating writing to these DIDs, the 29 04 service needs to be pre-positioned to send the certificate. When executing the 2E service for writing, it will not write directly,
but temporarily store the content to be written. Later, when executing the startRoutine of the specified RID, certificate verification will be performed. If the verification is passed, these DIDs will be written.
The deviations described here refer to the differences between the current implementation and the requirements of Autosar version R23. For the restriction items of Autosar itself, please refer to Chapter 4 of [1].
Nested data types (CompositePool) involving DidSignal/RoutineSignal are not implemented temporarily because they conflict with encapsulation requirements, and the use of conventional DspData/Routine types can usually meet application needs.
The following SWS requirements are involved:
The association of the service table is located in the configuration, so there is no need to perform the association when initializing the protocol. The configuration can be directly retrieved when needed, so it is not implemented temporarily.
It involves the SWS requirement SWS_Dcm_00035.
配置(configuration)
None
接口(Interface)
Dcm_Init无需涉及相关初始化操作
Dcm_Init does not need to involve relevant initialization operations.
协议并行时根据协议优先级做ComM诊断情况报告(When protocols are parallel, the ComM diagnostic status report is made according to the protocol priority)¶
When protocols are parallel, different protocols may come from different ComM channels. During the parallel operation of multiple protocols, calling the ComM interface to prompt the communication status of each network is sufficient, so it is not implemented temporarily.
It involves the SWS requirement SWS_Dcm_01050.
配置(configuration)
None
接口(Interface)
None
协议并行时序列化调用接口/处理服务(When protocols are parallel, interfaces are called/ services are processed in a serialized manner)¶
Since services/interfaces need to provide the current operating status (OpStatus), in the case of protocol parallelism, if access to the same service/interface is involved, OpStatus conflicts may occur, leading to confusion in service processing. Therefore, the requirement stipulates that for such cases, the calling of the service/interface should be delayed until there is no parallel processing.
If it is necessary to implement this, it is required to perform state management for each service and interface unit, which involves allocating additional memory space and querying each time it is executed. In actual application processes, such situations rarely occur and can be avoided through application behaviors. Therefore, this requirement is not implemented temporarily.
The following SWS requirements are involved:
SWS_Dcm_01604
SWS_Dcm_01370
配置(configuration)
None
接口(Interface)
None
Harmonize the naming between interfaces and modes¶
The requirement stipulates that the configuration container name of SessionRow should be consistent with the mode name. In the current encapsulation, the corresponding default name is generated for the fixed SessionLevel, and the name of SessionRow is not adopted. Only the configuration names other than the fixed SessionLevel are used.
During configuration, automatically modifying the container name according to the sessionLevel involves configuration changes, and manual modification is too cumbersome. Therefore, this requirement can be temporarily not implemented.
The following SWS requirements are involved:
SWS_Dcm_CONSTR_06000
SWS_Dcm_CONSTR_06001
配置(configuration)
DcmDspSessionRow.SHORT-NAME不做限制
There is no restriction on DcmDspSessionRow.SHORT-NAME.
Some required Det error reports do not exist in the Det table (Sections 7.2.1-7.2.2 of the document), and the ID values are uncertain, so they are not implemented temporarily.
It involves the SWS requirement SWS_Dcm_01143.
The mode group required by the demand conflicts with the subsequent service component requirements. Therefore, the service component requirements are taken as the standard, and it is not implemented temporarily.
It involves the SWS requirement SWS_Dcm_01327.
The mode groups required by the requirements do not exist in the subsequent service component requirements, and the application scenarios of mode switching related to service 86 are very few, so they are not implemented temporarily.
The following SWS requirements are involved:
The usage scenarios where certificate is used as a comparison element in mode conditions are very few, so it is not implemented temporarily.
The following SWS requirements are involved:
SWS_Dcm_CONSTR_06089
SWS_Dcm_CONSTR_06090
配置(configuration)
DcmModeConditionCertificateCompareElementRef配置删除
The configuration of DcmModeConditionCertificateCompareElementRef is deleted
The CompuMethod calculation method is defined on the Dcm side. Currently, the design of calculation methods is concentrated in applications, and there are no application scenarios designed on the BSW side, so it is not implemented temporarily.
The following SWS requirements are involved:
When referencing one or more other Dids, there are certain issues in encapsulation processing, with mismatched requirements and few usage scenarios, so it is not implemented temporarily.
The following SWS requirements are involved:
SWS_Dcm_00440
SWS_Dcm_CONSTR_06023
配置(configuration)
DcmDspDidRef配置删除
The configuration of DcmDspDidRef is deleted
接口(Interface)
None
DcmDspDataUsePort为USE_ECU_SIGNAL时配置DcmDspDataEcuSignal(When DcmDspDataUsePort is USE_ECU_SIGNAL, configure DcmDspDataEcuSignal)¶
The configuration here is only required when IoHwAb does not exist in the project; otherwise, no configuration is needed, and it will be automatically mapped to the corresponding IoHwAb name.
It involves the SWS requirement SWS_Dcm_CONSTR_06057
The processing of 2F in SR mode needs to be implemented independently and is relatively complex. Currently, the CS mode is sufficient, and there are no usage scenarios for the time being, so it will not be implemented temporarily.
The following SWS requirements are involved:
SWS_Dcm_01600
SWS_Dcm_CONSTR_06050
SWS_Dcm_01436
SWS_Dcm_01437
SWS_Dcm_01439
SWS_Dcm_01440
SWS_Dcm_01441
SWS_Dcm_CONSTR_06081
SWS_Dcm_01305
SWS_Dcm_01306
SWS_Dcm_01307
SWS_Dcm_91087
SWS_Dcm_01308
SWS_Dcm_01309
SWS_Dcm_01312
SWS_Dcm_01313
SWS_Dcm_01438
SWS_Dcm_01277
SWS_Dcm_01275
配置(configuration)
DcmDspDidControlEnableMask删除配置项
The configuration item DcmDspDidControlEnableMask is deleted
When configured as USE_ECU_SIGNAL, endianness needs to be considered; if not configured, the default endianness is used. Here, uint8* is temporarily used as the parameter type, so no endianness conversion is required, and this item is not implemented temporarily.
It involves the SWS requirement SWS_Dcm_00640.
ClientServerOperation.diagArgIntegrity has no usage requirements in SWC/RTE for the time being, so this requirement is not implemented temporarily.
The following SWS requirements are involved:
Both the PROXY-type interface and the Routine’s Confirmation interface are in DRAFT status, and there are no usage scenarios, so they are not implemented temporarily.
The following SWS requirements are involved:
SWS_Dcm_01614
SWS_Dcm_01615
SWS_Dcm_01616
SWS_Dcm_01617
SWS_Dcm_91090
SWS_Dcm_91091
SWS_Dcm_91095
SWS_Dcm_91092
SWS_Dcm_91096
SWS_Dcm_91097
SWS_Dcm_91093
SWS_Dcm_91094
SWS_Dcm_91098
SWS_Dcm_91099
SWS_Dcm_91100
SWS_Dcm_91101
SWS_Dcm_91102
SWS_Dcm_91103
SWS_Dcm_91104
SWS_Dcm_91105
SWS_Dcm_91016
SWS_Dcm_91106
SWS_Dcm_91017
SWS_Dcm_91107
SWS_Dcm_91018
配置(configuration)
DcmDspDataUsePort去除PROXY相关选项
DcmDspDataUsePort removes PROXY-related options
删除以下配置项:
Delete the following configuration items:
DcmDspRoutineFncSignature
DcmDspRequestRoutineResultsConfirmationEnabled
DcmDspRequestRoutineResultsConfirmationFnc
DcmDspStartRoutineConfirmationEnabled
DcmDspStartRoutineConfirmationFnc
DcmDspStopRoutineConfirmationEnabled
DcmDspStopRoutineConfirmationFnc
接口(Interface)
None
3E服务无需安全认证(Service 3E does not require security authentication)¶
It is sufficient that Service 3E is not configured with relevant security authentication requirements, and no special handling is done here. This is not implemented temporarily.
It involves the SWS requirement SWS_Dcm_01558.
配置(configuration)
None
接口(Interface)
None
86服务子服务onComparisonOfValues(Sub-service onComparisonOfValues of Service 86)¶
According to the service table specified by Autosar in SWS_Dcm_01641, the sub-service onComparisonOfValues is not implemented temporarily, so this requirement is not implemented for the time being.
The following SWS requirements are involved:
SWS_Dcm_01630
SWS_Dcm_CONSTR_06105
配置(configuration)
DcmDspRoeMaxNumComparisionOfValueEvents配置项删除
The configuration item DcmDspRoeMaxNumComparisionOfValueEvents is deleted
接口(Interface)
None
DET报错DCM_E_SET_PROG_CONDITIONS_FAIL(DET reports an error DCM_E_SET_PROG_CONDITIONS_FAIL)¶
Currently, the return value is directly ignored, and no error is reported (if a DET error is reported, since it is a development error, it will usually enter an infinite loop, and normal functions cannot be maintained at this time, which is contrary to the follow-up of this requirement, so this requirement is not implemented temporarily).
It involves the SWS requirement SWS_Dcm_01185.
This type is used as the return value in DslInternal_ResponseOnOneEvent and DslInternal_ResponseOnOneDataByPeriodicId.
The above two interfaces are internally implemented interfaces. AUTOSAR provides recommendations, but in actual development, there are differences in the interfaces, and this return value is not required. Therefore, it will not be implemented temporarily.
It involves the SWS requirement SWS_Dcm_00976.
This requirement is consistent with the conditions of SWS_Dcm_91063 and is redundant, so it will not be implemented temporarily.
It involves the SWS requirement SWS_Dcm_01121.
The R23 version has removed this option (and instead uses NvData entirely). However, due to previous usage scenarios and user habits, this access method is retained here.
The respective error reporting contents need to be configured under DcmSecurityEventRefs, and only by associating them with IdsMEvent will the corresponding contents take effect.
This configuration item is not mentioned in the requirements. Whether it is different from other protocols can be known by configuring DcmDslProtocolTx, and corresponding processing will be done, so there is no need for special configuration here.
配置(configuration)
DcmDslProtocolTransType配置项删除
The configuration item DcmDslProtocolTransType is deleted.
Currently, only address configurations in the form of numerical ranges are supported, and string definitions are not supported. There is no corresponding requirement for the time being, so it will not be implemented temporarily.
Corresponding to the symbolic name of the container where PduRef is located, this configuration item should be fixedly associated with the container name and cannot be manually configured. Here, it will be directly deleted.
It is sufficient to directly call the corresponding interface of Dem, and there is no need to associate DcmDspPidDataDemRef. This is not implemented temporarily.
配置(configuration)
DcmDspPidService02配置Container删除
The Container for DcmDspPidService02 configuration is deleted.
Based on the specifications, the following configuration items have been modified, mainly by adding default values and adjusting some multiplicities and ranges to optimize the configuration process.
DcmDsdSidTabId
新增默认值: 保持与其他DcmDsdSidTabId不同情况下的最小值
New default value: The minimum value under the condition that it is different from other DcmDsdSidTabId values.
DcmTimStrP2ServerAdjust
新增默认值: 0
New default value: 0
DcmTimStrP2StarServerAdjust
新增默认值: 0
New default value: 0
DcmDspDataDefaultEndianness
新增默认值: OPAQUE
New default value: OPAQUE
DcmDslProtocolRxConnectionId
新增默认值: 保持与其他DcmDslProtocolRxConnectionId不同情况下的最小值
New default value: the minimum value under the condition that it is different from other DcmDslProtocolRxConnectionId values
DcmDspDidUsed
新增默认值: true
New default value: true
DcmDspDidByteOffset
新增默认值: 0
New default value: 0
DcmDspDidDataRef
多重性: 0..1 -> 1
Multiplicity: 0..1 -> 1
DcmDspDataDefaultEndianness
新增默认值: OPAQUE
New default value: OPAQUE
DcmDspDataEndianness
新增默认值: OPAQUE
New default value: OPAQUE
DcmDspDataUsePort
新增默认值: USE_DATA_ASYNCH_CLIENT_SERVER_ERROR
New default value: USE_DATA_ASYNCH_CLIENT_SERVER_ERROR
StructuredType is related to composite and will not be implemented temporarily.
To cooperate with the implementation of DcmDspDidusePort, as long as DcmDspDidUsePort here is not USE_ATOMIC_BNDM, it will meet the variant requirements.
[SWS_Dcm_91063]Definition of ImplementationDataType Dcm_DataElement_{Data}_ArrayType
此处size应为(({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataByteSize)}) || ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData.DcmDspPidDataByteSize)})) Elements
The size here should be (({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataByteSize)}) || ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData.DcmDspPidDataByteSize)})) Elements
[SWS_Dcm_91040]Definition of ImplementationDataType Dcm_RequestDataOut_{Routine}_{Signal}Type
StructuredType为composite相关,暂不实现
StructuredType is related to composite and will not be implemented temporarily.
[SWS_Dcm_91052]Definition of ImplementationDataType Dcm_RequestDataIn_{Routine}_{Signal}Type
StructuredType为composite相关,暂不实现
StructuredType is related to composite and will not be implemented temporarily.
[SWS_Dcm_91042]Definition of ImplementationDataType Dcm_StartDataIn_{Routine}_{Signal}Type
StructuredType为composite相关,暂不实现
StructuredType is related to composite and will not be implemented temporarily.
[SWS_Dcm_91044]Definition of ImplementationDataType Dcm_StartDataOut_{Routine}_{Signal}Type
StructuredType为composite相关,暂不实现
StructuredType is related to composite and will not be implemented temporarily.
[SWS_Dcm_91046]Definition of ImplementationDataType Dcm_StopDataIn_{Routine}_{Signal}Type
StructuredType为composite相关,暂不实现
StructuredType is related to composite and will not be implemented temporarily.
[SWS_Dcm_91048]Definition of ImplementationDataType Dcm_StopDataOut_{Routine}_{Signal}Type
StructuredType为composite相关,暂不实现
StructuredType is related to composite and will not be implemented temporarily.
[SWS_Dcm_00690]Definition of ClientServerInterface RoutineServices_{RoutineName}
Confirmation相关内容暂不实现
Content related to Confirmation will not be implemented temporarily.
[SWS_Dcm_91072]Definition of ClientServerInterface Authentication
Condition for adding Variation: If Service 29 is configured, and the generation condition of the port associated with this interface is not met, then this interface will not be generated either.
[SWS_Dcm_91065]Definition of ClientServerInterface UploadDownloadServices
此处ReadFileOrDir中的Data的direction应为OUT
Here, the direction of Data in ReadFileOrDir should be OUT.
[SWS_Dcm_91073]Definition of Port Authentication_{Connection} required by module Dcm
Variation添加条件:配置了29服务
Condition for adding Variation: Service 29 is configured.
[SWS_Dcm_91019]Definition of ModeDeclarationGroup DcmDiagnosticSessionControl
The value here is modified to start from 1, which are 1, 2, 3, 4 in sequence, and the subsequent others correspond to the sessionLevel of DcmDspSessionRow.
[SWS_Dcm_91031]Definition of ModeDeclarationGroup DcmSecurityAccess
此处应为动态,后续名字为DcmDspSecurityRow的shortName
It should be dynamic here, and the subsequent name is the shortName of DcmDspSecurityRow.
[SWS_Dcm_91067]Definition of ModeDeclarationGroup DcmAuthenticationState_{Connection}
Remove the variation of {Connection} here and change it to DcmAuthenticationState. The variation is not described in the requirements, and the content is the same, so there is no need for repeated definitions.
[SWS_Dcm_91026]Definition of ModeSwitchInterface CommunicationControlModeSwitch Interface_{ComMChannelName}
此处缺少条件,应为:
There is a missing condition here, which should be:
ComMChannelName = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspComControl/DcmDspComControlAllChannel/DcmDspAllComMChannelRef->ComMChannel.SHORT-NAME)} or
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspComControl/DcmDspComControlSpecificChannel/DcmDspSpecificComMChannelRef->ComMChannel.SHORT-NAME)} or
In the second line of the variation, “||” should be “&&”. The variation of the parameter controlMask for the operation FreezeCurrentState should be DID = ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspDid.SHORT-NAME)})
The addressing mode supported by the service can be specified by configuring DcmDsdSidTabAddressingFormat, and requests are processed and replied to only if supported.
指定动态DID定义的存储NvMBlock(Specify the NvMBlock for storing dynamic DID definitions)
It is possible to specify that the protocol supports queue caching (with a fixed queue length of 2). When a new request’s TP reception is initiated while a request is being received/processed/replied to, the cached request is processed directly after the previous request is handled, thus saving the time for TP reception.
Support for P4ServerMax configuration at the service/sub-service/Routine level. After configuration, the processing of the service/sub-service/Routine is required not to exceed the time specified by P4ServerMax; if it does, the processing of the service is terminated immediately.
NRC0x22回复时追加错误原因(Append error cause when replying with NRC0x22)
Provide the engineering macro DCM_NRC22_SPECIFIC_CAUSE_CODE. After definition, a callout interface is provided, which is given the basic information of the service to determine the cause to be appended, which is included in the reply (1 byte).
With reference to DcmDspWriteMemoryRangeInfo[ECUC_Dcm_00785], only the naming is modified, and the content in the container remains unchanged.
DcmDDDIDStorageBlockIdRef
Parameter Name
DcmDDDIDStorageBlockIdRef
Parent Container
DcmGeneral
Description
NVRAM blockId to store the DDDID data.
Multiplicity
0..1
Type
Symbolic name reference to NvMBlockDescriptor
Post-Build Variant Value
false
Scope / Dependency
scope: ECU dependency: DcmDDDIDStorage == True
DcmDslProtocolRequestQueued
Parameter Name
DcmDslProtocolRequestQueued
Parent Container
DcmDslProtocolRow
Description
If set to TRUE, the Dcm provides an addtional
buffer to store a second simultaneous request
and will be processed when the current request is finished.
Multiplicity
0..1
Type
boolean
Post-Build Variant Value
false
Default Value
false
Scope / Dependency
scope: ECU
DcmDsdSidTabP4ServerMax
Parameter Name
DcmDsdSidTabP4ServerMax
Parent Container
DcmDsdService
Description
This is the service value for P4ServerMax in seconds (per Service).
Multiplicity
0..1
Type
EcucFloatParamDef
Range
[0..100]
Default Value
0.05
Post-Build Variant Value
false
Scope / Dependency
scope: ECU
DcmDsdSubServiceP4ServerMax
Parameter Name
DcmDsdSubServiceP4ServerMax
Parent Container
DcmDsdSubService
Description
This is the subService value for P4ServerMax in seconds (per Service).
Multiplicity
0..1
Type
EcucFloatParamDef
Range
[0..100]
Default Value
0.05
Post-Build Variant Value
false
Scope / Dependency
scope: ECU
DcmDspRoutineP4ServerMax
Parameter Name
DcmDspRoutineP4ServerMax
Parent Container
DcmDspRoutine
Description
This is the value for P4ServerMax in seconds (per Service).
The function indicates to the app that a service is about to be executed and allows the application to reject the execution of the service request.
Dcm_DsdServiceRequestNotificationType
struct DsdServiceRequestNotificationType
service notification callouts
Dcm_ServiceRoleType
struct ServiceRoleType
authenticationRow type
Dcm_DspSecurityCompareKeyFncType
Std_ReturnType*
Request to application for asynchronous comparing key.
Dcm_DspSecurityGetSeedFncType
Std_ReturnType*
Request to application for asynchronous provision of seed value.
Dcm_DspSecurityGetAttemptCounterFncType
Std_ReturnType*
Read the attempt counter for a specific security level from the application.
Dcm_DspSecuritySetAttemptCounterFncType
Std_ReturnType*
Set the attempt counter for a specific security level in the application.
Dcm_DspSecurityRowType
struct DspSecurityRowType
DcmDspSecurityRow configuration.
Dcm_DspSessionRowType
struct DspSessionRowType
DcmDspSessionRow Configuration.
Dcm_ServcieFncType
Std_ReturnType*
Function prototype for service entry, named by parameter SidTabFnc.
Dcm_ModeRuleFncType
Std_ReturnType*
general mode rule function
Dcm_DsdSubServiceType
struct DsdSubServiceType
DcmDsdSubService Configuration.
Dcm_DsdServiceType
struct DsdServiceType
DcmDsdService Configuration.
Dcm_DsdServiceTableType
struct DsdServiceTableType
DcmDsdServiceTable Configuration.
Dcm_DslCallbackDCMRequestServiceFncType
Std_ReturnType*
This function allows the application to examine the environment conditions and enable/disable further processing of the protocol for StartProtocol and informs the application of the protocol stop for StopProtocol.
Dcm_DslCallbackDCMRequestServiceType
struct DslCallbackDCMRequestServiceType
CallbackDCMRequestService Configuration.
Dcm_DslProtocolRxType
struct DslProtocolRxType
DcmDslProtocolRx Configuration.
Dcm_ComCtrlFncType
Std_ReturnType*
general communication control function
Dcm_DslMainConnectionType
struct DslMainConnectionType
mainConnection configuration
Dcm_DslProtocolRowType
struct DslProtocolRowType
This container contains the configuration of one particular diagnostic protocol used in Dcm.
This function checks common params and initialization status for callbacks.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
id
Identification of the I-PDU.
[in]
info
Pointer to a PduInfoType structure containing the payload data (without protocol information) and payload length of the first frame or single frame of a transport protocol I-PDU reception, and the MetaData related to this PDU. If neither first/single frame data nor MetaData are available, this parameter is set to NULL_PTR.
[in]
bufferSizePtr
Available receive buffer in the receiving module. This parameter will be used to compute the Block Size (BS) in the transport protocol module.
Provides the destination buffer (SduDataPtr) and the number of bytes to be copied (SduLength). If not enough transmit data is available, no data is copied by the upper layer module and BUFREQ_E_BUSY is returned. The lower layer module may retry the call. An SduLength of 0 can be used to indicate state changes in the retry parameter or to query the current amount of available data in the upper layer module. In this case, the Sdu DataPtr may be a NULL_PTR.
[in]
availableDataPtr
Indicates the remaining number of bytes that are available in the upper layer module’s Tx buffer. availableDataPtr can be used by TP modules that support dynamic payload lengths (e.g. FrIsoTp) to determine the size of the following CFs.
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.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
connectionId
Unique connection identifier identifiying the connection for which a deauthenticated roles is set.
[in]
deauthenticatedRole
New deauthenticated role that is assigned to that connection
This function provides the active security level value.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[out]
SecLevel
Active Security Level value Conversion formula to calculate SecurityLevel out of tester requested SecurityAccessType parameter: SecurityLevel = (SecurityAccessType + 1) / 2 Content of SecurityAccessType is according to “securityAccessType” parameter of SecurityAccess request
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.
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). If the service is successful and BUFREQ_OK is returned, the service provides the currently available maximum buffer size. This function might be called in interrupt context.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
id
Identification of the I-PDU.
[in]
info
Pointer to a PduInfoType structure containing the payload data (without protocol information) and payload length of the first frame or single frame of a transport protocol I-PDU reception, and the MetaData related to this PDU. If neither first/single frame data nor MetaData are available, this parameter is set to NULL_PTR.
[in]
TpSduLength
Total length of the N-SDU to be received.
[out]
bufferSizePtr
Available receive buffer in the receiving module. This parameter will be used to compute the Block Size (BS) in the transport protocol module.
Return type
BufReq_ReturnType
Return values
Name
Description
BUFREQ_OK
Connection has been accepted. bufferSizePtr indicates the available receive buffer; reception is continued. If no buffer of the requested size is available, a receive buffer size of 0 shall be indicated by bufferSizePtr.
BUFREQ_E_NOT_OK
Connection has been rejected; reception is aborted. bufferSizePtr remains unchanged.
BUFREQ_E_OVFL
No buffer of the required length can be provided; reception is aborted. bufferSizePtr remains unchanged.
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.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
id
Identification of the received I-PDU.
[in]
info
Provides the source buffer (SduDataPtr) and the number of bytes to be copied (SduLength). An SduLength of 0 can be used to query the current amount of available buffer in the upper layer module. In this case, the SduDataPtr may be a NULL_PTR.
[out]
bufferSizePtr
Available receive buffer after data has been copied.
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.
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. The size of the remaining data is written to the position indicated by availableDataPtr. This function might be called in interrupt context.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
id
Identification of the transmitted I-PDU.
[in]
info
Provides the destination buffer (SduDataPtr) and the number of bytes to be copied (SduLength). If not enough transmit data is available, no data is copied by the upper layer module and BUFREQ_E_BUSY is returned. The lower layer module may retry the call. An SduLength of 0 can be used to indicate state changes in the retry parameter or to query the current amount of available data in the upper layer module. In this case, the Sdu DataPtr may be a NULL_PTR.
[in]
retry
currently not being used
[out]
availableDataPtr
Indicates the remaining number of bytes that are available in the upper layer module’s Tx buffer. availableDataPtr can be used by TP modules that support dynamic payload lengths (e.g. FrIsoTp) to determine the size of the following CFs.
Return type
BufReq_ReturnType
Return values
Name
Description
BUFREQ_OK
Data has been copied to the transmit buffer completely as requested.
BUFREQ_E_BUSY
Request could not be fulfilled, because the required amount of Tx data is not available. The lower layern module may retry this call later on. No data has been copied.
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 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.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
TxPduId
ID of the PDU that has been transmitted.
[in]
result
E_OK : The PDU was transmitted. E_NOT_OK: Transmission of the PDU failed.
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.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
jobId
JobId provided by the Csm, indicating the job that has finished.
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.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
CertID
Certificate identifier that has finished the verification
Start as 0 for OBD request or NULL_PTR for UDS request, bit 1 is set for availability Id, bit 2 is set for non-availability ones.
[in]
availPidIndex
the index of availability pid
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
Start as 0 for OBD request or NULL_PTR for UDS request, bit 1 is set for availability Id, bit 2 is set for non-availability ones.
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
Start as 0 for OBD request or NULL_PTR for UDS request, bit 1 is set for availability Id, bit 2 is set for non-availability ones.
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
Start as 0 for OBD request or NULL_PTR for UDS request, bit 1 is set for availability Id, bit 2 is set for non-availability ones.
[in]
numberOfTIDs
number of TIDs
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
Start as 0 for OBD request or NULL_PTR for UDS request, bit 1 is set for availability Id, bit 2 is set for non-availability ones.
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
Start as 0 for OBD request or NULL_PTR for UDS request, bit 1 is set for availability Id, bit 2 is set for non-availability ones.
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
Start as 0 for OBD request or NULL_PTR for UDS request, bit 1 is set for availability Id, bit 2 is set for non-availability ones.
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
Called by OBD 0x08 and UDS 0x31 to read the tidData.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
tid
Target TID
[in]
InBuffer
the input data
[in]
InBufferSize
the size of input data
[out]
DestBuffer
address to output Pid data
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was not successful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application requests the transmission of a response Response Pending (NRC 0x78)
Called by OBD 0x01 and UDS 0x22 to read the PidData.
Sync/Async
Depending on Application
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[in]
Pid
Target PID
[out]
DestBuffer
address to output Pid data
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
[inout]
mixPid
Start as 0 for OBD request or NULL_PTR for UDS request, bit 1 is set for availability Id, bit 2 is set for non-availability ones.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Called by OBD 0x06 and UDS 0x22 to read the midData.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
mid
Target MID
[out]
DestBuffer
address to output Pid data
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
[inout]
mixMid
Start as 0 for OBD request or NULL_PTR for UDS request, bit 1 is set for availability Id, bit 2 is set for non-availability ones.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Called by OBD 0x08 and UDS 0x31 to read the tidData.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
tid
Target TID
[in]
InBuffer
the input data
[in]
InBufferSize
the size of input data
[out]
DestBuffer
address to output Pid data
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Called by OBD 0x09 and UDS 0x22 to read the vehInfo data.
Sync/Async
Depending on Application
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[in]
infoType
Target infoType
[out]
DestBuffer
address to output Pid data
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
[inout]
MixInfoType
Start as 0 for OBD request or NULL_PTR for UDS request, bit 1 is set for availability Id, bit 2 is set for non-availability ones.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Depending on Session Type and current session level
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
protocolId
the current protocol Id
[in]
OpStatus
Indicates the current operation status
[in]
session
the requested session
[in]
sessionForBoot
the configuration of session related to boot
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was unsuccessful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
Depending on Session Type and current session level
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
protocolId
the current protocol Id
[in]
OpStatus
Indicates the current operation status
[in]
session
the requested session
[in]
sessionForBoot
the configuration of session related to boot
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was unsuccessful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
Called by DsdInternal_RxIndication to check general service/subService session and most of th UDS services to check did, rid, memory, etc. session.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
session
the required session
[in]
sessionNum
the required session num
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Called by UDS 0x11 to find the configured DcmReset index for the requested subfunction, this function is guaranteed to be successful as there will be configuration validation rules.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
subFunction
the requested subfunction
[out]
resetIndex
the requested subfunction’s reset configuration Index
prepare clear DTC by select and check clear conditions
Sync/Async
Depending on Dem
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[in]
clientId
the configured dem client id
[in]
reqData
the requested data
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x19 subfunction 0x01.
Sync/Async
Depending on Dem
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
clientId
the Dem clientId
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x19 subfunction 0x02 and 0x0A.
Sync/Async
Depending on Dem
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
clientId
the Dem clientId
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x19 subfunction 0x03.
Sync/Async
Depending on Dem
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
clientId
the Dem clientId
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x19 subfunction 0x04.
Sync/Async
Depending on Dem
Reentrancy
Reentrant
Parameters
Dir
Name
Description
OpStatus
[in]
clientId
the Dem clientId
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
disabled
set to TRUE when Dem_DisableDTCRecordUpdate return E_OK
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x19 subfunction 0x06.
Sync/Async
Depending on Dem
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
current operation status
[in]
clientId
the Dem clientId
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
disabled
set to TRUE when Dem_DisableDTCRecordUpdate return E_OK
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x19 subfunction 0x0D.
Sync/Async
Depending on Dem
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
clientId
the Dem clientId
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x19 subfunction 0x0E.
Sync/Async
Depending on Dem
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
clientId
the Dem clientId
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
This function gets the configured did index, also applying to rangeDid and OBDDid.
Sync/Async
Depending on Application
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[in]
ConnectionId
the current connectionid
[in]
Did
the input did
[in]
RangeDidIndex
the input range did index
[out]
DestBuffer
address to output the did data
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
This function gets the did length to read for pagedBuffer functionality.
Sync/Async
Depending on Application
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
Did
the input did
[in]
ConnectionId
the current connection id
[out]
DataLength
The data length of the did
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was unsuccessful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
This function handles the result of read Did and deal with pagedBuffer initialization.
Sync/Async
Depending on Application
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
protocolId
the current protocol id
[in]
readResult
the result of read did
[in]
index
the index of the requested did
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was unsuccessful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
This function setup the initial read status and iterate over requested did.
Sync/Async
Depending on Application
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[in]
protocolId
the current protocol id
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was unsuccessful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[inout]
offset
the current offset of the response buffer
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was unsuccessful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
This function reads a did based on is type (regular/range/OBD)
Sync/Async
Depending on Application
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[in]
connectionId
the current connection id
[in]
did
the requested did
[in]
didType
the type of the requested did
[in]
didIndex
the index of the requested did
[inout]
DestBuffer
output buffer
[inout]
bufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was unsuccessful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was unsuccessful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[in]
securityRow
the requested security row configuration
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x29 subfunction 0x00.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
ConnectionId
the current connection id
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Checkes KeyM asynchronous result and set errorCode accordingly.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
This function deals with challenge and output accordingly.
Sync/Async
Asynchronous
Reentrancy
Reentrant
Parameters
Dir
Name
Description
ConnectionId
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
This function deals with Csm Generate asynchronous result.
Sync/Async
Asynchronous
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
ConnectionId
the current connection Id
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
This function deals with Csm Signature asynchronous result.
Sync/Async
Synchronous
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
ConnectionId
the current connection Id
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x29 subfunction 0x01 or 0x02.
Sync/Async
FALSE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[in]
ConnectionId
the current connection Id
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Handle UDS 0x29 subfunction 0x01 or 0x02 when opStatus is DCM_INITIAL.
Sync/Async
Asynchronous
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
ConnectionId
the current connection Id
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x29 subfunction 0x03.
Sync/Async
FALSE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
ConnectionId
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x29 subfunction 0x04.
Sync/Async
Asynchronous
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Handles interaction with KeyM for UDS 0x29 subfunction 0x04.
Sync/Async
Asynchronous
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
certData
the input certData
[in]
CertId
the input certificate evaluation id
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x29 subfunction 0x08.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
connectionId
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x2C subfunction 0x01.
Sync/Async
Synchronous
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
connectionId
current connection id
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[in]
DDDIDIndex
DDDID index for reqeusted did
[in]
DcmDspDidInfoPtr
the DcmDspDidInfo configuration
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
The service interpreter for UDS 0x2C subfunction 0x02.
Sync/Async
Synchronous
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[in]
DDDIDIndex
DDDID index for reqeusted did
[in]
DcmDspDidInfoPtr
the DcmDspDidInfo configuration
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
general condition check for UDS 0x2C, subFunction 0x2
Sync/Async
Synchronous
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[in]
DcmDspDidInfoPtr
the DcmDspDidInfo configuration
[out]
SourceElementsNum
the requestged source element number
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
did
The requested did
[out]
didIndex
The index of requested did
[out]
didType
The type of requested did
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
whether the requested did is configured to be secure coding did
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[in]
did
The requested did
[in]
didIndex
The index of requested did
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
[out]
didIndex
the target did configuration index if condition check passes
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[inout]
totalLength
the total length of the response
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
memoryAddress
the requested memoryAddress
[out]
memorySize
the requested memorySize
[out]
memoryIdentifier
the configured memoryIdentifier
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
memoryAddress
the requested memoryAddress
[out]
memorySize
the requested memorySize
[out]
memoryIdentifier
the configured memoryIdentifier
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
dataLength
the data length of the following operations
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was not successful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application requests the transmission of a response Response Pending (NRC 0x78)
check the transfer sequence such as previous service request and block sequence counter
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
reqDataLen
the request data length
[in]
blockSequenceCounter
requested block sequence counter
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was not successful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application requests the transmission of a response Response Pending (NRC 0x78)
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was not successful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application requests the transmission of a response Response Pending (NRC 0x78)
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
dataFormatIdentifier
requested dataFormatIdentifier
[out]
fileSizeUncompressed
requested fileSizeUncompressed
[out]
fileSizeCompressed
requested fileSizeCompressed
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[in]
modeOfOperation
requested modeOfOperation
[in]
dataFormatIdentifier
requested dataFormatIdentifier
[inout]
fileSizeUncompressed
requested fileSizeUncompressed
[inout]
fileSizeCompressed
requested fileSizeCompressed
[out]
maxNumberOfBlockLength
output maxNumberOfBlockLength
[out]
dirInfoLength
output dirInfoLength
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was not successful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application requests the transmission of a response Response Pending (NRC 0x78)
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
memoryIdentifier
the configured memoryIdentifier
[out]
memoryAddress
the requested memoryAddress
[out]
memorySize
the requested memorySize
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
eventWindowTime
the requested event window time
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[in]
eventWindowTime
the requested eventWindowTime
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[in]
eventWindowTime
the requested eventWindowTime
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[in]
eventWindowTime
the requested eventWindowTime
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[in]
eventWindowTime
the requested eventWindowTime
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Verify memory request condition such as addAndLengthformatId and request length.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
MemoryCfg
the target memory configuration ptr
[in]
AddAndLenFid
the requested address and length format id
[in]
byteNumber
the requested byte number
[out]
addByteNumber
the number of byte of address
[out]
LenByteNumber
the number of byte of memory length
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
read data from signal using callouts(CS/SR/Callout)
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
OpStatus
dspData
DestBuffer
DataLength
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
[out]
checkFail
whether the source did check fails
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was unsuccessful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was unsuccessful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
read dynamic did that is defined by memory address and memory size
Sync/Async
Depending on Application
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[in]
DDDIdIndex
the index of the dynamic defined did
[in]
index
the index of the dynamic defined source did
offset
[out]
DestBuffer
the did’s output data
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was unsuccessful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
Depending on Session Type and current session level
Reentrancy
Non Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was not successful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application requests the transmission of a response Response Pending (NRC 0x78)
Called by DsdInternal_RxIndication to check general service/subService session and most of th UDS services to check did, rid, memory, etc. session.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
session
the required session
[in]
sessionNum
the required session num
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Depending on Configuration DcmSendRespPendOnRestart
Reentrancy
Non Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[inout]
pMsgContext
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was not successful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application requests the transmission of a response Response Pending (NRC 0x78)
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was not successful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application requests the transmission of a response Response Pending (NRC 0x78)
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was not successful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
This function checks whether the current security State is supported.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
security
the requested security
[in]
securityNum
the requested security number
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was not successful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application requests the transmission of a response Response Pending (NRC 0x78)
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Called by UDS 0x10, 0x29 and 0x27 to notify the session/security/authenticationState change so as to check the access right again. Stop the periodic transmission if access right is lost.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Called by UDS 0x2F and 0x10 to notify session/security/authenticationState change and call returnControlToEcu accordingly if it is no long supported in current status.
Called by UDS 0x2C, 0x3D, 0x23, 0x34, 0x35 to check whether the input memoryAdd and memorySize is valid.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
MemoryCfg
the target memory configuration ptr
[in]
AddAndLenFid
the requested address and length format id
[in]
byteNumber
the requested address and length format id
[in]
reqData
the input request data
[out]
MemoryIdentifier
the configured memoryIdentifier (if available)
[out]
MemoryAddress
the extracted memoryAddress from input data
[out]
MemorySize
the extracted MemorySize from input data
memoryAccess
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was not successful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application requests the transmission of a response Response Pending (NRC 0x78)
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was not successful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application requests the transmission of a response Response Pending (NRC 0x78)
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Called by UDS 0x22, 0x24, 0x2A, 0x2C and 0x2E to check whether this did is supported to read/write in the current session/security/mode/authenticationState.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
ConnectionId
the current connectionId
[in]
Did
the input did
[out]
DcmDspDidReadWrite
did’s read/write configuration
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
This function gets the configured did index, also applying to rangeDid and OBDDid.
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
Did
the input did
[out]
didType
the type of did
[out]
DidIndex
the did configuration index
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Called by UDS 0x22/0x2A/0x2F to read data in did’s signals.
Sync/Async
Depending on Application
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[in]
DidIndex
the input did index
[out]
DestBuffer
address to output the signal data
[out]
DataLength
the data length of did (only for dynamic ones)
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Called by UDS 0x22 and 0x2A to read data of a dynamic did.
Sync/Async
Depending on Application
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
OpStatus
Indicates the current operation status
[in]
ConnectionId
the current connection
[in]
DDDIdIndex
the index of the dynamic defined did
[out]
DestBuffer
the did’s output data
[inout]
BufSize
When the function is called this parameter contains the maximum number of data bytes that can be written to the buffer. The function returns the actual number of written data bytes in this parameter.
[out]
checkFail
whether the source did check fails
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Return type
Std_ReturnType
Return values
Name
Description
E_OK
Request was successful
E_NOT_OK
Request was unsuccessful
DCM_E_PENDING
Request is not yet finished
DCM_E_FORCE_RCRRP
Application request the transmission of a response Response Pending (NRC 0x78)
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
This function is called by Dcm_MainFunction when UDS 0x28 is configured with modeRule, it checks whether the mode rule is no longer effective and enables the communication again.
Message-related information for one diagnostic protocol identifier. The pointers in pMsgContext shall point behind the SID.
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
called by DsdInternal_RxIndication to verify service and subfunction authentication
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
ConnectionId
the current connection
[in]
subRoleRef
the input role ref
[in]
subRoleRefNum
the number of input role ref
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
called by UDS 0x22, 0x24, 0x2A, 0x2C, 0x2E, 0x2F to check did authentication
Sync/Async
TRUE
Reentrancy
Reentrant
Parameters
Dir
Name
Description
[in]
ConnectionId
the current connection
[in]
Did
the input did
[in]
didReadWrite
the input did read/write info
[in]
didControl
the input did control info
[out]
ErrorCode
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
If the operation <Module>_<DiagnosticService> returns value E_NOT_OK, the Dcm module shall send a negative response with NRC code equal to the parameter ErrorCode parameter value.
Configure some general information such as the main function cycle. Some configuration items will be described in detail later, and you can refer to the subsequent descriptions.
DcmDDDIDStorage: 开启后支持存储动态DID定义信息
DcmDDDIDStorage: When enabled, it supports storing dynamic DID definition information.
DcmDevErrorDetect: 开启后开启错误检测
DcmDevErrorDetect: When enabled, error detection is turned on.
DcmEnableSecurityEventReporting: 开启后开启IdsM错误报告
DcmEnableSecurityEventReporting: When enabled, IdsM error reporting is turned on.
DcmHeaderFileInclusion: 可以自定义头文件包含
DcmHeaderFileInclusion: Custom header file inclusion is allowed.
DcmRespondAllRequest: When enabled, it supports responding to all requests; otherwise, it will not respond to requests with SID in the range of 0x40-0x7F/0xC0-0xFF.
DcmS3ServerTimeoutOverwrite: 可以改写默认的S3Server超时时间
DcmS3ServerTimeoutOverwrite: It can overwrite the default S3Server timeout period.
DcmTaskTime: Dcm主函数周期时间
DcmTaskTime: The cycle time of the Dcm main function.
DcmVersionInfoApi: 开启后提供获取版本信息的接口
DcmVersionInfoApi: When enabled, an interface for obtaining version information is provided.
DcmVinRef: 在Dcm_GetVin时获取VIN使用的Did
DcmVinRef: The Did used to obtain VIN when calling Dcm_GetVin.
When using user-defined Callout interfaces, the declarations of related functions are usually located in other files. It is necessary to include the corresponding header files in Dcm_Cfg.c. This can be done by adding them in DcmGeneral/DcmHeaderFileInclusion. As shown in the figure, click the “+” sign to add the corresponding file, and just enter the file name directly.
In a multi-core system, Dcm is mainly distributed in one partition. Satellites need to be deployed in other partitions to send messages only when messages need to be sent via different buses. Therefore, in a multi-core scenario, it is necessary to assign the master core to a specified partition. As shown in the figure, you can directly select the corresponding partition.
Enable IdsM reporting to report errors to specified IdsM events under corresponding circumstances. As shown in the figure, first turn on the DcmEnableSecurityEventReporting switch, then configure DcmSecurityEventRefs and set the required events.
Select DcmDslProtocolType. For the protocol type, UDS corresponds to DCM_UDS_ON_XXX, and OBD corresponds to DCM_OBD_ON_XXX.
PERIODICTRANS and ROE correspond to the processing protocols of Service 2A and Service 86 respectively. In the new version, the processing of Service 86 is no longer merged with the regular protocol but has an independent protocol.
The processing of Service 2A is still associated in DcmDslMainConnection, and you can choose not to create an independent protocol. The configuration related to the service will be introduced in detail later.
Optionally configure DcmTimStrP2ServerAdjust/DcmTimStrP2StarServerAdjust. These two configuration items are used to adjust the time of P2Server and P2StarServer.
For example, if P2Server is 50ms and P2ServerAdjust is set to 5ms, then Dcm will try to send NRC 0x78 at 45ms. This is to avoid exceeding P2Server due to extra time spent on the bus.
Configure DcmDemClientRef. Currently, it is a mandatory configuration item, and it needs to be associated with DemClient for use in the interface to obtain the data content of the corresponding client.
Configure DcmDslBuffer, specify its size, and associate it in DcmDslProtocolRxBufferRef and DcmDslProtocolTxBufferRef. Note that the RxBuffer and TxBuffer of the same protocol cannot be the same.
Configure DcmDslProtocolSIDTable and select the corresponding service table. After selection, the protocol can only request the services configured in the service table.
For protocol types other than PERIODICTRANS, it is necessary to configure DcmDslMainConnection for receiving diagnostic requests and sending diagnostic replies.
At least one DcmDslProtocolRx needs to be configured. Select the addressing mode through DcmDslProtocolRxAddrType, and select the corresponding RxPdu through DcmDslProtocolRxPduRef, which will be associated with the PDU of the IF module through PduR routing.
Generally speaking, it is necessary to configure one Rx for physical addressing and one Rx for functional addressing.
For protocols that need to reply, it is necessary to configure one DcmDslProtocolTx. Select the corresponding TxPdu through DcmDslProtocolTxPduRef, which will be associated with the PDU of the IF module through PduR routing.
After configuration, under the standard RTE, the interface will be output to the packaging file and provided to the SWC. Under non-RTE, it will be a callout interface, which is used to ask for permission when starting and stopping the protocol. Multiple ones can be configured, and when there are multiple, they will be called one by one in sequence.
DcmDsdServiceRequestManufacturerNotification and DcmDsdServiceRequestSupplierNotification can be configured. After configuration, under the standard RTE, the interfaces will be output to the packaging file and provided to the SWC; under non-RTE, they will be callout interfaces.
They are used to call the indication interface when a request is received to check whether to accept the service request, and call the Confirmation interface after the request processing is completed to notify the result of the service processing completion.
Configure DcmDsdService and provide DcmDsdSidTabServiceId. For internally implemented services, there is no need to configure DcmDsdSidTabFnc; if configured, it is considered that the internal implementation is not used, and instead, a custom implementation is adopted.
Whether to enable the service can be controlled by configuring DcmDsdServiceUsed. There are also other places such as DcmDspDid where the enablement can be configured, which will not be repeated later.
DcmDsdSidTabSubfuncAvail is usually not configurable and is determined by whether the service has sub-services. For non-standard services, it can be selected manually.
DcmDsdSidTabAddressingFormat can select the addressing mode, which defaults to physical + functional addressing. The service can only be requested in the corresponding addressing mode.
DcmDsdSidTabP4ServerMax为可选配置
DcmDsdSidTabP4ServerMax is an optional configuration.
DcmDsdServiceRoleRef / DcmDsdSidTabSecurityLevelRef / DcmDsdSidTabSessionLevelRef correspond to the requirements for security authentication, security level, and session level respectively. The service can only be requested when the conditions are met; otherwise, the corresponding NRC will be sent.
可选配置DcmDsdSidTabModeRuleRef,配置后服务仅在对应模式规则成立时可以请求。
Optionally configure DcmDsdSidTabModeRuleRef. After configuration, the service can only be requested when the corresponding mode rule is satisfied.
Similarly, the conditions that need to be met can be selected through DcmDsdSubServiceRoleRef / DcmDsdSubServiceSecurityLevelRef / DcmDsdSubServiceSessionLevelRef.
In DID, PID, and Routine, endianness can be configured through DcmDspDataEndianness, DcmDspPidDataEndianness, and DcmDspRoutineSignalEndianness (configurable in the In/Out Signals of requestResult/Start/Stop).
在未配置时根据DcmDspDataDefaultEndianness的配置决定
If not configured, it is determined by the configuration of DcmDspDataDefaultEndianness.
In addition to the default endianness, DSP has some other general configurations. For specific contents, please refer to the detailed description of each configuration item.
When configuring UDS 0x10 and its corresponding sub-services, the corresponding DcmDspSessionRow must be configured, and the DcmDspSessionLevel and sub-service ID should be in a one-to-one correspondence.
In addition, it is necessary to configure the P2Server and P2StarServer times for the session, as well as the relationship between the session and the boot. For regular sessions, select DCM_NO_BOOT; for those that need to jump to the boot, select BOOT-related options; and for those that need to be replied by the APP, select RESPAPP-related options.
When configuring UDS 0x27 and its corresponding sub-services, the corresponding DcmDspSecurityRow must be configured. The DcmDspSecurityLevel and sub-service ID correspond according to the rule: ( (SubFunction + 1) / 2, rounded down ) == DcmDspSecurityLevel.
除此之外通常需配置Seed/Key长度,可尝试次数,超过次数后延迟时间,上电延迟时间。
In addition, it is usually necessary to configure the Seed/Key length, the number of allowed attempts, the delay time after exceeding the number of attempts, and the power-on delay time.
还有接口相关配置,可以通过DcmDspSecurityUsePort选择接口实现方式。
There are also interface-related configurations, and the interface implementation method can be selected through DcmDspSecurityUsePort.
Whether read/write counting is required can be controlled through DcmDspSecurityAttemptCounterEnabled, and whether AccessDataRecord is needed and its length can be determined by configuring DcmDspSecurityADRSize.
When configuring UDS 0x11 and its corresponding sub-services, the corresponding DcmDspResetRow must be configured, and the DcmDspEcuResetId and sub-service ID should be in a one-to-one correspondence.
还可以配置DcmResponseToEcuReset决定复位服务的回复是在复位前还是在复位后。
In addition, DcmResponseToEcuReset can be configured to determine whether the response to the reset service is sent before or after the reset.
These UDS services operate on the configured DID. When making a request, the DID is provided, and it should have a one-to-one correspondence with DcmDspDidIdentifier (except for the 0x2A service, which only provides the latter byte of the DID, with the former byte always being 0xF2).
The DID also needs to have its length configured through DcmDspDidSize and the interface implementation method configured through DcmDspDidUsePort, with the following options:
The DID also needs to be associated with a DcmDspDidInfo, which provides permissions for reading/writing/controlling the DID. Details will be described later.
A DID can be configured with multiple DcmDspDidSignals. Each Signal needs to provide its Offset and the associated DcmDspData, which will be described later.
A DidSignal needs to be associated with DcmDspData. For the Data, it is necessary to configure its data type and interface type. If it is a queue, its length also needs to be configured.
接口类型(DcmDspDataUsePort)提供以下配置:
The interface type (DcmDspDataUsePort) provides the following configurations:
USE_DATA_ASYNCH_CLIENT_SERVER: Uses CS communication, no need to configure any interfaces, asynchronous communication, and the interface parameters carry OpStatus.
USE_DATA_ASYNCH_CLIENT_SERVER_ERROR: Uses CS communication, no need to configure any interfaces, asynchronous communication, and the interface parameters carry OpStatus and ErrorCode.
USE_DATA_SYNCH_CLIENT_SERVER: 走CS通信,无需配置任何接口,同步通信
USE_DATA_SYNCH_CLIENT_SERVER: Uses CS communication, no need to configure any interfaces, synchronous communication.
USE_DATA_SENDER_RECEIVER: 走SR通信,无需配置任何接口
USE_DATA_SENDER_RECEIVER: Uses SR communication, no need to configure any interfaces.
USE_DATA_SENDER_RECEIVER_AS_SERVICE: Uses SR communication, no need to configure any interfaces, and the SR interface has the IsService option checked.
USE_DATA_ASYNCH_FNC: Related interfaces need to be configured under corresponding conditions, asynchronous communication, and the interface parameters carry OpStatus.
USE_DATA_ASYNCH_FNC_ERROR: Related interfaces need to be configured under corresponding conditions, asynchronous communication, and the interface parameters carry OpStatus and ErrorCode.
USE_DATA_SYNCH_FNC: 在对应条件下需配置相关接口,同步通信,后续说明了相应条件
USE_DATA_SYNCH_FNC: Related interfaces need to be configured under corresponding conditions, synchronous communication, and the corresponding conditions are explained later.
USE_ECU_SIGNAL: When there is no IO abstraction module in the project, it is necessary to configure DcmDspDataEcuSignal and DcmDspDataReadEcuSignal; otherwise, no configuration is required.
Some interfaces will carry OpStatus and ErrorCode regardless of whether synchronous/asynchronous/error-carrying is selected. For details, please refer to the encapsulation requirements in the specification.
These UDS services perform read operations on the configured DID, and the corresponding DID must have read permissions. Permissions are obtained by configuring DcmDspDidRead in the associated DcmDspDidInfo.
可以通过配置调整读取所需的权限(会话/安全级/安全认证/模式规则)
The permissions required for reading (session/security level/security authentication/mode rules) can be adjusted through configuration.
DcmDspDidUsePort can be configured as needed. If it is configured as USE_DATA_ELEMENT_SPECIFIC_INTERFACES, a reading interface must be provided in the corresponding DcmDspData. Whether manual configuration of the interface is required depends on DcmDspDataUsePort.
The UDS 0x2E service performs write operations on the configured DID, and the corresponding DID must have write permissions. Permissions are obtained by configuring DcmDspDidWrite in the associated DcmDspDidInfo.
可以通过配置调整写入所需的权限(会话/安全级/安全认证/模式规则)
The permissions required for writing (session/security level/security authentication/mode rules) can be adjusted through configuration.
DcmDspDidUsePort can be configured as needed. If it is configured as USE_DATA_ELEMENT_SPECIFIC_INTERFACES, a reading interface must be provided in the corresponding DcmDspData. Whether manual configuration of the interface is required depends on DcmDspDataUsePort.
The UDS 0x2F service performs control operations on the configured DID, and the corresponding DID must have control permissions. Permissions are obtained by configuring DcmDspDidControl in the associated DcmDspDidInfo.
可以通过配置调整写入所需的权限(会话/安全级/安全认证/模式规则)
The permissions required for writing (session/security level/security authentication/mode rules) can be adjusted through configuration.
还可以配置DcmDspDidControlMask,其大小,以及各个控制模式的支持情况。
In addition, DcmDspDidControlMask, its size, and the support status of various control modes can also be configured.
Currently, 0x2F can only be performed through the interface/CS method. Therefore, DcmDspDidUsePort can only select USE_DATA_ELEMENT_SPECIFIC_INTERFACES, and a reading interface must be provided in the corresponding DcmDspData. Whether manual configuration of the interface is required depends on DcmDspDataUsePort.
DcmDspAuthenticationDefaultSessionTimeOut: After configuration, if there is no diagnostic request exceeding this time in the default session, it will switch to the unauthenticated state.
DcmDspAuthenticationWhiteListDIDMaxSize / DcmDspAuthenticationWhiteListRIDMaxSize / DcmDspAuthenticationWhiteListServicesMaxSize: The maximum length for storing whitelisted DID / RID / Service.
DcmDspAuthenticationPersistStateModeRuleRef: A mode rule can be selected, and the authentication state is stored in the NvMBlock only when the rule is passed.
DcmDspAuthenticationWhiteListDIDElementRef / DcmDspAuthenticationWhiteListRIDElementRef: If whitelisting for DID and RID is required, these must be configured.
The role in the unauthenticated state and the role required for each service/DID/RID are selected from DcmDspAuthenticationRow, which should be configured when necessary.
Configure the size of the write buffer through DcmSecureCodingDataBufferSize to store the data to be written temporarily. Note that the size here must include the DID itself (2 bytes each)
执行写入后不会实际进行写入,需执行0x31服务进行验证,通过后执行写入
The actual writing will not be performed immediately after execution. The 0x31 service needs to be executed for verification, and the writing will be performed after successful verification
The optional configuration DcmDspClearDTCCheckFnc, when configured, will call this callout interface to check whether clearing is allowed. This interface is a pure callout interface and is not currently connected to the SWC side according to requirements.
可选配置DcmDspClearDTCModeRuleRef,在相关模式规则通过后才允许清除。
The optional configuration DcmDspClearDTCModeRuleRef allows clearing only after the relevant mode rules are passed.
DcmDspComControlAllChannel: This configuration corresponds when the subnetNumber is 0, which controls all connected networks and polls all configured AllChannels.
DcmDspComControlSpecificChannel: This configuration corresponds when the subnetNumber is 1-0xE. It controls the specified network by matching the requested subnetNumber with the configured DcmDspSubnetNumber. When the subnetNumber is 0xF, it controls the network that currently receives the request.
DcmDspComControlSubNode: Corresponding to the handling of sub-services 04/05, it controls the specified network by matching the requested nodeIdentificationNumber with the configured DcmDspComControlSubNodeId.
DcmDspComControlSetting: When configuring DcmDspComControlCommunicationReEnableModeRuleRef, the previously closed network will only be restored if the associated mode rule is passed.
The required session level/security level/mode rules can be configured. Currently, they can only be referenced in routines, and the scope of use may be expanded in subsequent specifications.
DcmDspControlDTCSettingReEnableModeRuleRef: After configuration, stopping DTC recording is only allowed when the corresponding mode rule is passed. If the rule is no longer passed, DTC recording will be resumed.
DcmDspDidRangeHasGaps: When configured as TRUE, the DcmDspDidRangeIsDidAvailableFnc interface needs to be provided to determine whether the requested DID supports reading based on the DID. When configured as FALSE, it is not required, and all DIDs within the range are considered readable.
DcmDspDidRangeUsePort: When configured as TRUE, it is implemented in the form of a CS interface through RTE. In this case, the above interfaces do not need to be configured, and the interfaces will be provided as appropriate.
DcmDspDidRangeInfoRef:关联DcmDspDidInfo用来检查读写权限
DcmDspDidRangeInfoRef: Associated with DcmDspDidInfo to check read and write permissions.
The supported AddressAndLengthFormatIdentifier, the memory range supporting read and write operations, as well as the required session level, security level, and mode rules can be configured.
In the UDS 0x23 service, memory reading is performed according to this configuration; 0x3D is for memory writing; and 0x2C allows defining a dynamic DID as reading a segment of memory content.
DcmDspAddressAndLengthFormatIdentifier: The supported AddressAndLengthFormatIdentifier can be configured. If not configured, all are considered supported; otherwise, only those provided in the list are supported.
DcmDspMemoryIdInfo: DcmDspMemoryIdValue can be configured, which is provided as a parameter to the relevant memory read/write interfaces (0 if not configured). It provides the upper and lower limits for memory reading and writing, as well as the required session level, security level, and mode rules. Multiple groups can be configured.
DcmDspReadMemoryRangeInfo / DcmDspWriteMemoryRangeInfo: Configured under DcmDspMemoryIdInfo, multiple groups can be set up. They need to provide the upper and lower limits of the memory, as well as the required session level, security level, and mode rules. These respectively represent the information for reading and writing, and multiple groups can be configured.
The configuration structure is completely consistent with DcmDspMemory. It is only provided for the UDS 0x34/0x35 services for flash-related content, so it is distinguished from DcmDspMemory in terms of configuration.
Used for periodic transmission in the UDS 0x2A service. It can be configured with the maximum number of simultaneous schedulings, the rates of fast/medium/slow modes, the maximum number of simultaneous transmissions, and the scheduling type.
DcmDspMaxPeriodicDidScheduler:最大同时调度数量
DcmDspMaxPeriodicDidScheduler: The maximum number of simultaneous schedulings.
DcmDspPeriodicTransmissionFastRate / DcmDspPeriodicTransmissionMediumRate / DcmDspPeriodicTransmissionSlowRate: The rates of fast/medium/slow modes, which must be multiples of the main function cycle time.
DcmDspPeriodicTransmissionMaxPeriodicFast/Medium/SlowTransmissions: The maximum number of simultaneous transmissions in fast/medium/slow modes. If not configured, there is no limit.
DcmDspPeriodicTransmissionSchedulerType: Configured as type 1. If Dcm is waiting for the transmission confirmation of the previous PDID when transmission is needed, it will try again in the next main function cycle. If configured as type 2, it will wait until the next transmission cycle to send.
Configure the PIDs used for OBD 0x01/0x02 services. It is necessary to configure their ID, size, the service they belong to, and their Data (including position, size, data type, interface, and interface type).
DcmDspPid具体可以配置以下内容:
The specific configurable contents of DcmDspPid are as follows:
DcmDspPidIdentifier:PID的ID
DcmDspPidIdentifier: The ID of the PID
DcmDspPidService:所属的服务,可以是01/02/both
DcmDspPidService: The service it belongs to, which can be 01/02/both
DcmDspPidDataUsePort: Type of data reading interface. If it is not USE_DATA_SYNCH_FNC, there is no need to configure DcmDspPidDataReadFnc, and it will directly go through RTE; otherwise, it needs to be configured.
DcmDspReadDTCInformationSupportedObdUdsDtcSeparation: When enabled, the DTCFormat will be set to DEM_DTC_FORMAT_OBD_3BYTE when the Dem_SelectDTC interface is called.
DcmDspRequestControlInfoByte: If configured, it will be provided in the UDS 0x31 diagnostic response when requesting OBD range RIDs and processing them in OBD mode.
It must be configured when setting up the UDS 0x38 service, providing the data length of service requests and responses as well as the way to use the port.
DcmRequestFileTransferFileSizeOrDirInfoParameterLength: The length of fileSizeUncompressedOrDirInfoLength and fileSizeCompressed in the response, which is also provided in the response.
DcmRequestFileTransferLengthFormatIdentifier: Provided in the response, corresponding to the number of bytes of maxNumberOfBlockLength in the response.
DcmRequestFileTransferMaxFileAndDirName: Must be configured when DcmRequestFileTransferUsePort is TRUE, and is used for the length of parameters in the CS interface.
It must be configured when setting up the UDS 0x86 service, providing configurations related to the maximum number of simultaneous events that can be processed, DID data length, ROE scheduling cycle, and storage location.
DcmDspRoutineP4ServerMax: The P4 processing time of this Routine; if this time is exceeded, the processing of the service will stop. This configuration item has higher priority than the P4ServerMax configuration of the service.
The configurations of DcmDspStartRoutine / DcmDspStopRoutine / DcmDspRequestRoutineResults are identical except for the difference in DcmDspStartRoutineRestartEnabled; the rest are merely naming differences. Therefore, only StartRoutine will be described here as an example, and the others will not be repeated.
Configuration of DcmDspStartRoutine:
DcmDspStartRoutineRestartEnabled: When enabled, repeated requests for StartRoutine are allowed; otherwise, a request for StopRoutine is required before making another request, otherwise, NRC 0x24 will be returned.
DcmDspStartRoutineCommonAuthorizationRef: The permissions required (including security level, session level, and mode rules) when requesting the StartRoutine of this Routine.
DcmDspStartRoutineRoleRef: 请求该Routine的安全认证要求
DcmDspStartRoutineRoleRef: The security authentication requirements for requesting this Routine.
DcmDspStartRoutine can be configured with DcmDspStartRoutineIn and DcmDspStartRoutineOut. After configuration, a DcmDspStartRoutineIn/OutSignal will be automatically configured (at least one). The configurations of InSignal and OutSignal are completely the same, so only InSignal will be described here.
DcmDspRoutineSignalEndianness: Used for endianness processing. If not configured, it will use the configuration of DcmDspDataDefaultEndianness by default.
DcmPagedBufferEnabled: When enabled, the paged transmission function is activated, and DcmDslProtocolMaximumResponseSize needs to be configured at this time.
DcmModeCondition: The conditions that need to be met. Conditions such as equal to or not equal to can be set, and then select the mode group on the BSW/SWC side, or an implementation data type and a corresponding value, which will be reflected in the encapsulation after configuration.
DcmConditionType: 配置条件为为==, !=, <=, <, >=, >
DcmConditionType: Configure the condition as ==, !=, <=, <, >=, >
DcmBswModeRef: BSW侧的模式声明组
DcmBswModeRef: Mode declaration group on the BSW side
DcmSwcModeRef: SWC侧的模式声明组
DcmSwcModeRef: Mode declaration group on the SWC side
DcmSwcSRDataElementRef: Implementation data type on the SWC side. Since DcmSwcDataElementValue only provides two assignment methods, currently only basic data type arrays and basic data types are supported.
DcmSwcDataElementValue: Can select DcmSwcElementArray or DcmSwcElementPrimitive. For Array, multiple elements need to be configured, providing Index and value; for Primitive, only the value needs to be provided.
DcmModeRule: Configure rules, which can set the logicalOperator as AND/OR, the corresponding Nrc value when not passed, and the Argument list (which can be ModeCondition or ModeRule). Note that it cannot reference itself.
DcmLogicalOperator: No need to configure when there is only one argument; otherwise, it must be configured. For AND, all arguments need to pass; for OR, at least one argument needs to pass.
DcmModeRuleNrcValue: 条件不满足时指定的Nrc。
DcmModeRuleNrcValue: The specified Nrc when the condition is not met.