Im

Implementing Binary Communication Protocols in C++ for Embedded Systems

Hacker News

Implementing Binary Communication Protocols in C++ for Embedded Systems

Hi all, I'm an embedded C++ software engineer. Over the years I had to implement multiple binary communication protocols used by various embedded systems. Every time I got annoyed and frustrated over a necessity to manually write error prone boilerplate code. There are so many available serialization tools and libraries (such as protobuf, simple-binary-encoding, etc...), but not a single one was adequate for my needs. Most of these tools focus on data serialization and facilitation of RPCs. Their main goal is to make data serialization and network transfer as quick as possible. It is a noble cause, but not really a first priority for embedded systems. For the latter it is much more important to protect against the malformed data and reduce amount of boilerplate code than to gain a couple of extra CPU cycles when performing the (de)serialization. In all the solutions I've reviewed and analyzed the generated code is not customizable and in most cases not really suitable for embedded systems, especially bare-metal ones. There are no means to introduce some compile or generation time updates such as configuring polymorphic interfaces required for a particular application or choosing particular data structures, disable usage of RTTI or exceptions, etc... The code generated by all the tools still requires a significant amount of integration boilerplate code to be written. All of the available solutions focus on supporting multiple programming languages in their code generation rather than a quality of the code for a particular language (C++ in my case). At the end I didn't have much choice but to implement my own C++ and embedded systems focused solution. It's called CommsChampion Ecosystem (https://arobenko.github.io/cc/). There is a good introduction article on CodeProject (https://www.codeproject.com/Articles/1278887/Implementing-Binary-Communication-Protocols-in-Cpl) which explains the main motivation and provides a high level overview of the presented solution.

Share card

Actual performance

2points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
79%79% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntUnlikely to reach the leaderboard · Strong signals: single, coding, code · Missing: mac, agents, macos
47%47% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: ide, io · Missing: https docs, excited, just released
46%46% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Strong signals: interface · Missing: plus, platform, intuitive
35%35% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
34%34% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
14%14% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: introduce · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Sa
Sandal, lightweight containerization for embedded systems43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Sandal, lightweight containerization for embedded systems

Hacker News1
Em
Embedded Systems Weekly42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Embedded Systems Weekly

Hacker News2
a
a Lispy, embedded Forth48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

a Lispy, embedded Forth

Hacker News3
A
A Lispy, embedded Forth48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Lispy, embedded Forth

Hacker News61
G-
G-Fu – a pragmatic Lisp embedded in Go60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

G-Fu – a pragmatic Lisp embedded in Go

Hacker News123
Ru
Runnable embedded "Gists"40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Runnable embedded "Gists"

Hacker News3
Co
Confidential computing for high-assurance RISC-V embedded systems55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Confidential computing for high-assurance RISC-V embedded systems

Hacker News103
Deetaa
Deetaa18%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Streamlining communication

Product Hunt+10
Tr
Transfer files to and from embedded systems easily with Teleporter50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Transfer files to and from embedded systems easily with Teleporter

Hacker News3
Tr
Troubleshoot distributed systems51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Troubleshoot distributed systems

Hacker News6