AUTOSAR SWS DiagnosticCommunicationManager
AUTOSAR SWS DiagnosticCommunicationManager
V5.2.0
R4.1 Rev 3
This specification and the material contained in it, as released by AUTOSAR is for
the purpose of information only. AUTOSAR and the companies that have contributed
to it shall not be liable for any use of the specification.
The material contained in this specification is protected by copyright and other types
of Intellectual Property Rights. The commercial exploitation of the material contained
in this specification requires a license to such Intellectual Property Rights.
This specification may be utilized or reproduced without any modification, in any form
or by any means, for informational purposes only.
For any other purpose, no part of the specification may be utilized or reproduced, in
any form or by any means, without permission in writing from the publisher.
The AUTOSAR specifications have been developed for automotive applications only.
They have neither been developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Any such exemplary items are contained in the Specification Documents for
illustration purposes only, and they themselves are not part of the AUTOSAR
Standard. Neither their presence in such Specification Documents, nor any later
documentation of AUTOSAR conformance of products actually implementing such
exemplary items, imply that intellectual property rights covering such exemplary
items are licensed under the same rules as applicable to the AUTOSAR Standard.
Table of Contents
1 Introduction and functional overview ................................................................. 11
Known limitations
Offboard Onboard
AUTOSAR Application
DCM*
Manufacturing
Microcontroller (µC)
Development
Diagnostic
Tool
Service
*DCM: Diagnostic Communication Manager
Figure 1 Overview of the communication between the external diagnostic tools and the
onboard AUTOSAR Application
The DCM module ensures diagnostic data flow and manages the diagnostic states,
especially diagnostic sessions and security states. Furthermore, the DCM module
checks if the diagnostic service request is supported and if the service may be
executed in the current session according to the diagnostic states.The DCM module
provides the OSI-Layers 5 to 7 of Table 1: Diagnostic protocols and OSI-Layer.
OSI- Protocols
Layer
7 UDS-Protocol – ISO14229-1 Legislated OBD –
ISO15031-5
6 - - - - -
5 ISO15765-3 - - - ISO 15765-4
4 ISO15765-2 - - - -
3 ISO15765-2 - - - ISO 15765-4
2 CAN-Protocol LIN- FlexRay MOST ISO 15765-4
Protocol
1 CAN-Protocol LIN- FlexRay MOST ISO 15765-4
Protocol
Table 1: Diagnostic protocols and OSI-Layers
11 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
2.1 Terms
Term Description
Application Layer The Application Layer is placed above the RTE. Within the
Application Layer the AUTOSAR Software-Components are placed.
Channel A link at which a data transfer can take place. If there is more than
one Channel, there is normally some kind of ID assigned to the
Channel.
Diagnostic Channel A link at which a data transfer between a diagnostic tool and an ECU
can take place. Example: An ECU is connected via CAN and the
diagnostic channel has an assigned CAN-ID. Diagnostic channels
connected to other bus-systems such as MOST, FlexRay, LIN, etc.
are also possible.
External Diagnostic A device which is NOT permanently connected to the vehicle
Tool communication network. This External Diagnostic Tool can be
connected to the vehicle for various purposes, as e.g. for:
development,
manufacturing, and
service (in a garage).
Example External Diagnostic Tools are:
a diagnostic tester,
an OBD scan tool.
The External Diagnostic Tool is to be connected by a mechanic to
gather information from “inside” the car.
Freeze Frame A set of the vehicle/system operation conditions at a specific time.
Functional The diagnostic communication model where a group or all nodes of a
Addressing specific communication network receive a message from one sending
node (1-n communication). This model is also referred to as
‘broadcast’ or ‘multicast’. OBD communication will always be done in
the Functional Addressing mode.
Internal Diagnostic A device/ECU which is connected to the vehicle communication
Tool network. The Internal Diagnostic Tool can be used for:
advanced event tracking,
advanced analysis,
for service.
The behavior of the Internal Diagnostic Tool can be the same as of
an External Diagnostic Tool. The notion of “Internal Diagnostic Tool“
does not imply that it is included in each ECU as an AUTOSAR
Software-Component.
Physical Addressing The diagnostic communication model where a node of a specific
communication network receives a message from one sending node
(1-1 communication). This model is also referred to as ‘unicast’.
UDS Service this refers to a UDS Service as defined in ISO14229-1 (see [15])
OBD Service This refers to an OBD Service as defined in ISO15031-5 (see [16])
Term Description
AddressAndLengthF Defines the number of bytes used for the memoryAddress and
ormatIdentifier memorySize parameter in the request messages
OBD Scan tool See definition External Diagnostic Tool
2.2 Abbreviations
Abbreviation/ Description:
Acronym:
API Application Programming Interface
CAN Controller Area Network
DCM Diagnostic Communication Manager
DEM Diagnostic Event Manager
DET Development Error Tracer
DID Data Identifier
DSD Diagnostic Service Dispatcher (submodule of the DCM module)
DSL Diagnostic Session Layer (submodule of the DCM module)
DSP Diagnostic Service Processing (submodule of the DCM module)
DTC Diagnostic Trouble Codes
ID Identifier
LIN Local Interconnect Network
MCU Micro-Controller Unit
MOST Media Orientated System Transport
NRC Negative Response Code
OBD On-Board Diagnosis
OSI Open Systems Interconnection
PDU Protocol Data Unit
PID Parameter Identifier
ROE ResponseOnEvent
RTE Runtime Environment
SAP Service Access Point
SDU Service Data Unit
SID Service Identifier
SW-C Software-Component
TP Transport Protocol
UDS Unified Diagnostic Services
Xxx_ Placeholder for an API provider
3 Related documentation
AUTOSAR_SWS_NVRAMManager.pdf
Thus, the specification SWS BSW General shall be considered as additional and
required specification for Diagnostic Communication Manager.
InfoTypeServices_<VEHINFODATA> CallbackDCMRequestServices
ServiceRequestNotification
SecurityAccess_<LEVEL> RequestControlServices_<TID>
RoutineServices_<ROUTINENAME>
DataServices_DIDRange<range> «configurable»
«configurable»
«configurable»
Dcm
«realize»
Dcm_Init
NvM
«realize»
«optional» NvM_WriteBlock
«optional»
IoHwAb
«realize»
IoHwAb_Dcm
«realize» «realize» «mandatory»
PduR ComM
[SWS_Dcm_00055] ⌈ The Dcm module shall use the header file structure shown in
Figure 4.⌋(BSW00381, BSW00412, BSW00435, BSW00436, BSW00302)
[SWS_Dcm_01065]⌈ The file Dcm.h shall provide all type definitions and APIs used
by other BSW modules for direct calls as described in chapter 8.4 Function
definitions.⌋()
[SWS_Dcm_01066]⌈ The file Dcm_Cbk.h shall provide all Typedefinitions and APIs
used by other BSW modules for direct calls as described in chapter 8.5 Callback
Notifications.⌋()
6 Requirements traceability
Requirement Satisfied by
[BSW00346] Basic set of module files SWS_Dcm_00054
[BSW158] Separation of configuration from SWS_Dcm_00054
implementation
[BSW00314] Separation of interrupt frames and Not applicable
service routines (this module does not provide any ISRs)
[BSW00370] Separation of callback interface SWS_Dcm_00054
from API
[BSW00435] Header File Structure for the Basic SWS_Dcm_00055
Software Scheduler
[BSW00436] Module Header File Structure for SWS_Dcm_00055
the Basic Software Memory Mapping
[BSW00447] Standardizing Include file structure Not applicable. Implementation requirement
of BSW Modules Implementing Autosar Service
Requirement Satisfied by
[BSW00348] Standard type header See Section 8.1
[BSW00353] Platform specific type header SWS_Dcm_00549
[BSW00361] Compiler specific language Not applicable
extension header (requirement on implementation, not on
specification)
Module Design
Requirement Satisfied by
[BSW00301] Limit imported information SWS_Dcm_00054
[BSW00302] Limit exported information SWS_Dcm_00055
[BSW00328] Avoid duplication of code Not applicable
(requirement on implementation, not on
specification)
[BSW00312] Shared code shall be reentrant Fulfilled by API definitions in chapter 8
[BSW006] Platform independency SWS_Dcm_00555
[BSW00439] Declaration of interrupt handlers Not applicable
and ISRs
[BSW00448] Module SWS shall not contain Fulfilled by the whole document
requirements from Other Modules
[BSW00449] BSW Service APIs used by Fulfilled by chapter 8.8.3 1 Configurable
Autosar Application Software shall return a Interfaces
Std_ReturnType
43 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
Requirement Satisfied by
[BSW00357] Standard API return type Fulfilled by API definitions in chapter 8
[BSW00377] Module Specific API return type Fulfilled by API definitions in chapter 8
[BSW00304] AUTOSAR integer data types Fulfilled by API definitions in chapter 8
[BSW00355] Do not redefine AUTOSAR integer Fulfilled by API definitions in chapter 8
data types
[BSW00378] AUTOSAR Boolean type Not applicable (Not used)
[BSW00306] Avoid direct use of compiler and SWS_Dcm_00551
platform specific keywords
Global data
Requirement Satisfied by
[BSW00308] Definition of global data SWS_Dcm_00554
[BSW00309] Global data with read-only SWS_Dcm_00552
constraint
Requirement Satisfied by
[BSW00371] Do not pass function pointers via Fulfilled by API definitions in chapter 8
API
[BSW00358] Return type of init() functions SWS_Dcm_00037
[BSW00414] Parameter of init function SWS_Dcm_00037
[BSW00376] Return type and parameters of SWS_Dcm_00053
main processing functions
[BSW00359] Return type of callback functions Fulfilled by API definitions in chapter 8
[BSW00360] Parameters of callback functions Fulfilled by API definitions in chapter 8
[BSW00440] Function prototype for callback Not applicable
functions of AUTOSAR Services (requirement on implementation, not on
specification)
[BSW00329] Avoidance of generic interfaces Fulfilled by API definitions in chapter 8
[BSW00330] Usage of macros instead of SWS_Dcm_00553
functions
[BSW00331] Separation of error and status SWS_Dcm_00364
values
7 Functional specification
To define the functionality of the DCM module, The DCM SWS models the DCM
module as consisting of the following submodules:
Diagnostic Session Layer (DSL) submodule: The DSL submodule ensures
data flow concerning diagnostic requests and responses, supervises and
guarantees diagnostic protocol timing and manages diagnostic states
(especially diagnostic session and security).
Diagnostic Service Dispatcher (DSD) submodule: The DSD submodule
processes a stream of diagnostic data. The submodule:
Receives a new diagnostic request over a network and forwards it to a
data processor.
Transmits a diagnostic response over a network when triggered by the
data processor (e.g. by the DSP submodule).
Diagnostic Service Processing (DSP) submodule: The DSP submodule
handles the actual diagnostic service (respectively subservice) requests.
The next graphic gives an overview of the interfaces between the submodules DSP,
DSD, and DSL within the DCM module.
DspInternal_CancelPagedBufferProcessing()
DEM Interface DEM
<Module>_<DiagnosticService>()
DsdInternal_ProcessPage()
Xxx_ReadData()
Xxx_WriteData() DspInternal_DcmUpdatePage()
DsdInternal_StartPagedProcessing()
DSD
RTE (Application)
Xxx_ReadDataLength()
Xxx_ConditionCheckRead() Dcm_ExternalSetNegResponse()
Xxx_GetScalingInformation( Dcm_ExternalProcessingDone()
)
Xxx_ReturnControlToECU()
Xxx_ResetToDefault() DSP DspInternal_DcmConfirmation()
Xxx_FreezeCurrentState() <Module>_<DiagnosticService>_<SubService>()
Xxx_ShortTermAdjustment()
Xxx_GetInfoTypeValue()
Xxx_IsDidAvailable()
Transmit functionality
Xxx_Start()
Xxx_Stop()
Xxx_RequestResults(
)
Xxx_RequestControl()
Xxx_GetSeed()
Xxx_CompareKey()
Xxx_Indication() PDU Router
Xxx_Confirmation()
Dcm_StartOfReception()
Dcm_CopyRxData()
DslInternal_SetSesCtrlType() Dcm_CopyTxData()
Dcm_TpRxIndication()
DslInternal_SetSecurityLevel()
Dcm_TpTxConfirmation(
PduR
) _DcmTransmit()
PduR_DcmCancelTransmit()
DS PduR_DcmCancelReceive()
Dcm_ResetToDefaultSession() L
Dcm_GetSecurityLevel( COM
)Dcm_GetSesCtrlTypel(
)
Dcm_GetActiveProtocol() Manager*1*2 || see page
befor
Xxx_StartProtocol()
Xxx_StopProtocol() e
Dcm_Init(
)
Note: The implementation of these submodules and the interfaces between them is
not mandatory. They are introduced only to improve the readability of the
specification.
The standards defining the UDS Services and OBD Services define the negative
response codes (NRCs).
The DCM SWS uses these NRCs in the interfaces between the DCM and other
BSW modules and the SW-Cs. These NRCs are defined in the data type
Dcm_NegativeResponseCodeType.
[SWS_Dcm_00870] ⌈The Dcm shall check if the NvM is read out correctly. If the
non-volatile information could not read out correct the Dcm shall start a default
reaction. The default reaction is described in the chapter were the usage of the non-
volatile data is described.⌋()
[SWS_Dcm_01048] ⌈If the Dcm cancels a service with NvM access, it shall call
NvM_CancelJobs().⌋()
The service is cancelled either by reaching the maximum number of RCRRP NRCs
or by protocol preemption.
• boolean
• uint8
• uint16
• uint32
• sint8
• sint16
• sint32
• uint8[n]
The type uint8[n] is mapped to either for fixed or variable data length.⌋()
[SWS_Dcm_00969] ⌈The Dcm shall treat non-integer data types (e.g. uint8[n]) either
like integer data types of the matching size or leave their contents uninterpreted in
case DcmDspDataEndianness is configured to OPAQUE.⌋()
[SWS_Dcm_00970] ⌈The Dcm module shall interpret opaque data as uint8[n] and
shall always map it to an n-bytes sized signal.⌋()
In [21] (Chapter 2.4) the endianness conversion is defined for unsigned data types.
The associated configurations can be found in the configuration 10.2.29
DcmDspData.
51 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
[constr_6004] UINT8 shall be used as (implementation) data type for bit lengths
between 2 and 8 ⌈If DcmDspDataUsePort is of type
USE_DATA_SENDER_RECEIVER or USE_ECU_SIGNAL and DcmDspDataSize is
greater than 1 and less or equal 8, the DcmDspDataType shall use UINT8.⌋()
[constr_6005] UINT16 shall be used as (implementation) data type for bit lengths
between 9 and 16 ⌈If DcmDspDataUsePort is of type
USE_DATA_SENDER_RECEIVER or USE_ECU_SIGNAL and DcmDspDataSize is
between 9 and 16 the DcmDspDataType shall use UINT16.⌋()
[constr_6014] UINT8 shall be used as (implementation) data type for bit lengths
between 2 and 8 ⌈If DcmDspPidDataUsePort is of type
USE_DATA_SENDER_RECEIVER and DcmDspPidDataSize is between 1 and 8
the DcmDspPidDataType shall use UINT8.⌋()
[constr_6015] UINT16 shall be used as (implementation) data type for bit lengths
between 9 and 16 ⌈If DcmDspPidDataUsePort is of type
USE_DATA_SENDER_RECEIVER and DcmDspPidDataSize is between 9 and 16
the DcmDspPidDataType shall use UINT16.⌋()
7.2.1 Introduction
7.2.4.1 Overview
[SWS_Dcm_00111] ⌈ The DSL submodule shall forward received data to the DSD
submodule only after a call of Dcm_TpRxIndication() with parameter Result =
E_OK (see SWS_Dcm_00093).⌋()
55 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
More descriptions of the APIs (prototype, input/output parameter) can be found in the
interface description of PduR module (see [2]).
It is allowed to have different DcmPduIds for different diagnostic communication
applications. For example:
OBD DcmRxPduId: for reception of OBD requests,
OBD DcmTxPduId: for transmission of OBD responses,
UDS phys DcmRxPduId: for reception of UDS physically addressed requests,
UDS func DcmRxPduId: for reception of UDS functionally addressed
requests,
UDS DcmTxPduId: for transmission of UDS responses.
Address type (physical/functional addressing) is configured per DcmRxPduId (see
configuration parameter DcmDslProtocolRx). A configuration per DcmRxPduId is
possible because there will always be different DcmRxPduId values for functional
and physical receptions, independent of the addressing format of the Transport
Layer (extended addressing, normal addressing).
7.2.4.3 Concurrent “TesterPresent” (“keep alive logic”)
It is possible, that functional “TesterPresent” commands are sent by the tester in
parallel to physical requests/responses. This is called “keep alive logic” in ISO14229-
1 [15]. This functional “TesterPresent” will be received on a separate DcmRxPduId
(UDS func DcmRxPduId) with a Dcm-internal receive buffer which is not configured
explicitly. Due to that reason, the functional TesterPresent (and only functional
TesterPresent without response) is handled in the following way:
[SWS_Dcm_00114] ⌈ The DSD submodule shall request the DSL submodule for
transmission of responses.⌋()
Responses are sent with the DcmTxPduId, which is linked in the DCM module
configuration to the DcmRxPduId, i.e. the ID the request was received with (see
configuration parameter DcmDslProtocolTx)
Within PduR_DcmTransmit() only the length information and, for generic
connections, the addressing information, is given to the PduR module. After the DCM
module has called successfully PduR_DcmTransmit(), the PduR module will call
Dcm_CopyTxData() to request the DCM module to provide the data to be
transmitted and will call Dcm_TpTxConfirmation() after the complete PDU has
successfully been transmitted or an error occurred.
See section 7.2.4.5 Generic Connection Handling for further details on address
information handling within generic connections.”
More descriptions of the APIs (prototype, input/output parameter) can be found in the
interface description of the PduR module (see [2]).
[SWS_Dcm_00845] ⌈ The configuration tool shall verify that generic connections are
consistent by checking the MetaDataLength of all referenced PDUs of a
DcmDslConnection (DcmDslProtocolRxPduRef, DcmDslProtocolTxPduRef,
DcmDslPeriodicTxPduRef, DcmDslRoeTxPduRef). The TxPdu references may only
be generic when DcmDslProtocolRxPduRef is also generic.⌋()
Periodic transmission events can occur when not in Full Communication Mode. So
the following requirement exists:
[10]
Initial
Roe started
[6]
[SWS_Dcm_00872] ⌈The Dcm changes the state of each event to ‘ROE cleared’
state during Dcm_Init().⌋()
[SWS_Dcm_00873] ⌈By receiving a valid ROE setup request, the RoeEvent which is
addressed in the request changes to the ‘ROE stopped’ state (See Table 2).⌋()
[SWS_Dcm_00874] ⌈If the RoeEvent was setup with the StorageState set to
‘storeEvent’ and no StartResponseOnEvent with StorageState set to ‘storeEvent’
and an EventWindowTime which is active over power cycles or
clearResponseOnEvent has been received afterwards the Dcm will change to ‘ROE
stopped’ state as soon as the non-volatile information is available.⌋()
Note: If an Event is initialized once with StorageState set to ‘StoreEvent’, it will stay
initialized until it is cleared by a ClearResponseOnEvent request (See also
SWS_Dcm_00897).
[SWS_Dcm_00902] ⌈All RoeEvents which have been in ‘ROE started’ state when
leaving the default session shall change back into ‘ROE started’ state when (re-)
entering the default session.⌋()
[SWS_Dcm_00879] ⌈By leaving the current session all started RoeEvents shall
change to the ‘ROE stopped’ state.⌋()
Note: RoeEvents are stopped when the current session is left, independent if the
session changes from a non-default session to the same or a different
non-default session. By leaving the default session the current active
RoeEvents are stopped and stored (in order to be re-started as soon the session
changes back to the default session (See SWS_Dcm_00902)
[SWS_Dcm_00885] ⌈If all RoeEvents are in ‘ROE cleared’ state and a valid
stopResponseOnEvent (0x00) request is received the Dcm shall reject the request
with a negative Response with NRC 0x24 (requestSequenceError). ⌋()
[SWS_Dcm_00886] ⌈If all RoeEvents are in ‘ROE cleared’ state and a valid
StartResponseOnEvent (0x05) request is received the Dcm shall reject the request
with a negative Response with NRC 0x24 (requestSequenceError). ⌋()
[SWS_Dcm_00887] ⌈If all RoeEvents are in ‘ROE cleared’ state and a valid
clearResponseOnEvent (0x06) request is received the Dcm anwers positively and
the RoeEvents stay in ‘ROEcleared’ state.).⌋()
[SWS_Dcm_00888] ⌈If the non-volatile data could not be read correctly, all
RoeEvents in ‘ROE cleared’ state remain in ‘ROE cleared’ state.⌋()
[SWS_Dcm_00889] ⌈If the EventWindowTime is active over power cycles and not
timed out, the Dcm shall reactivate all RoeEvents which were active in the default
session during the last power cycle as soon as the non-volatile information is
available.⌋()
[SWS_Dcm_00893] ⌈For each setup sub function the Dcm shall only support the
one fixed ServiceToRespondTo. The supported ServiceToRespondTo is listed in
Table 2⌋()
[SWS_Dcm_00903] ⌈The Dcm shall evaluate the EventWindowTime from the setup
request.⌋()
The setup request has the EventWindowTime inifinity and the storageState was
set to ‘StoreEvent’. ⌋()
[SWS_Dcm_00905] ⌈The EventWindowTime will end at the end of the current power
cycle if all of the following conditions are fulfilled:
65 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
The EventWindowTime is set to infinity (0x02) during the setup request
[SWS_Dcm_00907] ⌈If the EventWindowTime times out and the power cycle is not
ended, the Dcm shall send a final positive Response to the setup request.⌋()
[SWS_Dcm_00908] ⌈The Dcm shall only support Roe requests which where pre-
configured in the configuration.⌋()
66 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
Note: The pre-configuration gives the Dcm the freedom to optimized not configured
requests.
[SWS_Dcm_00914] ⌈If the state of the RoeEvent is ‘ROE started’ for the sub-
function OnDTCStatusChange shall trigger a serviceToRespondTo if
Dcm_DemTriggerOnDTCStatus() is called and the DTCStatusNew fits to the
corresponding DTCStatusMask.⌋()
Note : The Dcm does not directly inform the SW-C about activation of
ResponseOnEvent. The SW-C has to watch the change of the corresponding
ModeDeclarationGroup DcmResponseOnEvent_<RoeEventID> and start reporting
data identifier changes to the Dcm if the Mode is ‘ROE started’
Note: The Dcm stores the sourceAddress of the protocol where the ROE request is
received, independent if the serviceToResponseTo is send to a same or a different
TxPduId. The sourceAddress links always the correct TxPduId, because there is only
one TxPduId for ServiceToRespondTo linked to one protocol (See
ConfigurationParameter DcmDslROEConnectionRef). If RoeEvents are active over
power cycles the sourceAddress need to be stored over power cycles.
7.2.4.8.7 Send a ServiceToRespondTo
The Dcm supports the transmission from ServiceToResponseTo on the same
TxPduId like the ROE response is send (TYPE 1) or on a different TxPduId (TYPE
2).
[SWS_Dcm_00601] ⌈ The DCM module shall respect a minimum time between two
(2) consecutive Roe transmissions (see configuration parameter
DcmDspRoeInterMessageTime)⌋()
[SWS_Dcm_00929] ⌈If at least one RoeEvent is in ‘ROE started’ state the Dcm shall
always process ROE request with the sub-function clearResponseOnEvent
independent of the DcmDslProtocol where the request is received.⌋()
70 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
[SWS_Dcm_00930] ⌈If at least one RoeEvent is in ‘ROE started’ state the Dcm shall
always process ROE request with the sub-function stopResponseOnEvent
independent of the DcmDslProtocol where the request is received.⌋()
[SWS_Dcm_00940] ⌈If at least one RoeEvent is in ‘ROE started’ state the Dcm shall
reject all ROE request received on a different DcmDslProtocol than the protocol
where the RoeEvents were started with an NRC 0x22 (ConditionsNotCorrect), except
for SWS_Dcm_00929 and SWS_Dcm_00930.⌋()
With paged-buffer handling the ECU is not forced to provide a buffer, which is as
large as the maximum length of response.
Please note:
paged-buffer handling is for transmit only – no support for reception.
paged-buffer handling is not available for the Application (DCM-internal
use only).
7.2.4.10 Support of ResponsePending response triggered by the
Application
In some cases, e.g. in case of routine execution, the Application needs to request an
immediate NRC 0x78 (Response pending), which shall be sent immediately and not
just before reaching the response time (P2ServerMax respectively P2*ServerMax).
When the DCM module calls an operation and gets an error status
DCM_E_FORCE_RCRRP, the DSL submodule will trigger the transmission of a
negative response with NRC 0x78 (Response pending).
71 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
This response needs to be sent from a separate buffer, in order to avoid overwriting
the ongoing processing of the request.
7.2.4.11 Manage security level
[SWS_Dcm_00020] ⌈ The DSL submodule shall save the level of the current active
security level.⌋(BSW04005)
For accessing this level, the DSL submodule provides interfaces to:
- get the current active security level: Dcm_GetSecurityLevel()
- set a new security level: DslInternal_SetSecurityLevel()
[SWS_Dcm_00033] ⌈ During DCM initialization the security level is set to the value
0x00 (DCM_SEC_LEV_LOCKED).⌋(BSW101)
[SWS_Dcm_00139] ⌈ The DSL shall reset the security level to the value 0x00 (i.e.
the security is enabled) under one of the following conditions:
- if a transition from any diagnostic session other than the defaultSession to another
session other than the defaultSession (including the currently active diagnostic
session) is performed or
- if a transition from any diagnostic session other than the defaultSession to the
defaultSession (DslInternal_SetSecurityLevel()) (initiated by UDS Service
DiagnosticSessionControl (0x10) or S3Server timeout) is performed.⌋()
[SWS_Dcm_00022] ⌈ The DSL submodule shall save the state of the current active
session.⌋(BSW04006)
For accessing this variable, the DSL submodule provides interfaces to:
get the current active session: Dcm_GetSesCtrlType()
set a new session: DslInternal_SetSesCtrlType()
[SWS_Dcm_00034] ⌈ During DCM initialization, the session state is set to the value
0x01 (“DefaultSession”).⌋(BSW101)
According to following table, the start / stop of S3Server timeout timer is processed:
[SWS_Dcm_00141] ⌈
“Start of S3Server” means reset the timer and start counting from the beginning.⌋()
[SWS_Dcm_00027] ⌈ The DCM module shall handle the following protocol timing
parameters in compliance with [18]: P2ServerMin, P2ServerMax, P2*ServerMin,
P2*ServerMax, S3Server⌋(BSW04015)
.
These protocol timing parameters have influence on the session layer timing (no
influence on Transport Layer timing). Some of these timing parameters can be
modified while protocol is active with the following means:
UDS Service DiagnosticSessionControl (0x10)
73 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
UDS Service AccessTimingParameter (0x83)
The DSL submodule provides the following functionalities to modify the timing
parameters:
Provide the active timing parameters,
Set the new timing parameters. Activation of new timing values is only allowed
after sending the response.
7.2.4.15 Handling of different diagnostic protocols
It is necessary to distinguish between different diagnostic protocols (e.g. OBD,
enhanced diagnosis ...).
7.2.4.15.1 Different service tables
For the different protocols a different set of allowed diagnostic services is valid (e.g.
the UDS commands for the enhanced diagnosis, the OBD mode services for the
OBD protocol). It is possible to create different service tables and link them to the
diagnostic protocol.
The DSD submodule uses this link for further processing of diagnostic requests.
7.2.4.15.2 Prioritization of protocol
The configuration parameter DcmDslProtocolPriority makes it possible to give
each protocol its own relative priority.
Possible use case: There are ECUs, communicating with a vehicle-internal
diagnostic tester (running on enhanced diagnosis) and a vehicle-external OBD tester.
The OBD communication must have a higher priority than the enhanced diagnosis.
[SWS_Dcm_00729] ⌈In case of multiple clients with different PduIDs which are
requesting the same protocol, as all the connections of the same protocol are having
the same priority, a second request (with the different RxPduId) will not be
processed. If the configuration parameter
DcmDslDiagRespOnSecondDeclinedRequest is TRUE, a negative response with
NRC 0x21 (BusyRepeatRequest) shall be issued for the second request. If the
configuration parameter is FALSE, no response shall be issued.⌋()
Inside this function, the Application can examine the environment conditions and
enable/disable further processing of the protocol.
A protocol stop can appear only in case of protocol preemption (See chapter
7.2.4.15.3 Preemption of protocol)
Note: A protocol (e.g. OBD) will be active till reset or other protocol preempts.
7.3.1 Introduction
[SWS_Dcm_00178] ⌈ The DSD submodule shall only process valid requests and
shall reject invalid ones.⌋()
The following use cases are relevant and are described in detail in the following:
Receive a request message and transmit a positive response message
Receive a request message and suppress a positive response
Receive a request message and suppress a negative response
Receive a request message and transmit a negative response message
Send a positive response message without corresponding request
79 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
Segmented Responses
7.3.2.1 Receive a request message and transmit a positive response message
This is the standard use case of normal communication („ping-pong”). The server
receives a diagnostic request message. The DSD submodule ensures the validity of
the request message. In this use case, the request is valid and the response will be
positive. The request will be forwarded to the appropriate data processor in the DSP
submodule.
When the data processor has finished all actions of data processing, it triggers the
transmission of the response message by the DSD submodule.
If the data processor processes the service immediately as part of the request
indication function, the data processor can trigger the transmission inside this
indication function (“synchronous”).
If the processing takes a longer time (e. g. waiting on EEPROM driver), the data
processor defers some processing (“asynchronous”). The response pending
mechanism is covered by the DSL submodule. The data processor triggers the
transmission explicitly, but from within the data processor’s context.
As soon as a request message is received, the corresponding DcmPduId is blocked
by the DSL submodule (see SWS_Dcm_00241). During the processing of this
request, no other request of the same protocol type (e.g. an enhanced session can
be ended by a OBD session) can be received, until the corresponding response
message is sent and the DcmPduId is released again.
7.3.2.2 Receive a request message and suppress a positive response
This is a sub-use-case of the previous one.
Within the UDS protocol it is possible to suppress the positive response by setting a
special bit in the request message (see SWS_Dcm_00200). This special
suppression handling is completely performed within the DSD submodule.
7.3.2.3 Receive a request message and suppress a negative response
In case of functional addressing the DSD submodule shall suppress the negative
response for NRC 0x11, 0x12 and 0x31 (see SWS_Dcm_00001)
7.3.2.4 Receive a request message and transmit a negative response message
There are a many different reasons why a request message is rejected and a
negative response is to be sent.
If a diagnostic request is not valid or if a request may not be executed in the current
session, the DSD submodule will reject the processing and a negative response will
be returned.
But there are even many reasons to reject the execution of a well-formed request
message, e.g. if the ECU or system state does not allow the execution. In this case,
the DSP submodule will trigger a negative response including an NRC supplying
additional information why this request was rejected.
In case of a request composed of several parameters (e.g. a UDS Service
ReadDataByIdentifier (0x22) request with more than one identifier to read), each
parameter is treated separately. And each of these parameters can return an error.
This kind of request returns a positive response if at least one of the parameters was
processed successfully.
The DSD submodule is called by the DSL submodule when receiving a diagnostic
message and performs the following operations:
81 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
delegates processing of request to the DSP submodule
keeps track of request processing (provide
Dcm_ExternalProcessingDone() API)
transmits the response of the Application to the DSL submodule (Transmit
functionality)
7.3.3.1 Interaction of the DSD with the DSL main functionality
Direction Explanation
Bidirectional Exchange of the Diagnostic Messages (receive/transmit).
DSD submodule Obtain latest diagnostic session and latest security level.
to DSL
submodule
DSL submodule Confirmation of transmission of Diagnostic Message.
to DSD
submodule
Table 4 Interaction between the DSD submodule and the DSL submodule
Table 5 Interaction between the DSD submodule and the DSP submodule
7.3.4.1 Support checking the diagnostic service identifier and adapting the
diagnostic message
The DSD submodule shall be triggered by the DSL submodule if a new diagnostic
message is recognized. The DSD submodule will start processing by analyzing the
diagnostic service identifier contained in the received diagnostic message.
[SWS_Dcm_00193] ⌈ During this check, the DSD submodule shall search the newly
received diagnostic service identifier in the “Service Identifier Table”.⌋()
For performance reasons it might be necessary that the support check is done with a
“lookup table” functionality. In this “Service Identifier Table” all supported Service IDs
of the ECU are predefined.
Rationale for SWS_Dcm_00195: The “Service Identifier Table” and the information
about the supported services will be generated out of the configuration. More than
one Service Identifier Table can be configured for selection. At one time only one
Service Identifier Table can be active.
[SWS_Dcm_00196] ⌈For the check, the DSD submodule shall scan the active
“Service Identifier Table” for a newly received diagnostic service identifier. If this
service identifier is supported and if the configuration parameter DcmDsdSidTabFnc
(see ECUC_Dcm_00777) is not empty, the DSD submodule shall call the configured
service interface (<Module>_<DiagnosticService>). If the configuration parameter is
empty, the DCM shall call the internally implemented service interface.⌋()
The diagnostic service identifier is not supported when it is not included in the
“Service Identifier Table”.
[SWS_Dcm_00198] ⌈ The DSD submodule shall store the newly received diagnostic
service identifier for later use.⌋()
For example:
WriteDataByIdentifier (for writing VIN number):
1. A new diagnostic message is received by the DSL submodule. (Diagnostic
Message WriteDataByIdentifier =
0x2E,0xF1,0x90,0x57,0x30,0x4C,0x30,0x30,0x30,0x30,0x34,0x33,0x4D,0x42,0x35,0
x34,0x31,0x33,0x32,0x36)
2. The DSL submodule indicates a new diagnostic message with the “Data
Indication” functionality to the DSD submodule. In the diagnostic message buffer the
diagnostic message is stored (buffer = 0x2E,0xF1,0x90,..).
3. The DSD submodule executes a check of the supported services with the
determined service identifier (first byte of buffer 0x2E) on the incoming diagnostic
message.
4. The incoming diagnostic message is stored in the DCM variable
Dcm_MsgContextType.
83 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
7.3.4.2 Handling of „suppressPosRspMsgIndicationBit“
The “suppressPosRspMsgIndicationBit” is part of the subfunction parameter
structure (Bit 7 based on second byte of the diagnostic message, see ISO14229-1
[15] Section 6.5: Server response implementation rules).
[SWS_Dcm_00773] ⌈If the newly received diagnostic service is not allowed in the
current mode condition (according to the configuration parameter
DcmDsdSidTabModeRuleRef), the DSD submodule shall transmit the calculated
negative response of the referenced DcmModeRule to the DSL submodule.⌋()
The DSD submodule will check for the minimum message length before executing
the requested command.
[SWS_Dcm_00222] ⌈ When the DSP submodule has finished the execution of the
requested Diagnostic Service the DSD submodule shall assemble the response.⌋()
The execution of the DSP service interpreter can have the results:
- positive Result or
- negative Result.
Following possible Responses can be assembled:
- positive Response,
- negative Response, or
- no Response (in the case of suppression of responses).
7.3.4.6.1 Positive Response
The DSP submodule indicates a positive result by calling
Dcm_ExternalProcessingDone(). The parameter “Dcm_MsgContextType”
comprises the diagnostic (response) message.
[SWS_Dcm_00223] ⌈ The DSD submodule shall add the response service identifier
and the response data stream (returned by the Application) in the parameter
“Dcm_MsgContextType”.⌋()
[SWS_Dcm_00228] ⌈ The DSD submodule shall handle all NRCs supported from
the Application and defined in Dcm_NegativeResponseCodeType.⌋()
88 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
7.3.4.6.3 Suppression of response
The DSL submodule will receive a confirmation by the PduR module upon forwarding
the data.
[SWS_Dcm_00236] ⌈ The DSD submodule shall forward the confirmation via the
internal function DspInternal_DcmConfirmation() to the DSP submodule.⌋()
In this case no Data Confirmation is sent from the DSL submodule to the DSD
submodule but the DSD submodule will still call internal function
DspInternal_DcmConfirmation().
[SWS_Dcm_00240] ⌈In case the request has been fully processed by the Dcm, The
DSD submodule shall finish the processing of one Diagnostic Message of the
Diagnostic Service Dispatcher by calling DspInternal_DcmConfirmation().⌋()
Rationale for SWS_Dcm_00240: The DSP submodule is waiting for the execution of
the DspInternal_DcmConfirmation() functionality. So it has to be sent, also
when no Data Confirmation is provided.
Altogether this means that in any of the following cases:
Positive Response,
Negative Response,
Suppressed Positive Response, and
Suppressed Negative Response
the DSD submodule will finish by calling DspInternal_DcmConfirmation().
(Refer to 8.11.3 DspInternal_DcmConfirmation)
[SWS_Dcm_00742] ⌈The call of Xxx_Confirmation() shall be done right after the call
of DspInternal_DcmConfirmation()⌋()
7.4.1 General
When receiving a function call from the DSD submodule requiring the DSP
submodule to process a diagnostic service request, the DSP always carries out
following basic process steps:
analyze the received request message,
check format and whether the addressed subfunction is supported,
acquire data or execute the required function call on the DEM, SW-Cs or other
BSW modules
90 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
assemble the response
The following sections are some general clarifications.
7.4.1.1 Check format and subfunction support
The DSP submodule will check for appropriate message length and structure before
executing the requested command.
[SWS_Dcm_00775] ⌈The DCM shall act as a mode manager for the diagnostic
modes:
⌋()
Note: The RTE/SchM will prefix the names with “MODE_”, wherefore the names do
not include the MODE keyword.
ModeDeclarationGroup DcmDiagnosticSessionControl {
{
DEFAULT_SESSION,
PROGRAMMING_SESSION,
EXTENDED_SESSION,
etc.
}
initialMode = DEFAULT_SESSION
};⌋()
Note: According constr_6001 there are standardized mode declaration which are
part of the standardized AUTOSAR interface.
Note: Refer [ecuc_sws_2108] defining the symbolic name prefix
}
initialMode = ENABLE_RAPIDPOWERSHUTDOWN
};⌋()
[SWS_Dcm_00780] ⌈The DCM shall define for each network which is considered in
the CommunicationControl service a separate ModeDeclarationGroupPrototype
with the naming convention DcmCommunicationControl_<symbolic name of
ComMChannelId>.⌋()
ModeDeclarationGroup DcmResponseOnEvent_<RoeEventID> {
{
EVENT_STARTED,
EVENT_STOPPED,
EVENT_CLEARED
}
initialMode = EVENT_CLEARED
}⌋()
[SWS_Dcm_00933] ⌈ModeSwitchInterface
SchM_Switch_<bsnp>_DcmResponseOnEvent_<RoeEventId> {
isService = true;
RoeMode currentMode;
};⌋()
The Dcm provides a state machine for each RoeEvent (see Figure 6). The state for a
RoeEvent is needed by SWC to activate event reporting or report the Roe status to a
Did. Therefore the Dcm provides for each state of each RoeEvent a
ModeDeclarationGroup which reports the current state of the state machine as
mode.
Note: The difference in the AND and OR logical operation is to allow an optimized
implementation.
[SWS_Dcm_00815] ⌈In case the complete evaluation result in no specific NRC the
NRC 0x22 (ConditionsNotCorrect) shall be used.⌋()
General assumptions:
1) DcmModeRule1 consists of DcmModeCondition1, DcmModeRule2 and
DcmModeRule3
2) DcmModeRule1 defines NRC 0x22
3) DcmModeRule2 and DcmModeRule3 do not have any sub-rules
4) DcmModeRule2 defines NRC 0x72
5) DcmModeRule3 does not define a NRC value
Example 1:
1) DcmModeRule1 uses an OR combination (DcmModeCondition1 OR
DcmModeRule2 OR DcmModeRule3)
a) DcmModeCondition1 is failing
--> NRC 0x22 is returned
b) DcmModeRule2 is failing
--> NRC 0x72 is returned
c) DcmModeRule3 is failing
--> NRC 0x22 is returned
d) DcmModeCondition1, DcmModeRule2 and DcmModeRule3 are failing
--> NRC 0x72 is returned
e) DcmModeCondition1 and DcmModeRule3 are failing
--> NRC 0x22 is returned
Example 2:
1) DcmModeRule1 uses an AND combination (DcmModeCondition1 AND
DcmModeRule2 AND DcmModeRule3)
a) DcmModeCondition1 is failing
--> NRC 0x22 is returned
b) DcmModeRule2 is failing
--> NRC 0x72 is returned
c) DcmModeRule3 is failing
--> NRC 0x22 is returned
d) DcmModeCondition1, DcmModeRule2 and DcmModeRule3 are failing
96 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
--> NRC 0x22 is returned
e) DcmModeCondition1 and DcmModeRule3 are failing
--> NRC 0x22 is returned
e) DcmModeRule2 and DcmModeRule3 are failing
--> NRC 0x72 is returned
The mask DTCStatusAvailabilityMask reflects the status bits supported by the ECU.
Note : Masking is performed in the module Dem and does not need to be done on
Dcm side (see SWS_Dem_00657 in [7] )
[SWS_Dcm_00372] ⌈ To avoid updating data values while reading out freeze frame
records, the DCM module shall call the following API sequence: first lock updates by
calling Dem_DcmDisableDTCRecordUpdate() (which is an exclusive area function
concerning to BSW00434) then call
Dem_DcmGetSizeOfFreezeFrameByDTC(RecNum), then
Dem_DcmGetFreezeFrameDataByDTC(RecNum) and finally shall re-enable
updates by calling Dem_DcmEnableDTCRecordUpdate().⌋()
Note: A timeout or maximum counter is not necessary, because the DEM guarantees
not to lock the DTC for longer time.
If the requested subfunction value is configured, the following steps are processed
even if the requested session type is equal to the already running session type (see
ISO14229-1 [15] Section 8.2).
[SWS_Dcm_00311] ⌈The send confirmation function shall set the new diagnostic
session type with DslInternal_SetSesCtrlType() and shall set the new timing
parameters (P2ServerMax, P2ServerMax*) (see configuration parameters
DcmDspSessionP2ServerMax and DcmDspSessionP2StarServerMax) and do
the mode switch of the ModeDeclarationGroupPrototype
DcmDiagnosticSessionControl by calling
SchM_Switch_<bsnp>_DcmDiagnosticSessionControl() with the new diagnostic
session type (see SWS_Dcm_00778).⌋()BSW04015)
[SWS_Dcm_00373] ⌈On reception of a request for UDS Service 0x11 with the sub
functions other than enableRapidPowerShutDown (0x04) or
disableRapidPowerShutDown (0x05), the DCM module shall trigger the mode switch
of ModeDeclarationGroupPrototype DcmEcuReset equal to the received resetType.
After the mode switch is requested the DCM shall trigger the start of the positive
response message transmission.
Sub function hardReset (0x01) to HARD
Sub function keyOffOnReset (0x02) to KEYONOFF,
Sub function softReset (0x03) to SOFT⌋()
Note: By this mode switch the DCM informs the BswM to prepare the shutdown of
the ECU.
Note: By this final mode switch the DCM request the BswM to finally shutdown the
ECU and to to perform the reset.
[SWS_Dcm_00818] ⌈On reception of a request for UDS Service 0x11 with the sub
functions enableRapidPowerShutdown (0x04) or disableRapidPowerShutdown
(0x05), the DCM module shall trigger the mode switch of
ModeDeclarationGroupPrototype DcmRapidPowerShutDown:
When using paged buffer mechanism, in some case, it’s possible that the number of
DTC matching the filter change between the calculation of the total size, needed for
the first page transmission, and the sending of the further pages. For this reason, the
following requirement apply :
[SWS_Dcm_00587] ⌈In case of paged buffer support is enabled, The DCM shall
limit the response size to the size calculated when sending the first page. If more
DTCs match the filter after this sending, the additional DTCs shall not be
considered.⌋()
[SWS_Dcm_00588] ⌈In case of paged buffer support is enabled,The DCM shall pad
the response with the size calculated when sending the first page. If less DTC match
the filter after this sending, the missing DTCs shall be padded with 0 value as
defined in 15031-6.⌋()
7.4.2.5.3 UDS Service 0x19 with subfunction 0x08 (report DTC by Severity Mask
Record)
UDS Service 0x19 with subfunction 0x08 requests the DTCs and the associated
status that match a tester-defined severity mask record. The service request
contains the following parameters:
DTCSeverityMask
DTCStatusMask
⌋()
reportDTCBySeverityMaskRecord
⌋(SRS_Dia
g_04010)
Note: The DCM module can get an indication of the number of records that will be
found using Dem_DcmGetNextFilteredDTCAndSeverity() by using
Dem_DcmGetNumberOfFilteredDTC().
7.4.2.5.4 UDS Service 0x19 with subfunction 0x09 (report Severity Information of
DTC)
UDS Service 0x19 with subfunction 0x09 requests the severity information of a DTC.
The service request contains the parameter:
DTCMaskRecord
⌋(SRS_Diag_04010)
7.4.2.5.5 Service 0x19 subfunctions 0x06/0x10 + DTC + 0xFF – Report all Extended
Data Records for a particular DTC
UDS Service 0x19 with subfunction 0x06 or 0x10 and
DTCExtendedDataRecordNumber=0xFF requests all Extended Data Records for a
specific DTC. The request contains:
DTCMaskRecord
DTCExtendedDataRecordNumber (equal to 0xFF)
reportDTCExtendedDataRe reportMirrorMemoryDTCExte
cordByDTCNumber ndedDataRecordByDTCNum
ber
0x06 0x10
DTC DTCMaskRecord from DTCMaskRecord from request
request
DTCOrigin PRIMARY_MEMORY MIRROR_MEMORY
⌋(SRS_Diag_04010, BSW04058)
reportDTCExtendedDataRe reportMirrorMemoryDTCExte
cordByDTCNumber ndedDataRecordByDTCNum
ber
0x06 0x10
DTC DTCMaskRecord from DTCMaskRecord from request
request
DTCOrigin PRIMARY_MEMORY MIRROR_MEMORY
ExtendedDataNumber 0x01 to 0xEF 0x01 to 0xEF
108 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
⌋(SRS_Diag_04010, BSW04058)
The DTCExtendedDataRecordNumber is equal to the ExtendedDataNumber, which
is used an IN parameter in the DEM interface
Dem_DcmGetExtendedDataRecordByDTC()
[SWS_Dcm_00478] ⌈ The DCM module shall obtain the size of the data returned by
DEM in Dem_DcmGetExtendedDataRecordByDTC() call by using
Dem_DcmGetSizeOfExtendedDataRecordByDTC().⌋(SRS_Diag_04010)
To get the size of all extended datas (corresponding to the sum of the size of
extended record number(s) and the size of extended record(s) data), the DCM
module call Dem_DcmGetSizeOfExtendedDataRecordByDTC()with
ExtendedDataNumber set to 0xFF.
7.4.2.5.6 Service 0x19 subfunctions 0x06/0x10 + DTC + 0xFE – Report all OBD
Extended Data Records for a particular DTC
UDS Service 0x19 with subfunction 0x06 or 0x10 and
DTCExtendedDataRecordNumber=0xFE requests all OBD Extended Data Records
for a specific DTC. The request contains:
DTCMaskRecord
DTCExtendedDataRecordNumber (equal to 0xFE)
reportDTCExtendedDataRe reportMirrorMemoryDTCExte
cordByDTCNumber ndedDataRecordByDTCNum
ber
0x06 0x10
DTC DTCMaskRecord from DTCMaskRecord from request
request
DTCOrigin PRIMARY_MEMORY MIRROR_MEMORY
⌋(SRS_Diag_04010, BSW04058)
reportDTCExtendedDataRe reportMirrorMemoryDTCExte
cordByDTCNumber ndedDataRecordByDTCNum
ber
0x06 0x10
DTC DTCMaskRecord from DTCMaskRecord from request
request
DTCOrigin PRIMARY_MEMORY MIRROR_MEMORY
ExtendedDataNumber 0x90 to 0xEF 0x90 to 0xEF
⌋(SRS_Diag_04010, BSW04058)
The DTCExtendedDataRecordNumber is equal to the ExtendedDataNumber, which
is used an IN parameter in the DEM interface
Dem_DcmGetExtendedDataRecordByDTC().
As required in SWS_Dcm_00478, the DCM module shall obtain the size of the
extended data record by using
Dem_DcmGetSizeOfExtendedDataRecordByDTC().
To get the size of all OBD related extended data (corresponding to the sum of the
size of extended record number(s) and the size of extended record(s) data), the
DCM module call Dem_DcmGetSizeOfExtendedDataRecordByDTC() with
ExtendedDataNumber set to 0xFE.
7.4.2.5.7 Service 0x19 subfunctions 0x06/0x10 + DTC + (not 0xFF nor 0xFE) – Report
one specific Extended Data Record for a particular DTC
The UDS Service 0x19 with subfunction 0x06 or 0x10 and
DTCExtendedDataRecordNumber different from 0xFF or 0xFE requests a specific
Extended Data Records for a specific DTC. The service request contains the
parameters:
DTCMaskRecord
DTCExtendedDataRecordNumber (different from 0xFF or 0xFE)
reportDTCExtendedDataRec reportMirrorMemoryDTCExten
ordByDTCNumber dedDataRecordByDTCNumber
0x06 0x10
DTC DTCMaskRecord from request DTCMaskRecord from request
DTCOrigin PRIMARY_MEMORY MIRROR_MEMORY
ExtendedDataNumber DTCExtendedDataRecordNum DTCExtendedDataRecordNumb
ber from request er from request
As required in SWS_Dcm_00478, the DCM module shall obtain the size of the
extended data record by using
Dem_DcmGetSizeOfExtendedDataRecordByDTC().
7.4.2.5.8 UDS Service 0x19 subfunctions 0x03 – Report DTC Snapshot Record
Identification
UDS Service 0x19 with subfunction 0x03 allows an external tester to request the
corresponding DTCs for all FreezeFrame records present in an ECU.
Dem_DcmSetFreezeRecordFilter
NumberOfFilteredRecords Example:
1 2 3 4 10
… ...
DCM Dem_DcmGetNextFilteredRecord
DTC2
DTC1 DTC1 NoDTC Wrong
… ...
ForRecord Record
NumberOfFilteredRecords
DTC
Function call
Return value(s) RecordNumbers must be absolute
When using paged buffer mechanism, in some case, it’s possible that the number of
DTC matching the filter change between the calculation of the total size, needed for
the first page transmission, and the sending of the further pages. For this reason, the
requirement SWS_Dcm_00587 and SWS_Dcm_00588 shall be considered for the
implementation of this subservice.
7.4.2.5.9 UDS Service 0x19 subfunctions 0x04 – Report DTC Snapshot Record by DTC
Number
Using UDS Service 0x19 with subfunction 0x04 an external tester can request
FreezeFrame information for one or all FreezeFrames of a specific DTC. The service
request contains parameters:
DTCMaskRecord
DTCSnapshotRecordNumber
[SWS_Dcm_00441] ⌈ The DCM module shall obtain the size of the data returned by
DEM in Dem_DcmGetFreezeFrameDataByDTC()call by using
Dem_DcmGetSizeOfFreezeFrameByDTC().⌋(SRS_Diag_04010, BSW04079)
To get the size of all FreezeFrame data, the DCM module call
Dem_DcmGetSizeOfFreezeFrameByDTC()with RecordNumber set to 0xFF.
7.4.2.5.10 UDS Service 0x19 with subfunction 0x05 (Report DTC Snapshot Record by
Record Number)
UDS Service 0x19 with subfunction 0x05 allows an external tester to request
FreezeFrame information for a specific FreezeFrame record number. The service
request contains parameter:
DTCSnapshotRecordNumber
DTCOrigin: DEM_DTC_ORIGIN_PRIMARY_MEMORY
BufSize: Data size available in the transmit buffer
DestBuffer: Address where the DEM shall copy the freeze frame
data⌋(SRS_Diag_04010, BSW04058)
DTCStatusMask 0x00
DTCKind DEM_DTC_KIND_ALL_DTCS
DTCFormat DEM_DTC_FORMAT_UDS
DTCOrigin PRIMARY_MEMORY
FilterWithSeverity NO
DTCSeverityMask Not relevant
FilterForFaultDetectionCounter YES
⌋(SRS_Diag_04010, BSW04058)
[SWS_Dcm_00681] ⌈ The DCM module shall obtain the number of records that will
be found using Dem_DcmGetNextFilteredDTCAndFDC() by using
Dem_DcmGetNumberOfFilteredDTC().⌋()
This allows the implementation to calculate the total size of the response before
cycling through the DTCs.
When using paged buffer mechanism, in some case, it’s possible that the number of
DTC matching the filter change between the calculation of the total size, needed for
the first page transmission, and the sending of the further pages. For this reason, the
117 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
requirement SWS_Dcm_00587 and SWS_Dcm_00588 shall be considered for the
implementation of this subservice.
With UDS Service 0x22, the tester can request the value of one or more DIDs.
[constr_6023] DcmDspDidRef shall not reference the same DID reference twice ⌈
DcmDspDid container shall not include the same DcmDspDidRef parameters more
than once. ⌋()
To obtain scaling information, the tester can invoke UDS Service 0x24 with the 2-
byte DID as parameter.
The configuration of the DCM contains for each configured DID:
The 2-byte DID (see configuration parameter DcmDspDidIdentifier)
For every data of the DID :
The function GetScalingInformation (see configuration parameters
DcmDspDataGetScalingInfoFnc and DcmDspDataUsePort)
The length of the ScalingInfo returned by the GetScalingInformation
function (see configuration parameter DcmDspDataScalingInfoSize)
The purpose of this service is to provide a means to access data and/or diagnostic
services, which have restricted access for security, emissions, or safety reasons.
The following list gives as an example, which errors can be detected by the security
access service and stored in the error code information:
RequestSequenceError (NRC 0x24), when invalid access type is send at
“send key”,
RequiredTimeDelayNotExpired (NRC 0x37), when time delay is active (see
configuration parameter DcmDspSecurityDelayTime),
ExeedNumberOfAttempts (NRC 0x36), when number of attempts to get
security access exceeds (see configuration parameter
DcmDspSecurityNumAttDelay), and
InvalidKey (NRC 0x35), when invalid key is send at “send key”.
[SWS_Dcm_00325] ⌈ If no errors are detected, the DSP submodule shall set the
new access type with DslInternal_SetSecurityLevel().⌋()
When using Service 0x2E, the request of the tester contains a 2-byte DID and a
dataRecord with the data to be written.
The configuration of the DCM contains a list of supported DIDs and defines for each
configured DID:
The 2-byte DID (see configuration parameter DcmDspDidIdentifier)
For every data of the DID:
The function WriteData to be used for this data (see configuration
parameters DcmDspDataWriteFnc and DcmDspDataUsePort)
4.b) Otherwise (on any NvM failure) the DCM module shall trigger a negative
response with NRC 0x10 (GeneralReject).⌋()
In other case the DCM won’t be able to split the data from the request
When using Service 0x2F, the request of the tester contains a 2-byte DID.
129 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
The configuration of the DCM contains a list of supported DID’s. For each DID, the
DCM configuration specifies:
The 2-bytes DID (see configuration parameter DcmDspDidIdentifier)
For every data of the DID :
The function Xxx_ReturnControlToECU() for this data (see
configuration parameters DcmDspDataReturnControlToEcuFnc and
DcmDspDataUsePort)
The function Xxx_ResetToDefault() for this data (see configuration
parameters DcmDspDataResetToDefaultFnc and
DcmDspDataUsePort)
The function Xxx_FreezeCurrentState() for this DID (see
configuration parameters DcmDspDataFreezeCurrentStateFnc and
DcmDspDataUsePort)
The function Xxx_ShortTermAdjustment() for this DID (see
configuration parameters DcmDspDataShortTermAdjustmentFnc and
DcmDspDataUsePort)
The sizes of the control record used in the function
Xxx_ShortTermAdjustment() (see configuration parameter and
DcmDspDataSize)
Hex Description
00 returnControlToECU
01 resetToDefault
02 freezeCurrentState
03 shortTermAdjustment
⌋()
[SWS_Dcm_00858] ⌈ On any session transition, the DCM shall stop all controls in
progress which are not support in the new session anymore:
[SWS_Dcm_00859] ⌈ On any security level change, the DCM shall stop all controls
in progress which are not support by the new security level anymore:
A tester can use UDS Service 0x31 to start, stop or obtain the results of a routine
identified by a 2-byte routineIdentifier.
The DCM module configuration contains a list of the routineIdentifiers (see
configuration parameter DcmDspRoutineIdentifier) supported by the DCM. For
each routineIdentifier, the DCM configuration specifies:
The function Xxx_Start() associated with this routineIdentifier (see
configuration parameters DcmDspStartRoutineFnc and
DcmDspRoutineUsePort)
[SWS_Dcm_00251] ⌈ The DCM module shall implement the Tester Present (service
0x3E, diagnostic communication and security) of the Unified Diagnostic Services for
the subfunction values 0x00 and 0x80.⌋()
This service is used to keep one or multiple servers in a diagnostic session being
different than the defaultSession.
7.4.2.15 UDS Service 0x85 - ControlDTCSetting
An external test tool can request an ECU to either disable or enable DTC storage in
the ECUs error memory by sending a UDS Service 0x85 request with subfunction on
or off.
For some use-cases the DCM may re-enable the controlDTCsetting due to external
changed mode conditions:
Note: This active observation of the referenced mode declaration groups can either
be achieved by polling the mode condtion each MainFuntion cycle or by attaching to
the change notification of mode declaration group (SchM will trigger a BSWEntitiy in
DCM on changes of this mode declaration group)
For some use-cases the DCM may re-enable the CommunicationControl due to
external changed mode conditions:
[SWS_Dcm_00753] ⌈The DCM module shall do for all NetworkHandles wich are
currently under control (state other DCM_ENABLE_RX_TX_NORM_NM) in case at
least one referenced arbitrary ModeDeclarationGroupPrototype (see configuration
parameter DcmDspComControlCommunicationReEnableModeRuleRef) is not
fulfilled anymore:
1) trigger the mode switches of each Dcm_CommunicationControl_<Network>
ModeDeclarationGroupPrototype to mode
DCM_ENABLE_RX_TX_NORM_NM
2) call BswM_Dcm_CommunicationMode_CurrentState with the parameters
NetworkHandleType and RequestedCommunicationMode set to
DCM_ENABLE_RX_TX_NORM_NM⌋()
The Service LinkControl (0x87) is user optional. There are different project
specific use cases which are not handled in the default Dcm. One use case is to
switch the bandwidth in application an other use case performs an OEM bootloader
jump.
7.4.3.1 Overview
The following table defines the OBD Services supported by the DCM.
Relevant OBD Support in the DCM
Service
Identifier
$01 Supported
$02 Supported
$03 Supported
$04 Supported
$06 Supported
$07 Supported
$08 Supported
$09 Supported
$0A Supported
From the Basic Software point of view Dependent / Secondary ECUs doesn't need
any specific OBD functionality. In Dependent / Secondary ECUs OBD-relevant
information will not be stored in the Basic Software (e.g. no direct communication
148 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
with the scan tool). The respective OBD functionality might be handeled in
Dependent / Secondary ECUs by a SWC.
The following OBD requirements are only valid for Master and Primary ECUs.
If necessary the OBD requirements differenciate between Master and Primary
Requirement.
The following table gives an overview about which OBD functionality must be
supported in a Master ECU, Primary ECU or Dependent / Secondary ECU:
[SWS_Dcm_00077] ⌈ When calling the DEM module for OBD services, the DCM
module shall use the following values for the parameter DTCOrigin:
Service $0A uses DEM_DTC_ORIGIN_PERMANENT_MEMORY
All other services use DEM_DTC_ORIGIN_PRIMARY_MEMORY⌋(BSW04058)
[SWS_Dcm_00243] ⌈ The DCM module shall implement the OBD service $01
(Request Current Powertrain diagnostic Data) in compliance to all provisions of the
OBD standard.⌋(BSW04082, BSW04001)
Using Service $01, an external test tool can request an emission-related ECU to
return PID-values or to return the supported PIDs. OBD reserves certain PIDs for
the special purpose of obtaining the list of available PIDs in a certain range. These
PIDs are called “availability PIDs” and are $00, $20, $40, $60, $80, $A0, $C0 an
$E0.
The DCM collects the PID information from 1 to n SW-Cs. This applies in particular
for PIDs which contain several data values for potentially different sources.
Example: PID$83 reports Nox Sensor Data for sensor 1 and sensor 2 in one
composed PID which might come from different SW-C.
The DCM configuration defines the PIDs that are available on the ECU. The DCM
configuration defines for each such PID:
The PID Identifier (see configuration parameter DcmDspPidIdentifier)
Indication of the PID is used or not (for postbuild configuration) (see
configuration parameter DcmDspPidUsed)
The size of the PID (see configuration parameter DcmDspPidSize)
The supported information for this PID (see configuration parameter
DcmDspPidSupportInfo)
The length of the data associated with the PID (see configuration
parameter DcmDspPidDataSize)
The position of the data in the PID (see configuration parameter
DcmDspPidDataPos)
The reference to the supported information container (see configuration
parameter DcmDspPidDataSupportInfo)
The Xxx_ReadData() function that the DCM must call to obtain the
current value of the data or the name of the port that the DCM uses to
obtain the current value through the RTE from a SW-C (see configuration
parameters DcmDspPidDataReadFnc and DcmDspPidDataUsePort)
To obtain the value for a PID, the DCM uses the configured Xxx_ReadData()
functions for every data of the PID.
To provide OBD Service $01, the DCM relies on external functions that allow it to
obtain the value of the PIDs. There is one such function per data of every PID that is
needed by the DCM.
When using a Xxx_ReadData() function, the DCM provides a buffer of the correct
length, which is filled by the function with the data PID value.
The entity providing the actual implementation of the Xxx_ReadData() function for
a specific signal of a PID might be a SW-C or another basic software module. The
origin of the function is not known to the DCM but is part of the DCM configuration.
Some PIDs are provided by the DEM. These PIDs are also explicitly configured in
the DCM configuration and it is the responsibility of a correct DCM configuration to
make the Xxx_ReadData() function point to the correct function provided by the
DEM.
For certain PIDs, the DEM provides the function to obtain the PID value. Which
PIDs come from the DEM are part of the DCM configuration.
The data byte A of the PIDs contain the support status of the subsequent data bytes.
Since not all data values might be available due to the particular vehicle
configuration (e.g. there is only a Nox-sensor 1 available in the vehicle in the
example above), the PID response contains in this data byte A the information about
the support status of the following data values. Note, that the PIDs always contain
the same number of bytes – even if not all values are really available.
The response to the OBD-tester needs to be composed out of the available data
values. Data bytes that are not provided by an SW-C need to be replaced with
fill-byte to obtain a complete PID contents.
[SWS_Dcm_00623] ⌈When responding to OBD Service $01, the DCM shall put fill-
bytes between DcmDspPidData in the PID whenever content bytes are missing in
order to fit to the PID size (see configuration parameter DcmDspPidSize).⌋()
Note: If other fill-bytes than 0x00 are needed by legistlation, the application has to
provide the value of the fill-byte.
[SWS_Dcm_00244] ⌈ The DCM shall implement OBD Service $02 (Request Power
Train FreezeFrame Data) in compliance to all provisions of the OBD
standard.⌋(BSW04082, BSW04001)
[SWS_Dcm_00973] ⌈When responding to OBD Service $02, the DCM shall put fill-
bytes between DcmDspPidData in the PID whenever content bytes are missing in
order to fit to the PID size (see configuration parameter DcmDspPidSize).⌋()
Note: If other fill-bytes than 0x00 are needed by legistlation, the application has to
provide the value of the fill-byte.
The following sections define how specific PIDs are handled by the DCM.
7.4.3.4.1 OBD Service $02 – PID$02 – Request for the DTC of a specific FreezeFrame
An external tester can request the DTC that caused a FreezeFrame to be stored by
using the Service $02 with the PID value $02.
[SWS_Dcm_00279] ⌈ On reception of a request for Service $02 with PID $02, the
DCM shall call Dem_DcmGetDTCOfOBDFreezeFrame() with FrameNumber set to
0x00 to get the DTC number⌋(SRS_Diag_04010, BSW04058)
7.4.3.4.3 OBD Service $02 – other PIDs – Request the data records assigned to a
specific PID included in a specific FreezeFrame
Using Service $02, an external tester may request the values of specific PIDs in
specific FreezeFrames.
Note that is not necessary for the DCM module to lock or unlock the record updates
of the DEM module.
[SWS_Dcm_00245] ⌈ The DCM module shall implement OBD Service $03 (Request
emission-related diagnostic trouble codes) in compliance to all provisions of the OBD
standard.⌋(BSW04082, BSW04001)
[SWS_Dcm_00410] ⌈ The DCM module shall implement OBD Service $07 (Request
Emission-Related Diagnostic Trouble Codes Detected during Current or Last
Completed Driving Cycle) in compliance to all provisions of the OBD
standard.⌋(BSW04082, BSW04001)
[SWS_Dcm_00411] ⌈ The DCM module shall implement OBD Service $0A (Request
Emission-Related Diagnostic Trouble Codes with Permanent Status) in compliance
to all provisions of the OBD standard.⌋(BSW04082, BSW04001)
An external test tool can request an emission-related ECU to report all stored,
pending or permanent emission-related DTCs by sending the request $03, $07, $0A
respectively.
[SWS_Dcm_00289] ⌈ When receiving a request for OBD Service $03, the DCM
module shall obtain from the DEM all DTCs in primary memory and with a
“confirmed” status using the functions Dem_DcmSetDTCFilter() and
Dem_DcmGetNextFilteredDTC().⌋(SRS_Diag_04010)
[SWS_Dcm_00412] ⌈ When receiving a request for OBD Service $07, the DCM
module shall obtain from the DEM module all DTCs in primary memory with a
“pending” status using the functions Dem_DcmSetDTCFilter() and
Dem_DcmGetNextFilteredDTC().⌋(SRS_Diag_04010)
[SWS_Dcm_00330] ⌈ When receiving a request for OBD Service $0A, the DCM
module shall obtain from the DEM all DTCs stored in permanent memory using the
functions Dem_DcmSetDTCFilter() and
Dem_DcmGetNextFilteredDTC().⌋(SRS_Diag_04010)
The following table illustrates the parameters the DCM module must use when
calling Dem_DcmSetDTCFilter() in response to a request for OBD Service $03,
$07 or $0A.
Parameters to Dem_DcmSetDTCFilter
OBD Service $03 $07 $0A
DTCStatusMask 0x08 0x04 0x00
(confirmed bit set) (pending bit set)
DTCKind DEM_DTC_KIND_ DEM_DTC_KIND_ DEM_DTC_KIND_
EMISSION_REL_DT EMISSION_REL_DT EMISSION_REL_DTC
CS CS S
DTCFormat DEM_DTC_FORMAT DEM_DTC_FORMAT DEM_DTC_FORMAT_
_OBD _OBD OBD
DTCOrigin DEM_DTC_ORIGIN_ DEM_DTC_ORIGIN_ DEM_DTC_ORIGIN_
PRIMARY_MEMORY PRIMARY_MEMORY PERMANENT
FilterWithSeverity DEM_FILTER_WITH DEM_FILTER_WITH DEM_FILTER_WITH_
_ _ SEVERITY_NO
SEVERITY_NO SEVERITY_NO
DTCSeverityMask Not relevant Not relevant Not relevant
FilterForFault DEM_FILTER_ DEM_FILTER_ DEM_FILTER_
DetectionCounter FOR_FDC_NO FOR_FDC_NO FOR_FDC_NO
154 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
When using paged buffer mechanism, in some case, it’s possible that the number of
DTC matching the filter change between the calculation of the total size, needed for
the first page transmission, and the sending of the further pages. For this reason, the
requirement SWS_Dcm_00587 and SWS_Dcm_00588 shall be considered for the
implementation of this service.
An external test tool can request an emission–related ECU to clear the error memory
by sending the request $04.
[SWS_Dcm_00004] ⌈ When receiving a request for OBD Service $04, the DCM
module shall call the operation DcmClearDTC with the following parameter values:
DTC = DEM_DTC_GROUP_ALL_DTCS
DTCFormat: DEM_DTC_FORMAT_OBD
DTCOrigin = DEM_DTC_ORIGIN_PRIMARY_MEMORY⌋(SRS_Diag_04010,
BSW04058, BSW04065)
[SWS_Dcm_00414] ⌈ The DCM module shall implement OBD Service $06 (Request
On-Board Monitoring Test-results for Specific Monitored Systems) in compliance to
all provisions of the OBD standard.⌋(BSW04082, BSW04001)
Using Service $06, an external test tool can request an emission-related ECU to
return the DTR’s associated with the OBDMID or to return the supported OBDMIDs.
OBD reserves certain OBDMIDs for the special purpose of obtaining the list of
supported OBDMIDs in a certain range. These OBDMIDs are called “availability
OBDMIDs” and are $00, $20, $40, $60, $80, $A0, $C0 an $E0.
A tester request for supported OBDMIDs may contain up to six (6) “availability
OBDMIDs”.
[SWS_Dcm_00417] ⌈ The DCM module shall implement OBD Service $08 (Request
Control of On-Board System, Test or Component) in compliance to all provisions of
the OBD standard.⌋(BSW04082, BSW04001)
Using Service $08, an external test tool can control an on-board system, test or
component using a TID. OBD reserves certain TIDs for the special purpose of
obtaining the list of supported TIDs in a certain range. These TIDs are called
“availability TIDs” and are $00, $20, $40, $60, $80, $A0, $C0 an $E0.
The DCM module’s configuration defines the TIDs that are available on the ECU for
the purpose of OBD Service $08. The configuration defines for each such TID (see
configuration parameter DcmDspRequestControlTestId):
the name of the port the DCM uses to access the RequestControlServices
interface (see configuration parameter DcmDspRequestControl)
the number of bytes this function takes as input (see configuration parameter
DcmDspRequestControlInBufferSize)
the number of bytes this function writes as output (see configuration
parameter DcmDspRequestControlOutBufferSize)
To provide OBD Service $08, the DCM relies on external functions configured per
TID
[SWS_Dcm_00421] ⌈ The DCM module shall implement OBD Service $09 (Request
Vehicle Information) in compliance to all provisions of the OBD
standard.⌋(BSW04082, BSW04001)
Using Service $09, an external test tool can request vehicle information or can obtain
lists of supported vehicle information. OBD reserves certain InfoTypes for the
special purpose of obtaining the list of supported InfoTypes in a certain range.
These Infotypes are called “availability InfoTypes” and are $00, $20, $40, $60, $80,
$A0, $C0 an $E0.
The DCM module’s configuration defines the InfoTypes and associated data that are
available on one or several SW-C. The configuration defines for each such
InfoType:
The value of InfoType (see configuration parameter
DcmDspVehInfoInfoType)
For every data of the InfoType:
o The position of this data in the InfoType (see configuration parameter
DcmDspVehInfoDataOrder)
o the size of the value of the InfoType data (see configuration parameter
DcmDspVehInfoDataSize)
o the function that the DCM module must call to obtain the value for this
InfoType data OR the port-name through which the DCM module can
obtain the value for this InfoType data (see configuration parameter
DcmDspVehInfoDataReadFnc and DcmDspVehInfoDataUsePort).
To provide OBD Service $09, the DCM relies on external functions that allow it to
The DCM shall be able to manage a jump to the bootloader. Due to the diversity of
possibility to realize this jump, this will be done using callout call.
Note: By this mode switch the DCM informs the BswM to prepare the jump to the
bootloader.
Note: By this mode switch the DCM informs the BswM to prepare the jump to the
bootloader.
Note: This final transmission of NRC 0x78 before switching to Bootloader shall
reload the P2* timout in the client.
This will allow to store all relevant information prior to jumping to the bootloader.
Note: It is up to the software integrator to decide where to store that data. Usually it
will be stored in non-volatile memory like e.g. data flash. It is also acceptable to
"store" this data in a RAM section which is not initialized out of reset.
Note: If the NRC 0x78 request has not been sent correctly the Dcm will stay in the
application and wait for the next request from the Client.
Note: It is the responsibility of the software integrator to ensure that the data
contained in Dcm_ProgConditionsType is valid when Dcm_Init is called. E.g. if this
data is stored in non-volatile memory, it may take some time to make it available
after an ECU reset. This has to be taken into account when designing the ECU's
startup process.
[SWS_Dcm_00767] ⌈ When the ComM reports full communication to the Dcm, the
Dcm shall send the Response to the Service Id passed in the
Dcm_ProgConditionsType. ⌋(BSW04098)
The Dcm_SetProgConditions() API shall be called again in the next Dcm main
function cycle if previous return status was E_PENDING.
In case that, during jump to Bootloader, the Dcm_SetProgConditions() API
returns E_NOT_OK, a DET error shall be reported
(DCM_E_SET_PROG_CONDITIONS_FAIL) and normal functionality will resume.
7.4.4.3.2 Jump from Bootloader
After successful reprograming of the application software, the bootloader will update
the ApplUpdated flag and the ResponseRequired flags.
After an ECU reset, when the newly programmed application is started for the first
time, the Dcm will read the ApplUpdated and ResponseRequired flag by calling
Dcm_GetProgConditions(). During this function call the ApplUpdated and
ResponseRequired flags are cleared by the integration code.
[SWS_Dcm_00044] ⌈ The used return values shall be the same for development
and production. Only the values given by the DCM SWS shall be used.⌋(BSW00369)
[SWS_Dcm_00052] ⌈ The header file of the DCM, DCM.h, shall provide a module ID
called DCM_MODULE_ID set to the value 0x35.⌋()
The DCM can access data using an R-Port requiring either a synchronous or an
asynchronous ClientServertInterface DataServices_{Data}. In the DCM SWS, the
parameter DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER or
USE_DATA_ASYNCH_CLIENT_SERVER.
The DID range configuration, used to handle a set of DIDs sharing the same
behavior uniformly in one SW-C with only one port-connection. The interface
DataServices_DIDRange_{Range} should be used in this case. Using this
configuration allows an interface optimization.
The following parameters shall be configured in order to use the DIDRange
optimization: DcmDspDidRangeIdentifierLowerLimit and
DcmDspDidRangeIdentifierUpperLimit which delimited the range of the
DIDs. DcmDspDidRangeMaxDataLength and DcmDspDidRangeHasGaps
.
DID ranges are in general the same as the 'normal' DID read and write function,
except that the DID is also passed as a parameter.
This allows to treat the DID range in a switch/case in the read or the write function.
The ranges can be applied for reading (ReadDataByIdentifier 0x22) and writing
(WriteDataByIdentifier 0x2E) DIDs.
In general, the range functionality can also be used for a single DID if you specifically
want to pass the DID as a parameter. Then lower DID and upper DID should be the
same.
[constr_6020] Definition of allowed DID access ⌈ Any defined range shall only
reference via DcmDspDidRangeInfoRef. The DcmDspDidInfo defines the access
DcmDspDidAccess. The sub-containers DcmDspDidControl and
DcmDspDidDefine shall not be used] .⌋()
8 API specification
This section defines:
The syntax and semantics of the functions that are provided and required
from other BSW modules. These take the form of “C”-APIs.
The syntax and semantics of a subset of those functions which are used by
software-components through the RTE. These take the form of descriptions
using the concepts of the Software-Component Template.
Name Dcm_OpStatusType
Kind Type
Derived
uint8
from
Description --
Variation --
⌋()
Name Dcm_ConfirmationStatusType
Kind Type
Description --
DCM_RES_POS_OK 0x00 --
DCM_RES_POS_NOT_OK 0x01 --
Range
DCM_RES_NEG_OK 0x02 --
DCM_RES_NEG_NOT_OK 0x03 --
Variation --
⌋()
[SWS_Dcm_01003] ⌈ ImplementationDataType _Dcm_SecLevelType
Name Dcm_SecLevelType
Kind Type
DCM_SEC_LEV_LOCKED 0x00 --
Variation --
⌋()
[SWS_Dcm_01004] ⌈ ImplementationDataType Dcm_SecCtrlType
Name Dcm_SesCtrlType
Kind Type
Derived
uint8
from
Description Session type definition. 0, 127 and all values above 127 are reserved by ISO.
DCM_DEFAULT_SESSION 0x01 --
DCM_PROGRAMMING_SESSION 0x02 --
DCM_EXTENDED_DIAGNOSTIC_SESSION 0x03 --
(according to
"diagnosticSessionType"
configuration dependent 0x40...0x7E parameter of
DiagnosticSessionControl
request)
Variation --
⌋()
Kind Type
Derived
uint8
from
ISO15031-5))
UDS on FlexRay
DCM_UDS_ON_FLEXRAY 0x04 (Manufacturer specific;
ISO14229-1)
Response On Event on
DCM_ROE_ON_CAN 0x06
CAN
Response On Event on
DCM_ROE_ON_FLEXRAY 0x07
FlexRay
(Response on Event on
DCM_ROE_ON_IP 0x08
Internet Protocol)
Periodic Transmission on
DCM_PERIODICTRANS_ON_CAN 0x09
CAN
Periodic Transmission on
DCM_PERIODICTRANS_ON_FLEXRAY 0x0A
FlexRay
(Periodic Transmission on
DCM_PERIODICTRANS_ON_IP 0x0B
Internet Protocol)
Variation --
⌋()
Kind Type
Derived
uint8
from
This Table of available Negative Response Codes represents the allowed Response Codes an AUTOSAR SW
Component shall return after a function call.
Description
For the allowed NRC of the executed Service ID please refer to the specification of the service in ISO14229-1
(UDS) and ISO15031-5 (OBD/CARB) (see chapter 4.2.4 Response code parameter definition Table 12).
DCM_E_GENERALREJECT 0x10 GR
DCM_E_INVALIDKEY 0x35 IK
Variation --
⌋()
[SWS_Dcm_01011] ⌈ ImplementationDataType DataArrayType_{Data}
Name DataArrayType_{Data}
(({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataSize)}+7)/8) ||
Size (({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/
DcmDspPidDataSize)}+7/8) ) Elements
Description --
⌋()
[SWS_Dcm_01012] ⌈ ImplementationDataType DcmDspDidRangeArrayType_{Range}
Name DcmDspDidRangeArrayType_{Range}
Description --
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspDidRange.DcmDspDidRangeUsePort)} ==
Variation TRUE
Range = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspDidRange.SHORT-NAME)}
⌋()
[SWS_Dcm_01013] ⌈ ImplementationDataType InfoTypeServicesArrayType_{VehInfoData}
Name InfoTypeServicesArrayType_{VehInfoData}
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspVehInfo/DcmDspVehInfoData.
Size
DcmDspVehInfoDataSize)} Elements
Description --
VehInfoData = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspVehInfo/
Variation
DcmDspVehInfoData.SHORT-NAME)}
⌋()
[SWS_Dcm_01014] ⌈ ImplementationDataType RequestControlServicesInArrayType_{Tid}
Name RequestControlServicesInArrayType_{Tid}
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRequestControl.
Size
DcmDspRequestControlInBufferSize)} Elements
Description --
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRequestControl.
Size
DcmDspRequestControlOutBufferSize)} Elements
Description --
⌋()
[SWS_Dcm_01017] ⌈ ImplementationDataType ScalingInfoArrayType_{Data}
Name ScalingInfoArrayType_{Data}
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspDataInfo.DcmDspDataScalingInfoSize)}
Size
Elements
Description --
(({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_ASYNCH_CLIENT_SERVER) || ({ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspData.DcmDspDataUsePort)} == USE_DATA_SYNCH_CLIENT_SERVER)) &&
Variation
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData->DcmDspDataInfoRef.
DcmDspDataScalingInfoSize)} != NULL)
Data = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.SHORT-NAME)}
⌋()
[SWS_Dcm_01018] ⌈ ImplementationDataType RequestDataOutType_{Routine}_{Signal}
Name RequestDataOutType_{Routine}_{Signal}
Kind Type
BaseType Variation
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
boolean DcmDspRoutineRequestResOut.DcmDspRoutineRequestResOutSignal.
DcmDspRoutineSignalType)} == BOOLEAN
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
sint16 DcmDspRoutineRequestResOut.DcmDspRoutineRequestResOutSignal.
DcmDspRoutineSignalType)} == SINT16
Derivedfrom {ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
sint32 DcmDspRoutineRequestResOut.DcmDspRoutineRequestResOutSignal.
DcmDspRoutineSignalType)} == SINT32
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
sint8 DcmDspRoutineRequestResOut.DcmDspRoutineRequestResOutSignal.
DcmDspRoutineSignalType)} == SINT8
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
uint16 DcmDspRoutineRequestResOut.DcmDspRoutineRequestResOutSignal.
DcmDspRoutineSignalType)} == UINT16
176 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
uint32 DcmDspRoutineRequestResOut.DcmDspRoutineRequestResOutSignal.
DcmDspRoutineSignalType)} == UINT32
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
uint8 DcmDspRoutineRequestResOut.DcmDspRoutineRequestResOutSignal.
DcmDspRoutineSignalType)} == UINT8
Description --
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineRequestResOut.DcmDspRoutineRequestResOutSignal.SHORT-
Variation
NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.SHORT-NAME)}
⌋()
[SWS_Dcm_01019] ⌈ ImplementationDataType
RequestFlexibleOutArrayDataType_{Routine}_{Signal}
Name RequestFlexibleOutArrayDataType_{Routine}_{Signal}
{(ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspRequestRoutineOut.
Size
DcmDspRequestRoutineOutSignal.DcmDspRoutineSignalLength)+7)/8} Elements
Description --
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspRoutineRequestResOut.
DcmDspRoutineRequestResOutSignal.DcmDspRoutineSignalType)} ==
VARIABLE_LENGTH
Variation Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineRequestResOut.DcmDspRoutineRequestResOutSignal.SHORT-
NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.SHORT-NAME)}
⌋()
[SWS_Dcm_01020] ⌈ ImplementationDataType StartDataInType_{Routine}_{Signal}
Name StartDataInType_{Routine}_{Signal}
Kind Type
BaseType Variation
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineIn.
boolean DcmDspStartRoutineInSignal.DcmDspStartRoutineSignalType)} ==
BOOLEAN
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineIn.
sint16 DcmDspStartRoutineInSignal.DcmDspStartRoutineSignalType)} ==
Derivedfrom
SINT16
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineIn.
sint32 DcmDspStartRoutineInSignal.DcmDspStartRoutineSignalType)} ==
SINT32
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineIn.
sint8
DcmDspStartRoutineInSignal.DcmDspStartRoutineSignalType)} == SINT8
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineIn.
uint16 DcmDspStartRoutineInSignal.DcmDspStartRoutineSignalType)} ==
UINT16
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineIn.
uint32 DcmDspStartRoutineInSignal.DcmDspStartRoutineSignalType)} ==
UINT32
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineIn.
uint8
DcmDspStartRoutineInSignal.DcmDspStartRoutineSignalType)} == UINT8
Description --
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineInfoRef.
Variation DcmDspRoutineStartIn.DcmDspRoutineStartInSignal.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.SHORT-NAME)}
⌋()
[SWS_Dcm_01021] ⌈ ImplementationDataType StartDataOutType_{Routine}_{Signal}
Name StartDataOutType_{Routine}_{Signal}
Kind Type
BaseType Variation
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineOut.
boolean DcmDspStartRoutineOutSignal.DcmDspStartRoutineSignalType)} ==
BOOLEAN
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineOut.
sint16 DcmDspStartRoutineOutSignal.DcmDspStartRoutineSignalType)} ==
SINT16
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineOut.
sint32 DcmDspStartRoutineOutSignal.DcmDspStartRoutineSignalType)} ==
SINT32
Derivedfrom {ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineOut.
sint8 DcmDspStartRoutineOutSignal.DcmDspStartRoutineSignalType)} ==
SINT8
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineOut.
uint16 DcmDspStartRoutineOutSignal.DcmDspStartRoutineSignalType)} ==
UINT16
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineOut.
uint32 DcmDspStartRoutineOutSignal.DcmDspStartRoutineSignalType)} ==
UINT32
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineOut.
uint8 DcmDspStartRoutineOutSignal.DcmDspStartRoutineSignalType)} ==
UINT8
Description --
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineInfoRef.
Variation DcmDspRoutineStartOut.DcmDspRoutineStartOutSignal.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.SHORT-NAME)}
⌋()
178 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
[SWS_Dcm_01022] ⌈ ImplementationDataType StartFlexibleInArrayDataType
Name StartFlexibleInArrayDataType_{Routine}_{Signal}
{(ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineIn.
Size
DcmDspStartRoutineInSignal.DcmDspRoutineSignalLength)+7)/8} Elements
Description --
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspRoutineStartIn.
DcmDspRoutineStartInSignal.DcmDspRoutineSignalType)} == VARIABLE_LENGTH
Variation Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStartIn.DcmDspRoutineStartIn.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.SHORT-NAME)}
⌋()
[SWS_Dcm_01023] ⌈ ImplementationDataType StartFlexibleOutArrayDataType_{Routine}_{Signal}
Name StartFlexibleOutArrayDataType_{Routine}_{Signal}
{(ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStartRoutineOut.
Size
DcmDspStartRoutineOutSignal.DcmDspRoutineSignalLength)+7)/8} Elements
Description --
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspRoutineStartOut.
DcmDspRoutineStartOutSignal.DcmDspRoutineSignalType)} == VARIABLE_LENGTH
Variation Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStartOut.DcmDspRoutineStartOut.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.SHORT-NAME)}
⌋()
[SWS_Dcm_01024] ⌈ ImplementationDataType StopDataInType_{Routine}_{Signal}
Name StopDataInType_{Routine}_{Signal}
Kind Type
BaseType Variation
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineIn.
boolean DcmDspStopRoutineInSignal.DcmDspStopRoutineSignalType)} ==
BOOLEAN
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineIn.
sint16 DcmDspStopRoutineInSignal.DcmDspStopRoutineSignalType)} ==
SINT16
Derivedfrom
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineIn.
sint32 DcmDspStopRoutineInSignal.DcmDspStopRoutineSignalType)} ==
SINT32
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineIn.
sint8
DcmDspStopRoutineInSignal.DcmDspStopRoutineSignalType)} == SINT8
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineIn.
uint16
DcmDspStopRoutineInSignal.DcmDspStopRoutineSignalType)} ==
UINT16
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineIn.
uint32 DcmDspStopRoutineInSignal.DcmDspStopRoutineSignalType)} ==
UINT32
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineIn.
uint8
DcmDspStopRoutineInSignal.DcmDspStopRoutineSignalType)} == UINT8
Description --
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineInfoRef.
Variation DcmDspRoutineStopIn.DcmDspRoutineStopInSignal.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.SHORT-NAME)}
⌋()
[SWS_Dcm_01025] ⌈ ImplementationDataType StopDataOutType_{Routine}_{Signal}
Name StopDataOutType_{Routine}_{Signal}
Kind Type
BaseType Variation
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineOut.
boolean DcmDspStopRoutineOutSignal.DcmDspStopRoutineSignalType)} ==
BOOLEAN
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineOut.
sint16 DcmDspStopRoutineOutSignal.DcmDspStopRoutineSignalType)} ==
SINT16
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineOut.
sint32 DcmDspStopRoutineOutSignal.DcmDspStopRoutineSignalType)} ==
SINT32
Derivedfrom {ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineOut.
sint8 DcmDspStopRoutineOutSignal.DcmDspStopRoutineSignalType)} ==
SINT8
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineOut.
uint16 DcmDspStopRoutineOutSignal.DcmDspStopRoutineSignalType)} ==
UINT16
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineOut.
uint32 DcmDspStopRoutineOutSignal.DcmDspStopRoutineSignalType)} ==
UINT32
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineOut.
uint8 DcmDspStopRoutineOutSignal.DcmDspStopRoutineSignalType)} ==
UINT8
Description --
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineInfoRef.
Variation DcmDspRoutineStopOut.DcmDspRoutineStopOutSignal.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.SHORT-NAME)}
⌋()
[SWS_Dcm_01026] ⌈ ImplementationDataType StopFlexibleInArrayDataType_{Routine}_{Signal}
Name StopFlexibleInArrayDataType_{Routine}_{Signal}
{(ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineIn.
Size
DcmDspStopRoutineInSignal.DcmDspRoutineSignalLength)+7)/8} Elements
Description --
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspRoutineStopIn.
DcmDspRoutineStopInSignal.DcmDspRoutineSignalType)} == VARIABLE_LENGTH
Variation Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStopIn.DcmDspRoutineStoptIn.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.SHORT-NAME)}
⌋()
[SWS_Dcm_01027] ⌈ ImplementationDataType StopFlexibleOutArrayDataType_{Routine}_{Signal}
Name StopFlexibleOutArrayDataType_{Routine}_{Signal}
{(ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspStopRoutineOut.
Size
DcmDspStopRoutineOutSignal.DcmDspRoutineSignalLength)+7)/8} Elements
Description --
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.DcmDspRoutineStopOut.
DcmDspRoutineStopOutSignal.DcmDspRoutineSignalType)} == VARIABLE_LENGTH
Variation Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStopOut.DcmDspRoutineStoptOut.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.SHORT-NAME)}
⌋()
[SWS_Dcm_01028] ⌈ ImplementationDataType KeyArrayType_{SecurityLevel}
Name KeyArrayType_{SecurityLevel}
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
Size
DcmDspSecurityKeySize)} Elements
Description --
SecurityLevel = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/
Variation
DcmDspSecurityRow.SHORT-NAME)}
⌋()
[SWS_Dcm_01029] ⌈ ImplementationDataType SeedArrayType_{SecurityLevel}
Name SeedArrayType_{SecurityLevel}
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
Size
DcmDspSecuritySeedSize)} Elements
Description --
DcmDspSecurityRow.SHORT-NAME)}
⌋()
This section lists the types which are defined by the DCM SWS.
8.3.1 Dcm_StatusType
[SWS_Dcm_00976]⌈
Name: Dcm_StatusType
Type: uint8
Range: DCM_E_OK 0x00 This value is representing a successful
operation.
DCM_E_ROE_NOT_ACCEPTED 0x06 ResponseOnOneEvent request is not
accepted by DCM (e.g. old
ResponseOnOneEvent is not finished)
(used at API:
Dcm_ResponseOnOneEvent())
DCM_E_PERIODICID_NOT_ACCEPTED 0x07 Periodic transmission request is not
accepted by DCM (e.g. old Periodic
transmission is not finished)
(used at API:
Dcm_ResponseOnOneDataByPeriodicId
())
Description: Base item type to transport status information.
⌋()
8.3.2 Dcm_SecLevelType
This type is defined in Rte_Dcm_Type.h header file, which is generated by the RTE
generator.
[SWS_Dcm_00977]⌈
Name: Dcm_SecLevelType
Type: uint8
Range: DCM_SEC_LEV_LOCKED 0x00 --
⌋()
8.3.3 Dcm_SesCtrlType
This type is defined in Rte_Dcm_Type.h header file, which is generated by the RTE
generator.
[SWS_Dcm_00978]⌈
Name: Dcm_SesCtrlType
Type: uint8
Range: DCM_DEFAULT_SESSION 0x01 --
DCM_PROGRAMMING_SESSION 0x02 --
DCM_EXTENDED_DIAGNOSTIC_SESSION 0x03 --
DCM_SAFETY_SYSTEM_DIAGNOSTIC_SESSION 0x04 --
configuration dependent 0x40...0x7E (according to
"diagnosticSessionType"
parameter of
DiagnosticSessionControl
request)
Description: Session type definition. 0, 127 and all values above 127 are reserved by ISO.
⌋()
Note: In case the DCM generator creates the AUTOSAR interfaces, the prefix DCM_
needs to be added. This implies that in case the shortname of DcmDspSessionRow
is already prefixed, the resulting enumeration is prefixed twice (shortname of
DcmDspSessionRow "DCM_TEST" --> Dcm_SesCtrlType with "DCM_DCM_TEST")
8.3.4 Dcm_ProtocolType
This type is defined in Rte_Dcm_Type.h header file, which is generated by the RTE
generator.
[SWS_Dcm_00979]⌈
Name: Dcm_ProtocolType
Type: uint8
Range: DCM_OBD_ON_CAN 0x00 OBD on CAN (ISO15765-4;
ISO15031-5)
DCM_OBD_ON_FLEXRAY 0x01 (OBD on Flexray (Manufacturer
specific; ISO15031-5))
⌋()
184 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
8.3.5 Dcm_NegativeResponseCodeType
This type is defined in Rte_Dcm_Type.h header file, which is generated by the RTE
generator.
[SWS_Dcm_00980]⌈
Name: Dcm_NegativeResponseCodeType
Type: uint8
Range: range of values 0x01..0x0F reserved by ISO 0x01..0x0F ISOSAERESRVD
14229
DCM_E_GENERALREJECT 0x10 GR
DCM_E_SERVICENOTSUPPORTED 0x11 SNS
DCM_E_SUBFUNCTIONNOTSUPPORTED 0x12 SFNS
DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT 0x13 IMLOIF
DCM_E_RESPONSETOOLONG 0x14 RTL
range of values 0x15..0x20 reserved by ISO 0x15..0x20 ISOSAERESRVD
14229
DCM_E_BUSYREPEATREQUEST 0x21 BRR
DCM_E_CONDITIONSNOTCORRECT 0x22 CNC
value 0x23 reserved by ISO 14229 0x23 ISOSAERESRVD
DCM_E_REQUESTSEQUENCEERROR 0x24 RSE
DCM_E_NORESPONSEFROMSUBNETCOMPONENT 0x25 NRFSC
DCM_E_FAILUREPREVENTSEXECUTIONOFREQUESTEDACTION 0x26 FPEORA
range of values 0x27..0x30 reserved by ISO 0x27..0x30 ISOSAERESRVD
14229
DCM_E_REQUESTOUTOFRANGE 0x31 ROOR
value 0x32 reserved by ISO 14229 0x32 ISOSAERESRVD
DCM_E_SECURITYACCESSDENIED 0x33 SAD
value 0x34 reserved by ISO 14229 0x34 ISOSAERESRVD
DCM_E_INVALIDKEY 0x35 IK
DCM_E_EXCEEDNUMBEROFATTEMPTS 0x36 ENOA
DCM_E_REQUIREDTIMEDELAYNOTEXPIRED 0x37 RTDNE
range of values 0x38..0x4F reserved by ISO 0x38..0x4F RBEDLSD
15764
range of values 0x50..0x6F reserved by ISO 0x50..0x6F ISOSAERESRVD
14229
DCM_E_UPLOADDOWNLOADNOTACCEPTED 0x70 UDNA
DCM_E_TRANSFERDATASUSPENDED 0x71 TDS
DCM_E_GENERALPROGRAMMINGFAILURE 0x72 GPF
DCM_E_WRONGBLOCKSEQUENCECOUNTER 0x73 WBSC
range of values 0x74..0x77 reserved by ISO 0x74..0x77 ISOSAERESRVD
14229
range of values 0x79..0x7D reserved by ISO 0x79..0x7D ISOSAERESRVD
14229
DCM_E_SUBFUNCTIONNOTSUPPORTEDINACTIVESESSION 0x7E SFNSIAS
DCM_E_SERVICENOTSUPPORTEDINACTIVESESSION 0x7F SNSIAS
value 0x80 reserved by ISO 14229 0x80 ISOSAERESRVD
DCM_E_RPMTOOHIGH 0x81 RPMTH
DCM_E_RPMTOOLOW 0x82 RPMTL
DCM_E_ENGINEISRUNNING 0x83 EIR
DCM_E_ENGINEISNOTRUNNING 0x84 EINR
DCM_E_ENGINERUNTIMETOOLOW 0x85 ERTTL
185 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
DCM_E_TEMPERATURETOOHIGH 0x86 TEMPTH
DCM_E_TEMPERATURETOOLOW 0x87 TEMPTL
DCM_E_VEHICLESPEEDTOOHIGH 0x88 VSTH
DCM_E_VEHICLESPEEDTOOLOW 0x89 VSTL
DCM_E_THROTTLE_PEDALTOOHIGH 0x8A TPTH
DCM_E_THROTTLE_PEDALTOOLOW 0x8B TPTL
DCM_E_TRANSMISSIONRANGENOTINNEUTRAL 0x8C TRNIN
DCM_E_TRANSMISSIONRANGENOTINGEAR 0x8D TRNIG
value 0x8E reserved by ISO 14229 0x8E ISOSAERESRVD
DCM_E_BRAKESWITCH_NOTCLOSED 0x8F BSNC
DCM_E_SHIFTERLEVERNOTINPARK 0x90 SLNIP
DCM_E_TORQUECONVERTERCLUTCHLOCKED 0x91 TCCL
DCM_E_VOLTAGETOOHIGH 0x92 VTH
DCM_E_VOLTAGETOOLOW 0x93 VTL
range of values 0x94..0xEF reserved by ISO 0x94..0xEF RFSCNC
14229
DCM_E_VMSCNC_0 0xF0 VMSCNC
DCM_E_VMSCNC_1 0xF1 VMSCNC1
DCM_E_VMSCNC_2 0xF2 VMSCNC2
DCM_E_VMSCNC_3 0xF3 VMSCNC3
DCM_E_VMSCNC_4 0xF4 VMSCNC4
DCM_E_VMSCNC_5 0xF5 VMSCNC5
DCM_E_VMSCNC_6 0xF6 VMSCNC6
DCM_E_VMSCNC_7 0xF7 VMSCNC7
DCM_E_VMSCNC_8 0xF8 VMSCNC8
DCM_E_VMSCNC_9 0xF9 VMSCNC9
DCM_E_VMSCNC_A 0xFA VMSCNCA
DCM_E_VMSCNC_B 0xFB VMSCNCB
DCM_E_VMSCNC_C 0xFC VMSCNCC
DCM_E_VMSCNC_D 0xFD VMSCNCD
DCM_E_VMSCNC_E 0xFE VMSCNCE
value 0xFF reserved by ISO 14229 0xFF ISOSAERESRVD
Description: This Table of available Negative Response Codes represents the allowed Response Codes an
AUTOSAR SW Component shall return after a function call.
For the allowed NRC of the executed Service ID please refer to the specification of the service
in ISO14229-1 (UDS) and ISO15031-5 (OBD/CARB) (see chapter 4.2.4 Response code
parameter definition Table 12).
⌋()
For the implementation of this table a comment or a special concept is needed in the
c-code because the table is not structured conform to the MISRA rules.
8.3.6 Dcm_CommunicationModeType
[SWS_Dcm_00981]⌈
Name: Dcm_CommunicationModeType
Type: uint8
Range: DCM_ENABLE_RX_TX_NORM 0x00 Enable the Rx and Tx for normal
communication
DCM_ENABLE_RX_DISABLE_TX_NORM 0x01 Enable the Rx and disable the
Tx for normal communication
186 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
DCM_DISABLE_RX_ENABLE_TX_NORM 0x02 Disable the Rx and enable the
Tx for normal communication
DCM_DISABLE_RX_TX_NORMAL 0x03 Disable Rx and Tx for normal
communication
DCM_ENABLE_RX_TX_NM 0x04 Enable the Rx and Tx for
network management
communication
DCM_ENABLE_RX_DISABLE_TX_NM 0x05 Enable Rx and disable the Tx for
network management
communication
DCM_DISABLE_RX_ENABLE_TX_NM 0x06 Disable the Rx and enable the
Tx for network management
communication
DCM_DISABLE_RX_TX_NM 0x07 Diable Rx and Tx for network
management communication
DCM_ENABLE_RX_TX_NORM_NM 0x08 Enable Rx and Tx for normal
and network management
communication
DCM_ENABLE_RX_DISABLE_TX_NORM_NM 0x09 Enable the Rx and disable the
Tx for normal and network
management communication
DCM_DISABLE_RX_ENABLE_TX_NORM_NM 0x0A Disable the Rx and enable the
Tx for normal and network
management communication
DCM_DISABLE_RX_TX_NORM_NM 0x0B Disable Rx and Tx for normal
and network management
communication
Description: --
⌋()
8.3.7 Dcm_ConfigType
[SWS_Dcm_00982]⌈
Name: Dcm_ConfigType
Type: Structure
Range: Implementation --
specific
Description: This type defines a data structure for the post build parameters of the DCM . At
initialization the DCM gets a pointer to a structure of this type to get access to its
configuration data, which is necessary for initialization.
⌋()
8.3.8 Dcm_ConfirmationStatusType
[SWS_Dcm_00983]⌈
Name: Dcm_ConfirmationStatusType
Type: uint8
Range: DCM_RES_POS_OK 0x00 --
DCM_RES_POS_NOT_OK 0x01 --
⌋()
8.3.9 Dcm_OpStatusType
[SWS_Dcm_00984]⌈
Name: Dcm_OpStatusType
Type: uint8
Range: DCM_INITIAL 0x00 Indicates the initial call to the operation
DCM_PENDING 0x01 Indicates that a pending return has been done on the
previous call of the operation
DCM_CANCEL 0x02 Indicates that the DCM requests to cancel the pending
operation
DCM_FORCE_RCRRP_OK 0x03 Confirm a response pending transmission
Description: --
⌋()
For the operation using the Dcm_OpStatusType, the DCM shall work as follow :
[SWS_Dcm_00985]⌈
Name: Dcm_ReturnReadMemoryType
Type: uint8
Range: DCM_READ_OK 0x00 Reading has been done
DCM_READ_PENDING 0x01 Reading is pending, another call is request to finalize
the reading
DCM_READ_FAILED 0x02 Reading has failed
DCM_READ_FORCE_RCRRP 0x03 Reading is pending, the Response pending
transmission starts immediately
Description: Return values of Callout Dcm_ReadMemory
⌋()
8.3.11 Dcm_ReturnWriteMemoryType
[SWS_Dcm_00986]⌈
Name: Dcm_ReturnWriteMemoryType
Type: uint8
Range: DCM_WRITE_OK 0x00 Writing has been done
DCM_WRITE_PENDING 0x01 Writing is pending, another called is requested
DCM_WRITE_FAILED 0x02 The writing has failed
DCM_WRITE_FORCE_RCRRP 0x03 Writing is pending, the Response pending
transmission starts immediately
Description: Return type of callout Dcm_WriteMemory
⌋()
8.3.12 Dcm_EcuStartModeType
[SWS_Dcm_00987]⌈
Name: Dcm_EcuStartModeType
Type: uint8
Range: DCM_COLD_START 0x00 The ECU starts normally
DCM_WARM_START 0x01 The ECU starts from a bootloader jump
Description: Allows the DCM to know if a diagnostic response shall be sent in the case of a
jump from bootloader
⌋()
8.3.13 Dcm_ProgConditionsType
[SWS_Dcm_00988]⌈
Name: Dcm_ProgConditionsType
Type: Structure
⌋()
8.3.14 Dcm_MsgItemType
[SWS_Dcm_00989]⌈
Name: Dcm_MsgItemType
Type: uint8
Description: Base type for diagnostic message item
⌋()
8.3.15 Dcm_MsgType
[SWS_Dcm_00990]⌈
Name: Dcm_MsgType
Type: Dcm_MsgItemType*
Description: Base type for diagnostic message (request, positive or negative response)
⌋()
8.3.16 Dcm_MsgLenType
[SWS_Dcm_00991]⌈
Name: Dcm_MsgLenType
Type: uint32
Description: Length of diagnostic message (request, positive or negative response). The
190 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
maximum length is dependent of the underlying transport protocol/media.
E. g. the maximum message length for CAN Transport Layer is 4095bytes.
⌋()
8.3.17 Dcm_MsgAddInfoType
Please note that the following table describes a struct type definition - including its
struct items "elements".
[SWS_Dcm_00992]⌈
Name: Dcm_MsgAddInfoType
Type: Structure
Element: bit reqType (Pos LSB+0)
0 = physical request
1 = functional request
bit suppressPosResponse Position LSB+1
0 = no (do not suppress)
1 = yes (no positive response will be
sent)
Description: Additional information on message request.
Datastructure: Bitfield
⌋()
8.3.18 Dcm_IdContextType
[SWS_Dcm_00993]⌈
Name: Dcm_IdContextType
Type: uint8
Description: This message context identifier can be used to determine the relation between
request and response confirmation.
⌋()
8.3.19 Dcm_MsgContextType
Please note that the following table describes a struct type definition - including its
struct items "elements".
[SWS_Dcm_00994]⌈
Name: Dcm_MsgContextType
Type: Structure
Element: Dcm_MsgType reqData Request data, starting directly after
service identifier (which is not part of
this data)
Dcm_MsgLenType reqDataLen Request data length (excluding service
identifier)
Dcm_MsgType resData Positive response data, starting directly
after service identifier (which is not part
191 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
of this data).
Dcm_MsgLenType resDataLen Positive response data length
(excluding service identifier)
Dcm_MsgAddInfoType msgAddInfo Additional information about service
request and response (see:
Dcm_MsgAddInfo)
Dcm_MsgLenType resMaxDataLen The maximal length of a response is
restricted by the size of the buffer. The
buffer size can depend on the
diagnostic protocol identifier which is
assigned to this message, e. g. an OBD
protocol id can obtain other properties
than the enhanced diagnostic protocol
id.
The resMaxDataLen is a property of the
diagnostic protocol assigned by the
DSL. The value does not change during
communication. It cannot be
implemented as a constant, because it
can differ between different diagnostic
protocols.
Dcm_IdContextType idContext This message context identifier can be
used to determine the relation between
request and response confirmation.
This identifier can be stored within the
application at request time, so that the
response can be assigned to the
original request.
Background: Within the confirmation,
the message context is no more valid,
all message data is lost. You need an
additional information to determine the
request to which this confirmation
belongs.
PduIdType dcmRxPduId: Pdu identifier on which the request was
received. The PduId of the request can
have consequences for message
processing. E. g. an OBD request will
be received on the OBD PduId and will
be processed slightly different than an
enhanced diagnostic request received
on the physical
Description: This data structure contains all information which is necessary to process a
diagnostic message from request to response and response confirmation.
⌋()
8.4.1.1 Dcm_Init
[SWS_Dcm_00037] ⌈
Service name: Dcm_Init
Syntax: void Dcm_Init(
const Dcm_ConfigType* ConfigPtr
)
Service ID[hex]: 0x01
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ConfigPtr Pointer to configuration set in Variant Post-Build.
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Service for basic initialization of DCM module.
⌋(BSW00438, BSW101, BSW00358, BSW00414)
[SWS_Dcm_00334] ⌈ Dcm_Init() shall initialize all DCM global variables with the
values of the configuration⌋()
The call of this service is mandatory before using the DCM module for further
processing.
8.4.1.2 Dcm_GetVersionInfo
[SWS_Dcm_00065] ⌈
Service name: Dcm_GetVersionInfo
Syntax: void Dcm_GetVersionInfo(
Std_VersionInfoType* versionInfo
)
Service ID[hex]: 0x24
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): None
Parameters None
(inout):
Parameters (out): versionInfo Pointer to where to store the version information of this module.
Return value: None
Description: Returns the version information of this module
⌋(BSW00407)
8.4.1.3 Dcm_DemTriggerOnDTCStatus
[SWS_Dcm_00614] ⌈
Service name: Dcm_DemTriggerOnDTCStatus
Syntax: Std_ReturnType Dcm_DemTriggerOnDTCStatus(
uint32 DTC,
Dem_UdsStatusByteType DTCStatusOld,
Dem_UdsStatusByteType DTCStatusNew
)
Service ID[hex]: 0x2B
Sync/Async: Synchronous
8.4.1.4 Dcm_GetVin
[SWS_Dcm_00950] ⌈
Service name: Dcm_GetVin
Syntax: Std_ReturnType Dcm_GetVin(
uint8* Data
)
Service ID[hex]: 0x07
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): None
Parameters None
(inout):
Parameters (out): Data Pointer to where to store the VIN
Std_ReturnType E_OK: The Data pointer has been filled with valid VIN
Return value:
E_NOT_OK: The default VIN will be used in the DoIP
Description: Callbackfunction to get the VIN.
⌋()
The functions defined in this section can also be used by SW-Cs through the RTE.
Name DCMServices
Comment --
IsService true
Variation --
1 E_NOT_OK
Operations
GetActiveProtocol
Comments --
Variation --
ActiveProtocol
Comment --
Variation --
Direction OUT
GetSecurityLevel
Comments --
Variation --
SecLevel
Comment --
Variation --
Direction OUT
GetSesCtrlType
Comments --
Variation --
SesCtrlType
Comment --
Parameters
Type Dcm_SesCtrlType
Variation --
195 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
Direction OUT
ResetToDefaultSession
Comments --
Variation --
⌋()
Name Dcm_Roe
Comment --
IsService true
Variation {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoe/DcmDspRoeEvent)}
0 E_OK
Possible Errors
1 E_NOT_OK
Operations
TriggerOnEvent
Comments --
Variation --
⌋()
8.4.2.1 Dcm_GetSecurityLevel
[SWS_Dcm_00338] ⌈
Service name: Dcm_GetSecurityLevel
Syntax: Std_ReturnType Dcm_GetSecurityLevel(
Dcm_SecLevelType* SecLevel
196 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
)
Service ID[hex]: 0x0d
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): None
Parameters None
(inout):
SecLevel Active Security Level value
Conversion formula to calculate SecurityLevel out of tester
requested SecurityAccessType parameter:
Parameters (out): SecurityLevel = (SecurityAccessType + 1) / 2
Content of SecurityAccessType is according to
"securityAccessType" parameter of SecurityAccess request (see
[11])
Return value: Std_ReturnType E_OK: this value is always returned.
Description: This function provides the active security level value.
⌋(BSW04011)
8.4.2.2 Dcm_GetSesCtrlType
[SWS_Dcm_00339] ⌈
Service name: Dcm_GetSesCtrlType
Syntax: Std_ReturnType Dcm_GetSesCtrlType(
Dcm_SesCtrlType* SesCtrlType
)
Service ID[hex]: 0x06
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): None
Parameters None
(inout):
SesCtrlType Active Session Control Type value
Parameters (out): Content is according to "diagnosticSessionType" parameter of
DiagnosticSessionControl request (see [11])
Return value: Std_ReturnType E_OK: this value is always returned.
Description: This function provides the active session control type value.
⌋(BSW04011)
8.4.2.3 Dcm_GetActiveProtocol
[SWS_Dcm_00340] ⌈
Service name: Dcm_GetActiveProtocol
Syntax: Std_ReturnType Dcm_GetActiveProtocol(
Dcm_ProtocolType* ActiveProtocol
)
Service ID[hex]: 0x0f
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): None
Parameters None
(inout):
Parameters (out): ActiveProtocol Active protocol type value
Return value: Std_ReturnType E_OK: this value is always returned.
Description: This function returns the active protocol name.
⌋(BSW04011)
«module»
Dcm
«realize» «realize»
«interface» «interface»
Dcm_PduR Dcm_ComM
Dcm_CopyRxData() Dcm_ComMNoComModeEntered()
Dcm_CopyTxData() Dcm_ComMSilentComModeEntered()
Dcm_RxIndication() Dcm_ComMFullComModeEntered()
Dcm_TxConfirmation()
Dcm_StartOfReception()
«optional»
«module»
«module»
__PduR
ComM
8.5.1 Dcm_StartOfReception
[SWS_Dcm_00094] ⌈
Service name: Dcm_StartOfReception
Syntax: BufReq_ReturnType Dcm_StartOfReception(
PduIdType DcmRxPduId,
const PduInfoType* info,
PduLengthType TpSduLength,
PduLengthType* RxBufferSizePtr
)
Service ID[hex]: 0x00
Sync/Async: Synchronous
Reentrancy: Non Reentrant
DcmRxPduId Identifies the DCM data to be received. This information is
used within the DCM to distinguish two or more receptions at
the same time.
Parameters (in): info Pointer to a structure containing content and length of the first
frame or single frame including MetaData.
TpSduLength This length identifies the overall number of bytes to be
received.
199 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
Parameters None
(inout):
Parameters (out): RxBufferSizePtr Length of the available buffer
BufReq_ReturnType BUFREQ_OK: Connection has been accepted,
RxBufferSizePtr indicates the available receive buffer.
Return value: BUFREQ_E_NOT_OK: Connection has been rejected.
BUFREQ_E_OVFL: No buffer of the required length can be
provided, reception is aborted.
Description: Called once to initialize the reception of a diagnostic request
⌋()
By the function Dcm_StartOfReception() the receiver (e.g. DCM) is also
informed implicitly about a first frame reception or a single frame reception. If the
function Dcm_StartOfReception() returns a return value not equal to
BUFREQ_OK, the values of the out parameters are not specified and should not be
evaluated by the caller.
[SWS_Dcm_00444] ⌈ If the requested size is large than the buffer available in the
DCM, the function Dcm_StartOfReception() shall return BUFREQ_E_OVFL
(see SWS_Dcm_00094).⌋()
[SWS_Dcm_00656] ⌈If the current session is the default session and a diagnostic
request is in execution, for any new diagnostic request with same or lower priority
protocol than active one, the DCM shall act according [SWS_Dcm_00788,
[SWS_Dcm_00789 and [SWS_Dcm_00790. ⌋()
8.5.2 Dcm_CopyRxData
[SWS_Dcm_00556] ⌈
Service name: Dcm_CopyRxData
Syntax: BufReq_ReturnType Dcm_CopyRxData(
PduIdType DcmRxPduId,
const PduInfoType* PduInfoPtr,
PduLengthType* RxBufferSizePtr
)
Service ID[hex]: 0x02
Sync/Async: Synchronous
Reentrancy: Reentrant for different PduIds. Non reentrant for the same PduId.
DcmRxPduId Identifies the DCM data to be received. This information is
used within the DCM to distinguish two or more receptions at
the same time.
PduInfoPtr Pointer to a PduInfoType which indicates the number of
Parameters (in): bytes to be copied (SduLength) and the location of the
source data (SduDataPtr).
An SduLength of 0 is possible in order to poll the available
receive buffer size. In this case no data are to be copied and
PduInfoPtr might be invalid.
Parameters None
(inout):
RxBufferSizePtr Remaining free place in receive buffer after completion of
Parameters (out):
this call.
BufReq_ReturnType BUFREQ_OK: Data has been copied to the receive buffer
Return value:
completely as requested.
Note: The size of the Rx buffer is based on the buffer length, which is returned in the
parameter RxBufferSizePtr of API Dcm_StartOfReception().
8.5.3 Dcm_TpRxIndication
[SWS_Dcm_00093] ⌈
Service name: Dcm_TpRxIndication
Syntax: void Dcm_TpRxIndication(
PduIdType DcmRxPduId,
Std_ReturnType Result
)
Service ID[hex]: 0x03
Sync/Async: Synchronous
202 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
Reentrancy: Reentrant
DcmRxPduId ID of DCM I-PDU that has been received. Identifies the data that has
been received.
Range: 0..(maximum number of I-PDU IDs received by DCM) – 1
Parameters (in): Result E_OK: the complete N-PDU has been received and is stored in the
receive buffer
E_NOT_OK: the N_PDU has not been received properly, Dcm
should prepare for a new reception.
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This is called by the PduR to indicate the completion of a reception
⌋()
8.5.4 Dcm_CopyTxData
[SWS_Dcm_00092] ⌈
Service name: Dcm_CopyTxData
Syntax: BufReq_ReturnType Dcm_CopyTxData(
PduIdType DcmTxPduId,
const PduInfoType* PduInfoPtr,
RetryInfoType* RetryInfoPtr,
PduLengthType* TxDataCntPtr
)
Service ID[hex]: 0x04
Sync/Async: Synchronous
Reentrancy: Reentrant for different PduIds. Non reentrant for the same PduId.
DcmTxPduId Represents the TX PduId configured within the DCM
(DcmDslProtocolTx-->DcmDslTxConfirmationPduId).
Through this Id the DCM is able to determine the
corresponding protocol for the communication.
Range: 0..(maximum number of I-PDU IDs transmitted by
DCM) – 1
Parameters (in): PduInfoPtr Provides the destination buffer and the number of bytes to
be copied.
If not enough transmit data is available, no data is copied.
The transport protocol module may retry.
A copy size of 0 can be used to indicate state changes in the
retry parameter or to query currently available data.
RetryInfoPtr If the transmitted TP I-PDU does not support the retry
203 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
feature a NULL_PTR can be provided. This indicates that
the copied transmit data can be removed from the buffer
after it has been copied.
Parameters None
(inout):
Parameters (out): TxDataCntPtr Remaining Tx data after completion of this call.
BufReq_ReturnType BUFREQ_OK: Data has been copied to the transmit buffer
completely as requested.
BUFREQ_E_NOT_OK: Data has not been copied. Request
Return value:
failed.
BUFREQ_E_BUSY: The amount of data requested by this
call is currently not available.
Description: At invocation of Dcm_CopyTxData the DCM module copies the requested transmit
data with ID PduId from its internal transmit buffer to the location specified by the
PduInfoPtr. The function Dcm_CopyTxData also calculates and sets the
TxDataCntPtr to the amount of remaining bytes for the transmission of this data.
If RetryInfoPtr is NULL_PTR or if TpDataState is not equal TP_DATARETRY, the
Dcm shall always copy the next fragment of data to the SduDataPtr.
If TpDataState equals TP_DATARETRY, the Dcm shall copy previously copied
data again, beginning at the offset given in RetryInfoPtr->TxTpDataCnt from the
current position.
⌋()
If the copied data is smaller than the length requested to transmit within the service
PduR_DcmTransmit() the DCM module will be requested by the service
Dcm_CopyTxData() to provide another data when the current copied data have
been transmitted.
8.5.5 Dcm_TpTxConfirmation
[SWS_Dcm_00351] ⌈
Service name: Dcm_TpTxConfirmation
Syntax: void Dcm_TpTxConfirmation(
PduIdType DcmTxPduId,
Std_ReturnType Result
)
Service ID[hex]: 0x05
Sync/Async: Synchronous
Reentrancy: Reentrant
DcmTxPduI Represents the TX PduId configured within the DCM
d (DcmDslProtocolTx-->DcmDslTxConfirmationPduId). Through this Id
the DCM is able to determine the corresponding protocol for the
communication.
Parameters (in): Range: 0..(maximum number of I-PDU IDs transmitted by DCM) – 1
Result E_OK: the complete N-PDU has been transmitted.
E_NOT_OK: an error occurred during transmission, the DCM can
unlock the transmit buffer
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This is called by the PduR to confirm a Transmit
⌋()
For transmission via FlexRay the following restriction has to be considered: Since the
FlexRay Specification does not mandate the existence of a transmit interrupt, the
exact meaning of this confirmation (i.e. “transfer into the FlexRay controller’s send
buffer” OR “transmission onto the FlexRay network”) depends on the capabilities of
the FlexRay communication controller and the configuration of the FlexRay Interface.
[SWS_Dcm_00356] ⌈
Service name: Dcm_ComM_NoComModeEntered
Syntax: void Dcm_ComM_NoComModeEntered(
uint8 NetworkId
)
Service ID[hex]: 0x21
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): NetworkId Identifier of the network concerned by the mode change
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This call informs the Dcm module about a ComM mode change to
COMM_NO_COMMUNICATION.
⌋()
8.5.7 Dcm_ComM_SilentComModeEntered
[SWS_Dcm_00358] ⌈
Service name: Dcm_ComM_SilentComModeEntered
Syntax: void Dcm_ComM_SilentComModeEntered(
uint8 NetworkId
)
206 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
Service ID[hex]: 0x22
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): NetworkId Identifier of the network concerned by the mode change
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This call informs the Dcm module about a ComM mode change to
COMM_SILENT_COMMUNICATION.
⌋()
8.5.8 Dcm_ComM_FullComModeEntered
[SWS_Dcm_00360] ⌈
Service name: Dcm_ComM_FullComModeEntered
Syntax: void Dcm_ComM_FullComModeEntered(
uint8 NetworkId
)
Service ID[hex]: 0x23
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): NetworkId Identifier of the network concerned by the mode change
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This call informs the Dcm module about a ComM mode change to
COMM_FULL_COMMUNICATION.
⌋()
Callouts are pieces of code that have to be added to the DCM during ECU
integration. The content of most callouts is hand-written code, for some callouts the
DCM configuration tool shall generate a default implementation that is manually
edited by the integrator. Conceptually, these callouts belong to the ECU Firmware.
Since callouts are no services of the DCM they do not have an assigned Service ID.
Note:
The Autosar architecture doesn’t provide the possibility to access the ECU memory
using a physical address. This realized using BlockId wich identified a memory block.
According to that, the DCM is not able to fully support the implementation of
ISO14229-1 services wich request a physical memory access.
Therefore, the DCM define callout to realize this kind of memory access.
This callout implementation could be simply realized by defining a mapping between
the BlockId and the physical memory address.
8.6.1 Dcm_ReadMemory
[SWS_Dcm_00539]⌈
8.6.2 Dcm_WriteMemory
[SWS_Dcm_00540] ⌈
Service name: Dcm_WriteMemory
Syntax: Dcm_ReturnWriteMemoryType Dcm_WriteMemory(
Dcm_OpStatusType OpStatus,
uint8 MemoryIdentifier,
uint32 MemoryAddress,
uint32 MemorySize,
uint8* MemoryData
)
Service ID[hex]: 0x27
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
OpStatus DCM_INITIAL: All In-parameters are valid
DCM_PENDING: All In-parameters are set to 0x0
DCM_CANCEL: All In-parameters are set to 0x0
DCM_FORCE_RCRRP_OK: All In-parameters
are set to 0x0
MemoryIdentifier Identifier of the Memory Block (e.g. used by
WriteDataByIdentifier service).
Note: If it's not used this parameter shall be set to
Parameters (in): 0.
MemoryAddress Starting address of server memory in which data
is to be copied.
Note: If it's not used (e.g. if the data is
compressed) this parameter shall be set to 0.
MemorySize Number of bytes in MemoryData
MemoryData Data to write (Points to the diagnostic buffer in
DCM)
Parameters None
(inout):
Parameters (out): None
Dcm_ReturnWriteMemoryType DCM_WRITE_OK: write was successful
DCM_WRITE_FAILED: write was not successful
DCM_WRITE_PENDING: write is not yet finished
Return value:
DCM_WRITE_FORCE_RCRRP: writing is
pending, the Response pending transmission
starts immediately
Description: The Dcm_WriteMemory callout is used to write memory data identified by the
parameter memoryAddress and memorySize. This service is needed for the
implementation of UDS services :
- WriteMemoryByAdress
- RequestDownload
⌋()
Note :
The callout implementation shall take care of the following points :
210 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
- When writing data in NVRAM, take care to keep the consistency with data in
the mirror RAM
- When writing data in memory, take care that a SW-C won’t overwrite the data.
Maybe the SW-C should be informed of this writing
8.6.3 Dcm_Confirmation
[SWS_Dcm_00547] ⌈
Service name: Dcm_Confirmation
Syntax: void Dcm_Confirmation(
Dcm_IdContextType idContext,
PduIdType dcmRxPduId,
Dcm_ConfirmationStatusType status
)
Service ID[hex]: 0x29
Sync/Async: Synchronous
Reentrancy: No
idContext Current context identifier which can be used to retrieve the relation
between request and confirmation.
Within the confirmation, the Dcm_MsgContext is no more available,
so the idContext can be used to represent this relation.
The idContext is also part of the Dcm_MsgContext
Parameters (in): dcmRxPduId DcmRxPduId on which the request was received. The source of the
request can have consequences for message processing.
status Status indication about confirmation (differentiate failure indication
and normal confirmation) / The parameter "Result" of
"Dcm_TxConfirmation" shall be forwarded to status depending if a
positive or negative responses was sent before.
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This function confirms thesuccessful transmission or a transmission error of a
211 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
diagnostic service.
The idContext and the dcmRxPduId are required to identify the message which
was processed.
⌋(BSW04019)
8.6.4 Dcm_SetProgConditions
[SWS_Dcm_00543] ⌈
Service name: Dcm_SetProgConditions
Syntax: Std_ReturnType Dcm_SetProgConditions(
Dcm_ProgConditionsType * ProgConditions
)
Service ID[hex]: -
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
ProgConditions Conditions on which the jump to bootloader has been
Parameters (in):
requested
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Conditions have correctly been set
E_NOT_OK: Conditions cannot be set
Return value:
DCM_E_PENDING: Conditions set is in progress, a further call
to this API is needed to end the setting
Description: The Dcm_SetProgConditions callout allows the integrator to store relevant
information prior to jumping to bootloader. The context parameter are defined in
Dcm_ProgConditionsType.
⌋()
8.6.5 Dcm_GetProgConditions
[SWS_Dcm_00544] ⌈
Service name: Dcm_GetProgConditions
Syntax: Dcm_EcuStartModeType Dcm_GetProgConditions(
Dcm_ProgConditionsType * ProgConditions
)
Service ID[hex]: -
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): None
Parameters None
(inout):
ProgConditions Conditions on which the jump from the
Parameters (out):
bootloader has been requested
Return value: Dcm_EcuStartModeType --
Description: The Dcm_GetProgConditions callout is called upon DCM initialization and allows to
determine if a response ($50 or $51) has to be sent depending on request within
the bootloader. The context parameter are defined in Dcm_ProgConditionsType.
⌋()
[SWS_Dcm_00755] ⌈
Service name: Dcm_ProcessRequestTransferExit
Syntax: Std_ReturnType Dcm_ProcessRequestTransferExit(
Dcm_OpStatusType OpStatus,
uint8* ParameterRecord,
uint32 ParameterRecordSize,
Dcm_NegativeResponseCodeType* ErrorCode
)
Service ID[hex]: 0x32
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
OpStatus DCM_INITIAL: All In-parameters are valid
DCM_PENDING: All In-parameters are set to 0x0
DCM_CANCEL: All In-parameters are set to 0x0
Parameters (in): DCM_FORCE_RCRRP_OK: All In-parameters are set to
0x0
ParameterRecord (Optional) Pointer to vehicle-manufacturer-specific data
ParameterRecordSize (Optional) Length of ParameterRecord in bytes
Parameters None
(inout):
Parameters (out): ErrorCode See below
Std_ReturnType E_OK: Transfer was successful
Return value: E_NOT_OK: Transfer was not successful
DCM_E_PENDING: Transfer is not yet finished
Description: Callout function.
DCM shall call this callout function to terminate a download or upload process.
This service is needed for the implementation of UDS service
RequestTransferExit.
⌋()
8.6.7 Dcm_ProcessRequestUpload
[SWS_Dcm_00756] ⌈
Service name: Dcm_ProcessRequestUpload
Syntax: Std_ReturnType Dcm_ProcessRequestUpload(
Dcm_OpStatusType OpStatus,
uint8 DataFormatIdentifier,
uint32 MemoryAddress,
uint32 MemorySize,
uint32* BlockLength,
Dcm_NegativeResponseCodeType* ErrorCode
)
Service ID[hex]: 0x31
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
8.6.8 Dcm_ProcessRequestDownload
[SWS_Dcm_00754] ⌈
Service name: Dcm_ProcessRequestDownload
Syntax: Std_ReturnType Dcm_ProcessRequestDownload(
Dcm_OpStatusType OpStatus,
uint8 DataFormatIdentifier,
uint32 MemoryAddress,
uint32 MemorySize,
uint32* BlockLength,
Dcm_NegativeResponseCodeType* ErrorCode
)
Service ID[hex]: 0x30
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
OpStatus DCM_INITIAL: All In-parameters are valid
DCM_PENDING: All In-parameters are set to 0x0
Parameters (in): DCM_CANCEL: All In-parameters are set to 0x0
DCM_FORCE_RCRRP_OK: All In-parameters are set to 0x0
DataFormatIdentifier Bit 7 - 4: Compression Method
8.7.1 Dcm_MainFunction
[SWS_Dcm_00053] ⌈
Service name: Dcm_MainFunction
Syntax: void Dcm_MainFunction(
void
)
Service ID[hex]: 0x25
Description: This service is used for processing the tasks of the main loop.
⌋(BSW00424, BSW00373, BSW00376)
This section defines all interfaces which are required to fulfill the core functionality of
the module.
This section defines all interfaces which are required to fulfill an optional functionality
of the module.
This section defines the interfaces where the DCM configuration defines the actual
functions that the DCM will use. Depending on the configuration, an implementation
of these functions could be provided by other BSW-modules (typically the DEM) or
by software-components (through the RTE).
8.8.3.1 SecurityAccess_{SecurityLevel}
Provides functions required for the UDS Service SecurityAccess (see
SWS_Dcm_00323,SWS_Dcm_00862 and SWS_Dcm_00863).
Note: The OpStatus parameter is only used for asynchronous operations (if
DcmDspSecurityUsePort is set to USE_ASYNCH_CLIENT_SERVER or
USE_ASYNCH_FNC). In case of synchronous operations (DcmDspSecurityUsePort
is set to USE_SYNCH_CLIENT_SERVER or USE_SYNCH_FNC), the OpStatus
parameter is not used.
Using the concepts of the SW-C template, the interface is defined as follows if
ClientServer interface is used (DcmDspSecurityUsePort set to
USE_SYNCH_CLIENT_SERVER or USE_ASYNCH_CLIENT_SERVER):
[SWS_Dcm_00685] ⌈ ClientServerInterface
SecurityAccess_{SecurityLevel}
Name SecurityAccess_{SecurityLevel}
Comment --
IsService true
SecurityLevel = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/
DcmDspSecurityRow.SHORT-NAME)}
Variation {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
DcmDspSecurityUsePort)} == (USE_SYNCH_CLIENT_SERVER ||
USE_ASYNCH_CLIENT_SERVER)
0 E_OK
1 E_NOT_OK
Possible
Errors
10 DCM_E_PENDING
11 DCM_E_COMPARE_KEY_FAILED
Operations
CompareKey
Comments --
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
Variation
DcmDspSecurityUsePort)} == USE_ASYNCH_CLIENT_SERVER
Key
Type KeyArrayType_{SecurityLevel}
SecurityLevel = {ecuc(Dcm/DcmConfigSet/
Variation DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
SHORT-NAME)}
Parameters
Direction IN
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
CompareKey
Comments --
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
Variation
DcmDspSecurityUsePort)} == USE_SYNCH_CLIENT_SERVER
Key
Type KeyArrayType_{SecurityLevel}
Parameters
SecurityLevel = {ecuc(Dcm/DcmConfigSet/
Variation DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
SHORT-NAME)}
Direction IN
Possible
E_NOT_OK Request was not successful.
Errors
GetSeed
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
DcmDspSecurityADRSize)}== NULL) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspSecurity/DcmDspSecurityRow.DcmDspSecurityUsePort)}==
USE_ASYNCH_CLIENT_SERVER)
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Parameters
Direction IN
Seed
Type SeedArrayType_{SecurityLevel}
SecurityLevel = {ecuc(Dcm/DcmConfigSet/
Variation DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
SHORT-NAME)}
Direction OUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
GetSeed
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
DcmDspSecurityADRSize)}!= NULL) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspSecurity/DcmDspSecurityRow.DcmDspSecurityUsePort)}==
USE_ASYNCH_CLIENT_SERVER)
SecurityAccessDataRecord
Comment --
Type SecurityAccessDataRecordType_{SecurityLevel}
SecurityLevel = {ecuc(Dcm/DcmConfigSet/
Variation DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
SHORT-NAME)}
Direction IN
Parameters
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
Seed
Type SeedArrayType_{SecurityLevel}
SecurityLevel = {ecuc(Dcm/DcmConfigSet/
Variation DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
SHORT-NAME)}
Direction OUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
GetSeed
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
DcmDspSecurityADRSize)}== NULL}) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspSecurity/DcmDspSecurityRow.DcmDspSecurityUsePort)}==
USE_SYNCH_CLIENT_SERVER)
Seed
Type SeedArrayType_{SecurityLevel}
SecurityLevel = {ecuc(Dcm/DcmConfigSet/
Variation DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
Parameters
SHORT-NAME)}
Direction OUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
GetSeed
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
DcmDspSecurityADRSize)}!= NULL) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspSecurity/DcmDspSecurityRow.DcmDspSecurityUsePort)}==
USE_SYNCH_CLIENT_SERVER)
SecurityAccessDataRecord
Comment --
Type SecurityAccessDataRecordType_{SecurityLevel}
SecurityLevel = {ecuc(Dcm/DcmConfigSet/
Variation DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
SHORT-NAME)}
Direction IN
Seed
Parameters
Type SeedArrayType_{SecurityLevel}
SecurityLevel = {ecuc(Dcm/DcmConfigSet/
Variation DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
SHORT-NAME)}
Direction OUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
From the point of view of the DCM, the operation has the following signature:
If DcmDspSecurityADRSize is present:
If DcmDspSecurityADRSize is present
8.8.3.2 DataServices_{Data}
One DataServices interface will be generated for each Data of each DID/PID, with
following possible operations:
8.8.3.2.1 ReadData
ReadData allows requesting to the application a data value of a DID/PID. A
ReadData interface is defined for every data of each DID/PID with read access. The
Data specific type is an array of uint8 which represents either the fix length of this
Data or the maximum possible length of this Data. If the length is variable, the
operation ReadDataLength has to provide the current valid data length of this Data.
This interface is used for UDS Service ReadDataByIdentifier and for UDS Service
ReadDataByPeriodicIdentifier (0x2A) and for UDS Service
InputOutputControlByIdentifier (0x2F).
The ReadData interface can be defined as synchronous or asynchronous according
to configuration parameter DcmDspDataUsePort.
The synchronous mechanism of the ReadData interface is compatible to the related
DEM interface to allow the provider to use the same interface for both DCM and
DEM.
8.8.3.2.2 WriteData
WriteData requests the application to write a data value of a DID. The Data specific
type is an array of uint8 which represent either the fix length of this Data or the
maximum possible length of this Data. A WriteData interface is defined for every
data of each DID with write access
This interface is used for the UDS Service WriteDataByIdentifier (0x2E).
8.8.3.2.3 ReadDataLength
ReadDataLength requests the application to return the data length of a Data. A
ReadDataLength interface is defined for every data of each DID with variable data
length.
This interface is used for UDS Service ReadDataByIdentifier and for UDS Service
ReadDataByPeriodicIdentifier (0x2A)
8.8.3.2.4 ConditionCheckRead
ConditionCheckRead requests to the application if the conditions (System state,…)
to read the Data are correct. This operation is called for all requested DIDs before
requesting the data of each DID.
A ConditionCheckRead interface is defined for every data of each DID with read
access
8.8.3.2.5 GetScalingInformation
Request to the application for the scaling information of a Data (see
SWS_Dcm_00394)
8.8.3.2.6 ReturnControlToEcu
Request to the application to return control to ECU of an IOControl (see
SWS_Dcm_00396)
8.8.3.2.7 ResetToDefault
Name DataServices_{Data}
Comment --
IsService true
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.SHORT-NAME)}) ||
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData.SHORT-NAME)})
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_SYNCH_CLIENT_SERVER) ||({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspData.DcmDspDataUsePort)} == USE_DATA_ASYNCH_CLIENT_SERVER) ||
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/
DcmDspPidService01.DcmDspPidDataUsePort)} ==
USE_DATA_SYNCH_CLIENT_SERVER)
0 E_OK
Possible
1 E_NOT_OK
Errors
10 DCM_E_PENDING
Operations
ConditionCheckRead
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_ASYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspDidInfo/DcmDspDidAccess/DcmDspDidRead)} != NULL) && ({ecuc(Dcm/
DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataConditionCheckReadFncUsed)}
== TRUE)
OpStatus
Comment --
Variation --
Direction IN
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
ConditionCheckRead
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_SYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspDidInfo/DcmDspDidAccess/DcmDspDidRead)} != NULL) && ({ecuc(Dcm/
DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataConditionCheckReadFncUsed)}
== TRUE)
ErrorCode
Comment --
Variation --
Direction OUT
FreezeCurrentState
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_ASYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl/
DcmDspDidFreezeCurrentState)} == TRUE)
Parameters OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
FreezeCurrentState
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_SYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl/
DcmDspDidFreezeCurrentState)} == TRUE)
ErrorCode
Comment --
Variation --
Direction OUT
GetScalingInformation
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
Variation USE_DATA_ASYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspData->DcmDspDataInfoRef.DcmDspDataScalingInfoSize)} != NULL)
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
ScalingInfo
Comment --
Type ScalingInfoArrayType_{Data}
Parameters
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspData.SHORT-NAME)})
Direction OUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
GetScalingInformation
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
Variation USE_DATA_SYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspData->DcmDspDataInfoRef.DcmDspDataScalingInfoSize)} != NULL)
ScalingInfo
Parameters Comment --
Type ScalingInfoArrayType_{Data}
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspData.SHORT-NAME)})
Direction OUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
ReadData
The server is not allowed to return E_NOT_OK, but shall always provide a valid data value
(e.g. a default/replacement value in an error-case) to Dcm/Dem nevertheless the signature of the
Comments operation includes E_NOT_OK to ensure compatibility between server runnable and RTE Call
API, since the RTE may return negative Std_Return values in certain cases (e.g. partition of
server stopped)
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
Variation USE_DATA_ASYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspDidInfo/DcmDspDidAccess/DcmDspDidRead)} != NULL)
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
Data
Parameters
Comment --
Type DataArrayType_{Data}
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspData.SHORT-NAME)}) || ({ecuc(Dcm/
Variation
DcmConfigSet/DcmDsp/DcmDspPid/
DcmDspPidData.SHORT-NAME)})
Direction OUT
Errors
E_NOT_OK Request was not successful
ReadData
The server is not allowed to return E_NOT_OK, but shall always provide a valid data value
(e.g. a default/replacement value in an error-case) to Dcm/Dem nevertheless the signature of the
Comments operation includes E_NOT_OK to ensure compatibility between server runnable and RTE Call
API, since the RTE may return negative Std_Return values in certain cases (e.g. partition of
server stopped)
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_SYNCH_CLIENT_SERVER) && (({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspDidInfo/DcmDspDidAccess/DcmDspDidRead)} != NULL) || ({ecuc(Dcm/
DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/DcmDspPidService01.
DcmDspPidDataUsePort)} == USE_DATA_SYNCH_CLIENT_SERVER))
Data
Comment --
Type DataArrayType_{Data}
Parameters
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspData.SHORT-NAME)}) || ({ecuc(Dcm/
Variation
DcmConfigSet/DcmDsp/DcmDspPid/
DcmDspPidData.SHORT-NAME)})
Direction OUT
ReadDataLength
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_ASYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspDidInfo/DcmDspDidAccess/DcmDspDidRead)} != NULL) && ({ecuc(Dcm/
DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataInfoRef-
>DcmDspDataFixedLength)} == FALSE)
OpStatus
Parameters Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
DataLength
Comment --
Type uint16
Variation --
Direction OUT
ReadDataLength
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_SYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspDidInfo/DcmDspDidAccess/DcmDspDidRead)} != NULL) && ({ecuc(Dcm/
DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataInfoRef-
>DcmDspDataFixedLength)} == FALSE)"
DataLength
Comment --
Variation --
Direction OUT
ResetToDefault
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
Variation USE_DATA_ASYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl/DcmDspDidResetToDefault)}
== TRUE)
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
Parameters
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
ResetToDefault
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_SYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl/DcmDspDidResetToDefault)}
== TRUE)
ErrorCode
Comment --
Variation --
Direction OUT
ReturnControlToECU
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_ASYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl/
DcmDspDidReturnControlToEcu)} == TRUE)
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
Parameters
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
ReturnControlToECU
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_SYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl/
DcmDspDidReturnControlToEcu)} == TRUE)
ErrorCode
Comment --
Variation --
Direction OUT
ShortTermAdjustment
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_ASYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl/
DcmDspDidShortTermAdjustment)} == TRUE) && ({ecuc(Dcm/DcmConfigSet/
DcmDsp/DcmDspDataInfo.DcmDspDataFixedLength)} == TRUE)
ControlStateInfo
Comment --
Type DataArrayType_{Data}
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspData.SHORT-NAME)})
Direction IN
OpStatus
Comment --
Parameters
Type Dcm_OpStatusType
Variation --
Direction IN
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
ShortTermAdjustment
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_ASYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl/
DcmDspDidShortTermAdjustment)} == TRUE) && ({ecuc(Dcm/DcmConfigSet/
DcmDsp/DcmDspDataInfo.DcmDspDataFixedLength)} == FALSE)
ControlStateInfo
Comment --
Type DataArrayType_{Data}
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspData.SHORT-NAME)})
Direction IN
DataLength
Comment --
Type uint16
Variation --
Direction IN
Parameters
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
ShortTermAdjustment
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_SYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl/
DcmDspDidShortTermAdjustment)} == TRUE) && ({ecuc(Dcm/DcmConfigSet/
DcmDsp/DcmDspDataInfo.DcmDspDataFixedLength)} == TRUE)
ControlStateInfo
Comment --
Type DataArrayType_{Data}
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspData.SHORT-NAME)})
Direction IN
Parameters
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
ShortTermAdjustment
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_SYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl/
DcmDspDidShortTermAdjustment)} == TRUE) && ({ecuc(Dcm/DcmConfigSet/
DcmDsp/DcmDspDataInfo.DcmDspDataFixedLength)} == FALSE)
ControlStateInfo
Comment --
Type DataArrayType_{Data}
Parameters
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspData.SHORT-NAME)})
Direction IN
239 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
DataLength
Comment --
Type uint16
Variation --
Direction IN
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
WriteData
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_ASYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspDidInfo/DcmDspDidAccess/DcmDspDidWrite)} != NULL) && ({ecuc(Dcm/
DcmConfigSet/DcmDsp/DcmDspDataInfo.DcmDspDataFixedLength)} == TRUE)
Data
Comment --
Type DataArrayType_{Data}
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspData.SHORT-NAME)})
Direction IN
OpStatus
Parameters
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
WriteData
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_ASYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspDidInfo/DcmDspDidAccess/DcmDspDidWrite)} != NULL) && ({ecuc(Dcm/
DcmConfigSet/DcmDsp/DcmDspDataInfo.DcmDspDataFixedLength)} == FALSE)
Data
Comment --
Type DataArrayType_{Data}
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspData.SHORT-NAME)})
Direction IN
DataLength
Comment --
Type uint16
Parameters
Variation --
Direction IN
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
WriteData
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
USE_DATA_SYNCH_CLIENT_SERVER) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspDidInfo/DcmDspDidAccess/DcmDspDidWrite)} != NULL) && ({ecuc(Dcm/
DcmConfigSet/DcmDsp/DcmDspDataInfo.DcmDspDataFixedLength)} == TRUE)
Data
Comment --
Type DataArrayType_{Data}
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspData.SHORT-NAME)})
Direction IN
Parameters
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
WriteData
Comments --
Variation ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.DcmDspDataUsePort)} ==
Data
Comment --
Type DataArrayType_{Data}
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspData.SHORT-NAME)})
Direction IN
DataLength
Comment --
Parameters
Type uint16
Variation --
Direction IN
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
⌋()
8.8.3.2.11 Sender Receiver interface
Using the concepts of the SW-C template, the interface is defined as follows if
SenderReceiver interface is used (DcmDspDataUsePort set to
USE_DATA_SENDER_RECEIVER):
[SWS_Dcm_00687] ⌈ SenderReceiver DataServices_{Data}
Name DataServices_{Data}
Comment --
IsService false
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.SHORT-NAME)}) ||
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData.SHORT-NAME})
Variation
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort)} ==
USE_DATA_SENDER_RECEIVER) || ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/
243 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
DcmDspPidData/DcmDspPidService01/DcmDspPidDataUsePort} ==
USE_DATA_SENDER_RECEIVER)
data
Type boolean
(({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataSize)} ==
NULL) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/
DcmDspDataType)} == BOOLEAN)) || (({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspPid/DcmDspPidData/DcmDspPidDataSize) == NULL}) &&
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/
DcmDspPidService01/DcmDspPidDataType)} ==BOOLEAN ))
data
Type sint8
(({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataSize)} ==
NULL) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/
DcmDspDataType)} == SINT8)) ||(({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspPid/DcmDspPidData/DcmDspPidDataSize) == NULL}) &&
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/
DcmDspPidService01/DcmDspPidDataType)} ==SINT8))
data
Type sint16
(({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataSize)} ==
NULL) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/
Data DcmDspDataType)} == SINT16)) ||(({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
Elements DcmDspPid/DcmDspPidData/DcmDspPidDataSize) == NULL}) &&
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/
DcmDspPidService01/DcmDspPidDataType)} ==SINT16))
data
Type sint32
(({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataSize)} ==
NULL) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/
DcmDspDataType)} == SINT32)) ||(({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspPid/DcmDspPidData/DcmDspPidDataSize) == NULL}) &&
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/
DcmDspPidService01/DcmDspPidDataType)} ==SINT32))
data
Type uint32
(({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataSize)} ==
NULL) && ({ecuc(Dcm/DcmConfigSet/DcmDspDcmDspData/
DcmDspDataType)} == UINT32)) ||(({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspPid/DcmDspPidData/DcmDspPidDataSize) == NULL} &&
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/
DcmDspPidService01/DcmDspPidDataType)} ==UINT32))
data
Type uint8
244 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
data
Type uint16
data
Type DataArrayType_{Data}
(({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataSize)}> 8)
&& ({ecuc(Dcm/DcmConfigSet/DcmDspDcmDspData/DcmDspDataType)} ==
UINT8) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/
DcmDspDataSize)} % 8 == 0)) || (({ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspPid/DcmDspPidData/DcmDspPidDataSize)}> 8) && ({ecuc(Dcm/
Variation DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/DcmDspPidService01/
DcmDspPidDataType)} == UINT8)&& ({ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspPid/DcmDspPidData/DcmDspPidDataSize)} % 8 == 0))
Data = ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.SHORT-NAME)}) ||
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData.SHORT-
NAME)})
⌋ ()
8.8.3.2.12 DataServices callout
From the point of view of the DCM, the operations have the following signatures:
Note : The OpStatus parameter shall only exist for asynchronous operations (if
DcmDspDataUsePort is set to USE_DATA_ASYNCH_CLIENT_SERVER or
USE_DATA_ASYNCH_FNC). In case of synchronous operations
(DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER or
USE_DATA_SYNCH_FNC), the OpStatus parameter shall not exist.
1.1.1.1.1.14 ReadData
[SWS_Dcm_00793] ⌈
if DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER or
USE_DATA_SYNCH_FNC, the following definition is used:
[SWS_Dcm_00794] ⌈
if DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER or
USE_DATA_SYNCH_FNC, the following definition is used:
1.1.1.1.1.16 ReadDataLength
[SWS_Dcm_00796] ⌈
if DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER or
USE_DATA_SYNCH_FNC, the following definition is used:
1.1.1.1.1.17 ConditionCheckRead
[SWS_Dcm_00797] ⌈
if DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER or
USE_DATA_SYNCH_FNC, the following definition is used:
1.1.1.1.1.18 GetScalingInformation
[SWS_Dcm_00798] ⌈
if DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER or
USE_DATA_SYNCH_FNC, the following definition is used:
1.1.1.1.1.19 ReturnControlToECU
[SWS_Dcm_00799] ⌈if DcmDspDataUsePort is set to
USE_DATA_SYNCH_CLIENT_SERVER or USE_DATA_SYNCH_FNC, the following
definition is used:
[SWS_Dcm_00800]
⌈if DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER or
USE_DATA_SYNCH_FNC, the following definition is used:
1.1.1.1.1.21 FreezeCurrentState
[SWS_Dcm_00801]
⌈if DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER or
USE_DATA_SYNCH_FNC, the following definition is used:
1.1.1.1.1.22 ShortTermAdjustment
[SWS_Dcm_00802]
⌈ If DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER or
USE_DATA_SYNCH_FNC and if DcmDspDataFixedLength is set to TRUE, the
following definition is used:
8.8.3.3 DataServices_DIDRange_{Range}
8.8.3.3.1 Client Server interface
The following interface defines an operation needed to get the DID range
Using the concepts of the SW-C template, the interface is defined as follows:
[SWS_Dcm_00769] ⌈ClientServerInterface DataServices_DIDRange_{Range}
Name DataServices_DIDRange_{Range}
Comment --
IsService true
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDsp/DcmDspDidRange.
DcmDspDidRangeUsePort)} == TRUE
Variation
Range = ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDsp/DcmDspDidRange.SHORT-
NAME)})
0 E_OK
Possible
1 E_NOT_OK
Errors
10 DCM_E_PENDING
Operations
IsDidAvailable
Comments --
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDsp/DcmDspDidRange.
Variation
DcmDspDidRangeHasGaps)} == TRUE
DID
Comment --
Variation --
Direction IN
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
supported
Comment --
Type uint8
Variation --
Direction OUT
Possible
E_NOT_OK --
Errors
ReadDidData
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspDidRange->DcmDspDidRangeInfoRef/
Variation
DcmDspDidAccess/DcmDspDidRead)} != NULL)
DID
Comment --
Type uint16
Variation --
Direction IN
Data
Parameters
Comment --
Type DcmDspDidRangeArrayType_{Range}
Range = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspDidRange.SHORT-NAME)})
Direction OUT
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
DataLength
Comment --
Type uint16
Variation --
Direction OUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
Possible
E_NOT_OK --
Errors
WriteDidData
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspDidRange->DcmDspDidRangeInfoRef/
Variation
DcmDspDidAccess/DcmDspDidWrite)} != NULL)
DID
Comment --
Type uint16
Variation --
Direction IN
Parameters
Data
Comment --
Type DcmDspDidRangeArrayType_{Range}
Range = ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspDidRange.SHORT-NAME)})
Direction IN
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
DataLength
Comment --
Type uint16
Variation --
Direction IN
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
Possible
E_NOT_OK --
Errors
⌋()
8.8.3.3.2 DataServices callout
From the point of view of the DCM, the operations have the following signatures:
Note : The OpStatus parameter should only be used for asynchronous operations (if
DcmDspDataUsePort is set to USE_DATA_ASYNCH_CLIENT_SERVER or
USE_DATA_ASYNCH_FNC). In case of synchronous operations
(DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER or
USE_DATA_SYNCH_FNC), the OpStauts parameter should not be used.
1.1.1.1.1.23 IsDidAvailable
[SWS_Dcm_00803]
⌈
Service name: Xxx_IsDidAvailable
Syntax: Std_ReturnType Xxx_IsDidAvailable(
uint16 DID,
Dcm_OpStatusType OpStatus,
260 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
uint8* supported
)
Service ID[hex]: 0x53
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
DID DID value
Parameters (in):
OpStatus Status of the current operation
Parameters None
(inout):
Parameters (out): supported Indicate if the DID is available within the range or not
Std_ReturnType E_OK: this value is always returned.
Return value: DCM_E_PENDING: Request is not yet finished. Further call(s)
required to finish.
Description: This function requests if a specific DID is available within the range or not.
⌋()
1.1.1.1.1.24 ReadDidData
[SWS_Dcm_00804]
⌈
Service name: Xxx_ReadDidData
Syntax: Std_ReturnType Xxx_ReadDidData(
uint16 DID,
uint8* Data,
Dcm_OpStatusType OpStatus,
uint16 DataLength,
Dcm_NegativeResponseCodeType ErrorCode
)
Service ID[hex]: 0x40
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
DID Data ID value
Parameters (in):
OpStatus Status of the current operation
Parameters None
(inout):
Data Buffer where the requested data shall be copied to
DataLength Length of the data to be read
Parameters (out): ErrorCode If the operation Xxx_ReadDidData returns value E_NOT_OK, the
DCM module shall send a negative response with NRC code
equal to the parameter ErrorCode parameter value.
Std_ReturnType E_OK: Request was successful.
E_NOT_OK: Request was not successful.
Return value:
DCM_E_PENDING: Request is not yet finished. Further call(s)
required to finish.
Description: This function requests to the application a data value of a DID
⌋()
1.1.1.1.1.25 WriteDidData
[SWS_Dcm_00805] ⌈
Using the concepts of the SW-C template, the interface is defined as follows:
[SWS_Dcm_00688] ⌈ ClientServerInterface InfotypeServices_{VehInfoData}
Name InfotypeServices_{VehInfoData}
Comment --
IsService true
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspVehInfo/DcmDspVehInfoData/
DcmDspVehInfoDataUsePort)}==TRUE
Variation
VehInfoData = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspVehInfo/
DcmDspVehInfoData.SHORT-NAME)}
0 E_OK
Possible
1 E_NOT_OK
Errors
10 DCM_E_PENDING
Operations
GetInfotypeValueData
Comments --
Variation --
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
Parameters
DataValueBuffer
Comment --
Type InfoTypeServicesArrayType_{VehInfoData}
VehInfoData = {ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspVehInfo/DcmDspVehInfoData.SHORT-NAME)}
Direction OUT
Possible
E_NOT_OK --
Errors
From the point of view of the DCM, the operation has the following signature:
Std_ReturnType Xxx_GetInfotypeValueData(Dcm_OpStatusType OpStatus,
uint8* DataValueBuffer)⌋()
8.8.3.5 RoutineServices_{RoutineName}
The following interface defines operations needed for the UDS Service
RoutineControl (0x31) (see SWS_Dcm_00400, SWS_Dcm_00401,
SWS_Dcm_00402, SWS_Dcm_00403, SWS_Dcm_00404, SWS_Dcm_00405).
Using the concepts of the SW-C template, the interface is defined as follows:
[SWS_Dcm_00690] ⌈ ClientServerInterface RoutineServices_{RoutineName}
Name RoutineServices_{RoutineName}
Comment --
IsService true
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRRoutine.DcmDspRoutineUsePort)} ==
TRUE
Variation
RoutineName = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRRoutine.SHORT-
NAME)}
0 E_OK
1 E_NOT_OK
Possible
Errors
10 DCM_E_PENDING
12 DCM_E_FORCE_RCRRP
Operations
RequestResults
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineFixedLength)}
Variation == TRUE) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.
DcmDspRequestResultsRoutineSupported)} == TRUE)
OpStatus
Comment --
Parameters
Type Dcm_OpStatusType
Variation --
Direction IN
DataOut_{Signal}
Comment --
Type RequestDataOutType_{Routine}_{Signal}
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineRequestResOut.
Variation
DcmDspRoutineRequestResOutSignal.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction OUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
RequestResults
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineFixedLength)}
Variation == FALSE) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.
DcmDspRequestResultsRoutineSupported)} == TRUE)
OpStatus
Comment --
Type Dcm_OpStatusType
Parameters
Variation --
Direction IN
DataOut_{Signal}
Comment --
Type RequestDataOutType_{Routine}_{Signal}
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineRequestResOut.
DcmDspRoutineRequestResOutSignal.
DcmDspRoutineSignalType)} != VARIABLE_LENGTH
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineRequestResOut.
DcmDspRoutineRequestResOutSignal.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction OUT
DataOut_{Signal}
Comment --
Type RequestFlexibleOutArrayDataType_{Routine}_{Signal}
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineRequestResOut.
DcmDspRoutineRequestResOutSignal.
DcmDspRoutineSignalType)} == VARIABLE_LENGTH
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineRequestResOut.
DcmDspRoutineRequestResOutSignal.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction OUT
currentDataLength
Comment --
Type uint16
Variation --
Direction OUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
Start
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineFixedLength)}
Variation
== TRUE)
DataIn_{Signal}
Comment --
Type StartDataInType_{Routine}_{Signal}
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStartIn.DcmDspRoutineStartInSignal.
Variation
SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction IN
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Parameters
Direction IN
DataOut_{Signal}
Comment --
Type StartDataOutType_{Routine}_{Signal}
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStartOut.
Variation
DcmDspRoutineStartOutSignal.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction OUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
Start
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineFixedLength)}
Variation
== FALSE)
DataIn_{Signal}
Comment --
Type StartDataInType_{Routine}_{Signal}
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStartIn.DcmDspRoutineStartInSignal.
DcmDspRoutineSignalType)} != VARIABLE_LENGTH
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStartIn.DcmDspRoutineStartInSignal.
SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction IN
Parameters
DataIn_{Signal}
Comment --
Type StartFlexibleInArrayDataType_{Routine}_{Signal}
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStartIn.DcmDspRoutineStartInSignal.
DcmDspRoutineSignalType)} == VARIABLE_LENGTH
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStartIn.DcmDspRoutineStartIn.SHORT-
NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction IN
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
DataOut_{Signal}
Comment --
Type StartDataOutType_{Routine}_{Signal}
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStartOut.
DcmDspRoutineStartOutSignal.
DcmDspRoutineSignalType)} != VARIABLE_LENGTH
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStartOut.
DcmDspRoutineStartOutSignal.SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction OUT
DataOut_{Signal}
Comment --
Type StartFlexibleOutArrayDataType_{Routine}_{Signal}
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStartOut.
DcmDspRoutineStartOutSignal.
DcmDspRoutineSignalType)} == VARIABLE_LENGTH
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStartOut.DcmDspRoutineStartOut.
SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction OUT
currentDataLength
Comment --
Type uint16
Variation --
Direction INOUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
Stop
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineFixedLength)}
Variation == TRUE) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.
DcmDspStopRoutineSupported)} == TRUE)
DataIn_{Signal}
Comment --
Type StopDataInType_{Routine}_{Signal}
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStopIn.DcmDspRoutineStopInSignal.
Variation
SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction IN
Parameters OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
DataOut_{Signal}
Comment --
Type StopDataOutType_{Routine}_{Signal}
DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStopOut.DcmDspRoutineStopOutSignal.
SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction OUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
Stop
Comments --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.DcmDspRoutineFixedLength)}
Variation == FALSE) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine.
DcmDspStopRoutineSupported)} == TRUE)
DataIn_{Signal}
Comment --
Type StopDataInType_{Routine}_{Signal}
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStopIn.DcmDspRoutineStopInSignal.
DcmDspRoutineSignalType)} != VARIABLE_LENGTH
Parameters Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStopIn.DcmDspRoutineStopInSignal.
SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction IN
DataIn_{Signal}
Comment --
Type StopFlexibleInArrayDataType_{Routine}_{Signal}
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStopIn.DcmDspRoutineStopInSignal.
DcmDspRoutineSignalType)} == VARIABLE_LENGTH
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStopIn.DcmDspRoutineStopIn.SHORT-
NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction IN
OpStatus
Comment --
Type Dcm_OpStatusType
Variation --
Direction IN
DataOut_{Signal}
Comment --
Type StopDataOutType_{Routine}_{Signal}
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStopOut.DcmDspRoutineStopOutSignal.
DcmDspRoutineSignalType)} != VARIABLE_LENGTH
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStopOut.DcmDspRoutineStopOutSignal.
SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction OUT
DataOut_{Signal}
Comment --
Type StopFlexibleOutArrayDataType_{Routine}_{Signal}
{ecuc(DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStopOut.DcmDspRoutineStopOutSignal.
DcmDspRoutineSignalType)} == VARIABLE_LENGTH
Signal = {ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspRoutine.DcmDspRoutineInfoRef.
DcmDspRoutineStopOut.DcmDspRoutineStopOut.
SHORT-NAME)}
Routine = {ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspRoutine.SHORT-NAME)}
Direction OUT
272 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
currentDataLength
Comment --
Type uint16
Variation --
Direction INOUT
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
⌋()
From the point of view of the DCM, the operations have the following signatures:
//If DcmDspRoutineFixedLength is set to FALSE, the following
//definition is used
Std_ReturnType Xxx_Start(DcmDspRoutineSignalType dataIn1,…,uint8*
dataInN,
Dcm_OpStatusType OpStatus,
DcmDspRoutineSignalType* dataOut1,…,uint8*
dataOutN,
uint16* currentDataLength,
Dcm_NegativeResponseCodeType* ErrorCode)
//If DcmDspRoutineFixedLength is set to TRUE, the following
//definition is used
Std_ReturnType Xxx_Start(DcmDspRoutineSignalType
dataIn1,…,DcmDspRoutineSignalType dataInN,
Dcm_OpStatusType OpStatus,
DcmDspRoutineSignalType* dataOut1,…,
DcmDspRoutineSignalType* dataOutN,
Dcm_NegativeResponseCodeType* ErrorCode)
8.8.3.6 RequestControlServices_{Tid}
The interface RequestControlServices_{Name} allows the DCM to provide OBD
Service $08 (see SWS_Dcm_00419).
Using the concepts of the SW-C template, the interface is defined as follows:
[SWS_Dcm_00691] ⌈ ClientServerInterface RequestControlServices_{Tid}
Name RequestControlServices_{Tid}
Comment --
IsService true
0 E_OK
Possible Errors
1 E_NOT_OK
Operations
RequestControl
Comments --
Variation --
OutBuffer
Comment --
Type RequestControlServicesOutArrayType_{Tid}
Tid = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRequestControl.
Parameters Variation
SHORT-NAME)}
Direction OUT
InBuffer
Comment --
Type RequestControlServicesInArrayType_{Tid}
Tid = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRequestControl.
Variation
SHORT-NAME)}
Direction IN
⌋()
From the point of view of the DCM, the operation has the following signature:
Std_ReturnType Xxx_RequestControl(uint8* OutBuffer, uint8* InBuffer)
8.8.3.7 CallbackDCMRequestServices
The interface CallbackDCMRequestServices provides information on the status of
the protocol communication and allows the Application to disallow a protocol (see
SWS_Dcm_00036, SWS_Dcm_00144, SWS_Dcm_00145, SWS_Dcm_00146;
SWS_Dcm_00147, SWS_Dcm_00459).
Using the concepts of the SW-C template, the interface is defined as follows:
[SWS_Dcm_00692] ⌈ ClientServerInterface CallbackDCMRequestServices {
Name CallbackDCMRequestServices
Comment --
IsService true
Variation --
0 E_OK
5 E_PROTOCOL_NOT_ALLOWED
Operations
StartProtocol
Comments --
Variation --
ProtocolID
Comment --
Variation --
Direction IN
Possible E_NOT_OK --
Errors
E_PROTOCOL_NOT_ALLOWE conditions in application allows no further procession
D of protocol
StopProtocol
Comments --
Variation --
ProtocolID
Comment --
Variation --
Direction IN
⌋()
From the point of view of the DCM, the operations have the following signatures:
Std_ReturnType Xxx_StartProtocol(Dcm_ProtocolType ProtocolID)
Std_ReturnType Xxx_StopProtocol(Dcm_ProtocolType ProtocolID)
8.8.3.8 ServiceRequestNotification
The interface ServiceRequestNotification indicates to the Application that a service is
about to be executed and allows the Application to reject the execution of the service
request (see SWS_Dcm_00218, SWS_Dcm_00462, SWS_Dcm_00463).
Using the concepts of the SW-C template, the interface is defined as follows:
[SWS_Dcm_00694] ⌈ ClientServerInterface ServiceRequestNotification
Name ServiceRequestNotification
Comment --
IsService true
({ecuc(Dcm/DcmConfigSet/DcmDsd/
Variation DcmDsdRequestManufacturerNotificationEnabled)}==TRUE) || ({ecuc(Dcm/
DcmConfigSet/DcmDsd/DcmDsdRequestSupplierNotificationEnabled )}==TRUE)
0 E_OK
Possible
1 E_NOT_OK
Errors
8 E_REQUEST_NOT_ACCEPTED
Operations
Confirmation
Comments --
Variation --
SID
Type uint8
Variation --
Direction IN
ReqType
Parameters
Type uint8
Variation --
Direction IN
SourceAddress
Type uint16
Variation --
Direction IN
ConfirmationStatus
Type Dcm_ConfirmationStatusType
Variation --
Direction IN
Indication
Comments --
Variation --
SID
Type uint8
Variation --
Direction IN
RequestData
Parameters
This parameter contains the complete request data
Comment
(diagnostic buffer), except the service ID
Type RequestDataArray
Variation --
Direction IN
DataSize
Type uint16
Variation --
Direction IN
ReqType
Type uint8
Variation --
Direction IN
SourceAddress
Type uint16
Variation --
Direction IN
ErrorCode
Comment --
Type Dcm_NegativeResponseCodeType
Variation --
Direction OUT
Possible
E_NOT_OK --
Errors
⌋()
From the point of view of the DCM, the operations has the following signatures:
Std_ReturnType Xxx_Indication(uint8 SID, uint8* RequestData, uint16
DataSize, uint8 ReqType, uint16 SourceAddress,
Dcm_NegativeResponseCodeType* ErrorCode )
Naming of the port : The prefix of the port name is fixed and defined herafter (e.g.
DataServices_). The name behind the prefix corresponds to the name of the
associated container in the ECU configuration and can be freely defined during the
configuration step.
e.g. : for a DcmDspData container called Speed the port name would be
DataServices_Speed
ServiceSwComponentType Dcm {
RunnableEntity MainFunction
symbol “Dcm_MainFunction”
canbeInvokedConcurrently = FALSE
SSCP = port CBFaultDetectCtrDummy,
GetFaultDetectionCounter
Name DCMServices
Description --
Variation --
⌋()
Name DataServices_{Data}
Description --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort)} ==
(USE_DATA_SENDER_RECEIVER)) && ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation
DcmDspDidInfo/DcmDspDidAccess/DcmDspDidWrite)} != NULL)
Data = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.SHORT-NAME)}
⌋()
Name DCM_Roe_{RoeName}
Description --
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoe/DcmDspRoeEvent)}
Variation RoeName = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRoe/DcmDspRoeEvent.
SHORT-NAME)}
⌋()
Name CallbackDCMRequestServices_{Name}
Description --
Name = {ecuc(Dcm/DcmConfigSet/DcmDsl/DcmDslCallbackDCMRequestService.
Variation
SHORT-NAME)}
⌋()
Name DataServices_DIDRange_{Range}
Description --
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDsp/DcmDspDidRange.
DcmDspDidRangeUsePort)} == TRUE
Variation
Range = ({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDsp/DcmDspDidRange.SHORT-
NAME)})
⌋()
Name DataServices_{Data}
Description --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort)} ==
(USE_DATA_SENDER_RECEIVER || USE_DATA_ASYNCH_CLIENT_SERVER ||
USE_DATA_SYNCH_CLIENT_SERVER)) || ({ecuc(Dcm/DcmConfigSet/DcmDsp/
Variation DcmDspPid/DcmDspPidData/DcmDspPidService01.DcmDspPidDataUsePort)} ==
(USE_DATA_SYNCH_CLIENT_SERVER || USE_DATA_SENDER_RECEIVER))
Data = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.SHORT-NAME)} ||
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData.SHORT-NAME)}
⌋()
Name DataServices_{Data}
Description --
({ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort)} ==
(USE_DATA_SENDER_RECEIVER || USE_DATA_ASYNCH_CLIENT_SERVER ||
Variation USE_DATA_SYNCH_CLIENT_SERVER)) || ({ecuc(Dcm/DcmConfigSet/DcmDsp/
DcmDspPid/DcmDspPidData/DcmDspPidService01.DcmDspPidDataUsePort)} ==
USE_DATA_SYNCH_CLIENT_SERVER)
284 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
Data = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspData.SHORT-NAME)} ||
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData.SHORT-NAME)}
⌋()
Name InfotypeServices_{VehInfoData}
Description --
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspVehInfo/DcmDspVehInfoData/
DcmDspVehInfoDataUsePort)}==TRUE
Variation
VehInfoData = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspVehInfo/
DcmDspVehInfoData.SHORT-NAME)}
⌋()
Name RequestControlServices_{Tid}
Description --
⌋()
[SWS_Dcm_01039] ⌈RequiredPort RequestManufacturerNotification_{Name}
Name RequestManufacturerNotification_{Name}
Description --
({ecuc(Dcm/DcmConfigSet/DcmDsd/
DcmDsdRequestManufacturerNotificationEnabled)}==TRUE)
Variation
Name = {ecuc(Dcm/DcmConfigSet/DcmDsd/
DcmDsdServiceRequestManufacturerNotification.SHORT-NAME)}
⌋()
Name RoutineServices_{RoutineName}
Description --
{ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRRoutine.DcmDspRoutineUsePort)} ==
Variation TRUE
RoutineName = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspRRoutine.SHORT-NAME)}
⌋()
Name SecurityAccess_{SecurityLevel}
Description --
SecurityLevel = {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/
DcmDspSecurityRow.SHORT-NAME)}
Variation {ecuc(Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow.
DcmDspSecurityUsePort)} == (USE_SYNCH_CLIENT_SERVER ||
USE_ASYNCH_CLIENT_SERVER)
⌋()
[SWS_Dcm_01042] ⌈RequiredPort
ServiceRequestSupplierNotification_{Name}
Name ServiceRequestSupplierNotification_{Name}
Description --
({ecuc(Dcm/DcmConfigSet/DcmDsd/
DcmDsdRequestSupplierNotificationEnabled)}==TRUE)
Variation
Name = {ecuc(Dcm/DcmConfigSet/DcmDsd/
DcmDsdServiceRequestSupplierNotification.SHORT-NAME)}
⌋()
[SWS_Dcm_00761] ⌈
Service name: Dcm_ExternalSetNegResponse
Syntax: void Dcm_ExternalSetNegResponse(
Dcm_MsgContextType* pMsgContext,
Dcm_NegativeResponseCodeType ErrorCode
)
Service ID[hex]: 0x48
Sync/Async: Synchronous
Reentrancy: Non Reentrant
pMsgContext Message-related information for one diagnostic protocol
Parameters (in): identifier
ErrorCode NRC to be sent in the negative response in case of failure.
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Used by service interpreter outside of DCM to indicate that a the final response
shall be a negative one. Dcm_ExternalSetNegResponse will not finalize the
response processing.
⌋()
8.10.2 Dcm_ExternalProcessingDone
[SWS_Dcm_00762] ⌈
Service name: Dcm_ExternalProcessingDone
Syntax: void Dcm_ExternalProcessingDone(
Dcm_MsgContextType* pMsgContext
)
Service ID[hex]: 0x31
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): pMsgContext Message-related information for one diagnostic protocol identifier
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Used by service interpreter outside of DCM to indicate that a final response can be
sent.
⌋()
8.10.3 <Module>_<DiagnosticService>
[SWS_Dcm_00763] ⌈
Service name: <Module>_<DiagnosticService>
Syntax: Std_ReturnType <Module>_<DiagnosticService>(
287 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
Dcm_OpStatusType OpStatus,
const Dcm_MsgContextType* pMsgContext
)
Service ID[hex]: 0x32
Sync/Async: Asynchronous
Reentrancy: Reentrant
OpStatus DCM_INITIAL: All In-parameters are valid
DCM_CANCEL: All In-parameters are set to 0x0
Parameters (in): pMsgContext Message-related information for one diagnostic protocol
identifier
The pointers in pMsgContext shall point behind the SID
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Request was successful
Return value: E_NOT_OK: Request was not successful
DCM_E_PENDING: Request is not yet finished
Description: Callout function.
DCM shall call this callout function as soon as valid message is received on
relevant DcmRxPduId on SID level .
The usecase of multiple diagnostic protocols will be possible by using different
arguments and the function shall be programmed in a way at it is reentrant. Caller
is responsible for the lifetime of the argument pMsgContext.
The name of the callout is defined within parameter DcmDsdSidTabFnc
⌋()
[SWS_Dcm_00733] ⌈The DCM shall not accept further requests (on same or lower
priority) until the application calls Dcm_ExternalProcessingDone to finalize the
processing. Dcm-internal timeout handling (based on RCR-RP limitation) may lead to
a cancellation of the external diagnostic service processing⌋()
8.10.4 <Module>_<DiagnosticService>_<SubService>
[SWS_Dcm_00764] ⌈
Service name: <Module>_<DiagnosticService>_<SubService>
Syntax: Std_ReturnType <Module>_<DiagnosticService>_<SubService>(
Dcm_OpStatusType OpStatus,
const Dcm_MsgContextType* pMsgContext
)
Service ID[hex]: 0x33
Sync/Async: Asynchronous
Reentrancy: Reentrant
OpStatus DCM_INITIAL: All In-parameters are valid
DCM_CANCEL: All In-parameters are set to 0x0
pMsgContext Message-related information for one diagnostic protocol
Parameters (in):
identifier
The pointer in pMsgContext shall point behind the
SubFunction
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Request was successful
Return value: E_NOT_OK: Request was not successful
DCM_E_PENDING: Request is not yet finished
Description: Callout function.
If a DcmDsdSubServiceFnc is configured for the received subservice, the DCM
shall call this callout function as soon as this subservice is requested.
The usecase of multiple diagnostic protocols will be possible by using different
arguments and the function shall be programmed in a way that it is reentrant.
Caller is responsible for the lifetime of the argument pMsgContext.
The name of the callout is defined within parameter DcmDsdSubServiceFnc.
⌋()
The following interfaces are used in the DCM SWS in order to improve the
understanding of the DCM module behavior. An implementation is not required to
use these interfaces.
8.11.1 DslInternal_SetSecurityLevel
void
DslInternal_SetSecurityLevel(Dcm_SecLevelType SecurityLevel)
289 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
This function sets a new security level value in the DCM module. NOTE: for the
definition of the parameter, refer to Dcm_GetSecurityLevel()
8.11.2 DslInternal_SetSesCtrlType
void
DslInternal_SetSesCtrlType(Dcm_SesCtrlType SesCtrlType)
This function sets a new session control type value in the DCM module. NOTE: for
the definition of the parameter, refer to the Dcm_GetSesCtrlType()
8.11.3 DspInternal_DcmConfirmation
void
DspInternal_DcmConfirmation(Dcm_IdContextType idContext,
uint16 SourceAddress
Dcm_ConfirmationStatusType status)
This function confirms the successful transmission or a transmission error of a
diagnostic service. This is the right time to perform any application state transitions.
This API is also called if the response to a diagnostic service is suppressed.
8.11.4 DslInternal_ResponseOnOneEvent
Dcm_StatusType
DslInternal_ResponseOnOneEvent(const Dcm_MsgType MsgPtr,
Dcm_MsgLenType MsgLen,
uint16 SourceAddress
This API executes the processing of one event, requested internally in the DCM.
8.11.5 DslInternal_ResponseOnOneDataByPeriodicId
Dcm_StatusType
DslInternal_ResponseOnOneDataByPeriodicId(uint8 PeriodicId)
This API provides the processing of one periodic ID event, requested internally in the
DCM. The frequency of calling this function depends on the rate given in the original
ReadDataByPeriodicID request (parameter transmissionMode).
8.11.6 DsdInternal_StartPagedProcessing
void
DsdInternal_StartPagedProcessing(const Dcm_MsgContextType*
pMsgContext)
With this API, the DSP submodule gives the complete response length to the DCM
module and starts paged-buffer handling. This API starts no transmission!
8.11.7 DspInternal_CancelPagedBufferProcessing
void
DspInternal_CancelPagedBufferProcessing()
8.11.8 DsdInternal_ProcessPage
void
DsdInternal_ProcessPage(Dcm_MsgLenType FilledPageLen)
DSP requests transmission of filled page
9 Sequence diagrams
9.1 Overview
For clarification, the following sequence diagrams don’t represent the full
communication mechanism between the DCM module and the PduR module. This is
to keep the sequence diagrams simple.
Before the Dcm_TpRxIndication() call, the PduR module will ask the DCM
module for a buffer by calling Dcm_StartOfReception()and
Dcm_CopyRxData(). This exchange is not shown on the next sequence diagrams.
After a PduR_DcmTransmit() request from the DCM module to the PduR module,
data exchanges with Dcm_CopyTxData() service, are not shown in the sequence
diagrams.
The function Xxx_StartProtocol() shall be called with the very first diagnostic
request.
Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
StartProtocol(Std_ReturnType,
Dcm_ProtocolType)
Dcm_StartProtocol()
[E_OK]
Data_Indication_functionality()
DspInternal_Dcm<DiagnosticService>(Dcm_MsgContextType)
Dsp_Dcm<DiagnosticServices>()
Data_Indication_functionality()
[E_PROTOCOL_NOT_ALLOWED]
Dcm_TpRxIndication()
Request Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
Data_Indication_functionality()
DspInternal_Dcm<DiagnosticService>(Dcm_MsgContextType)
DspInternal_Dcm<DiagnosticServices>()
Data_Indication_functionality()
Dcm_TpRxIndication()
alt response?
PduR_DcmTransmit(Std_ReturnType, PduIdType,
const PduInfoType*) :Std_ReturnType
PduR_DcmTransmit()
{0..P2*ServerMax}
PduR_DcmTransmit(Std_ReturnType, PduIdType,
const PduInfoType*) :Std_ReturnType
PduR_DcmTransmit()
Transmit_functionality()
PduR_DcmTransmit(Std_ReturnType, PduIdType,
const PduInfoType*) :Std_ReturnType
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
Dcm_TpTxConfirmation(PduIdType,
Std_ReturnType)
Data_Confirmation_functionality()
DspInternal_DcmConfirmation(Dcm_IdContextType,
PduIdType, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
Data_Confirmation_functionality()
Dcm_TpTxConfirmation()
Internally, the DSL submodule calculates the time to response the tester. In the case
that the DSP submodule doesn’t close the request with
Dcm_ExternalProcessingDone() (in case of normal response handling) or
DsdInternal_ProcessPage() (in case of paged-buffer handling) during the
293 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
P2ServerMax and/or P2*ServerMax, the DSL submodule sends a negative response
(requestCorectlyReceived-ResponsePending) independently.
Dcm_TpRxIndication(PduIdType,
Request in a Std_ReturnType)
non default
session
Data_Indication_functionality()
DspInternal_Dcm<DiagnosticService>(Dcm_MsgContextType)
DspInternal_Dcm<DiagnosticServices>()
Data_Indication_functionality()
Dcm_TpRxIndication()
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality()
PduR_DcmTransmit(Std_ReturnType, PduIdType, const
PduInfoType*) :Std_ReturnType
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
Dcm_TpTxConfirmation(PduIdType,
Std_ReturnType)
Data_Confirmation_functionality()
DspInternal_DcmConfirmation(Dcm_IdContextType,
PduIdType, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
{S3_Server}
Data_Confimation_functionality()
Dcm_TpTxConfirmation()
ref
Request
A request "ReadDataByPeriodicId" is received and Receive a request message ... - synchronous
processed. For details, please refer to:
ref
Receive a request message ... - asynchronous
Response
Within the Dspa scheduler is started for a cyclic transmission of single responses. The
following sequence chart shows the transmission of one single response (one cycle).
DslInternal_ResponseOnOneDataByPeriodicId(uint8)
Simulate
Request
Data_Indication_functionality()
DspInternal_DcmReadDataByIdentifier(msgContext)
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Response
Transmit_functionality()
PduR_DcmTransmit(Std_ReturnType, PduIdType,
const PduInfoType*) :Std_ReturnType
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
DspInternal_DcmReadDataByIdentifier()
Data_Indication_functionality()
DslInternal_ResponseOnOneDataByPeriodicId()
Dcm_TpTxConfirmation(PduIdType,
Std_ReturnType)
Data_Confirmation_functionality()
DspInternal_DcmConfirmation(Dcm_IdContextType,
PduIdType, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
Data_Confirmation_functionality()
Dcm_TpTxConfirmation()
The DSP submodule requests sampling and transmission of Periodic Identifier data,
when an event to Periodic Identifier occurs (i. e. a given time period is over). The
DSP submodule initiates the sending of one periodic identifier calling the function
ResponseOnOneDataByPeriodicId() provided by the DSL submodule.
295 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
Within this function the DSL submodule simulates a “ReadDataByIdentifier” request
for the given PeriodicId. The High byte of the DataIdentifier shall be set to 0xF2 as
specified in [11]) and the low byte is set to value of the PeriodicId.
The ReadData interfaces of the corresponding Datas of the DID are called to get the
DID value.
The DCM module is not able to receive for the same periodic identifier another
event request from the DSP submodule, unless the confirmation of the current
transmission is received.
ref
A request "ResponseOnEvent" is
received and processed. For details,
please refer to: ref
Receive a request message ... - asynchronous
Response Within the Dsp an event manager is started for event-driven transmission
of single responses. The following sequence chart shows the transmission
of one single event-triggered response.
DspInternal_DcmReadDataByIdentifier(msgContext)
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Response
Transmit_functionality()
PduR_DcmTransmit(Std_ReturnType, sourceAddress,
PduInfoType*)
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
DspInternal_DcmReadDataByIdentifier()
Data_Indication_functionality()
DslInternal_ResponseOnOneEvent()
Dcm_TpTxConfirmation(sourceAddress,
NotifResultType)
Data_Confirmation_functionality()
DspInternal_DcmConfirmation(Dcm_IdContextType,
sourceAddress, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
Data_Confirmation_functionality()
Dcm_TpTxConfirmation()
Dcm_TpRxIndication(PduIdType,
Request
Std_ReturnType)
Data_Indication_functionality()
DspInternal_Dcm<DiagnosticService>(Dcm_MsgContextType)
OBD
Request
Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
Data_Indication_functionality()
Stop_Protocol_functionality()
StopProtocol(Std_ReturnType,
Dcm_ProtocolType)
Dcm_StopProtocol()
Stop_Protocol_functionality()
Data_Indication_functionality()
PduR_DcmCancelTransmitRequest()
PduR_DcmTransmit(Std_ReturnType,
OBD
PduIdType, const PduInfoType*) :
Response
Std_ReturnType
PduR_DcmTransmit()
Dcm_TpRxIndication()
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality()
Transmit_functionality()
Dcm_ExternalProcessingDone()
DCM
PROTOCOL
PREEMPT DspInternal_Dcm<DiagnosticServices>()
TIMEOUT
Data_Indication_functionality()
Dcm_TpRxIndication()
Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
2nd OBD
Request Data_Indication_functionality()
(incomplete
flow)
Request Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
ComM_DCM_ActiveDiagnostic(NetworkHandleType)
ComM_DCM_ActiveDiagnostic()
DspInternal_Dcm<DiagnosticService>(Dcm_MsgContextType)
DspInternal_Dcm<DiagnosticServices>()
Dcm_TpRxIndication()
Response Dcm_TpTxConfirmation(PduIdType,
Std_ReturnType)
DspInternal_DcmConfirmation(Dcm_IdContextType,
PduIdType, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
ComM_DCM_InactiveDiagnostic(NetworkHandleType)
ComM_DCM_InactiveDiagnostic()
Dcm_TpTxConfirmation()
Request Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
DspInternal_Dcm<DiagnosticService>(Dcm_MsgContextType)
DspInternal_Dcm<DiagnosticServices>()
Dcm_TpRxIndication()
Response
Dcm_TpTxConfirmation(PduIdType,
Std_ReturnType)
DspInternal_DcmConfirmation(Dcm_IdContextType,
PduIdType, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
Dcm_TpTxConfirmation()
«module» «module»
Dsl ComM
ComM_DCM_ActiveDiagnostic(NetworkHandleType)
ComM_DCM_ActiveDiagnostic()
Session transition:
Non-default to Default()
Non-Default to ComM_DCM_InactiveDiagnostic(NetworkHandleType)
Default
ComM_DCM_InactiveDiagnostic()
No Communication Dcm_ComM_NoComModeEntered(uint8)
State
Silent
Dcm_ComM_SilentComModeEntered(uint8)
Communication
State
Disable Transmission of ROE
and PeriodicID()
Full Dcm_ComM_FullComModeEntered(uint8)
Communication
State
Enable Transmission of ROE
and PeriodicID()
Request Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
Data_Indication_functionality()
DspInternal_Dcm<DiagnosticService>(Dcm_MsgContextType)
Response Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality()
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
DspInternal_Dcm<DiagnosticService>()
Data_Indication_functionality()
Dcm_TpRxIndication()
Dcm_TpTxConfirmation(PduIdType,
Std_ReturnType)
Data_Confirmation_functionality()
DspInternal_DcmConfirmation(Dcm_IdContextType,
PduIdType, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
Data_Confirmation_functionality()
Dcm_TpTxConfirmation()
Request Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
Data_Indication_functionality()
DspInternal_Dcm<DiagnosticService>(Dcm_MsgContextType)
DspInternal_Dcm<DiagnosticService>()
Data_Indication_functionality()
Dcm_TpRxIndication()
Response Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality()
PduR_DcmTransmit(PduIdType,
const PduInfoType*) :
Std_ReturnType
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
Dcm_TpTxConfirmation(PduIdType,
Std_ReturnType)
Data_Confirmation_functionality()
DspInternal_DcmConfirmation(Dcm_IdContextType,
PduIdType, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
Data_Confirmation_functionality()
Dcm_TpTxConfirmation()
Dcm_TpRxIndication(PduIdType,
Request Std_ReturnType)
Data_Indication_functionality()
DspInternal_Dcm<DiagnosticService>(Dcm_MsgContextType)
Response Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Do NOT
Transmit_functionality()
Do NOT
Transmit_functionality()
DspInternal_DcmConfirmation(Dcm_IdContextType,
PduIdType, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
Dcm_ExternalProcessingDone()
DspInternal_Dcm<DiagnosticService>()
Data_Indication_functionality()
Dcm_TpRxIndication()
Request Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
Data_Indication_functionality()
DspInternal_Dcm<DiagnosticService>(Dcm_MsgContextType)
Response
Dcm_ExternalSetNegResponse(Dcm_MsgContextType*,
Dcm_NegativeResponseCodeType)
Dcm_ExternalSetNegResponse()
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality()
PduR_DcmTransmit(Std_ReturnType, PduIdType,
const PduInfoType*) :Std_ReturnType
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
DspInternal_Dcm<DiagnosticService>()
Data_Indication_functionality()
Dcm_RxIndication()
Dcm_TpTxConfirmation(PduIdType,
Std_ReturnType)
Data_Confirmation_functionality()
DspInternal_DcmConfirmation(Dcm_IdContextType,
PduIdType, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
Data_Confirmation_functionality()
Dcm_TpTxConfirmation()
Dcm_TpRxIndication(PduIdType,
Request
Std_ReturnType)
Data_Indication_functionality()
DspInternal_Dcm<DiagnosticService>(Dcm_MsgContextType)
DsdInternal_StartPagedProcessing(const
Response Dcm_MsgContextType*)
DspInternal_DcmUpdatePage(Dcm_MsgType,
Dcm_MsgLenType)
DspInternal_DcmUpdatePage()
DspInternal_StartPagedProcessing()
DspInternal_Dcm<DiagnosticServices>()
Data_Indication_functionality()
Dcm_TpRxIndication()
DsdInternal_ProcessPage(Dcm_MsgLenType)
PduR_DcmTransmit()
Transmit_functionality()
DsdInternal_ProcessPage()
Dcm_CopyTxData(BufReq_ReturnType,
PduIdType, const PduInfoType*, RetryInfoType*,
PduLengthType*)
Dcm_CopyTxData=BUFREQ_E_BUSY()
Dcm_CopyTxData(BufReq_ReturnType,
PduIdType, const PduInfoType*, RetryInfoType*,
loop PduLengthType*)
transmit
Data_Confirmation_functionality()
DspInternal_DcmUpdatePage(Dcm_MsgType,
Dcm_MsgLenType)
DspInternal_DcmUpdatePage()
Data_Confirmation_functionality()
Dcm_CopyTxData=BUFREQ_E_BUSY()
DsdInternal_ProcessPage(Dcm_MsgLenType)
Transmit_functionality()
Dcm_CopyTxData(BufReq_ReturnType,
PduIdType, const PduInfoType*, RetryInfoType*,
PduLengthType*)
Dcm_CopyTxData=BUFREQ_OK()
Dcm_TpTxConfirmation(PduIdType,
Std_ReturnType)
Data_Confirmation_functionality()
End of
process
DspInternal_DcmConfirmation(Dcm_IdContextType,
PduIdType, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
Data_Confirmation_functionality()
Dcm_TpTxConfirmation()
The following flow is processed in case no error occurs on the Application side:
Start of process:
4) DsdInternal_StartPagedProcessing(): With this API, the DSP submodule
gives the complete response length to the DCM module and starts paged-buffer
handling. This API starts no transmission!
5) UpdatePage(): The DCM module requests data to be transmitted.
6) DsdInternal_ProcessPage(): With this API, the DSP submodule requests
transmission of the current page.
8) PduR_DcmTransmit(): The DCM module requests transmission to the lower
layers.
9) Dcm_CopyTxData(): The buffer is filled and the DCM module shall return
“BUFREQ_OK”(10).
The DCM module reacts in the following described way, when the DSP submodule
starts paged-buffer handling, but is not able to process further on filling the response
data. E.g. there are problems to access data from an EEPROM device.
When providing the Pagebuffer to the DSP submodule (13: UpdatePage()), the DCM
module starts a timeout supervision. If timeout (value configured in
DcmPagedBufferTimeout) occurs, before the DSP submodule requests next page
(DsdInternal_ProcessPage()) following error handling is carried out in the DCM
module:
- The DCM module stops further processing of paged-buffer (item 15),
- The DCM module requests the DSP submodule (14:
DspInternal_CancelPagedBufferProcessing()) to stop further
processing of PagedBuffer, and
- The DCM module will cancel ongoing transmission in lower layers (done with
return value BUFREQ_E_NOT_OK in next Dcm_CopyTxData() request,
item 17).
Dcm_TpRxIndication(PduIdType,
Request Std_ReturnType)
Data_Indication_functionality()
DspInternal_Dcm<DiagnosticService>(Dcm_MsgContextType)
DsdInternal_StartPagedProcessing(const
Response Dcm_MsgContextType*)
DspInternal_DcmUpdatePage(Dcm_MsgType,
Dcm_MsgLenType)
DspInternal_DcmUpdatePage()
DsdInternal_StartPagedProcessing()
DspInternal_Dcm<DiagnosticServices>()
Data_Indication_functionality()
Dcm_TpRxIndication()
DsdInternal_ProcessPage(Dcm_MsgLenType)
Transmit_functionality()
Start of
processPduR_DcmTransmit(Std_ReturnType,
PduIdType, const PduInfoType*) :
Std_ReturnType
PduR_DcmTransmit()
Transmit_functionality()
DsdInternal_ProcessPage()
Dcm_CopyTxData(BufReq_ReturnType,
PduIdType, const PduInfoType*, RetryInfoType*,
PduLengthType*)
Dcm_CopyTxData=BUFREQ_OK()
Dcm_CopyTxData(BufReq_ReturnType,
loop transmit PduIdType, const PduInfoType*, RetryInfoType*,
PduLengthType*)
Data_Confirmation_functionality()
DspInternal_DcmUpdatePage(Dcm_MsgType,
Dcm_MsgLenType)
DspInternal_DcmUpdatePage()
Data_Confirmation_functionality()
Dcm_CopyTxData=BUFREQ_E_BUSY()
DspInternal_DcmCancelPagedBufferProcessing()
{DCM_
PAGEDBUFFER_ DspInternal_DcmCancelPagedBufferProcessing()
TIMEOUT}
Data_Failed_Functionality()
Data_Failed_Functionality()
Dcm_CopyTxData(BufReq_ReturnType,
PduIdType, const PduInfoType*, RetryInfoType*,
PduLengthType*)
Dcm_CopyTxData=BUFREQ_E_NOT_OK()
Dcm_TpTxConfirmation(PduIdType,
Std_ReturnType)
Abort of
process Data_Confirmation_functionality()
DspInternal_DcmConfirmation(Dcm_IdContextType,
PduIdType, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
Data_Confirmation_functionality()
Dcm_TpTxConfirmation()
Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
Data_Indication_functionality()
DspInternal_DcmDiagnosticSessionControl()
DspInternal_DcmDiagnosticSessionControl()
Data_Indication_functionality()
Dcm_TpRxIndication()
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality()
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
Dcm_TpTxConfirmation(PduIdType,
Std_ReturnType)
Data_Confirmation_functionality()
DspInternal_DcmConfirmation(Dcm_IdContextType,
PduIdType, Dcm_ConfirmationStatusType)
DspInternal_DcmConfirmation()
Data_Confirmation_functionality()
Dcm_TpTxConfirmation()
Dcm_TpRxIndication(PduIdType,
Tester Std_ReturnType)
Present with
positive
Data_Indication_functionality()
response
DspInternal_DcmTesterPresent()
DspInternal_DcmTesterPresent()
Data_Indication_functionality()
Dcm_TpRxIndication()
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality()
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
Dcm_TpRxIndication(PduIdType,
Tester
Std_ReturnType)
Present with
negative
Data_Indication_functionality()
response
DspInternal_DcmTesterPresent()
DspInternal_DcmTesterPresent()
Data_Indication_functionality()
Dcm_TpRxIndication()
DspInternal_SetNegResponse(Dcm_MsgContextType*,
Dcm_NegativeResponseCodeType)
DspInternal_SetNegResponse()
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality()
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
Request Dcm_TpRxIndication(PduIdType,
Seed Std_ReturnType)
Data_Indication_functionality()
DspInternal_DcmSecurityAccess()
GetSeed()
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality()
PduR_DcmTransmit(Std_ReturnType, PduIdType,
const PduInfoType*) :Std_ReturnType
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
Dcm_TpRxIndication(PduIdType,
Compare Key
Std_ReturnType)
Data_Indication_functionality()
Dcm_DcmSecurityAccess()
CompareKey(Std_ReturnType,
uint8*, Dcm_OpStatusType)
Dcm_CompareKey()
Dcm_SetSecurityLevel(Dcm_SecLevelType)
Dcm_SetSecurityLevel()
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality()
PduR_DcmTransmit(Std_ReturnType, PduIdType,
const PduInfoType*) :Std_ReturnType
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
To get the security access, the DSD submodule has to call the DSP submodule to
get the seed value from the application. If no error is detected, the seed value is sent
in the positive response.
In a second step, the DSP submodule gets the key calculated by the tester and
requests the application to compare this key with the internal calculated key. If no
Dcm_TpRxIndication(PduIdType,
Std_ReturnType) Data_Indication_functionality()
DspInternal_DcmResponseOnEvent(pMsgContext)
OnDTCStatusChange
subservice
DspInternal_DcmResponseOnEvent()
Data_Indication_functionality()
Dcm_TpRxIndication() Configure Event()
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality() Configuration of DTC,
PduR_DcmTransmit(PduR_ReturnType, PduIdType, Status mask and
PduInfoType*) ServiceToRespondTo
Transmit_functionality()
PduR_DcmTransmit()
Dcm_ExternalProcessingDone()
Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
Data_Indication_functionality()
DspInternal_DcmResponseOnEvent(pMsgContext)
StartResponseOnEvent
subservice
DspInternal_DcmResponseOnEvent()
Data_Indication_functionality()
Internal activation of DTC
Dcm_TpRxIndication() status supervision()
Dcm_DemTriggerOnDTCStatus()
DspInternal_DcmReadDTCInformation(pmsgContext)
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality()
PduR_DcmTransmit(PduR_ReturnType, PduIdType,
PduInfoType*)
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
Dcm_DemTriggerOnDTCStatus()
[FALSE]
Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
Data_Indication_functionality()
DspInternal_DcmResponseOnEvent(pMsgContext)
StopResponseOnEvent
subservice
Data_Indication_functionality() DspInternal_DcmResponseOnEvent()
Dcm_TpRxIndication()
Internal deactivation of
DTC status supervision()
Dcm_ExternalProcessingDone(Dcm_MsgContextType*)
Transmit_functionality()
PduR_DcmTransmit(PduR_ReturnType, PduIdType,
PduInfoType*)
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalProcessingDone()
Above sequence
316 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
diagram shows processing of ResponseOnEvent service for sub-service
OnDtcChange.
After configuration and activation of the event by the service ResponseOnEvent, the
DCM checks the status of the configured DTC on every call to interface
Dcm_DemTriggerOnDTCStatus() in order to identify if the event shall be trigger. This
interface is called by DEM for any DTC status change and independing of the
activation/unactivation of ResponseOnEvent.
Dcm_TpRxIndication(PduIdType,
Std_ReturnType) Data_Indication_functionality()
DspInternal_DcmResponseOnEvent(pMsgContext)
OnChangeOfDataIdentifier
subservice
DspInternal_DcmResponseOnEvent()
Data_Indication_functionality()
Dcm_TpRxIndication()
Configure Event()
DsdInternal_ProcessingDone()
Transmit_functionality() Configuration of DTC,
PduR_DcmTransmit(PduR_ReturnType, PduIdType, Status mask and
PduInfoType*) ServiceToRespondTo
Transmit_functionality()
PduR_DcmTransmit()
DsdInternal_ProcessingDone()
Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
Data_Indication_functionality()
StartResponseOnEvent
DspInternal_DcmResponseOnEvent(pMsgContext) subservice
DspInternal_DcmResponseOnEvent()
Data_Indication_functionality()
Xxx_DcmActivateEvent(EventId,DCM_ROE_ACTIVE)
Dcm_TpRxIndication()
DsdInternal_ProcessingDone() Xxx_DcmActivateEvent()
Transmit_functionality()
PduR_DcmTransmit(PduR_ReturnType, PduIdType,
PduInfoType*)
PduR_DcmTransmit() Transmit_functionality()
DsdInternal_ProcessingDone()
Dcm_TriggerOnEvent(Eventid)
Data_Indication_functionality()
DspInternal_DcmReadDataByIdentifier(pMsgContext)
Xxx_ReadData()
DsdInternal_ProcessingDone()
Xxx_ReadData()
Transmit_functionality()
PduR_DcmTransmit(PduR_ReturnType, PduIdType,
PduInfoType*)
PduR_DcmTransmit()
Transmit_functionality()
DsdInternal_ProcessingDone()
Dcm_TpRxIndication(PduIdType,
Std_ReturnType) Dcm_TriggerOnEvent()
Data_Indication_functionality()
DspInternal_DcmResponseOnEvent(pMsgContext)
StopResponseOnEvent
subservice
Data_Indication_functionality() DspInternal_DcmResponseOnEvent()
Dcm_TpRxIndication()
Xxx_DcmActivateEvent(EventId,DCM_ROE_UNACTIVE)
Xxx_DcmActivateEvent()
DsdInternal_ProcessingDone()
Transmit_functionality()
PduR_DcmTransmit(PduR_ReturnType, PduIdType,
PduInfoType*)
PduR_DcmTransmit()
Transmit_functionality()
DsdInternal_ProcessingDone()
Dcm_TpRxIndication(PduIdType,
Std_ReturnType)
Data_Indication_functionality()
Dcm_DcmDiagnosticSessionControl()
Dcm_DcmDiagnosticSessionControl()
Data_Indication_functionality()
Dcm_TpRxIndication()
Transmit_functionality()
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalSetNegResponse()
Dcm_TpTxConfirmation(PduIdType,
Std_ReturnType)
Data_Confirmation_functionality()
DspInternal_DcmConfirmation(Dcm_IdContextType, PduIdType,
Dcm_ConfirmationStatusType)
Dcm_SetProgConditions()
Dcm_SetProgConditions()
DspInternal_DcmConfirmation()
Data_Confirmation_functionality()
Dcm_TpTxConfirmation()
[FALSE]
Dcm_ExternalSetNegResponse(pMsgContext, NRC
0x22)
Transmit_functionality()
PduR_DcmTransmit()
Transmit_functionality()
Dcm_ExternalSetNegResponse()
10 Configuration specification
10.2.1 Dcm
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration parameters and sub
containers of the DCM module supporting multiple
configuration sets.
DcmConfigSet 1
This container is a MultipleConfigurationContainer, i.e. this
container and its sub-containers exist once per configuration
set.
10.2.2 DcmConfigSet
Included Containers
Container Name Multiplicity Scope / Dependency
These parameters apply to Diagnostic Service Dispatcher. All
parameters for all service dispatchers are included in this one
DcmDsd 1
configuration container.
There must always be one service dispatcher in a DCM.
These parameters apply to a Diagnostic Session Layer. There
may be a parameter set (DSL Configuration) per protocol.
upperMultiplicity: Each DCM configuration must have exactly
DcmDsl 1
one DSL configuration.
lowerMultiplicity: Each DCM configuration must have exactly
one DSL configuration.
These parameters apply to Diagnostic Service Processing.
DcmDsp 0..1
There will always be one set of these parameters per DCM.
DcmGeneral 1 This container contains the configuration (parameters) for
324 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
Component wide parameters
This container contains the configuration (parameters) for
DcmPageBufferCfg 1
Page Buffer handling
This container contains the configuration ( DSP parameter) for
DcmProcessingConditions 0..1
mode arbitration functionality of the Dcm
10.2.3 DcmDsd
Included Containers
Container Name Multiplicity Scope / Dependency
The name of this container is used to define the
name of the R-Port through which the DCM
accesses the interface
ServiceRequestNotification.
The R-Port is named
DcmDsdServiceRequestManufacturerNotification 0..* ServiceRequestManufacturerNotification_<SWC>
where <SWC> is the name of the container
DcmDsdServiceRequestManufacturerNotification.
The lowerMultiplicity is 0: If
DcmDsdRequestManufacturerNotificationEnabled
= false the Indication API is not available.
DcmDsdServiceRequestSupplierNotification 0..* The name of this container is used to define the
10.2.4 DcmDsdServiceTable
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration (DSD parameters) for
DcmDsdService 1..*
Service.
10.2.5 DcmDsdService
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration (DSD parameters) for
SubServices. This configuration is available only for services
DcmDsdSubService 0..* having Subfunction: this container exists only if parameter
DcmDsdSidTabSubfuncAvail, of this service, is set to TRUE
and the parameter DcmDsdSidTabFnc is not existing.
Note : The DCM internal interaction with the DSP is implementation specific and
therefore not explicitly configured
No Included Containers
10.2.7 DcmDsl
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration (parameters)
DcmDslBuffer 1..256
for the diagnostic buffer.
The name of this container is used to define the name
DcmDslCallbackDCMRequestServic of the R-Port through which the DCM access the
1..*
e interface CallbackDCMRequestServices.
The R-Port is named
330 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
CallbackDCMRequestServices_<SWC> where
_<SWC> is the name of the container
DcmDslCallbackDCMRequestService.
This container contains the configuration (parameters)
DcmDslDiagResp 1
for the ResponsePending handling
This container contains the configuration (parameters)
for the protocol configuration (for each protocol) The
DcmDslProtocol 1
following parameters needs to be configured per
protocol.
10.2.8 DcmDslBuffer
No Included Containers
10.2.9 DcmDslCallbackDCMRequestService
10.2.10 DcmDslDiagResp
No Included Containers
10.2.11 DcmDslProtocol
Included Containers
Container Name Multiplicity Scope / Dependency
Definition of a single Row of configuration for the protocol
DcmDslProtocolRow 1..*
configuration (for each protocol)
10.2.12 DcmDslProtocolRow
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains links between Diagnostic Protocol
(=DcmDslProtocolRow) and the according Rx or Tx channel.
DcmDslConnection 1..* Because of the usecase to allow more then one diagnostic
tester (using different CAN channels) it is necessary to allow
configuration of multiple DcmDslConnections.
Container Choices
Container Name Multiplicity Scope / Dependency
This container contains configuration for Diagnostic Main
Connection
(DcmDslProtocolTx, DcmDslProtocolRx). In addition it contains
DcmDslMainConnection 0..1 links to the ROE connection (DcmDslROEConnectionRef) and
the Periodic Transmission Connection
(DcmDslPeriodicTransmissionConRef) relevant for protocols
with DcmDslProtocolTransType = TYPE2 or TYPE1.
This container contains the configuration (parameters) for
Periodic Transmission service.
DcmDslPeriodicTransmission 0..1 Hint: Periodic Transmission request comes via
DcmDslMainConnection and PeriodicTransmission Event
response is given via DcmDslPeriodicTransmission.
This container contains the configuration (parameters) for
ResponseOnEvent service.
DcmDslResponseOnEvent 0..1 Hint: ROE service request is recept via
DcmDslMainConnection and that Event response is given via
DcmDslResposeOnEvent
10.2.14 DcmDslMainConnection
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration (parameters) for the
protocol configuration of RX channel (for each protocol)
The following parameters needs to be configured per protocol.
Please keep in mind, that the parameter
DcmDslProtocolRxPduId can be given several times per
protocol and that the combination from
DcmDslProtocolRx 1..* DcmDslProtocolRxPduId and DcmDslProtocolRxAddrType is
unique. Only one physical protocol is allowed per connection.
upperMultiplicity: More than one receive PDU ID may be
configured for reception (e.g. one for func requests, one for
phys requests).
lowerMultiplicity: At least one receive PDU ID configuration
must be provided per protocol.
This container contains the configuration (parameters) for the
DcmDslProtocolTx 1 protocol configuration of TX channel (for each protocol)
The included parameters needs to be configured per protocol.
No Included Containers
10.2.16 DcmDslProtocolTx
No Included Containers
10.2.17 DcmDslPeriodicTransmission
Included Containers
Container Name Multiplicity Scope / Dependency
DcmDslPeriodicConnection 0..* Holding the TxPduId configuration for PeriodicTransmission.
10.2.18 DcmDslPeriodicConnection
No Included Containers
10.2.19 DcmDslResponseOnEvent
No Included Containers
10.2.20 DcmDsp
Included Containers
Container Name Multiplicity Scope / Dependency
DcmDspComControl 0..1 --
Provide the configuration of the ControlDTCSetting
DcmDspControlDTCSetting 0..1
mechanism.
This container contains the configuration (parameters) of a
DcmDspData 0..*
Data belonging to a DID
This container contains the configuration (parameters) of a
DcmDspDataInfo 0..*
Data
This container contains the configuration (parameters) of
DcmDspDid 0..*
the DID.
This container contains the configuration (parameters) of
DcmDspDidInfo 0..*
the DID's Info
DcmDspDidRange 0..* This container defines the DID Range
This container contains the configuration of the memory
DcmDspMemory 0..1
access.
This container contains the configuration for the Periodic
DcmDspPeriodicDidTransmissio Did transmission.
0..1
n This container exists only if the UDS Service
ReadDataByPeriodicIdentifier(0x2A) is configured.
This container contains the configuration (parameters) for
DcmDspPeriodicTransmission 0..1
Periodic Transmission Processing.
DcmDspPid 0..* This container defines the availability of a PID to the DCM.
345 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
This container contains the configuration (parameters) of
the "Request control of on-board system, test or
component" service (Service $08).
DcmDspRequestControl 0..* The DCM will request the control using an R-Port requiring
a PortInteface RequestControlServices_{Tid}. The R-Port
is named RequestControlServices_{Tid} where {Tid} is the
name of the container DcmDspRequestControl.
Provide the configuration of the ResponseOnEvent
DcmDspRoe 0..1
mechanism.
This container contains the configuration (parameters) for
DcmDspRoutine 0..*
Routines
This container contains the configuration (parameters) for
DcmDspRoutineInfo 0..*
Routine's Info.
This container contains the configuration ( DSP parameter)
for security level configuration (per security level)
DcmDspSecurity 1
Description This container contains Rows of
DcmDspSecurityRow
This container contains the configuration ( DSP parameter)
DcmDspSession 1 session control. configuration (per session control)
This container contains Rows of DcmDspSessionRow.
This container contains the configuration (parameters) of
DcmDspVehInfo 0..*
the "Request vehicle information service" (service $09).
10.2.21 DcmDspComControl
Included Containers
Container Name Multiplicity Scope / Dependency
Collection of ComM channels which shall be controlled
DcmDspComControlAllChannel 0..*
if all networks are addressed.
DcmDspComControlSetting 0..1 Provide the configuration of the Communication control.
DcmDspComControlSpecificChanne Assigns subnet number to ComM channel which will be
0..*
l controlled.
10.2.22 DcmDspComControlAllChannel
No Included Containers
10.2.23 DcmDspComControlSetting
No Included Containers
10.2.24 DcmDspComControlSpecificChannel
No Included Containers
10.2.25 DcmDspDid
Included Containers
Container Name Multiplicity Scope / Dependency
This container defines the reference to 1 DcmDspData
DcmDspDidSignal 0..*
container and position relevant for this DID.
10.2.26 DcmDspDidSignal
No Included Containers
10.2.27 DcmDspDidRange
No Included Containers
10.2.28 DcmDspControlDTCSetting
No Included Containers
10.2.29 DcmDspData
o DcmDspDataUsePort=="USE_DATA_SYNCH_FNC or
o DcmDspDataUsePort==USE_DATA_ASYNCH_FNC".
This parameter is related to the interface Xxx_ConditionCheckRead.
Multiplicity 0..1
Type EcucFunctionNameDef
Default value --
maxLength --
minLength --
regularExpression --
ConfigurationClass Pre-compile time X All Variants
Link time --
Post-build time --
Scope / scope: ECU
Dependency dependency: DcmDspDataReadFnc, DcmDspDataUsePort,
DcmDspDataConditionCheckReadFncUsed
o DcmDspDataUsePort=="USE_DATA_SYNCH_FNC or
o DcmDspDataUsePort==USE_DATA_ASYNCH_FNC".
This parameter is related to the interface Xxx_ReadData.
Multiplicity 0..1
Type EcucFunctionNameDef
Default value --
maxLength --
minLength --
regularExpression --
ConfigurationClass Pre-compile time X All Variants
Link time --
Post-build time --
Scope / scope: ECU
Dependency dependency: DcmDspDataConditionCheckReadFnc, DcmDspDataUsePort,
DcmDspDataConditionCheckReadFncUsed
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration
(parameters) of an alternative Diagnosis
DcmDspDiagnosisScaling 0..1 Representation. Out if this the scaling between
Diagnosis and ECU internal representation and vice
versa can be calculated.
This container defines the source of data in a
provided port which shall be read respectively the
DcmDspExternalSRDataElementClas target of data in a required port which shall be written.
0..1
s This container shall contain either one
DcmSubElementInDataElementInstance OR
DcmDataElementInstance OR
360 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
DcmSubElementInImplDataElementInstance
reference.
10.2.30 DcmDspDiagnosisScaling
Container Choices
Container Name Multiplicity Scope / Dependency
This container contains the configuration (parameters) of an
alternative Diagnosis Representation by the means of a
VariableDataPrototoype in a DataInterface.
Additionally a reference to PortInterfaceMapping can be
DcmDspAlternativeDataInterface 0..1 defined which provide already the mapping rules between
the VariableDataPrototoype in a DataInterface used by the
software component
(DcmDspExternalSRDataElementClass) and the intended
Diagnosis Representation defined by DcmDataElement.
This container contains the configuration (parameters) of an
alternative Diagnosis Representation by the means of ECU
configuration parameters.
The physical unit of the alternative data representation is
DcmDspAlternativeDataProps 0..1 defined by the DataPrototype referenced by
DcmDspExternalSRDataElementClass.
Additionally the definition of a text table mapping can be a
defined for DcmDspDataTypeCategory TEXTTABLE and
SCALE_LINEAR_AND_TEXTTABLE
This container contains the configuration (parameters) of an
alternative Diagnosis Representation by the means of an
ApplicationDataType.
DcmDspAlternativeDataType 0..1
Additionally the definition of a text table mapping can be a
defined for ApplicationDataTypes of category TEXTTABLE
and SCALE_LINEAR_AND_TEXTTABLE.
10.2.31 DcmDspAlternativeDataProps
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration (parameters) of an
DcmDspLinearScale 0..1
linear scale of the alternative Diagnosis Representation.
This container contains the configuration (parameters) of the
mapping a DataPrototype typed by AutosarDataType that refer
to a CompuMethods of category TEXTTABLE or
SCALE_LINEAR_AND_TEXTTABLE.
Each DcmDspTextTableMapping defines a value pair which is
DcmDspTextTableMapping 0..* used to map the ECU internal value
(DcmDspInternalDataValue) to the vale used in the diagnosis
representation (DcmDspDiagnosisRepresentationDataValue)
and vice versa.
The set of all DcmDspTextTableMappings defines the whole
mapping of an data.
10.2.32 DcmDspLinearScale
No Included Containers
10.2.33 DcmDspTextTableMapping
No Included Containers
10.2.34 DcmDspAlternativeDataInterface
No Included Containers
10.2.35 DcmDspAlternativeDataType
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration (parameters) of the
mapping a DataPrototype typed by AutosarDataType that refer
to a CompuMethods of category TEXTTABLE or
SCALE_LINEAR_AND_TEXTTABLE.
Each DcmDspTextTableMapping defines a value pair which is
DcmDspTextTableMapping 0..* used to map the ECU internal value
(DcmDspInternalDataValue) to the vale used in the diagnosis
representation (DcmDspDiagnosisRepresentationDataValue)
and vice versa.
The set of all DcmDspTextTableMappings defines the whole
mapping of an data.
Container Choices
Container Name Multiplicity Scope / Dependency
Instance Reference to the primitive data in a
port where the data element is typed with an
DcmDataElementInstance 0..1
ApplicationPrimitveDataType or an
ImplementationDataType.
Instance Reference to the primitve sub-element
(at any level) of composite data in a port where
DcmSubElementInDataElementInstance 0..1
the data element is typed with an
ApplicationCompositeDataType.
Instance Reference to the primitve sub-element
DcmSubElementInImplDataElementInstanc (at any level) of composite data in a port where
0..1
e the data element is typed with an
ImplementationDataType.
10.2.37 DcmDataElementInstance
No Included Containers
10.2.38 DcmSubElementInDataElementInstance
No Included Containers
10.2.39 DcmSubElementInImplDataElementInstance
No Included Containers
10.2.40 DcmDspDataInfo
No Included Containers
10.2.41 DcmDspDidInfo
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration (parameters) of the
DcmDspDidAccess 1
DID access
10.2.42 DcmDspDidAccess
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration (parameters) of the
DcmDspDidControl 0..1
DID control.
This container contains the configuration (parameters) of the
DcmDspDidDefine 0..1
DDDID control.
This container contains the configuration (parameters) of the
DcmDspDidRead 0..1
DID read.
This container contains the configuration (parameters) of the
DcmDspDidWrite 0..1
DID write.
10.2.43 DcmDspDidControl
No Included Containers
10.2.44 DcmDspDidDefine
No Included Containers
No Included Containers
10.2.46 DcmDspDidWrite
No Included Containers
10.2.47 DcmDspMemory
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration of the
DcmDspAddressAndLengthFormatIdentifie
0..1 supported AddressAndLengthFormatIdentifiers
r
for memory access.
Provides the value of memory identifier used to
select the desired memory device
This container contains the configuration of the
DcmDspMemoryIdInfo 1..* memory access requested through diagnostic
services : ReadMemoryByAddress,
WriteMemoryByAddress, RequestDownload,
RequestUpload
10.2.48 DcmDspAddressAndLengthFormatIdentifier
No Included Containers
10.2.49 DcmDspMemoryIdInfo
Included Containers
Container Name Multiplicity Scope / Dependency
DcmDspReadMemoryRangeInf
0..* Provides the range of memory address allowed for reading
o
DcmDspWriteMemoryRangeInf
0..* Provides the range of memory address allowed for writting.
o
10.2.50 DcmDspReadMemoryRangeInfo
No Included Containers
10.2.51 DcmDspWriteMemoryRangeInfo
No Included Containers
10.2.52 DcmDspPid
Included Containers
Container Name Multiplicity Scope / Dependency
DcmDspPidData 1..* This container defines the parameter for a Signal in the PID.
This container defines the support information (typically byte A)
DcmDspPidSupportInfo 0..* to declare the usability of the data bytes within the so-called bit-
mapped PIDs (e.g. PID$68).
No Included Containers
10.2.54 DcmDspPidData
Included Containers
Container Name Multiplicity Scope / Dependency
DcmDspPidDataSupportInfo 0..1 This container defines the supported information.
Contains specific configuration parameter of PID for service
DcmDspPidService01 0..1 $01. This container exists only if DcmDspPidService is set to
DCM_SERVICE_01 or DCM_SERVICE_01_02.
Contains specific configuration parameter of PID for service
DcmDspPidService02 0..1 $02. This container exists only if DcmDspPidService is set to
DCM_SERVICE_02 or DCM_SERVICE_01_02.
10.2.55 DcmDspPidService01
No Included Containers
10.2.56 DcmDspPidService02
No Included Containers
10.2.57 DcmDspPidDataSupportInfo
No Included Containers
10.2.58 DcmDspRequestControl
No Included Containers
10.2.59 DcmDspRoe
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains a list of all supported Roe
eventTypeRecords which are accepted by this ECU.
DcmDspRoeEvent 1..* At most one DcmDspRoeEvent container is allowed to define
a DcmDspRoeEventProperties container with the choice
DcmDspRoeOnDTCStatusChange.
This container configures the available EventWindowTime in
DcmDspRoeEventWindowTim this Ecu.
1..*
e This container contains a sub-set of EventWindowTimes
supported by the Dcm, to limit the Ecu resources.
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the properties of Roe
eventTypeRecords.
In one DcmDspRoeEventProperties container one
DcmDspRoeEventProperties 1
DcmDspRoeOnDTCStatusChange or
DcmDspRoeOnChangeOfDataIdentifier container shall be
defined.
10.2.61 DcmDspRoeEventProperties
Container Choices
Container Name Multiplicity Scope / Dependency
This container contains configuration of a
DcmDspRoeOnChangeOfDataIdentifie
0..1 eventTypeRecord onChangeOfDataIdentifier
r
accepted by this ECU.
This container contains configuration of a
eventTypeRecord onDTCStatusChange accepted by
this ECU.
DcmDspRoeOnDTCStatusChange 0..1 Please note that currently are no additional
parameters for DcmDspRoeOnDTCStatusChange
are defined. Therefore the existence of the container
denotes the choice.
10.2.62 DcmDspRoeOnChangeOfDataIdentifier
No Included Containers
10.2.63 DcmDspRoeOnDTCStatusChange
No Included Containers
10.2.64 DcmDspRoeEventWindowTime
No Included Containers
10.2.65 DcmDspRoutine
No Included Containers
10.2.66 DcmDspRoutineInfo
Included Containers
Container Name Multiplicity Scope / Dependency
10.2.67 DcmDspRoutineAuthorization
No Included Containers
10.2.68 DcmDspRoutineRequestResOut
Included Containers
Container Name Multiplicity Scope / Dependency
Provide description of a routine signal used in
RoutineControl service.
The ordering defined via the index attribute of the
DcmDspRoutineRequestResOutSignal 1..*
subcontainers in this list represents the order of the
dataOutN elements in the XXX_RequestResult
function call.
10.2.69 DcmDspRoutineRequestResOutSignal
No Included Containers
10.2.70 DcmDspRoutineStopIn
Included Containers
Container Name Multiplicity Scope / Dependency
Provide description of a routine signal used in RoutineControl
service.
DcmDspRoutineStopInSignal 1..* The ordering defined via the index attribute of the
subcontainers in this list represents the order of the dataInN
elements in the XXX_Stop function call.
10.2.71 DcmDspRoutineStopInSignal
No Included Containers
Included Containers
Container Name Multiplicity Scope / Dependency
Provide description of a routine signal used in RoutineControl
service.
DcmDspRoutineStopOutSignal 1..* The ordering defined via the index attribute of the
subcontainers in this list represents the order of the dataOutN
elements in the XXX_Stop function call.
10.2.73 DcmDspRoutineStopOutSignal
No Included Containers
10.2.74 DcmDspStartRoutineIn
10.2.75 DcmDspStartRoutineInSignal
No Included Containers
10.2.76 DcmDspStartRoutineOut
Included Containers
Container Name Multiplicity Scope / Dependency
Provide description of a routine signal used in RoutineControl
service.
DcmDspStartRoutineOutSignal 1..* The ordering defined via the index attribute of the
subcontainers in this list represents the order of the dataOutN
elements in the XXX_Start function call.
10.2.77 DcmDspStartRoutineOutSignal
No Included Containers
10.2.78 DcmDspSecurity
Included Containers
Container Name Multiplicity Scope / Dependency
Definition of a single Row of configuration for security level
configuration (per security level)
The name of this container is used to define the name of the
R-Port through which the DCM accesses the interface
DcmDspSecurityRow 0..31
SecurityAccess_{SecurityLevel}. The R-Port is named
SecurityAccess_{SecurityLevel} where {SecurityLevel} is the
name of the container DcmDspSecurityRow. If there is no
reference, no check of security level shall be done.
No Included Containers
10.2.80 DcmDspSession
Included Containers
Container Name Multiplicity Scope / Dependency
Definition of a single Row of session control configuration (per
DcmDspSessionRow 0..31
session control)
10.2.81 DcmDspSessionRow
No Included Containers
10.2.82 DcmDspVehInfo
Included Containers
Container Name Multiplicity Scope / Dependency
DcmDspVehInfoData 1..* Data Item of an InfoType; post-fix of the port interface name.
10.2.83 DcmDspVehInfoData
No Included Containers
10.2.84 DcmDspPeriodicTransmission
No Included Containers
10.2.85 DcmDspPeriodicDidTransmission
No Included Containers
10.2.86 DcmGeneral
No Included Containers
10.2.87 DcmPageBufferCfg
No Included Containers
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration of a mode condition
which can be used as argument in DcmModeRules.
One DcmModeCondition shall contain either one
DcmSwcModeRef or one DcmBswModeRef. Please note that
DcmModeCondition 1..* the Dcm acts as well as mode manager. Therefore the
references DcmSwcModeRef or one DcmBswModeRef. might
point to provided ModeDeclarationGroupPrototypes of the Dcm
itself as well as to provided ModeDeclarationGroupPrototypes
of other Bsw Modules or software components.
This container contains the configuration of a mode rule which
represents a logical expression with DcmModeCondistions or
other DcmModeRules as arguments.
DcmModeRule 1..*
All arguments are processed with the operator defined by
DcmLogicalOperator, for instance: Argument_A AND
Argument_B AND Argument_C
10.2.89 DcmModeCondition
No Included Containers
10.2.90 DcmModeRule
No Included Containers
UDS
DCM_PROTOCOL_ID UDS
Rx
Buffer
(DCM_PROTOCOL_RX_BUFFER_ID)
Func
DcmPduId UDS Buffer
(DCM_PROTOCOL_DCMRXPDUID)
Size:
e.g. 255 Bytes
Phys
DcmPduId
(DCM_PROTOCOL_DCMRXPDUID)
Tx
DcmPduId
(DCM_PROTOCOL_DCMTXPDUID)
DcmPduIds
Buffer
(DCM_PROTOCOL_TX_BUFFER_ID)
UDS Func Rx
Tx
DcmPduId
(DCM_PROTOCOL_DCMTXPDUID) OBD Buffer
Size: 8 Bytes
Buffer
(DCM_PROTOCOL_TX_BUFFER_ID)
Above example shows protocol configuration at the use cases examples OBD and
UDS (used for customer enhanced diagnosis). It is assumed that for UDS
418 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
communication, there are functional and physical requests. There will be separate
DcmPduRxIds for functional and physical reception.
Concerning buffer configuration it is proposed to use a separate buffer for the
functional requests. This in correspondence to support the keep alive logic with
functional addressed TesterPresent commands.
It is also proposed to use a separate receive buffer for the OBD commands. This in
reference to support the protocol switch functionality.
It is allowed to share for both protocols the transmit buffer.
Please note:
The DcmDslProtocolRx has two possible configurations:
functional
physical
The physical shall have a 1:1 (or 1:0) dependency to the DcmDslMainConnection.
(which means: DcmDslProtocolRxPduRef in combination
DCM_PROTOCOL_RX_ADDR_TYP = physical can exist only once per “Module”)
The functional shall have a 1:n dependency to the DcmDslMainConnection. (which
means: DcmDslProtocolRxPduRef in combination
DCM_PROTOCOL_RX_ADDR_TYP = functional can exist several times per
“Module”)
The DcmDslProtocolTx shall exist only once per “Module”
1 DEFAULT_SESSION
2 PROGRAMMING_SESSION
3 EXTENDED_DIAGNOSTIC_SESSION
419 of 421 Document ID 018: AUTOSAR_SWS_DiagnosticCommunicationManager
- AUTOSAR confidential -
Specification of Diagnostic Communication Manager
V5.2.0
R4.1 Rev 3
4 SAFETY_SYSTEM_DIAGNOSTIC_SESSION.⌋()