定义请求消息中memoryAddress(内存地址)和memorySize(内存大小)这两个参数所使用的字节数。(Defines the number of bytes used for the memoryAddress and memorySize parameters in the request message)。
Concurrent TesterPresent
UDS服务TesterPresent中,若设置了抑制正响应消息指示位(suppressPosRspMsgIndicationBit,对应请求格式为3E 80),且该服务通过功能寻址(functional addressing)接收,则此服务也被称为keep-alive logic。(In the UDS service TesterPresent, if the suppress positive response message indication bit (suppressPosRspMsgIndicationBit, corresponding to the request format 3E 80) is set, and the service is received via functional addressing, then this service is also referred to as keep-alive logic)
Functional Addressing
诊断通信模型指:在特定通信网络中,一组或所有节点从一个发送节点接收消息的模型(即1-n通信)。(Diagnostic communication model refers to: in a specific communication network, a model where a group of or all nodes receive messages from one sending node (i.e., 1-n communication))。
该模型也可称为“broadcast”或“multicast”。OBD通信始终以Functional Addressing模式进行。(This model can also be called “broadcast” or “multicast”. OBD communication always operates in Functional Addressing mode)。
Physical Addressing
诊断通信模型指:在特定通信网络中,一个节点从一个发送节点接收消息的模型(即 1-1 通信)。(Diagnostic communication model refers to: in a specific communication network, a model where one node receives messages from one sending node (i.e., 1-1 communication))
该模型也可称为“unicast”。(This model can also be called “unicast”)。
UDS Service
此术语指ISO 14229-1[2]中定义的UDS Service。(This term refers to the UDS Service defined in ISO 14229-1 [2])
OBD Service
此术语指ISO 15031-5[4]中定义的OBD Service。(This term refers to the OBD Service defined in ISO 15031-5 [4])
OBD UDS DTC separation
该功能针对基于SAE J1979-2的UDS通信,将上报与非J1979-2的UDS通信不同的3字节DTC编号。(This function, for UDS communication based on SAE J1979-2, will report a different 3-byte DTC number compared to non-J1979-2 UDS communication)
periodic transmission rate
时间间隔值定义周期性数据标识符(data identifier)传输的两次调用之间的时间间隔。(The time interval value defines the time interval between two invocations of periodic data identifier transmission)
该值是特定于配置的,并且针对快速、中等和慢速周期性数据传输分别设有不同的值。(This value is configuration-specific and has different values for fast, medium, and slow periodic data transmission respectively)
配置的值始终是Dcm主任务时间的整数倍。(The configured value is always an integer multiple of the Dcm main task time)
Dcm provides general interfaces to implement diagnostic services, enabling communication and data interaction with diagnostic tools using standard UDS (ISO14229-1)/OBD (SAEJ1979, ISO15031-5) protocols and independent network-related protocols (ISO15765-3, 15765-4).
Dcm为车辆在开发、生产和后续客户服务过程中提供诊断车辆内部信息的功能。
Dcm provides the capability to diagnose internal vehicle information during development, production, and subsequent customer service processes.
In the AUTOSAR architecture, Dcm is located in the communication services layer and is applicable to any network bus (CAN/FLEXRAY/LIN/MOST, etc.). Therefore, implementations specific to the network environment reside in other modules (such as CanTp/DoIP, etc.).
Dcm performs actual data transmission and reception by calling the general interfaces for independent network buses provided by PduR or by providing callback interfaces. PduR determines the bus type used for message transmission and reception based on configuration.
Upon receiving a diagnostic request, Dcm analyzes the content and determines its correctness according to protocol requirements. If incorrect, it replies with the corresponding NRC; if correct, it replies with a positive response.
During service processing, Dcm may involve acquiring external data (e.g., DTC status, DID data, RID routines, etc.), which requires interaction with other BSW modules or SWCs (via 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 resides in the communication services layer of the AUTOSAR architecture, with the PduR module beneath it and the RTE above it.
Communicates with the TP module through the PduR module to receive diagnostic requests in TP mode. The process starts with PduR calling Dcm_StartOfReception, followed by Dcm_CopyRxData to copy received data, and concludes with Dcm_TpRxIndication to complete reception.
功能寻址并发3E80 Functional addressing for concurrent 3E80¶
Communicates with the TP module through the PduR module to send diagnostic responses in TP mode. The process starts with Dcm calling PduR_DcmTransmit, followed by PduR calling Dcm_CopyTxData to copy transmission data, and concludes with Dcm_TpTxConfirmation to complete transmission.
Pass in metaData during TP reception, Dcm obtains SA and TA. When sending a diagnostic response, swap SA and TA, swaps SA and TA and includes metaData in the transmission.
If a diagnostic response cannot be sent within the P2Server time (service still processing or DCM_E_PENDING replied), sends NRC 0x78 to inform the diagnostic tool that more time is required, with the response sent later.
The first Pending must be sent within P2Server time, with subsequent Pending messages sent at P2StarServer intervals.
The maximum number of NRC 0x78 transmissions can be configured. Exceeding this limit results in NRC 0x10 transmission and termination of the current diagnostic request processing.
Triggers paged transmission when content length exceeds allocated TxBuffer size (typically for UDS 0x19 and 0x22 services). Partial data is first acquired and transmission initiated.
Subsequently, portions of TxBuffer can be released during copyTxData completion, enabling acquisition of subsequent data until transmission is complete.
Applications (via application callout interfaces or custom diagnostic services) can immediately initiate a Pending NRC 0x78 response by replying DCM_E_FORCE_RCRRP, regardless of P2Server timeout status.
Implements UDS 0x27 service internally for security level control, enabling session switching (initially LOCKED). Security levels can be independently configured (determining seed length, attempt counts, unlock methods, etc.), and services, DIDs, RIDs supported under each security level can be defined through configuration.
Implements UDS 0x10 service internally for session control, enabling session switching (typically including default session, programming session, extended session, etc.). Sessions can be independently configured, and services, DIDs, RIDs supported under each session can be defined through configuration.
Implements UDS 0x29 service internally for security authentication, enabling authentication with information security modules (Csm, KeyM). Services, DIDs, RIDs supported under each security authentication Role can be defined through configuration.
Monitors timeout conditions based on main function cycle, enabling P2Server/S3Server timeout implementation.
S3Server can be configured to determine duration Dcm maintains non-default session without external requests, reverting to default session upon timeout.
P2Server and P2StarServer can be configured to determine timing for initial and subsequent NRC 0x78 transmissions.
Supports protocol parallelism without shared buffers in default session, enabling multiple protocols to simultaneously transmit/receive diagnostic messages and process diagnostic services. Protocols operate independently with separate management units.
Parallelism is not supported in non-default sessions or between protocols sharing buffers. Higher-priority protocols preempt lower-priority ones, with preempted protocols immediately canceling current diagnostic request processing, including message transmission/reception.
ComM can set Dcm into corresponding communication modes by calling respective interfaces (Dcm_ComM_NoComModeEntered/Dcm_ComM_SilentComModeEntered/Dcm_ComM_FullComModeEntered), corresponding to: disable transmission/reception, receive-only, and enable transmission/reception.
Performs general checks on requested diagnostic services/sub-services based on the configured service table. These checks primarily include manufacturer/supplier permission verification, service/sub-service support validation, confirmation of specified session level, security level, security authentication, and mode rule compliance. If a sub-service is present, it also verifies that the length is at least 2 bytes, among other general validations.
Processes requests and transfers them to DSP according to standard interface parameters, then receives responses from DSP, assembles them, and prepares for transmission.
Diagnostic service requests with sub-services support positive response suppression. By setting bit 7 of the sub-service to 1, Dcm is informed that no positive response is required for this diagnostic request, such as in the case of 3E80.
Under functional addressing, NRC 0x11/0x12/0x31/0x7E/0x7F do not trigger diagnostic response transmission, and the diagnostic service processing is terminated directly.
After obtaining transmission confirmation from DSP, calls the Confirmation Callout interface to notify the application of the diagnostic service processing result (positive response sent successfully/positive response transmission failed or suppressed/negative response sent successfully/negative response transmission failed or suppressed).
The following UDS services are internally implemented in accordance with the AUTOSAR specification, all referencing ISO 14229-1. For specific logic, please refer to the relevant documentation. Some services specified by AUTOSAR are not implemented; refer to subsequent deviations for details:
The following OBD services are internally implemented in accordance with the AUTOSAR specification, all implemented following ISO 15031-5. For specific logic, please refer to the relevant documentation:
Implements jump interaction with the Bootloader through internally implemented 0x10/0x11 services. By calling the Dcm_SetProgConditions interface, it sets information such as received service requests and whether they are programming requests.
The Bootloader side can access this information to determine whether to send diagnostic responses and whether to perform programming actions.
Configuration determines whether data reading interfaces use user-defined callouts or SWC/RTE (selecting CS/SR/NV), and whether the interfaces themselves are synchronous or asynchronous,
including whether they contain ErrorCode, etc. Depending on the configuration, the parameters of the interfaces that Dcm needs to call (interfaces to be implemented by the application) will vary.
Some services themselves or service-related variables require NvM for storage read/write operations. They will reference NvM blocks and perform operations such as reading, writing, and querying block status through standard interfaces.
This function allows specifying certain DIDs and a specific RID. Before initiating writes to these DIDs, the 29 04 service must be executed first to send certificates. When executing the 2E service for writing, the data will not be written directly, but temporarily stored. Later, when executing the startRoutine of the specified RID, certificate verification will be performed. After successful verification, these DIDs will be written.
The deviations described here indicate differences between the current implementation and the AUTOSAR R23-11 requirements. For restrictions inherent to the AUTOSAR standard itself, refer to Chapter 4 of [1].
Nested data types (CompositePool) for DidSignal/RoutineSignal conflict with encapsulation requirements. Since conventional DspData/Routine types generally satisfy application needs, this feature is temporarily unimplemented.
The following SWS requirements are involved:
Service table associations are defined within the configuration, eliminating the need for association during protocol initialization. The configuration can be directly accessed when required, hence this feature is temporarily unimplemented.
This involves SWS requirement SWS_Dcm_00035.
配置(configuration)
None
接口(Interface)
Dcm_Init无需涉及相关初始化操作
Dcm_Init does not need to involve relevant initialization operations.
协议并行时根据协议优先级做ComM诊断情况报告(ComM diagnostic status reporting based on protocol priority during parallelism)¶
During protocol parallelism, different protocols may originate from distinct ComM channels. Invoking ComM interfaces to report the communication status of each network during multi-protocol parallel operation is sufficient, therefore this feature is temporarily unimplemented.
This involves 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 must provide current operational status (OpStatus), during protocol parallelism, accessing the same service/interface could cause OpStatus conflicts, leading to service processing inconsistencies. The requirement therefore mandates delaying service/interface calls until parallel processing ceases.
Implementation would require state management for each service and interface unit, involving additional memory allocation and per-execution queries. In practice, such scenarios are rare and can be mitigated through application design. Consequently, this requirement is temporarily unimplemented.
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 specifies that the configuration container name of SessionRow should align with the mode name. In the current encapsulation, corresponding default names are generated for fixed SessionLevels, without adopting the SessionRow names. Only configuration names other than the fixed SessionLevels are used.
Automatically modifying container names based on sessionLevel during configuration involves configuration changes, and manual modification would be overly cumbersome. Therefore, this requirement is 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 are not present in the Det table (Sections 7.2.1-7.2.2 of the document), and their ID values are undetermined. Therefore, they are not implemented temporarily.
This involves SWS requirement SWS_Dcm_01143.
The mode group required by the specification conflicts with subsequent service component requirements. Therefore, following the service component requirements as the standard, this feature is temporarily unimplemented.
This involves SWS requirement SWS_Dcm_01327.
The mode groups required by the specification are absent in subsequent service component requirements, and mode switching scenarios related to service 86 are infrequent. Therefore, this feature is temporarily unimplemented.
The following SWS requirements are involved:
Usage scenarios employing certificates as comparison elements in mode conditions are rare. Therefore, this feature is temporarily unimplemented.
The following SWS requirements are involved:
SWS_Dcm_CONSTR_06089
SWS_Dcm_CONSTR_06090
配置(configuration)
DcmModeConditionCertificateCompareElementRef配置删除
The configuration of DcmModeConditionCertificateCompareElementRef is deleted
Defining CompuMethod calculation methods on the Dcm side is currently focused on application-level design, with no usage scenarios requiring BSW-side implementation. Therefore, this feature is temporarily unimplemented.
The following SWS requirements are involved:
Referencing one or more other DIDs presents encapsulation challenges, has mismatched requirements, and has limited usage scenarios. Therefore, this feature is temporarily unimplemented.
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 Configure DcmDspDataEcuSignal when DcmDspDataUsePort is USE_ECU_SIGNAL¶
This configuration is only required when IoHwAb is not present in the project; otherwise, it is unnecessary and automatically maps to the corresponding IoHwAb name.
This involves the SWS requirement SWS_Dcm_CONSTR_06057.
Processing 2F service in SR mode requires independent implementation and is relatively complex. Currently, the CS approach suffices, and there are no usage scenarios. Therefore, this feature is temporarily unimplemented.
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 must be considered; if not configured, the default endianness is used. Currently, uint8* is used as the parameter type, so endianness conversion is unnecessary. This requirement is temporarily unimplemented.
This involves the SWS requirement SWS_Dcm_00640.
ClientServerOperation.diagArgIntegrity currently has no usage requirements in SWC/RTE. Therefore, this requirement is temporarily unimplemented.
The following SWS requirements are involved:
Both PROXY-type interfaces and Routine Confirmation interfaces are in DRAFT status and lack usage scenarios. Therefore, these features are temporarily unimplemented.
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¶
Service 3E does not require configuration of security authentication requirements. No special handling is implemented here, hence this feature is temporarily unimplemented.
This 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, therefore this requirement is temporarily unimplemented.
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 without error reporting (If DET error reporting were implemented, as it is a development error, it would typically enter an infinite loop, making it impossible to maintain normal functionality, which contradicts the subsequent requirements. Therefore, this requirement is temporarily unimplemented).
This involves the SWS requirement SWS_Dcm_01185.
This type serves as the return value in DslInternal_ResponseOnOneEvent and DslInternal_ResponseOnOneDataByPeriodicId.
These two interfaces are internally implemented. While AUTOSAR provides recommendations, the actual interfaces differ during development and do not require this return value. Therefore, this requirement is temporarily unimplemented.
This involves the SWS requirement SWS_Dcm_00976.
This requirement is consistent with the conditions of SWS_Dcm_91063 and is redundant. Therefore, it is temporarily unimplemented.
This involves the SWS requirement SWS_Dcm_01121.
The R23 version removed this option (switching entirely to NvData). However, due to previous usage scenarios and user habits, this access method is retained here.
This configuration item is not mentioned in the requirements. Whether it differs from other protocols can be determined by configuring DcmDslProtocolTx, and corresponding processing will be performed. Therefore, no special configuration is required here.
配置(configuration)
DcmDslProtocolTransType配置项删除
The configuration item DcmDslProtocolTransType is deleted.
Currently, only address configuration in numerical ranges is supported; string definitions are not supported. There is no corresponding requirement at present, so it is temporarily unimplemented.
Corresponds 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. Therefore, it is directly deleted here.
The corresponding Dem interface can be called directly; association with DcmDspPidDataDemRef is unnecessary. Therefore, this feature is temporarily unimplemented.
配置(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 differs 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 differs 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
To support DcmDspDidusePort implementation, any DcmDspDidUsePort value other than USE_ATOMIC_BNDM satisfies the variant criteria.
[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 relates to composite and is temporarily unimplemented.
[SWS_Dcm_91052]Definition of ImplementationDataType Dcm_RequestDataIn_{Routine}_{Signal}Type
StructuredType为composite相关,暂不实现
StructuredType relates to composite and is temporarily unimplemented.
[SWS_Dcm_91042]Definition of ImplementationDataType Dcm_StartDataIn_{Routine}_{Signal}Type
StructuredType为composite相关,暂不实现
StructuredType relates to composite and is temporarily unimplemented.
[SWS_Dcm_91044]Definition of ImplementationDataType Dcm_StartDataOut_{Routine}_{Signal}Type
StructuredType为composite相关,暂不实现
StructuredType relates to composite and is temporarily unimplemented.
[SWS_Dcm_91046]Definition of ImplementationDataType Dcm_StopDataIn_{Routine}_{Signal}Type
StructuredType为composite相关,暂不实现
StructuredType relates to composite and is temporarily unimplemented.
[SWS_Dcm_91048]Definition of ImplementationDataType Dcm_StopDataOut_{Routine}_{Signal}Type
StructuredType为composite相关,暂不实现
StructuredType relates to composite and is temporarily unimplemented.
[SWS_Dcm_00690]Definition of ClientServerInterface RoutineServices_{RoutineName}
Confirmation相关内容暂不实现
Content related to Confirmation is temporarily unimplemented.
[SWS_Dcm_91072]Definition of ClientServerInterface Authentication
Variation addition condition: If Service 29 is configured and the port generation criteria associated with this interface are not met, the interface will not be generated.
[SWS_Dcm_91065]Definition of ClientServerInterface UploadDownloadServices
此处ReadFileOrDir中的Data的direction应为OUT
The direction of Data in ReadFileOrDir should be OUT.
[SWS_Dcm_91073]Definition of Port Authentication_{Connection} required by module Dcm
Variation添加条件:配置了29服务
Variation addition condition: Service 29 is configured.
[SWS_Dcm_91019]Definition of ModeDeclarationGroup DcmDiagnosticSessionControl
The {Connection} variation is removed and changed to DcmAuthenticationState. The variation is not described in requirements, and the content is identical, eliminating the need for duplicate definitions.
[SWS_Dcm_91026]Definition of ModeSwitchInterface CommunicationControlModeSwitch Interface_{ComMChannelName}
此处缺少条件,应为:
A condition is missing 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 variation’s second line, “||” should be “&&”. The variation for the controlMask parameter in operation FreezeCurrentState should be DID = ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspDid.SHORT-NAME)})
The addressing mode supported by a service can be specified by configuring DcmDsdSidTabAddressingFormat. Requests are processed and responses sent only when the addressing mode is supported.
指定动态DID定义的存储NvMBlock Specify the NvMBlock for storing dynamic DID definitions
Protocols can be configured to support queue caching (fixed queue length of 2). When a new request’s TP reception is initiated while a previous request is being received, processed, or responded to, the cached request is processed directly after the previous request completes, saving TP reception time.
Supports P4ServerMax configuration at the service/sub-service/Routine level. Once configured, processing for that service/sub-service/Routine must not exceed the P4ServerMax time; if exceeded, the service processing is immediately terminated.
NRC0x22回复时追加错误原因 Append error cause when replying with NRC0x22
Provides the engineering macro DCM_NRC22_SPECIFIC_CAUSE_CODE. When defined, a callout interface is provided with basic service information to determine the additional cause code (1 byte) included in the response.
References DcmDspWriteMemoryRangeInfo[ECUC_Dcm_00785], with only naming modifications; container content 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.
Configures general information such as main function cycle. Some configuration items are described in detail later and can be referenced in subsequent sections.
DcmDDDIDStorage: 开启后支持存储动态DID定义信息
DcmDDDIDStorage: When enabled, supports storing dynamic DID definition information.
DcmDevErrorDetect: 开启后开启错误检测
DcmDevErrorDetect: When enabled, enables error detection.
DcmEnableSecurityEventReporting: 开启后开启IdsM错误报告
DcmEnableSecurityEventReporting: When enabled, enables IdsM error reporting.
DcmRespondAllRequest: When enabled, supports responding to all requests; otherwise, does not respond to requests with SID in the range 0x40-0x7F/0xC0-0xFF.
DcmS3ServerTimeoutOverwrite: 可以改写默认的S3Server超时时间
DcmS3ServerTimeoutOverwrite: Allows overriding the default S3Server timeout period.
DcmTaskTime: Dcm主函数周期时间
DcmTaskTime: Dcm main function cycle time.
DcmVersionInfoApi: 开启后提供获取版本信息的接口
DcmVersionInfoApi: When enabled, provides an interface to obtain version information.
DcmVinRef: 在Dcm_GetVin时获取VIN使用的Did
DcmVinRef: The DID used to obtain VIN when calling Dcm_GetVin.
When using user-defined Callout interfaces, function declarations are typically located in other files and need to be included in Dcm_Cfg.c. These can be added in DcmGeneral/DcmHeaderFileInclusion, as shown in the figure. Use the + sign to add corresponding files and directly enter the file names.
In a multi-core system, Dcm is primarily distributed in one partition. Satellites are only deployed in other partitions when messages need to be sent via different buses. Therefore, in multi-core scenarios, the master core must be assigned to a specified partition, as shown in the figure. Simply select the corresponding partition.
Enable IdsM reporting to report errors to specified IdsM events under corresponding circumstances. As shown in the figure, first enable the DcmEnableSecurityEventReporting switch, then configure DcmSecurityEventRefs with the required events.
Select DcmDslProtocolType. For 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 for Service 2A and Service 86 respectively. In the new version, Service 86 processing is no longer merged with regular protocols but has an independent protocol.
Service 2A processing is still associated in DcmDslMainConnection. You can choose not to create an independent protocol. Service-related content will be described in detail later.
Optionally configure DcmTimStrP2ServerAdjust/DcmTimStrP2StarServerAdjust. These configuration items adjust P2Server and P2StarServer timing.
For example, if P2Server is 50ms and P2ServerAdjust is set to 5ms, Dcm will attempt to send NRC 0x78 at 45ms. This prevents exceeding P2Server due to additional bus time.
Configure DcmDslBuffer, specify its size, and associate it in DcmDslProtocolRxBufferRef and DcmDslProtocolTxBufferRef. Note that RxBuffer and TxBuffer for the same protocol cannot be identical.
Configure DcmDslProtocolSIDTable and select the corresponding service table. After selection, the protocol can only request services configured in the service table.
Configure at least one DcmDslProtocolRx. Select addressing mode via DcmDslProtocolRxAddrType and corresponding RxPdu via DcmDslProtocolRxPduRef, which associates with IF module PDUs through PduR routing.
Typically, configure one Rx for physical addressing and one Rx for functional addressing.
For protocols requiring responses, configure one DcmDslProtocolTx. Select corresponding TxPdu via DcmDslProtocolTxPduRef, which associates with IF module PDUs through PduR routing.
When configured, outputs interfaces to encapsulation files for SWC under standard RTE; serves as callout interfaces under non-RTE. Used to request permission when starting and stopping protocols. Multiple can be configured and will be called sequentially.
DcmDsdServiceRequestManufacturerNotification and DcmDsdServiceRequestSupplierNotification can be configured. When configured, outputs interfaces to encapsulation files for SWC under standard RTE; serves as callout interfaces under non-RTE.
Used to call indication interface when receiving requests to check service request acceptance, and call Confirmation interface after request processing completion to notify service processing results.
Configure DcmDsdService and provide DcmDsdSidTabServiceId. For internally implemented services, DcmDsdSidTabFnc need not be configured; if configured, it indicates custom implementation instead of using internal implementation.
Service enablement can be controlled by configuring DcmDsdServiceUsed. Other locations like DcmDspDid can also configure enablement, which will not be repeated later.
DcmDsdSidTabSubfuncAvail is typically non-configurable and determined by whether the service has sub-services. For non-standard services, it can be manually selected.
DcmDsdSidTabAddressingFormat selects addressing mode, defaulting 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 security authentication/security level/session level requirements respectively. Services can only be requested when conditions are met; otherwise, corresponding NRCs are sent.
可选配置DcmDsdSidTabModeRuleRef,配置后服务仅在对应模式规则成立时可以请求。
Optionally configure DcmDsdSidTabModeRuleRef. After configuration, services can only be requested when corresponding mode rules are satisfied.
Endianness can be configured in DID, PID, and Routine via DcmDspDataEndianness, DcmDspPidDataEndianness, and DcmDspRoutineSignalEndianness (configurable in requestResult/Start/Stop In/Out Signals).
在未配置时根据DcmDspDataDefaultEndianness的配置决定
If not configured, determined by DcmDspDataDefaultEndianness configuration.
Besides default endianness, DSP has other general configurations. Specific content can be referenced in each configuration item’s detailed description.
When configuring UDS 0x10 and corresponding sub-services, configure corresponding DcmDspSessionRow. DcmDspSessionLevel and sub-service ID should have one-to-one correspondence.
Additionally, configure the session’s P2Server and P2StarServer timing, and the session’s relationship with boot. Regular sessions select DCM_NO_BOOT; boot-related options for boot transitions; RESPAPP-related for APP responses.
When configuring UDS 0x27 and corresponding sub-services, configure corresponding DcmDspSecurityRow. DcmDspSecurityLevel and sub-service ID correspond according to rule: ((SubFunction+1)/2 rounded down == DcmDspSecurityLevel).
除此之外通常需配置Seed/Key长度,可尝试次数,超过次数后延迟时间,上电延迟时间。
Additionally, typically configure Seed/Key length, number of attempts, delay after exceeding attempts, and power-on delay time.
还有接口相关配置,可以通过DcmDspSecurityUsePort选择接口实现方式。
Also interface-related configurations; select interface implementation via DcmDspSecurityUsePort.
Control read/write counting via DcmDspSecurityAttemptCounterEnabled. Determine AccessDataRecord requirement and length by configuring DcmDspSecurityADRSize.
When configuring UDS 0x11 and corresponding sub-services, configure corresponding DcmDspResetRow. DcmDspEcuResetId and sub-service ID should have one-to-one correspondence.
还可以配置DcmResponseToEcuReset决定复位服务的回复是在复位前还是在复位后。
Also configure DcmResponseToEcuReset to determine whether reset service response occurs before or after reset.
These UDS services operate on configured DIDs. The request provides a DID, which should have one-to-one correspondence with DcmDspDidIdentifier (except for Service 0x2A, which only provides the last byte of the DID, with the first byte always being 0xF2).
DidSignal needs association with DcmDspData. Data requires configuration of its data type and interface type. If it is a queue, its length must be configured.
接口类型(DcmDspDataUsePort)提供以下配置:
Interface type (DcmDspDataUsePort) provides the following configurations:
USE_DATA_ASYNCH_FNC: Requires configuration of related interfaces under corresponding conditions, asynchronous communication, interface parameters carry OpStatus.
USE_DATA_ASYNCH_FNC_ERROR: Requires configuration of related interfaces under corresponding conditions, asynchronous communication, interface parameters carry OpStatus and ErrorCode.
USE_DATA_SYNCH_FNC: 在对应条件下需配置相关接口,同步通信,后续说明了相应条件
USE_DATA_SYNCH_FNC: Requires configuration of related interfaces under corresponding conditions, synchronous communication, corresponding conditions explained later.
USE_ECU_SIGNAL: Requires configuration of DcmDspDataEcuSignal and DcmDspDataReadEcuSignal when no IO abstraction module exists in the project; otherwise, no configuration required.
Some interfaces carry OpStatus and ErrorCode regardless of synchronous/asynchronous/error selection. Please refer to encapsulation requirements in the specification for details.
These UDS services perform read operations on configured DIDs. The corresponding DID must have read permission. Permission is obtained by configuring DcmDspDidRead in the associated DcmDspDidInfo.
可以通过配置调整读取所需的权限(会话/安全级/安全认证/模式规则)
Required permissions for reading (session/security level/security authentication/mode rules) can be adjusted through configuration.
Configure DcmDspDidUsePort as needed. If configured as USE_DATA_ELEMENT_SPECIFIC_INTERFACES, the corresponding DcmDspData must provide read interfaces. Whether manual interface configuration is required depends on DcmDspDataUsePort.
UDS 0x2E service performs write operations on configured DIDs. The corresponding DID must have write permission. Permission is obtained by configuring DcmDspDidWrite in the associated DcmDspDidInfo.
可以通过配置调整写入所需的权限(会话/安全级/安全认证/模式规则)
Required permissions for writing (session/security level/security authentication/mode rules) can be adjusted through configuration.
Configure DcmDspDidUsePort as needed. If configured as USE_DATA_ELEMENT_SPECIFIC_INTERFACES, the corresponding DcmDspData must provide read interfaces. Whether manual interface configuration is required depends on DcmDspDataUsePort.
UDS 0x2F service performs control operations on configured DIDs. The corresponding DID must have control permission. Permission is obtained by configuring DcmDspDidControl in the associated DcmDspDidInfo.
可以通过配置调整写入所需的权限(会话/安全级/安全认证/模式规则)
Required permissions for writing (session/security level/security authentication/mode rules) can be adjusted through configuration.
还可以配置DcmDspDidControlMask,其大小,以及各个控制模式的支持情况。
DcmDspDidControlMask, its size, and support status for various control modes can also be configured.
Currently, 0x2F can only be processed via interface/CS method. Therefore, DcmDspDidUsePort can only select USE_DATA_ELEMENT_SPECIFIC_INTERFACES. The corresponding DcmDspData must provide read interfaces. Whether manual interface configuration is required depends on DcmDspDataUsePort.
DcmDspAuthenticationDefaultSessionTimeOut: When configured, switches to unauthenticated state if no diagnostic requests are received within this time in default session.
DcmDspAuthenticationWhiteListDIDMaxSize/DcmDspAuthenticationWhiteListRIDMaxSize/DcmDspAuthenticationWhiteListServicesMaxSize: Maximum length for storing whitelisted DID/RID/Service.
Configure write buffer size via DcmSecureCodingDataBufferSize to store temporarily buffered write data. Note this size must include DID itself (2 bytes each).
执行写入后不会实际进行写入,需执行0x31服务进行验证,通过后执行写入
After execution, actual writing does not occur immediately. Execute 0x31 service for verification, then perform writing after successful verification.
Optional configuration DcmDspClearDTCCheckFnc. When configured, calls this callout interface to check if clearing is permitted. This is a pure callout interface, currently not connected to SWC side per requirements.
可选配置DcmDspClearDTCModeRuleRef,在相关模式规则通过后才允许清除。
Optional configuration DcmDspClearDTCModeRuleRef. Clearing is permitted only when relevant mode rules are satisfied.
DcmDspComControlAllChannel: Corresponds to this configuration when subnetNumber is 0, controls all connected networks, polls all configured AllChannels.
DcmDspComControlSpecificChannel: Corresponds to this configuration when subnetNumber is 1-0xE. Controls specified network by matching requested subnetNumber with configured DcmDspSubnetNumber. When subnetNumber is 0xF, controls network currently receiving request.
DcmDspComControlSetting: When configuring DcmDspComControlCommunicationReEnableModeRuleRef, restores previously closed networks only when associated mode rules are satisfied.
Can configure required session level/security level/mode rules. Currently only referencable in routines; subsequent specifications may expand usage scope.
DcmDspControlDTCSettingReEnableModeRuleRef: When configured, allows stopping DTC recording only when corresponding mode rules are satisfied. If rules are no longer satisfied, DTC recording resumes.
DcmDspDidRangeHasGaps: When configured as TRUE, requires DcmDspDidRangeIsDidAvailableFnc interface to determine if requested DID supports reading. When FALSE, not required; all DIDs within range are considered readable.
DcmDspDidRangeUsePort: When configured as TRUE, implements via RTE using CS interfaces. Above interfaces not required in this case; interfaces provided as needed.
DcmDspDidRangeInfoRef:关联DcmDspDidInfo用来检查读写权限
DcmDspDidRangeInfoRef: Associates DcmDspDidInfo to check read/write permissions.
UDS 0x23 service performs memory reading based on this configuration; 0x3D performs memory writing; 0x2C allows defining dynamic DID as reading a memory segment.
DcmDspAddressAndLengthFormatIdentifier: Can configure supported AddressAndLengthFormatIdentifier. If not configured, all are considered supported; otherwise, only those in the list are supported.
DcmDspMemoryIdInfo: Can configure DcmDspMemoryIdValue, provided to relevant memory read/write interfaces as parameter (0 if not configured). Provides upper/lower limits for memory read/write and required session level, security level, mode rules. Multiple groups can be configured.
DcmDspReadMemoryRangeInfo/DcmDspWriteMemoryRangeInfo: Configured under DcmDspMemoryIdInfo, multiple groups possible. Must provide memory upper/lower limits and required session level, security level, mode rules. Respectively represent read/write information; multiple groups configurable.
Configuration structure is identical to DcmDspMemory, but exclusively for UDS 0x34/0x35 services related to flashing. Therefore, configuration is separated from DcmDspMemory.
Used for UDS 0x2A service periodic transmission. Can configure maximum simultaneous scheduling count, fast/medium/slow mode rates, maximum simultaneous transmission count, and scheduler type.
DcmDspMaxPeriodicDidScheduler:最大同时调度数量
DcmDspMaxPeriodicDidScheduler: Maximum simultaneous scheduling count.
DcmDspPeriodicTransmissionFastRate/DcmDspPeriodicTransmissionMediumRate/DcmDspPeriodicTransmissionSlowRate: Fast/medium/slow mode rates, must be multiples of main function cycle time.
DcmDspPeriodicTransmissionMaxPeriodicFast/Medium/SlowTransmissions: Maximum simultaneous transmission count for fast/medium/slow modes. Unlimited if not configured.
DcmDspPeriodicTransmissionSchedulerType: Configured as type 1: if Dcm is waiting for previous PDID transmission confirmation when transmission is needed, retries in next main function cycle. Configured as type 2: waits until next transmission cycle.
Configure PIDs for OBD 0x01/0x02 services. Must configure ID, size, belonging service, and Data (including position, size, data type, interface, interface type).
DcmDspPid具体可以配置以下内容:
DcmDspPid specifically configurable with following contents:
DcmDspPidIdentifier:PID的ID
DcmDspPidIdentifier: PID ID.
DcmDspPidService:所属的服务,可以是01/02/both
DcmDspPidService: Belonging service, can be 01/02/both.
DcmDspPidDataUsePort: Data reading interface type. If not USE_DATA_SYNCH_FNC, DcmDspPidDataReadFnc not required, uses RTE directly; otherwise requires configuration.
It must be configured when setting up the UDS 0x38 service, providing data length of service requests and responses as well as the way to use the port.
DcmRequestFileTransferFileSizeOrDirInfoParameterLength: Length of fileSizeUncompressedOrDirInfoLength and fileSizeCompressed in response, also provided in response.
It must be configured when setting up the UDS 0x86 service, providing maximum simultaneous event processing count, DID data length, ROE scheduling cycle, and storage location configurations.
DcmDspRoutineP4ServerMax: P4 processing time for this Routine. If exceeded, service processing stops. This configuration item has higher priority than service P4ServerMax configuration.
DcmDspStartRoutine/DcmDspStopRoutine/DcmDspRequestRoutineResults configurations differ only in naming except for DcmDspStartRoutineRestartEnabled, so only StartRoutine described here as example.
DcmDspStartRoutine configuration:
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 identical, so only InSignal is described here.
DcmModeCondition: Conditions that must be met. Can set conditions like equal or not equal, then select BSW/SWC side mode group, or implementation data type and corresponding value. Reflected in encapsulation after configuration.
DcmConditionType: 配置条件为为==, !=, <=, <, >=, >
DcmConditionType: Configure condition as ==, !=, <=, <, >=, >.
DcmSwcSRDataElementRef: SWC side implementation data type. Since DcmSwcDataElementValue only provides two assignment methods, currently only basic data type arrays and basic data types supported.
DcmSwcDataElementValue: Can select DcmSwcElementArray or DcmSwcElementPrimitive. Array requires multiple element configuration with Index and value; Primitive only requires value.
DcmModeRule: Configure rules. Can set AND/OR logicalOperator, corresponding Nrc value when not passed, and Argument list (can be ModeCondition or ModeRule). Cannot reference itself.
DcmLogicalOperator: Not required with single argument; otherwise required. AND requires all arguments passed; OR requires at least one argument passed.
DcmModeRuleNrcValue: 条件不满足时指定的Nrc。
DcmModeRuleNrcValue: Specified Nrc when conditions not met.