refactor NetworkDevice interface to work with new esp mqtt lib
This commit is contained in:
20
networkDevices/espMqttClientEthernet.h
Normal file
20
networkDevices/espMqttClientEthernet.h
Normal 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
|
||||
};
|
||||
Reference in New Issue
Block a user