IoT - Modular - MQTT.h

From The TinkerNet Wiki
Revision as of 14:22, 30 April 2021 by Tinker (talk | contribs) (Created page with "<syntaxhighlight lang="cpp" line="1"> #ifndef MQTT_H #define MQTT_H #define MQTT_BUFFER_SIZE (100) // This number is arbitrary // To...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1 #ifndef MQTT_H
 2 #define MQTT_H
 3 
 4 #define MQTT_BUFFER_SIZE (100)       // This number is arbitrary
 5                                     // Topic can be up to 65,536 bytes
 6                                     // Message can be up to 268,435,456 bytes
 7 
 8 char MQTT_outTopic[MQTT_BUFFER_SIZE];
 9 char MQTT_inTopic[MQTT_BUFFER_SIZE];
10 char MQTT_teleTopic[MQTT_BUFFER_SIZE];
11 char MQTT_statTopic[MQTT_BUFFER_SIZE];
12 
13 char MQTT_msg_out[MQTT_BUFFER_SIZE *10];
14 
15 unsigned long beacon_timer = 0;
16 #define BEACON_INTERVAL 30000 // Timer interval for the "keep-alive" status beacon
17 
18 extern char *MQTT_broker;
19 extern char *MQTT_user;
20 extern char *MQTT_pass;
21 extern char *MQTT_ClientName;
22 
23 extern char *WiFi_ssid;
24 
25 #endif  // MQTT_H