AUTOSAR SWS DiagnosticLogAndTrace

Download as pdf or txt
Download as pdf or txt
You are on page 1of 130

Specification of Diagnostic Log and Trace

AUTOSAR CP R20-11

Document Title Specification of Diagnostic Log


and Trace
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 351

Document Status published


Part of AUTOSAR Standard Classic Platform
Part of Standard Release R20-11

Document Change History


Date Release Changed by Change Description
2020-11-30 R20-11 AUTOSAR  Added subcontainer and definition for
Release parameter DltLogLevelThreshold and
Management for DltGeneralNvRAMSupport.
 Assigned new ID for Imported Types
because of duplicated ID
 Minor corrections and bugfixes
 Editorial changes
2019-11-28 R19-11 AUTOSAR  No content changes
Release  Changed Document Status from Final
Management to published
2018-10-31 4.4.0 AUTOSAR  Tracing to RS LogAndTrace
Release  Interaction DLT <> DEM removed
Management  Minor corrections
2017-12-08 4.3.1 AUTOSAR  Introduced use of StbM
Release  Added APIs regarding Rx data path
Management  Removed redundant items
 Editorial changes
2016-11-30 4.3.0 AUTOSAR  Major rework of the SWS Dlt
Release  Dlt Protocol moved to PRS Dlt Protocol
Management specification
 Removed interaction with DCM
2015-07-31 4.2.2 AUTOSAR  Minor corrections
Release
Management
2014-10-31 4.2.1 AUTOSAR  Changed requirements:
Release SWS_Dlt_00515, SWS_Dlt_00516,
Management SWS_Dlt_00332, SWS_Dlt_0028

1 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Document Change History


Date Release Changed by Change Description
2014-03-31 4.1.3 AUTOSAR  Changed SWS_Dlt_00477
Release
Management
2013-10-31 4.1.2 AUTOSAR  Minor corrections
Release  Editorial changes
Management  Removed chapter(s) on change
documentation
2013-03-15 4.1.1 AUTOSAR  Modeling of Services: introduction of
Administration formal descriptions of service interfaces
 Reworked according to the new
SWS_BSWGeneral
2011-12-22 4.0.3 AUTOSAR  Added Dlt control messages for getting
Administration values of modifiable parameters
 Modification and update of Dem and
Dcm interfaces
 Added FIBEX example for non verbose
transmission mode
2010-09-30 3.1.5 AUTOSAR  Bug fixes and extension of Dlt control
Administration message specification
 Update of communication with Dem
(Dem_GetEventFreezeFrameData)
 Update of interface to Dcm
(Dlt_ReadData)
2010-02-02 3.1.4 AUTOSAR  Initial Release
Administration

2 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Disclaimer

This work (specification and/or software implementation) 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
work.
The material contained in this work is protected by copyright and other types of
intellectual property rights. The commercial exploitation of the material contained in
this work requires a license to such intellectual property rights.
This work 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
work may be utilized or reproduced, in any form or by any means, without permission
in writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.

3 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Table of Contents

1 Introduction and functional overview ..................................................................... 7

2 Acronyms and abbreviations.................................................................................. 8


2.1 Term and definition ......................................................................................... 8
3 Related documentation ........................................................................................ 10
3.1 Input documents ........................................................................................... 10
3.2 Related standards and norms ...................................................................... 10
3.3 Related specification ..................................................................................... 10
4 Constraints and assumptions............................................................................... 11
4.1 Limitations ..................................................................................................... 11
4.2 Applicability to car domains .......................................................................... 11
5 Dependencies to other modules .......................................................................... 12
5.1 RTE ............................................................................................................... 12
5.2 PDU Router ................................................................................................... 12
5.3 NvM ............................................................................................................... 12
5.4 GPT ............................................................................................................... 12
5.5 StbM .............................................................................................................. 12
5.6 DET ............................................................................................................... 12
5.7 DEM .............................................................................................................. 12
6 Requirements traceability .................................................................................... 13

7 Functional specification ........................................................................................ 14


7.1 Dlt specification ............................................................................................. 14
7.1.1 Dlt commands ........................................................................................ 14
7.1.2 Dlt interaction with software components ............................................. 15
7.1.3 VFB trace ............................................................................................... 18
7.1.4 Log messages from DEM ...................................................................... 20
7.1.5 Log messages from DET ....................................................................... 20
7.1.6 Recommendation for generation of Message IDs ................................ 21
7.1.7 Startup behavior .................................................................................... 21
7.1.8 Persistent storage of configuration........................................................ 22
7.1.9 Sending of Log and Trace Messages ................................................... 23
7.1.10 Receiving of Dlt commands................................................................... 30
7.1.11 Sending of Dlt commands ..................................................................... 34
7.2 Error classification ........................................................................................ 35
7.2.1 Development errors ............................................................................... 35
7.2.2 Runtime errors ....................................................................................... 35
7.2.3 Transient faults ...................................................................................... 36
7.2.4 Production errors ................................................................................... 36
7.2.5 Extended production errors ................................................................... 36
8 API specification ................................................................................................... 37
8.1 Imported types .............................................................................................. 37
8.2 Type definitions ............................................................................................. 37
4 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.2.1 Dlt_ConfigType ...................................................................................... 37


8.2.2 Dlt_MessageType .................................................................................. 38
8.2.3 Dlt_MessageIDType .............................................................................. 38
8.2.4 Dlt_MessageNetworkTraceInfoType ..................................................... 39
8.3 Function definitions ....................................................................................... 39
8.3.1 Dlt_Init .................................................................................................... 39
8.3.2 Dlt_GetVersionInfo ................................................................................ 40
8.3.3 Dlt_SendTraceMessage ........................................................................ 41
8.3.4 Dlt_SendLogMessage ........................................................................... 41
8.3.5 Dlt_RegisterContext .............................................................................. 42
8.3.6 Dlt_UnregisterContext ........................................................................... 43
8.3.7 Dlt_DetForwardErrorTrace .................................................................... 44
8.3.8 Dlt_SetLogLevel .................................................................................... 45
8.3.9 Dlt_SetTraceStatus ............................................................................... 46
8.3.10 Dlt_GetLogInfo ...................................................................................... 46
8.3.11 Dlt_GetDefaultLogLevel ........................................................................ 47
8.3.12 Dlt_StoreConfiguration .......................................................................... 48
8.3.13 Dlt_ResetToFactoryDefault ................................................................... 49
8.3.14 Dlt_SetMessageFiltering ....................................................................... 50
8.3.15 Dlt_SetDefaultLogLevel ......................................................................... 50
8.3.16 Dlt_SetDefaultTraceStatus .................................................................... 51
8.3.17 Dlt_GetDefaultTraceStatus ................................................................... 52
8.3.18 Dlt_GetLogChannelNames ................................................................... 53
8.3.19 Dlt_GetTraceStatus ............................................................................... 53
8.3.20 Dlt_SetLogChannelAssignment ............................................................ 54
8.3.21 Dlt_SetLogChannelThreshold ............................................................... 55
8.3.22 Dlt_GetLogChannelThreshold ............................................................... 56
8.3.23 Dlt_InjectCall_<SESSION> ................................................................... 56
8.4 Call-back notifications ................................................................................... 57
8.4.1 Dlt_RxIndication .................................................................................... 57
8.4.2 Dlt_TriggerTransmit ............................................................................... 58
8.4.3 Dlt_TxConfirmation ................................................................................ 59
8.4.4 Dlt_TpTxConfirmation ........................................................................... 60
8.4.5 Dlt_CopyTxData .................................................................................... 60
8.4.6 Dlt_StartOfReception............................................................................. 62
8.4.7 Dlt_TpRxIndication ................................................................................ 63
8.4.8 Dlt_CopyRxData .................................................................................... 63
8.5 Scheduled functions ..................................................................................... 65
8.5.1 Dlt_TxFunction ...................................................................................... 65
8.6 Expected interfaces ...................................................................................... 66
8.6.1 Mandatory interfaces ............................................................................. 66
8.6.2 Optional interfaces................................................................................. 67
8.7 Client-Server-Interfaces ................................................................................ 68
8.7.1 DltControlService................................................................................... 68
8.7.2 InjectionCallback ................................................................................... 77
8.7.3 LogTraceSessionControl ....................................................................... 79
8.7.4 DltSwcMessageService ......................................................................... 81
8.8 Implementation Data Types .......................................................................... 85
8.8.1 Dlt_ApplicationIDType ........................................................................... 85
8.8.2 Dlt_ContextIDType ................................................................................ 85
5 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.8.3 Dlt_SessionIDType ................................................................................ 85


8.8.4 Dlt_LogInfoType .................................................................................... 86
8.8.5 Dlt_ContextIdInfoType ........................................................................... 86
8.8.6 Dlt_ApplicationIdInfoType ..................................................................... 87
8.8.7 Dlt_MessageOptionsType ..................................................................... 88
8.8.8 Dlt_MessageLogInfoType ..................................................................... 88
8.8.9 Dlt_MessageLogLevelType ................................................................... 89
8.8.10 Dlt_MessageTraceType ........................................................................ 90
8.8.11 Dlt_MessageArgumentCount ................................................................ 90
8.8.12 Dlt_MessageTraceInfoType .................................................................. 92
8.8.13 Dlt_LogChannelNameType ................................................................... 92
8.8.14 Dlt_AssignmentOperation ..................................................................... 93
8.9 Ports .............................................................................................................. 94
8.9.1 Dlt_ControlService_{SW-C} .................................................................. 94
8.9.2 Dlt_InjectCallback_{SW-C}.................................................................... 94
8.9.3 Dlt_SessionControlCallback_{SW-C}.................................................... 94
8.9.4 Dlt_SwcMessageService_{SW-C} ........................................................ 95
9 Sequence diagrams ............................................................................................. 96
9.1 Dlt initialization .............................................................................................. 96
9.2 Overview of Dlt message transmission on one LogChannel ....................... 97
9.3 SetLogLevelFilter .......................................................................................... 99
9.4 Buffer overflow indication............................................................................ 100
10 Configuration specification ......................................................................... 102
10.1 Containers and configuration parameters .................................................. 102
10.1.1 Dlt......................................................................................................... 103
10.1.2 DltGeneral............................................................................................ 103
10.1.3 DltSwc .................................................................................................. 108
10.1.4 DltSwcContext ..................................................................................... 111
10.1.5 DltConfigSet......................................................................................... 112
10.1.6 DltProtocol ........................................................................................... 113
10.1.7 DltEcuId ............................................................................................... 115
10.1.8 DltEcuIdCalloutChoice ........................................................................ 116
10.1.9 DltEcuIdValueChoice .......................................................................... 116
10.1.10 DltLogLevelSetting ........................................................................... 117
10.1.11 DltLogLevelThreshold ...................................................................... 118
10.1.12 DltLogChannelAssignment .............................................................. 119
10.1.13 DltTraceStatusSetting ...................................................................... 120
10.1.14 DltTraceStatusAssignment .............................................................. 121
10.1.15 DltLogOutput .................................................................................... 121
10.1.16 DltLogChannel ................................................................................. 122
10.1.17 DltTxPdu .......................................................................................... 126
10.1.18 DltRxPdu .......................................................................................... 128
10.2 Published Information ................................................................................. 130

6 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

1 Introduction and functional overview


This specification describes the functionality and the configuration of the AUTOSAR
Basic Software module Dlt.

It receives log information from DET, DEM, SW-Cs, or trace information of the RTE.
The Dlt module transmits this data via communication busses to make this
information visible outside the ECU.

For this purpose, the Dlt module defines the API to send and receive dedicated
log/trace information on the bus.

In addition, the NvM module can be optionally used to store an updated filter setting
of the Dlt module persistently. This enables the ECU to transmit log/trace information
with the desired level without the need of an explicit setup request coming from the
communication bus (via a logging tool) at every ECU startup.

The Dlt module is located on top of the PduR and below the RTE.

Figure 1 – Location of the Dlt module

Please note:
The Dlt Message Format, the available Dlt Commands, and the Dlt protocol (to
communicate with an external logging and tracing tool) are defined in a separate
document. Please refer to the Dlt Protocol Specification [1] for further information.

7 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

2 Acronyms and abbreviations

Abbreviation / Acronym: Description:


APID Application ID
CTID Context ID
Dlt Diagnostic Log and Trace
MCNT Message Counter
MSBF Most Significant Byte First
MSBI Message Bus Info
MSCI Message Control Info
MSLI Message Log Info
MSTP Message Type
MSTI Message Trace Info
NOAR Number of Arguments
STMS Timestamp
UEH Use Extended Header
VERB Verbose
VERS Version Number
WEID With ECU ID
WSID With Session ID
WTMS With Timestamp

2.1 Term and definition

Term Description:

Log and trace A log and trace message contains all data and options to describe a log
message and trace event in a software. A log and trace message consists of a
header and payload.
Dlt User A Dlt User represents the source of a generated Dlt message. The
possible users are SW-Cs, RTE (for VFB traces), DEM, or DET.
Log Message A Log Message contains debug information like state changes or value
changes.
Trace Message A Trace messages contains information, which has passed via the VFB.
ECU ID ECU IDis the name of an ECU, composed by four 8-bit ASCII characters
(e.g., ABS0 or COMB).
Session A session is a logical entity of source of log or trace messages. If an
application / SW-C is instantiated several times, each instance gets a
globally unique session ID with respect to the application / context ID. It is
possible for an application / SWC to have several simultaneous log or
trace sessions, if it has several ports opened to Dlt.
Since Session ID is not specified in AUTOSAR for SW-Cs, the port
defined argument values shall be used for this number.
Session ID Session ID is the identification number of a log or trace session.
Application ID Application ID is an abbreviation of an application / SW-C. It identifies the
8 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

application / SW-C a log and trace message originates from.


The Application ID is composed by four 8-bit ASCII characters.
Context ID Context ID is a user defined identifier to group Log and Trace Messages
generated by an application / SW-C. The following rules apply:
 Each ApplicationID can own several Context IDs.
 Context IDs are grouped by Application IDs.
 Context IDs shall be unique within an Application ID.
 The source of a log and trace message is identified using
the tuple “ApplicationID” and “ContextId”.

Four 8-bit ASCII characters compose the ContextId.


Message ID Messaged ID is the identifier to characterize the information, which is
transported by the message itself. A Message ID identifies a kind of log or
trace message uniquely. It can be used for identifying the source (in
source code) of a message and it can be used for characterizing the
payload of a message. A Message ID is statically fixed at development or
configuration time.
Log level A log level defines a classification for the severity grade of a Log
Message.
Trace status The trace status provides information, if a trace message should be send.
Log Channel A physical communication bus, which is used to transmit Dlt messages.
External client The external client is a tool to control, monitor, and store log / trace
messages provided by ECUs using the Dlt module.

9 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

3 Related documentation

3.1 Input documents


 [1] DLT Protocol Specification
PRS_DLTProtocol.pdf

 [2] AUTOSAR Layered Software Architecture


AUTOSAR_EXP_LayeredSoftwareArchitecture.pdf

 [3] AUTOSAR General Requirements on Basic Software Modules


AUTOSAR_SRS_BSWGeneral.pdf

 [4] AUTOSAR Specification of RTE


AUTOSAR_SWS_RTE.pdf

 [5] AUTOSAR Specification of PDU Router


AUTOSAR_SWS_PDURouter.pdf

 [6] AUTOSAR Specification of NVRAM Manager


AUTOSAR_SWS_NVRAMManager.pdf

 [7] AUTOSAR Specification of Default Error Tracer


AUTOSAR_SWS_DefaultErrorTracer.pdf

 [8] AUTOSAR Specification of Diagnostic Event Manager


AUTOSAR_SWS_DiagnosticEventManager.pdf

 [9] AUTOSAR Specification of GPT Driver


AUTOSAR_SWS_GPTDriver.pdf

3.2 Related standards and norms


 IEC 7498-1 The Basic Model, IEC Norm, 1994

3.3 Related specification


AUTOSAR provides a General Specification on Basic Software (SWS BSW General)
which is also valid for Dlt.

Thus, the specification SWS BSW General shall be considered as additional required
specification for the Dlt module.

10 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

4 Constraints and assumptions

4.1 Limitations
VFB Tracing: Currently, VFB Trace only supports the non-verbose mode. I.e., the Dlt
module will send out the arguments in a raw format, simply doing a memory copy of
the arguments to the trace message.

Note:
Currently, the Dlt data type model does NOT support arbitrarily nested complex data
types, which AUTOSAR does. So there is no generic way to transform arguments
given to the VFB Trace hook functions into Dlt data types needed for the verbose
mode.

Also an ASAM Fibex description cannot be generated by the Dlt module as the in-
memory representation might not be compliant to the SWCD data type description of
the arguments.

4.2 Applicability to car domains


This basic software module can be used for all car domains.

11 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

5 Dependencies to other modules

5.1 RTE
The RTE (including the VFB and the BSW Scheduler) is used to interact with SW-Cs
to generate Log and Trace messages and to call the Dlt module’s Tx function
cyclically.

5.2 PDU Router


In order to transmit Dlt messages on the communication bus, the Dlt module interacts
with the PDU Router.

5.3 NvM
In order to load and store altered configurations like filter settings and/or Log Channel
assignments, the NvM module can optionally be used.

5.4 GPT
In order to derive a time stamp, the GPT module can be used for this purpose.

5.5 StbM
In order to get a synchronized time value (Local Time Base derived from Global Time
Base) in standard/extended format., the StbM module can be used for this purpose.

5.6 DET
In order to be able to report default errors and to forward DET errors to the
communication bus, the Dlt module has to interact with the DET module. However,
the interaction with DET is optional.

5.7 DEM
In order to be able to report development errors and to transmit DEM events on the
communication bus, the Dlt module has to interact with the DEM module using a
CDD and/or a SW-C. No standardized interaction between DEM and DLT is
available.

12 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

6 Requirements traceability

Requirement Description Satisfied by


RS_LT_00003 Applications shall have the possibility to send log or SWS_Dlt_00241,
trace messages to the LT module. SWS_Dlt_00243
RS_LT_00004 The LT shall provide the actual set of log levels and SWS_Dlt_00252,
the trace status to an Application. SWS_Dlt_00254
RS_LT_00006 Trace events from errors generated by BSW and SWS_Dlt_00430,
Applications shall be forwarded to the LT module. SWS_Dlt_00432
RS_LT_00008 RTE shall provide an interface for LT to trace SWS_Dlt_00284
RTE/VFB calls.
RS_LT_00009 The LT shall implement an interface to trace the SWS_Dlt_00276,
RTE/VFB. SWS_Dlt_00277,
SWS_Dlt_00285
RS_LT_00032 A protocol shall be implemented to be able to set and SWS_Dlt_00643
query the trace status and log levels of log and trace
sources of each ECU.
RS_LT_00033 A list of all log and trace sources of an ECU shall be SWS_Dlt_00021,
accessible from the external client. SWS_Dlt_00245,
SWS_Dlt_00769
RS_LT_00034 LT shall support a generic API for communicating SWS_Dlt_00516
over a LT communication module.
RS_LT_00036 The LT shall provide a buffer for storing log and trace SWS_Dlt_00003
messages before initialization.
RS_LT_00038 A mechanism shall be implemented to be able to set SWS_Dlt_00252,
the trace status and log levels of registered SWS_Dlt_00254
Application IDs and context IDs of each Application.
RS_LT_00039 The LT shall provide the possibility to store SWS_Dlt_00078,
configuration data in a persistent way. SWS_Dlt_00453
SRS_BSW_00101 The Basic Software Module shall be able to initialize SWS_Dlt_00239
variables and hardware in a separate initialization
function
SRS_BSW_00344 BSW Modules shall support link-time configuration SWS_Dlt_00239
SRS_BSW_00358 The return type of init() functions implemented by SWS_Dlt_00239
AUTOSAR Basic Software Modules shall be void
SRS_BSW_00402 Each module shall provide version information SWS_Dlt_00271
SRS_BSW_00404 BSW Modules shall support post-build configuration SWS_Dlt_00239
SRS_BSW_00405 BSW Modules shall support multiple configuration SWS_Dlt_00239
sets
SRS_BSW_00407 Each BSW module shall provide a function to read SWS_Dlt_00239
out the version information of a dedicated module
implementation
SRS_BSW_00414 Init functions shall have a pointer to a configuration SWS_Dlt_00239,
structure as single parameter SWS_Dlt_00437

