CRC-16 calculation for Modbus protocol
Reason this release was yanked:
broken package
Project description
Modbus CRC-16
CRC-16 calculation library for Modbus protocol
Installation
Install it with pip:
$ pip install modbus-crc
Or you can add it as dependency in requirements.txt file of your python application:
modbus-crc~=1.2
Usage
For signing byte package use add_crc
:
from modbus_crc import add_crc
signed_package = add_crc(b'\x00\x12\x34\xAB\xCD\xEF')
Result is b'\x00\x12\x34\xAB\xCD\xEF\xD2\xD4
. For validation signed package use check_crc
:
from modbus_crc import check_crc
if not check_crc(b'\x00\x12\x34\xAB\xCD\xEF\xD2\xD4'):
raise SomeException()
Testing
Use tox for testing
$ pip install tox
$ python -m tox
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
modbus-crc-1.2.tar.gz
(3.7 kB
view hashes)