refactor NetworkDevice interface to work with new esp mqtt lib

This commit is contained in:
technyon
2023-01-28 17:17:46 +01:00
parent a6010a7f49
commit 5853b0dc0e
24 changed files with 493 additions and 287 deletions

View File

@@ -0,0 +1,20 @@
#pragma once
#include "MqttClientSetup.h"
#include "ClientSyncEthernet.h"
class espMqttClientEthernet : public MqttClientSetup<espMqttClientEthernet> {
public:
#if defined(ARDUINO_ARCH_ESP32)
explicit espMqttClientEthernet(uint8_t priority = 1, uint8_t core = 1);
#else
espMqttClient();
#endif
protected:
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
espMqttClientInternals::ClientSyncEthernet _client;
#elif defined(__linux__)
espMqttClientInternals::ClientPosix _client;
#endif
};