13 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

7 Functional specification

7.1 Dlt specification


The following chapters describe the AUTOSAR specific data and control paths the
Dlt module needs for the interaction with SW-Cs, PduR, and an external client
(logging tool).

7.1.1 Dlt commands

The Dlt Protocol specifies all sorts of Dlt Commands which are identified by unique
Service IDs. The Dlt Commands are used to modify the behavior of the Dlt module at
runtime, e.g., fetching information about the current Dlt configuration or altering filter
settings.

[SWS_Dlt_00643] ⌈The AUTOSAR Dlt module shall support the following Dlt
Commands identified by the following Services IDs:

Service ID Dlt Command Name Description


0x01 SetLogLevel Set the Log Level
0x02 SetTraceStatus Enable/Disable Trace Messages
0x03 GetLogInfo Return the LogLevel for registered SW-Cs
0x04 GetDefaultLogLevel Return the Log Level for wildcards
0x05 StoreConfiguration Store the current configuration non-volatile
0x06 ResetToFactoryDefault Set the configuration back to default
0x0A SetMessageFiltering Enable/Disable the Dlt filters
0x11 SetDefaultLogLevel Set the LogLevel for wildcards
0x12 SetDefaultTraceStatus Enable/Disable Trace Messages for wildcards
0x15 GetDefaultTraceStatus Get the current TraceLevel for wildcards
0x17 GetLogChannelNames Return the name(s) of the LogChannel(s)
0x1F GetTraceStatus Get the current trace status (on/off)
0x20 SetLogChannelAssignment Add/ Remove the given LogChannel as output path
0x21 SetLogChannelThreshold Set the filter threshold for the given LogChannel
0x22 GetLogChannelThreshold Get the filter threshold for the given LogChannel
0x23 BufferOverflowNotification Indication of a buffer overflow within the DLT module
0x24 SyncTimeStamp Reports synchronized absolute time

⌋ (RS_LT_00032)

Note:
The layouts of the defined Dlt Commands, which can be received via Dlt Control
Messages, are defined in the Dlt Protocol Specification [1].

14 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

7.1.2 Dlt interaction with software components

The Dlt module offers interfaces SW-Cs can use for sending Log and Trace
Messages.

Optionally, SW-Cs can provide a port for notifications on log level threshold and trace
status changes, which are provided by the Dlt module separately for every tuple of
ApplicationId/ContextId. These notifications can be used to avoid already the
generation of Log and Trace Messages by the SW-Cs, instead of having them to be
filtered out later on by the Dlt module.

Since the Dlt module supports multiple instances of SW-Cs, which use the same
tuples of ApplicationId/ContextId, an additional SessionId parameter allows
distinguishing log/trace messages from different instances of the same SW-C.

To separate those SW-Cs technically from each other and to avoid that SW-Cs have
to use unique SessionIds in calls to SendLogMessage/SendTraceMessage
(details, see next chapters), the Dlt module provides a dedicated P-Port per
configured SW-C (see configuration parameter DltSwc) where the SessionId is
managed as a port-defined-argument.

If a configured SW-C is marked as being interested in notifications on log level and


trace state changes, the Dlt module also provides a corresponding R-Port to notify
the respective SW-C.

The information, which SW-C is responsible for which ApplicationId/ContextId


tuples, is configured for the SW-C and/or updated by the SW-C during runtime with a
call to RegisterContext and UnregisterContext respectively.

Figure 2 - Interaction with SW-C (Port configuration)

15 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

[SWS_Dlt_00644] ⌈The Dlt module shall provide a P-Port typed by interface


DltService (see chapter 8), for each configured SW-C (see configuration container
DltSwc). ⌋ ()

[SWS_Dlt_00645] ⌈The P-Port typed by interface has SessionId as a port-defined


argument. ⌋ ()

[SWS_Dlt_00646] ⌈The Dlt module shall provide an R-Port typed by interface


LogTraceSessionControl (see chapter 8), for each configured SW-C (see
configuration container DltSwc), where the configuration parameter
DltSwcSupportLogLevelAndTraceStatusChangeNotification is set to
TRUE. ⌋ ()

[SWS_Dlt_00647] ⌈The ApplicationId/ContextId tuples for which the SW-C is


responsible for and therefore needs to be notified in case of log level or trace state
changes shall be deduced from configuration parameter DltSwcContext. ⌋ ()

7.1.2.1 Registering ApplicationIDs and ContextIds to Dlt

The Dlt module is able to inform SW-Cs about a log level change. For this purpose,
they have to register at the Dlt module, using a tuple of
ApplicationId/ContextId at runtime.

Note:
Because the developing of SW-C is not object of this specification, the Dlt module
has to collect this information at runtime.

[SWS_Dlt_00765] ⌈The Dlt module shall remember all tuples of ApplicationIDs


and ContextIds of the SW-Cs, which register to the Dlt module. ⌋ ()

[SWS_Dlt_00766] ⌈The Dlt module shall manage a log level and a trace state for
every tuple of ContextId and ApplicationID. ⌋ ()

Note:
In addition, a dynamic registration supports the possibility for the Dlt module to see
which SW-C/runnable is active and which not. This is essential to know which SW-C
to inform in case of a log level or trace status change.

When a SW-C is calling the Dlt_RegisterContext method of the DLTService


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.

16 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

[SWS_Dlt_00021] ⌈The Dlt module shall remember the relation between the
registered tuple of ApplicationId/ContextId, and the port interface where this
tuple is registered. ⌋ (RS_LT_00033)

[SWS_Dlt_00768] ⌈If the parameter


DltGeneralRegisterContextNotification is set to TRUE, every time
Dlt_RegisterContext is called, the Dlt module shall send the Dlt Control
Message GetLogInfo containing the provided ApplicationId/ContextId. ⌋ ()

7.1.2.2 Unregistering ApplicationIDs and ContextIds to Dlt

In case a SW-C is going to be stopped, it should unregister itself. This information


can be used to inform an external client (e.g. a logging device) about the current SW-
C status.

[SWS_Dlt_00773] ⌈The Dlt module shall delete all tuples of ApplicationIDs and
ContextIds of the SW-Cs which unregister to the Dlt module from the list of
registered applications. ⌋ ()

Note:
For these tuples, the Dlt module will not try to notify the corresponding SWC any
more about LogLevel changes.

[SWS_Dlt_00774] ⌈If the parameter


DltGeneralRegisterContextNotification is set to TRUE, every time
Dlt_UnregisterContext is called, the Dlt module shall send the Dlt Control
Message GetLogInfo containing the provided ApplicationId/ContextId with
parameter “status” set to 5. ⌋ ()

7.1.2.3 Using port defined argument values for the definition of SessionIds

For every function call of Dlt_SendLogMessage, Dlt_SendTraceMessage,


Dlt_RegisterContext and Dlt_UnregisterContext, a port defined
argument value needs to be provided.

[SWS_Dlt_00022] ⌈Port defined argument values shall be used by the Dlt module as
SessionIds. ⌋ ()

Note:
A session is the part of a SW-C for which a log level monitor is responsible. For each
log level monitor the same SessionId (port defined argument value) shall be used.

[SWS_Dlt_00023] ⌈The port defined argument value corresponds to the defined


17 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

SessionID. The value shall start at 0x1000 (for BSW modules the module ID is
taken). ⌋ ()

[SWS_Dlt_00332] ⌈Each port of a SW-C connected to the Dlt module shall have a
unique SessionId as port defined argument. The range of SessionIds shall be
continuous. ⌋ ()

7.1.3 VFB trace

The VFB trace is specified in the RTE. The meaning of 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. This section describes the interaction of the RTE
with the Dlt module to record a VFB trace and the internal control of the trace data.

7.1.3.1 Interfaces provided by Dlt for VFB traces

In case the Dlt module is used as a VFB trace client, the RTE has to be configured
accordingly. This means that the RTE configuration parameter
RteVfbTraceClientPrefix has to be configured with value “Dlt”.

The configuration, whether VFB tracing is enabled at all and which traceable events
are supported/activated, is solely configured in the RTE module.

From its configuration, the RTE generator then updates in Generation Phase the
RTEs Basic Software Module Description with BswModuleEntries for each
configured VFB trace hook function. Those BswModuleEntries exactly describe
the expected function prototype the configured trace clients have to provide:
- The expected function name is defined by the shortname.
- The rest of the expected signature is defined by the contained arguments.

The Dlt module has to provide the implementation for all BswModuleEntries, which
are referenced by the attribute outgoingCallback of the
BswModuleDescription of the RTE, whose shortname start with “Rte_Dlt”.

[SWS_Dlt_00284] ⌈The Dlt module shall be compliant to the VFB trace described in
the AUTOSAR_RTE_SWS. ⌋ (RS_LT_00008)

[SWS_Dlt_00276] ⌈The Dlt module shall provide the possibility to trace all kinds of
trace events described in the SWS RTE. ⌋ (RS_LT_00009)

[SWS_Dlt_00027] ⌈The Dlt module shall provide the implementation of the hook
functions for every configured event given by an BswModuleEntry, which owns a
shortname starting with “Rte_Dlt” provided by the BswModuleDefinition of the
RTE. ⌋ ()
18 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

[SWS_Dlt_00335] ⌈The prototype of this hook function is to be taken from the


BswModuleEntry of the BSWModulDescription of the RTE. ⌋ ()

7.1.3.2 Generating hook functions

[SWS_Dlt_00285] ⌈Because the interface Dlt_SendTraceMessage is a SW-C


interface, an internal function which is equivalent to Dlt_SendTraceMessage shall
be implemented to be called by the generated hook functions. ⌋ (RS_LT_00009)

[SWS_Dlt_00277] ⌈In the hook function the internal representation of


Dlt_SendTraceMessage shall be called. This call shall be in non-verbose mode. ⌋
(RS_LT_00009)

[SWS_Dlt_00278] ⌈The payload for this hook function call shall be filled with the
arguments provided by the hook function. All data transported with the arguments
shall be provided. ⌋ ()

[SWS_Dlt_00632] ⌈The argument data shall be written in raw format to the payload. ⌋
()

[SWS_Dlt_00279] ⌈Every hook function shall get its own ContextId.


In some cases some events can be bundled to the same ContextId. This shall
mostly be done if a very large number of signals is traced. ⌋ ()

[SWS_Dlt_00337] ⌈The ApplicationID shall be “VFBT”. ⌋ ()

[SWS_Dlt_00484] ⌈The Message Type (MSTP) entry in the generated trace


message shall be set to DLT_TYPE_APP_TRACE, the Message Trace Info (MSTI)
entry in this case shall be set to DLT_TRACE_VFB. ⌋ ()

[SWS_Dlt_00280] ⌈Because non-verbose mode is used, a unique Message ID as


defined in [SWS_Dlt_00031] shall be used for each call to
Dlt_SendTraceMessage. ⌋ ()

Note:
The description for the Message ID-payload shall be generated and provided. This
description can be generated from the SW-C description file, were the interface is
described.

[SWS_Dlt_00281] ⌈In each hook function the trace status of the ContextId shall be
checked. ⌋ ()

19 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

if (vfb_actual_trace_status_contextXY){
<internal_Dlt_SendTraceMessage>(…);
}

Figure 3 Requirement for hook function to check the trace status of the ContextId before call
of Dlt_SendTraceMessage (vfb_actual_trace_status_contextXY is a freely named
variable to hold the actual trace status for a specific ContextId)

[SWS_Dlt_00282] ⌈Dlt shall use for every VFB trace hook function an own
ContextId and thus handle for every VFB trace ContextId a separate trace
status. This can be done with a separate variable. ⌋ ()

[SWS_Dlt_00283] ⌈A separate function shall be implemented to modify the trace


status of VFB trace hook functions. This function shall be harmonized with the SW-C
LogTraceSessionControl interface. ⌋ ()

7.1.4 Log messages from DEM

[SWS_Dlt_00377] ⌈The ApplicationID, ContextId and Message ID of a Log


Message sent for a DEM event shall have the following values:
ApplicationID = “DEM”
ContextId = “STD0”
MessageID = 0x00000001
⌋ ()

7.1.5 Log messages from DET

SW-Cs and BSW modules can report errors to the DET module. Such errors can be
forwarded to the Dlt module as messages with a suitable content using the
Dlt_DetForwardErrorTrace.

Note:
All parameters from the DET function Det_ReportError are forwarded to the Dlt
function Dlt_DetForwardErrorTrace by the DET fan-out capability.

[SWS_Dlt_00430] ⌈The Dlt module shall provide the


Dlt_DetForwardErrorTrace function for the fan-out capability of DET. ⌋
(RS_LT_00006)

[SWS_Dlt_00376] ⌈The ApplicationID, ContextId and MessageID of the Log


Message send by DET shall have the following values:
ApplicationID = “DET”
ContextId = “STD”
20 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

MessageID = 0x00000002
LogLevel = “Error”
⌋ ()

7.1.6 Recommendation for generation of Message IDs

The payload of non-verbose messages contains the Message ID. The Message ID
shall be unique for an ECU. The problem is that Message IDs are provided by a SW-
C (the user of Dlt) and at the point in time when coding of the log and trace message
calls are done there is no instance to guarantee the uniqueness of used Message
IDs.
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 fix Message ID values during the post build
process, so uniqueness for the ECU can be guaranteed.
It is important to provide for every Message ID a description for the associated
message.

[SWS_Dlt_00031] ⌈MessageIds used for DEM (0x00000001) and DET


(0x00000002), and Trace Messages (0x00000003) are reserved and therefore not
usable for SW-Cs. ⌋ ()

7.1.7 Startup behavior

The Dlt module specifies several configuration parameters, which can be


reconfigured during runtime via API calls or via Dlt control messages.

This means, that those configuration parameters respectively data structures, which
are based on them, have to be loaded into runtime variables during the startup of the
Dlt module.

In addition, it might happen that SW-Cs and/or BSW modules are already generating
log and trace data even though the Dlt module itself has not been initialized yet. For
this scenario, the Dlt module offers the possibility to buffer even this data until the Dlt
module is initialized.

The described functionalities result in the requirements below:

[SWS_Dlt_00003] ⌈The Dlt module shall be able to buffer data coming from calls to
Dlt_SendLogMessage and/or Dlt_SendTraceMessage even if the Dlt module
has not been initialized yet. ⌋ (RS_LT_00036)

[SWS_Dlt_00648] ⌈When the Dlt_Init is called, the optional timer


DltGeneralStartUpDelayTimer shall be started if configured. ⌋ ()

21 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

[SWS_Dlt_00649] ⌈If the parameter DltGeneralNvRAMSupport is disabled, static


Dlt module configuration shall be used for initialization. ⌋ ()

[SWS_Dlt_00005] ⌈As soon as the Dlt module is initialized by Dlt_Init and the
optional timer DltGeneralStartUpDelayTimer has expired, all the log and trace
data, which has been buffered meanwhile, shall be processed as described in
section “7.3.6. Sending of Log and Trace Messages”. ⌋ ()

7.1.8 Persistent storage of configuration

The Dlt module offers the possibility to store configuration data in the
NVRamManager module. Therefore, it is recommended to call the Dlt_Init
function only after the NVRamManager module has been initialized.

The persistency functionality of the Dlt module supports the non-volatile saving of
configuration values, which are modifiable during runtime.

The idea is to allow to customize the logging configuration during runtime and to
assure that this configuration is recovered after an ECU reset or restart.

[SWS_Dlt_00451] ⌈If the parameter DltGeneralNvRAMSupport is set to TRUE,


non-volatile memory blocks shall be used by the Dlt module to store the current Dlt
configuration persistently. ⌋ ()

[SWS_Dlt_00449] ⌈If the parameter DltGeneralNvRAMSupport is set to TRUE,


the Dlt module has to verify the validity of the non-volatile blocks used. ⌋ ()

[SWS_Dlt_00350] ⌈If the parameter DltGeneralNvRAMSupport is set to TRUE,


the stored Dlt configuration shall be used as initial values. ⌋ ()

Note:
Initial values in this case are the initial values for the persistent stored values for the
first startup of the ECU.

[SWS_Dlt_00078] ⌈Storing the current configuration to NvRAM shall only be done if


the parameter DltGeneralNvRAMSupport is enabled and the storing has been
explicitly requested by the Dlt Command “StoreConfiguration”. ⌋ (RS_LT_00039)

Note:
To store the current configuration to NvRAM, the API NvM_WriteBlock is used.

22 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

7.1.9 Sending of Log and Trace Messages

The Dlt data path describes the flow a Dlt Log and Trace Message takes from the
source to the sink. The source can be either a SW-C or a BSW module, whereas the
PDU Router is representing the sink.

The following figure provides an overview of the separate steps to send a Dlt
message on the communication bus:

SWC
SWCID 2
logLevel
RTE

DLT + Timestamp

Application ID / Context ID

LogLevelFilter
TraceStatus

Select
LogChannel

Check Msg Length Check Msg Length

LogChannelThreshold

Buffer Buffer

Traffic shaping Traffic shaping

Create Header Create Header

PduR
PDU ID 3 PDU ID 4

SoAd FrTP

Figure 3 – Example Tx Data Path

23 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

[SWS_Dlt_00650] ⌈The following steps describe the logical order, in the context of
calls to Dlt_SendLogMessage or Dlt_SendTraceMessage:

1. Generate timestamp (see 7.1.9.1)


2. Filter message (see 7.1.9.2)
3. Select target LogChannel(s) (see 7.1.9.3)
4. Check Message length (see 7.1.9.4)
5. Apply the current LogChannel threshold (see 7.1.9.5)
6. Copy Dlt message to LogChannel specific buffer (see 7.1.9.6)
⌋ ()

Note:
Because of optimizations in an implementation, the order might be changed. For
instance, a typical optimization could be, that the Dlt header, which is created by Dlt
module for each Dlt message, is NOT saved to the LogChannel specific buffer per Dlt
message, but is created on-the-fly directly before sending the message to PduR.

[SWS_Dlt_00651] ⌈The following steps have to be taken deferred/decoupled from


the context of calls to Dlt_SendLogMessage or Dlt_SendTraceMessage:

7. Send Dlt message to PduR according to TrafficShaping settings. (see 7.1.9.7)


8. Create Dlt Header according to header settings (see 7.1.9.8)
9. Remove the Dlt message from the LogChannel specific buffer (see 7.1.9.9)
⌋ ()

7.1.9.1 Generating the timestamp

Depending of the current configuration, a timestamp may be added to the Dlt


message.

[SWS_Dlt_00652] ⌈Only if the parameter DltHeaderUseTimestamp is set to


TRUE, the Dlt module shall fetch a timestamp. ⌋ ()

[SWS_Dlt_00653] ⌈If the parameter DltHeaderUseTimestamp is set to TRUE, but


the Dlt module cannot fetch a timestamp for any reason, the timestamp shall be set
to 0x00000000. ⌋ ()

