DEENESPTFRRUARHIKOZHNL

Diagnostic Log and Trace (DLT)

ModulDlt (Diagnostic Log and Trace)
BSW-Modul-ID55
Standard-Header#include "Dlt.h"
SWS-SpezifikationAUTOSAR_SWS_DiagnosticLogAndTrace.pdf
ClusterDiagnostic Services

Module guideAI-GENERATED

Collects, filters, and buffers log and trace messages from SW-Cs and BSW and transmits them to external tools.
AI-GENERATED unreviewed Model: claude-opus-5-5 · Effort: high · Temperature: not controllable · Prompt: dfa88865c54d Provenance Open questions (1)
Causal anchor: R20-11 Valid from R20-11 Synthesized for this specification release.
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Collects, filters, and buffers log and trace messages from SW-Cs and BSW and transmits them to external tools.

The Dlt module collects log and trace messages from SW-Cs, BSW modules, DET, and RTE VFB hooks. It filters them according to log level and trace status, assigns them to LogChannels, and buffers them. Transmission is decoupled via the cyclic Dlt_TxFunction and the PduR [SWS_Dlt_00241]. External clients can change filters and channel assignments at runtime; registered SW-Cs are notified of this. Most important constraint: Prior to Dlt_Init and until expiry of the optional startup delay, messages are only buffered [SWS_Dlt_00005].

The Dlt module is the central collection point for log and trace messages on the ECU. SW-Cs (via RTE ports) and BSW modules deliver messages via Dlt_SendLogMessage and Dlt_SendTraceMessage [SWS_Dlt_00241] [SWS_Dlt_00243]. DET errors are added via Dlt_DetForwardErrorTrace [SWS_Dlt_00430], SW-C communication via generated VFB trace hooks of the RTE [SWS_Dlt_00027]. The sole sink is the PduR with PduR_DltTransmit [SWS_Dlt_00762]. Each message is identified via a tuple of ApplicationId and ContextId with 4 bytes each; 0x00000000 serves as a wildcard [SWS_Dlt_00226] [SWS_Dlt_00227].

kontext swc SW-C rte RTE (Ports, VFB-Hooks) swc->rte Dlt_SendLogMessage Dlt_RegisterContext dlt Dlt rte->dlt Port-Aufrufe VFB-Trace-Hooks bsw BSW-Module bsw->dlt Dlt_SendLogMessage Dlt_SendTraceMessage det DET (Fan-out) det->dlt Dlt_DetForwardErrorTrace ecum EcuM ecum->dlt Dlt_Init schm SchM schm->dlt Dlt_TxFunction dlt->rte LogLevelChangedNotification Dlt_InjectCall_<SESSION> nvm NvM dlt->nvm NvM_ReadBlock NvM_WriteBlock zeit Gpt / StbM (Zeitstempel) dlt->zeit Gpt_GetTimeElapsed StbM_GetCurrentTime pdur PduR dlt->pdur PduR_DltTransmit pdur->dlt Dlt_RxIndication Dlt_TxConfirmation client Externer Dlt-Client pdur->client Dlt-Nachrichten client->pdur Steuernachrichten

Context diagram: Sources, auxiliary services (NvM, Gpt/StbM, SchM), and the PduR as sink around Dlt. Sources: [SWS_Dlt_00762], [SWS_Dlt_00763], [SWS_Dlt_91005].

Even before initialization, Dlt buffers incoming messages [SWS_Dlt_00003]. They are not processed until Dlt_Init has run and the optional startup delay timer has expired [SWS_Dlt_00005]. With NvRAM support, Dlt_Init restores the runtime configuration via NvM_ReadBlock [SWS_Dlt_00453]. Saving occurs only upon explicit request via Dlt_StoreConfiguration [SWS_Dlt_00078].

In the call context, Dlt performs filtering, channel selection, length check, and buffer storage. Transmission is decoupled from the cyclic Dlt_TxFunction, including retries after negative acknowledgment SWS DLT p. 92 [SWS_Dlt_91005].

Transmission of a Dlt message via a LogChannelDlt-Nutzer (SW-C/RTE/Det)DltGptSchMPduRUse Case: Acceptance in call context (synchronous)Dlt_SendLogMessage / Dlt_SendTraceMessage /Dlt_DetForwardErrorTraceNachrichtenfilterung,LogChannel-Schwelle anwendenSelect target LogChannels,Check lengthZeitstempel holen (Gpt_GetTimeElapsed)verstrichene Zeitin LogChannel-Puffer ablegenStd_ReturnTypeUse Case: Entkoppelter VersandDlt_TxFunction()loopaccording to traffic shapingDlt-Header zusammensetzen,Increment transmission counterPduR_DltTransmit(DltTxPduId, ...)Dlt_TxConfirmation(TxPduId, result)altE_OK or retries exhaustedRemove message from bufferE_NOT_OK, retry permissibleRetain message for retransmission

Sequence diagram: The synchronous send call ends with buffer storage. Dlt_TxFunction handles transmission, acknowledgment, and retry. Sources: SWS DLT p. 92, [SWS_Dlt_91005], [SWS_Dlt_00273].

External clients control log levels, trace status, and LogChannel thresholds via control messages that arrive via Dlt_RxIndication [SWS_Dlt_00272]. The same control parameters are also available as APIs, such as Dlt_SetLogLevel [SWS_Dlt_00252]. In order for Dlt to be able to inform registered SW-Cs via LogLevelChangedNotification, they previously register their contexts with Dlt_RegisterContext [SWS_Dlt_00245] [SWS_Dlt_00496].

In case of an error, the send calls report DLT_E_MSG_TOO_LARGE, DLT_E_NO_BUFFER, or DLT_E_UNKNOWN_SESSION_ID [SWS_Dlt_00495]. In the event of a buffer overflow, the message is discarded, an overflow flag is set, and a BufferOverflowNotification is sent according to configuration SWS DLT p. 32.

Role and System Boundary: Central Collection Point for Log and Trace Data

The Diagnostic Log and Trace (Dlt) module receives log and trace messages from software components (SW-Cs) and basic software (BSW). It filters and buffers them and forwards them as Dlt messages to an external tool. The two send interfaces Dlt_SendLogMessage and Dlt_SendTraceMessage are explicitly intended for both BSW modules and SW-Cs [SWS_Dlt_00241] [SWS_Dlt_00243]. The source of the data path is an SW-C or a BSW module, the sink is the PDU Router SWS DLT p. 26. For this, Dlt strictly requires PduR_DltTransmit [SWS_Dlt_00762]. Message format, commands, and protocol to the external client are not defined by the SWS, but by the protocol specification SWS DLT p. 9.

In addition to explicit calls, there are fixed suppliers:

Dlt obtains timestamps from Gpt or StbM, while persistence is handled by NvM [SWS_Dlt_00763]. Dlt_DetForwardErrorTrace belongs to the API in R20-11, but was removed in R25-11 SWS DLT p. 1.

kontext swc SW-C rte RTE (Ports, VFB-Hooks) swc->rte Dlt_SendLogMessage Dlt_RegisterContext dlt Dlt rte->dlt Port-Aufrufe VFB-Trace-Hooks bsw BSW-Module bsw->dlt Dlt_SendLogMessage Dlt_SendTraceMessage det DET (Fan-out) det->dlt Dlt_DetForwardErrorTrace ecum EcuM ecum->dlt Dlt_Init schm SchM schm->dlt Dlt_TxFunction dlt->rte LogLevelChangedNotification Dlt_InjectCall_<SESSION> nvm NvM dlt->nvm NvM_ReadBlock NvM_WriteBlock zeit Gpt / StbM (Zeitstempel) dlt->zeit Gpt_GetTimeElapsed StbM_GetCurrentTime pdur PduR dlt->pdur PduR_DltTransmit pdur->dlt Dlt_RxIndication Dlt_TxConfirmation client Externer Dlt-Client pdur->client Dlt-Nachrichten client->pdur Steuernachrichten

Context diagram: Dlt is situated between the message sources (SW-C via RTE, BSW, DET) and the PduR as the sole sink. NvM, Gpt/StbM, and SchM are auxiliary services. Sources: [SWS_Dlt_00762], [SWS_Dlt_00763], [SWS_Dlt_00430], [SWS_Dlt_91005], SWS DLT p. 26.

From Startup to Operation: Pre-Initialization Buffering, Dlt_Init, and Persistence

SW-Cs and BSW modules can already log before Dlt is initialized. Therefore, Dlt must buffer data from Dlt_SendLogMessage and Dlt_SendTraceMessage even before initialization [SWS_Dlt_00003]. Regular processing of the buffered data only begins once two conditions are met: Dlt_Init has executed, and the optional timer DltGeneralStartUpDelayTimer has expired [SWS_Dlt_00005]. This timer is started when Dlt_Init is called, provided it is configured SWS DLT p. 25.

lebenszyklus start uninit Not initialized transmission calls are buffered start->uninit uninit->uninit Dlt_SendLogMessage / Dlt_SendTraceMessage verzoegerung Initialized start delay running (buffering continues) uninit->verzoegerung Dlt_Init [DltGeneralStartUpDelayTimer konfiguriert] betrieb Operation buffer content and new messages are processed uninit->betrieb Dlt_Init [no start delay timer] verzoegerung->betrieb Timer abgelaufen

State diagram: Up to initialization and, if applicable, until the end of the startup delay, messages are only buffered, and only processed thereafter. Sources: [SWS_Dlt_00003], [SWS_Dlt_00005], SWS DLT p. 25.

Dlt_Init is synchronous and non-reentrant. The function expects a pointer to Dlt_ConfigType, whose content is implementation-specific [SWS_Dlt_00239] [SWS_Dlt_00437]. Because Dlt uses the NvM, initialization should take place late in startup and after the NvM [SWS_Dlt_00239]. If DltGeneralNvRAMSupport = TRUE, Dlt behaves as follows:

Without NvRAM support, the static configuration applies SWS DLT p. 25. According to the diagram, the caller is the EcuM SWS DLT p. 159.

Initialization of the Dlt moduleEcuMDltNvMGptDlt_Init(config)altDltGeneralNvRAMSupport == TRUENvM_ReadBlock(BlockId, NvM_DstPtr)Check validity of NV blocks,gespeicherte Werte als StartwerteDltGeneralNvRAMSupport == FALSEstatische Konfiguration ladenoptDltGeneralStartUpDelayTimer konfiguriertGpt_StartTimer(Channel, Value)Return (synchronous)After init and expiration of start delay:gepufferte Nachrichten verarbeiten

Sequence diagram: EcuM calls Dlt_Init synchronously. Dlt loads the configuration depending on DltGeneralNvRAMSupport from NvM or statically and optionally starts the startup delay timer. Sources: [SWS_Dlt_00239], [SWS_Dlt_00453], [SWS_Dlt_00005], SWS DLT p. 159, CP SWS DLT p. 90.

Message Model: Identifiers, Log Levels, and Trace Types

Each log message carries a structure Dlt_MessageLogInfoType with five fields: argCount, logLevel, options, contextId, and appId [SWS_Dlt_00236]. Trace messages use Dlt_MessageTraceInfoType, which contains a field traceInfo instead of the log level [SWS_Dlt_00237]. ApplicationId and ContextId are arrays of 4 bytes; 0x00000000 serves as a wildcard [SWS_Dlt_00226] [SWS_Dlt_00227]. The Application ID is the short name of the SW-C. The Context ID groups its messages by functionality EXP LSA p. 159. The bit field Dlt_MessageOptionsType encodes verbose mode in bit 0 and the message type in bits 1–3 [SWS_Dlt_00229].

typeValuesReference
Dlt_MessageTypeDLT_TYPE_LOG, DLT_TYPE_APP_TRACE, DLT_TYPE_NW_TRACE, DLT_TYPE_CONTROL[SWS_Dlt_00224]
Dlt_MessageLogLevelTypeDLT_LOG_OFF (0x00) to DLT_LOG_VERBOSE (0x06)[SWS_Dlt_00230]
Dlt_MessageTraceTypeDLT_TRACE_VARIABLE, DLT_TRACE_FUNCTION_IN, DLT_TRACE_FUNCTION_OUT, DLT_TRACE_STATE, DLT_TRACE_VFB[SWS_Dlt_00231]
Dlt_MessageNetworkTraceInfoTypeDLT_NW_TRACE_IPC to DLT_NW_TRACE_SOMEIP[SWS_Dlt_00233]

In non-verbose mode, a unique Message ID identifies the static part of a message [SWS_Dlt_00228]. The IDs 0x00000001 (DEM), 0x00000002 (DET), and 0x00000003 (Trace) are reserved and cannot be used for SW-Cs [SWS_Dlt_00031]. On the wire, the Message ID directly follows the header, followed by the non-static data PRS DLT p. 23. The header field MTIN is formed from the log level or trace type depending on the message type MSTP PRS DLT p. 24.

Transmit Path: Filter, LogChannel Selection, Buffering, and Dlt_TxFunction

The send calls are synchronous and reentrant. They receive the sessionId, the info structure, and the payload including length [SWS_Dlt_00241] [SWS_Dlt_00243]. The R20-11 diagram shows the sequence in the call context:

  1. Message filtering
  2. Apply LogChannel threshold
  3. Select target LogChannels
  4. Check length
  5. Store message in LogChannel buffer

Transmission is handled only later by Dlt_TxFunction SWS DLT p. 92. The following individual steps are detailed in document passages of the R23-11 version and match this diagram. Dlt fetches a timestamp only if configured: via Gpt_GetTimeElapsed or via StbM_GetCurrentTime [SWS_Dlt_00654] [SWS_Dlt_00655].

The LogChannels are determined in three stages SWS DLT p. 32:

  1. Channels whose assignment exactly matches the ApplicationId/ContextId tuple.
  2. Channels with a matching ApplicationId and wildcard ContextId.
  3. If the list remains empty, the default LogChannel.

Assignments can be changed at runtime using Dlt_SetLogChannelAssignment [SWS_Dlt_00751]. A message is discarded only when it exceeds DltLogChannelMaxMessageLength for all assigned channels SWS DLT p. 31. Otherwise, it is copied into the buffers of all channels for which it is short enough SWS DLT p. 32.

