compile with esp mqtt lib

This commit is contained in:
technyon
2023-01-27 19:29:13 +01:00
parent 10650c1132
commit c9dbbb5dc1
113 changed files with 9740 additions and 2997 deletions

View File

@@ -12,6 +12,7 @@
#include <Arduino.h>
#include <Print.h>
#include "MqttClient.h"
#include "MqttClientSetup.h"
#define MQTT_MAX_PACKET_SIZE 1024
@@ -29,16 +30,16 @@ private:
uint8_t* buffer;
uint8_t* bufferEnd;
uint16_t bufferCnt = 0, bufferSize = 0;
MqttClient* client;
MqttClientSetup* client;
MqttLoggerMode mode;
void sendBuffer();
public:
MqttLogger(MqttLoggerMode mode=MqttLoggerMode::MqttAndSerialFallback);
MqttLogger(MqttClient& client, const char* topic, MqttLoggerMode mode=MqttLoggerMode::MqttAndSerialFallback);
MqttLogger(MqttClientSetup& client, const char* topic, MqttLoggerMode mode=MqttLoggerMode::MqttAndSerialFallback);
~MqttLogger();
void setClient(MqttClient& client);
void setClient(MqttClientSetup& client);
void setTopic(const char* topic);
void setMode(MqttLoggerMode mode);
void setRetained(boolean retained);