[SWS_Dlt_00654] ⌈ If the parameter DltHeaderUseTimestamp is set to TRUE and


DltGeneralGptChannelRef is configured, the Dlt module shall call the API
Gpt_GetTimeElapsed() with the configured channel reference (see
DltGeneralGptChannelRef) to fetch the elapsed time. ⌋ ()

[SWS_Dlt_00655] ⌈ If the parameter DltHeaderUseTimestamp is set to TRUE and


DltGeneralStbMTimeBaseRef is configured, the Dlt module shall call the API
StbM_GetCurrentTime() with the configured time base reference (see
DltGeneralStbMTimeBaseRef) to fetch the current synchronized time and
calculate the elapsed time. ⌋ ()
24 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

7.1.9.2 Message filtering

Message filtering means to accept or discard an incoming log or trace message


based on the ApplicationId/ContextId tuple, which is assigned to that
message.

Filtering differs slightly between Log Messages (Dlt_SendLogMessage) and trace


messages (Dlt_SendTraceMessage).

[SWS_Dlt_00656] ⌈For Dlt Log Messages, the highest LogLevel Threshold shall be
defined as “Verbose”. ⌋ ()

[SWS_Dlt_00657] ⌈ For Dlt Log Messages, the lowest LogLevel Threshold shall be
defined as “Filter off”. ⌋ ()

Note:
The Dlt_MessageLogLevelType defines all possible Log Message filter levels.

[SWS_Dlt_00658] ⌈For Log Message filtering the Dlt internally manages LogLevel
threshold to ApplicationId/ContextId tuple mappings (see configuration
parameter DltLogLevelThreshold). ⌋ ()

[SWS_Dlt_00659] ⌈For trace message filtering the Dlt internally manages trace
activation state to ApplicationId/ContextId tuple mappings (see configuration
parameter DltTraceStatusAssignment). ⌋ ()

Note:
The matching algorithm for finding the proper mapping element (containing a
threshold log level value in the Log Message case respectively containing a trace
activation state in the trace message case) is identical for Log Messages and trace
messages.

[SWS_Dlt_00661] ⌈The Dlt module shall find a matching mapping element (log level
threshold respectively trace activation state) for the ApplicationId/ContextId
tuple contained in a Dlt_SendLogMessage or Dlt_SendTraceMessage call. To
do so, the following steps shall be performed:
1. Check whether a mapping element exists, where
ApplicationId/ContextId tuple of mapping element equals to the
ApplicationId/ContextId tuple of the log/trace message. If such a
mapping element exists, the matching mapping element is found.
2. In case no match has been found in step 1, check whether a mapping element
exists, where the ApplicationID equals the ApplicationID of the
log/trace message and the ContextId of mapping element equals wildcard
(value 0x00000000). If such a mapping element exists, the matching mapping
element is found.
25 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

3. In case no match has been found in step 1 and 2, the matching mapping
element is the current DefaultLogLevelThreshold respectively the
current DefaultTraceStatus.
⌋ ()

[SWS_Dlt_00662] ⌈In the Dlt_SendLogMessage case, the found mapping element


is a log level threshold. If the log level value of the Log Message is numerically higher
than this log level threshold, the Log Message is not further processed and E_OK is
returned. ⌋ ()

[SWS_Dlt_00663] ⌈In the Dlt_SendTraceMessage case, the found mapping


element is a trace activation state. If the value of the trace activation state is FALSE,
the message is not further processed and E_OK is returned. ⌋ ()

7.1.9.3 Select target LogChannel

In this step, the Dlt module identifies on which LogChannel(s) the log or tarce
message will be transmitted.

[SWS_Dlt_00664] ⌈For LogChannel selection the Dlt module manages LogChannel


to ApplicationId/ContextId tuple mappings. (see configuration parameter
DltLogChannelAssignmentSwcContextRef). ⌋ ()

Note:
There can be several LogChannels configured for a given
ApplicationId/ContextId tuple contained in a Dlt_SendLogMessage or
Dlt_SendTraceMessage call.

[SWS_Dlt_00665] ⌈To find the matching LogChannels for the


ApplicationId/ContextId tuple contained in a Dlt_SendLogMessage or
Dlt_SendTraceMessage call, the Dlt module shall do the following steps:
1. From all mapping elements, where ApplicationId/ContextId tuple of
mapping element equals to the ApplicationId/ContextId tuple of the
log/trace message, the LogChannel shall be added to the list of output
LogChannels.
2. From all mapping elements, where ApplicationID of mapping element
equals to the ApplicationID of the log/trace message AND the ContextId
of mapping element equals wildcard (value 0x00000000), the LogChannel
shall be added to the list of output LogChannels.
3. If the list of output LogChannels is still empty after step 1 and 2. The default
LogChannel (see configuration parameter DltDefaultLogChannelRef)
shall be added to the list of output LogChannels.
⌋ ()

26 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

7.1.9.4 Check message length

[SWS_Dlt_00666] ⌈If the Dlt message length including the required Dlt headers
exceeds the configured value given by DltLogChannelMaxMessageLength for all
assigned LogChannels, discard this Dlt message and return
DLT_E_MSG_TOO_LARGE. ⌋ ()

Note:
If the message is short enough for at least one assigned LogChannel, continue to
process this message for all LogChannels where the message is short enough.

7.1.9.5 Apply LogChannel LogLevelThreshold

In this step, the Dlt module decides, individually for each identified log and trace
channel, whether the current log or trace message may pass or not.

[SWS_Dlt_00667] ⌈Log messages with a log level numerically higher than the
configured value of LogChannel threshold for the identified LogChannel shall be
discarded and E_OK shall be returned. This shall be done on each LogChannel from
the list of output LogChannels for the Log Message, considering [SWS_Dlt_00665]. ⌋
()

[SWS_Dlt_00668] ⌈Trace messages shall be filtered out, when the config parameter
DltTraceStatus is FALSE for the identified LogChannel. That means they do not
proceed to the next processing step and E_OK is returned. ⌋ ()

7.1.9.6 Copying Dlt message to the LogChannel buffer

In this step the Dlt module copies the Dlt message to all buffers of the LogChannels,
which the Dlt message is assigned to.

[SWS_Dlt_00669] ⌈The Dlt module shall copy the log/trace message which has
passed the message filters to all assigned target LogChannel buffers where the Dlt
message length is not larger than DltLogChannelMaxMessageLength of the
respective LogChannel. ⌋ ()

[SWS_Dlt_00670] ⌈If there was not enough space to copy the complete message to
any of the assigned LogChannel’s buffer, DLT_E_NO_BUFFER shall be returned
and the Dlt log and trace message shall be discarded.
In addition, check each assigned buffer whether it was already full before, i.e., check
Dlt internal flags to store a buffer overflow event:
 If the buffer overflow flag is currently not set for this buffer:
o Set the buffer overflow flag to indicate the occurrence of a buffer overflow
o The Dlt log and trace message shall be discarded
 If the buffer overflow flag for this buffer was already set for this buffer:
o The Dlt log and trace message shall be discarded

27 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

 Send Dlt Control Message(s) “BufferOverflowNotification” according to the


configuration. Please refer to chapter 7.1.11.1.

⌋ ()

Note:
The cyclicly called Dlt_TxFunction checks the status of the buffer overflow flag
and the debounce time for sending buffer overflow notifications. This function also
sets back the flag cyclically according to a buffer overflow notification.

[SWS_Dlt_00671] ⌈If a new massage has been copied successfully to the assigned
LogChannel’s buffer, the message counter shall be increased by 1. This message
counter value shall be stored for the Dlt message. ⌋ ()

Note:
When the Dlt message is going to be transmitted, this message counter value will be
written into the Message Counter Field (MCNT).

[SWS_Dlt_00672] ⌈If a new massage has been copied successfully to at least one
LogChannel buffer, DLT_OK shall be returned. ⌋ ()

7.1.9.7 Sending messages from LogChannel Buffer

[SWS_Dlt_00780] ⌈The sending of Dlt messages via the PduR API shall be
decoupled from the Dlt_SendLogMessage and Dlt_SendTraceMessage API
call. ⌋ ()

Note:
The decoupling is done because of the following reasons:
1. Shortening runtime of calls from the SW-Cs/BSWs which trigger log/trace
messages, to reduce blocking time.
2. In case traffic shaping functionality is enabled, the transmissions have to be
processed by an asynchronous cyclic BSW entity anyway.
3. In case retry feature is enabled a decoupled BSW entity, which cares for
retries, is needed anyway.

[SWS_Dlt_00673] ⌈The Dlt module shall transmit Dlt messages collected in the
LogChannel specific buffer from the context of the Dlt_TxFunction function. ⌋ ()

[SWS_Dlt_00674] ⌈The Dlt Message Header shall be assembled before


PduR_DltTransmit is called. ⌋ ()

Note:
For details regarding the assembling of the Dlt Message Header, please refer to the
next section.

[SWS_Dlt_00675] ⌈The Dlt module shall use the PduR_DltTransmit function to


send the Dlt message with the configured TxPduId. ⌋ ()
28 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

[SWS_Dlt_00677] ⌈The Dlt module shall monitor a transmit counter for each Dlt
message in a LogChannel specific buffer. Each time it calls PduR_DltTransmit for
a Dlt message in the buffer, it shall increment the transmit counter. ⌋ ()

7.1.9.8 Create Dlt message header

Assembling the Dlt Header

[SWS_Dlt_00678] ⌈The UEH bit shall be set to ‘1’ if the parameters


DltUseExtHeaderInNonVerbMode is set to TRUE.
Otherwise, the UEH bit shall be set to ‘0’. ⌋ ()

[SWS_Dlt_00679] ⌈The MSBF bit shall be set to ‘1’ if the current platform is
BIGENDIAN. ⌋ ()

[SWS_Dlt_00680] ⌈The MSBF bit shall be set to ‘0’ if the current platform is
LITTLEENDIAN. ⌋ ()

[SWS_Dlt_00681] ⌈The WEID bit shall be set to ‘1’ if the parameter


DltHeaderUseEcuId is set to TRUE. Else, the WEID bit shall be set to ‘0’. ⌋ ()

[SWS_Dlt_00682] ⌈The WSID bit shall be set to ‘1’ if the parameter


DltHeaderUseSessionID is set to TRUE. Else, the WSID bit shall be set to ‘0’. ⌋ ()

[SWS_Dlt_00683] ⌈The WTMS bit shall be set to ‘1’ if the parameter


DltHeaderUseTimestamp is set to TRUE. Else, the WSID bit shall be set to ‘0’. ⌋ ()

[SWS_Dlt_00684] ⌈The VERS bits shall always be set to “001”. ⌋ ()

[SWS_Dlt_00685] ⌈The MCNT field shall be set to the stored value of this Dlt
message when it is copied to the LogChannel’s buffer. ⌋ ()

[SWS_Dlt_00686] ⌈ The optional ECU field shall only exist if DltHeaderUseEcuId


is set to TRUE. ⌋ ()

[SWS_Dlt_00687] ⌈The optional ECU field shall be set to the value configured in
DltEcuIdValue. If the configured ECU IDis shorter than 4 byte, the remaining
bytes shall be set to 0x00. ⌋ ()

[SWS_Dlt_00688] ⌈The optional SEID field shall be set to the value configured via
DltSwcSessionId and shall only exist if DltHeaderUseSessionID is set to
TRUE. ⌋ ()

[SWS_Dlt_00689] ⌈The optional TMSP field shall contain the derived timestamp if
DltHeaderUseTimestamp is set to TRUE. ⌋ ()

29 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

[SWS_Dlt_00690] ⌈The LEN field shall be set to the overall length of the finally
assembled Dlt Data Message, which shall be the sum of the length of the Header,
the length of the optional Extended Header, and the length of the Payload. ⌋ ()

Assembling the Dlt Extended Header

[SWS_Dlt_00691] ⌈If the parameter DltUseExtHeaderInNonVerbMode is set to


TRUE, the Dlt Extended Header has to be generated for Dlt Data Messages:
⌋ ()

[SWS_Dlt_00692] ⌈The VERB bit shall be set to ‘1 ’if the parameter


DltUseVerboseMode is set to TRUE. Else, the VERB bit shall be set to ‘0’. ⌋()

[SWS_Dlt_00693] ⌈The MSTP field shall be set to 0x0 if the Dlt message has to be
assembled due to the API call Dlt_SendLogMessage.⌋()

[SWS_Dlt_00694] ⌈The MSTP field shall be set to 0x1 if the Dlt message has to be
assembled due to the API call Dlt_SendTraceMessage.⌋()

[SWS_Dlt_00695] ⌈The MTIN field shall be set accordingly to the


Dlt_MessageLogInfoTyp value, which has been passed by the API
Dlt_SendLogMessage. ⌋()

[SWS_Dlt_00696] ⌈The MTIN field shall be set accordingly to the


Dlt_MessageTraceInfoType value, which has been passed by the API
Dlt_SendTraceMessage. ⌋()

7.1.9.9 Removing messages from LogChannel buffer

[SWS_Dlt_00697] ⌈A Dlt message, for which PduR_DltTransmit has been called,


shall be removed from the LogChannel specific buffer in the following cases:
 PduR_DltTransmit has returned with E_NOT_OK,
 A positive TX confirmation for this TxPduId has been received, or
 A negative TX confirmation for this TxPduId has been received and the
transmit counter of the Dlt message is greater than the configured
DltLogChannelMaxNumOfRetries.
⌋ ()

7.1.10 Receiving of Dlt commands

The Dlt module can receive Dlt commands via the Rx Data Path and/or via dedicated
API calls (see chapter 8). These Dlt commands can be used to control the Dlt
module.

[SWS_Dlt_00698] ⌈The Dlt module shall ignore all received Dlt control messages via
the Rx Data Path in case the parameter DltGeneralRxDataPathSupport is set to
FALSE. ⌋ ()

30 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Note:
In case the Rx Data Path is disabled, the Dlt client can be controlled via the optional
control APIs defined in chapter 8.

[SWS_Dlt_00699] ⌈If DltGeneralRxDataPathSupport is set to TRUE, the Dlt


module shall process received Dlt control messages. ⌋ ()

[SWS_Dlt_00700] ⌈If a received Dlt command has been executed successfully, “OK”
shall be returned. ⌋ ()

7.1.10.1 SetLogLevel

[SWS_Dlt_00701] ⌈If the Dlt command “SetLogLevel” is requested, the new LogLevel
shall be stored for the received tuple of ApplicationId/ContextId. ⌋ ()

[SWS_Dlt_00702] ⌈If the Dlt command “SetLogLevel” is requested, but the received
tuple of ApplicationId/ContextId is unknown, the Dlt command shall be
answered with “ERROR”. ⌋ ()

7.1.10.2 SetTraceStatus

[SWS_Dlt_00703] ⌈If the Dlt command “SetTraceStatus” is requested, the new trace
status shall be stored for the received tuple of ApplicationId/ContextId. ⌋ ()

[SWS_Dlt_00704] ⌈If the Dlt command “SetTraceStatus” is requested, but the


addressed tuple of ApplicationId/ContextId is unknown, the Dlt command
shall be answered with “ERROR”. ⌋ ()

7.1.10.3 GetLogInfo

[SWS_Dlt_00705] ⌈If the Dlt command “GetLogInfo” is requested, the requested


LogInfo shall be returned. ⌋ ( )

[SWS_Dlt_00706] ⌈If the Dlt command “GetLogInfo” is requested, but the addressed
tuple of ApplicationId/ContextId is unknown, the Dlt command shall be
answered with “ERROR”. ⌋ ()

7.1.10.4 GetDefaultLogLevel

[SWS_Dlt_00708] ⌈If the Dlt command “GetDefaultLogLevel” is requested, the


current value of the parameter DltDefaultLogLevel shall be returned. ⌋ ()

31 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

7.1.10.5 StoreConfiguration

[SWS_Dlt_00709] ⌈If the Dlt command “StoreConfiguration” is requested and the


configuration parameter DltGeneralNvRAMSupport is set to TRUE, the following
steps shall be performed:
 Call NvM_WriteBlock to store the current configuration of the
LogChannelAssignment, LogChannelThreshold, and the LogLevelFilter.
o If NvM_WriteBlock returned with E_OK, the Dlt command
“StoreConfiguration” shall return with “OK”.
o If NvM_WriteBlock returned with something else than E_OK, the Dlt
command “StoreConfiguration” shall return with “ERROR”.
⌋()

[SWS_Dlt_00710] ⌈If the Dlt command “StoreConfiguration” is requested and the


configuration parameter DltGeneralNvRAMSupport is set to FALSE, the Dlt
command “StoreConfiguration” shall return “NOT_SUPPORTED”. ⌋ ()

7.1.10.6 RestoreToFactoryDefault

[SWS_Dlt_00711] ⌈If the Dlt command “RestoreToFactoryDefault” is requested and if


the parameter DltGeneralNvRAMSupport is set to FALSE, reset the following
runtime parameters to the values stored in the Dlt module’s static configuration:
 DltDefaultLogLevel
 DltThreshold
 DltDefaultTraceStatus
 DltLogChannelThreshold
 DltDefaultLogChannelRef
⌋ ()

[SWS_Dlt_00712] ⌈If the Dlt command “RestoreToFactoryDefault” is requested and if


the parameter DltGeneralNvRAMSupport is set to TRUE, delete the stored
configuration of the NvM by calling NvM_EraseNvBlock and reset the following
runtime parameters to the values stored in the Dlt module’s static configuration:
 DltDefaultLogLevel
 DltThreshold
 DltDefaultTraceStatus
 DltLogChannelThreshold
 DltDefaultLogChannelRef
⌋ ()

[SWS_Dlt_00713] ⌈If the Dlt command “RestoreToFactoryDefault” is requested and if


the parameter DltGeneralNvRAMSupport is set to FALSE, “OK” shall be returned
if the Dlt module reset the current configuration values to the default configuration
successfully. ⌋ ()

[SWS_Dlt_00714] ⌈If the Dlt command “RestoreToFactoryDefault” is requested and


the parameter DltGeneralNvRAMSupport is set to TRUE, response with
“ERROR”
32 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

 if the Dlt module could not reset the current configuration to the static default
configuration or
 if the stored configuration of the NvM could not be deleted. ⌋ ()

7.1.10.7 SetMessageFiltering

[SWS_Dlt_00775] ⌈If the Dlt command “SetMessageFiltering” is requested, all the Dlt
filters shall be enabled/disabled as requested, and the Dlt command shall be
answered with “OK”. ⌋ ( )

7.1.10.8 SetDefaultLogLevel

[SWS_Dlt_00715] ⌈If the Dlt command “SetDefaultLogLevel” is requested, the


parameter DltDefaultLogLevel shall be updated to the received new LogLevel. ⌋
()

7.1.10.9 SetDefaultTraceStatus

[SWS_Dlt_00716] ⌈If the Dlt command “SetDefaultTraceStatus” is requested, the


parameter DltDefaultTraceStatus shall be updated to the received new
TraceStatus. ⌋ ()

7.1.10.10 GetDefaultTraceStatus

[SWS_Dlt_00717] ⌈If the Dlt command “GetDefaultTraceStatus” is requested, the


current value of the parameter DltDefaultTraceStatus shall be returned. ⌋ ()

7.1.10.11 GetLogChannelNames

[SWS_Dlt_00718] ⌈If the Dlt command “GetLogChannelNames” is requested, the


number of configured LogChannels and requested number of LogChannel names
given by the parameter DltLogChannelName shall be returned.⌋ ()

7.1.10.12 GetTraceStatus

[SWS_Dlt_00719] ⌈If the Dlt Command “GetTraceStatus” is requested, the