kanalwahl start filter Filter bestanden? (Log-Level/Trace-Status, LogChannel-Schwelle) start->filter verworfen Not processed further filter->verworfen no exakt Collect channels with exactly matching ApplicationId/ContextId tuple filter->exakt yes wildcard Add channels with matching ApplicationId and wildcard ContextId exakt->wildcard leer Liste leer? wildcard->leer default Default-LogChannel (DltDefaultLogChannelRef) leer->default yes laenge Length <= DltLogChannelMaxMessageLength for at least one channel? leer->laenge no default->laenge zulang verwerfen, DLT_E_MSG_TOO_LARGE laenge->zulang no kopie Copy into buffers of all channels for which the length fits laenge->kopie yes platz Platz in keinem zugeordneten Puffer? kopie->platz keinpuffer Discard, DLT_E_NO_BUFFER, set overflow flag platz->keinpuffer yes ok gepuffert, Versand durch Dlt_TxFunction platz->ok no

Activity diagram: A message passes through filters, three-stage channel selection, length check, and buffer storage. Each branch can lead to discarding with its own return value. Sources: SWS DLT p. 31, SWS DLT p. 32, [SWS_Dlt_00495], [SWS_Dlt_00751].

Transmission via the PduR is decoupled from the send call and runs in the context of Dlt_TxFunction [SWS_Dlt_91005]. The header is assembled prior to PduR_DltTransmit, and a transmission counter counts with each message SWS DLT p. 35. A message is removed from the buffer in three cases SWS DLT p. 38:

  • PduR_DltTransmit returns E_NOT_OK.
  • A positive transmit confirmation arrives.
  • A negative confirmation arrives and DltLogChannelMaxNumOfRetries is exceeded.

The lower layer reports via the following callbacks:

Transmission of a Dlt message via a LogChannelDlt-Nutzer (SW-C/RTE/Det)DltGptSchMPduRUse Case: Acceptance in call context (synchronous)Dlt_SendLogMessage / Dlt_SendTraceMessage /Dlt_DetForwardErrorTraceNachrichtenfilterung,LogChannel-Schwelle anwendenSelect target LogChannels,Check lengthZeitstempel holen (Gpt_GetTimeElapsed)verstrichene Zeitin LogChannel-Puffer ablegenStd_ReturnTypeUse Case: Entkoppelter VersandDlt_TxFunction()loopaccording to traffic shapingDlt-Header zusammensetzen,Increment transmission counterPduR_DltTransmit(DltTxPduId, ...)Dlt_TxConfirmation(TxPduId, result)altE_OK or retries exhaustedRemove message from bufferE_NOT_OK, retry permissibleRetain message for retransmission

Sequence diagram: The synchronous send call ends with buffer storage. The actual transmission, confirmations, and retries are handled by the cyclic Dlt_TxFunction. Sources: SWS DLT p. 92, [SWS_Dlt_91005], [SWS_Dlt_00273], SWS DLT p. 35, SWS DLT p. 38.

VFB Trace via Generated RTE Hook Functions

VFB trace means: The RTE implicitly forwards SW-C communication to Dlt without the SW-C itself making a call SWS DLT p. 23. For this purpose, Dlt implements hook functions for each configured event described by a BswModuleEntry with the short name “Rte_Dlt…” [SWS_Dlt_00027]. The prototype is provided by the RTE description [SWS_Dlt_00335]. Dlt_SendTraceMessage is an SW-C interface. Therefore, the hooks call an equivalent internal function [SWS_Dlt_00285], specifically in non-verbose mode [SWS_Dlt_00277] and with all arguments as payload [SWS_Dlt_00278].

Additional rules apply to the hooks:

  • Each hook function receives its own ContextId. With very large numbers of signals, events may be bundled [SWS_Dlt_00279].
  • Prior to transmission, each hook checks the trace status of its ContextId [SWS_Dlt_00281].
  • The message carries DLT_TYPE_APP_TRACE with DLT_TRACE_VFB [SWS_Dlt_00484] and the ApplicationID “VFBT” SWS DLT p. 23.
  • The trace status of the hooks is changed via a dedicated function harmonized with LogTraceSessionControl [SWS_Dlt_00283].

Interpretation: Because the internal function corresponds to Dlt_SendTraceMessage, VFB messages are likely to traverse the same buffered transmit path as explicit trace messages [SWS_Dlt_00285]. Question Q-cb77a5e7bde21b01 (open)

VFB trace via RTE hook functionSW-CRTEDltSchMPduRCommunication via the VFBRte_Dlt...-Hookfunktion(Argumente)optTrace status of ContextId activeinternes Dlt_SendTraceMessage (non-verbose),DLT_TYPE_APP_TRACE / DLT_TRACE_VFBvermutlich: Filter, Kanalwahl, PufferungReturnDlt_TxFunction()PduR_DltTransmit(...)Interpretation: gleicher gepufferter SendepfadLike explicit trace messages

Sequence diagram: An RTE hook sends a non-verbose trace message with DLT_TRACE_VFB only when the trace status is active. That it uses the shared transmit path is an interpretation. Sources: [SWS_Dlt_00027], [SWS_Dlt_00281], [SWS_Dlt_00285], [SWS_Dlt_00484], SWS DLT p. 33.

Sessions, Registration, and Runtime Control by External Clients

SW-Cs connect per configuration entry via the following ports:

Port-defined argument values serve as SessionIds [SWS_Dlt_00022]. They start at 0x1000; BSW modules use their module ID [SWS_Dlt_00023]. They are unique and consecutive per port [SWS_Dlt_00332]. Their type is Dlt_SessionIDType (uint32) [SWS_Dlt_00225]. If an SW-C is instantiated multiple times, each instance receives its own session EXP LSA p. 159.

Using Dlt_RegisterContext, a module registers its ApplicationId/ContextId tuple along with descriptions [SWS_Dlt_00245]. Dlt remembers through which port the tuple was registered [SWS_Dlt_00021]. Upon stopping, the module calls Dlt_UnregisterContext [SWS_Dlt_00769]. The registration fulfills one purpose: Dlt thereby knows which SW-C it must notify in the event of changed log levels or trace status SWS DLT p. 20. LogLevelChangedNotification and TraceStatusChangedNotification serve this purpose [SWS_Dlt_00496].

Control messages from an external client reach Dlt via the PduR. For single PDUs, they arrive via Dlt_RxIndication [SWS_Dlt_00272]. Via TP, they arrive via Dlt_StartOfReception, Dlt_CopyRxData, and Dlt_TpRxIndication [SWS_Dlt_91006] [SWS_Dlt_91008] [SWS_Dlt_91007]. Dlt then updates the filter, optionally notifies the registered SW-C, and sends the response via PduR_DltTransmit SWS DLT p. 93.

Registration and external SetLogLevel commandSW-CDltPduRExterner Dlt-ClientUse Case: Registrierungloopje SW-C-KontextDlt_RegisterContext(sessionId, appId, contextId, ...)Remember tuple and portE_OKUse Case: Steuerkommando SetLogLevelDlt-SteuernachrichtDlt_RxIndication(RxPduId, PduInfoPtr)Log-Level-Filter aktualisierenoptLogLevelChange-Benachrichtigungregistrierte SW-C nachschlagenLogLevelChangedNotification(appId, contextId, logLevel)PduR_DltTransmit (Antwort)Response to control message

