For various reasons I decided to implement my own library for the MQTT 3.1.1 standard. Now that the basics work, I would like to get some feedback on the implementation 🙂
The library is mainly intended for the ESP32 microcontroller using the ESP-IDF toolchain and is based on the STL. I constructed the whole thing bottom up from a std::vector<uint8_t>
to form the packets as defined by the MQTT standard. The idea for this approach was 1st the clean and portable structure of STL containers and second the possibility to transform one packet to another without touching the underlying byte array data but only the surrounding class.
I’m a autodidact programmer, so please don’t burn me if there are ‘obvious’ errors 🙂
The library is in this git repository. The components/mqtt
folder has the MQTT-related files while the rest is for the EPS32/freeRTOS. The most basic structures are in components/mqtt/protocol/inc/mqtt_base.hpp
Thank you in advance for any feedback
Patrick