1
0
mirror of https://github.com/adafruit/Adafruit_MQTT_Library.git synced 2025-08-01 00:24:22 +03:00

Add Adafruit_MQTT_Subscribe::datalen

This stores the number of valid bytes in lastread. Having access to this
information allows transmitting binary data as well, containing embedded
nul bytes.
This commit is contained in:
Matthijs Kooijman
2015-07-02 18:07:33 +02:00
parent 22c3533745
commit 22b77ecb68
2 changed files with 4 additions and 0 deletions

View File

@ -203,6 +203,9 @@ class Adafruit_MQTT_Subscribe {
uint8_t qos;
uint8_t lastread[SUBSCRIPTIONDATALEN];
// Number valid bytes in lastread. Limited to SUBSCRIPTIONDATALEN-1 to
// ensure nul terminating lastread.
uint8_t datalen;
private:
Adafruit_MQTT *mqtt;
};