Decode CAN messages
Project description
Caneton
=======
Python 3 project under BSD license to decode CAN messages (also called frames).
To decode a CAN message, you must provide the message ID, the message data
(payload) and the DBC file which describes the format of the data on the CAN
bus.
Caneton can be used as Python module:
```python
import json
import caneton
with open('dbc.json') as dbc_file:
dbc_json = json.loads(dbc_file.read())
message_length, message_data = caneton.hex_ascii_to_bytes('01780178010000')
message = caneton.message_decode(message_id=0x701,
message_length=message_length, message_data=message_data,
dbc_json=dbc_json)
print(message)
```
The project [libcanardbc](https://github.com/Polyconseil/libcanardbc) can
convert a CAN DBC file to JSON.
Caneton provides a CLI tool to decode CAN message:
```caneton-decode dbc.json 0x701 0x01780178010000```
=======
Python 3 project under BSD license to decode CAN messages (also called frames).
To decode a CAN message, you must provide the message ID, the message data
(payload) and the DBC file which describes the format of the data on the CAN
bus.
Caneton can be used as Python module:
```python
import json
import caneton
with open('dbc.json') as dbc_file:
dbc_json = json.loads(dbc_file.read())
message_length, message_data = caneton.hex_ascii_to_bytes('01780178010000')
message = caneton.message_decode(message_id=0x701,
message_length=message_length, message_data=message_data,
dbc_json=dbc_json)
print(message)
```
The project [libcanardbc](https://github.com/Polyconseil/libcanardbc) can
convert a CAN DBC file to JSON.
Caneton provides a CLI tool to decode CAN message:
```caneton-decode dbc.json 0x701 0x01780178010000```
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
caneton-1.0.2.tar.gz
(5.3 kB
view details)
Built Distribution
File details
Details for the file caneton-1.0.2.tar.gz
.
File metadata
- Download URL: caneton-1.0.2.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b62a403f35715b2966991e7ddb4b90fa2f77facb26a2e3f82c65f006ad176c88 |
|
MD5 | fcd62c780d09b0d88c435e8180f6be43 |
|
BLAKE2b-256 | 33d3ec81333e76da97e0f0fc6a6ee177b63cdb5e7d9ceb903ecd2cef6a943e82 |
File details
Details for the file caneton-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: caneton-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c543e9253ac513d07375d7b7d0f363f7aebe265ffc0ffbe3dde8456951c18ac3 |
|
MD5 | a3ef17f8b9c34eb3f7e455f831a66394 |
|
BLAKE2b-256 | ad77f291cf5d51dea317c03a727b4ade210080bf2304b880c356671d3284b33d |