A python implementation of the simplehdlc packet encoder/parser
Project description
python-simplehdlc
A python implementation of the simplehdlc parser/encoder. More information about the packet structure can be found at https://github.com/jeremyherbert/simplehdlc.
Only python 3.6+ is supported.
License is MIT.
Installing
You can install this package using pip
:
pip install simplehdlc
or by cloning this git repository and running:
python setup.py install
Usage
from simplehdlc import SimpleHDLC
# note that encode is a class method
encoded = SimpleHDLC.encode(b'abcdefg')
def success_callback(payload: bytes):
print("success:", payload)
hdlc = SimpleHDLC(success_callback, max_len=1024)
hdlc.parse(encoded) # will print "success: b'abcdefg'" via the callback
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
simplehdlc-0.1.0.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for simplehdlc-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65bf017d0f1a24891d7eef8f3f12b643145cc5ac8b084294c9616a72a4aac40e |
|
MD5 | 885c0049af261868b93ca86f0c839ff2 |
|
BLAKE2b-256 | 3275bd830d9ea3a64cdea2a49babc3d22634a015035fdefc7b4047c7c15cc4f7 |