smartheim / wakaamaNode

lwM2M library based on Wakaama for PlattformIO/cmake with easy object API
https://openhab-nodes.github.io/wakaamaNode/
MIT License
27 stars 18 forks source link

C++ migration: Allow features without preprocessor ugliness #15

Open davidgraeff opened 6 years ago

davidgraeff commented 6 years ago

At the moment Wakaama uses preprocessor #ifdefs to enable certain codepaths (server, client, bootstrap server, json), transport properties (dtls) and other features (firmware upgrade).

The compiler and linker are already eliminating dead code, so independent features like firmware upgrade do not need to be #ifdef'ed.

Server, client and bootstrap functionality should be separated more and refactored into own classes with an own state machine each.