https://github.com/zariiii9003/autosar-e2e
Python implementation of the AUTOSAR E2E Protocol
https://github.com/zariiii9003/autosar-e2e
autosar c-extension e2e python
Last synced: 21 days ago
JSON representation
Python implementation of the AUTOSAR E2E Protocol
- Host: GitHub
- URL: https://github.com/zariiii9003/autosar-e2e
- Owner: zariiii9003
- License: mit
- Created: 2022-09-19T07:50:06.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-01T15:16:40.000Z (about 2 months ago)
- Last Synced: 2025-05-01T17:52:33.784Z (28 days ago)
- Topics: autosar, c-extension, e2e, python
- Language: C
- Homepage:
- Size: 72.3 KB
- Stars: 18
- Watchers: 3
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# autosar-e2e
[](https://pypi.org/project/autosar-e2e)
[](https://pypi.org/project/autosar-e2e)
[](https://autosar-e2e.readthedocs.io/en/latest/?badge=latest)The documentation is available [here](https://autosar-e2e.readthedocs.io/en/latest/).
-----
**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 profiles 1, 2, 4, 5 and 7 are 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 pipx
pipx run tox
```## Build
```console
pip install pipx
pipx run build
pipx run twine check dist/*
```## License
`autosar-e2e` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.