AUTOSAR SWS DiagnosticLogAndTrace
AUTOSAR SWS DiagnosticLogAndTrace
V1.2.0
R4.0 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 specifications for illustration purposes
only, and they themselves are not part of the AUTOSAR Standard. Neither their
presence in such specifications, 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
Known Limitations ...................................................................................................... 8
3 Related documentation...................................................................................... 12
3.1 Input documents......................................................................................... 12
3.2 Related standards and norms .................................................................... 13
4 Constraints and assumptions ............................................................................ 14
4.1 Assumptions............................................................................................... 14
4.1.1 Available RAM..................................................................................... 14
4.1.2 Available NVRAM................................................................................ 14
4.1.3 Communication interface .................................................................... 14
4.2 Limitations .................................................................................................. 14
4.2.1 Runtime resources .............................................................................. 14
4.2.2 VFB Trace ........................................................................................... 14
4.2.3 Security ............................................................................................... 15
4.2.4 Dlt communication module .................................................................. 15
4.3 Applicability to car domains........................................................................ 15
5 Dependencies to other modules........................................................................ 16
5.1 File structure .............................................................................................. 16
5.1.1 Code file structure ............................................................................... 16
5.1.2 Header file structure............................................................................ 17
6 Requirements traceability .................................................................................. 18
Known Limitations
The Dlt module is not prepared for multi-core systems. It works with a centralized
buffer for storing messages if the Dlt module is not initialized. Hence, if data is
handed to the Dlt module spontaneously from different cores in parallel, the
unsynchronized access to the buffer will fail.
Therefore, code running on a core other than the main core must not spontaneously
hand data to the dlt module. Configuration must be done accordingly or the usage of
this buffer for storing messages at startup must be disabled.
Users of Dlt module which may affected on multi-core systems are the RTE (VFB
tracing) and SWCs.
SW-C SW-C
App1 App2
AUTOSAR RTE
Std. AUTOSAR
Interface
CDD
Dcm ECU
debug
interface
ECU-Hardware
Figure 2 The position of Dlt in the AUTOSAR layered architecture
Dlt Transport/
DLT
Dlt Module forwards the Storage Protocol
data to the Dcm, the PduR
or a CDD (over Dlt
ComModule)
Dlt
Figure 3 General workflow for sending log and trace messages over Dlt module
Logging
o Logging of errors, warnings and info messages from AUTOSAR SW-
Cs, providing a standardized AUTOSAR interface
o Gather all log and trace messages from all AUTOSAR SW-Cs in a
centralized AUTOSAR service component (Dlt) in BSW
o Log messages from Det
o Log messages from Dem
Tracing
o Trace RTE/VFB
Control
o Enable/disable individual log and trace messages
o Control trace levels individually by back channel
Generic
o Dlt available during debugging and production phase
o Access over standard diagnosis or platform specific test interface
o Security mechanisms to prevent misuse in production phase
3 Related documentation
[iii] ISO 22901, Road vehicles -- Open diagnostic data exchange (ODX) – ODX-
Standard (ASAM MCD-2D))
4.1 Assumptions
The ECU shall provide enough RAM to buffer temporarily the log and trace
messages. The needed amount of memory depends on the number of log and trace
message sources, the amount of data and the limited speed of the communication
interface. During startup time, enough memory shall be available to store the data,
until the log and trace external client is connected. If the available memory is too
small, some log and trace messages may be lost.
Additionally the ECU shall provide memory for the log level table. The size depends
on the amount of different Application IDs and Context IDs using Dlt.
The ECU shall provide enough NVRAM to store persistently the log level table. The
size depends on the amount of different Application IDs and Context IDs using Dlt.
4.2 Limitations
Dlt needs a small amount of runtime resources, even if all sources of log and trace
messages are disabled. Only a single condition shall be checked for each log and
trace message source. If sources of log and trace messages are enabled, it depends
on the number of enabled sources, how much runtime resource is needed. Main
runtime resource is needed for communication purposes.
As VFB trace can produce a lot of traffic, this source shall be used very carefully.
Only these values and function calls shall be traced, which are useful for analyzing
14 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
malfunction or value changes. Even the frequency of calls shall be regarded, not to
produce too much traffic.
4.2.3 Security
An external client must be connected to change the log levels and to communicate
over a diagnostic channel.
Dlt does not define a specific communication interface. The Dlt specification defines
an API to an internal Dlt communication module. It is up to the implementer, how this
communication module is implemented and how it communicates with a possible
CDD (e.g. Serial or USB) or the PDU Router (e.g. CAN, FlexRay, Ethernet).
The Dlt module has dependencies to the following other AUTOSAR modules:
Det
Det has to forward all calls to Det_ReportError() to Dlt.
Dem
Dem has to forward all calls to Dem_SetEventStatus() andDem_ResetEventStatus()
to Dlt.
Dcm
Dlt uses Dcm as a communication interface. The diagnostic services
ReadDataByIdentifier(), WriteDataByIdentifier() and ResponseOnEvent() are used.
Dcm provides an Interface to be used by Dlt. Dlt uses the security mechanisms of
Dcm.
NVRAM-Manager
Dlt uses the NVRAM-Manager to store data persistently. NVRAM-Blocks are
assigned to Dlt. In this blocks Dlt stores some data persistently.
RTE/VFB-Trace
Dlt traces RTE events. RTE provides Macros, which are implemented in Dlt,
comparable to the VFB-Trace. Dlt decides which Macros to be implemented during
configuration time and decides during runtime which traces are generated. Detailed
description can be found in chapter 7.3.3.2.
SW-C
Dlt provides an interface for SW-Cs to generate log and trace messages. SW-C shall
provide a client-server interface to be able to set log levels by Dlt.
[Dlt456] ⌈The code file structure shall not be defined within this specification
completely. At this point it shall be pointed out that the code-file structure shall
include the following files named:
1. Dlt_Lcfg.h – for link time configurable parameters and
2. Dlt_PBcfg.c, Dlt_PBcfg.h – for post build time configurable parameters and
3. Dlt_cfg.c, Dlt_cfg.h – for pre build time configurable parameters.
These files shall contain all link time and post-build time configurable parameters.⌋
(BSW00344, BSW00404, BSW00345, BSW00419, BSW00381, BSW00383)
[Dlt482] ⌈The module header file Dlt.h shall include Rte_Dlt_Type.h to include the
types which are common used by BSW Modules and Software Components. Dlt.h
and all Dlt*cfg.h files shall only contain types, that are not already defined in
Rte_Dlt_Type.h. ⌋ ()
«includes» «includes»
«header» «header»
Rte_Dlt.h Dlt.h
«includes» «includes»
«includes» «includes»
«includes»
«header»
NvM.h
«includes» «includes» «includes»
«includes,optional»
6 Requirements traceability
7 Functional specification
[Dlt464] ⌈Dlt (Diagnostic Log and Trace) is a basic software module, which
handles and stores log and trace messages produced by SW-C it self or the
interactions between SW-C and RTE/VFB and by the Basic Software Modules Dem
and Det. The log and trace messages are generated by calling APIs provided by the
Dlt module.⌋ (BSW35000041)
A log and trace message contains all data and options to specify a log and trace
event in a software. The log and trace message internally consist of a header and
payload.
7.1.2 User
The user of Dlt is the programmer of the software, which uses the Dlt API to generate
log and trace messages.
7.1.3 Log
The user generates log messages on demand. Each time the user wants to show
some information about state changes or value changes, he adds an API call to Dlt.
7.1.4 Trace
Trace messages can be generated by instrumentation of the code (e.g. VFB traces).
The instrumented code calls the API of Dlt.
7.1.5 ECU ID
ECU ID is the name of each ECU composed by four 8 bit ASCII characters for
example ABS0 or COMB. If not all four characters are used the remaining characters
shall be filled by null.
7.1.7 Application ID
7.1.8 Context ID
Context ID is a user defined ID to group log and trace messages produced by a SW-
C/BSW modules Dem and Det to distinguish functionality. Each Application ID can
own several Context IDs. Context ID’s are grouped by Application ID’s. Context IDs
shall be unique within an Application ID.
The identification of the source of a log and trace message is done with a pair of
Application ID and Context ID.
It is composed by four 8 bit ASCII characters. If not all four characters are used the
remaining characters shall be filled by null.
7.1.9 Message ID
A log level defines a classification for the severity grade of a log message.
Each log and trace message may contain a time attribute. The time attribute is a free
defined time-value. It is the time since the start of the ECU. (see 7.6.8.1 and 7.7.3.6)
The Payload contains the message ID and user defined information of a log and
trace message.
The Dlt communication module is enabled by an external client. The external client
has to set up a diagnostic session in a defined security level and sending control
message to Dlt for enabling the Dlt communication module. A SW-C is generating a
log message. The log message is sent to Dlt by calling the API provided by Dlt. Dlt
sends the log message to the implemented Dlt communication module interface.
RTE calls the macro provided by Dlt, which calls the Dlt API generating the trace
message. Dlt sends the trace message to the implemented Dlt communication
module interface. The Dlt communication module forwards the trace message to the
network. An external client receives and stores the trace messages from Dlt.
DLT administrate
allowed log levels
3 Level Context
2 xxx dddd
DCM xxx dddd
DLT
SWC is informed
SWC sends a log message via
about changes of
SWC Dlt_SendLogMessage()
log levels
Dlt_SetLogLevel 5
1
RTE
DLT collects
DLT administrates
messages
allowed log levels Level Context
4 xxx dddd
xxx dddd
2
DLT
Control message is
received by DLT DLT comunication
communication module module
3 Log message is
send over network
3
Control message is
send over the network CAN / Flexray /
Ethernt / Serial
2
external client
collects and stores
The external client wants to
log messages
configure log levels on DLT
4
module 1
Figure 9: Communication of an external client only over the Dlt communication module
7.3.1 Overview
The Dlt module communicates with the software modules, which generate the log
and trace messages, and with the external client used by an operator. Different
phases of a software life cycle (developing and production) shall be considered.
(C) Operation
(A) provides the interface used by the software module (SW-Cs, BSW modules) to
generate the log and trace message.
(B) manages the buffering of the messages received by SW-Cs or BSW modules
before they are sent over the network to the external client. Also the implementation
of additional filtering is done by this module.
(C) is the core of Dlt which has to communicate with the external client to engage the
necessary actions for driving the behavior of Dlt itself. This component has multiple
objectives:
4. interpret and implement the commands from the external client
5. extracting the messages from the buffer to be sent to the external client
6. manage the application protocol to transport the log and trace message to the
external client.
(D) represents the functionality of Dlt for communication with the external client.
The Dlt module shall implement a buffer management to solve the following issues:
the rate of receiving log and trace messages by the SW-Cs is temporary faster
than the communication channels available bit rate
to store some log and trace messages if no external client is connected
The overall definition of the characteristic of the buffer and its management policy are
up to the implementation.
[Dlt490] ⌈Dlt control messages (see 7.7.7.1) should be handled separately. If any
control messages are to send, this messages should be send before any normal
log/trace message.⌋ ()
Dlt provides the functionality for an external client to change the log level or trace
status of the registered Context IDs and Application IDs. It shall be secured by
running a diagnostic session.
As explained in chapter 7.3.3.1.6 each SW-C has to register it’s Context ID’s and
Application IDs. Dlt sets up a table of all registered pairs of Application IDs and
Context ID. At every message reception, the Dlt module shall check the log level of
the provided messages (see 7.6.5). If the log level of the message is in the pass
through range, the message will be forwarded to the external client.
Runtime configuration of Dlt means, that the pass through range shall be modifiable
at runtime.
Dlt is using the NVRamManager and is to be initialized very late in the ECU startup
phase. The Dlt_Init() function should be called after the NVRamManager is initialed.
Because of BSW modules Dem and Det may send log messages to Dlt before Dlt is
initialized, Dlt shall handle this data in accurate way.
[Dlt003] ⌈Dlt shall have a temporary C-initialized buffer (init buffer), where only the
provided data from the Dlt_SendLogMessage are stored. The size of this buffer is
configurable with DltInitBufferSize.⌋ (BSW35000036)
NOTE: After initialization, it is possible to re-use the buffer within the normal message
buffer or to use the normal message buffer as temporary buffer before initialization.
[Dlt004] ⌈Only if Dlt is not initialized, Dlt shall store these data in the init buffer. When
the init-routine is called this init buffer shall be read and the stored data encapsulated
in a complete log and trace message shall be forwarded to the Dlt message buffer.⌋
(BSW35000036)
[Dlt005] ⌈If Dlt module is initialized, the incoming data from BSW modules shall be
directly encapsulated in a log and trace message and forwarded to the Dlt message
buffer.
31 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
Because at ECU startup before Dlt initialization a correct time is not available the
following behavior should be implemented.⌋ ()
[Dlt483] ⌈The timestamp field (TMSP) of the transferred log or trace message (see
7.7.3.6) for all log or trace messages transferred from the init buffer to the Dlt (see
[Dlt004) shall be zero (0x0).⌋ ()
Dlt_SendLogMessage Rte_Call_Dlt_SendLogMessage
After
Before
At Dlt_Init Dlt_Init
Dlt_Init Temporary
Buffer
After Generate Generate
whole whole
Dlt_Init
message message
Figure 11 For system startup Dlt shall have a temporary buffer where incoming messages from
BSW modules con be stored.
There are two kinds of communication with the Dlt module. The connection between
the ECU and the external client can be a communication interface like Ethernet or a
serial line, a standard CAN or FlexRay interface with reserved messages for Dlt
communication or at least a connection over the OBD-Diagnostic connector of the
vehicle with the UDS protocol.
There are different communication scenarios. On one side the Dlt module collects log
and trace messages from the SW-Cs on the other side Dlt shall transport the log and
trace messages to an external client, which can store these data permanently.
Additionally for changing the log levels at runtime, Dlt shall receive commands from
an external client.
32 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
7.3.3.1 Communication with SW-C
The goal of Dlt is to collect log and trace messages. In the view of a SW-C, it shall
provide an interface for SW-Cs for explicitly sending log or trace messages.
This interface shall be a ClientServerInterface, where the Dlt module provides the
port (it is the server). All SW-Cs can call the DltService port to forward log or trace
messages to the Dlt module.
Every call from the SW-C to Dlt contains an assigned Application ID and Context ID.
This pair of IDs ensures the correct reassignment to a specific part of an application.
Dlt itself assigns to every pair a log level or a trace status for filtering the messages
at receiving time.
Each SW-C shall register all pairs of Application- and Context IDs to Dlt. Because Dlt
shall handle specific log levels and trace status for several Application IDs and
Context IDs (see 7.3.3.1.2 and 7.3.3.1.6) it is important for Dlt to know the
corresponding Application and Context IDs for each connected port interface.⌋
(BSW35000001, BSW35000003)
[Dlt009] ⌈For sending log or trace messages from a SW-C to Dlt every time an
Application ID and Context ID shall be assigned to the message.⌋ ()
[Dlt295] ⌈For reducing the overall system load, SW-Cs shall check (before sending a
log message to Dlt), that the log level of the Context ID is the same or a higher log
level as in the message.
[Dlt010] ⌈Within a log message, a log level shall be provided. Possible values of log
levels are:
Table 7-1 Log levels defined, most important is DLT_LOG_FATAL and less important is
DLT_LOG_VERBOSE
⌋ ()
Trace messages can be something like a trace of starting and returning a function or
tracing variables at some points and so on. In a SW-C the code can be instrumented
automatically by some tools for providing a trace in significant manner. These tools
are used for generating e.g. code coverage or function coverage and so on.⌋ ()
[Dlt296] ⌈For these purposes, the following trace events shall be used:
⌋ ()
7.3.3.1.2 Notifying SW-C about change of log level or trace status of a Context
ID
[Dlt012] ⌈To be notified of a changing event a SW-C shall provide the system service
interface LogTraceSessionControl.
The Dlt module shall know the relation between the Session ID (the port defined
argument value) and the specific LogTraceSessionControl interface of a SW-C.
This relation is specified at configuration time and can be extracted from the specific
port interface of a SW-C/runnable (see chapter 7.6.4.1.).
[Dlt330] ⌈If a log level or trace status of a specific pair of Application ID and Context
ID changes, Dlt shall notify the registered SWS/runnable through out the
corresponding interface.⌋ (BSW35000004, BSW35000038, BSW35000040)
[Dlt331] ⌈The function to call shall be taken from the table specified in chapter
7.6.4.1.
This function is not a direct call to the SW-C’s interface. It is a call to the RTE with the
RTE API Rte_call_XXX (the correct linker symbol is something like Rte_call_XXX). The
RTE forwards the call to the SW-C/runnable.
SWC
Max Message
Log Level >=
Log level Log level
Monitor
Msg Data
call Dlt_SendLogMessage
Dlt_SetLogLevel
RTE
Dlt_SendLogMessage
DLT
Figure 12 SW-C shall be aware of the status of log level and trace status
35 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
⌋ ()
All SW-Cs shall check their log level or trace status of a Context ID and Application
ID pair. A SW-C/runnable shall hold the maximum allowed log level and the enable
flag for tracing, for a given pair of Application ID and Context ID. Before a message is
sent to Dlt, these values shall be checked and only if the log level of the message is
in the pass-through range, the message shall be send.
Figure 13 Code sample for SW-C to check the log level of the message before call of
Dlt_SendLogMessage
If a SW-C doesn't check the log level of a log message, the log message is send
to Dlt. Then if the feature DltImplementFilterMessages is enabled, the message
is filtered by the Dlt again. If this feature is not enabled, the message is
transmitted to the external client (if connected).
So it is up to the developer to implement this feature. If he do not want to
filter messages in the SW-C he can enable the feature DltImplementFilterMessages
and the Dlt will do the filtering. But this increases ECU load.
7.3.3.1.4 Notifying SW-C about switch between Verbose Mode and Non Verbose
Mode
If on an ECU the Verbose Mode is supported, the SW-C shall be informed when Dlt
switches between Non Verbose Mode and Verbose Mode. Because of the payload
provided by a call to Dlt_SendXXXMessage is either in Verbose Mode or Non
Verbose Mode.
[Dlt014] ⌈It shall be possible to enabled or disabled this feature via the configuration
Parameter DltImplementVerboseMode.⌋ ()
[Dlt015] ⌈Dlt shall call the interface VerboseModeControl with the function
Dlt_SetVerboseMode of each registered SW-C/runnable if the state of verbose mode
changes.
The identification of the correct port to call by Dlt shall work in the same way as it
works by calling Dlt_SetLogLevel (see 7.3.3.1.2, 7.3.3.1.7 and 7.6.4.1).⌋ ()
[Dlt016] ⌈In the case of implementing this feature, the tables specified in 7.6.4.1 shall
be expanded with the pointer to the provided functions by the RTE. (The RTE
forwards the call to the SW-Cs)⌋ ()
36 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
7.3.3.1.5 Injection of function calls in SW-C from Dlt
This functionality is for injection function calls in SW-Cs. This shall only be used for
testing issues. The intention for this feature is an extended testing procedure where
some special functions in the SW-C are provided for triggering some testing
procedures.
[Dlt017] ⌈This feature shall be enabled and disabled via the configuration parameter
DltImplementSWCInjection.⌋ ()
[Dlt019] ⌈The function to call by Dlt is Dlt_InjectCall (the correct linker symbol is
something like Rte_call_XXX). In the case of implementing this feature, the tables
specified in 7.6.4.1 are to expand with the pointer to the provided functions by the
RTE.⌋ ()
Dlt shall handle a log level and a trace state for every pair of Context ID and
Application ID. To know what pairs are defined in an ECU a SW-C shall register this
pairs at runtime to the Dlt module. Because of the developing of SW-C shall not be
object of this specification the Dlt module shall collect this information at runtime. In
addition a dynamic registration supports the possibility to see which SW-C/runnable
is active and which not.
When a SW-C is calling the Dlt_RegisterContext()method of the DLTServicel
interface, a port defined argument value is provided (SessionID) to the Dlt module.
The value of this port defined argument corresponds to LogTraceSessionControl
interface of the SW-C/runnable for providing information about the changing of a log
level to the SW-C/runnable.
[Dlt021] ⌈Dlt shall remember the relation between the registered Application ID +
Context ID and the port interface where this pair is registered.⌋ (BSW35000033)
[Dlt022] ⌈This Port defined Argument Values shall be used by Dlt as session
identifiers.
[Dlt023] ⌈The port defined argument value corresponds to the defined Session ID (in
this document). The value shall start at 0x1000 (for BSW modules the module ID is
taken, starts at 0x0).⌋ ()
[Dlt332] ⌈For connecting a Dlt Service Port to a SW-C the port defined argument
value is incremented every time. Therefore, the value is of 0x1000 + n, where n is a
continuous number.⌋ ()
7.3.3.2 VFB-Trace
In contrast to the communication with SW-Cs the meaning of trace is different here.
The VFB-Trace is specified in RTE [9] and VFB [10]. This chapter describes the
interaction of the Dlt module with the VFB-Trace and the internal control of the trace
data.
The meaning VFB-Trace is an implicit (system inherent) forwarding of SW-C
communication data (which flows over the RTE) to the Dlt module. Trace means in
this case that no explicit call by the SW-C is made to forward this data to Dlt.
VFB-Trace needs from the Dlt module the header file Dlt_Rte_Hook.h. In this file Dlt
tells the RTE which traces to enable. This works simply by providing some #defines
in this header file. Each define stands for a separate hook function in the VFB-Trace.
This hook function is than called by the RTE if the corresponding RTE-API is called.
The hook function it self is provided by the Dlt module.
To ensure the correct prototype of this function the RTE module exports all expected
prototypes in it BSW-ModulDescription.
[Dlt025] ⌈The VFB-Trace works with defines included by the RTE at building time.
These defies shall be provided by Dlt in the file Dlt_Rte_Hook.h.⌋ (BSW35000008)
[Dlt026] ⌈Every signal or event which shall be traceable by Dlt shall be configured at
configuration time. The so called event-name in VFB Trace or function name for each
trace event is provided in the configuration container DltVfbTrace within the
configuration parameter DltVfbTraceFunction.⌋ ()
[Dlt027] ⌈Dlt shall provide the implementation of the hook functions for every
configured event given by DltVfbTraceFunction in the file Dlt_Rte_hook.c⌋ ()
hook-function Rte.c
BSWMD
prototype .hex
Rte
Dlt
Dlt.c compiler
generation linker
Mem
Map
SWC EcuC Dlt_Rte_hook.c
Desc Dlt Dlt_Rte_hook.h
[Dlt278] ⌈The payload for this call shall be filled with the arguments provided by the
hook function. All data transported with the arguments shall be provided.⌋ ()
[Dlt336] ⌈If pointers to structures are given, the structure shall be interpreted and
send to the internal representation of Dlt_SendTraceMessage.
[Dlt279] ⌈Every hook function shall get its own Context ID.
In some cases some events can be bundled to the same Context ID. This shall
mostly be done if e very large number of signals are to trace.⌋ ()
[Dlt484] ⌈Message Type (MSTP) entry in the generated trace message shall be
DLT_TYPE_NW_TRACE, the Message Trace Info (MSTI) entry in this case shall be
DLT_NW_TRACE_IPC.⌋ ()
[Dlt338] ⌈Additionally the description (see 7.7.5.1.3) for this Message ID - payload
shall be generated and provided.
This description can be generated from the SW-C description file, were the interface
is described.⌋ ()
[Dlt281] ⌈In each hook function the trace status of the Context ID shall be checked.
if (vfb_actual_trace_status_contextXY){
Dlt_SendTraceMessage(…);
}
Figure 15 Requirement for hook function to check the trace status of the Context ID before
call of Dlt_SendTraceMessage (vfb_actual_trace_status_contextXY is a freely named
variable to hold the actual trace status for a specific Context ID)
Dlt282:
Dlt shall handle for every VFB-Trace hook function an own Context ID and for that
reason Dlt shall handle for every VFB-Trace Context ID a separate trace status. This
can be done with a separate variable (compare vfb_actual_trace_status_contextXY
in Figure 14) ⌋ ()
For a better understanding of system behavior in the case of a system error, the
BSW modules Dem and Det shall forward incoming reported events to the Dlt
module.
The Dem in this case shall notify Dlt if the status of events changes. The Det shall
forward reported development errors to the Dlt module.
Dem [5] stores internally events generated by SW-Cs and BSW modules. These
events are characterized by event IDs.
To an event in Dem belonging some additional information. This are a Diagnostic
Trouble Code (DTC), Extended Data Records and a Freeze Frame. Each time the
state of an event changes Dem calls the Dlt_DemTriggerOnEventStatus() function to
notify Dlt of this change.
Dem provides within this function the EventID of the event which status has changed.
With this EventId Dlt shall request additional information about the event.⌋ ()
[Dlt476] ⌈The log message generated for Dem Events shall have the following
payload entries:
Table 7-3 The payload attached the log message generated for an event change by Dem (See
7.7.5 Payload and 8.4.2.1 Dlt_SendLogMessage)
⌋ (BSW35000007)
[Dlt377] ⌈The ApplicationID, ContextID and MessageID of the send log message
shall have the following values:
ApplicationID = “DEM”
ContextID = “STD0”
MessageID = 0x00000001
41 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
⌋ ()
[Dlt477] ⌈The DTCOfEvent entry from [Dlt476] shall requested from the Dem by
calling the function Dem_GetDTCOfEvent() on Dem with the EventId provided in
Dlt_DemTriggerOnEventStatus() and DTCKind “all DTCs”.⌋ (BSW35000007)
NOTE: The data in the ExtendedDataRecord and the FreezeFrame are not
interpreted by the Dlt module. They are send as raw data and the interpretation
should be done at the external client. There some description files like specified in
the ODX standard [iii] could be used.
SW-Cs and BSW modules report errors to the Det module [11]. Such errors shall be
forwarded to Dlt as messages with a suitable content using the function
Dlt_DetForwardErrorTrace ().
All parameters from the Det function Det_ReportError() shall be forwarded to Dlt
function Dlt_DetForwardErrorTrace () by the Det fan-out capability.
[Dlt430] ⌈Dlt shall provide the Dlt_DetForwardErrorTrace () function for the fan-out
capability of Det.⌋ (BSW35000006)
[Dlt376] ⌈The ApplicationID, ContextID and MessageID of the send log message
shall have the following values:
ApplicationID = “DET”
ContextID = “STD”
MessageID = 0x00000002
⌋ ()
Table 7-4 The payload attached the log message generated Dlt_DetForwardErrorTrace (See
7.7.5 Payload, 8.4.2.1 Dlt_SendLogMessage and 8.4.3.1 Dlt_DetForwardErrorTrace )
The payload of a Non Verbose Message contains the Message ID. The Message ID
shall be unique for a ECU. The problem is that Message IDs are provided by a SW-C
(the user of Dlt) and at the point in time of the coding of the log and trace message
call there is no instance to guarantee the uniqueness of the Message ID.
A possible solution is to map all log messages in a virtual memory segment and then
use the memory address as Message ID. Another solution is to have an authoring
tool that is responsible for the uniqueness of the Message IDs.
In addition, it could be possible to assign Message ID values in the post build
process, so uniqueness for the ECU can be guaranteed
Important is that for every Message ID a description for the associated message is
provided.
[Dlt031] ⌈Message IDs used for Dem (0x00000001) and Det (0x00000002) are
reserved and not usable for SW-Cs.⌋ ()
NOTE: Mostly diagnostic service (UDS over the OBD car connector) are very limited
in bandwidth, log and trace messages shall be used and transmitted very carefully.
The log and trace levels shall be set very limited, to prevent loose of messages.
Dcm provides security mechanisms during production phase which shall be used by
Dlt (see chapter 7.5 ). When an external diagnostic client is connected to the ECU
over Dcm, the external client shall set up a “diagnostic session” and hold this active.
The DID (Diagnostic identifier) used within Dlt shall be configured in Dcm. Therefore,
the normal configuration parameter of Dcm can be used. Then each
ReadDataByIdentifier() and WriteDataByIdentifier () service call is forwarded from
Dcm to Dlt. For this purpose, the configuration container “DcmDspDid” of the Dcm
module shall be used. There the provided functions of Dlt and the corresponding DID
shall be configured.
[Dlt339] ⌈An interface between Dlt and Dcm shall be implemented. This interface
shall consist as the following routines described in chapter 8.4.4 provided by Dlt for
calling from Dcm:
Dlt_ReadData
Dlt_ReadDataLength
Dlt_WriteData
Dlt_ConditionCheckRead
Dlt_DcmActivateEvent
For sending Dlt control messages from external client to the Dlt modulfe, the external
client shall use the WriteDataByIdentifier (SID 0x2E) functionality of UDS.⌋
(BSW35000001, BSW35000035,)
[Dlt435] ⌈The Dlt_WriteData function provided by Dlt shall be called by Dcm if the
WriteDataByIdentifier () service of UDS is requested. The argument “data” contains a
complete Dlt control message. This message shall be interpreted by Dlt.⌋
(BSW35000035)
Dlt shall use the ResponseOnEvent (ROE (0x86)) functionality provided by UDS and
supported from Dcm for sending log and trace messages.
For this reason the Dcm [6] shall be configured to alow ROE functionality with the
ReadDataByIdentifier (SID 0x22) with the Dlt module.
The secence for the ROE is shown in chapter 9.3
[Dlt469] ⌈If an external client enables the ROE for the ReadDataByID (0x22) for the
Dlt module, the Dcm module calles the Dlt_DcmActivateEvent.⌋ ()
NOTE: Only if the ROE is enabled Dlt is allowed to use the Dcm_TriggerOnEvent()
function.
[Dlt434] ⌈The Dlt_ReadData function provided by Dlt shall be called by Dcm if the
ReadDataByIdentifier() service of UDS is requested. The argument “data” shall
contain a complete Dlt message, which Dlt wants to send.⌋ (BSW35000035)
[Dlt039] ⌈The messages as described in the Dlt protocol specification (see chapter
7.7) shall be transported over UDS without any change or additional header.
UDS can transport up to 4095 Bytes in one packet. The lower layers of the diagnostic
stack are responsible for necessary segmentation and reassembly.⌋ (BSW35000002,
BSW35000035)
The alternative communication interface for high bandwidth is the Dlt communication
module. Dlt defines an internal interface to a Dlt communication module.
Dlt specifies a packet format for transmitting log and trace messages out of a ECU in
the chapter protocol specification (see 7.7). This format shall be understood as a
high-level protocol. It dose not care about the used transport medium and its
characteristic. It is up to the system designer to choose or define a proper transport
channel.
Possible channels are standard CAN and FlexRay Frames, a Serial Line, a XCP
transmission or an IP connection. Dlt specifies the interface to a Dlt communication
module, which is responsible for encapsulating the Dlt messages in a communication
channel, sending and receiving them to and from a communication interface.
For example, the Dlt Communication Module can add in front of each packet a
pattern like “DLT”+0x01 for identifying a send packet on a serial communication line.
⌋ (BSW35000001, BSW35000034)
45 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
[Dlt043] ⌈One call of the API of the Dlt communication module for transmitting a log
and trace message, encapsulates every time a complete log and trace message.⌋
(BSW35000002, BSW35000034)
7.5 Security
Dlt is used for testing and diagnostic purposes.
[Dlt044] ⌈During development phase the log and trace communication interfaces
may be usable without any security mechanisms.⌋ (BSW35000029)
[Dlt465] ⌈To be able to use Dlt also during production phase, security mechanisms
shall be implemented. Instead of implementing new security mechanisms, the
security mechanisms of Dcm [6] shall be used.
Standard diagnostic channels over Dcm already implements diagnostic sessions and
corresponding security levels.
Transmitting log and trace messages shall only be possible during a running
diagnostic session.
The required diagnostic security level is configured in Dcm.⌋ (BSW35000042)
Dcm [6] configures, in which session which diagnostic service can be used. When
the diagnostic messages has passed Dcm, the messages are forwarded to Dlt.
[Dlt290] ⌈Log and trace messages and the Dlt control messages shall only be
handled during a running diagnostic session except the default session.
As a consequence a diagnostic tester or a diagnostic master must be connected to
the ECU, running a non-default session all the time.⌋ (BSW35000029)
A corresponding security level is activated from the diagnostic tester. The security
level for call of ReadDataByIdentifier (0x22) and WriteDataByIdentifier (0x2E) for the
corresponding DID shall be configured in Dcm.⌋ (BSW35000029)
The communication over the Dcm diagnostic session has a very good security
procedure. Unlike the Dlt communication module sends directly over a given interface
and do not care about any security. Therefore, it is very important to enable this
interface only in a secured connection.
[Dlt048] ⌈The communication over the Dlt communication module shall be disabled
per default.⌋ (BSW35000029)
[Dlt049] ⌈The enabling of the Dlt communication module shall only be possible by
sending a control message in a secured diagnostic session as described in chapter
7.5.1.⌋ ()
[Dlt050] ⌈At development phase the Dlt communication module may be enabled per
default.⌋ ()
[Dlt051] ⌈If the communication over the Dlt communication module is enabled there
is no restriction to this interface for sending Dlt messages but also for receiving Dlt
control messages.⌋ ()
[Dlt052] ⌈Dlt shall temporarily store a maximum number of log and trace messages
in a local buffer, if no connection to a external client is established.⌋ (BSW35000037)
[Dlt341] ⌈This buffer shall store incoming messages from SW-C and BSW modules
for transmitting to the Dcm or the Dlt communication module.⌋ (BSW35000037)
[Dlt053] ⌈If the buffer is full the oldest messages in the buffer shall be overwritten to
store new incoming messages from SW-Cs or BSW modules.
For this behavior, a ring-buffer is recommended. The oldest messages in this case
are lost.⌋ ()
[Dlt054] ⌈Dlt shall implement a traffic shaping for its communication interfaces (over
Dcm interface [6] and over Dlt communication module).⌋ (BSW35000030)
NOTE: For traffic shaping a sliding time window should be used. This means that a
time window for calculating the transmitted data in the past shall be taken. For
example this can be done by adding all transmitted data within the last 10 seconds
(time window) to calculate the total transmitted data volume (e.g 10 kbit) within the
time window. Then this volume shall be divided through 10 seconds to get the used
bandwidth (in this case 1 kbit per second). This time window is sliding, this means
that every time the used bandwidth is checked the traffic of the last 10 seconds (the
time window) should be analyzed.
[Dlt344] ⌈If the bandwidth with in this window is too high Dlt shall add additional
delays before it can send new messages over its interfaces.⌋ (BSW35000030)
[Dlt461] ⌈The Dlt communication module shall have the interfaces specified by
chapter 8.6.2. ⌋ (BSW35000001, BSW35000034)
[Dlt462] ⌈The Dlt core module shall provide the interfaces specified in chapter 8.4.5⌋
(BSW35000034)
Each SW-C/runnable shall register its used Application IDs and Context IDs.
[Dlt057] ⌈Dlt shall be aware of the registered Application- and Context IDs and store
it internally as long as the ECU is running.
At runtime the log levels of different Application IDs and Context IDs can be changed
by an external client. Dlt shall manage this runtime configuration.⌋ ()
DLTService PS100
SWC 1
SWC Type A LogTraceSessionControl
PSCN100
DLTService PS101
LogTraceSessionControl
PSCN101
DLTService PS102
SWC 2
SWC Type A LogTraceSessionControl
PSCN102
DLTService PS103
LogTraceSessionControl
PSCN103
DLTService PSXXX
SWC 3
SWC Type B LogTraceSessionControl
PSCNXXX
Figure 16 Logical view of R-Port and P-Port connections between SW-Cs and Dlt. SW-C uses
the P-Port DLTService of Dlt for sending log or trace messages. Dlt tells the SW-Cs changes
about the log level over the P-Port LogTraceSessionControl of the SW-C. DLTService Interface
provides a port defined argument value to identify the sender of messages.
If the Dlt provides a port, it is the very same procedure like between SW-Cs. The SW-
C calls the provide function from the RTE. The RTE translates the call and forwards it
to the P-Port (the Dlt module). Because Dlt provides only one C-function the RTE
adds the port defined argument value. Than Dlt can distinguish between the different
sources (R-Ports of the SW-Cs).
In the other direction (if Dlt wants to call a P-Port of a SW-C) it is a little bit more
complicated. Because of the RTE dose not multiplex the connection (as it did de-
multiplex by calling from different SW-Cs) Dlt has to do the multiplexing functionality
(see Figure 17). For every P-port of a SW-C, Dlt wants to notify, Dlt hast to call a
separate function provided by the RTE.
50 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
At the time the Dlt module is to be build or generated it has to know all
communication partners. This partners are the SW-Cs which define a R-port and a P-
port interface for use with the Dlt. This ports are provided within the SW-C
description. In this document the „ServiceNeeds“ holding the information which ports
are required from Dlt or provided to Dlt. Also the „ServiceNeeds“ holds the
information which pair of DLTService and LogTraceSessionControl ports belonging
together. These ports shall have the same port defined argument value which is later
on used by Dlt as Session ID.
If the Dlt module is up to generate, all SW-C descriptions of the ECUs SW-C shall be
scanned for according ports and collect all „ServiceNeeds“. Than with this information
a service component description for the Dlt module shall be generated. This can be
done manually or by an automated process. The service component description for
the Dlt is an equivalent to the SW-C description and used by the RTE to generate all
needed functions.
[Dlt058] ⌈The Port defined Argument Values shall be used for identifying a session
used on an ECU.⌋ (BSW35000038)
[Info]:
The port defined argument value corresponds to the defined Session ID (in this
document). The value shall start at 0x1000 (for BSW modules the module ID is
taken, starts at 0x0). For connecting a Dlt Service Port to a SW-C the port defined
argument value is incremented every time. Therefore, the value is of 0x1000 + n,
where n is a continuous number.
[Dlt059] ⌈Every SW-C/runnable which wants to use the Dlt Service shall provide a
LogTraceSessionControl client server interface.
This interface is for telling the runnable the new log levels or trace status by Dlt.⌋
(BSW35000033, BSW35000038)
[Dlt289] ⌈Dlt shall generate for every service need from a SW-C the function calls for
all corresponding LogTraceSessionControl interfaces on the RTE (compare Figure
17). ⌋ (BSW35000005)
[Dlt060] ⌈Dlt shall handle a table which holds the SessionIDs and the pointers to the
interface functions.
Table 7-5 Table which SessionIds and interface functions to hold by Dlt
⌋ ()
[Dlt345] ⌈The prototypes for the functions to be stored in the table above shall be
taken from the Dlt SW-C description.⌋ (BSW35000005)
[Dlt426] ⌈The Session IDs and the connection to the corresponding functions shall
be taken form the Dlt SW-C description. The Session ID corresponds to the port
defined argument value given in the Dlt SW-C description.⌋ (BSW35000005)
SWC Type B
SWC Type A
SWC 2
SWC 1
PSC102
PSC100
PSC103
PSC101
PS103
PS102
PS100
PS101
LogTraceSessionControl
LogTraceSessionControl
LogTraceSessionControl
LogTraceSessionControl
DLTService
DLTService
DLTService
RTE
PSC103
PSC102
PSC101
PSC100
Figure 17 View of a programmer for communication between Dlt and SWS over the RTE. The
port interface DLTService is forwarded by the RTE from SW-C to Dlt (by adding a port defined
argument value). If Dlt wants to call the LogTraceSessionControl port of a SW-C it shall call a
function provided by the RTE (Rte_Call_XXX), then RTE forwards the call to the SW-C P-Port.
[Dlt471] ⌈At generation phase the Dlt generation tool shall scan the SW-C
description files from the SW-Cs running on the local ECU (see ECU Configuration
Specification [4]).⌋ ()
[Dlt472] ⌈With the information from the SW-C description files of the SW-Cs Dlt shall
generate its own SW-C-description file for specifying the provided port interfaces.⌋ ()
Figure 1 shows a solution with four tables. This is for a large number of Application
and Context IDs. Here a hierarchical search can be done. The size (number of lines)
of table (i) corresponds to DltMaxCountAppIds. The number of rows of table (ii)
corresponds to DltMaxCountContextIdsPerAppId. The number of lines of table (iii)
54 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
corresponds to DltMaxCountContextIds. Table (iv) is generated form the
„ServiceNeeds“ of all connected SW-Cs/runnables and the corresponding Port
Defined Argument Value.
Figure 18 For large numbers of pairs of Application IDs and Context IDs several tables can be
used for holding the information. For a faster search table (i) holds the Application IDs and
references to an array (ii) which holds references to the Context IDs with additional
information. So a two step search can be done. (CID == Context ID; AppID == Application ID)
Figure 2 shows a solution with two tables. This is for a smal number of Application
and Context IDs. Here a linear search must be done. The size (number of lines) of
table (i) corresponds to DltMaxCountAppIds. The number of rows of table (ii)
corresponds to DltMaxCountContextIds. Table (ii) is generated form the
„ServiceNeeds“ of all connected SW-Cs/runnables and the corresponding Port
Defined Argument Value.
Figure 19 Alternatively a more simple can be used where only one table holds information of
Application ID and Context ID. But here a linear search for all pairs is needed. (CID == Context
ID; AppID == Application ID)
[Dlt061] ⌈The contents of the described tables (except the Session Table) shall be
the contents to store in the NVRAM, if a persistent storage of the configuration of log
levels and trace status is requested.
The implementation and representation of the tables can be done in a different way
than the described tables here, but the function shall be the same.⌋ ()
Dlt shall check if the log level of the incoming log message is the same or below as
the maximum log level stored for this Context ID - Application ID pair (the log level of
the incoming message shall be in the pass through range).
If the check is not successful, the messages shall be discarded, otherwise the
message shall be transmitted to the external client.
56 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
[Dlt067] ⌈If no explicit log level or trace status is set the vale of
DltDefaultMaxLogLevel shall be used instead.⌋ (BSW35000040)
[Dlt068] ⌈Also for every Context ID / Application ID pair the status of the trace status
shall be stored in Dlt.⌋ (BSW35000031, BSW35000040)
[Dlt347] ⌈If the trace status for a pair is disabled, the incoming trace messages shall
be discarded, even if a connection to an external client is available.⌋
(BSW35000040)
[Dlt069] ⌈If the maximum log level for a Application ID and Context ID is changed by
an external client at runtime, Dlt shall store this changes in the corresponding tables.
⌋ (BSW35000031)
NOTE: These tables are in RAM, that means that storing in the table is not persistent
after next startup. Additionally SW-Cs shall be informed of the log level change (see
7.3.3.1.4).
[Dlt070] ⌈At startup the parts of the table which are changeable at runtime shall be
restored from stored data in NVRAM.⌋ ()
[Dlt071] ⌈If the trace status for a Application ID and Context ID is changed by an
external client at runtime, Dlt shall store this changes in the corresponding tables.⌋
(BSW35000031, BSW35000040)
NOTE: These tables are in RAM that means that storing in the table is not persistent
after next startup. Additionally SW-Cs shall be informed of the trace status change
(see 7.3.3.1.4).
[Dlt072] ⌈At startup the parts of the table which are changeable at runtime shall be
restored from stored data in NVRAM.⌋ ()
[Dlt073] ⌈If DltImplementNVRamStorage is enabled the log levels and trace status,
which are explicitly set for a pair of Application ID and Context ID by an External
Client at runtime, shall be storable persistent.⌋ (BSW35000039)
[Dlt077] ⌈Dlt shall have a runtime variable for the following configuration parameters:
DltHeaderUseEcuId
DltHeaderUseTimestamp
DltFilterMessages
DltDefaultMaxLogLevel
DltHeaderUseTimestamp
DltHeaderUseEcuId
DltHeaderUseExtendedHeader
DltHeaderUseSessionId
DltHeaderUseVerboseMode
DltBandwidthForDiagChannel
DltBandwidthForComModule
DltVfbTraceLogLevel
DltDefaultTraceStatus
to allow a reconfiguration at runtime.⌋ (BSW35000031, BSW35000039)
NOTE: The runtime variables required by Dlt077 shall be used in the implementation
instead of directly accessing the configuration parameters.
[Dlt449] ⌈If DltImplementNVRamStorage is enabled, the Dlt module has to verify the
validity of its non volatile blocks.⌋ ()
NOTE: Initial values in this case are the initial values for the persistent stored values
for the first startup of the ECU.
[Dlt078] ⌈The storing of information to NVRAM memory RAM blocks shall only be
done when the external client requests the storing persistently of this data and if
DltImplementNVRamStorage is enabled.⌋ ()
[Dlt452] ⌈If DltImplementNVRamStorage is enabled the Dlt module shall use the API
NvM_WriteBlock of the NVRAM module for persistent storing.
If this explicit store request is not done, Dlt restores the untouched NVRAM data at
next ECU startup in the Dlt_Init function.⌋ (BSW35000039)
[Dlt453] ⌈If DltImplementNVRamStorage is enabled the Dlt module shall use the API
NvM_ReadBlock of the NVRAM module for restoring the values from persistent
storage for the variables required by Dlt077.⌋ (BSW35000039)
[Dlt491] ⌈The restoring of the parameters mentioned in [Dlt453] shall be done in the
Dlt_Init() function.⌋ ()
[Dlt450] ⌈After the API Dlt_Init the Dlt shall be fully operational.⌋ ()
If requested, a factory default of log level and trace status of all Context IDs and
Application IDs shall be set.⌋ (BSW35000039)
[Dlt348] ⌈Reset to factory default shall be done by deleting the individual settings for
Application IDs and Context IDs and setting the maximum default log level to
DltFactoryDefaultMaxLogLevel. Also the reset to factory default shall set the initial
values for the variables required in Dlt077 to the values of the corresponding
configuration parameters.⌋ ()
Dlt uses control messages for reconfiguration at runtime (see chapter 7.7.6.1).
Control messages are mostly send by an external client and interpreted by Dlt.
Afterwards Dlt sends control messages as answer back to the external client.
[Dlt079] ⌈Dlt shall process control messages. It shall receive these messages,
process it (by doing an accurate action) and response to the request.
The response is also a normal Dlt message, which is to place in the send-buffer.⌋
(BSW35000031)
[Dlt351] ⌈The size of the generated control messages to send shall not exceed
DltMaxMessageLength.⌋ ()
[Dlt080] ⌈Dlt shall copy the provided payload to the send buffer of Dlt. In most cases
the payload provided by a SW-C or BSW module is attached to a message without
modification. (exception see 7.6.8.3)⌋ ()
[Dlt298] ⌈Dlt shall add the message header (see 7.7) for transmitting the message
over the network. The content of the header depends on the provided information by
the call of Dlt_SendLogMessage and Dlt_SendTraceMessage and on some
configuration parameters.⌋ ()
[Dlt081] ⌈If the message length exceeds DltMaxMessageLength the message shall
be discarded and the call of Dlt_SendLogMessage and Dlt_SendTraceMessage shall
return with NOT_OK.⌋ ()
As described in 7.7 Dlt uses a protocol for transmitting messages. If a log or trace
message is received by Dlt some entries of this protocol shall be filled.
[Dlt082] ⌈Table 7-6 shows the connection between the configuration parameters and
equivalent bit entries in the field header type (HTYP), which Dlt shall implement.
Table 7-6 Header Type (HTYP) bit entries in dependency on configuration parameters.
⌋ ()
[Dlt083] ⌈The related entries in the header TMSP and ECU shall be done in
dependency to the bits set in the HTYP.
The timestamp shall be generated at the moment the Dlt_SendXXXMessage was
called. It shall be the local time from the ECU (uptime). One hardware free running
timer (HWFRT) of the AUTOSAR GPT module can be used to get a timestamp.⌋ ()
[Dlt084] ⌈The field Message Counter (MCNT) shall be incremented for every
message which is put to the send buffer (see 7.6.1).⌋ (BSW35000018)
[Dlt085] ⌈The field Length (LEN) shall contain the overall length of the send
message in byte.
The filed Session ID (SEID) shall be filled with the Session ID (Port Defined
Argument Value) provided by the call off Dlt_SendLogMessage and
Dlt_SendTraceMessage.⌋ ()
[Dlt086] ⌈The extended Header shall only be attached when the UEH flag is set. The
information for the extended header shall be taken from the log_info/trace_info
parameter from the function Dlt_SendLogMessage/Dlt_SendTraceMessage.⌋
(BSW35000019)
[Dlt087] ⌈The functionality for filling the extended header can be left if
DltImplementExtendedHeader is not set.⌋ ()
[Dlt088] ⌈
Protocol parameter Description of source
Table 7-7 Fields of the extended Header and how to fill them
⌋ (BSW35000019)
Dlt translates and serializes the messages transferred from the user API into a byte
stream.This protocol specification describes the format of this byte stream. The
stream data can also be saved in a file in the external client.
The protocol supports a verbose and a non-verbose mode. In the verbose mode, the
complete description of the transferred data is provided within the protocol. The result
is a self-describing data format. In the non-verbose mode, only data of non-static
information is transmitted (see 7.7.5.1) and the description is provided externally.
The byte stream consists of one or more Dlt messages that are ordered back-to-
back, without any separation marks. One Dlt Message consists of a mandatory
Standard Header, which contains essential information for processing the message,
[Dlt467] ⌈Following table (Table 7-8) shows a general assembly of one Dlt message.
Every Dlt message shall consist of the shown entries.
⌋ (BSW35000002)
[Dlt091] ⌈The Standard Header and the Extended Header shall be in big endian
format (MSB first).⌋ ()
The following table gives an overview of the composition of the Standard Header.
Detailed description of the entries follows.⌋ (BSW35000002, BSW35000013)
[Dlt094] ⌈The Header Type shall be interpreted as an 8-bit field. The included bits
are UEH, MSBF, WEID, WSID, WTMS, VERS (3 bit), as shown in following table:
Bit Position
Offset 0 1 2 3 4 5 6 7
0 UEH MSBF WEID WSID WTMS VERS VERS VERS
⌋ ()
[Dlt406] ⌈The Use Extended Header (UEH) bit is set depending on the configuration
parameter DltHeaderUseExtendedHeader.
If it’s set, Extended Header (see 7.7.4) adjoins the Standard Header else the
Extended Header is skipped.⌋ ()
[Dlt095] ⌈If the UEH bit is set, the Extended Header shall be transmitted after the
Standard Header.⌋ ()
[Dlt303] ⌈If the UEH bit is not set, the Extended Header shall not be transmitted after
the Standard Header.⌋ (BSW35000044)
[Dlt096] ⌈If the UEH bit is not set, the payload shall be interpreted as in non-verbose
mode.⌋ (BSW35000024)
The MSBF bit specifies the byte order of the payload. It depends on the configuration
parameter DltHeaderPayloadEndianes.
[Dlt097] ⌈If the MSBF bit is set, the most significant byte shall be first in payload (big
endian format).⌋ (BSW35000014, BSW35000016)
[Dlt304] ⌈If the MSBF bit is not set, least significant byte shall be first in payload (little
endian format).⌋ (BSW35000014, BSW35000016)
[Dlt098] ⌈If the WEID bit is set, the ECU ID (ECU) shall be transmitted.⌋
(BSW35000022)
[Dlt305] ⌈If the WEID bit is not set, ECU ID (ECU) field shall be skipped and is not
located in the Standard Header.⌋ ()
[Dlt101] ⌈If the WSID bit is set, the Session ID shall be transmitted.⌋
(BSW35000020)
[Dlt306] ⌈If the WSID bit is not set, the Session ID field shall be skipped and is not
located in the Standard Header.⌋ ()
[Dlt102] ⌈If the WTMS bit is set, the timestamp shall be transmitted.⌋
(BSW35000017)
[Dlt307] ⌈If the WTMS bit is not set, the timestamp (TMSP) field shall be skipped and
is not located in the Standard Header.⌋ ()
The sender sets the Version Number of the Dlt Data Protocol in the Standard Header
according to the used version. The receiver checks the Version Number and
interprets the Dlt message according to the Version Number. Future versions of Dlt
Data Protocol may exist.
[Dlt318] ⌈The Version Number of the Dlt Data Protocol consists of 3 bit.⌋ ()
[Dlt104] ⌈The receiver of a Dlt message shall check the Version Number and shall
only interpret the Dlt message if the Version Number is supported.⌋ ()
[Dlt299] ⌈The Version Number for this Dlt Data Protocol is 0x1.⌋ ()
The Message Counter counts Dlt messages received by the Dlt module. With the
Message Counter, lost messages can be recognized to a certain level.
[Dlt105] ⌈The Dlt module shall increment the Message Counter by one at every
message received via the Dlt API.⌋ (BSW35000018)
[Dlt106] ⌈If Message Counter reaches 255, it starts by 0 at the next message.⌋
(BSW35000018)
Length (LEN) includes the Standard Header, the optional Extended Header and the
optional payload.
[Dlt107] ⌈Length (LEN) shall hold the total length of the Dlt message in byte.⌋ ()
[Dlt308] ⌈If the ECU ID is shorter than four 8-bit ASCII characters, the remaining
characters shall be filled by 0x00.
[Dlt110] ⌈Session ID shall be the Session ID of the port interface (see 7.3.3.1.7),
which sends the message.⌋ (BSW35000020)
[Dlt112] ⌈The TMSP bit field shall hold the timestamp from the moment SW-C sends
the message to Dlt.⌋ (BSW35000017)
[Dlt481] ⌈One hardware free running timer (HWFRT) of the AUTOSAR GPT module
shall be used to get a timestamp. The configuration parameter DltGptChannel
devotes the channel to use within the GPT module.⌋ ()
Bit position
Offset to Field 0 1 2 3 4 5 6 7
Standard Name
Header
start pos
in byte
0 HTYP UEH MSBF WEID WSID WTMS VERS VERS VERS
1 MCNT MCNT MCNT MCNT MCNT MCNT MCNT MCNT MCNT
2 LEN LEN LEN LEN LEN LEN LEN LEN LEN
The Extended Header will be transmitted if the UEH bit (Use Extended Header) is set
in the Standard Header.
[Dlt116] ⌈The Extended Header shall be transmitted in the case of a verbose mode
of the payload because it holds information about the Dlt log or trace message like
Context ID and Application ID.
In the case of a non-verbose mode this information can be stored in an external file
and reassigned (by an external client) with the Message ID which is provided in the
payload. ⌋ (BSW35000013)
The following table gives an overview of the composition of the Extended Header.
Detailed description of the entries follows. ⌋ (BSW35000002)
[Dlt118] ⌈Message Info shall be interpreted as an 8-bit field. The included bits are
VERB, MSTP (3 bit) and MTIN (4 bit).
Bit Position
Offset 0 1 2 3 4 5 6 7
0 VERB MSTP MSTP MSTP MTIN MTIN MTIN MTIN
⌋ ()
[Dlt119] ⌈If the VERB bit is set, the payload shall be transmitted in verbose mode.⌋
(BSW35000044)
[Dlt310] ⌈If the VERB bit is not set, the payload shall be transmitted in non-verbose
mode.⌋ (BSW35000024)
⌋ ()
[Dlt121] ⌈The content of the MTIN field depends on the MSTP field according to the
following table:
Table 7-15 Relation between Message Type Info (MTIN) and Message Type (MSTP)
⌋ ()
[Dlt122] ⌈If MSTP equals DLT_TYPE_LOG, MTIN shall have one of following values:
1
Unlike in a log message a trace can only be turned on or off. Trace messages can have additional
attributes like function-in/out. Trace may not be enabled in production phase.
72 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
Value Name Description
0x4 DLT_LOG_INFO Log messages providing information for
better understanding of the internal
behavior of a software
0x5 DLT_LOG_DEBUG Log messages, which are usable only
for debugging of a software
0x6 DLT_LOG_VERBOSE Log messages with the highest
communicative level, here all possible
states, information and everything else
can be logged
⌋ (BSW35000019)
⌋ ()
[Dlt124] ⌈If MSTP equals DLT_TYPE_CONTROL, MTIN shall have one of following
values:
⌋ ()
⌋ ()
[Dlt312] ⌈If the Application ID is shorter than four 8-bit ASCII characters, the
remaining characters shall be filled by 0x00. ⌋ ()
Context ID is a user defined ID to group log and trace messages (see 7.1.8).
[Dlt313] ⌈If the Context ID is shorter than four 8-bit ASCII characters, the remaining
characters shall be filled by 0x00.
Bit position
Offset to Field 0 1 2 3 4 5 6 7
Extended Name
Header
start pos in
byte
0 MSIN VERB MSTP MSTP MSTP MTIN MTIN MTIN MTIN
1 NOAR NOAR NOAR NOAR NOAR NOAR NOAR NOAR NOAR
2 APID APID APID APID APID APID APID APID APID
7.7.5 Payload
The payload holds the parameters that will be logged or traced. More precisely the
payload consists of the buffer that will be passed in the API containing the
parameters to be logged or traced. For detailed information, see 8.4.2 and 8.4.2.4.
The payload adjoins next to the Standard Header or the Extended Header,
depending on the UEH bit.
[Dlt314] ⌈If the UEH bit is set, the payload shall adjoin the Extended Header. ⌋
(BSW35000013, BSW35000023)
[Dlt315] ⌈If the UEH bit is not set, the payload shall adjoin the Standard Header.
75 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
There are two modes for transmitting the payload – Verbose Mode and Non-Verbose
Mode. The bit Verbose (VERB) in the Extended Header specifies which mode is
used. ⌋ (BSW35000013, BSW35000023)
There are two types of data relevant in the Non-Verbose Mode – static data and non-
static data, detailed description of the data types follows. Non-static data with its
unique identifier ID is transmitted in the payload in Non-Verbose Mode. This unique
Message ID (see 7.7.5.1.1) is assigned to the non-static data in order that the
receiver can reassign the data. Only the Message ID with the non-static data are
transmitted within the Dlt message. Static data is not transmitted in the payload in
Non-Verbose Mode.
[Dlt460] ⌈If non-verbose mode is used the packet format in Table 7-21 shall be used.
Static data are all data that are not modifiable at runtime, like:
Name of variables
Unit or description of variables
Position in the source code (file name and line number)
Static text
Non-static data are all modifiable data, like values of variables. Only non-static data
shall be transmitted within non-verbose mode.
The Non-Verbose Mode can be used in small ECU’s with low memory and / or within
a network with limited bandwidth. Because static data are not transmitted, the data
also need not to be stored on the ECU’s RAM/ROM. ⌋ ()
7.7.5.1.1 Message ID
The Message ID is associated with additional information that contains all static data
and allows the receiver to interpret all non-static data received. This additional
information is provided externally (e.g. by an external file). Any number of data and
any data type can be associated with a single Message ID. The receiver can interpret
the data with the external description. For one Message ID there is only one unique
description of the transmitted data and one combination of static data is assigned to
one unique Message ID.
This example will demonstrate how the non-static data is assembled, transmitted and
interpreted.
There is a unique Message ID that characterize this log message call on this specific
position in the source code. Following information is associated with this Message ID:
All static data is already associated with the Message ID and only the non-static data
will be transmitted:
Based on the Message ID, the receiver can reassemble all static data of this Dlt
message (position in source code, static text, variable names and units). The non-
static data will be transmitted consistently packed. The interpretation is possible by
using the information associated with the Message ID. Also the ordering of the
arguments is associated with the Message ID.
[Dlt378] ⌈The non-static data shall be transmitted consistently packed and byte
aligned. ⌋ (BSW35000014, BSW35000023)
An external file holds the information how the payload shall be interpreted. For
describing transmitted messages which are in non verbose mode the ASAM Fibex
(Field Bus Exchange Format) shall be used.
The software supplier of a SW-C or the BSW shall provide this description file.
Because Dlt can have several sources of log or trace messages (several SW-Cs,
Dem, Det) the provided description files can be merged to one file for a given ECU.
Each Fibex description file for describing Non Verbose messages only corresponds
to log or trace messages for one ECU. This is because Message IDs are only unique
[Dlt402] ⌈Each description file shall contain only one ECU XML-element. ⌋ ()
As seen from the user, a log or trace message has several arguments. These
arguments can be static text or non static variables. Only the non static variables
data is transmitted. To reassemble the whole message with all arguments, a FRAME
XML-element shall contain some empty PDU XML-elements which represents
arguments with static text. This text shall be placed in the DESC XML-element of the
PDU XML-element. ⌋ ()
[Dlt418] ⌈The ASAM Fibex Standard (Field Bus Exchange Format) Version 3.0 shall
be used for describing a Non Verbose message.⌋ (BSW35000024, BSW35000026)
[Dlt396] ⌈One log or trace message shall be represented by one FRAME XML-
element in Fibex. ⌋ ()
[Dlt399] ⌈The user data of the log or trace message shall be represented by several
PDU XML-elements. Each argument shall get one PDU XML-element. ⌋ ()
[Dlt400] ⌈If the argument contains only static text, this text shall be placed in the
DESC XML-element of the PDU. In this case the BYTE-LENGTH of the PDU XML-
element shall be zero.⌋ (BSW35000025)
79 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
[Dlt401] ⌈If the argument contains “Non-Static Data” the data transported in the
message is described within the PDU as SIGNAL XML-element.⌋ (BSW35000026)
The following example shows the description of a sample Dlt message in FIBEX
XML.
<fx:FRAME ID="ID_1">
<ho:SHORT-NAME>Dlt Message with ID_1</ho:SHORT-NAME>
<fx:BYTE-LENGTH>1</fx:BYTE-LENGTH>
<fx:FRAME-TYPE>OTHER</fx:FRAME-TYPE>
<fx:PDU-INSTANCES>
<fx:PDU-INSTANCE ID="P_1_0">
<fx:PDU-REF ID-REF="PDU_1_0"/>
<fx:SEQUENCE-NUMBER>0</fx:SEQUENCE-NUMBER>
</fx:PDU-INSTANCE>
<fx:PDU-INSTANCE ID="P_1_1">
<fx:PDU-REF ID-REF="PDU_1_1"/>
<fx:SEQUENCE-NUMBER>1</fx:SEQUENCE-NUMBER>
</fx:PDU-INSTANCE>
<fx:PDU-INSTANCE ID="P_1_2">
<fx:PDU-REF ID-REF="PDU_1_2"/>
<fx:SEQUENCE-NUMBER>2</fx:SEQUENCE-NUMBER>
</fx:PDU-INSTANCE>
</fx:PDU-INSTANCES>
<fx:MANUFACTURER-EXTENSION>
<MESSAGE_TYPE>DLT_TYPE_LOG</MESSAGE_TYPE>
<MESSAGE_INFO>DLT_LOG_DEBUG</MESSAGE_INFO>
<APPLICATION_ID>APPI</APPLICATION_ID>
<CONTEXT_ID>CONI</CONTEXT_ID>
<MESSAGE_SOURCE_FILE>demo.c</MESSAGE_SOURCE_FILE>
<MESSAGE_LINE_NUMBER>72</MESSAGE_LINE_NUMBER>
</fx:MANUFACTURER-EXTENSION>
</fx:FRAME>
<!--=============== 1. Parameter ==================-->
<fx:PDU ID="PDU_1_0">
<ho:SHORT-NAME></ho:SHORT-NAME>
<ho:DESC>Temperature measurement</ho:DESC>
<fx:BYTE-LENGTH>0</fx:BYTE-LENGTH>
<fx:PDU-TYPE>OTHER</fx:PDU-TYPE>
</fx:PDU>
<!--=============== 2. Parameter ==================-->
<fx:PDU ID="PDU_1_1">
<ho:SHORT-NAME>measurement_point</ho:SHORT-NAME>
<fx:BYTE-LENGTH>1</fx:BYTE-LENGTH>
<fx:PDU-TYPE>OTHER</fx:PDU-TYPE>
<fx:SIGNAL-INSTANCES>
<fx:SIGNAL-INSTANCE ID="S_1_0">
<fx:SEQUENCE-NUMBER>0</fx:SEQUENCE-NUMBER>
<fx:SIGNAL-REF ID-REF="S_UINT8"/>
</fx:SIGNAL-INSTANCE>
</fx:SIGNAL-INSTANCES>
</fx:PDU>
<!--=============== 3. Parameter ==================-->
<fx:PDU ID="PDU_1_2">
<ho:SHORT-NAME>reading</ho:SHORT-NAME>
<fx:BYTE-LENGTH>1</fx:BYTE-LENGTH>
80 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
<fx:PDU-TYPE>OTHER</fx:PDU-TYPE>
<fx:SIGNAL-INSTANCES>
<fx:SIGNAL-INSTANCE ID="S_1_0">
<fx:SEQUENCE-NUMBER>0</fx:SEQUENCE-NUMBER>
<fx:SIGNAL-REF ID-REF="FLOA32"/>
</fx:SIGNAL-INSTANCE>
</fx:SIGNAL-INSTANCES>
</fx:PDU>
In contrary to the Non-Verbose Mode, the Verbose Mode provides all information for
interpreting the transmitted data within the message. The data is self-describing. All
static information like strings is transmitted. No extra description file is needed,
because of transmitting all information within the log and trace message.
The Verbose Mode can be used on ECU’s where enough memory and high network
bandwidth are available. Because of the self-description, the stored data on the
external client is interpretable at any time and without any further information.
Each argument consists of a “Type Info” field and the appended Data Payload. In
“Type Info” field the necessary information is provided to interpret the following data
structure.
[Dlt459] ⌈The assembly of a Dlt message in Verbose Mode is shown in the following
table (Table 7-23) and shall be in this format.
⌋ (BSW35000023, BSW35000044)
[Dlt409] ⌈The arguments and all inherited data shall be transmitted consistently
packed. ⌋ (BSW35000023)
[Dlt421] ⌈The bit field Type Info shall be used, if the Verbose (VERB) bit is set AND if
Message Type (MSTP) equals DLT_TYPE_LOG or DLT_TYPE_APP_TRACE.
With Type Info, the correct structure of the following Data is chosen automatically.⌋
(BSW35000044)
[Dlt135] ⌈Type Info is a bit field of 32 bit. Following Bit field shall be used for Type
Info:
Bit position
Offset Field 0 1 2 3 4 5 6 7
to start Name
pos in
byte
0 Type Info TYLE TYLE TYLE TYLE BOOL SINT UINT FLOA
1 Type Info ARAY STRG RAWD VARI FIXP TRAI STRU SCOD
2 Type Info SCOD SCOD - - - - - -
3 Type Info - - - - - - - -
The entries of Type Info are specified in the following section in detail.⌋
(BSW35000044)
[Dlt410] ⌈The coding of all text in Variable Info (VARI) shall be in 8-bit ASCII format.
⌋ ()
If fixed point values are used, the Fixed Point (FIXP) bit shall be set. Than the Data
field represents the physical value of a fixed point variable.
For interpreting the fixed point variable the logical value of this variable has to be
calculated.
The logical value is calculated by the physical value, the quantization and the offset
of fixed point variable.
[Dlt389] ⌈The following equation defines the relation between the logical value
(log_v) and the physical value (phy_v), offset and quantization:
log_v = phy_v * quantization + offset ⌋ ()
[Dlt169] ⌈The bit Fixed Point (FIXP) shall only be set in combination with Type
Signed (SINT) or Type Unsigned (UINT). ⌋ ()
String Coding specifies only the coding of string data of Type String (STRG). All other
strings like parameter name, unit and description are coded in 8-bit ASCII format.
[Dlt422] ⌈If the BOOL bit is set, the Data Payload shall consist of at least one 8-bit
unsigned integer parameter. ⌋ ()
[Dlt423] ⌈If the Data field equals 0x0, it shall be interpreted as FALSE. If the Data
field equals 0x1 it shall be interpreted as TRUE. ⌋ ()
[Dlt355] ⌈If Variable Info (VARI) is set, the Length of Name, the Name and the Unit
fields shall be added. ⌋ ()
[Dlt369] ⌈The Data Payload of Type Bool (BOOL) shall be assembled as shown in
following table.
⌋ ()
The SINT and UINT Data Payload are assembled in the same way. The only
difference is in interpreting the Data field.
[Dlt385] ⌈If the SINT bit is set, the Data Payload consists of at least one signed
integer Data field. ⌋ ()
[Dlt386] ⌈If the UINT bit is set, the Data Payload consists of at least one unsigned
integer Data field.
Table 7-27 Data Payload of Type Signed (SINT) and Type Unsigned (UINT)
⌋ ()
[Dlt357] ⌈If Variable Info (VARI) is set, the “Length of Name”, “Length of Unit”, the
“Name” and the “Unit” fields shall be added. ⌋ ()
[Dlt412] ⌈If FIXP is set, the Quantization and Offset fields shall be added. ⌋ ()
[Dlt387] ⌈The Offset field is a singed integer field with at least 32 bit. If the TYLE
equals 4 the Offset field shall be a 64 singed integer field and if the TYLE equals 5
the Offset field shall be a 128 singed integer field. ⌋ ()
[Dlt370] ⌈The Data Payload of Type Signed (SIGN) and of Type Unsigned (UINT)
shall be assembled as shown in Table 7-27. ⌋ ()
[Dlt390] ⌈If the bit Type Float (FLOA) is set, the Data Payload shall consist of at least
one Data field, which shall be interpreted as a float variable.
⌋ ()
⌋ ()
[Dlt362] ⌈If Variable Info (VARI) is set, the “Length of Name”, “Length of Unit”, the
“Name” and the “Unit” fields shall be added. ⌋ ()
[Dlt371] ⌈The argument of Type Float (FLOA) shall be assembled as shown in Table
7-28. ⌋ ()
[Dlt420] ⌈If the bit Type String (STRG) is set, the Data Payload shall consist of at
least one Data field, which shall be interpreted as a string variable.⌋ (BSW35000025)
[Dlt392] ⌈The string in the Data field shall be interpreted with the type corresponding
to the String Coding (SCOD) field in the Type Info field. ⌋ ()
[Dlt156] ⌈At the beginning of the Data Payload, a 16-bit unsigned integer specifies
the length of the string (provide in the Data field) in byte including the termination
character. ⌋ ()
[Dlt157] ⌈If Variable Info (VARI) is set, the “Length of Name” and the “Name” fields
shall be added. ⌋ ()
[Dlt373] ⌈The Data Payload of Type String (STRG) shall be assembled as shown in
following table.
⌋ ()
[Dlt147] ⌈If the bit Type Array is set, the Data Payload shall consist of an n-
dimensional array of one or more data types of bool (BOOL), signed integer (SINT),
unsigned integer (UINT) or float (FLOA) data types. The TYLE field and FIXP field
shall be interpreted as in the standard data types. ⌋ ()
[Dlt148] ⌈At the beginning of the Data Payload a 16-bit unsigned integer shall specify
the number of dimensions of the array. ⌋ ()
[Dlt149] ⌈If Variable Info (VARI) is set, the name of the array shall be described. ⌋ ()
88 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
[Dlt150] ⌈Within the loop over the number of dimensions, a 16-bit unsigned integer
shall specify the number of entries in the current dimension. ⌋ ()
[Dlt152] ⌈If Variable Info (VARI) is set, the “Length of Name”, “Length of Unit”, the
“Name” and the “Unit” fields shall be added. ⌋ ()
[Dlt153] ⌈If Fixed Point (FIXP) bit is set in the Type Info, the quantization and offset
for the entry in the array shall be added.
It is only possible to use the same fixed point calculation for all entries in the array. ⌋
()
[Dlt372] ⌈The Data Payload of Type Array (ARAY) shall be assembled as shown in
following table.
⌋ ()
[Dlt175] ⌈At the beginning of the Data Payload a 16-bit unsigned integer shall specify
the number of entries of the structure or the object. ⌋ ()
[Dlt176] ⌈If Variable Info (VARI) is set, the “Length of Name” and the “Name” fields
shall be added. ⌋ ()
[Dlt177] ⌈The list of entries contains one or more standard arguments with Type Info
and Data Payload. All standard argument types are allowed. ⌋ ()
[Dlt414] ⌈The Data Payload of Type Struct (STRU) shall be assembled as shown in
following table.
⌋ ()
If this bit is set, the Data Payload describes raw data. Variable Info (VARI) is optional.
[Dlt364] ⌈If Variable Info (VARI) is set, the coding of the name shall be in 8-bit ASCII
format. ⌋ ()
[Dlt160] ⌈At the beginning of the Data Payload a 16-bit unsigned integer shall specify
the length of the raw data in byte. ⌋ ()
[Dlt161] ⌈If Variable Info (VARI) is set, the “Length of Name” and the “Name” fields
shall be added.
The interpretation of the Data field in the case of a Raw argument can not be done.
Some tools can show this data by a user defined data type. ⌋ ()
[Dlt374] ⌈The Data Payload of Type Raw (RAWD) shall be assembled as shown in
following table.
⌋ ()
[Dlt170] ⌈If the bit Trace Info (TRAI) is set, the trace information (like module name /
function) shall be transmitted in the argument. ⌋ ()
[Dlt172] ⌈At the beginning of the Data Payload, a 16-bit unsigned integer shall
specify the length of the trace data string in byte including the termination character.
⌋ ()
[Dlt171] ⌈String Coding (SCOD) shall specify the coding of the trace data string. ⌋ ()
[Dlt375] ⌈The Data Payload of Trace Info (TRAI) shall be assembled as shown in
following table.
⌋ ()
The following example shows the assembly of an 8-bit unsigned integer argument
with Variable Info (VARI) bit set in verbose mode.
The Type Info is a 32-bit field that describes the Data. In this example, it defines the
variable type (unsigned integer), its length (8 bit) and the presence of Variable Info
(VARI) that describes the name and unit of the variable. Variable Info is following with
two 16-bit unsigned integers describing the length of the Name and the Unit of the
variable. Two null terminated strings follow that describe the Name and the Unit.
Finally, the variable value follows. The length of the Data field is 8 bit.
4 BOOL
5 SINT
6 UINT
7 FLOA
8 ARAY
9 STRG
10 RAWD
11 VARI
12 FIXP
13 TRAI
14 STRU
15-17 SCOD
RESERVED
18-31
x x x x x o
x x x x x o o
x x x x x o o
x x x x x o
x o x x x
x o
x x x x
x o
o x
o
Table 7-36 Assembly of valid settings in Type Info (o – optional, x – mandatory for this type,
empty – not allowed for this type)
The following table shows the mandatory (marked with x) and optional (marked with
o) setting according to used variable type:
Table 7-37 Assembly of valid settings in Type Info (o – optional, x – mandatory for this type,
empty – not allowed for this type)
Using the Verbose Mode helps to understand, analyze and debug the SW-C.
To identify the source of a log or trace message some information to find the location
in the source code shall be added to a Dlt message. Therefore the first two
arguments in a Dlt message shall be:
93 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
[Dlt424] ⌈The first argument of a log or trace message shall be a string argument
where the field “Name” (in Variable Info) contains the string “source_file” and the
Data field contains the URL to the source file. ⌋ ()
[Dlt425] ⌈The second argument of a log or trace message shall be a UINT argument
(with 32 bit) where the field “Name” (in Variable Info) contains the string
“line_number” and the Data field contains the line number in the source file where the
log or trace message is sent. ⌋ ()
The Dlt module can leave out some information in the header like timestamp and
ECU ID. Therefore, it is important to store some additional information by the
receiving external client.
For additionally storing the timestamp and the ECU ID a Storage Header shall be
added in front of every received Dlt message.
Timestamp and ECU ID can be left of Dlt side, because of that the receiver shall add
this information at receiving time. The Timestamp is also for a better calculating of
sequences and timely dependencies by a diagnostic and visualization tool.
Additionally at the beginning of the Storage header a pattern shall be attached. This
pattern is for some error recoveries if the byte-stream or file is broken.
[Dlt405] ⌈An external client shall add the Storage Header to a received Dlt message
before it stores the message.
⌋ ()
[Dlt404] ⌈If an external client receives a message it shall store the time when it
receives the message additionally to the message in the storage header. ⌋ ()
[Dlt292] ⌈If an external client receives a message it shall store the ECU ID when it
receives the message additionally to the message in the storage header. ⌋ ()
[Dlt415] ⌈The first message stored in the database/file shall be the response to the
“Get ECU Software Version” control message. ⌋ ()
To control the internal behavior of the Dlt module it is important to have an interface
to make some changes on the configuration of the Dlt module.
[Dlt186] ⌈The Dlt module shall handle the communication with an external client
described in this chapter. ⌋ ()
Control messages do not contain log or trace information. The use of control
messages is to configure the internal behavior of the Dlt module and to get
information of registered Application IDs and Context IDs.
NOTE: Control messages can not be send by SW-Cs or BSW modules. They are
only exchanged between Dlt and an external client.
[Dlt187] ⌈Control messages are in general normal Dlt messages with a Standard
Header, an Extended Header and payload.
MSCI equals
DLT_CONTROL_REQUEST or
DLT_CONTROL_RESPONSE
Payload
4 Service_ID The service to execute
x Parameters Data for executing the service
⌋ (BSW35000032)
[Dlt188] ⌈In the Standard Header the Application ID, Context ID, Session ID and
Timestamp may be left blank. This means that they should be filled with zeros (0) if it
not used otherwise in the control message. The fields Timestamp and SessionID of
the Standard Header can be left by setting the bits WSID or WTMS to zero.
All other fields have the same meaning as in a log message, except for the ECU
field. If the external client is sending a message to a given ECU, it shall insert the
ECU ID of the receiver. ⌋ ()
[Dlt190] ⌈If a specific functionality like switch to Verbose Mode or message filtering is
not implemented in Dlt it shall response with NOT_SUPPORTED. ⌋ ()
[Dlt416] ⌈If the provided parameters of a request are not correct, Dlt shall answer
with status ERROR. ⌋ ()
96 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
[Dlt417] ⌈If a new request is received by Dlt while an old one is not finished it shall
answer to the new one with ERROR. ⌋ ()
[Dlt191] ⌈The payload shall always begin with the Service_ID. This ID is for
identifying the request and the corresponding action to be processed by the Dlt
module. ⌋ ()
[Dlt192] ⌈The communication procedure between external client and Dlt module on
the ECU is like following:
1. The external client sends a request to the Dlt module (MSCI ==
DLT_CONTROL_REQUEST)
2. The Dlt module receives this request and performs the requested action
3. The Dlt module sends a response (MSCI == DLT_CONTROL_RESPONSE),
with the same Service_ID of the request back to the external client. ⌋ ()
[Dlt193] ⌈The external client shall not send any new requests until the response of
the Dlt module is received. The procedure is synchronous and not reentrant.
If the external client did not receive an answer for a control message from Dlt it can
repeat the control message after a timeout. The length of the timeout is chosen by
the external client, depending on the performance of the ECU and on the
communication channel bandwidth.
The following tables describe the request and response messages for a specific
Service_ID. The Service_ID and the request or response parameter represent the
payload. The Number column is the ordering of the parameters. ⌋ ()
[Dlt194] ⌈
Service name: Set_LogLevel
Service_ID [hex] 0x01
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 Application_ ID 4 * uint8 Representation of the Application ID.
If this field is filled with NULL all log level for all
Context IDs on this ECU are set.
2 Context_ID 4 * uint8 Representation of the Context ID
If this field is filled with NULL all Context IDs
belonging to the given Application ID are set.
is only interpreted if Application ID is not NULL
Description: Called to modify the pass through range for log messages for a given Context ID.
⌋ (BSW35000032)
[Dlt380] ⌈
Service name: Set_DefaultLogLevel
Service_ID [hex] 0x11
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 new_log_level sint8 the new log level to set
can be in the range of DLT_LOG_FATAL to
DLT_LOG_VERBOSE for setting the pass
through range
if set to 0 all messages are blocked
Description: Called to modify the pass through range for log messages for all not explicit set
Context IDs.
⌋ (BSW35000032)
[Dlt196] ⌈
Service name: Set_TraceStatus
Service ID [hex] 0x02
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 Application_ID 4 * Representation of the Application ID.
uint8 If this field is filled with NULL all trace status for
all Context IDs on this ECU are set.
2 Context_ID 4 * Representation of the Context ID
uint8 If this field is filled with NULL all Context IDs
belonging to the given Application ID are set.
is only interpreted if Application ID is not NULL
3 new_trace_status sint8 the new trace status to set
can be 1 – for On and 0 – for Off
if set to -1 the default trace status for this ECU
will be used
Description: Called to enable or disable trace messages for a given Context ID.
⌋ (BSW35000032)
[Dlt383] ⌈
Service name: Set_DefaultTraceStatus
Service_ID [hex] 0x12
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 new_trace_status sint8 the new trace status to set
can be 1 – for On and 0 – for Off
2 com_interface 4*uint8 This field is used if Dlt supports filtering messaged for
different interfaces differently. Than the log level for this
interface can be provided. Otherwise it should be filled
with zeros.
To interpret as a name for a interface
Possible values are
“DCM” – Interface to the Dcm (Diagnostic Interface)
For the Dlt communication module user defined values
are allowed, e.g.:
“SER1”, “eth0”
Not used bytes are filled by zero.
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: Called to enable or disable trace messages for all not explicit set Context IDs
⌋ (BSW35000032)
[Dlt197] ⌈
Service name: Get_LogInfo
Service ID [hex] 0x03
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 Options uint8
1 - reserved
2 - reserved
3 - means only information about registered
Application IDs and Context IDs without log level
or trace status information
4 - means information about registered
Application IDs and Context IDs with log level
and without trace status information
5 - means information about registered
Application IDs and Context IDs without log level
and with trace status information
6 - means information about registered
Application IDs and Context IDs with log level
and with trace status information
7 - means information about registered
Application IDs and Context IDs with log level
and with trace status information and all textual
descriptions of each Application ID and Context
ID
(If DltImplementVerboseMode is not set
NOT_SUPPORTED shall be the response)
2 Application_ID 4 * Representation of the Application ID.
uint8 If this field is filled with NULL all Application IDs
with all Context IDs registered with this ECU are
requested
3 Context_ID 4 * Representation of the Context ID
uint8 If this field is filled with NULL all Context IDs
belonging to the given Application ID are
requested
is only interpreted if Application ID is not NULL
4 com_interface 4*uint8 This field is used if Dlt supports filtering messaged
for different interfaces differently. Than the log level
for this interface can be provided. Otherwise it
should be filled with zeros.
To interpret as a name for a interface
Possible values are
“DCM” – Interface to the Dcm (Diagnostic Interface)
For the Dlt communication module user defined
values are allowed, e.g.:
“SER1”, “eth0”
Not used bytes are filled by zero.
Response Parameter
Number Name Type Description
1 Status uint8 1 - NOT_SUPPORTED
2 - ERROR
3 - means only information about registered
Application IDs and Context IDs without log
level or trace status information
4 - means information about registered
Application IDs and Context IDs with log level
and without trace status information
5 - means information about registered
Application IDs and Context IDs without log
level and with trace status information
6 - means information about registered
Application IDs and Context IDs with log level
and with trace status information
7 - means information about registered
Application IDs and Context IDs with log level
and with trace status information and all textual
descriptions of each Application ID and
Context ID
NOTE:
In this case the control message shall be in Verbose
Mode
8 – NO matching Context IDs
9 – RESPONSE DATA OVERFLOW – If the
generated response is to large for transmitting
a single Dlt message (PDU is 65536 Byte) only
Status type RESPONSE DATA OVERFLOW
shall be send (No Application_IDs and
com_interface entries are transmitted). Than
the user could than decide to formulate a less
complex request.
7.7.7.1.5.1 LogInfoType
Name: LogInfoType
Type: structure
Type field:
uint16 count_app_ids
AppIDsType[] app_ids
Description:
7.7.7.1.5.2 AppIDsType
Name: AppIDsType
Type: structure
Type field:
uint32 app_id
uint16 count_context_ids
ContexIDsInfoType[] context_id_info
optional, if uint16 len_app_description
options ==7 String app_description
Description: Holds information about a specific Application ID
7.7.7.1.5.3 ContextIDsInfoType
Name: ContextIDsInfoType
Type: structure
Type field:
uint32 context_id
if options == sint8 log_level
4,6 or 7
if options == sint8 trace_status
5,6 or 7
optional, if uint16 len_context_description
options == 7 String context_description
Description: Holds information about a specific Context ID
[Dlt198] ⌈
Service name: Get_DefaultLogLevel
Service ID [hex] 0x04
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
none
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
2 log_level uint8 Actual log level
Description: Returns the actual default log level
⌋ (BSW35000032)
[Dlt494] ⌈
Service name: Get_DefaultTraceStatus
Service ID [hex] 0x15
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
none
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
2 trace_status uint8 Actual Trace Status 0 - off, 1 - on
Description: Returns the actual default trace status
⌋ ()
[Dlt199] ⌈
Service name: Store_Config
Service ID [hex] 0x05
:
Sync/Async: Synchronous
104 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
none
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: Called to store the actual configuration of Dlt to NVRAM (see 7.6.6)
⌋ ()
[Dlt200] ⌈
Service name: ResetToFactoryDefault
Service ID [hex] 0x06
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
none
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: Called to set the configuration of Dlt to factory defaults (see 7.6.6)
⌋ ()
[Dlt201] ⌈
Service name: SetComInterfaceStatus
Service ID [hex] 0x07
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 com_interface 4*uint8 To interpret as a name for a interface
Possible values are
“DCM” – Interface to the Dcm (Diagnostic Interface)
For the Dlt communication module user defined values
are allowed, e.g.:
“SER1”, “eth0”
Not used bytes are filled by zero.
105 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
2 new_status uin8 0 – OFF
1 – ON
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: Called to enable or disable a specific communication interface.
⌋ ()
[Dlt501] ⌈
Service name: GetComInterfaceStatus
Service ID [hex] 0x16
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 com_interface 4*uint8 To interpret as a name for a interface
Possible values are
“DCM” – Interface to the Dcm (Diagnostic Interface)
For the Dlt communication module user defined values
are allowed, e.g.:
“SER1”, “eth0”
Not used bytes are filled by zero.
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
3 == INTERFACE NOT AVAILABLE
2 if_status uin8 Current interface status
0 – OFF
1 – ON
Description: Called to get the status information of a specific communication interface.
⌋ ()
[Dlt502] ⌈
Service name: GetComInterfaceNames
Service ID [hex] 0x17
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
⌋ ()
[Dlt202] ⌈
Service name: SetComInterfaceMaxBandwidth
Service ID [hex] 0x08
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 com_interface 4*uint8 To interpret as a name for a interface
Possible values are
“DCM” – Interface to the Dcm (Diagnostic Interface)
For the Dlt communication module user defined values
are allowed, e.g.:
“SER1”, “eth0”
2 max_bandwidth uint32 the maximum bandwidth to allow for this interface in bit
per second
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: Called to set the maximum bandwidth for a specific communication interface.
⌋ (BSW35000030)
[Dlt503] ⌈
Service name: GetComInterfaceMaxBandwidth
Service ID [hex] 0x18
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
[Dlt203] ⌈
Service name: SetVerboseMode
Service ID [hex] 0x09
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 new_status uint8 0 – OFF
1 – ON
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: Called to switch on/off the Verbose Mode. This works only if the Dlt module and
all SW-Cs are compiled with Verbose Mode enabled. If
DltImplementVerboseMode is not set the response shall be NOT_SUPPORTED.
⌋ ()
[Dlt504] ⌈
Service name: GetVerboseModeStatus
Service ID [hex] 0x19
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
none
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
2 mode_status uint8 0 – OFF
1 – ON
Description: Called to get f the Verbose Mode. This functionality is optionally, only if the Dlt
module can track the verbose mode changes of the SW-C.
⌋ ()
[Dlt205] ⌈
Service name: SetMessageFilterering
Service ID [hex] 0x0A
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 new_status uint8 0 – OFF
1 – ON
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: Called to switch on/off the message filtering by the Dlt module. If
DltImplementFilterMessages is not set NOT_SUPPORTED shall be the response.
⌋ ()
[Dlt505] ⌈
Service name: GetMessageFiltereringStatus
Service ID [hex] 0x1A
109 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
none
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
1 filter_status uint8 0 – OFF
1 – ON
Description: Called to get the message filtering status from the Dlt module.
⌋ ()
[Dlt207] ⌈
Service name: SetTimingPackets
Service ID [hex] 0x0B
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 new_status uint8 0 – OFF
1 – ON
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: Called to switch on/off the continuous cyclic sending of timing packets. If
DltImplementTimestamp is not set NOT_SUPPORTED shall be the response.
⌋ (BSW35000028)
[Dlt208] ⌈
Service name: GetLocalTime
Service ID [hex] 0x0C
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: Called to get a single packet with timestamp (TMSP). The TSMP (timestamp)
field of the standard header from the response control message shall contain a
valid timestamp. The TMSP field is used for transmitting the times tamp in the
response.
Can be used for time calculation algorithm. Shall be answered as fast as possible
by the Dlt module. If DltImplementTimestamp is not set NOT_SUPPORTED shall
be the response.
⌋ (BSW35000028)
[Dlt209] ⌈
Service name: SetUseECUID
Service ID [hex] 0x0D
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 new_status uint8 0 – OFF
1 – ON
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: SetUsed to enable/disable the transmission of the ECU in the header.
⌋ ()
[Dlt506] ⌈
Service name: GetUseECUID
Service ID [hex] 0x1B
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
none
Response Parameter
⌋ ()
[Dlt211] ⌈
Service name: SetUseSessionID
Service ID [hex] 0x0E
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 new_status uint8 0 – OFF
1 – ON
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: Used to enable/disable the transmission of the Session ID in the header.
⌋ ()
[Dlt507] ⌈
Service name: GetUseSessionID
Service ID [hex] 0x1C
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
none
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
2 sid_status uint8 0 – OFF
1 – ON
⌋ ()
[Dlt213] ⌈
Service name: UseTimestamp
Service ID [hex] 0x0F
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 new_status uint8 0 – OFF
1 – ON
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: Used to enable/disable the transmission of the Timestamp in the header.
⌋ ()
[Dlt508] ⌈
Service name: GetUseTimestamp
Service ID [hex] 0x1D
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
none
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
2 tst_status uint8 0 – OFF
1 – ON
Description: Used to get the DltHeaderUseTimestamp.
⌋ ()
[Dlt215] ⌈
Service name: UseExtendedHeader
Service ID [hex] 0x10
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 new_status uint8 0 – OFF
1 – ON
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
Description: Used to enable/disable the transmission of the extended header. If
DltImplementExtendedHeader is not set NOT_SUPPORTED shall be the
response.
⌋ ()
[Dlt509] ⌈
Service name: UseExtendedHeader
Service ID [hex] 0x1E
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
none
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
2 exh_status uint8 0 – OFF
1 – ON
Description: Used get the status of DltHeaderUseExtendedHeader
⌋ ()
[Dlt219] ⌈If a unique identification is not possible (this pair does not exist, is not
registered yet) the response shall be NOT_SUPPORTED. ⌋ ()
[Dlt220] ⌈
Service name: CallSW-CInjection
Service ID [hex] 0xFFF ... 0xFFFFFFFF
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
1 data_length uint32 length of the provided data
2 data[] uint8[] data to provide to the SW-C
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
3 == PENDING
Description: Used to call a function in a SW-C. If DltImplementSWCInjection is not set
NOT_SUPPORTED shall be the response.
⌋ ()
[Dlt393] ⌈
Service name: GetSoftwareVersion
Service ID [hex] 0x13
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
2 length uint32 length of the string sw_version
3 sw_version char[] String containing the ECU – Software Version
7.7.7.1.25 MessageBufferOverflow
[Dlt487] ⌈
Service name: MessageBufferOverflow
Service ID [hex] 0x14
:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Request Parameter
Number Name Type Description
Response Parameter
Number Name Type Description
1 Status uint8 0 == OK
1 == NOT_SUPPORTED
2 == ERROR
2 status uint8 0 – no Message BufferOverflow
1 – MessageBufferOverflow was happened
Description: Used to tell that a MessageBufferOverflow happens. This can be requested by a
client. Additionally this message is actively send by Dlt at the point when a
MessageBufferOVervlow happens.
⌋ ()
[Dlt221] ⌈The Dlt module shall send periodically time messages. This time messages
are used to calculate a relative time on the external client and as alive signal. The
period in which the timing messages are sent shall be one second. Timing messages
are send by the Dlt module without request of an external client, but only if a
connection to an external client is established (e.g. a diagnostic session with ROE or
an interface of the Dlt communication module is enabled).⌋ (BSW35000028)
[Dlt222] ⌈A timing message contains no data but the standard and the extended
header. The SEID, APID and CTID fields can be left blank. All other fields shall be
filled with its standard values, especially the Timestamp field. ⌋ ()
To know the SW-Version of the ECU and to associate the correct description file to
the received data an external client shall request the SW-Version from the Dlt
module. Additionally the Dlt module than knows that a new external client has
connected and can empty the message buffer.
[Dlt394] ⌈Each time a connection is established to a Dlt module the control message
“Get ECU Software Version” shall be send from the external client to the Dlt module.
[Dlt395] ⌈If the Dlt module receives a “Get ECU Software Version” control message,
it shall first of all send the response to the "Get ECU SW Version" request.
This should be done for storing the information about the running software of the
ECU in the file on the external client side as first information (first message in file). ⌋
()
[Dlt492] ⌈After the sending of the response to “ECU Software Version” the Dlt
module shall empty its messages buffers by sending the containing messages over
the network. ⌋ ()
The disabling of the usage of message buffering can be done when a connection
less interface like a serial interface is used and the external client is permanently
listening. ⌋ ()
7.8 Debugging
[Dlt442] ⌈The declaration of variables in the header file shall be such, that it is
possible to calculate the size of the variables by C-"sizeof".⌋ ()
[Dlt445] ⌈Dlt shall not detect or report any Production errors. ⌋ (BSW00338)
[Dlt468] ⌈The Dlt Module works completely event driven. The callback routines (the
provide API for other modules and SW-C) generating this events. ⌋ (BSW172)
[Dlt500] ⌈The Dlt module shall perform Inter Module Checks to avoid integration
of incompatible files.
If the values are not identical to the expected values, an error shall be
reported. ⌋ ()
8 API specification
8.1 Overview
BSW /
Dlt_Init
OS
Dlt_GetVersionInfo
Dlt_RegisterContext
SWC over RTE
Dlt_SendLogMessage
Dlt_SendTraceMessage
Dlt_SetLogLevel Dcm_TriggerOnEvent
Dlt_DcmActivateEvent
Dlt_SetTraceStatus DLT
DCM
Dlt_ConditionCheckRead
core Dlt_ReadData
Dlt_ReadDataLengh
module
Trace
Dlt_WriteData
VFB-
Dlt_SendTraceMessage
DET
Dlt_DetForwardErrorTrace
Dlt_DemTriggerOnEventStatus
Dem_GetDTCOfEvent
DEM
Dem_GetEventExtendedDataRecord
Dem_GetEventFreezeFrameData
PDURouter
DLT communication module
Dlt_ComProvideTxBuffer
Ethernet /
Flexray
Dlt_ComProvideRxBuffer
CAN /
core module
Dlt_ComRxIndication
Interface
DLT
XCP
Dlt_ComTxConfirmation
Dlt_ComTransmit
Dlt_ComCancelTransmitRequest
Intercae as
Debug
Serial
CDD
Dlt_ComSetInterfaceStatus
DLT
Figure 21 Internal interfaces between Dlt core module and Dlt communication module. The
implementation of the Dlt communication module is not scope of this specification. The
implementation of Dlt communication module is can be OEM or ECU specific.
In this chapter all types included from the following files are listed. The standard
AUTOSAR types are defined in the AUTOSAR Specification of Standard Types
document [13].
8.3.1 Dlt_ConfigType
[Dlt437] ⌈
Name: Dlt_ConfigType
Type: Structure
Range: implementation The content of the initialization data structure is im-
specific plementation specific
Description: This is the type of the data structure containing the initialization data for Dlt.
⌋ (BSW00414)
8.3.2 Dlt_MessageTypeType
[Dlt224] ⌈
Name: Dlt_MessageTypeType
Type: Enumeration
Range: DLT_TYPE_LOG 0x1: A log message
DLT_TYPE_APP_TRACE 0x2: A trace message
DLT_TYPE_NW_TRACE 0x3: A message forwarded from a communication bus (like
CAN, FlexRay)
DLT_TYPE_CONTROL 0x4: A message for internal use/control send between Dlt
module and external client.
Description: This type describes the type of the message.
⌋ ()
8.3.3 Dlt_SessionIDType
[Dlt225] ⌈
Name: Dlt_SessionIDType
Type: uint
Range: <range of legal - is platform depended, can be set individually (possible
values> - values are uint8, uint16 and uint32)
Description: This type describes the Session ID
⌋ ()
8.3.4 Dlt_ApplicationIDType
[Dlt226] ⌈
Name: Dlt_ApplicationIDType
Type: uint
Range: <range of legal -- is platform depended, can be set individual
values>
Description: This type describes the Application ID
⌋ ()
[Dlt227] ⌈
Name: Dlt_ContextIDType
Type: uint
Range: <range of legal -- is platform depended, can be set individual
values>
Description: This type describe the Context ID
⌋ ()
8.3.6 Dlt_MessageIDType
[Dlt228] ⌈
Name: Dlt_MessageIDType
Type: uint
Range: <range of legal -- is platform depended, can be set individual
values>
Description: contains the unique Message ID for a message
⌋ ()
8.3.7 Dlt_MessageOptionsType
[Dlt229] ⌈
Name: Dlt_MessageOptionsType
Type: uint8
Range: verbose_mode - Bit 3: If set Verbose mode is used (yet not relevant)
-
message_type - Bit 0-2 Dlt_MessageTypeType: determines type of msg
- (log,trace,...)
Description: Bitfield
⌋ ()
8.3.8 Dlt_MessageLogLevelType
[Dlt230] ⌈
Name: Dlt_MessageLogLevelType
Type: Enumeration
Range: DLT_LOG_OFF 0x00: Turn off logging
DLT_LOG_FATAL 0x01: Fatal system error
DLT_LOG_ERROR 0x02: Errors occurring in a SW-C with impact to correct
functionality
DLT_LOG_WARN 0x03 : Log messages where a incorrect behavior can not be
ensured
DLT_LOG_INFO 0x04 : Log messages providing information for better
understanding of the internal behavior of a software
DLT_LOG_DEBUG 0x05 : Log messages, which are usable only for debugging of
a software
DLT_LOG_VERBOSE 0x06 : Log messages with the highest communicative level,
here all possible states, information and everything else can
be logged
Description: This type describes the log level for each log message.
123 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
⌋ ()
8.3.9 Dlt_MessageTraceType
[Dlt231] ⌈
Name: Dlt_MessageTraceType
Type: Enumeration
Range: DLT_TRACE_VARIABLE 0x01: For tracing the value of a variable
DLT_TRACE_FUNCTION_IN 0x02: For tracing the calling of a function
DLT_TRACE_FUNCTION_OUT 0x03: For tracing the returning of a function
DLT_TRACE_STATE 0x04: For tracing a state of a state machine
DLT_TRACE_VFB 0x05: For tracing RTE Events
Description: This type describes labels for trace messages.
⌋ ()
8.3.10 Dlt_MessageControlInfoType
[Dlt232] ⌈
Name: Dlt_MessageControlInfoType
Type: Enumeration
Range: DLT_CONTROL_REQUEST 0x01 : Declares a request of an operation on Dlt module
DLT_CONTROL_RESPONSE 0x02 : Declares a the answer of an request
DLT_CONTROL_TIME 0x03 : Declares a timing message
Description: This type describes the type of a Dlt control message.
⌋ ()
8.3.11 Dlt_MessageNetworkTraceInfoType
[Dlt233] ⌈
Name: Dlt_MessageNetworkTraceInfoType
Type: Enumeration
Range: DLT_NW_TRACE_IPC 0x01 : Inter process communication
DLT_NW_TRACE_CAN 0x02 : CAN communication
DLT_NW_TRACE_FLEXRAY 0x03 : Flexray communication
Description: This type describes transported type of a Dlt BUSMESSAGE.
⌋ ()
[Dlt235] ⌈
Name: Dlt_MessageArgumentCount
Type: uint16
Description: This type describe count of arguments provided to a message (only used if
DltImplementVerboseMode is set)
⌋ ()
[Dlt236] ⌈
Name: Dlt_MessageLogInfoType
Type: Structure
Element: Dlt_MessageArgumentCount arg_count only used if
DltImplementVerboseMode is set
Dlt_MessageLogLevelType log_level --
Dlt_MessageOptionsType options --
Dlt_ContextIDType context_id --
Dlt_ApplicationIDType app_id --
Description: --
⌋ ()
8.3.14 Dlt_MessageTraceInfoType
[Dlt237] ⌈
Name: Dlt_MessageTraceInfoType
Type: Structure
Element: Dlt_MessageTraceType trace_info --
Dlt_MessageOptionsTypeoptions --
Dlt_ContextIDType context --
Dlt_ApplicationIDType app_id --
Description: --
⌋ ()
8.3.15 Dlt_ReturnType
[Dlt238] ⌈
Name: Dlt_ReturnType
Type: Enumeration
Range: E_OK No error
DLT_E_INT_BUFFER_FULL It is not possible to trace the message since the
internal Dlt buffer is full.
DLT_E_MSG_TOO_LARGE The message is too big for the internal Dlt buffer.
DLT_E_CONTEXT_ALREADY_REG The software module context has already
registered.
DLT_E_UNKNOWN_SESSION_ID Unknown session id.
DLT_E_IF_NOT_AVAILABLE The interface is not available.
DLT_E_IF_BUSY The interface is busy
DLT_E_ERROR_UNKNOWN An unknown error is occurred
Description: --
⌋ (BSW00377)
8.4.1.1 Dlt_Init
[Dlt239] ⌈
Service name: Dlt_Init
Syntax: void Dlt_Init(
const Dlt_ConfigType* config
)
Service ID[hex]: 0x01
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): config Pointer to a DLT configuration structure
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Dlt is using the NVRamManager and is to be initialized very late in the ECU
startup phase. The Dlt_Init() function should be called after the NVRamManager
is initialed."
⌋ (BSW00344, BSW00404, BSW00405, BSW101, BSW00407, BSW00358,
BSW00414)
8.4.1.2 Dlt_GetVersionInfo
[Dlt271] ⌈
Service name: Dlt_GetVersionInfo
Syntax: void Dlt_GetVersionInfo(
Std_VersionInfoType* versioninfo
)
Service ID[hex]: 0x02
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.
⌋ (BSW00402)
8.4.2.1 Dlt_SendLogMessage
[Dlt241] ⌈
Service name: Dlt_SendLogMessage
Syntax: Dlt_ReturnType Dlt_SendLogMessage(
Dlt_SessionIDType session_id,
126 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
const Dlt_MessageLogInfoType* log_info,
const uint8* log_data,
uint16 log_data_length
)
Service ID[hex]: 0x03
Sync/Async: Synchronous
Reentrancy: Reentrant
session_id For SW-C this is not visible (Port defined argument value), for
BSW-modules it is the module number
log_info Structure containing the relevant information for filtering the
message.
Parameters (in):
log_data Buffer containing the parameters to be logged.
The contents of this pointer represents the payload of the send
log message
log_data_length Length of the data buffer log_data.
Parameters None
(inout):
Parameters (out): None
Dlt_ReturnType DLT_E_MSG_TOO_LARGE - The message is to large for
sending over the network
Return value:
DLT_E_BUFFER_ERROR - Buffer for new Messages is full.
E_OK - The required operation succeeded.
Description: The service represents the interface to be used by basic software modules or by
software component to send log messages.
⌋ (BSW35000003)
[Dlt242] ⌈The payload (log_data) shall contain the complete payload of the Dlt log
message (compare chapter 7.7.5). This means that the structure and the contents of
the provided memory in log_data shall completely compliant to the Dlt protocol
payload specification. ⌋ ()
8.4.2.2 Dlt_SendTraceMessage
[Dlt243] ⌈
Service name: Dlt_SendTraceMessage
Syntax: Dlt_ReturnType Dlt_SendTraceMessage(
Dlt_SessionIDType session_id,
const Dlt_MessageTraceInfoType* trace_info,
const uint8* trace_data,
uint16 trace_data_length
)
Service ID[hex]: 0x04
Sync/Async: Synchronous
Reentrancy: Reentrant
session_id --
trace_info Structure containing the relevant information for filtering the
message.
Parameters (in):
trace_data Buffer containing the parameters to be traced. The contents of
this pointer represents the payload of the send log message
trace_data_lengthLength of the data buffer trace_data
Parameters None
(inout):
Parameters (out): None
Dlt_ReturnType DLT_E_MSG_TOO_LARGE - The message is to large for
Return value:
sending over the network
127 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
DLT_E_BUFFER_ERROR - Buffer for new Messages is full.
E_OK - The required operation succeeded.
Description: The service represents the interface to be used by basic software modules or by
software component to trace parameters.
⌋ (BSW35000003)
[Dlt244] ⌈The payload (trace_data) shall contain the complete payload of the Dlt log
message (compare chapter 7.7.5). This means that the structure and the contents of
the provided memory in trace_data shall completely compliant to the Dlt protocol
payload specification. ⌋ ()
8.4.2.3 Dlt_RegisterContext
[Dlt245] ⌈
Service name: Dlt_RegisterContext
Syntax: Dlt_ReturnType Dlt_RegisterContext(
Dlt_SessionIDType session_id,
Dlt_ApplicationIDType app_id,
Dlt_ContextIDType context_id,
const uint8* app_description,
uint8 len_app_description,
const uint8* context_description,
uint8 len_context_description
)
Service ID[hex]: 0x05
Sync/Async: Synchronous
Reentrancy: Reentrant
session_id number of the module (Module ID within BSW, Port
defined argument value within SW-C)
app_id the Application ID
context_id the Context ID
app_description Points to description string for the provided application
id. At maximum 255 characters are interpreted.
Parameters (in):
len_app_description The length of the description for the application id string
(number of characters of description string).
context_description Points to description string for the provided context. At
maximum 255 characters are interpreted.
len_context_description The length of the description string (number of
characters of description string).
Parameters None
(inout):
Parameters (out): None
Dlt_ReturnType DLT_E_CONTEXT_ALREADY_REG - The software
module context has already registered.
Return value:
E_OK - The required operation succeed.
Description: The service has to be called when a software module wants to use services
offered by DLT software component for a specific context. If a context id is being
registered for an already registered application id then app_description can be
NULL and len_app_description zero.
⌋ (BSW35000033)
8.4.2.5 Dlt_DemTriggerOnEventStatus
[Dlt470] ⌈
Service name: Dlt_DemTriggerOnEventStatus
Syntax: void Dlt_DemTriggerOnEventStatus(
Dem_EventIdType EventId,
Dem_EventStatusExtendedType EventStatusOld,
Dem_EventStatusExtendedType EventStatusNew
)
Service ID[hex]: 0x15
Sync/Async: Synchronous
Reentrancy: Reentrant
EventId Identification of an Event by assigned event number. The Event
Number is configured in the Dem.
Min.: 1 (0: Indication of no Event or Failure) Max.: Result of
Parameters (in): configuration of Event Numbers in Dem (Max is either 255 or
65535)
EventStatusOld Extended event status before change
EventStatusNew Detected / reported of event status
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This service is provided by the Dem in order to call Dlt upon status changes.
⌋ (BSW35000007)
8.4.3.1 Dlt_DetForwardErrorTrace
[Dlt432] ⌈
Service name: Dlt_DetForwardErrorTrace
Syntax: void Dlt_DetForwardErrorTrace(
uint16 ModuleId,
uint8 InstanceId,
uint16 ApiId,
uint8 ErrorId
)
Service ID[hex]: 0x07
Sync/Async: Synchronous
Reentrancy: Non Reentrant
ModuleId Module ID of calling module.
InstanceId The identifier of the index based instance of a module, starting from 0, If
the module is a single instance module it shall pass 0 as the InstanceId.
Parameters (in): ApiId ID of API service in which error is detected
(defined in SWS of calling module)
ErrorId ID of detected development error
(defined in SWS of calling module).
Parameters None
8.4.4.1 Dlt_ActivateEvent
[Dlt488] ⌈
Service name: Dlt_ActivateEvent
Syntax: Std_ReturnType Dlt_ActivateEvent(
uint8 RoeEventID,
Dcm_RoeStateType RoeState
)
Service ID[hex]: 0x11
Sync/Async: Synchronous
Reentrancy: Non Reentrant
RoeEventID The eventID to use for the ResponseOnEvent (0x86). This
eventId shall be used within the Dcm_TriggerOnEvent()
Parameters (in):
function called by Dlt."
RoeState --
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK - call succeeded
Return value:
E_NOT_OK - call has some errors
Description: This function is called by the Dcm if a specific ResponseOnEvent is enabled by a
user. The RoeEventID shall be used by the Dlt to notify the Dcm about some
actions to do for the ROE service. Normally for the Dlt module, only the
ReadDataByIdendifer (0x22) should be used for ROE.
In addition, when a specific ROE for the Dlt module is disabled/turned off by a
user, the Dlt module is notified with this function.
⌋ ()
8.4.4.2 Dlt_ReadData
[Dlt247] ⌈
Service name: Dlt_ReadData
Syntax: Std_ReturnType Dlt_ReadData(
Dcm_OpStatusType OpStatus,
uint8* data
)
Service ID[hex]: 0x08
Sync/Async: Synchronous
Reentrancy: Non Reentrant
OpStatus See description of Dcm_OpStatusType in
Parameters (in):
AUTOSAR_SWS_DCM.
Parameters None
130 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
(inout):
Parameters (out): data Contains a complete Dlt message
Std_ReturnType E_OK - call succeeded
E_PENDING - application process not yet completed, another call
Return value:
is required
E_NOT_OK - call has some errors
Description: Is called from Dcm when UDS service ReadDataByIdendifer for Dlt DID is called.
⌋ ()
8.4.4.3 Dlt_ReadDataLength
[Dlt248] ⌈
Service name: Dlt_ReadDataLength
Syntax: Std_ReturnType Dlt_ReadDataLength(
uint16* DataLength
)
Service ID[hex]: 0x09
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): None
Parameters None
(inout):
DataLength Data length of the DID to read by Dcm (This is the Dlt message
Parameters (out):
length since only Dlt message are transmitted)
Std_ReturnType E_OK - call succeeded
Return value:
E_NOT_OK - call has some errors
Description: Is called from Dcm when UDS service ReadDataByIdendifer for Dlt DID is called.
⌋ ()
8.4.4.4 Dlt_WriteData
[Dlt249] ⌈
Service name: Dlt_WriteData
Syntax: Std_ReturnType Dlt_WriteData(
uint8* data,
uint16 dataLength,
Dcm_OpStatusType OpStatus,
Dcm_NegativeResponseCodeType* ErrorCode
)
Service ID[hex]: 0x0a
Sync/Async: Synchronous
Reentrancy: Non Reentrant
data data to write (Shall contain a complete Dlt message send from a
external client by using WriteDataByIdendifer)
Parameters (in): dataLength length of data to write by Dcm
OpStatus See description of Dcm_OpStatusType in
AUTOSAR_SWS_DCM.
Parameters None
(inout):
Parameters (out): ErrorCode --
Std_ReturnType E_OK - call succeeded
Return value:
E_PENDING - application process not yet completed, another call
131 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
is required
E_NOT_OK - call has some errors
Description: Is called from Dcm when UDS service WriteDataByIdendifer for Dlt DID is called.
⌋ ()
8.4.4.5 Dlt_ConditionCheckRead
[Dlt428] ⌈
Service name: Dlt_ConditionCheckRead
Syntax: Std_ReturnType Dlt_ConditionCheckRead(
Dcm_OpStatusType OpStatus,
Dcm_NegativeResponseCodeType* ErrorCode
)
Service ID[hex]: 0x0b
Sync/Async: Synchronous
Reentrancy: Non Reentrant
OpStatus See description of Dcm_OpStatusType in
Parameters (in):
AUTOSAR_SWS_DCM.
Parameters None
(inout):
Parameters (out): ErrorCode See description in Dcm service component
Std_ReturnType E_OK - call succeeded
E_PENDING - application process not yet completed, another
Return value:
call is required
E_NOT_OK - call has some errors
Description: Is called from Dcm when UDS service ReadDataByIdendifer for Dlt DID is called to
see if Dlt_ReadData can be called.
⌋ ()
8.4.5 Interfaces provided by Dlt core module for internal use with Dlt
communication module
8.4.5.1 Dlt_ComProvideRxBuffer
[Dlt250] ⌈
Service name: Dlt_ComProvideRxBuffer
Syntax: BufReq_ReturnType Dlt_ComProvideRxBuffer(
PduIdType DltRxPduId,
PduLengthType TpSduLength,
PduInfoType** PduInfoPtr
)
Service ID[hex]: 0x0d
Sync/Async: Synchronous
Reentrancy: Non Reentrant
DltRxPduId Identifies the Dlt data to be received. This information is
Parameters (in): used within Dlt to distinguish two or more receptions at the
same time.
TpSduLength This length identifies the overall number of bytes to be
Parameters
received.
(inout):
The length shall be greater than zero.
132 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
PduInfoPtr Pointer to pointer to PduInfoStructure containing data
Parameters (out):
pointer and length of a receive buffer.
BufReq_ReturnType BUFREQ_OK - Buffer request accomplished successful.
BUFREQ_E_NOT_OK - Buffer request not successful.
Buffer cannot be accessed by TP.
Return value:
BUFREQ_E_BUSY - No buffer is available at the moment.
BUFREQ_E_OVFL - Dcm is not capable to receive the
number of TpSduLength Bytes.
Description: By this service the Dlt core module is requested to provide a buffer for a transport
layer on first frame or single frame reception.
Within this function Dlt shall provide a pointer to a PduInfoStructure that contains a
pointer to an SDU buffer and the length of this buffer. This information shall be
passed via the output parameter **PduInfoPtr.
By this service the receiver (e.g. Dcm) is also informed implicitly about a first frame
reception or a single frame reception.
If a return value not equal to BUFREQ_E_OK is returned, the values of the out
Parameters are not specified and shall not be evaluated.
⌋ (BSW35000034)
8.4.5.2 Dlt_ComProvideTxBuffer
[Dlt251] ⌈
Service name: Dlt_ComProvideTxBuffer
Syntax: BufReq_ReturnType Dlt_ComProvideTxBuffer(
PduIdType DltTxPduId,
PduInfoType** PduInfoPtr,
uint16 Length
)
Service ID[hex]: 0x0e
Sync/Async: Synchronous
Reentrancy: Non Reentrant
DltTxPduId Identifies the Dlt data to be sent. This information is used to
derive the PCI information within the transport protocol. The
value has to be same as in the according service call
Dlt_ComTransmit().
Length This is the minimum length given in bytes of the buffer
requested from Dlt. The minimum length is needed by the
Parameters (in): transport protocol to perform error recovery mechanisms.
The value of this parameter shall not exceed the number of
Bytes still to be sent.
A length of zero indicates that the length of the buffer can
be of arbitrary size (larger than zero).
The Length parameter is expected by Dcm to be always 0
(zero).
Parameters None
(inout):
PduInfoPtr Pointer to pointer to PduInfoStructure containing data
pointer and length of a transmit buffer.
Parameters (out):
This length must not be smaller than the length given by
Length.
BufReq_ReturnType BUFREQ_OK - Buffer request accomplished successful.
BUFREQ_E_NOT_OK - Buffer request not successful.
Return value: Buffer cannot be accessed by TP.
BUFREQ_E_BUSY - Dlt temporarily cannot provide a buffer
of the requested length.
Description: By this service Dlt is requested to provide a buffer containing data to be
133 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
transmitted via a transport protocol.
The length of the buffer does not need to be in the length of Dlt SDU to be
transmitted. It only needs to be as large as required by the caller of that service
(Length).
If the returned buffer is smaller than the length requested to transmit within the
service Dlt_ComTransmit() Dlt will be requested by this service to provide another
buffer after the data of the current buffer have been transmitted.
If Dlt can provide a buffer of the size Length or larger, this service returns
BUFREQ_OK.
If Dlt cannot provide a buffer of the size Length, or larger (except Length is equal
zero) and the service returns with BUFREQ_E_NOT_OK.
If Dlt temporarily cannot provide a buffer of the requested length, the service
returns with BUFREQ_E_BUSY. This service has to be called again during next
processing of the MainFunction of the transport protocol
Caveats:
After returning a valid buffer, Dlt must not access this buffer unless it is requested
to provide a new buffer by this service for the same DltTxPduId or it is notified
about the successful transmission (confirmation) or it is notified by an error
indicating that the transmission was aborted (error indication).
If this service returns BUFREG_E_NOT_OK the transmit requests issued by
calling the service Dlt_ComTransmit is still not finished. A final confirmation
(indicating an error) is required to finish this service and to start a subsequent
request by calling Dlt_ComTransmit. So it is up to the transport protocol if the
transmission is aborted on BUFREQ_E_NOT_OK or not.
⌋ (BSW35000034)
8.4.5.3 Dlt_ComRxIndication
[Dlt272] ⌈
Service name: Dlt_ComRxIndication
Syntax: void Dlt_ComRxIndication(
PduIdType DltRxPduId,
NotifResultType Result
)
Service ID[hex]: 0x0f
Sync/Async: Synchronous
Reentrancy: Non Reentrant
DltRxPduId ID of DLT I-PDU that has been received. Identifies the data that has
been received.
Range: 0..(maximum number of I-PDU IDs received by DLT) 1
Parameters (in): Result Result of the N-PDU reception:
- NTFRSLT_OK if the complete N-PDU has been received.
- NTFRSLT_E_NOT_OK if an error occurred during reception, used
to enable unlocking of the receive buffer.
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This function is called by the Dlt communication module:
- with Result = NTFRSLT_OK after the complete Dlt I-PDU has successfully been
received, i.e. at the very end of the segmented TP receive cycle or after receiving
an unsegmented N-PDU.
- with Result = NTFRSLT_E_NOT_OK it is indicated that an error (e.g. timeout)
has occurred during the reception of the Dlt I-PDU. This passes the receive buffer
back to Dlt and allows error handling. It is undefined which part of the buffer
contains valid data in this case, so Dlt shall not evaluate that buffer.
134 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
By calling this service only Dlt is allowed to access the buffer.
Caveats:
This function might be called in interrupt context. If an existing reception has to be
canceled to establish a new reception it is required to indicate a cancellation first
before requesting a buffer for the new reception. Otherwise Dlt will be requested to
open a second connection.
⌋ (BSW35000034)
8.4.5.4 Dlt_ComTxConfirmation
[Dlt273] ⌈
Service name: Dlt_ComTxConfirmation
Syntax: void Dlt_ComTxConfirmation(
PduIdType DltTxPduId,
NotifResultType Result
)
Service ID[hex]: 0x10
Sync/Async: Synchronous
Reentrancy: Non Reentrant
DltTxPduId ID of Dlt I-PDU that has been transmitted.
Range: 0..(maximum number of I-PDU IDs transmitted by Dcm) - 1
Result Result of the N-PDU transmission:
- NTFRSLT_OK if the complete N-PDU has been transmitted.
- NTFRSLT_E_NOT_OK if an error occurred during transmission, used
Parameters (in):
to enable unlocking of the transmit buffer.
- NTFRSLT_E_CANCELATION_OK if the N-PDU has been
successfully cancelled
- NTFRSLT_E_CANCELATION_NOT_OK if an error occurred when
cancelling the N-PDU
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This function is called by the Dlt communication module:
- with Result = NTFRSLT_OK after the complete Dlt I-PDU has successfully been
transmitted, i.e. at the very end of the segmented TP transmit cycle. Within
this function, Dlt shall unlock the transmit buffer.
- with Result = NTFRSLT_E_NOT_OK if an error (e.g. timeout) has occurred
during
the transmission of the Dlt I-PDU. This enables unlocking of the transmit
buffer. The I-PDU can be rejected and an error reporting may be done. Error
handling is up to the PduRouter.
- with Result = NTFRSLT_E_CANCELATION_OK if the N-PDU has been
successfully
cancelled after a request with Dlt_ComCancelTransmitRequest()
- with Result = NTFRSLT_E_CANCELATION_NOT_OK if an error occurred when
cancelling the N-PDU after a request with Dlt_ComCancelTransmitRequest()
Caveats:
This function might be called in interrupt context (e.g. from a transmit interrupt).
However, for transmission via FlexRay there is a restriction:
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.
⌋ (BSW35000034)
8.5.1.1 Dlt_SetLogLevel
[Dlt252] ⌈
Service name: Dlt_SetLogLevel_<SESSION>
Syntax: void Dlt_SetLogLevel_<SESSION>(
Dlt_ApplicationIDType app_id,
Dlt_ContextIDType context_id,
Dlt_MessageLogLevelType loglevel
)
Service ID[hex]: 0x11
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
app_id the Application ID
Parameters (in): context_id the Context ID
loglevel the new log level of the context
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Callback Is called by Dlt to inform the SW-C of a new log level status of a given
context.
⌋ (BSW35000004, BSW35000038)
[Dlt253] ⌈This function shall be provided by a SW-C and is called from Dlt when the
trace status for the given pair of Application ID and Context ID changes. ⌋ ()
8.5.1.2 Dlt_SetTraceStatus
[Dlt254] ⌈
Service name: Dlt_SetTraceStatus_<SESSION>
Syntax: void Dlt_SetTraceStatus_<SESSION>(
Dlt_ApplicationIDType app_id,
Dlt_ContextIDType context_id,
boolean new_trace_status
)
Service ID[hex]: 0x12
136 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
app_id the Application ID
context_id the Context ID
Parameters (in):
new_trace_status the new trace_status for the pair of Application ID and Context
ID
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Callback Is called by Dlt to inform the SW-C of a new log level status of a given
context.
⌋ (BSW35000004, BSW35000038)
[Dlt255] ⌈This function shall be provided by a SW-C and is called from Dlt when the
trace status for the given pair of Application ID and Context ID changes. ⌋ ()
8.5.1.3 Dlt_SetVerboseMode
[Dlt256] ⌈
Service name: Dlt_SetVerboseMode_<SESSION>
Syntax: void Dlt_SetVerboseMode_<SESSION>(
Dlt_ApplicationIDType app_id,
Dlt_ContextIDType context_id,
boolean is_verbose_mode
)
Service ID[hex]: 0x13
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
app_id the Application ID
context_id the Context ID
Parameters (in):
is_verbose_mode if true, Verbose Mode is enabled, if false Verbose Mode is
disabled
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Callback Is called by Dlt to inform the SW-C of a change of the verbose mode.
⌋ ()
[Dlt258] ⌈This function shall be provided by a SW-C and is called from Dlt when the
Verbose Mode changes. ⌋ ()
8.5.1.4 Dlt_InjectCall
[Dlt259] ⌈
137 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
Service name: Dlt_InjectCall_<SESSION>
Syntax: void Dlt_InjectCall_<SESSION>(
Dlt_ApplicationIDType app_id,
Dlt_ContextIDType context_id,
uint32 service_id,
uint32 data_length,
const uint8* data
)
Service ID[hex]: 0x14
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
app_id the Application ID
context_id the Context ID
service_id the service ID for the injection (user defined)
Parameters (in):
data_length length of the data puffer provided
data pointer to data puffer with data belonging to the injection (service
ID). The contents of the data is user defined
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Callback Is called by Dlt to inject a function call in the SW-C. The behaviour
trigged by this function should depend on the service_id also the interpretation of
the user data. Both are specific to the application.
⌋ ()
[Dlt261] ⌈This function shall be provided by a SW-C and is called from Dlt when the
Verbose Mode changes. ⌋ ()
8.6.1.1 Dcm_TriggerOnEvent
[Dlt262] ⌈
Service name: Dcm_TriggerOnEvent
Syntax: void Dcm_TriggerOnEvent (uint8 eventID
)
Service ID [hex]:
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): uint8 eventID
8.6.2.1 Dlt_ComTransmit
[Dlt263] ⌈
Service name: DltCom_Transmit
Syntax: Std_ReturnType DltCom_Transmit(
PduIdType DltTxPduId,
PduInfoType* PduInfoPtr
)
Service ID[hex]: 0x12
Sync/Async: Synchronous
Reentrancy: Non Reentrant
DltTxPduId ID of Dlt I-PDU to be transmitted. Range: 0..(maximum number of
I-PDU IDs which may be transmitted by Dcm) - 1
Parameters (in):
PduInfoPtr Pointer to a structure with I-PDU related data that shall be
transmitted: data length and pointer to I-SDU buffer
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Transmit request has been accepted
Return value:
E_NOT_OK: Transmit request has not been accepted
Description: The Dlt communication module requests a transmission for the Dlt core module.
⌋ (BSW35000034)
8.6.2.2 Dlt_ComCancelTransmitRequest
[Dlt264] ⌈
Service name: Dlt_ComCancelTransmitRequest
Syntax: Std_ReturnType Dlt_ComCancelTransmitRequest(
PduIdType PduId
)
Service ID[hex]: 0x13
Sync/Async: Synchronous
Reentrancy: Non Reentrant
PduId This parameter contains the unique identifier of the I-PDU which
Parameters (in):
transfer has to be cancelled.
Parameters None
(inout):
Parameters (out): None
Return value: Std_ReturnType E_NOT_OK: Cancellation request of the transfer of the specified
139 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
I-PDU is rejected, e. g. cancellation is requested at the receiver
in an 1:n connection or in an unsegmented transfer at the receiver
or cancellation is not allowed for the corresponding channel.
[Dlt485] ⌈The call to this this function should be forwarded to the PDU-Router
function
PduR_CancelTransmitRequest (see [2]). At this time the reason for cancelling should
be provided. ⌋ ()
8.6.2.3 Dlt_ComSetInterfaceStatus
[Dlt265] ⌈
Service name: DltCom_SetInterfaceStatus
Syntax: Dlt_ReturnType DltCom_SetInterfaceStatus(
uint8[4] com_interface,
uint8 new_status
)
Service ID[hex]: 0x14
Sync/Async: Synchronous
Reentrancy: Non Reentrant
com_interface To interpret as a name for a interface
Possible values are
"DCM" - Interface to the Dcm (Diagnostic Interface)
For the Dlt communication module user defined values are
Parameters (in):
allowed, e.g.:
"SER1", "eth0"
new_status 0 - OFF
1 - ON
Parameters None
(inout):
Parameters (out): None
Dlt_ReturnType E_OK - Succeded
DLT_E_IF_BUSY - The interface is busy
Return value:
DLT_E_IF_NOT_AVAILABLE - The interface to change the state
is not available
Description: --
⌋ (BSW35000034)
[Dlt495] ⌈
ClientServerInterface DLTServicel{
PossibleErrors {
E_OK = 0,
E_NOT_OK = 1,
140 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
};
Dlt_ReturnType Dlt_SendLogMessage (
IN Dlt_SessionIDType session_id,
IN Dlt_MessageLogInfoType log_info,
IN uint8 *log_data,
IN uint16 log_data_length,
ERR{E_OK,E_NOT_OK});
Dlt_ReturnType Dlt_SendTraceMessage (
IN Dlt_SessionIDType session_id,
IN Dlt_MessageTraceInfoType trace_info,
IN uint8 * trac_data,
IN uint16 trace_data_length,
ERR{E_OK,E_NOT_OK});
Dlt_RetrunType Dlt_RegisterContext (
IN Dlt_SessionIDType session_id,
IN Dlt_ApplicationIDType app_id,
IN Dlt_ContextIDType context_id,
IN uint8 * description,
IN uint8 len_description,
ERR{E_OK,E_NOT_OK});
}
⌋ ()
[Dlt496] ⌈
ClientServerInterface LogTraceSessionControl{
PossibleErrors {
E_OK = 0,
E_NOT_OK = 1,
};
Dlt_SetLogLevel (
IN Dlt_ApplicationIDType app_id,
IN Dlt_ContextIDType context_id,
IN Dlt_MessageLogLevelType loglevel,
ERR{E_OK,E_NOT_OK});
Dlt_SetTraceStatus (
IN Dlt_ApplicationIDType app_id,
IN Dlt_ContextIDType context_id,
IN boolean new_trace_status,
ERR{E_OK,E_NOT_OK});
}
⌋ ()
[Dlt497] ⌈
Only connected by Dlt if DltImplementVerboseMode is set.
ClientServerInterface VerboseModeControl{
PossibleErrors {
E_OK = 0,
E_NOT_OK = 1,
};
Dlt_SetVerboseMode (
IN Dlt_ApplicationIDType app_id,
141 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
IN Dlt_ContextIDType context_id,
IN boolen is_verbose_mode,
ERR{E_OK,E_NOT_OK});
}
⌋ ()
[Dlt498] ⌈
Only connected by Dlt if DltImplementSWCInjection is set.
ClientServerInterface InjectionCallback{
PossibleErrors {
E_OK = 0,
E_NOT_OK = 1,
};
Dlt_InjectCall (
IN Dlt_ApplicationIDType app_id,
IN Dlt_ContextIDType context_id,
IN uint32 service_id,
IN uint32 data_length,
IN uint8 * data,
ERR{E_OK,E_NOT_OK}
);
}
⌋ ()
[Dlt499] ⌈
Service Dlt
{
// "nnn" below is number of ports using the service
RequirePort LogTraceSessionControl PSCN000;
...
RequirePort LogTraceSessionControl PSCNnnn;
InternalBehavior
{
RunnableEntity LogMessage
symbol "Dlt_SendLogMessage "
canbeInvokedConcurrently = TRUE
RunnableEntity TraceMessage
symbol "Dlt_SendTraceMessage "
};
};
⌋ ()
9 Sequence diagrams
Comment:
Initialization of
«module» DLT is performed «module»
EcuM synchronously Dlt :Dlt
Dlt_Init(const
Dlt_ConfigType*)
Dlt_RegisterContext(Dlt_ReturnType, Dlt_SessionIDType,
Dlt_ApplicationIDType, Dlt_ContextIDType, const uint8*, Register
uint8, const uint8*, uint8) application and
context
Dlt_SetLogLevel_<SESSION>(Dlt_ApplicationIDType,
Dlt_ContextIDType, Dlt_MessageLogLevelType)
Set up diagnostic
DiagnosticSessionControl session
(UDS SID 0x10)
SecurityAccess
(UDS SID 0x27)
ReadDataByIdentifier(UDS SID
0x22)
Dlt_ConditionCheckRead(Std_ReturnType ,
Dcm_OpStatusType, Dcm_NegativeResponseCodeType**)
Getting the result of
the Dlt control message
Dlt_ReadDataLength(Std_ReturnType,
uint16**)
Dlt_ReadData(Std_ReturnType,
Dcm_OpStatusType, uint8**)
Dlt_RegisterContext(Dlt_ReturnType,
Dlt_SessionIDType, Dlt_ApplicationIDType,
Dlt_ContextIDType, const uint8*, uint8,
const uint8*, uint8)
Register
application and
Dlt_SetLogLevel_<SESSION>(Dlt_ApplicationIDType, context
Dlt_ContextIDType, Dlt_MessageLogLevelType)
Set up diagnostic
session
SecurityAccess (UDS SID
0x27)
ResponseOnEvent (0x86 )(
for ReadDataByIdentifier Set up a
Response on
0x22)
Event Window
Dlt_DcmActivateEvent(boolean,
uint8)
Open event
window
loop
Dlt_SendLogMessage(Dlt_ReturnType,
Dlt_SessionIDType, const Dlt_MessageLogInfoType*,
const uint8*, uint16)
Dcm_TriggerEvent(eventID)
Dlt_ConditionCheckRead(Std_ReturnType ,
Dcm_OpStatusType, Dcm_NegativeResponseCodeType**)
Dlt_ReadDataLength(Std_ReturnType,
uint16**)
Dlt_ReadData(Std_ReturnType,
Dcm_OpStatusType, uint8**)
ReadDataByIdentifier
(UDS SID 0x22)
Dlt_DcmActivateEvent(boolean,
uint8)
Close event
window
loop
Dlt_SendTraceMessage(Dlt_ReturnType, Dlt_SessionIDType, Send periodically
const Dlt_MessageTraceInfoType*, const uint8*, uint16) VFB trace
messages
DltCom_Transmit(PduIdType,
PduInfoType*, Std_ReturnType)
Dlt_ComTxConfirmation(PduIdType,
NotifResultType)
Dlt_RegisterContext(Dlt_ReturnType, Dlt_SessionIDType,
Register
Dlt_ApplicationIDType, Dlt_ContextIDType, const uint8*,
application and
uint8, const uint8*, uint8)
context
Dlt_SetLogLevel_<SESSION>(Dlt_ApplicationIDType,
Dlt_ContextIDType, Dlt_MessageLogLevelType)
Set up diagnostic
DiagnosticSessionControl (UDS SID 0x10)
session
Dcm_TriggerEvent(eventID)
Dcm_TriggerEvent(eventID)
Dlt_ConditionCheckRead(Std_ReturnType , Dcm_OpStatusType,
Dcm_NegativeResponseCodeType**)
Dlt_ReadDataLength(Std_ReturnType,
uint16**)
Dlt_RegisterContext(Dlt_ReturnType,
Dlt_SessionIDType, Register
Dlt_ApplicationIDType, application and
Dlt_ContextIDType, const uint8*, context
uint8, const uint8*, uint8)
Dlt_SetLogLevel_<SESSION>(Dlt_ApplicationIDType,
Dlt_ContextIDType, Dlt_MessageLogLevelType)
Dlt_ComRxIndication(PduIdType,
NotifResultType)
Dlt_SetLogLevel_<SESSION>(Dlt_ApplicationIDType,
Dlt_ContextIDType, Dlt_MessageLogLevelType)
loop
Dlt_SendLogMessage(Dlt_ReturnType, Dlt_SessionIDType,
const Dlt_MessageLogInfoType*, const uint8*, uint16)
Send periodically
DLT log message
DltCom_Transmit(PduIdType, over DLT
PduInfoType*, Std_ReturnType) communication
module
Figure 27: Sequence Dlt interaction only over Dlt communication module
Dlt_DemTriggerOnEventStatus(Dem_EventStatusExtendedType,
Dem_EventStatusExtendedType, Dem_EventIdType)
Dem_GetDTCOfEvent(Std_ReturnType,
Dem_EventIdType, Dem_DTCKindType, uint32**)
loop
Dem_DltGetMostRecentFreezeFrameRecordData(Std_ReturnType,
Dem_EventIdType, uint8**, uint8**)
loop
Dem_DltGetAllExtendedDataRecords(Std_ReturnType,
Dem_EventIdType, uint8**, uint8**)
10 Configuration specification
In general, this chapter defines configuration parameters and their clustering into
containers. In order to support the specification Chapter 10.1 describes
fundamentals. It also specifies a template (table) you shall use for the parameter
specification. We intend to leave Chapter 10.1 in the specification to guarantee
comprehension.
Chapter 10.2 specifies the structure (containers) and the parameters of the module
Dlt.
The following is only a short survey of the topic and it will not replace the ECU
Configuration Specification document.
10.1.2 Variants
Please note: This pre-compile configuration parameters are mandatory for all
variants. The pre-compile parameter shall be used to enable or disable Dlt
functionality or are Dlt global configuration data that shall be configured at pre
complile time (e.g. memory influence). ⌋ ()
10.1.3 Containers
Label Description
x The configuration parameter shall be of configuration class Pre-compile time.
-- The configuration parameter shall never be of configuration class Pre-compile time.
Label Description
x The configuration parameter shall be of configuration class Link time.
-- The configuration parameter shall never be of configuration class Link time.
Label Description
The configuration parameter shall be of configuration class Post Build and no specific
x
implementation is required.
Loadable - the configuration parameter shall be of configuration class Post Build and only
L
one configuration parameter set resides in the ECU.
Multiple - the configuration parameter shall be of configuration class Post Build and is
M selected out of a set of multiple parameters by passing a dedicated pointer to the init
function of the module.
-- The configuration parameter shall never be of configuration class Post Build.
DltVfbTrace :
+container EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
DltMultipleConfigurationContainer :
+subContainer DltBandwidth :
EcucParamConfContainerDef
EcucParamConfContainerDef
+container
multipleConfigurationContainer = true +subContainer DltProtocol :
EcucParamConfContainerDef
+subContainer DltMessageFiltering :
EcucParamConfContainerDef
Nvm
NvMBlockDescriptor :
EcucParamConfContainerDef
+reference DltNvRamBlockRef : +destination
EcucSymbolicNameReferenceDef upperMultiplicity = 65536
lowerMultiplicity = 1
(from Nvm)
+parameter
NvMNvramBlockIdentifier :
EcucIntegerParamDef
symbolicNameValue = true
min = 2
max = 65535
(from Nvm)
10.2.1 Dlt
Included Containers
Container Name Multiplicity Scope / Dependency
DltGeneral 1 Flags for adding removing functionality from code.
Configuration parameters for reserving memory for some
DltMemory 1
internal storing and buffer.
DltMultipleConfigurationContaine Container holding the sub-structure for multiple
1
r configuration support.
DltVfbTrace 0..* All functions to trace from the VFB by the Dlt.
DltGeneral :
+parameter DltDevErrorDetect :
EcucParamConfContainerDef
EcucBooleanParamDef
+parameter DltImplementFilterMessages :
EcucBooleanParamDef
+parameter DltImplementTimestamp :
EcucBooleanParamDef
+parameter DltImplementExtendedHeader :
EcucBooleanParamDef
+parameter DltImplementVerboseMode :
EcucBooleanParamDef
+parameter DltImplementSWCInjection :
EcucBooleanParamDef
+parameter DltImplementAppIdContextIdQuery :
EcucBooleanParamDef
+parameter DltImplementVfbTrace :
EcucBooleanParamDef
DltVfbTraceLogLevel :
+parameter EcucIntegerParamDef
min = 0
+parameter DltImplementNVRamStorage :
max = 6
EcucBooleanParamDef
Gpt
+reference DltGptChannel : +destination GptChannelConfiguration : GptChannelId :
EcucSymbolicNameReferenceDef EcucParamConfContainerDef +parameter EcucIntegerParamDef
upperMultiplicity = * min = 0
lowerMultiplicity = 1 max = 4294967295
symbolicNameValue = true
(from GPT)
(from GPT)
10.2.2 DltGeneral
No Included Containers
158 of 170 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
- AUTOSAR confidential -
Specification of Diagnostic Log and Trace
V1.2.0
R4.0 Rev 3
DltMemory : DltMessageBufferSize :
EcucParamConfContainerDef +parameter EcucIntegerParamDef
min = 0
max = 4294967295 DltInitBufferSize :
+parameter EcucIntegerParamDef
DltMaxCountAppIds : min = 0
+parameter EcucIntegerParamDef max = 4294967295
min = 1
max = 4294967295 DltMaxCountContextIds :
+parameter EcucIntegerParamDef
min = 1
+parameter DltMaxCountContextIdsPerAppId :
max = 4294967295
EcucIntegerParamDef
min = 1
max = 4294967295
10.2.3 DltMemory
No Included Containers
Dlt :EcucModuleDef
lowerMultiplicity = 0
upperMultiplicity = 1
+container
DltVfbTrace :
+parameter DltVfbTraceFunction :
EcucParamConfContainerDef
EcucFunctionNameDef
lowerMultiplicity = 0
upperMultiplicity = *
BSWMD
DltBswModuleEntryRef : ARElement
EcucForeignReferenceDef AtpBlueprint
+reference AtpBlueprintable
lowerMultiplicity = 1 BswInterfaces::
+outgoingCallback
upperMultiplicity = 1 BswModuleEntry 0..*
destinationType = BSW-MODULE-ENTRY «atpVariation»
ARElement
AtpBlueprint
AtpBlueprintable
AtpStructureElement
BswOverview::
BswModuleDescription
+ moduleId :PositiveInteger
10.2.4 DltVfbTrace
No Included Containers
10.2.5 DltMultipleConfigurationContainer
Included Containers
Container Name Multiplicity Scope / Dependency
Configuration parameters controlling network and diagnostic interfaces
bandwidth. If DltImplementNVRamStorage is enabled this parameters
DltBandwidth 1
are the initial values for the NVRam. If DltImplementNVRamStorage is
not set, Link-Time or Post-Build configuration shall be uesd.
DltMessageFilterin Configuration parameters for setting message filtering properties in Dlt
1
g module.
DltProtocol 1 Configuration parameters for handling the specific protocol variants.
DltBandwidthForDiagChannel :
DltBandwidth : EcucIntegerParamDef
+parameter
EcucParamConfContainerDef
min = 0
max = 4294967295
DltBandwidthForComModule :
+parameter EcucIntegerParamDef
min = 0
max = 4294967295
DltTimePeriodTrafficShaping :
+parameter
EcucFloatParamDef
min = 0
max = INF
10.2.6 DltBandwidth
No Included Containers
DltFactoryDefaultMaxLogLevel :
+parameter EcucIntegerParamDef
min = 0
DltDefaultMaxLogLevel : max = 6
+parameter EcucIntegerParamDef
min = 0
max = 6
+parameter DltDefaultTraceStatus :
EcucBooleanParamDef
10.2.7 DltMessageFiltering
No Included Containers
+parameter
+literal BigEndian :
EcucEnumerationLiteralDef
+parameter DltHeaderUseEcuId :
EcucBooleanParamDef
+parameter DltHeaderUseSessionID :
EcucBooleanParamDef
+parameter DltHeaderUseTimestamp :
EcucBooleanParamDef
+parameter DltHeaderUseExtendedHeader :
EcucBooleanParamDef
+parameter DltUseVerboseMode :
EcucBooleanParamDef
10.2.8 DltProtocol
No Included Containers