Overview
How it works
Engineering highlights
- Recovering after a bad message — the parser scans forward one byte at a time after a failed checksum, so a damaged message cannot hide the valid one behind it. Loss tracking also accounts for messages arriving late: a gap in the stream does not always mean something was lost. In the recorded test, the engine's count matched all 1,164 lost frames, and it rejected all 179 corrupted frames.
- Sharing data without slowing reception — C++ and Python communicate through shared memory using a seqlock. Python checks that a snapshot stayed consistent while it was being read and retries if necessary, while the receive loop keeps running. Stress testing found no partially updated snapshots, though readers can run out of retries under heavy load.
- Leaving something useful after a crash — a preallocated ring buffer keeps the last 1,024 incoming frames, including damaged ones. The crash handler saves them without allocating memory or taking locks, and a Python tool decodes the recording and checks its CRCs. All 20 recorded crash tests produced complete dumps.
Results and limitations
Try it
Sh
cmake --preset release && cmake --build --preset release -j
ctest --preset release
bash scripts/demo.sh --replay