Sequence diagram: SW-Cs register their contexts. An external SetLogLevel command updates the filter, optionally triggers a notification, and is answered via PduR. Sources: SWS DLT p. 93, [SWS_Dlt_00245], [SWS_Dlt_00272], [SWS_Dlt_00496].

The same control parameters are available as APIs:

There are differences compared to later releases:

  • In R20-11, Dlt_GetDefaultTraceStatus has a parameter logChannelName. In R25-11, it is missing SWS DLT p. 56.
  • In R20-11, Dlt_AssignmentOperation encodes DLT_ASSIGN_ADD = 0x01 and DLT_ASSIGN_REMOVE = 0x02 [SWS_Dlt_00730]. R25-11 uses the value 0x00 for REMOVE SWS DLT p. 87. For R20-11, the requirement applies.

Persistence: Dlt_StoreConfiguration copies the current configuration via NvM_WriteBlock [SWS_Dlt_00736]. This occurs only if DltGeneralNvRAMSupport is active and saving was explicitly requested [SWS_Dlt_00078] [SWS_Dlt_00451]. Dlt_ResetToFactoryDefault resets log level and trace status to the stored defaults. With NvRAM support, the function also deletes the stored values [SWS_Dlt_00739]. Via Dlt_InjectCall_<SESSION>, Dlt can asynchronously inject application-specific calls into an SW-C [SWS_Dlt_00259] [SWS_Dlt_00498].

Behavior in the event of an error

The error codes of the SW-C interface are specified in interface DltSwcMessageService [SWS_Dlt_00495]. In addition, the document locations describe the behavior on the transmit path.

  • Message too long: Return DLT_E_MSG_TOO_LARGE if the message is too long for all assigned LogChannels [SWS_Dlt_00495] SWS DLT p. 31.
  • Buffer overflow: Return DLT_E_NO_BUFFER. The message is discarded, an overflow flag is set, and a BufferOverflowNotification is sent according to the configuration. Dlt_TxFunction checks the flag and debounce time SWS DLT p. 32 SWS DLT p. 95.
  • Unknown session or registration error: DLT_E_UNKNOWN_SESSION_ID, DLT_E_CONTEXT_ALREADY_REG, and DLT_E_CONTEXT_NOT_YET_REG [SWS_Dlt_00495] [SWS_Dlt_00769].
  • Timestamp not available: The timestamp is set to 0x00000000 SWS DLT p. 30.
  • Transmission error: A negative Dlt_TxConfirmation triggers retries until DltLogChannelMaxNumOfRetries is reached. If PduR_DltTransmit returns E_NOT_OK, the message is removed [SWS_Dlt_00273] SWS DLT p. 38.
  • Control commands: An unknown tuple for SetLogLevel is responded to with DLT_E_ERROR SWS DLT p. 39. The configuration APIs report E_NOT_OK [SWS_Dlt_00252].
  • Persistency: In R20-11, Dlt_StoreConfiguration provides the return values E_OK, E_NOT_OK, and DLT_E_NOT_SUPPORTED [SWS_Dlt_00736]. DLT_E_ERROR was not added until R24-11 SWS DLT p. 1.
  • Development and runtime errors:
    • Development errors: DLT_E_PARAM, DLT_E_PARAM_POINTER, DLT_E_INIT_FAILED, DLT_E_REGISTRATION [SWS_Dlt_00727]
    • Runtime errors: DLT_E_SKIPPED_TRANSMISSION, DLT_E_DEPRECATED_PARAMETER, DLT_E_MULTIPLE_REQUESTS [SWS_Dlt_00728]

Further detailed evidence

AI-generated module guide based on the R20-11 requirements and assigned document locations; individual sequence details originate from document locations of later releases and are identified as such. The linked requirements are binding.

Diagnostic Log and Trace (DLT)

The DLT module collects log messages and trace points and formats them into standardized DLT frames for external tooling.

Funktionen — Übersicht

Typen — Übersicht

Funktionen & Typen — Detailansicht

function Dlt_Init [SWS_Dlt_00239] 📄 PDF

void Dlt_Init (const Dlt_ConfigType* config);

Dlt is using the NVRam Manager and is to be initialized very late in the ECU startup phase. The Dlt_ Init() function should be called after the NVRam Manager is initialized.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 7562b88c65ab Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous and non-reentrant function Dlt_Init (service ID 0x01, available via header file Dlt.h) initializes the module Diagnostic Log and Trace (DLT) in the Classic Platform [SWS_Dlt_00239]. Via parameter config, it accepts a pointer to the module-specific configuration structure of type Dlt_ConfigType and returns no return value [SWS_Dlt_00239].

Specific boundary conditions apply to the call context and the temporal interaction with other BSW modules:

  • Initialization order: The DLT module uses the NVRam Manager and must be initialized very late in the startup phase of the ECU [SWS_Dlt_00239]. Calling the function Dlt_Init must strictly take place only after full initialization of the NVRam Manager [SWS_Dlt_00239].
  • Persistent data: If the configuration parameter DltGeneralNvRAMSupport is set to TRUE, the DLT module in Dlt_Init uses the interface NvM_ReadBlock of the NVRAM Manager to restore persistent values for required variables [SWS_Dlt_00453].
  • Buffer processing: As soon as the module has been initialized by Dlt_Init and the optional timer DltGeneralStartUpDelayTimer has expired, all log and trace data buffered in the meantime are processed and transmitted according to the specification [SWS_Dlt_00005].

Since the function is specified as non-reentrant, the calling context must ensure that Dlt_Init is not re-entered concurrently or in an interrupting manner during execution [SWS_Dlt_00239].

This text was generated by an AI system based on the AUTOSAR R20-11 specification.

Implementer's Guide to follow (complexity I1)

function Dlt_SendTraceMessage [SWS_Dlt_00243] 📄 PDF

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

The service represents the interface to be used by basic software modules or by software components to trace parameters.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: b4775c790e44 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous and reentrant function Dlt_SendTraceMessage serves basic software modules (BSW) as well as software components (SW-C) for transmitting trace parameters to the Dlt module [SWS_Dlt_00243].

Parameters and call context

Upon invocation, the module or port identifier via sessionId, metadata for message filtering via traceInfo, and the payload buffer via traceData along with length specification traceDataLength are passed [SWS_Dlt_00243]. The module can already buffer trace messages even if Dlt has not yet been initialized [SWS_Dlt_00003].

Return Values and Error Handling

The service signals the status via specific return values [SWS_Dlt_00243]:

  • E_OK: The operation was executed successfully.
  • DLT_E_MSG_TOO_LARGE: The message exceeds the allowed size of all assigned log channels.
  • DLT_E_NO_BUFFER: Insufficient buffer memory; the message cannot be buffered for at least one log channel.
  • DLT_E_UNKNOWN_SESSION_ID: The passed sessionId is unknown to the module.

Interaction with Hook Functions

