autosar-e2e-0.2.1
توضیحات
Python implementation of the AUTOSAR E2E Protocol
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | autosar-e2e-0.2.1 |
| نام | autosar-e2e |
| نسخه کتابخانه | 0.2.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | Artur Drogunow <artur.drogunow@zf.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/autosar-e2e/ |
| مجوز | MIT |
# autosar-e2e
[](https://pypi.org/project/autosar-e2e)
[](https://pypi.org/project/autosar-e2e)
-----
**Table of Contents**
- [Description](#description)
- [Installation](#installation)
- [Usage](#usage)
- [Test](#test)
- [Build](#build)
- [License](#license)
## Description
This library provides fast C implementations of the E2E CRC algorithms and E2E profiles.
Currently all relevant CRC algorithms are available in module `e2e.crc`
but only E2E profile 2 is available. If you provide example data for the other profiles i would try to implement them, too.
## Installation
```console
pip install autosar-e2e
```
## Usage
### CRC example
```python3
import e2e
crc: int = e2e.crc.calculate_crc8_h2f(b"\x00\x00\x00\x00")
```
### E2E Profile 2
```python3
import e2e
# create data
data = bytearray(b"\x00" * 8)
length = len(data) - 1
data_id_list = b"\x00" * 16
# increment counter and calculate CRC inplace
e2e.p02.e2e_p02_protect(data, length, data_id_list, increment_counter=True)
# check CRC
crc_correct: bool = e2e.p02.e2e_p02_check(data, length, data_id_list)
```
## Test
```console
pip install tox
tox
```
## Build
```console
pip install build
python -m build .
```
## License
`autosar-e2e` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl autosar-e2e-0.2.1:
pip install autosar-e2e-0.2.1.whl
نصب پکیج tar.gz autosar-e2e-0.2.1:
pip install autosar-e2e-0.2.1.tar.gz