convert a dlt file to json
Project description
dlt2json
Convert a GENIVI's dlt file to json format.
This is a draft version and only supports log type for now.
Control, app trace and network trace payload is encoded in hexadecimal.
DLT message format
Header
0..3 header pattern DLT1
4..7 4 bytes epoch time (little endian)
8..11 4 bytes microseconds (little endian)
12..15 4 bytes ECU ID
16 1 byte header type contains some configuration data
- use extended header
- MSB first
- with ECU ID
- with session ID
- with timestamp
- version number, 0x1
17 1 byte message counter
18..19 2 bytes lentgh of complete message without header
20..23 4 bytes ECU ID again
24..27 4 bytes session number
28..31 4 bytes timestamp since system start in 0.1 milliseconds
32 1 byte message info contains some configuration data too
- message type (log, app trace, network trace, control)
- message type info (debug, error, ...)
33 1 byte number of arguments
34..37 4 bytes application ID
38..41 4 bytes context id
payload
0..4 4 bytes argument type
5..6 2 argument size
.... argument
install
$ python setup.py install
Usage
For a quick test, download testfile.dlt and run
$ dlt2json testfile.dlt
[
{
"000": {
"seconds": 1305029670,
"microSeconds": 828120,
"ecu": "ECU",
"sid": "N/A",
"timestamp": 979535935,
"app": "APP",
"ctx": "CON",
"type": "control",
"info": "request",
"args": 1,
"payload": "11 00 00 00 04 72 65 6d 6f"
}
},
...
{
"030": {
"seconds": 1305029677,
"microSeconds": 562582,
"ecu": "ECU",
"sid": "N/A",
"timestamp": "N/A",
"app": "LOG",
"ctx": "TES4",
"type": "log",
"info": "info",
"args": 2,
"payload": "0 Hello world"
}
},
...
{
"104": {
"seconds": 1305029689,
"microSeconds": 47104,
"ecu": "ECU",
"sid": "N/A",
"timestamp": "N/A",
"app": "N/A",
"ctx": "N/A",
"type": "N/A",
"info": "N/A",
"args": "N/A",
"payload": "91 01 00 00 1a 00 00 00 0c 00 48 65 6c 6c 6f 20 77 6f 72 6c 64 00"
}
}
]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dlt2json-0.0.3.tar.gz.
File metadata
- Download URL: dlt2json-0.0.3.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f365e0046bbab3d6136b493137645354ca81e8678fef965eddbf5c20e5b05c63
|
|
| MD5 |
ed864292f77d13a374ee04411661c22f
|
|
| BLAKE2b-256 |
145007fd1b2c085e1d346d5fafdeee189112b3938ce1591e7430159e8b744d40
|
File details
Details for the file dlt2json-0.0.3-py3-none-any.whl.
File metadata
- Download URL: dlt2json-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e5ff6d35f046b6d425221eed598b7babb4d2e53fa3fc4f034a5a539d010066f
|
|
| MD5 |
4a5d61608a72fab8a2633a71063e3d97
|
|
| BLAKE2b-256 |
329ef36b89ceea3d01642d3650ed31ac0fe95c732b58d9e74d81da947c424537
|