TraceStatus shall be returned for the received tuple of
ApplicationId/ContextId. ⌋ ()

7.1.10.13 SetLogChannelAssignment

[SWS_Dlt_00720] ⌈If the Dlt command “SetLogChannelAssignment” is requested


with parameter addRemoveOp set to DLT_ASSIGN_ADD, add the tuple of
ApplicationId/ContextId to the LogChannel with the name provided by the

33 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

parameter logChannelName. The Dlt command shall return “OK” even if the tuple
was already assigned to the requested LogChannel before. ⌋ ()

[SWS_Dlt_00721] ⌈If the Dlt command “SetLogChannelAssignment” is requested


with parameter addRemoveOp set to DLT_ASSIGN_REMOVE, remove the tuple of
ApplicationId/ContextId from the LogChannel with the name provided by the
parameter logChannelName. The Dlt command shall return “OK” even if the tuple
was not assigned to the requested LogChannel before. ⌋ ()

Note:
If a tuple of ApplicationId/ContextId is not assigned explicitly to any specific
LogChannel (any more), the mandatory default LogChannel (see
DltDefaultLogChannelRef) will be used for transmission.

[SWS_Dlt_00722] ⌈If the Dlt command “SetLogChannelAssignment” is requested


with an unknown tuple of ApplicationId/ContextId or an unknown LogChannel
name, the Dlt command shall return “ERROR”. ⌋ ()

7.1.10.14 SetLogChannelThreshold

[SWS_Dlt_00723] ⌈If the Dlt command “SetLogChannelThreshold” is requested, the


LogChannelThreshold of the addressed LogChannel shall be set to the value
received by the parameter newThreshold. ⌋ ()

[SWS_Dlt_00724] ⌈If the Dlt command “SetLogChannelThreshold” is requested and


the logChannelName and/or the newThreshold is unknown, the Dlt command
shall return “ERROR”. ⌋ ()

7.1.10.15 GetLogChannelThreshold

[SWS_Dlt_00725] ⌈If the Dlt command “GetLogChannelThreshold” is requested, the


LogChannelThreshold of the addressed LogChannel shall be returned. ⌋ ()

[SWS_Dlt_00726] ⌈If the Dlt command “GetLogChannelThreshold” is requested and


the logChannelName or the newThreshold is unknown, the Dlt command shall
return “ERROR”. ⌋ ()

7.1.11 Sending of Dlt commands

Typically, the Dlt module receives Dlt commands generated by a Dlt logging tool,
which are answered by the Dlt module. Only two Dlt commands are triggered for
sending by the Dlt module itself:
 GetLogInfo (only in case one or more SW-Cs register/unregister themselves)
 BufferOverflowNotification (in case of a buffer overflow)

34 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

7.1.11.1 BufferOverflowNotification

The buffer overflow notification is used to inform the Dlt Logging tool about the loss of
Dlt messages. The amount of BufferOverflowNotifications on the bus can be
limited/debounced by configuration. This notification contains a counter which
indicates the amount of lost Dlt messages since the last BufferOverflowNotification.

[SWS_Dlt_00776] ⌈If the Dlt module detects a buffer overflow, it shall send a Dlt
command “BufferOverflowNotification” cyclically (see
DltLogChannelBufferOverflowTimer) as long as the buffer is still full. ⌋ ()

[SWS_Dlt_00777] ⌈The parameter overflowCounter of the Dlt control message


“BufferOverflowNotification” shall be set to the number of lost Dlt messages since the
last transmission of the “BufferOverflowNotification”. ⌋ ()

7.2 Error classification

7.2.1 Development errors

[SWS_Dlt_00727]⌈
Type of error Related error code Error value

API service called with wrong parameter DLT_E_PARAM 0x01

Null pointer has been passed as an argument DLT_E_PARAM_POINTER 0x02

Initialization failed DLT_E_INIT_FAILED 0x03

Registration failed DLT_E_REGISTRATION 0x04

⌋()

7.2.2 Runtime errors

[SWS_Dlt_00728]⌈
Error
Type of error Related error code
value

DLT_E_SKIPPED_
Message could not be sent 0x05
TRANSMISSION

A deprecated parameter with a value different to 0 for a DLT_E_DEPRECATED_


0x06
Dlt command has been received PARAMETER

DLT_E_MULTIPLE_
Multiple Control Requests at the same time 0x07
REQUESTS

35 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

⌋()

7.2.3 Transient faults

There are no transient faults.

7.2.4 Production errors

There are no production errors.

7.2.5 Extended production errors

There are no extended production errors.

36 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8 API specification

8.1 Imported types


In this section all types imported from the following modules are listed:

The following types are imported from the specified modules:

[SWS_Dlt_00781]⌈
Module Header File Imported Type

ComStack_Types.h BufReq_ReturnType

ComStack_Types.h PduIdType

ComStack_Types.h PduInfoType
ComStack_Types
ComStack_Types.h PduLengthType

ComStack_Types.h RetryInfoType

ComStack_Types.h TpDataStateType

Gpt.h Gpt_ChannelType
Gpt
Gpt.h Gpt_ValueType

NvM Rte_NvM_Type.h NvM_BlockIdType

Rte_StbM_Type.h StbM_SynchronizedTimeBaseType

Rte_StbM_Type.h StbM_TimeBaseStatusType

StbM Rte_StbM_Type.h StbM_TimeStampExtendedType

Rte_StbM_Type.h StbM_TimeStampType

Rte_StbM_Type.h StbM_UserDataType

Std_Types.h Std_ReturnType
Std
Std_Types.h Std_VersionInfoType

⌋()

8.2 Type definitions

8.2.1 Dlt_ConfigType

[SWS_Dlt_00437]⌈
37 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Name Dlt_ConfigType

Kind Structure

implementation specific

Elements Type --

Comment The content of the initialization data structure is implementation specific

Description This is the type of the data structure containing the initialization data for Dlt.

Available via Dlt.h

⌋(SRS_BSW_00414)

8.2.2 Dlt_MessageType

[SWS_Dlt_00224]⌈
Name Dlt_MessageType

Kind Enumeration

DLT_TYPE_LOG 0x00 A log message

DLT_TYPE_APP_
0x01 A trace message
TRACE
Range
DLT_TYPE_NW_ A message forwarded from a communication bus (like
0x02
TRACE CAN, FlexRay)

DLT_TYPE_ A message for internal use/control sent between Dlt


0x03
CONTROL module and external client.

Description This type describes the type of the message.

Available
Dlt.h
via

⌋()

8.2.3 Dlt_MessageIDType

[SWS_Dlt_00228]⌈
Name Dlt_MessageIDType

Kind Array Element type uint8

Size 4 Elements

Contains the unique MessageId for a message. This is only relevant in non-verbose
Description
mode.

Available
Dlt.h
via
38 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

⌋()

8.2.4 Dlt_MessageNetworkTraceInfoType

[SWS_Dlt_00233]⌈
Name Dlt_MessageNetworkTraceInfoType

Kind Enumeration

DLT_NW_TRACE_IPC 0x01 Inter process communication

DLT_NW_TRACE_CAN 0x02 CAN communication

DLT_NW_TRACE_FLEXRAY 0x03 Flexray communication


Range
DLT_NW_TRACE_MOST 0x04 MOST communication

DLT_NW_TRACE_ETHERNET 0x05 Ethernet communication

DLT_NW_TRACE_SOMEIP 0x06 SOME/IP communication

Description This type describes transported type of a Dlt BUSMESSAGE.

Available via Dlt.h

⌋()

8.3 Function definitions


This is a list of functions provided for upper layer modules.

8.3.1 Dlt_Init

[SWS_Dlt_00239]⌈
Service Name Dlt_Init

void Dlt_Init (
Syntax const Dlt_ConfigType* config
)

Service ID
0x01
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters
config Pointer to a DLT configuration structure
(in)

39 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Parameters
None
(inout)

Parameters
None
(out)

Return value None

Dlt is using the NVRamManager and is to be initialized very late in the ECU startup
Description phase. The Dlt_Init() function should be called after the NVRamManager is
initialized.

Available via Dlt.h

⌋(SRS_BSW_00344, SRS_BSW_00404, SRS_BSW_00405, SRS_BSW_00101,


SRS_BSW_00407, SRS_BSW_00358, SRS_BSW_00414)

[SWS_Dlt_00453] ⌈If the parameter DltGeneralNvRAMSupport is set to TRUE,


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
[SWS_Dlt_00239] in the Dlt_Init function. ⌋ (RS_LT_00039)

8.3.2 Dlt_GetVersionInfo

[SWS_Dlt_00271]⌈
Service Name Dlt_GetVersionInfo

void Dlt_GetVersionInfo (
Syntax Std_VersionInfoType* versioninfo
)

Service ID [hex] 0x02

Sync/Async Synchronous

Reentrancy Reentrant

Parameters (in) None

Parameters (inout) None

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.

Available via Dlt.h

⌋(SRS_BSW_00402)

40 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.3.3 Dlt_SendTraceMessage

[SWS_Dlt_00243]⌈
Service Name Dlt_SendTraceMessage

Std_ReturnType Dlt_SendTraceMessage (
Dlt_SessionIDType sessionId,
const Dlt_MessageTraceInfoType* traceInfo,
Syntax
const uint8* traceData,
uint16 traceDataLength
)

Service ID
0x04
[hex]

Sync/Async Synchronous

Reentrancy Reentrant

Number of the module (Module ID within BSW, Port defined


sessionId
argument value within SW-C)

Structure containing the relevant information for filtering the


traceInfo
message.
Parameters
(in)
Buffer containing the parameters to be traced. The contents of this
traceData
pointer represents the payload of the Trace Message to be sent.

traceData
Length of the data buffer traceData
Length

Parameters
None
(inout)

Parameters
None
(out)

E_OK: The required operation succeeded.


DLT_E_MSG_TOO_LARGE: The message is too large for all
assigned LogChannels.
Std_-
Return value DLT_E_NO_BUFFER: Not enough buffer available, the Dlt message
ReturnType
cannot be buffered for at least one LogChannel.
DLT_E_UNKNOWN_SESSION_ID: The provided session id is
unknown.

The service represents the interface to be used by basic software modules or by


Description
software components to trace parameters.

Available via Dlt.h

⌋(RS_LT_00003)⌋

8.3.4 Dlt_SendLogMessage

[SWS_Dlt_00241]⌈
Service Name Dlt_SendLogMessage

41 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Std_ReturnType Dlt_SendLogMessage (
Dlt_SessionIDType sessionId,
const Dlt_MessageLogInfoType* logInfo,
Syntax
const uint8* logData,
uint16 logDataLength
)

Service ID
0x03
[hex]

Sync/Async Synchronous

Reentrancy Reentrant

For SW-C this is not visible (Port defined argument value), for BSW-
sessionId
modules it is the module number

Structure containing the relevant information for filtering the


logInfo
message.
Parameters
(in)
Buffer containing the parameters to be logged. The contents of this
logData
pointer represents the payload of the Log Message to be sent.

logData
Length of the data buffer logData.
Length

Parameters
None
(inout)

Parameters
None
(out)

DLT_OK: The required operation succeeded.


DLT_E_MSG_TOO_LARGE: The message is too large for all
assigned LogChannels
Std_-
Return value DLT_E_NO_BUFFER: The LogMessage could not be buffered at
ReturnType
any assigned LogChannel
DLT_E_UNKNOWN_SESSION_ID: The provided session id is
unknown.

The service represents the interface to be used by basic software modules or by


Description
software component to send Log Messages.

Available via Dlt.h

⌋(RS_LT_00003)

8.3.5 Dlt_RegisterContext

[SWS_Dlt_00245]⌈
Service
Dlt_RegisterContext
Name

Std_ReturnType Dlt_RegisterContext (
Dlt_SessionIDType sessionId,
Syntax Dlt_ApplicationIDType appId,
Dlt_ContextIDType contextId,

42 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

const uint8* appDescription,


uint8 lenAppDescription,
const uint8* contextDescription,
uint8 lenContextDescription
)

Service ID
0x05
[hex]

Sync/Async Synchronous

Reentrancy Reentrant

number of the module (Module ID within BSW, Port defined


sessionId
argument value within SW-C)

appId the ApplicationId

contextId the ContextId

Points to description string for the provided ApplicationId. At


appDescription
Parameters maximum 255 characters are interpreted.
(in)
The length of the description for the ApplicationId string
lenAppDescription
(number of characters of description string).

Points to description string for the provided context. At


contextDescription
maximum 255 characters are interpreted.

lenContext The length of the description string (number of characters of


Description description string).

Parameters
None
(inout)

Parameters
None
(out)

E_OK: The required operation succeeded.


DLT_E_CONTEXT_ALREADY_REG: The software module
Return value Std_ReturnType context has already registered.
DLT_E_UNKNOWN_SESSION_ID: The provided session id is
unknown.

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 ContextId is being registered
Description
for an already registered ApplicationId then appDescription can be NULL and len_
appDescription zero.

Available via Dlt.h

⌋(RS_LT_00033)

8.3.6 Dlt_UnregisterContext

[SWS_Dlt_00769]⌈

43 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Service Name Dlt_UnregisterContext

Std_ReturnType Dlt_UnregisterContext (
Dlt_SessionIDType sessionId,
Syntax Dlt_ApplicationIDType appId,
Dlt_ContextIDType contextId
)

Service ID [hex] 0x16

Sync/Async Synchronous

Reentrancy Reentrant

number of the module (Module ID within BSW, Port defined


sessionId
argument value within SW-C)
Parameters (in)
appId the ApplicationId

contextId the ContextId

Parameters
None
(inout)

Parameters
None
(out)

E_OK: The required operation succeeded.


DLT_E_CONTEXT_NOT_YET_REG: The software module
Std_Return-
Return value context has not registered before.
Type
DLT_E_UNKNOWN_SESSION_ID: The provided session id is
unknown.

Description The service has to be called when a software module is going to be stopped.

Available via Dlt.h

⌋(RS_LT_00033)

8.3.7 Dlt_DetForwardErrorTrace

[SWS_Dlt_00432]⌈
Service Name Dlt_DetForwardErrorTrace

void Dlt_DetForwardErrorTrace (
uint16 moduleId,
uint8 instanceId,
Syntax
uint8 apiId,
uint8 errorId
)

Service ID
0x07
[hex]

Sync/Async Synchronous

44 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Reentrancy Non Reentrant

module
Module ID of calling module.
Id

instance The identifier of the index based instance of a module, starting from 0. If
Parameters Id the module is a single instance module it shall pass 0 as the instanceId.
(in)
ID of API service in which error is detected (defined in SWS of calling
apiId
module)

errorId ID of detected development error (defined in SWS of calling module).

Parameters
None
(inout)

Parameters
None
(out)

Return value None

Description Service to forward error reports from Det to Dlt.

Available via Dlt_Det.h

⌋(RS_LT_00006)

8.3.8 Dlt_SetLogLevel

[SWS_Dlt_00252]⌈
Service Name Dlt_SetLogLevel

Std_ReturnType Dlt_SetLogLevel (
Dlt_ApplicationIDType appId,
Syntax Dlt_ContextIDType contextId,
Dlt_MessageLogLevelType newLogLevel
)

Service ID [hex] 0x08

Sync/Async Synchronous

Reentrancy Reentrant

appId ID of the SW-C

Parameters (in) contextId ID of the context

newLogLevel new log level to set

Parameters
None
(inout)

Parameters (out) None

E_OK: No error occurred


Return value Std_ReturnType
E_NOT_OK: LogLevel could not be changed
45 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

This service is used to change the LogLevel for the given tuple of ApplicationID/
Description
ContextID.

Available via Dlt.h

⌋(RS_LT_00004, RS_LT_00038)

8.3.9 Dlt_SetTraceStatus

[SWS_Dlt_00254]⌈
Service Name Dlt_SetTraceStatus

Std_ReturnType Dlt_SetTraceStatus (
Dlt_ApplicationIDType appId,
Syntax Dlt_ContextIDType contextId,
boolean newTraceStatus
)

Service ID [hex] 0x09

Sync/Async Synchronous

Reentrancy Non Reentrant

appId ID of the SW-C

Parameters (in) contextId ID of the context

newTraceStatus New trace status

Parameters
None
(inout)

Parameters (out) None

E_OK: No error occurred


Return value Std_ReturnType
E_NOT_OK: Trace status could not be changed

The service Dlt_SetTraceStatus sets the trace status for a specific tuple of
Description
ApplicationID and ContextID.

Available via Dlt.h

⌋(RS_LT_00004, RS_LT_00038)

8.3.10 Dlt_GetLogInfo

46 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

[SWS_Dlt_00732]⌈
Service Name Dlt_GetLogInfo

Std_ReturnType Dlt_GetLogInfo (
uint8 options,
Dlt_ApplicationIDType appId,
Syntax Dlt_ContextIDType contextId,
uint8* status,
Dlt_LogInfoType* logInfo
)

Service ID [hex] 0x0a

Sync/Async Synchronous

Reentrancy Non Reentrant

Used to filter the response in respect to the ApplicationId, Context


options
Id and Trace Status information
Parameters (in)
appId Representation of the ApplicationId

contextId Representation of the ContextId

Parameters
None
(inout)

status --
Parameters
(out)
logInfo Details about the returned Application IDs

Std_Return- E_OK: No error occurred


Return value
Type E_NOT_OK: LogInfo could not be returned

Called to request information about registered ApplicationIds, their ContextIds and


Description
the corresponding log level.

Available via Dlt.h

⌋()

8.3.11 Dlt_GetDefaultLogLevel

[SWS_Dlt_00733]⌈
Service Name Dlt_GetDefaultLogLevel

Std_ReturnType Dlt_GetDefaultLogLevel (
Syntax Dlt_MessageLogLevelType* defaultLogLevel
)

Service ID
0x18
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant

47 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Parameters
None
(in)

Parameters
None
(inout)

Parameters
defaultLogLevel Returns the stored LogLevel setting
(out)

E_OK: No error occurred


Return value Std_ReturnType
E_NOT_OK: The default LogLevel could not be returned

Returns the Default Log Level currently used by the Dlt module. The returned Log
Description
Level might differ from the one which is stored non volatile.

Available via Dlt.h

⌋()

[SWS_Dlt_00734] ⌈A call to Dlt_GetDefaultLogLevel shall return with


E_NOT_OK if the Dlt module cannot return the current value of the parameter
DltDefaultLogLevel. ⌋ ()

[SWS_Dlt_00735] ⌈A call to Dlt_GetDefaultLogLevel shall return with


E_NOT_OK if the Dlt module cannot return the current value of the parameter
DltDefaultLogLevel. ⌋ ()

8.3.12 Dlt_StoreConfiguration

[SWS_Dlt_00736]⌈
Service Name Dlt_StoreConfiguration

Std_ReturnType Dlt_StoreConfiguration (
Syntax void
)

Service ID [hex] 0x1a

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters (in) None

Parameters (inout) None

Parameters (out) None

E_OK: No error occurred


Return value Std_ReturnType E_NOT_OK: The configuration could not be stored
DLT_E_NOT_SUPPORTED: Service is not supported

48 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Description Copies the current Dlt configuration to NvRAM by calling NvM_WriteBlock().

Available via Dlt.h

⌋()

[SWS_Dlt_00737] ⌈If the parameter DltGeneralNvRAMSupport is set to FALSE, a


call to Dlt_StoreConfiguration shall return with DLT_NOT_SUPPORTED. ⌋ ()

[SWS_Dlt_00729] ⌈If the parameter DltGeneralNvRAMSupport is set to TRUE, a


