mqtt connection implementation
This commit is contained in:
parent
0dfb066a74
commit
1163f2e30f
7 changed files with 33 additions and 38 deletions
|
@ -12,6 +12,7 @@
|
|||
class ESPMegaIoT
|
||||
{
|
||||
public:
|
||||
ESPMegaIoT();
|
||||
void intr_begin(ExpansionCard *cards[]);
|
||||
void loop();
|
||||
void registerCard(uint8_t card_id);
|
||||
|
@ -23,8 +24,6 @@ public:
|
|||
void subscribeRelative(char *topic);
|
||||
void subscribeToTopic(char *topic);
|
||||
void unsubscribeFromTopic(char *topic);
|
||||
void connectToEthernet();
|
||||
bool ethernetConnected();
|
||||
void connectToWifi(char *ssid, char *password);
|
||||
void connectToWifi(char *ssid);
|
||||
void disconnectFromWifi();
|
||||
|
@ -36,12 +35,10 @@ public:
|
|||
void registerMqttCallback(void (*callback)(char *, char *));
|
||||
void registerRelativeMqttCallback(void (*callback)(char *, char *));
|
||||
void setBaseTopic(char *base_topic);
|
||||
void setETHStaticIp(IPAddress ip, IPAddress gateway, IPAddress subnet, IPAddress dns1, IPAddress dns2);
|
||||
void setETHStaticIp(IPAddress ip, IPAddress gateway, IPAddress subnet, IPAddress dns1);
|
||||
void setETHStaticIp(IPAddress ip, IPAddress gateway, IPAddress subnet);
|
||||
IPAddress getETHIp();
|
||||
|
||||
private:
|
||||
WiFiClient tcpClient;
|
||||
void sessionKeepAlive();
|
||||
bool mqttReconnect();
|
||||
void wifiReconnect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue