[colug-432] c++ struct serialization?

Mike Schoenborn rtfm at columbus.rr.com
Sat Dec 14 14:35:38 EST 2019


On Thu, 12 Dec 2019 21:23:32 -0800
Rick Hornsby <richardjhornsby at gmail.com> wrote:

> I can do higher level languages like Python/Ruby “scripts”, but when
> it comes to C/C++ it seems like a different world.
>
> ...
>
> There’s no way the code should be this primitive … or better put,
> dumb?
>
> ...
>
> Any ideas?

Something less "primitive" and something you may have experience
using with Python/Ruby is JSON, or for this case "ArduinoJson".

See: https://arduinojson.org/

Your processor may experience a small performance hit, but your
programming efforts will likely experience a performance benefit.

Based on the "3*RGB" in your code comments I'm guessing this application
(or part thereof) isn't going to suffer from the time hit (Blinking
Christmas lights, are we?).  On the other hand if your structure had to
do with ESP32 transmit/receive registers and time critical code then the
link Chris provided would be a good way to get down into the
nitty-gritty.






More information about the colug-432 mailing list