call to Dlt_StoreConfiguration shall return with DLT_E_ERROR in case the
call to NvM_WriteBlock returned with E_NOT_OK. ⌋ ()

[SWS_Dlt_00738] ⌈If the parameter DltGeneralNvRAMSupport is set to TRUE, a


call to Dlt_StoreConfiguration shall return with DLT_OK in case the call to
NvM_WriteBlock returned with E_OK. ⌋ ()

8.3.13 Dlt_ResetToFactoryDefault

[SWS_Dlt_00739]⌈
Service Name Dlt_ResetToFactoryDefault

Std_ReturnType Dlt_ResetToFactoryDefault (
Syntax void
)

Service ID
0x06
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters
None
(in)

Parameters
None
(inout)

Parameters
None
(out)

E_OK: Configuration has been reset successfully


Return value Std_ReturnType
E_NOT_OK: Configuration has not been reset

The service Dlt_ResetToFactoryDefault sets the LogLevel and TraceStatus back to


Description the persistently stored default values. If the feature NvMRAM support is enabled, all
stored Dlt values in the NvM are deleted.

Available via Dlt.h

49 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

⌋()

8.3.14 Dlt_SetMessageFiltering

[SWS_Dlt_00770]⌈
Service Name Dlt_SetMessageFiltering

Std_ReturnType Dlt_SetMessageFiltering (
Syntax boolean status
)

Service ID [hex] 0x1b

Sync/Async Synchronous

Reentrancy Non Reentrant

TRUE: enable message filtering FALSE: disable message


Parameters (in) status
filtering

Parameters
None
(inout)

Parameters (out) None

Std_Return- E_OK: No error occurred


Return value
Type E_NOT_OK: Setting of message filtering failed

Description Switches on/off the message filtering functionality of the Dlt module.

Available via Dlt.h

⌋()

8.3.15 Dlt_SetDefaultLogLevel

[SWS_Dlt_00740]⌈
Service Name Dlt_SetDefaultLogLevel

Std_ReturnType Dlt_SetDefaultLogLevel (
Syntax Dlt_MessageLogLevelType newLogLevel
)

Service ID [hex] 0x11

50 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Sync/Async Synchronous

Reentrancy Reentrant

Parameters (in) newLogLevel sets the new filter value

Parameters
None
(inout)

Parameters (out) None

E_OK: No error occurred


Return value Std_ReturnType
E_NOT_OK: Default LogLevel could not be set

Called to modify the pass through range for Log Messages for all not explicit set
Description
ContextIds.

Available via Dlt.h

⌋()

[SWS_Dlt_00741] ⌈If a call to Dlt_SetDefaultLogLevel successfully set the


addressed LogChannel to the requested LogLevel, it shall return with E_OK. ⌋ ()

[SWS_Dlt_00742] ⌈If a call to Dlt_SetDefaultLogLevel could not set the


addressed LogChannel to the requested LogLevel, it shall return with E_NOT_OK. ⌋
()

8.3.16 Dlt_SetDefaultTraceStatus

[SWS_Dlt_00743]⌈
Service Name Dlt_SetDefaultTraceStatus

Std_ReturnType Dlt_SetDefaultTraceStatus (
boolean newTraceStatus,
Syntax Dlt_LogChannelNameType logChannelName
)

Service ID [hex] 0x12

Sync/Async Synchronous

Reentrancy Reentrant

newTraceStatus enabling/disabling of Trace messages


Parameters (in)
logChannelName Name of the addressed LogChannel

Parameters (inout) None

Parameters (out) None

Return value Std_ReturnType E_OK: No error occurred

51 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

E_NOT_OK: Default Trace Status could not be set

Description Called to enable or disable trace messages for all not explicitly set ContextIds.

Available via Dlt.h

⌋()

[SWS_Dlt_00744] ⌈If a call to Dlt_SetDefaultTraceStatus successfully set the


addressed LogChannel to the requested new TraceStatus, it shall return with E_OK.
⌋ ()

[SWS_Dlt_00745] ⌈If a call to Dlt_SetDefaultTraceStatus could not set the


addressed LogChannel to the requested TraceStatus, it shall return with E_NOT_OK.
⌋ ()

8.3.17 Dlt_GetDefaultTraceStatus

[SWS_Dlt_00746]⌈
Service Name Dlt_GetDefaultTraceStatus

Std_ReturnType Dlt_GetDefaultTraceStatus (
Dlt_LogChannelNameType logChannelName,
Syntax
boolean* traceStatus
)

Service ID [hex] 0x19

Sync/Async Synchronous

Reentrancy Reentrant

Parameters (in) logChannelName Name of the addressed LogChannel

Parameters (inout) None

Parameters (out) traceStatus current trace status (enabled/disabled)

E_OK: No error occurred


Return value Std_ReturnType
E_NOT_OK: Default Trace Status could not be returned

Description Returns the current Trace Status of the addressed LogChannel.

Available via Dlt.h

⌋()

[SWS_Dlt_00747] ⌈If a call to Dlt_GetDefaultTraceStatus returned the current


Trace Status of the requested LogChannel, it shall return with E_OK. ⌋ ()

52 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

[SWS_Dlt_00748] ⌈If a call to Dlt_GetDefaultTraceStatus could not return the


addressed TraceStatus of the addressed LogChannel, it shall return with
E_NOT_OK. ⌋ ()

8.3.18 Dlt_GetLogChannelNames

[SWS_Dlt_00749]⌈
Service
Dlt_GetLogChannelNames
Name

Std_ReturnType Dlt_GetLogChannelNames (
uint8* numberOfLogChannels,
Syntax
Dlt_LogChannelNameType* logChannelNames
)

Service ID
0x17
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters
None
(in)

Parameters numberOfLog Contains the number of requested LogChannels names. On


(inout) Channels Return it holds the number of configured LogChannels

Parameters
logChannelNames Returns a list of configured LogChannel names
(out)

E_OK: No error occurred


Return value Std_ReturnType
E_NOT_OK: LogChannelNames could not be returned

The caller provides the number of logChannelNames to be returned. The function


returns the requested amount of LogChannelNames and updates numberOfLog
Description
Channels as the outgoing information on how many LogChannels are actually
configured.

Available via Dlt.h

⌋()

8.3.19 Dlt_GetTraceStatus

[SWS_Dlt_00750]⌈
Service Name Dlt_GetTraceStatus

Syntax Std_ReturnType Dlt_GetTraceStatus (

53 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Dlt_ApplicationIDType appId,
Dlt_ContextIDType contextId,
boolean* traceStatus
)

Service ID [hex] 0x1f

Sync/Async Synchronous

Reentrancy Non Reentrant

appId ApplicationId
Parameters (in)
contextId ContextId

Parameters (inout) None

Parameters (out) traceStatus current Trace Status of the tuple ApplicationId/ContextId

E_OK: No error occurred


Return value Std_ReturnType
E_NOT_OK: TraceStatus could not be returned

Description Returns the current Trace Status for a given tuple ApplicationId/ContextId.

Available via Dlt.h

⌋()

8.3.20 Dlt_SetLogChannelAssignment

[SWS_Dlt_00751]⌈
Service Name Dlt_SetLogChannelAssignment

Std_ReturnType Dlt_SetLogChannelAssignment (
Dlt_ApplicationIDType appId,
Dlt_ContextIDType contextId,
Syntax
Dlt_LogChannelNameType logChannelName,
Dlt_AssignmentOperation addRemoveOp
)

Service ID
0x20
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant

appId ID of the addressed application / SW-C

contextId ID of the addressed context


Parameters (in)
logChannel
Name of the addressed LogChannel
Name
54 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

addRemove Operation to add/remove the addressed tuple ApplicationId/


Op ContextId to/from the addressed LogChannel

Parameters
None
(inout)

Parameters
None
(out)

Std_Return- E_OK: No error occurred


Return value
Type E_NOT_OK: LogChannel assignment failed

Adds/removes the addressed tuple ApplicationId/ContextId to/from the addressed


Description
LogChannel.

Available via Dlt.h

⌋()

8.3.21 Dlt_SetLogChannelThreshold

[SWS_Dlt_00752]⌈
Service Name Dlt_SetLogChannelThreshold

Std_ReturnType Dlt_SetLogChannelThreshold (
Dlt_LogChannelNameType logChannelName,
Syntax Dlt_MessageLogLevelType newThreshold,
boolean newTraceStatus
)

Service ID [hex] 0x21

Sync/Async Synchronous

Reentrancy Reentrant for different LogChannelNames

logChannel
Name of the addressed LogChannel
Name

Parameters (in) newThreshold Threshold for LogMessages

TRUE: enable TraceMessages FALSE: disable Trace


newTraceStatus
Messages

Parameters
None
(inout)

Parameters (out) None

E_OK: No error occurred


Return value Std_ReturnType
E_NOT_OK: Setting of LogChannelThreshold failed

Description Sets the filter threshold for the given LogChannel.

Available via Dlt.h

55 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

⌋()

8.3.22 Dlt_GetLogChannelThreshold

[SWS_Dlt_00753]⌈
Service Name Dlt_GetLogChannelThreshold

Std_ReturnType Dlt_GetLogChannelThreshold (
Dlt_LogChannelNameType logChannelName,
Syntax Dlt_MessageLogLevelType* logChannelThreshold,
boolean* traceStatus
)

Service ID [hex] 0x22

Sync/Async Synchronous

Reentrancy Reentrant for different LogChannelNames

Parameters (in) logChannelName Addressed LogChannel name

Parameters
None
(inout)

logChannel
Current LogChannelThreshold
Threshold
Parameters
(out)
Current TraceStatus. TRUE: TraceMessages enabled.
traceStatus
FALSE: TraceMessages disabled.

E_OK: No error occurred


Return value Std_ReturnType
E_NOT_OK: LogChannelThreshold could not be returned

Description Returns the filter threshold for the given LogChannel.

Available via Dlt.h

⌋()

8.3.23 Dlt_InjectCall_<SESSION>

[SWS_Dlt_00259]⌈
Service Name Dlt_InjectCall_<SESSION>

void Dlt_InjectCall_<SESSION> (
Syntax Dlt_ApplicationIDType appId,

56 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Dlt_ContextIDType contextId,
uint32 serviceId,
uint32 dataLength,
const uint8* data
)

Service ID
0x14
[hex]

Sync/Async Asynchronous

Reentrancy Non Reentrant

appId the Application ID

contextId the Context ID

Parameters serviceId the service ID for the injection (user defined)


(in)
dataLength length of the data puffer provided

pointer to data puffer with data belonging to the injection (service ID).
data
The contents of the data is user defined

Parameters
None
(inout)

Parameters
None
(out)

Return value None

Callback is called by Dlt to inject a function call in the SW-C. The behaviour trigged
Description by this function should depend on the service_id also the interpretation of the user
data. Both are specific to the application.

Available via Dlt.h

⌋()

8.4 Call-back notifications


This is a list of functions provided for other modules. The function prototypes of the
callback functions shall be provided in the file Dlt_Cbk.h.

8.4.1 Dlt_RxIndication

[SWS_Dlt_00272]⌈
Service Name Dlt_RxIndication

void Dlt_RxIndication (
Syntax
PduIdType RxPduId,
57 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

const PduInfoType* PduInfoPtr


)

Service ID
0x42
[hex]

Sync/Async Synchronous

Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.

RxPdu
ID of the received PDU.
Id
Parameters
(in) Contains the length (SduLength) of the received PDU, a pointer to a
Pdu
buffer (SduDataPtr) containing the PDU, and the MetaData related to this
InfoPtr
PDU.

Parameters
None
(inout)

Parameters
None
(out)

Return value None

Description Indication of a received PDU from a lower layer communication interface module.

Available via Dlt.h

⌋()

8.4.2 Dlt_TriggerTransmit

[SWS_Dlt_00754]⌈
Service
Dlt_TriggerTransmit
Name

Std_ReturnType Dlt_TriggerTransmit (
PduIdType TxPduId,
Syntax
PduInfoType* PduInfoPtr
)

Service ID
0x41
[hex]

Sync/Async Synchronous

Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.

Parameters
TxPduId ID of the SDU that is requested to be transmitted.
(in)

Parameters PduInfoPtr Contains a pointer to a buffer (SduDataPtr) to where the SDU data shall
58 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

(inout) be copied, and the available buffer size in SduLengh. On return, the
service will indicate the length of the copied SDU data in SduLength.

Parameters
None
(out)

E_OK: SDU has been copied and SduLength indicates the number of
Std_-
copied bytes.
Return value Return-
E_NOT_OK: No SDU data has been copied. PduInfoPtr must not be
Type
used since it may contain a NULL pointer or point to invalid data.

Within this API, the upper layer module (called module) shall check whether the
available data fits into the buffer size reported by PduInfoPtr->SduLength. If it fits, it
Description shall copy its data into the buffer provided by PduInfoPtr->SduDataPtr and update
the length of the actual copied data in PduInfoPtr->SduLength. If not, it returns E_
NOT_OK without changing PduInfoPtr.

Available via Dlt.h

⌋()

[SWS_Dlt_00755] ⌈If development error detection is enabled for this module, the
module shall check all parameters for being valid. If the check fails, the function shall
raise a development error and return. ⌋ ()

8.4.3 Dlt_TxConfirmation

[SWS_Dlt_00273]⌈
Service Name Dlt_TxConfirmation

void Dlt_TxConfirmation (
PduIdType TxPduId,
Syntax Std_ReturnType result
)

Service ID [hex] 0x40

Sync/Async Synchronous

Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.

TxPduId ID of the PDU that has been transmitted.


Parameters (in)
E_OK: The PDU was transmitted. E_NOT_OK: Transmission of the
result
PDU failed.

Parameters
None
(inout)

Parameters
None
(out)

59 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Return value None

The lower layer communication interface module confirms the transmission of a


Description
PDU, or the failure to transmit a PDU.

Available via Dlt.h

⌋()

8.4.4 Dlt_TpTxConfirmation

[SWS_Dlt_00756]⌈
Service Name Dlt_TpTxConfirmation

void Dlt_TpTxConfirmation (
PduIdType id,
Syntax Std_ReturnType result
)

Service ID
0x48
[hex]

Sync/Async Synchronous

Reentrancy Reentrant

id Identification of the transmitted I-PDU.


Parameters
(in)
result Result of the transmission of the I-PDU.

Parameters
None
(inout)

Parameters
None
(out)

Return value None

This function is called after the I-PDU has been transmitted on its network, the
Description
result indicates whether the transmission was successful or not.

Available via Dlt.h

⌋()

8.4.5 Dlt_CopyTxData

[SWS_Dlt_00516]⌈
Service
Dlt_CopyTxData
Name

Syntax BufReq_ReturnType Dlt_CopyTxData (

60 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

PduIdType id,
const PduInfoType* info,
const RetryInfoType* retry,
PduLengthType* availableDataPtr
)

Service ID
0x43
[hex]

Sync/Async Synchronous

Reentrancy Reentrant

id Identification of the transmitted I-PDU.

Provides the destination buffer (SduDataPtr) and the number of bytes to


be copied (SduLength). If not enough transmit data is available, no data
is copied by the upper layer module and BUFREQ_E_BUSY is returned.
info The lower layer module may retry the call. An SduLength of 0 can be
used to indicate state changes in the retry parameter or to query the
current amount of available data in the upper layer module. In this case,
the SduDataPtr may be a NULL_PTR.

This parameter is used to acknowledge transmitted data or to retransmit


Parameters data after transmission problems.
(in) If the retry parameter is a NULL_PTR, it indicates that the transmit data
can be removed from the buffer immediately after it has been copied.
Otherwise, the retry parameter must point to a valid RetryInfoType
element.
If TpDataState indicates TP_CONFPENDING, the previously copied
retry
data must remain in the TP buffer to be available for error recovery. TP_
DATACONF indicates that all data that has been copied before this call
is confirmed and can be removed from the TP buffer. Data copied by
this API call is excluded and will be confirmed later. TP_DATARETRY
indicates that this API call shall copy previously copied data in order to
recover from an error. In this case TxTpDataCnt specifies the offset in
bytes from the current data copy position.

Parameters
None
(inout)

Indicates the remaining number of bytes that are available in the upper
Parameters available layer module's Tx buffer. availableDataPtr can be used by TP modules
(out) DataPtr that support dynamic payload lengths (e.g. FrIsoTp) to determine the
size of the following CFs.

BUFREQ_OK: Data has been copied to the transmit buffer completely


as requested.
BufReq_-
Return BUFREQ_E_BUSY: Request could not be fulfilled, because the required
Return-
value amount of Tx data is not available. The lower layer module may retry
Type
this call later on. No data has been copied.
BUFREQ_E_NOT_OK: Data has not been copied. Request failed.

This function is called to acquire the transmit data of an I-PDU segment (N-PDU).
Each call to this function provides the next part of the I-PDU data unless retry->Tp
Description DataState is TP_DATARETRY. In this case the function restarts to copy the data
beginning at the offset from the current position indicated by retry->TxTpDataCnt.
The size of the remaining data is written to the position indicated by availableDataPtr.

Available Dlt.h

61 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

via

⌋(RS_LT_00034)

8.4.6 Dlt_StartOfReception

[SWS_Dlt_91006]⌈
Service
Dlt_StartOfReception
Name

BufReq_ReturnType Dlt_StartOfReception (
PduIdType id,
const PduInfoType* info,
Syntax
PduLengthType TpSduLength,
PduLengthType* bufferSizePtr
)

Service ID
0x46
[hex]

Sync/Async Synchronous

Reentrancy Reentrant

id Identification of the I-PDU.

Pointer to a PduInfoType structure containing the payload data (without


protocol information) and payload length of the first frame or single frame
Parameters info of a transport protocol I-PDU reception, and the MetaData related to this
(in) PDU. If neither first/single frame data nor MetaData are available, this
parameter is set to NULL_PTR.

TpSdu
Total length of the N-SDU to be received.
Length

Parameters
None
(inout)

Parameters buffer Available receive buffer in the receiving module. This parameter will be
(out) SizePtr used to compute the Block Size (BS) in the transport protocol module.

BUFREQ_OK: Connection has been accepted. bufferSizePtr indicates


the available receive buffer; reception is continued. If no buffer of the
requested size is available, a receive buffer size of 0 shall be indicated
BufReq_-
by bufferSizePtr.
Return value Return-
BUFREQ_E_NOT_OK: Connection has been rejected; reception is
Type
aborted. bufferSizePtr remains unchanged.
BUFREQ_E_OVFL: No buffer of the required length can be provided;
reception is aborted. bufferSizePtr remains unchanged.

This function is called at the start of receiving an N-SDU. The N-SDU might be
fragmented into multiple N-PDUs (FF with one or more following CFs) or might
Description
consist of a single N-PDU (SF). The service shall provide the currently available
maximum buffer size when invoked with TpSduLength equal to 0.

62 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Available via Dlt.h

⌋()

8.4.7 Dlt_TpRxIndication

[SWS_Dlt_91007]⌈
Service Name Dlt_TpRxIndication

void Dlt_TpRxIndication (
PduIdType id,
Syntax
Std_ReturnType result
)

Service ID
0x45
[hex]

Sync/Async Synchronous

Reentrancy Reentrant

id Identification of the received I-PDU.


Parameters (in)
result Result of the reception.

Parameters
None
(inout)

Parameters
None
(out)

Return value None

Called after an I-PDU has been received via the TP API, the result indicates
Description
whether the transmission was successful or not.

Available via Dlt.h

⌋()

8.4.8 Dlt_CopyRxData

[SWS_Dlt_91008]⌈
Service
Dlt_CopyRxData
Name

