update esp mqtt library
This commit is contained in:
@@ -66,8 +66,7 @@ Packet::Packet(espMqttClientTypes::Error& error,
|
||||
uint16_t willPayloadLength,
|
||||
uint16_t keepAlive,
|
||||
const char* clientId)
|
||||
: token(nullptr)
|
||||
, _packetId(0)
|
||||
: _packetId(0)
|
||||
, _data(nullptr)
|
||||
, _size(0)
|
||||
, _payloadIndex(0)
|
||||
@@ -162,8 +161,7 @@ Packet::Packet(espMqttClientTypes::Error& error,
|
||||
size_t payloadLength,
|
||||
uint8_t qos,
|
||||
bool retain)
|
||||
: token(nullptr)
|
||||
, _packetId(packetId)
|
||||
: _packetId(packetId)
|
||||
, _data(nullptr)
|
||||
, _size(0)
|
||||
, _payloadIndex(0)
|
||||
@@ -200,8 +198,7 @@ Packet::Packet(espMqttClientTypes::Error& error,
|
||||
size_t payloadLength,
|
||||
uint8_t qos,
|
||||
bool retain)
|
||||
: token(nullptr)
|
||||
, _packetId(packetId)
|
||||
: _packetId(packetId)
|
||||
, _data(nullptr)
|
||||
, _size(0)
|
||||
, _payloadIndex(0)
|
||||
@@ -235,8 +232,7 @@ Packet::Packet(espMqttClientTypes::Error& error,
|
||||
}
|
||||
|
||||
Packet::Packet(espMqttClientTypes::Error& error, uint16_t packetId, const char* topic, uint8_t qos)
|
||||
: token(nullptr)
|
||||
, _packetId(packetId)
|
||||
: _packetId(packetId)
|
||||
, _data(nullptr)
|
||||
, _size(0)
|
||||
, _payloadIndex(0)
|
||||
@@ -248,8 +244,7 @@ Packet::Packet(espMqttClientTypes::Error& error, uint16_t packetId, const char*
|
||||
}
|
||||
|
||||
Packet::Packet(espMqttClientTypes::Error& error, MQTTPacketType type, uint16_t packetId)
|
||||
: token(nullptr)
|
||||
, _packetId(packetId)
|
||||
: _packetId(packetId)
|
||||
, _data(nullptr)
|
||||
, _size(0)
|
||||
, _payloadIndex(0)
|
||||
@@ -276,8 +271,7 @@ Packet::Packet(espMqttClientTypes::Error& error, MQTTPacketType type, uint16_t p
|
||||
}
|
||||
|
||||
Packet::Packet(espMqttClientTypes::Error& error, uint16_t packetId, const char* topic)
|
||||
: token(nullptr)
|
||||
, _packetId(packetId)
|
||||
: _packetId(packetId)
|
||||
, _data(nullptr)
|
||||
, _size(0)
|
||||
, _payloadIndex(0)
|
||||
@@ -289,8 +283,7 @@ Packet::Packet(espMqttClientTypes::Error& error, uint16_t packetId, const char*
|
||||
}
|
||||
|
||||
Packet::Packet(espMqttClientTypes::Error& error, MQTTPacketType type)
|
||||
: token(nullptr)
|
||||
, _packetId(0)
|
||||
: _packetId(0)
|
||||
, _data(nullptr)
|
||||
, _size(0)
|
||||
, _payloadIndex(0)
|
||||
|
||||
@@ -33,8 +33,6 @@ class Packet {
|
||||
MQTTPacketType packetType() const;
|
||||
bool removable() const;
|
||||
|
||||
void* token; // native typeless variable to store any additional data
|
||||
|
||||
protected:
|
||||
uint16_t _packetId; // save as separate variable: will be accessed frequently
|
||||
uint8_t* _data;
|
||||
@@ -92,8 +90,7 @@ class Packet {
|
||||
const char* topic2,
|
||||
uint8_t qos2,
|
||||
Args&& ... args)
|
||||
: token(nullptr)
|
||||
, _packetId(packetId)
|
||||
: _packetId(packetId)
|
||||
, _data(nullptr)
|
||||
, _size(0)
|
||||
, _payloadIndex(0)
|
||||
@@ -115,8 +112,7 @@ class Packet {
|
||||
const char* topic1,
|
||||
const char* topic2,
|
||||
Args&& ... args)
|
||||
: token(nullptr)
|
||||
, _packetId(packetId)
|
||||
: _packetId(packetId)
|
||||
, _data(nullptr)
|
||||
, _size(0)
|
||||
, _payloadIndex(0)
|
||||
|
||||
Reference in New Issue
Block a user