migrate mqtt config to struct

This commit is contained in:
Siwat Sirichai 2023-12-29 23:43:12 +07:00
parent 2dee25276c
commit 71475ef2f1
7 changed files with 125 additions and 82 deletions

View file

@ -74,6 +74,7 @@ public:
void registerSubscribeCallback(void (*callback)(void));
void setBaseTopic(char *base_topic);
void bindEthernetInterface(ETHClass *ethernetIface);
IoTComponent* getComponent(uint8_t card_id);
IPAddress getETHIp();
@ -101,13 +102,8 @@ private:
uint8_t base_topic_length;
ExpansionCard **cards; // Points to card array in ESPMegaPRO Core
// MQTT Connection Parameters
char *mqtt_server;
uint16_t mqtt_port;
char *mqtt_user;
char *mqtt_password;
char *client_id;
bool mqtt_useauth;
bool mqtt_connected;
NetworkConfig network_config;
MqttConfig mqtt_config;
ETHClass *ethernetIface;
};