BufReq_ReturnType Dlt_CopyRxData (
PduIdType id,
Syntax const PduInfoType* info,
PduLengthType* bufferSizePtr
)
63 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Service ID
0x44
[hex]

Sync/Async Synchronous

Reentrancy Reentrant

id Identification of the received I-PDU.

Parameters Provides the source buffer (SduDataPtr) and the number of bytes to be
(in) copied (SduLength). An SduLength of 0 can be used to query the
info
current amount of available buffer in the upper layer module. In this
case, the SduDataPtr may be a NULL_PTR.

Parameters
None
(inout)

Parameters bufferSize
Available receive buffer after data has been copied.
(out) Ptr

BufReq_- BUFREQ_OK: Data copied successfully


Return value Return- BUFREQ_E_NOT_OK: Data was not copied because an error
Type occurred.

This function is called to provide the received data of an I-PDU segment (N-PDU) to
Description the upper layer. Each call to this function provides the next part of the I-PDU data.
The size of the remaining buffer is written to the position indicated by bufferSizePtr.

Available via Dlt.h

⌋()

64 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.5 Scheduled functions

8.5.1 Dlt_TxFunction

[SWS_Dlt_91005]⌈
Service Name Dlt_TxFunction

void Dlt_TxFunction (
Syntax void
)

Service ID [hex] 0x80

Description --

Available via SchM_Dlt.h

⌋()

[SWS_Dlt_00758] ⌈If the configuration parameter


DltGeneralTrafficShapingSupport is set to TRUE, the Dlt messages shall be
transmitted with the maximum bandwidth per LogChannel as configured using the
parameter DltLogChannelTrafficShapingBandwidth. ⌋ ()

[SWS_Dlt_00759] ⌈If the configuration parameter


DltGeneralTrafficShapingSupport is set to FALSE, all buffered Dlt messages
shall be transmitted at once. ⌋ ()

[SWS_Dlt_00760] ⌈The Dlt_TxFunction shall check the status of the flag, which
indicates that a BufferOverflow occurred:
 If a buffer overflow occurred, the Dlt command “BufferOverflowNotification”
shall be sent only once, until the overflow flag is cleared again.
 After a time interval given by the parameter
DltLogChannelBufferOverflowTimer, the buffer overflow flag shall be
cleared.
This shall be done for every configured LogChannel separately. ⌋ ()

[SWS_Dlt_00761] ⌈If a Dlt message could not be sent, every time the
Dlt_TxFunction is called, it shall retry to send this message one time. This shall
be done for every message separately and taking care to not exceed the amount of
retries given by DltLogChannelMaxNumOfRetries. ⌋ ()

65 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.6 Expected interfaces


In this section all external interfaces required from other modules are listed.

8.6.1 Mandatory interfaces

This section defines all external interfaces which are required to fulfill the core
functionality of the module.

The module relies on the following interfaces:

[SWS_Dlt_00762]⌈
API Function Header File Description

PduR_DltTransmit PduR_Dlt.h Requests transmission of a PDU.

⌋()

66 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.6.2 Optional interfaces

This section defines all external interfaces which are required to fulfill an optional
functionality of the module.

The module relies on the following optional interfaces:

[SWS_Dlt_00763]⌈
Header
API Function Description
File

Det_ReportError Det.h Service to report development errors.

Gpt_Enable- Enables the interrupt notification for a channel (relevant in normal


Gpt.h
Notification mode).

Gpt_StartTimer Gpt.h Starts a timer channel.

NvM_EraseNv-
NvM.h Service to erase a NV block.
Block

Service to copy the data of the NV block to its corresponding RAM


NvM_ReadBlock NvM.h
block.

Service to copy the data of the RAM block to its corresponding NV


NvM_WriteBlock NvM.h
block.

Returns a time value (Local Time Base derived from Global Time
Base) in standard format.
StbM_Get-
StbM.h Note: This API shall be called with locked interrupts / within an
CurrentTime
Exclusive Area to prevent interruption (i.e., the risk that the time
stamp is outdated on return of the function call).

Returns a time value (Local Time Base derived from Global Time
StbM_Get- Base) in extended format.
CurrentTime- StbM.h Note: This API shall be called with locked interrupts / within an
Extended Exclusive Area to prevent interruption (i.e., the risk that the time
stamp is outdated on return of the function call).

⌋()

67 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.7 Client-Server-Interfaces

8.7.1 DltControlService

[SWS_Dlt_00772]⌈
Name DltControlService

Comment --

IsService true

Variation --

0 E_OK Operation successful

Possible Errors 7 DLT_E_NOT_SUPPORTED Service is not supported

9 DLT_E_ERROR --

Operation GetDefaultLogLevel

Comment --

Variation --

defaultLoglevel

Type Dlt_MessageLogLevelType

Parameters Direction OUT

Comment --

Variation --

E_OK
Possible Errors
DLT_E_ERROR

Operation GetDefaultTraceStatus

Comment --

Variation --

logChannelName

Parameters Type Dlt_LogChannelNameType

Direction IN

68 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Comment --

Variation --

traceStatus

Type boolean

Direction OUT

Comment --

Variation --

E_OK
Possible Errors
DLT_E_ERROR

Operation GetLogChannelNames

Comment --

Variation --

numberOfLogChannels

Type uint8

Direction INOUT

Comment --

Variation --
Parameters
logChannelNames

Type Dlt_LogChannelNameType*

Direction OUT

Comment --

Variation --

E_OK
Possible Errors
DLT_E_ERROR

Operation GetLogChannelThreshold

Comment --

Variation --

logChannelName

Type Dlt_LogChannelNameType
Parameters
Direction IN

Comment --
69 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Variation --

logChannelThreshold

Type Dlt_MessageLogLevelType

Direction OUT

Comment --

Variation --

traceStatusPtr

Type boolean

Direction OUT

Comment --

Variation --

E_OK
Possible Errors
DLT_E_ERROR

Operation GetLogInfo

Comment --

Variation --

options

Type uint8

Direction IN

Comment --

Variation --

appId

Type Dlt_ApplicationIDType

Parameters Direction IN

Comment --

Variation --

contextId

Type Dlt_ContextIDType

Direction IN

Comment --

Variation --

70 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

status

Type uint8

Direction OUT

Comment --

Variation --

logInfo

Type Dlt_LogInfoType

Direction OUT

Comment --

Variation --

E_OK
Possible Errors
DLT_E_ERROR

Operation GetTraceStatus

Comment --

Variation --

appId

Type Dlt_ApplicationIDType

Direction IN

Comment --

Variation --

contextId

Type Dlt_ContextIDType

Parameters Direction IN

Comment --

Variation --

traceStatus

Type boolean

Direction OUT

Comment --

Variation --

Possible Errors E_OK

71 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

DLT_E_ERROR

Operation ResetToFactoryDefault

Comment --

Variation --

E_OK
Possible Errors
DLT_E_ERROR

Operation SetDefaultLogLevel

Comment --

Variation --

newDefaultLogLevel

Type Dlt_MessageLogLevelType

Parameters Direction IN

Comment --

Variation --

E_OK
Possible Errors
DLT_E_ERROR

Operation SetDefaultTraceStatus

Comment --

Variation --

newTraceStatus

Type boolean

Direction IN

Comment --

Variation --
Parameters
logChannel

Type uint8

Direction IN

Comment --

Variation --

Possible Errors E_OK

72 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

DLT_E_ERROR

Operation SetLogChannelAssignment

Comment --

Variation --

appId

Type Dlt_ApplicationIDType

Direction IN

Comment --

Variation --

contextId

Type Dlt_ContextIDType

Direction IN

Comment --

Variation --
Parameters
logChannelName

Type Dlt_LogChannelNameType

Direction IN

Comment --

Variation --

addRemoveOp

Type Dlt_AssignmentOperation

Direction IN

Comment --

Variation --

E_OK
Possible Errors
DLT_E_ERROR

Operation SetLogChannelThreshold

Comment --

Variation --

Parameters logChannelName

73 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Type Dlt_LogChannelNameType

Direction IN

Comment --

Variation --

newLogLevelThreshold

Type Dlt_MessageLogLevelType

Direction IN

Comment --

Variation --

newTraceStatus

Type boolean

Direction IN

Comment --

Variation --

E_OK
Possible Errors
DLT_E_ERROR

Operation SetLogLevel

Comment --

Variation --

appId

Type Dlt_ApplicationIDType

Direction IN

Comment --

Variation --

contextId
Parameters
Type Dlt_ContextIDType

Direction IN

Comment --

Variation --

newLogLevel

Type Dlt_MessageLogLevelType

74 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Direction IN

Comment --

Variation --

E_OK
Possible Errors
DLT_E_ERROR

Operation SetMessageFiltering

Comment --

Variation --

status

Type boolean

Parameters Direction IN

Comment --

Variation --

E_OK
Possible Errors
DLT_E_ERROR

Operation SetTraceStatus

Comment --

Variation --

appId

Type Dlt_ApplicationIDType

Direction IN

Comment --

Variation --

contextId

Parameters Type Dlt_ContextIDType

Direction IN

Comment --

Variation --

newTraceStatus

Type boolean

Direction IN
75 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Comment --

Variation --

E_OK
Possible Errors
DLT_E_ERROR

Operation StoreConfiguration

Comment --

Variation --

E_OK
Possible Errors DLT_E_NOT_SUPPORTED
DLT_E_ERROR

⌋()

76 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.7.2 InjectionCallback

[SWS_Dlt_00498]⌈
Name InjectionCallback

Comment --

IsService true

Variation --

0 E_OK Operation successful


Possible Errors
1 E_NOT_OK Operation failed

Operation InjectCall

Comment --

Variation --

appId

Type Dlt_ApplicationIDType

Direction IN

Comment --

Variation --

contextId

Type Dlt_ContextIDType

Direction IN

Comment --
Parameters
Variation --

serviceId

Type uint32

Direction IN

Comment --

Variation --

dataLength

Type uint32

Direction IN

77 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Comment --

Variation --

data

Type uint8*

Direction IN

Comment --

Variation --

E_OK
Possible Errors
E_NOT_OK

⌋()

78 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.7.3 LogTraceSessionControl

[SWS_Dlt_00496]⌈
Name LogTraceSessionControl

Comment --

IsService true

Variation --

0 E_OK Operation successful


Possible Errors
1 E_NOT_OK Operation failed

Operation LogLevelChangedNotification

Comment --

Variation --

appId

Type Dlt_ApplicationIDType

Direction IN

Comment --

Variation --

contextId

Type Dlt_ContextIDType

Parameters Direction IN

Comment --

Variation --

logLevel

Type Dlt_MessageLogLevelType

Direction IN

Comment --

Variation --

Possible Errors E_OK

Operation TraceStatusChangedNotification

79 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Comment --

Variation --

appId

Type Dlt_ApplicationIDType

Direction IN

Comment --

Variation --

contextId

Type Dlt_ContextIDType

Parameters Direction IN

Comment --

Variation --

newTraceStatus

Type boolean

Direction IN

Comment --

Variation --

Possible Errors E_OK

⌋()

80 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.7.4 DltSwcMessageService

[SWS_Dlt_00495]⌈
Name DltSwcMessageService

Comment --

IsService true

Variation --

0 E_OK Operation successful

The message is too big for the internal Dlt


2 DLT_E_MSG_TOO_LARGE
buffer.

DLT_E_CONTEXT_ The software module context has already


3
ALREADY_REG registered.
Possible
DLT_E_UNKNOWN_
Errors 4 The provided session id is unknown.
SESSION_ID

5 DLT_E_NO_BUFFER Buffer overflow.

DLT_E_CONTEXT_NOT_YET_ The software module context has not


6
REG registered before.

9 DLT_E_ERROR --

Operation RegisterContext

Comment --

Variation --

appId

Type Dlt_ApplicationIDType

Direction IN

Comment --

Variation --

Parameters contextId

Type Dlt_ContextIDType

Direction IN

Comment --

Variation --

appDescription

81 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Type uint8[]

Direction IN

Comment --

Variation --

lenAppDescription

Type uint8

Direction IN

Comment --

Variation --

contextDescription

Type uint8[]

Direction IN

Comment --

Variation --

lenContextDescription

Type uint8

Direction IN

Comment --

Variation --

E_OK
Possible Errors DLT_E_CONTEXT_ALREADY_REG
DLT_E_UNKNOWN_SESSION_ID

Operation SendLogMessage

Comment --

Variation --

logInfo

Type Dlt_MessageLogInfoType

Direction IN
Parameters
Comment --

Variation --

logData

82 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Type uint8[]

Direction IN

Comment --

Variation --

logDataLength

Type uint16

Direction IN

Comment --

Variation --

E_OK
DLT_E_MSG_TOO_LARGE
Possible Errors
DLT_E_UNKNOWN_SESSION_ID
DLT_E_NO_BUFFER

Operation SendTraceMessage

Comment --

Variation --

traceInfo

Type Dlt_MessageTraceInfoType

Direction IN

Comment --

Variation --

traceData

Type uint8[]

Parameters Direction IN

Comment --

Variation --

traceDataLength

Type uint16

Direction IN

Comment --

Variation --

Possible Errors E_OK

83 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

DLT_E_MSG_TOO_LARGE
DLT_E_UNKNOWN_SESSION_ID
DLT_E_NO_BUFFER

Operation UnregisterContext

Comment --

Variation --

appId

Type Dlt_ApplicationIDType

Direction IN

Comment --

Variation --
Parameters
contextId

Type Dlt_ContextIDType

Direction IN

Comment --

Variation --

E_OK
Possible Errors DLT_E_UNKNOWN_SESSION_ID
DLT_E_CONTEXT_NOT_YET_REG

⌋()

84 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.8 Implementation Data Types

8.8.1 Dlt_ApplicationIDType

[SWS_Dlt_00226]⌈
Name Dlt_ApplicationIDType

Kind Array Element type uint8

Size 4 Elements

Description This type describes the ApplicationId. 0x00000000 means the so-called wildcard.

Variation --

Available via Rte_Dlt_Type.h

⌋()

8.8.2 Dlt_ContextIDType

[SWS_Dlt_00227]⌈
Name Dlt_ContextIDType

Kind Array Element type uint8

Size 4 Elements

Description This type describes the ContextId. 0x00000000 means the so-called wildcard.

Variation --

Available via Rte_Dlt_Type.h

⌋()

8.8.3 Dlt_SessionIDType

[SWS_Dlt_00225]⌈
Name Dlt_SessionIDType

Kind Type

Derived from uint32

Description This type identifies the session.

Variation --

85 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Available via Rte_Dlt_Type.h

⌋()

8.8.4 Dlt_LogInfoType

[SWS_Dlt_91002]⌈
Name Dlt_LogInfoType

Kind Structure

appIdCount

Type uint16

Comment Number of AppIds

Elements appIdInfo

Type Array of Dlt_ApplicationIdInfoType

Size

Comment Details of Application

Description --

Variation --

Available via Rte_Dlt_Type.h

⌋()

8.8.5 Dlt_ContextIdInfoType

[SWS_Dlt_91003]⌈
Name Dlt_ContextIdInfoType

Kind Structure

contextId

Type Dlt_ContextIDType

Comment the ContextId


Elements
logLevel

Type Dlt_MessageLogLevelType

Comment the log message filter level

86 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

traceStatus

Type uint8

Comment 0: off 1: on

lenContextDescription

Type uint16

Comment Length of Context Description

contextDesc

Type Array of uint8

Size

Comment Context Description

Description Context Information

Variation --

Available via Rte_Dlt_Type.h

⌋()

8.8.6 Dlt_ApplicationIdInfoType

[SWS_Dlt_91004]⌈
Name Dlt_ApplicationIdInfoType

Kind Structure

appId

Type Dlt_ApplicationIDType

Comment Application ID

contextIdCount

Type uint16

Elements Comment Length of contextInfoList

contextInfoList

Type Array of Dlt_ContextIdInfoType

Size

Comment List of Context information

appDescLen

87 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Type uint16

Comment Length of Application Description

appDesc

Type Array of uint8

Size

Comment Application Description

Description Information about Applications

Variation --

Available via Rte_Dlt_Type.h

⌋()

8.8.7 Dlt_MessageOptionsType

[SWS_Dlt_00229]⌈
Name Dlt_MessageOptionsType

Kind Type

Derived
uint8
from

verbose_
-- Bit 0: If set Verbose mode is used (yet not relevant)
mode
Range
message_ Bit 1-3 Dlt_MessageTypeType: determines type of msg
--
type (log,trace,...)

Description Bitfield

Variation --

Available via Rte_Dlt_Type.h

⌋()

8.8.8 Dlt_MessageLogInfoType

[SWS_Dlt_00236]⌈
Name Dlt_MessageLogInfoType

Kind Structure

argCount
Elements
Type Dlt_MessageArgumentCount
88 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Comment --

logLevel

Type Dlt_MessageLogLevelType

Comment --

options

Type Dlt_MessageOptionsType

Comment --

contextId

Type Dlt_ContextIDType

Comment --

appId

Type Dlt_ApplicationIDType

Comment --

Description --

Variation --

Available via Rte_Dlt_Type.h

⌋()

8.8.9 Dlt_MessageLogLevelType

[SWS_Dlt_00230]⌈
Name Dlt_MessageLogLevelType

Kind Enumeration

DLT_LOG_
0x00 Turn off logging
OFF

DLT_LOG_
0x01 Fatal system error
FATAL

DLT_LOG_ Errors occurring in a SW-C with impact to correct


Range 0x02
ERROR functionality

DLT_LOG_ Log messages where a incorrect behavior can not be


0x03
WARN ensured

DLT_LOG_ Log messages providing information for better understanding


0x04
INFO of the internal behavior of a software

89 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

DLT_LOG_ Log messages, which are usable only for debugging of a


0x05
DEBUG software

Log messages with the highest communicative level, here all


DLT_LOG_
0x06 possible states, information and everything else can be
VERBOSE
logged

Description This type describes the log level for each log message.

Variation --

Available
Rte_Dlt_Type.h
via

⌋()

8.8.10 Dlt_MessageTraceType

[SWS_Dlt_00231]⌈
Name Dlt_MessageTraceType

Kind Enumeration

DLT_TRACE_VARIABLE 0x01 For tracing the value of a variable

DLT_TRACE_FUNCTION_IN 0x02 For tracing the calling of a function

Range 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.

Variation --

Available via Rte_Dlt_Type.h

⌋()

8.8.11 Dlt_MessageArgumentCount

[SWS_Dlt_00235]⌈
Name Dlt_MessageArgumentCount

Kind Type

Derived from uint16

Description This type describes the count of arguments provided to a message.

Variation --

Available via Rte_Dlt_Type.h


90 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

⌋()

91 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.8.12 Dlt_MessageTraceInfoType

[SWS_Dlt_00237]⌈
Name Dlt_MessageTraceInfoType

Kind Structure

traceInfo

Type Dlt_MessageTraceType

Comment --

options

Type Dlt_MessageOptionsType

Comment --
Elements
context

Type Dlt_ContextIDType

Comment --

appId

Type Dlt_ApplicationIDType

Comment --

Description --

Variation --

Available via Rte_Dlt_Type.h

⌋()

8.8.13 Dlt_LogChannelNameType

[SWS_Dlt_00232]⌈
Name Dlt_LogChannelNameType

Kind Array Element type uint8

Size 4 Elements

Description This type describes the LogChannel name.

Variation --

Available via Rte_Dlt_Type.h

⌋()
92 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.8.14 Dlt_AssignmentOperation

[SWS_Dlt_00730]⌈
Name Dlt_AssignmentOperation

Kind Enumeration

DLT_ASSIGN_ADD 0x01 Adding a LogChannel assignment


