fixed auto reconnect and resubscribe inside mqtt wrapper loop

This commit is contained in:
Emanuele Trabattoni
2025-07-18 19:29:19 +02:00
parent e8f395f8ef
commit 7c776e4787
4 changed files with 50 additions and 11 deletions

View File

@@ -17,6 +17,9 @@ namespace drivers
public:
RS485(const uint32_t baud, const SerialConfig conf);
RS485(const RS485 &) = delete; // remove copy constructors
RS485 &operator=(const RS485 &) = delete;
const bool write(const std::vector<uint8_t> data);
const bool readAll(std::vector<uint8_t> &data);
const bool readN(const uint16_t nBytes, std::vector<uint8_t> &data);
@@ -54,6 +57,9 @@ namespace drivers
public:
MODBUS(const uint32_t baud, const SerialConfig conf);
MODBUS(const MODBUS &) = delete; // remove copy constructors
MODBUS &operator=(const MODBUS &) = delete;
// Func 0x01
const bool readCoils(const uint8_t device, const uint16_t reg, const uint16_t num, std::vector<bool> &coils);