Implementing a Modern C++ MQTT Client for Embedded Devices
summary
A C++14 MQTT client for tiny embedded targets is implemented using Boost.MSM state machines, Spirit parsers and a poor-man type eraser to keep the state machine type-free. The prototype runs on a Nordic BLE board, compiles with -Os, and proves surprising size results: 5 KB for exception support can be removed, the Spirit grammar costs just over 3 KB, and adding one submachine is ~28 bytes. The library works and will appear on GitHub.
AI-written summary · about
chapters (8)
- 0:00Introduction to embedded MQTT
- 1:23MQTT and embedded systems
- 7:48Challenges of C++ in embedded
- 11:26Designing an asynchronous client
- 17:56Project implementation setup
- 20:17Optimizing code with C++ features
- 40:18Parsing with Boost Spirit
- 51:36Conclusions and Q&A
related talks
05mModern C++ in Embedded OS Dev
12mMQTT-SN in Zephyr: Lightweight Messaging for Constrained Devices
27mExtreme MQTT on PicoRuby
57mC++ to the RISCue! A Practical Guide for Embedded C++20
29mFuture-proofed microcontroller designs with FreeRTOS
01h 31mBetter embedded library interfaces with modern C++
58mBuilding Multi-protocol IoT Nodes with Thread, BLE and ZigBee
49mOpen Source MQTT Brokers
