Python module for working with SAE J1939 PGNs
Project description
Python SAE J1939 PGN
Python module for working with SAE J1939 PGNs.
Installation
pip install j1939_pgn
Dependencies
None
Usage examples
from J1939_PGN import J1939_PGN, J1939_PDU
# Init from PGN
j1939 = J1939_PGN(msg_pgn=60928)
print(j1939)
# Init from ID
j1939 = J1939_PGN(msg_id=16704256)
print(j1939)
# Compact use
print(f"ID: {J1939_PGN(msg_pgn=60928).id}")
print(f"PGN: {J1939_PGN(msg_id=16704256).pgn}")
# Access elements
j1939 = J1939_PGN(msg_id=16704256)
print(f"P: {j1939.p}")
print(f"DP: {j1939.dp}")
print(f"PF: {j1939.pf}")
print(f"PS: {j1939.ps}")
print(f"SA: {j1939.sa}")
# Access specific elements
j1939 = J1939_PGN(msg_pgn=60928)
if j1939.pdu is J1939_PDU.PDU1:
print(f"Target address: {j1939.ps:02X}")
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
J1939_PGN-0.0.3.post0.dev1.tar.gz
(19.4 kB
view hashes)
Built Distribution
Close
Hashes for J1939_PGN-0.0.3.post0.dev1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4752b6575f9c438cb42acf4366cc5b6ed1ea963550bc53027f6fb7f0232497b1 |
|
MD5 | 687de880413bca8d3d0047d7bf89d1bb |
|
BLAKE2b-256 | 2f70d45dd74c7385340f18f4f78984d4e531e0cdea4d022218250668e7bd53aa |
Close
Hashes for J1939_PGN-0.0.3.post0.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cbf9b45beab11e70d9bb7dd5826de0dfac93b0d826e959d101cbdb6ba83e03c |
|
MD5 | cd9b5dbdd1c520accd176cb2f8d9d746 |
|
BLAKE2b-256 | 4729186b9d453f89500cac8e7e8731fab1e1a0f2f8d81695e60ec55f618ed999 |