Since Dlt_SendTraceMessage is specified as an interface for SW-Cs, an equivalent internal implementation [SWS_Dlt_00285] exists for generated hook functions, which sends trace messages in non-verbose mode [SWS_Dlt_00277].

This text was generated by an AI based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function Dlt_SendLogMessage [SWS_Dlt_00241] 📄 PDF

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

The service represents the interface to be used by basic software modules or by software component to send Log Messages.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 1ca903195ba8 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous and reentrant function Dlt_SendLogMessage (service ID 0x03) serves basic software (BSW) modules and software components (SW-C) as a standardized interface for sending log messages [SWS_Dlt_00241]. The call is made via the header file Dlt.h, and due to reentrancy, the function is designed for concurrent use [SWS_Dlt_00241].

When calling the function, four passed parameters are required, while no output parameters are used [SWS_Dlt_00241]:

  • sessionId: Represents the session ID. For SW-Cs, this parameter is invisible as a port-defined argument value, whereas BSW modules pass their module number directly.
  • logInfo: Pointer to a constant structure containing the relevant metadata for filtering the log message.
  • logData: Pointer to the byte array containing the data to be logged, which forms the actual payload of the message.
  • logDataLength: Numerical length of the data buffer logData.

Error handling is performed directly via the return value of type Std_ReturnType, which indicates the success of the operation or specific error conditions [SWS_Dlt_00241]:

  • DLT_OK: The log message was successfully accepted and processed.
  • DLT_E_MSG_TOO_LARGE: The message exceeds the maximum allowed buffer size for all assigned log channels.
  • DLT_E_NO_BUFFER: The message could not be buffered on any of the assigned log channels.
  • DLT_E_UNKNOWN_SESSION_ID: The passed session ID is invalid or unknown to the module.

This usage note was generated by an AI based on the AUTOSAR specification.

function Dlt_UnregisterContext [SWS_Dlt_00769] 📄 PDF

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

The service has to be called when a software module is going to be stopped. Available vi a Dlt.h

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 9c17fc452d0b Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The synchronous function Dlt_UnregisterContext (service ID 0x16) is provided via the header file Dlt.h and must be called when a software module is stopped [SWS_Dlt_00769]. It serves to unregister a previously registered context of an application.

The function expects three input parameters [SWS_Dlt_00769]:

  • sessionId: Module number; corresponds to the module ID within the BSW or the port-specifically defined argument value within a software component (SW-C) [SWS_Dlt_00769].
  • appId: The identifier of the parent application (Application ID) [SWS_Dlt_00769].
  • contextId: The identifier of the context to be unregistered (Context ID) [SWS_Dlt_00769].

Return Values and Error Handling

The return value of type Std_ReturnType provides information about the result of the execution [SWS_Dlt_00769]:

  • E_OK: The requested operation was completed successfully [SWS_Dlt_00769].
  • DLT_E_CONTEXT_NOT_YET_REG: The context of the software module was not registered beforehand [SWS_Dlt_00769].
  • DLT_E_UNKNOWN_SESSION_ID: The passed session ID is unknown [SWS_Dlt_00769].

Concurrency and Limitations

The function is specified as reentrant and behaves synchronously [SWS_Dlt_00769]. Calling modules must ensure that the passed session ID is valid and that the context was actually registered before termination in order to avoid errors during deregistration [SWS_Dlt_00769].

This usage note was generated automatically based on the specification AUTOSAR CP R20-11.

function Dlt_DetForwardErrorTrace [SWS_Dlt_00432] 📄 PDF

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

Service to fo rward error reports from Det to Dlt.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ea1faa559ee0 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Call Context

The synchronous interface Dlt_DetForwardErrorTrace with the service ID 0x07 serves to forward reported development errors from the Default Error Tracer (DET) to the Dlt module [SWS_Dlt_00432]. The Dlt module provides this service to ensure the required fan-out capability of the DET for error reports [SWS_Dlt_00430]. The declaration of this C function is included via the header file Dlt_Det.h [SWS_Dlt_00432].

Parameters and interface specification

The function accepts four mandatory input parameters and defines neither return values nor output parameters [SWS_Dlt_00432]:

  • moduleId: Module ID of the calling software module in which the error occurred.
  • instanceId: Identifier of the index-based module instance (counting starts at 0; single-instance modules pass 0).
  • apiId: Identifier of the affected API service (defined in the specification of the calling module).
  • errorId: Identifier of the detected development error (defined in the specification of the calling module).

Concurrency and Error Handling

Execution occurs synchronously with the calling error detection. As a non-reentrant function (Non Reentrant), the interface strictly requires that concurrent executions are avoided on the caller side [SWS_Dlt_00432]. Specific error codes, error feedback, or separate DET or DEM messages are not provided for this service in the specification [SWS_Dlt_00432].

This usage note was generated automatically based on the specification AUTOSAR CP R20-11.

Implementer's Guide to follow (complexity I1)

function Dlt_SetLogLevel [SWS_Dlt_00252] 📄 PDF

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

This service is used to change the Log Level for the given tuple of Application ID/ Context ID.

function Dlt_SetTraceStatus [SWS_Dlt_00254] 📄 PDF

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

The service Dlt_ Set Trace Status sets the trace status for a specific tuple of Application ID and Context ID.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: aa592860b6dc Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function Dlt_SetTraceStatus serves to set the trace status for a specific tuple of Application ID and Context ID [SWS_Dlt_00254]. It is defined via header file Dlt.h and has the service ID 0x09 [SWS_Dlt_00254].

use

Three input parameters are required for the call [SWS_Dlt_00254]:

  • appId: The ID of the software component (type Dlt_ApplicationIDType).
  • contextId: The ID of the context (type Dlt_ContextIDType).
  • newTraceStatus: The trace status to be newly set as a boolean value (type boolean).

Error Handling and Return Values

The function synchronously returns a status of type Std_ReturnType [SWS_Dlt_00254]:

  • E_OK: No error occurred and the status was accepted successfully.
  • E_NOT_OK: The trace status could not be changed. Specific DET error messages are not mentioned in the function specification (Interpretation: An error is presumably present in case of invalid identifiers or an incorrect module state). Question Q-77e190707462c8f1 (open)

Concurrency and Limitations

The interface is specified as non-reentrant (Non Reentrant) [SWS_Dlt_00254]. Therefore, it must not be executed concurrently or in an interrupting manner without appropriate synchronization by the caller.

This usage note was generated automatically based on AUTOSAR release R20-11.

Implementer's Guide to follow (complexity I1)

function Dlt_GetDefaultLogLevel [SWS_Dlt_00733] 📄 PDF

Std_ReturnType Dlt_GetDefaultLogLevel (Dlt_MessageLogLevelType* defaultLogLevel);

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

function Dlt_StoreConfiguration [SWS_Dlt_00736] 📄 PDF

Std_ReturnType Dlt_StoreConfiguration (void);

Copies the current Dlt configuration to Nv RAM by calling Nv M_ Write Block().

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 5604b9adc3ef Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The function Dlt_StoreConfiguration ([SWS_Dlt_00736]) serves to save the current Dlt configuration to non-volatile memory (NvRAM). Saving takes place internally via a synchronous call of interface NvM_WriteBlock() of the NVRAM Manager ([SWS_Dlt_00736]). The API is provided via header Dlt.h with service ID 0x1a.

The function has the signature Std_ReturnType Dlt_StoreConfiguration(void) and processes neither input, output, nor input/output parameters ([SWS_Dlt_00736]).

Error Handling and Return Values

As a synchronous service, the function immediately returns a status code of type Std_ReturnType to the caller ([SWS_Dlt_00736]):

  • E_OK: The configuration was transferred without errors to the NvRAM ([SWS_Dlt_00736]).
  • E_NOT_OK: An error occurred while saving the Dlt configuration ([SWS_Dlt_00736]).
  • DLT_E_NOT_SUPPORTED: The service for configuration saving is not supported by the module ([SWS_Dlt_00736]).

Concurrency and Limitations

According to [SWS_Dlt_00736], Dlt_StoreConfiguration is specified as non-reentrant (Non Reentrant). The function therefore must not be executed concurrently from different tasks or contexts, so that a sequential execution must be ensured on the caller side.

This usage note was generated automatically based on AUTOSAR specifications.

function Dlt_ResetToFactoryDefault [SWS_Dlt_00739] 📄 PDF

Std_ReturnType Dlt_ResetToFactoryDefault (void);

The service Dlt_ Reset To Factory Default sets the Log Level and Trace Status back to the pers istently stored default values. If the feature Nv MRAM support is enabled, all stored Dlt values in the Nv M are deleted.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 9a6e51abb1f8 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The synchronous function Dlt_ResetToFactoryDefault is provided via header Dlt.h and accepts no passed parameters [SWS_Dlt_00739]. Its primary purpose is resetting the Dlt runtime configuration: It resets the log level and the trace status to the persistently stored default values [SWS_Dlt_00739]. If NvRAM support is additionally activated in the Dlt module, calling it causes the complete deletion of all Dlt values stored in the NvM [SWS_Dlt_00739].

Return Values and Error Handling

The result of the operation is signaled synchronously via the return value of type Std_ReturnType [SWS_Dlt_00739]:

Specific DET or DEM error messages are not defined for this service in the present specification scope.

Concurrency and Limitations

The function is specified as non-reentrant (Non Reentrant) (service ID 0x06) [SWS_Dlt_00739]. A concurrent or interrupting call from different tasks or contexts is therefore not permissible and must be prevented by the caller.

This usage note is based exclusively on the specification data from AUTOSAR Classic release R20-11.

Implementer's Guide to follow (complexity I1)

function Dlt_SetDefaultLogLevel [SWS_Dlt_00740] 📄 PDF

Std_ReturnType Dlt_SetDefaultLogLevel (Dlt_MessageLogLevelType newLogLevel);

Called to modify the pass through range for Log Messages for all not explicit set Context Ids.

function Dlt_GetTraceStatus [SWS_Dlt_00750] 📄 PDF

Std_ReturnType Dlt_GetTraceStatus (Dlt_ApplicationIDType appId, Dlt_ContextIDType contextId, boolean* traceStatus);

Returns the current Trace Status for a given tuple Application Id/ Context Id.

function Dlt_RxIndication [SWS_Dlt_00272] 📄 PDF

void Dlt_RxIndication (PduIdType RxPduId, const PduInfoType* PduInfoPtr);

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

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 8621cb62489c Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function Dlt_RxIndication serves for the indication of a received PDU from a lower-layer communication interface module to the DLT module [SWS_Dlt_00272]. It is available via the header Dlt.h and has the service ID 0x42 [SWS_Dlt_00272].

The call occurs with synchronous semantics and provides no return value (void) [SWS_Dlt_00272]. Two input parameters are passed to the function:

  • RxPduId: Identifier of the received PDU (of type PduIdType) [SWS_Dlt_00272].
  • PduInfoPtr: Pointer to a structure of type PduInfoType. This contains the length of the received PDU (SduLength), a pointer to the buffer with the PDU payload (SduDataPtr), and associated metadata of the PDU [SWS_Dlt_00272].

Regarding concurrency and execution context, the function is reentrant for different PDU IDs, but not reentrant for the same PDU ID [SWS_Dlt_00272]. Consequently, the calling lower-layer module must not have the same RxPduId processed concurrently, while parallel calls with different PDU IDs are permissible [SWS_Dlt_00272].

This text was generated by an AI based on the specification.

function Dlt_TriggerTransmit [SWS_Dlt_00754] 📄 PDF

Std_ReturnType Dlt_TriggerTransmit (PduIdType TxPduId, PduInfoType* PduInfoPtr);

Within this API , the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and update the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 2f7ee51c3bb5 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

According to [SWS_Dlt_00754], the synchronous function Dlt_TriggerTransmit serves to copy SDU data into a provided buffer upon request of an underlying layer. It is declared in Dlt.h and has the service ID 0x41.

The following parameters are passed upon the call:

  • TxPduId: Identifier of the SDU whose transmission is requested.
  • PduInfoPtr: Pointer to a structure of type PduInfoType. Via SduDataPtr, the caller passes the destination buffer and via SduLength the maximum available buffer size.

Within the function, the module checks according to [SWS_Dlt_00754] whether the available data fits into the passed buffer size:

  • If the data fits, the function copies the payload data to SduDataPtr, updates SduLength with the number of actually copied bytes, and returns E_OK.
  • If the buffer is insufficient, the function returns E_NOT_OK without modifying PduInfoPtr.

If E_NOT_OK is returned, no SDU data was copied. In this case, the caller must not continue to use PduInfoPtr, as it may point to invalid data or be a NULL pointer [SWS_Dlt_00754].

With respect to concurrency, Dlt_TriggerTransmit is reentrant for different PDU IDs, but not reentrant for the same TxPduId [SWS_Dlt_00754].

This text was generated automatically. All information is based on the referenced AUTOSAR specifications.

Implementer's Guide to follow (complexity I1)

function Dlt_TxConfirmation [SWS_Dlt_00273] 📄 PDF

void Dlt_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: da9a483662e9 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Call Context

The function Dlt_TxConfirmation serves as a confirmation interface of the lower layer communication interface module to the module Diagnostic Log and Trace (DLT) [SWS_Dlt_00273]. It synchronously informs the DLT module whether a previously requested PDU could be transmitted successfully or whether the transmission failed [SWS_Dlt_00273]. The function has the service ID 0x40 and is provided via header file Dlt.h [SWS_Dlt_00273].

The interface has no return value (void) and expects two passed parameters [SWS_Dlt_00273]:

  • TxPduId: The identifier of the transmitted PDU of type PduIdType.
  • result: The transmission status of type Std_ReturnType; here, E_OK signals successful transmission and E_NOT_OK signals failure of the PDU transmission.

Error Handling and Concurrency

Explicit error handling with error return values or specific DET or DEM messages is not specified for this call; the failure of a transmission process is communicated to the DLT module purely via the parameter value result = E_NOT_OK [SWS_Dlt_00273].

A differentiated reentrancy condition applies to execution: Dlt_TxConfirmation is reentrant for different PDU IDs, but not reentrant for the same PDU ID [SWS_Dlt_00273]. Calling drivers or interfaces must therefore ensure that concurrent calls with an identical TxPduId are precluded, whereas confirmations for different PDUs may arrive concurrently.

