Mylonics logo
Rijesh Augustine
  • Dec 6, 2024
  • 4 min read

Struct Frame

Struct Frame is a Python library for frame-based data parsing and serialization, designed specifically for embedded systems communication with a matching C++ implementation.

Get Struct Frame

Available on PyPI.

Documentation & Source Code

Motivation

I wanted something lightweight and cross-platform for message serialization - a C++ implementation that works for embedded systems. Existing solutions like Embedded Proto and Cap’n Proto are not lightweight; they have a huge encoding burden.

I wanted to be able to create and parse messages directly in a buffer to reduce an extra copy step. MAVLink was the best option available, but sometimes a smaller header is important for low bandwidth links, and MAVLink doesn’t have the direct buffer feature mentioned above.

Struct Frame addresses these needs with a minimal footprint design optimized for embedded systems communication.

Key Features

  • Minimal footprint design for resource-constrained embedded systems
  • Direct buffer manipulation to avoid extra copy steps
  • Cross-platform Python library with matching C++ implementation
  • Simple frame definition using Python dataclasses
  • Support for variable-length data and nested structures
Python Data parsing Serialization Embedded systems C++

Was this post helpful?

Related articles