Skip to main content

Rero is a transmission protocol suitable for efficient, reliable, and robust communication especially well suited for DMA supported MCU operations.

Project description

pipeline status coverage report PyPI version

Rero is an efficient communication protocol intended for transmissions of byte frames over e.g. a serial interface or buses. It builds upon COBS which allows for a minimum encoding overhead. It is perfectly suited for MCUs with DMA support.

Did somebody asked what is it good for? Here are some qualities of Rero:

Quality How Good for
Reliable CRC check Checking integrity of frame
Robust COBS and COBSR byte stuffing Easy to resynchronize byte stream
Efficient Exploit properties of COBS and COBSR Minimum processing overhead
Scalable Customize Rero to your needs Minimize frame overhead
Bus-capable Optional address field Address frame for specific recipient

A C implementation written for STM32 MCUs is available here. It builds upon a very efficient ring buffer implementation tailored for UART interfaces, which of course utilizes DMA support for transmission and reception.

Quick start

Rero requires Python 3.5 or newer to run.

$ pip install rero

Usage

import rero

reroPacker = rero.Packer(1) 	# own address = 1

# Dummy payload
payload = bytes([1, 2, 3, 4])

msgToSend = reroPacker.pack(payload, 20) # Packing with dedicated address = 20

# msgToSend may now be sent e.g. by use of pySerial...

# Unpack received frame
for payloadRcd in reroPacker.unpack(msgToSend):
	print(payloadRcd)

Further examples are given in the docs.

Documentation

You can find the documentation at here.

Contribution

For information on how to contribute to the project, please check the Contributor's Guide.

Contact

Please use the Gitlab service desk or if you have a Gitlab account you may directly open an issue.

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rero-1.0.1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

rero-1.0.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file rero-1.0.1.tar.gz.

File metadata

  • Download URL: rero-1.0.1.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.4 Linux/4.19.23-coreos-r1

File hashes

Hashes for rero-1.0.1.tar.gz
Algorithm Hash digest
SHA256 344b87be42f3a727ddf9801eb219e5ea869fceff185575932ec3803cc4193372
MD5 8be9c455b410feeecc400ebb5a3353bd
BLAKE2b-256 006138d9dba12b4e7cb5222ceba113bc66f4dba99754260493a71e5eea41313b

See more details on using hashes here.

File details

Details for the file rero-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: rero-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.4 Linux/4.19.23-coreos-r1

File hashes

Hashes for rero-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38c86aef3d414d02a2ce1f178817a6978ec28891a2fe54182a971df835d65895
MD5 5c569a5ff41bdfb5515ca6805a6b9061
BLAKE2b-256 91ff45b142416cf6c4e41da72a9262e8b85597eb9df7f2ef67f90112f3915306

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page