Range
DLT_ASSIGN_REMOVE 0x02 Removing a LogChannel assignment

Adding or removing a LogChannel assignment for the given tuple of ApplicationId/


Description
ContextId.

Variation --

Available
Rte_Dlt_Type.h
via

⌋()

93 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.9 Ports

8.9.1 Dlt_ControlService_{SW-C}

[SWS_Dlt_00499]⌈
Name ControlService_{SW-C}

Kind ProvidedPort Interface DltControlService

Description Through this port SW-Cs can control log settings and other configurationitems of DLT.

Variation SW-C = {ecuc(Dlt/DltSwc.SHORT-NAME)}

⌋()

8.9.2 Dlt_InjectCallback_{SW-C}

[SWS_Dlt_00778]⌈
Name InjectCallback_{SW-C}

Kind RequiredPort Interface InjectionCallback

Description Callback Port to registered Application, which processes Injection.

Variation SW-C = {ecuc(Dlt/DltSwc.SHORT-NAME)}

⌋()

8.9.3 Dlt_SessionControlCallback_{SW-C}

[SWS_Dlt_00779]⌈
Name SessionControlCallback_{SW-C}

Kind RequiredPort Interface LogTraceSessionControl

Description Port used by Dlt to notify registered SW-C about LogLevel/TraceLevel Changes.

Variation SW-C = {ecuc(Dlt/DltSwc.SHORT-NAME)}

⌋()

94 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

8.9.4 Dlt_SwcMessageService_{SW-C}

[SWS_Dlt_91001]⌈
Name SwcMessageService_{SW-C}

Kind ProvidedPort Interface DltSwcMessageService

Through this port SW-Cs can register/unregister their contexts and send
Description
out log and trace messages.

Type Dlt_SessionIDType
Port Defined Argument
Value(s)
Value {ecuc(Dlt/DltSwc/DltSwcSessionId.value)}

Variation SW-C = {ecuc(Dlt/DltSwc.SHORT-NAME)}

⌋()

95 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

9 Sequence diagrams

9.1 Dlt initialization

«module» «module» «module» «module»


EcuM Dlt NvM Gpt

Dlt_Init(config)

Load configuration()

opt DltGeneralTimeStampSource == UPTIME

Gpt_StartTimer(Channel, Value)

alt Dlt configuration


[DltGeneralNvRAMSupport == TRUE]
NvM_ReadBlock(return, BlockId, NvM_DstPtr)

[DltGeneralNvRAMSupport == FALSE]

Load local configuration()

opt DltGeneralStartUpDelayTimer

StartDelayTimer()

Figure 9-1: Dlt initialization

96 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

9.2 Overview of Dlt message transmission on one LogChannel

97 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Dlt User «module» «module» «module» «module»


SchM Dlt Gpt PduR

alt Dlt User

[Det]
Dlt_DetForwardErrorTrace(moduleId, instanceId, apiId, errorId)

[Rte]
Dlt_SendTraceMessage(return, sessionId, traceInfo, traceData, traceDataLength)

[SWC]
Dlt_SendLogMessage(return, sessionId, logInfo, logData, logDataLength)

Gpt_GetPredefTimerValue(return,
PredefTimer, TimeValuePtr)

Apply Message filtering()

Select target LogChannel()

Check Message Length()

Apply current LogChannel threshold()

Increase Dlt Message Counter()

Add Message to LogChannelBuffer()

Dlt_TxFunction()

loop according to traffic shaping setting

Compose Dlt Header()

PduR_DltTransmit(PduId)

opt retry
PduR_DltTransmit(PduId)

Remove Message from Buffer()

Figure 9-2: Overview of Dlt message transmission on one LogChannel

98 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

9.3 SetLogLevelFilter

SWC «module» «module»


Dlt PduR

opt loop SWC registration

Dlt_RegisterContext(return, sessionId, appId, contextId, appDescription,


lenAppDescription, contextDescription, lenContextDescription)

Store registered SWC()

Dlt_RxIndication(PduId)

Dlt Command "SetLogLevelFilter"

Update LogLevelFilter()

opt LogLevelChange notification


Lookup registered SWC()

LogLevelChangedNotification(appId, contextId)

PduR_DltTransmit(PduId)

Dlt Command "SetLogLevelFilter" response

Figure 9-3: SetLogLevelFilter

99 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

9.4 Buffer overflow indication

100 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

SWC «module» «module» «module»


Gpt Dlt PduR

Dlt_SendLogMessage(return, sessionId, logInfo,


logData, logDataLength)

Apply Message filtering()

Select target LogChannel()

CheckMessage length()

Apply LogChannel threshold()

Try to add Message to LogChannelBuffer()

! Not enough Buffer available !

Discard Message()

Set BufferOverflowFlag()

Start BufferOverflowTimer()

loop
Dlt_TxFunction()

alt BufferOverflow Flag

[BufferOverflowFlag == 1]

alt OverFlow Message sent

[Buffer Overflow Message sent == FALSE]


PduR_DltTransmit(PduId)

Send Message "BufferOverflow"

MessageSent == TRUE()

Timer DltLogChannelBufferOverflowCheck(start)

[Buffer Overflow Message sent == TRUE]

If DltLogChannelBufferOverflowTimer expired: Reset


BufferOverflowFlag AND Message Sent = FALSE()

[BufferOverflowFlag == 0]

Figure 9-4: Buffer overflow indication

101 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

10 Configuration specification
Chapter 10.1 specifies the structure (containers) and the parameters of the module
Dlt.

Chapter 10.2 specifies additionally published information of the module Dlt.

10.1 Containers and configuration parameters


The following chapters summarize all configuration parameters. The detailed
meanings of the parameters describe chapters 0 and chapter 8.

102 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

10.1.1 Dlt

SWS Item ECUC_Dlt_00800 :


Module Name Dlt
Module Description --
Post-Build Variant Support true
Supported Config Variants VARIANT-LINK-TIME, VARIANT-POST-BUILD, VARIANT-PRE-COMPILE

Included Containers
Container Name Multiplicity Scope / Dependency
This container lists all the global Dlt functionalities that can be
DltConfigSet 1 enabled or disabled at pre-compile time to optimize resource
consumption.
This container lists all the global Dlt functionalities that can be
DltGeneral 1 enabled or disabled at pre-compile time to optimize resource
consumption.
Contains necessary configuration parameters of the
DltSwc 0..*
AUTOSAR Dlt module to interact with SWCs.

Dlt: EcucModuleDef +container DltGeneral:


EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 1

DltSwc:
+container EcucParamConfContainerDef

lowerMultiplicity = 0
upperMultiplicity = *

+container DltConfigSet:
EcucParamConfContainerDef

10.1.2 DltGeneral

SWS Item ECUC_Dlt_00809 :


Container Name DltGeneral
103 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Parent Container Dlt


This container lists all the global Dlt functionalities that can be enabled or
Description
disabled at pre-compile time to optimize resource consumption.
Configuration Parameters

SWS Item ECUC_Dlt_00840 :


Name DltGeneralDevErrorDetect
Parent Container DltGeneral
Description If the Default Error Tracer (Det) shall be used, this parameter shall be set
to TRUE. Otherwise, it shall be set to FALSE.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00847 :


Name DltGeneralInjectionSupport
Parent Container DltGeneral
Description Enables or disables the Dlt Injection feature.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00915 :


Name DltGeneralNvRAMSupport
Parent Container DltGeneral
Description Enables or disables the Dlt NvRAM Support feature.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00846 :


Name DltGeneralRegisterContextNotification
Parent Container DltGeneral
Description If this parameter is set to TRUE, a Dlt Control Message is sent every time
a SWC registeres and/or de-registers at/from the Dlt Module. Else, this
notification is not sent.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
104 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00848 :


Name DltGeneralRxDataPathSupport
Parent Container DltGeneral
Description Enables or disables the Rx Data Path to control the Dlt module.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: At least one RxPdu needs to be configured if
DltGeneralRxDataPathSupport = TRUE

SWS Item ECUC_Dlt_00897 :


Name DltGeneralStartUpDelayTimer
Parent Container DltGeneral
Description Configurable delay in s of starting the transmission of Log and Trace
messages after the Dlt module has been initialized.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0.001 .. 10]
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00850 :


Name DltGeneralTimeStampSupport
Parent Container DltGeneral
Description If a Time Stamp shall be added to the Dlt messages, this configuration
parameter shall be set to TRUE.
Otherwise, it shall be set to FALSE.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00849 :


Name DltGeneralTrafficShapingSupport
105 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Parent Container DltGeneral


Description Enables or disables the TrafficShaping feature to limit the maximum
bandwidth for Dlt messages. If enabled, the maximum bandwidth can be
configured per LogChannel.
Multiplicity 1
Type EcucBooleanParamDef
Default value true
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00844 :


Name DltGeneralVersionInfoApi
Parent Container DltGeneral
Description Pre-processor switch for enabling Version Info API support.
 True: version information API activated

 False: version information API deactivated


Multiplicity 0..1
Type EcucBooleanParamDef
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00905 :


Name DltGeneralGptChannelRef
Parent Container DltGeneral
Description If TimeStampSupport is used the Dlt module shall fetch the time from the
Gpt module by calling Gpt_GetTimeElapsed with the here referenced
GptChannel. The tick duration can be deduced from the
GptChannelTickFrequency parameter of the GptChannelConfiguration
container. This is necessary to calculate the microsecond resolution
timestamp output in the Dlt message.
A GPT timer shall be used which starts with value 0 at ECU start-up
according to the PRS Dlt Protocol Specification.
Multiplicity 0..1
Type Symbolic name reference to [ GptChannelConfiguration ]
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
106 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Scope / Dependency scope: local


dependency: DltGeneralTimeStampSupport is set to TRUE and
DltGeneralStbMTimeBaseRef is not configured.

SWS Item ECUC_Dlt_00845 :


Name DltGeneralNvRamRef
Parent Container DltGeneral
Description If the Dlt module shall be able to store modified parameters during runtime
persistently, this reference shall be set and shall point to the NvmBlock.
Multiplicity 0..1
Type Symbolic name reference to [ NvMBlockDescriptor ]
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00914 :


Name DltGeneralStbMTimeBaseRef
Parent Container DltGeneral
Description If TimeStampSupport is used the Dlt module shall fetch the time from the
StbM module by calling StbM_GetCurrentTime with the here referenced
StbMSynchronizedTimeBase.
Multiplicity 0..1
Type Symbolic name reference to [ StbMSynchronizedTimeBase ]
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: DltGeneralTimeStampSupport is set to TRUE and
DltGeneralGptChannelRef is not configured

No Included Containers

107 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

+parameter DltGeneralDevErrorDetect:
DltGeneral: EcucBooleanParamDef
EcucParamConfContainerDef

+parameter DltGeneralRegisterContextNotification:
EcucBooleanParamDef

defaultValue = false
+parameter DltGeneralInjectionSupport:
EcucBooleanParamDef

defaultValue = false
DltGeneralRxDataPathSupport:
+parameter EcucBooleanParamDef

defaultValue = false
+parameter DltGeneralTrafficShapingSupport:
EcucBooleanParamDef

defaultValue = true

+parameter DltGeneralTimeStampSupport:
EcucBooleanParamDef

defaultValue = false
DltGeneralVersionInfoApi:
+parameter
EcucBooleanParamDef

lowerMultiplicity = 0
DltGeneralStartUpDelayTimer: upperMultiplicity = 1
EcucFloatParamDef
+parameter
min = 0.001
max = 10 NvMNvramBlockIdentifier:
lowerMultiplicity = 0 EcucIntegerParamDef
upperMultiplicity = 1
symbolicNameValue = true
min = 2
DltGeneralNvRAMSupport: max = 65535
+parameter
EcucBooleanParamDef
+parameter
defaultValue = false

DltGeneralNvRamRef: NvMBlockDescriptor:
EcucReferenceDef +destination EcucParamConfContainerDef
+reference
lowerMultiplicity = 0 upperMultiplicity = 65536
upperMultiplicity = 1 lowerMultiplicity = 1
requiresSymbolicNameValue = true

DltGeneralGptChannelRef: GptChannelConfiguration:
EcucReferenceDef +destination EcucParamConfContainerDef
+reference
lowerMultiplicity = 0 upperMultiplicity = *
upperMultiplicity = 1 lowerMultiplicity = 1
requiresSymbolicNameValue = true

+parameter
DltGeneralStbMTimeBaseRef:
EcucReferenceDef GptChannelId:
+reference
EcucIntegerParamDef
lowerMultiplicity = 0
upperMultiplicity = 1 min = 0
requiresSymbolicNameValue = true max = 4294967295
symbolicNameValue = true

+destination
StbMSynchronizedTimeBaseIdentifier:
StbMSynchronizedTimeBase: EcucIntegerParamDef
+parameter
EcucParamConfContainerDef
min = 0
lowerMultiplicity = 1 max = 65535
upperMultiplicity = * symbolicNameValue = true

10.1.3 DltSwc

SWS Item ECUC_Dlt_00856 :

108 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Container Name DltSwc


Parent Container Dlt
Contains necessary configuration parameters of the AUTOSAR Dlt module
Description
to interact with SWCs.
Post-Build Variant
true
Multiplicity
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Configuration Parameters

SWS Item ECUC_Dlt_00852 :


Name DltSwcSessionId
Parent Container DltSwc
Description An ECU wide unique ID to identify the port a SWC (instance) uses.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 ..
18446744073709551615
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00853 :


Name DltSwcSupportLogLevelAndTraceStatusChangeNotification
Parent Container DltSwc
Description Flag indicating, whether Dlt has to provide a R-Port for the notification of
the SWC about LogLevel or TraceStatus changes.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00909 :


Name MaxSwcLogMessageLength
Parent Container DltSwc
Description Defines the maximum allowed length (uint16) for LogMessages.
The upper limit for the range of this parameter is currently defined by the
range of the data type. The actual upper limit for the range of this
parameter is identical to the maximum length of all configured Dlt log or
trace messages, which is known when all log or trace messages are
configured.
Multiplicity 1
Type EcucIntegerParamDef
Range 8 .. 65535
Default value --
Post-Build Variant Value false

109 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE


Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00910 :


Name MaxSwcTraceMessageLength
Parent Container DltSwc
Description Defines the maximum allowed length (uint16) for TraceMessages.
The upper limit for the range of this parameter is currently defined by the
range of the data type. The actual upper limit for the range of this
parameter is identical to the maximum length of all configured Dlt log or
trace messages, which is known when all log or trace messages are
configured.
Multiplicity 1
Type EcucIntegerParamDef
Range 8 .. 65535
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local

Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration of ApplicationId /
DltSwcContext 0..*
ContextId pairs which are supported by this SWC.

110 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

DltSwc:
+parameter DltSwcSessionId:
EcucParamConfContainerDef
EcucIntegerParamDef
lowerMultiplicity = 0
upperMultiplicity = *

+parameter DltSwcSupportLogLevelAndTraceStatusChangeNotification:
EcucBooleanParamDef

defaultValue = false

DltSwcContext:
+parameter DltSwcApplicationId:
EcucParamConfContainerDef
EcucStringParamDef
lowerMultiplicity = 0
+subContainer upperMultiplicity = *

+parameter DltSwcContextId:
EcucStringParamDef

MaxSwcLogMessageLength:
+parameter EcucIntegerParamDef

min = 8
max = 65535

MaxSwcTraceMessageLength:
+parameter EcucIntegerParamDef

min = 8
max = 65535

10.1.4 DltSwcContext

SWS Item ECUC_Dlt_00854 :


Container Name DltSwcContext
Parent Container DltSwc
This container contains the configuration of ApplicationId / ContextId pairs
Description
which are supported by this SWC.
Post-Build Variant
true
Multiplicity
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Configuration Parameters

SWS Item ECUC_Dlt_00858 :


Name DltSwcApplicationId
Parent Container DltSwcContext
Description Abbreviation for the SWC (4 characters)
Multiplicity 1
Type EcucStringParamDef
Default value --
maxLength --
minLength --
regularExpression --
111 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Post-Build Variant Value true


Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00859 :


Name DltSwcContextId
Parent Container DltSwcContext
Description Abbreviation for the ContextId (4 characters)
Multiplicity 1
Type EcucStringParamDef
Default value --
maxLength --
minLength --
regularExpression --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

10.1.5 DltConfigSet

SWS Item ECUC_Dlt_00842 :


Container Name DltConfigSet
Parent Container Dlt
This container lists all the global Dlt functionalities that can be enabled or
Description
disabled at pre-compile time to optimize resource consumption.
Configuration Parameters

Included Containers
Container Name Multiplicity Scope / Dependency
DltLogLevelSetting 1 Contains settings for thresholds.
DltLogOutput 1 Contains settings for log/trace message output
Configuration parameters for handling the specific protocol
DltProtocol 1
variants.
Contains the Pdu IDs to be used for Dlt control messages
DltRxPdu 0..*
reception.
DltTraceStatusSetting 1 Contains settings for trace status

112 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

DltConfigSet: +subContainer DltProtocol:


EcucParamConfContainerDef EcucParamConfContainerDef

+subContainer DltLogLevelSetting:
EcucParamConfContainerDef

+subContainer DltTraceStatusSetting:
EcucParamConfContainerDef

+subContainer DltLogOutput:
EcucParamConfContainerDef

Pdu: EcucParamConfContainerDef
+reference DltRxPduRef: +destination
DltRxPdu: lowerMultiplicity = 0
EcucReferenceDef
EcucParamConfContainerDef upperMultiplicity = *

lowerMultiplicity = 0
upperMultiplicity = *
DltRxPduId: EcucIntegerParamDef

min = 0
+parameter
max = 65535
+subContainer
lowerMultiplicity = 0
upperMultiplicity = 1
symbolicNameValue = true

+parameter DltRxPduUsesTp:
EcucBooleanParamDef

10.1.6 DltProtocol

SWS Item ECUC_Dlt_00832 :


Container Name DltProtocol
Parent Container DltConfigSet
Description Configuration parameters for handling the specific protocol variants.
Configuration Parameters

SWS Item ECUC_Dlt_00811 :


Name DltHeaderUseEcuId
Parent Container DltProtocol
Description Corresponds to field WEID (With ECU ID). If set ECU ID shall be placed in
the header, else not.
If DltGeneralNvRAMSupport is enabled the value of the parameter defined
here is also the initial value for the corresponding NvRam entry. If
DltGeneralNvRAMSupport is not set, Link-Time or Post-Build configuration
shall be used.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item ECUC_Dlt_00813 :


Name DltHeaderUseSessionID
Parent Container DltProtocol
113 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Description Corresponds to field WSID (with Session ID). If set the Session ID shall be
placed in the header, else not.
If DltGeneralNvRAMSupport is enabled the value of the parameter defined
here is also the initial value for the corresponding NvRam entry. If
DltGeneralNvRAMSupport is not set, Link-Time or Post-Build configuration
shall be used.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item ECUC_Dlt_00814 :


Name DltHeaderUseTimestamp
Parent Container DltProtocol
Description Corresponds to field WTMS (With Timestamp). If set the timestamp shall
be placed in the header, else not.
If DltGeneralNvRAMSupport is enabled the value of the parameter defined
here is also the initial value for the corresponding NvRam entry. If
DltGeneralNvRAMSupport is not set, Link-Time or Post-Build configuration
shall be used.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU
dependency: Can only be true if DltImplementTimestamp is true.

SWS Item ECUC_Dlt_00812 :


