Skip to main content

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


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.4.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

J1939_PGN-0.4-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file J1939_PGN-0.4.tar.gz.

File metadata

  • Download URL: J1939_PGN-0.4.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for J1939_PGN-0.4.tar.gz
Algorithm Hash digest
SHA256 56b58ac04d732bd6c423901dbc8fbdc2d07c43c69aeee72b325194d96309a17a
MD5 15f2461440d8546c1500e38d50fc0934
BLAKE2b-256 f594f8c75115aafca55d55acf97c52c70336ec936da7ddc029d165c206211c7c

See more details on using hashes here.

File details

Details for the file J1939_PGN-0.4-py3-none-any.whl.

File metadata

  • Download URL: J1939_PGN-0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for J1939_PGN-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9456203c064dac80616cb07f1b90e8f827c7fdc2f0513ef81cd8aa9025ca947b
MD5 b911dfb39992aa04a64b6dcee7dcb336
BLAKE2b-256 cc96f0143574d41ec6de81ddd2806d7c9ca9d64d255e6d4b0da4ed96dacf7af1

See more details on using hashes here.

Supported by

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