Skip to main content

LDF Language support for Python

Project description

LDF Parser

Workflow License

This tool is able parse LIN Description Files, retrieve signal names and frames from them, as well as encoding messages using frame definitions and decoding them.


Example

import ldfparser

# Load LDF
ldf = ldfparser.LDF(path = "network.ldf")
frame = ldf.frame('Frame_1')

# Encode signal values into frame
message = frame.data({"Signal_1": 123, "Signal_2": 0})
print(binascii.hexlify(message))
# >> 0x7B00

# Decode message into dictionary of signal names and values
received = bytearray([0x7B, 0x00])
print(frame.parse(received))
# >> {"Signal_1": 123, "Signal_2": 0}

Installation

Install via pip install ldfparser


Credits

Inspired by uCAN-LIN LinUSBConverter, specifically the LDF parsing mechanism via Lark


License

License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ldfparser-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ldfparser-0.1.0-py3.6.egg (11.1 kB view details)

Uploaded Egg

ldfparser-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file ldfparser-0.1.0.tar.gz.

File metadata

  • Download URL: ldfparser-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.12

File hashes

Hashes for ldfparser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9e01f6d2a58c9f618ce036e7ae21d40d7a60d37671c736d1cb8b1c838ec3bee7
MD5 f98d95731c39eb7258e592105d538cb8
BLAKE2b-256 b6e4bd926b2a26f1c4d995cbdbbaa4d9818995137872edbc7833e02b4e05f297

See more details on using hashes here.

File details

Details for the file ldfparser-0.1.0-py3.6.egg.

File metadata

  • Download URL: ldfparser-0.1.0-py3.6.egg
  • Upload date:
  • Size: 11.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.12

File hashes

Hashes for ldfparser-0.1.0-py3.6.egg
Algorithm Hash digest
SHA256 9078620502fd1ce2b63f9b82f6babc789b38ecab76100520f70cb41fa912a67f
MD5 1363d9ac7c183180569dc86e5ba6e5fc
BLAKE2b-256 67fd161cfd934ab4ee724403cdba48fd6840f0ee067939fea4c031061296c2e0

See more details on using hashes here.

File details

Details for the file ldfparser-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ldfparser-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.12

File hashes

Hashes for ldfparser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e390e2e1176086d2536d77b0e3a33537880993a2f332978ac5abb264362205be
MD5 09334fc66cf169463924115c0857f37d
BLAKE2b-256 e67ca193e8b29c18283be2bae43d19df704de956f917087999f762f7c2ed7455

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page