Python Stanag 4586 Edition A v1
Project description
Python package for STANAG 4586 Edition A Version 1
Tested with python 3.8+
| Published branch | Development branch |
|---|---|
This repository conotains code that will enable encoding/decoding of STANAG messages. So far the following messages have been implemented which should enable basic communication with a platform, messages are being continually added, please check back soon for updates.
- Message wrapper
- 01
- 20
- 21
- 300
- 301
- 302
- 1200
Simple usage example
Assuming you would have already parsed the message wrapper and know what message is contained in the byte array, save the following in a file called stanag-test.py
from stanag4586edav1.message01 import *
# We create a dummy byte stream containing only Message 01 contents
PACKET_TO_DECODE = b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x50\x00\x00\x00\xA0\x00\x00\x00\x00" \
b"\x00\x00\x00\x00\x00\x39\x00\x00\x01\x00\x00\x00\x00\x01\x00"
def decode_message01():
msg01 = Message01(PACKET_TO_DECODE)
print(msg01.time_stamp)
print(msg01.cucs_id)
decode_message01()
Executing the above code will produce output as follows
$ python stanag-test.py
0.0
160
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
stanag4586edav1-0.0.3.tar.gz
(17.5 kB
view details)
File details
Details for the file stanag4586edav1-0.0.3.tar.gz.
File metadata
- Download URL: stanag4586edav1-0.0.3.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e97dc3bdacfdae6c93ae1ed25b9dcc3e642b53066c7eb64270d08fa7a75c48a
|
|
| MD5 |
5d77aa9675f591ab21ffeebd5816b4bd
|
|
| BLAKE2b-256 |
44b0ecf70c4ccabf7147455ea11bac63f1b62ac6347878c3e232e81e3ffe2a94
|