Skip to main content

PyDLT

A pyre-python library to handle AUTOSAR DLT protocol, which is based on AUTOSAR Specification of Diagnostic Log and Trace V1.2.0 R4.0 Rev3, Section 7.7 Protocol Specification.

Quick Start

Write messages to DLT file

from pydlt import (
    ArgumentString,
    DltFileWriter,
    DltMessage,
    MessageLogInfo,
    MessageType,
    StorageHeader,
)

# Create DLT message
msg1 = DltMessage.create_verbose_message(
    [ArgumentString("hello, pydlt!")],
    MessageType.DLT_TYPE_LOG,
    MessageLogInfo.DLT_LOG_INFO,
    "App",
    "Ctx",
    message_counter=0,
    str_header=StorageHeader(0, 0, "Ecu"),
)
print(msg1)
# > 1970/01/01 00:00:00.000000 0 Ecu App Ctx log info verbose 1 hello, pydlt!
msg2 = DltMessage.create_non_verbose_message(
    0,
    b"\x01\x02\x03",
    message_counter=1,
    str_header=StorageHeader(0, 0, "Ecu"),
)
print(msg2)
# > 1970/01/01 00:00:00.000000 1 Ecu non-verbose [0] 010203

# Write DLT messages to file
with DltFileWriter("<path to DLT file>") as writer:
    writer.write_messages([msg1, msg2])

Read messages from DLT file

from pydlt import DltFileReader

# Read DLT messages from file
for msg in DltFileReader("<path to DLT file>"):
    # Print overview of each DLT message
    print(msg)

Limitation

The following format of Type Info in a Payload has not been supported.

  • TYPE_LENGTH_128BIT
  • TYPE_ARRAY
  • VARIABLE_INFO
  • FIXED_POINT
  • TRACE_INFO
  • TYPE_STRUCT

Metadata

Release files for pydlt 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydlt 0.3.5
File Size Uploaded
pydlt-0.3.5.tar.gz 14.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pydlt 0.3.5
File Interpreter ABI Platform
pydlt-0.3.5-py3-none-any.whl Python 3 none any Details

Total release size: 32.2 kB

Release files / pydlt-0.3.5.tar.gz

Download URL pydlt-0.3.5.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1c1bd64181c1165b48f566aa5a89edcf9501043f90d2f9be2ddbc73c7771c579
BLAKE2b-256 checksum
How to use checksums
ebc89fefbde75fa01c58be45e9d1c2f582e600f830c134ef8abb659b6039335c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.11.0 Linux/6.8.0-1021-azure

Release files / pydlt-0.3.5-py3-none-any.whl

Download URL pydlt-0.3.5-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
020fd1e4dc4af3ec74ed34a1cca86f33b16250b90324016f885b72ff24bf171f
BLAKE2b-256 checksum
How to use checksums
ecf1bdd043a9fa9c608c64e54bb3ede7469e8251f564dd8443a896715f6b31b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.11.0 Linux/6.8.0-1021-azure

Release history Release notifications | RSS feed

This release

0.3.5 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page