This usage note was generated automatically based on the specification AUTOSAR CP R20-11.

Implementer's Guide to follow (complexity I1)

function Dlt_TpTxConfirmation [SWS_Dlt_00756] 📄 PDF

void Dlt_TpTxConfirmation (PduIdType id, Std_ReturnType result);

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

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d7c3201ac621 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function Dlt_TpTxConfirmation serves as a synchronous confirmation function of the Dlt module after sending a transport I-PDU [SWS_Dlt_00756]. It is available via the header file Dlt.h with the service ID 0x48 [SWS_Dlt_00756].

Usage and Semantics

The call occurs after an I-PDU has been transmitted on the respective network [SWS_Dlt_00756]. The function has the signature void Dlt_TpTxConfirmation (PduIdType id, Std_ReturnType result) and returns no return value [SWS_Dlt_00756]:

  • id (input parameter, type PduIdType): Unique identification of the transmitted I-PDU [SWS_Dlt_00756].
  • result (input parameter, type Std_ReturnType): Indicates the transmission status and shows whether sending the I-PDU was successful or failed [SWS_Dlt_00756].

Concurrency and Error Handling

The specification identifies Dlt_TpTxConfirmation as synchronous and reentrant (Reentrant) [SWS_Dlt_00756]. Specific DET or DEM error codes are not defined for this service; error handling regarding the send process relies on evaluating the parameter result [SWS_Dlt_00756]. In the system context, the call is typically expected to be initiated by an underlying transport layer after completion of the PDU transmission. Question Q-0e5ab7c285316701 (open)

This text was generated by an AI system based on the AUTOSAR R20-11 specification.

Implementer's Guide to follow (complexity I1)

function Dlt_CopyTxData [SWS_Dlt_00516] 📄 PDF

BufReq_ReturnType Dlt_CopyTxData (PduIdType id, const PduInfoType* info, const RetryInfoType* retry, PduLengthType* availableDataPtr);

Service Dlt_CopyTxData.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 131f9d82c4dd Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The synchronous and reentrant function Dlt_CopyTxData serves to retrieve transmit data of an I-PDU segment (N-PDU) from the Dlt module [SWS_Dlt_00516]. Via id, the I-PDU to be transmitted is specified, while info provides the destination buffer (SduDataPtr) and the requested byte length (SduLength) [SWS_Dlt_00516]. Passing SduLength = 0 (where SduDataPtr may be passed as NULL_PTR) allows transmitting pure state changes via retry or querying the remaining data amount in the transmit buffer [SWS_Dlt_00516]. Via the output parameter availableDataPtr, the function reports the data amount still available in the Tx buffer, which enables, for example, TP modules with dynamic payload length (such as FrIsoTp) to dimension subsequent segments [SWS_Dlt_00516].

Confirmation and error recovery

Acknowledgment or repeated transmission is controlled via the pointer retry [SWS_Dlt_00516]:

  • If retry is a NULL_PTR, the copied data may be discarded from the buffer immediately after the copy process [SWS_Dlt_00516].
  • If TpDataState indicates the value TP_CONFPENDING, previously copied data must remain in the buffer for possible error recovery [SWS_Dlt_00516].
  • With TP_DATACONF, all data transmitted before the call is considered confirmed and can be released [SWS_Dlt_00516].
  • With TP_DATARETRY, the module resumes copying starting from the byte offset passed in TxTpDataCnt [SWS_Dlt_00516].

Return values and constraints

The result of the request is reported as BufReq_ReturnType [SWS_Dlt_00516]:

  • BUFREQ_OK: Data was completely copied into the destination buffer as requested [SWS_Dlt_00516].
  • BUFREQ_E_BUSY: The requested amount of data is not available; no data was copied, a later retry is permissible [SWS_Dlt_00516].
  • BUFREQ_E_NOT_OK: Request failed; no data was copied [SWS_Dlt_00516].

The interface is available via Dlt.h and designed to be reentrant [SWS_Dlt_00516]. The call context is likely to typically reside in a lower-layer transport protocol module during segmented transmission. Question Q-a81c439e73e0acc0 (open)

This usage note was generated automatically based on the specification of AUTOSAR Classic R20-11.

Implementer's Guide to follow (complexity I1)

function Dlt_StartReception [SWS_Dlt_91006] 📄 PDF

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

This function is called at the start of receiving an N -

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 768ebb494705 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous and reentrant function Dlt_StartReception is called at the start of receiving an N-SDU, which can be received as a single frame (SF) or fragmented across multiple N-PDUs [SWS_Dlt_91006]. It serves to initiate the transport connection in the Dlt module and provide the available receive buffer [SWS_Dlt_91006].

Via parameter id, the received I-PDU is identified, while info conveys payload and metadata of the first frame or is set to NULL_PTR if neither data nor metadata are present [SWS_Dlt_91006]. Via TpSduLength, the total length of the N-SDU is passed; if the function is called with a length of 0, it returns the currently maximum available buffer size via bufferSizePtr [SWS_Dlt_91006]. The transport protocol uses the value from bufferSizePtr to calculate the block size (BS) [SWS_Dlt_91006].

If the connection is accepted, the function returns BUFREQ_OK; if not enough buffer is available for the requested size, bufferSizePtr indicates a buffer size of 0 to continue reception [SWS_Dlt_91006]. If the connection is rejected, BUFREQ_E_NOT_OK aborts the reception, and if overall memory is insufficient, BUFREQ_E_OVFL is reported; in both error cases, bufferSizePtr remains unchanged [SWS_Dlt_91006].

This usage note is based on the AUTOSAR Classic R20-11 specification.

Implementer's Guide to follow (complexity I1)

function Dlt_TpRxIndication [SWS_Dlt_91007] 📄 PDF

void Dlt_TpRxIndication (PduIdType id, Std_ReturnType result);

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

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 494394e121a7 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function Dlt_TpRxIndication serves as a synchronous reception indication after an I-PDU has been received via the TP API [SWS_Dlt_91007]. It is declared in the header file Dlt.h and has the service ID 0x45 [SWS_Dlt_91007].

Usage and Parameters

Passing to the DLT module takes place via two input parameters, with the function returning no return value [SWS_Dlt_91007]:

  • id (type PduIdType): Designates the identification of the received I-PDU [SWS_Dlt_91007].
  • result (type Std_ReturnType): Indicates the result of the reception and shows whether the transmission was successful [SWS_Dlt_91007].

Concurrency and Limitations

The interface is defined as synchronous and reentrant [SWS_Dlt_91007]. There are neither input/output nor pure output parameters [SWS_Dlt_91007].

Error Handling and Interaction

The result of the transport is signaled to the DLT module exclusively via the argument result; specific error codes, DET or DEM messages are not specified [SWS_Dlt_91007].

Interpretation: The call is likely to be made by an underlying transport protocol component as soon as a DLT message has completely arrived or the transmission aborts [SWS_Dlt_91007]. Question Q-7d9c8564a2404acf (open)

This usage note was generated by an AI based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function Dlt_CopyRxData [SWS_Dlt_91008] 📄 PDF