Name DltUseExtHeaderInNonVerbMode
Parent Container DltProtocol
Description Non Verbose messages (opposed to verbose messages) do not need an
extended header. If this flag is set to true the extended header shall also
be used for non verbose messages.
If DltGeneralNvRAMSupport is enabled the value of the parameter defined
here is also the initial value for the corresponding NvRam entry. If
DltGeneralNvRAMSupport is not set, Link-Time or Post-Build configuration
shall be used.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item ECUC_Dlt_00911 :


Name DltUseVerboseMode
Parent Container DltProtocol
Description If this flag is set to TRUE, the payload shall be transmitted in verbose
114 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

mode, else the payload shall be transmitted in none-verbose mode.


Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

Included Containers
Container Name Multiplicity Scope / Dependency
This is a choice container to choose between a EcuId value or
DltEcuId 1
a callout to get the EcuId.

DltProtocol: +parameter DltHeaderUseEcuId:


EcucParamConfContainerDef EcucBooleanParamDef

+parameter DltUseExtHeaderInNonVerbMode:
EcucBooleanParamDef

+parameter DltHeaderUseSessionID:
EcucBooleanParamDef

+parameter DltHeaderUseTimestamp:
EcucBooleanParamDef

+parameter DltUseVerboseMode:
EcucBooleanParamDef

DltEcuIdValueChoice:
DltEcuId: EcucChoiceContainerDef +parameter DltEcuIdValue:
+choice EcucParamConfContainerDef
EcucStringParamDef
upperMultiplicity = 1
lowerMultiplicity = 0
+subContainer

DltEcuIdCalloutChoice:
+choice
EcucParamConfContainerDef +parameter DltEcuIdCallout:
EcucFunctionNameDef
lowerMultiplicity = 0
upperMultiplicity = 1

10.1.7 DltEcuId

SWS Item ECUC_Dlt_00860 :


Choice container Name DltEcuId
Parent Container DltProtocol
This is a choice container to choose between a EcuId value or a callout to
Description
get the EcuId.

Container Choices
Container Name Multiplicity Scope / Dependency
DltEcuIdCalloutChoice 0..1 EcuId via user defined callout.
115 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

DltEcuIdValueChoice 0..1 EcuId value configuration

10.1.8 DltEcuIdCalloutChoice

SWS Item ECUC_Dlt_00902 :


Container Name DltEcuIdCalloutChoice
Parent Container DltEcuId
Description EcuId via user defined callout.
Post-Build Variant
false
Multiplicity
Configuration Parameters

SWS Item ECUC_Dlt_00862 :


Name DltEcuIdCallout
Parent Container DltEcuIdCalloutChoice
Description If this choice is used the EcuId shall be fetched by calling the here
configured callout function.
Multiplicity 1
Type EcucFunctionNameDef
Default value --
maxLength --
minLength --
regularExpression --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU

No Included Containers

10.1.9 DltEcuIdValueChoice

SWS Item ECUC_Dlt_00901 :


Container Name DltEcuIdValueChoice
Parent Container DltEcuId
Description EcuId value configuration
Post-Build Variant
false
Multiplicity
Configuration Parameters

SWS Item ECUC_Dlt_00861 :


Name DltEcuIdValue
Parent Container DltEcuIdValueChoice
Description If this choice is used the EcuId shall be taken from the configured string.
This is the name of the ECU for use within the Dlt protocol. If you want to
use a number representation type this as character.
Multiplicity 1
Type EcucStringParamDef

116 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Default value --
maxLength --
minLength --
regularExpression --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU

No Included Containers

10.1.10 DltLogLevelSetting

SWS Item ECUC_Dlt_00863 :


Container Name DltLogLevelSetting
Parent Container DltConfigSet
Description Contains settings for thresholds.
Configuration Parameters

SWS Item ECUC_Dlt_00864 :


Name DltDefaultLogLevel
Parent Container DltLogLevelSetting
Description This is the effective log level used in case no filter matches the given AppicationId
and ContextId. This can be seen as a fall-through filter definition with wildcard for
AppicationId and ContextId, which will be used, when no other filter matches.
Multiplicity 1
Type EcucEnumerationParamDef
Range DLT_LOG_DEBUG --
DLT_LOG_ERROR --
DLT_LOG_FATAL --
DLT_LOG_INFO --
DLT_LOG_OFF --
DLT_LOG_VERBOSE --
DLT_LOG_WARN --
Post-Build Variant
true
Value
Value Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME
Class Post-build time X VARIANT-POST-BUILD
Scope / scope: ECU
Dependency

Included Containers
Container Name Multiplicity Scope / Dependency
This container contains a preconfiguration of ApplicationId /
DltLogLevelThreshold 0..*
ContextId pairs and their assigned LogLevel threshold.

117 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

DltDefaultLogLevel: +literal DLT_LOG_OFF: +literal


DltLogLevelSetting: DltThreshold:
EcucEnumerationLiteralDef
EcucParamConfContainerDef EcucEnumerationParamDef EcucEnumerationParamDef

+literal DLT_LOG_FATAL: +literal


EcucEnumerationLiteralDef

+literal DLT_LOG_ERROR: +literal


EcucEnumerationLiteralDef

+literal DLT_LOG_WARN: +literal


+parameter
EcucEnumerationLiteralDef

+literal DLT_LOG_INFO: +literal


EcucEnumerationLiteralDef

+literal DLT_LOG_DEBUG: +literal


EcucEnumerationLiteralDef

+literal DLT_LOG_VERBOSE: +literal


EcucEnumerationLiteralDef

+parameter

DltLogLevelThreshold:
EcucParamConfContainerDef

+subContainer lowerMultiplicity = 0
upperMultiplicity = * DltSwcContext:
+reference DltLogLevelThresholdSwcContextRef: +destination EcucParamConfContainerDef
EcucReferenceDef
lowerMultiplicity = 0
upperMultiplicity = *

10.1.11 DltLogLevelThreshold

SWS Item ECUC_Dlt_00865 :


Container Name DltLogLevelThreshold
Parent Container DltLogLevelSetting
This container contains a preconfiguration of ApplicationId / ContextId
Description
pairs and their assigned LogLevel threshold.
Post-Build Variant
true
Multiplicity
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Configuration Parameters

SWS Item ECUC_Dlt_00866 :


Name DltThreshold
Parent Container DltLogLevelThreshold
Description LogLevel Threshold
Multiplicity 1
Type EcucEnumerationParamDef
Range DLT_LOG_DEBUG --
DLT_LOG_ERROR --
DLT_LOG_FATAL --
DLT_LOG_INFO --
DLT_LOG_OFF --
DLT_LOG_VERBOSE --
DLT_LOG_WARN --
Post-Build Variant
true
Value

118 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Value Pre-compile time X VARIANT-PRE-COMPILE


Configuration Link time X VARIANT-LINK-TIME
Class Post-build time X VARIANT-POST-BUILD
Scope / scope: ECU
Dependency

SWS Item ECUC_Dlt_00894 :


Name DltLogLevelThresholdSwcContextRef
Parent Container DltLogLevelThreshold
Description Reference to an ApplicationId/ContextId pair to which a LogLevel threshold
is assigned.
Multiplicity 1
Type Reference to [ DltSwcContext ]
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency

No Included Containers

10.1.12 DltLogChannelAssignment

SWS Item ECUC_Dlt_00887 :


Container Name DltLogChannelAssignment
Parent Container DltLogOutput
This container contains a preconfiguration of ApplicationId / ContextId
Description
pairs and their assigned log channel.
Post-Build Variant
true
Multiplicity
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Configuration Parameters

SWS Item ECUC_Dlt_00896 :


Name DltLogChannelAssignmentSwcContextRef
Parent Container DltLogChannelAssignment
Description Reference to an ApplicationId/ContextId pair that is assigned to a
DltLogChannel.
Multiplicity 1
Type Reference to [ DltSwcContext ]
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency

SWS Item ECUC_Dlt_00888 :


Name DltLogChannelRef
Parent Container DltLogChannelAssignment
Description Reference to a DltLogChannel that is assigned to an ApplicationId /
ContextId pair.
119 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Multiplicity 1
Type Reference to [ DltLogChannel ]
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency

No Included Containers

10.1.13 DltTraceStatusSetting

SWS Item ECUC_Dlt_00869 :


Container Name DltTraceStatusSetting
Parent Container DltConfigSet
Description Contains settings for trace status
Configuration Parameters

SWS Item ECUC_Dlt_00870 :


Name DltDefaultTraceStatus
Parent Container DltTraceStatusSetting
Description This is the effective trace status used in case no filter matches the given
ApplicationId and ContextId. This can be seen as a fall-through filter
definition with wildcard for ApplicationId and ContextId, which will be used,
when no other filter matches.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

Included Containers
Container Name Multiplicity Scope / Dependency
This container contains a preconfiguration of ApplicationId /
DltTraceStatusAssignment 0..*
ContextId pairs and their assigned trace status.

DltTraceStatusSetting:
EcucParamConfContainerDef +parameter DltDefaultTraceStatus:
EcucBooleanParamDef

DltSwcContext:
DltTraceStatusAssignment: +reference DltTraceStatusAssignmentSwcContextRef: +destination EcucParamConfContainerDef
EcucParamConfContainerDef EcucReferenceDef
lowerMultiplicity = 0
lowerMultiplicity = 0 upperMultiplicity = *
+subContainer
upperMultiplicity = *

+parameter DltTraceStatus:
EcucBooleanParamDef

120 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

10.1.14 DltTraceStatusAssignment

SWS Item ECUC_Dlt_00871 :


Container Name DltTraceStatusAssignment
Parent Container DltTraceStatusSetting
This container contains a preconfiguration of ApplicationId / ContextId
Description
pairs and their assigned trace status.
Post-Build Variant
true
Multiplicity
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Configuration Parameters

SWS Item ECUC_Dlt_00874 :


Name DltTraceStatus
Parent Container DltTraceStatusAssignment
Description Trace status for the given ApplicationId/ContextId tuple.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item ECUC_Dlt_00895 :


Name DltTraceStatusAssignmentSwcContextRef
Parent Container DltTraceStatusAssignment
Description Reference to an ApplicationId/ContextId pair to which a DltTraceStatus is
assigned.
Multiplicity 1
Type Reference to [ DltSwcContext ]
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency

No Included Containers

10.1.15 DltLogOutput

SWS Item ECUC_Dlt_00875 :


Container Name DltLogOutput
Parent Container DltConfigSet
Description Contains settings for log/trace message output
121 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Configuration Parameters

SWS Item ECUC_Dlt_00889 :


Name DltDefaultLogChannelRef
Parent Container DltLogOutput
Description Reference to the default log channel, which has to be used for a log/trace
output, if no other match has been found.
Multiplicity 1
Type Reference to [ DltLogChannel ]
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency

Included Containers
Container Name Multiplicity Scope / Dependency
DltLogChannel 1..* Contains settings for log/trace message output
This container contains a preconfiguration of ApplicationId /
DltLogChannelAssignment 0..*
ContextId pairs and their assigned log channel.

DltLogChannel: EcucParamConfContainerDef
DltLogOutput:
EcucParamConfContainerDef +subContainer lowerMultiplicity = 1
upperMultiplicity = *

+destination +destination

DltLogChannelAssignment:
EcucParamConfContainerDef +reference DltLogChannelRef:
EcucReferenceDef
lowerMultiplicity = 0
upperMultiplicity = *
+subContainer

+reference DltLogChannelAssignmentSwcContextRef:
EcucReferenceDef

+destination

DltSwcContext:
EcucParamConfContainerDef

lowerMultiplicity = 0
upperMultiplicity = *

+reference DltDefaultLogChannelRef:
EcucReferenceDef

10.1.16 DltLogChannel

SWS Item ECUC_Dlt_00876 :


122 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Container Name DltLogChannel


Parent Container DltLogOutput
Description Contains settings for log/trace message output
Configuration Parameters

SWS Item ECUC_Dlt_00886 :


Name DltLogChannelBufferOverflowTimer
Parent Container DltLogChannel
Description Specifies the cycle time in seconds for resetting the buffer overflow flag in
case a buffer overflow occurred.
Multiplicity 1
Type EcucFloatParamDef
Range [0.001 .. 1]
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item ECUC_Dlt_00881 :


Name DltLogChannelBufferSize
Parent Container DltLogChannel
Description Buffer size in bytes for the LogChannel specific message buffer.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 4294967295
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU

SWS Item ECUC_Dlt_00877 :


Name DltLogChannelId
Parent Container DltLogChannel
Description This is the 4 ASCII character long name of the log channel as used in the
Dlt control messages as parameter name Dlt_interface
Multiplicity 1
Type EcucStringParamDef
Default value --
maxLength --
minLength --
regularExpression --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item ECUC_Dlt_00882 :


Name DltLogChannelMaxMessageLength
Parent Container DltLogChannel
Description The maximum length of a Dlt log or trace message.
Multiplicity 1
123 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Type EcucIntegerParamDef
Range 8 .. 65535
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE, VARIANT-
POST-BUILD
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: ECU

SWS Item ECUC_Dlt_00884 :


Name DltLogChannelMaxNumOfRetries
Parent Container DltLogChannel
Description The maximum amount of retries for sending a Dlt log or trace message.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 255
Default value 0
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item ECUC_Dlt_00878 :


Name DltLogChannelThreshold
Parent Container DltLogChannel
Description LogLevel Threshold
Multiplicity 1
Type EcucEnumerationParamDef
Range DLT_LOG_DEBUG --
DLT_LOG_ERROR --
DLT_LOG_FATAL --
DLT_LOG_INFO --
DLT_LOG_OFF --
DLT_LOG_VERBOSE --
DLT_LOG_WARN --
Post-Build Variant
true
Value
Value Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME
Class Post-build time X VARIANT-POST-BUILD
Scope / scope: ECU
Dependency

SWS Item ECUC_Dlt_00883 :


Name DltLogChannelTrafficShapingBandwidth
Parent Container DltLogChannel
Description Set the maximum possible bandwith in bit/s.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 ..
18446744073709551615
Default value --
Post-Build Variant
true
Multiplicity
124 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Post-Build Variant Value true


Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE, VARIANT-
POST-BUILD
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: DltGeneralTrafficShapingSupport enabled

SWS Item ECUC_Dlt_00885 :


Name DltLogChannelTransmitCycle
Parent Container DltLogChannel
Description Specifies the cycle time in seconds of the transmit functionality of this log
channel.
Multiplicity 1
Type EcucFloatParamDef
Range [0.001 .. 1]
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item ECUC_Dlt_00879 :


Name DltLogTraceStatusFlag
Parent Container DltLogChannel
Description Parameter to turn on/off on this LogChannel completely.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency

Included Containers
Container Name Multiplicity Scope / Dependency
Contains the configuration parameters of the AUTOSAR Dlt
DltTxPdu 1
module's Tx Pdus.

125 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

DltLogChannelId:
+parameter EcucStringParamDef
DltLogChannel:
EcucParamConfContainerDef

lowerMultiplicity = 1
upperMultiplicity = * +literal DLT_LOG_OFF:
DltLogChannelThreshold:
EcucEnumerationLiteralDef
EcucEnumerationParamDef

+literal DLT_LOG_FATAL:
EcucEnumerationLiteralDef

+literal DLT_LOG_ERROR:
EcucEnumerationLiteralDef

+parameter +literal DLT_LOG_WARN:


EcucEnumerationLiteralDef

+literal DLT_LOG_INFO:
EcucEnumerationLiteralDef

+literal DLT_LOG_DEBUG:
EcucEnumerationLiteralDef

+literal
DLT_LOG_VERBOSE:
EcucEnumerationLiteralDef

+parameter DltLogTraceStatusFlag:
EcucBooleanParamDef

DltLogChannelBufferSize:
+parameter EcucIntegerParamDef

min = 0
max = 4294967295
DltLogChannelTransmitCycle:
+parameter EcucFloatParamDef

min = 0.001
max = 1
DltLogChannelMaxMessageLength:
+parameter EcucIntegerParamDef

min = 8
max = 65535
DltLogChannelTrafficShapingBandwidth:
+parameter EcucIntegerParamDef

lowerMultiplicity = 0
upperMultiplicity = 1
DltLogChannelMaxNumOfRetries:
+parameter EcucIntegerParamDef

min = 0
max = 255
defaultValue = 0
DltLogChannelBufferOverflowTimer:
+parameter EcucFloatParamDef

min = 0.001
max = 1

Pdu: EcucParamConfContainerDef
DltTxPdu: +destination
+reference DltTxPduRef:
EcucParamConfContainerDef lowerMultiplicity = 0
EcucReferenceDef
upperMultiplicity = *
lowerMultiplicity = 1
upperMultiplicity = 1
DltTxPduId: EcucIntegerParamDef

min = 0
+subContainer +parameter
max = 65535
lowerMultiplicity = 0
upperMultiplicity = 1
symbolicNameValue = true

+parameter DltTxPduUsesTp:
EcucBooleanParamDef

10.1.17 DltTxPdu

SWS Item ECUC_Dlt_00907 :


Container Name DltTxPdu

126 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Parent Container DltLogChannel


Contains the configuration parameters of the AUTOSAR Dlt module's Tx
Description
Pdus.
Configuration Parameters

SWS Item ECUC_Dlt_00893 :


Name DltTxPduId
Parent Container DltTxPdu
Description The numerical value used as the ID of this I-PDU.
This handle Id is used for the APIs calls Dlt_TxConfirmation,
Dlt_TriggerTransmit, Dlt_TriggerIPDUSend or
Dlt_TriggerIPDUSendWithMetaData, Dlt_CopyTxData and
Dlt_TpTxConfirmation to transmit respectively confirm transmissions of I-
PDUs.
Multiplicity 0..1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 65535
Default value --
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item ECUC_Dlt_00913 :


Name DltTxPduUsesTp
Parent Container DltTxPdu
Description If set to TRUE, the PDU is transmitted using the TP API. If FALSE, the IF
API is used.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00892 :


Name DltTxPduRef
Parent Container DltTxPdu
Description Reference to the "global" Pdu structure to allow harmonization of handle
IDs in the COM-Stack.
Multiplicity 1
Type Reference to [ Pdu ]
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

127 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

No Included Containers

10.1.18 DltRxPdu

SWS Item ECUC_Dlt_00900 :


Container Name DltRxPdu
Parent Container DltConfigSet
Description Contains the Pdu IDs to be used for Dlt control messages reception.
Post-Build Variant
true
Multiplicity
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Configuration Parameters

SWS Item ECUC_Dlt_00899 :


Name DltRxPduId
Parent Container DltRxPdu
Description The numerical value used as the ID of this I-PDU. The DltRxPduId is
required by the API calls Dlt_RxIndication, Dlt_TpRxIndication,
Dlt_StartOfReception and Dlt_CopyRxData to receive I-PDUs from the
PduR.
Multiplicity 0..1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 65535
Default value --
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item ECUC_Dlt_00912 :


Name DltRxPduUsesTp
Parent Container DltRxPdu
Description If set to TRUE, the PDU is received using the TP API. If FALSE, the IF API
is used.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Dlt_00898 :


Name DltRxPduRef
128 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace
Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

Parent Container DltRxPdu


Description Reference to the "global" Pdu structure to allow harmonization of handle
IDs in the COM-Stack.
Multiplicity 1
Type Reference to [ Pdu ]
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

129 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace


Specification of Diagnostic Log and Trace
AUTOSAR CP R20-11

10.2 Published Information


Published information contains data defined by the implementer of the SW module
that does not change when the module is adapted (i.e. configured) to the actual
HW/SW environment. It thus contains version and manufacturer information.

Additional module-specific published parameters are listed below if applicable.

130 of 130 Document ID 351: AUTOSAR_SWS_DiagnosticLogAndTrace

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy