You've already forked Adafruit_MQTT_Library
mirror of
https://github.com/adafruit/Adafruit_MQTT_Library.git
synced 2025-07-30 13:23:06 +03:00
headercleanup & todos
This commit is contained in:
@ -20,29 +20,30 @@
|
||||
#define MQTT_QOS_1 0x1
|
||||
#define MQTT_QOS_0 0x0
|
||||
|
||||
#define SERVERNAME_SIZE 25
|
||||
|
||||
#define PASSWORD_SIZE 25
|
||||
#define USERNAME_SIZE 41
|
||||
#define CLIENTID_SIZE 23
|
||||
|
||||
#define FEEDNAME_SIZE 40
|
||||
|
||||
|
||||
#define CONNECT_TIMEOUT_MS 3000
|
||||
#define PUBLISH_TIMEOUT_MS 500
|
||||
#define PING_TIMEOUT_MS 500
|
||||
|
||||
// Adjust as necessary, in seconds
|
||||
#define MQTT_CONN_KEEPALIVE 15
|
||||
// Largest full packet we're able to send
|
||||
#define MAXBUFFERSIZE (85)
|
||||
|
||||
#define MQTT_CONN_USERNAMEFLAG 0x80
|
||||
#define MQTT_CONN_PASSWORDFLAG 0x40
|
||||
#define MQTT_CONN_WILLRETAIN 0x20
|
||||
#define MQTT_CONN_WILLQOS 0x08
|
||||
#define MQTT_CONN_WILLFLAG 0x04
|
||||
#define MQTT_CONN_CLEANSESSION 0x02
|
||||
#define MQTT_CONN_KEEPALIVE 15 // in seconds
|
||||
|
||||
#define MAXBUFFERSIZE (85)
|
||||
|
||||
|
||||
// how many subscriptions we want to be able to
|
||||
// track
|
||||
#define MAXSUBSCRIPTIONS 5
|
||||
|
||||
// how much data we save in a subscription object
|
||||
// eg max-subscription-payload-size
|
||||
#define SUBSCRIPTIONDATALEN 20
|
||||
|
||||
|
||||
@ -81,7 +82,8 @@ class Adafruit_MQTT {
|
||||
const char *password;
|
||||
|
||||
Adafruit_MQTT_Subscribe *subscriptions[MAXSUBSCRIPTIONS];
|
||||
uint8_t buffer[MAXBUFFERSIZE];
|
||||
|
||||
uint8_t buffer[MAXBUFFERSIZE]; // one buffer, used for all incoming/outgoing
|
||||
};
|
||||
|
||||
class Adafruit_MQTT_Publish {
|
||||
|
Reference in New Issue
Block a user