BufReq_ReturnType Dlt_CopyRxData (PduIdType id, const PduInfoType* info, PduLengthType* bufferSizePtr);

Service Dlt_CopyRxData.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 50201aae16ae Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The synchronous function Dlt_CopyRxData is called to pass received data of an I-PDU segment (N-PDU) to the upper layer [SWS_Dlt_91008]. Each call provides the respective next part of the I-PDU data, with the remaining buffer size being written to the memory location referenced via bufferSizePtr [SWS_Dlt_91008]. The declaration is available via the header Dlt.h [SWS_Dlt_91008].

Parameters and Buffer Query

Via the input parameter id, the received I-PDU is identified [SWS_Dlt_91008]. The pointer info provides the source buffer via SduDataPtr as well as the number of bytes to copy via SduLength [SWS_Dlt_91008]. If SduLength is passed with the value 0, the call serves purely to query the buffer currently available in the upper module; in this case, SduDataPtr may be a NULL_PTR [SWS_Dlt_91008]. The output parameter bufferSizePtr returns the receive buffer size still free after the copy operation [SWS_Dlt_91008].

Concurrency and return values

The function is designed to be reentrant and has the service ID 0x44 [SWS_Dlt_91008]. The return value of type BufReq_ReturnType signals the result of the copy operation: Upon successful data acceptance, the service returns BUFREQ_OK, whereas in case of error BUFREQ_E_NOT_OK is reported [SWS_Dlt_91008].

Note: This usage note was generated by an AI based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function Dlt_TxFunction [SWS_Dlt_91005] 📄 PDF

void Dlt_TxFunction (void);

-

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ff1088c39156 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Call Context

According to specification [SWS_Dlt_91005], the function Dlt_TxFunction is defined as a service with the service ID 0x80 and is available via the header SchM_Dlt.h. Its interface signature is void Dlt_TxFunction (void) [SWS_Dlt_91005]. As an interpretation, the declaration in SchM_Dlt.h indicates that the call is performed by the BSW scheduler in the context of a cyclic task and should not be called directly by application software components.

Parameters and Return Values

According to [SWS_Dlt_91005], the function takes no input parameters and returns no return value (void). By its name, the function is likely responsible for the cyclic processing and transmission of pending Dlt transmit messages. Question (open) Since no return values are specified, error handling is presumably purely module- or state-internal.

restrictions

Since the payload does not contain any information on reentrancy or specific development errors, call intervals and task assignments must be coordinated via the schedule manager configuration. Further error codes or DET entries are not identified in [SWS_Dlt_91005].

This text was generated by an AI; it does not replace studying the official AUTOSAR specification.

type Dlt_ConfigType [SWS_Dlt_00437] 📄 PDF

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

type Dlt_MessageIDType [SWS_Dlt_00228] 📄 PDF

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

type Dlt_MessageNetworkTraceInfoType [SWS_Dlt_00233] 📄 PDF

This type describes transported type of a Dlt BUSMESSAGE.

type Dlt_ApplicationIDType [SWS_Dlt_00226] 📄 PDF

This type describes the Application Id. 0x00000000 means the so - called wildcard.

type Dlt_ContextIDType [SWS_Dlt_00227] 📄 PDF

This type describes the Context Id. 0x00000000 means the so - called wildcard.

type Dlt_MessageArgumentCount [SWS_Dlt_00235] 📄 PDF

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

type Dlt_AssignmentOperation [SWS_Dlt_00730] 📄 PDF

Adding or removing a Log Channel assignment for the given tuple of Application Id/ Context Id.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/CP_MOD_Dlt
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_Dlt@rel:R20-11#213a6afc
Content hash
213a6afc
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_DiagnosticLogAndTrace.pdf#nameddest=SWS_Dlt_00239

Initialization and status

Returns the version information of this module.

void Dlt_GetVersionInfo (Std_VersionInfoType* versioninfo);
Dlt_Init function

Dlt is using the NVRam Manager and is to be initialized very late in the ECU startup phase. The Dlt_ Init() function should be called after the NVRam Manager is initialized.

void Dlt_Init (const Dlt_ConfigType* config);

Services

Service to fo rward error reports from Det to Dlt.

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

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

Std_ReturnType Dlt_GetDefaultLogLevel (Dlt_MessageLogLevelType* defaultLogLevel);

Called to request information about registered Application Ids, their Context Ids and the corresponding log level.

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

Returns the current Trace Status for a given tuple Application Id/ Context Id.

Std_ReturnType Dlt_GetTraceStatus (Dlt_ApplicationIDType appId, Dlt_ContextIDType contextId, boolean* traceStatus);

The service Dlt_ Reset To Factory Default sets the Log Level and Trace Status back to the pers istently stored default values. If the feature Nv MRAM support is enabled, all stored Dlt values in the Nv M are deleted.

Std_ReturnType Dlt_ResetToFactoryDefault (void);

The service represents the interface to be used by basic software modules or by software component to send Log Messages.

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

The service represents the interface to be used by basic software modules or by software components to trace parameters.

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

Called to modify the pass through range for Log Messages for all not explicit set Context Ids.

Std_ReturnType Dlt_SetDefaultLogLevel (Dlt_MessageLogLevelType newLogLevel);

This service is used to change the Log Level for the given tuple of Application ID/ Context ID.

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

Switches on/ off the mes sage filtering functionality of the Dlt module.

Std_ReturnType Dlt_SetMessageFiltering (boolean status);

The service Dlt_ Set Trace Status sets the trace status for a specific tuple of Application ID and Context ID.

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

Copies the current Dlt configuration to Nv RAM by calling Nv M_ Write Block().

Std_ReturnType Dlt_StoreConfiguration (void);

-

void Dlt_TxFunction (void);

The service has to be called when a software module is going to be stopped. Available vi a Dlt.h

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

Callbacks

Service Dlt_CopyRxData.

BufReq_ReturnType Dlt_CopyRxData (PduIdType id, const PduInfoType* info, PduLengthType* bufferSizePtr);

Service Dlt_CopyTxData.

BufReq_ReturnType Dlt_CopyTxData (PduIdType id, const PduInfoType* info, const RetryInfoType* retry, PduLengthType* availableDataPtr);

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

void Dlt_RxIndication (PduIdType RxPduId, const PduInfoType* PduInfoPtr);

This function is called at the start of receiving an N -

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

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

void Dlt_TpRxIndication (PduIdType id, Std_ReturnType result);

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

void Dlt_TpTxConfirmation (PduIdType id, Std_ReturnType result);

Within this API , the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and update the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr.

Std_ReturnType Dlt_TriggerTransmit (PduIdType TxPduId, PduInfoType* PduInfoPtr);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

void Dlt_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);

Types

Information about Applications

This type describes the Application Id. 0x00000000 means the so - called wildcard.

Adding or removing a Log Channel assignment for the given tuple of Application Id/ Context Id.

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

Context Information

This type describes the Context Id. 0x00000000 means the so - called wildcard.

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

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

This type describes the log lev el for each log message.

This type describes transported type of a Dlt BUSMESSAGE.

This type describes labels for trace messages.

This type describes the type of the message.

This type identifies the session.

Type type

This type describes the Log Channel name.