iot components callback
This commit is contained in:
parent
d3497b671e
commit
9fa8cbc4b1
10 changed files with 117 additions and 32 deletions
|
@ -5,6 +5,7 @@
|
|||
#include <DigitalInputIoT.hpp>
|
||||
#include <DigitalOutputCard.hpp>
|
||||
#include <DigitalOutputIoT.hpp>
|
||||
#include <IoTComponent.hpp>
|
||||
#include <PubSubClient.h>
|
||||
#include <ETH.h>
|
||||
|
||||
|
@ -25,10 +26,10 @@ class ESPMegaIoT
|
|||
void disconnectFromWifi();
|
||||
bool wifiConnected();
|
||||
void connectToMqtt(char *mqtt_server, uint16_t mqtt_port, char *mqtt_user, char *mqtt_password);
|
||||
void connectToMqtt(char *mqtt_server, uint16_t mqtt_port);
|
||||
void disconnectFromMqtt();
|
||||
void publishToTopic(char *topic, char *payload);
|
||||
void registerMqttCallback(void (*callback)(char *, char *));
|
||||
void checkCardType(uint8_t card_id);
|
||||
|
||||
private:
|
||||
void sessionKeepAlive();
|
||||
|
@ -36,7 +37,7 @@ class ESPMegaIoT
|
|||
void wifiReconnect();
|
||||
void mqttCallback(char *topic, byte *payload, unsigned int length);
|
||||
PubSubClient mqtt;
|
||||
ExpansionCard *expansionCards[255];
|
||||
IoTComponent *components[255];
|
||||
bool card_publish_enabled[255];
|
||||
char payload_buffer[200];
|
||||
char base_topic[100];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue