2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
42#include "iot/mqtt/packets/Connect.h"
44#ifndef DOXYGEN_SHOULD_SKIP_THIS
59 const std::string& willTopic,
60 const std::string& willMessage,
63 const std::string& username,
64 const std::string& password,
83 ((willQoS << 3) & 0x18) | (!
willFlag ? 0 : 0x04) | (!cleanSession ? 0 : 0x02));
90 packet.insert(packet.end(), tmpVector.begin(), tmpVector.end());
93 packet.insert(packet.end(), tmpVector.begin(), tmpVector.end());
96 packet.insert(packet.end(), tmpVector.begin(), tmpVector.end());
99 packet.insert(packet.end(), tmpVector.begin(), tmpVector.end());
103 packet.insert(packet.end(), tmpVector.begin(), tmpVector.end());
106 packet.insert(packet.end(), tmpVector.begin(), tmpVector.end());
110 packet.insert(packet.end(), tmpVector.begin(), tmpVector.end());
114 packet.insert(packet.end(), tmpVector.begin(), tmpVector.end());
ControlPacket(uint8_t type, const std::string &name)
iot::mqtt::types::String willMessage
iot::mqtt::types::String protocol
Connect(const std::string &clientId, uint16_t keepAlive, bool cleanSession, const std::string &willTopic, const std::string &willMessage, uint8_t willQoS, bool willRetain, const std::string &username, const std::string &password, bool loopPrevention)
uint8_t getWillQoS() const
std::string getClientId() const
std::string getWillTopic() const
uint16_t getKeepAlive() const
bool getUsernameFlag() const
bool getCleanSession() const
iot::mqtt::types::String willTopic
std::vector< char > serializeVP() const override
std::string getUsername() const
uint8_t getConnectFlags() const
bool getPasswordFlag() const
iot::mqtt::types::UInt8 connectFlags
std::string getPassword() const
iot::mqtt::types::String username
iot::mqtt::types::UInt8 level
std::string getWillMessage() const
bool getWillRetain() const
iot::mqtt::types::String clientId
iot::mqtt::types::String password
std::string getProtocol() const
iot::mqtt::types::UInt16 keepAlive
std::vector< char > serialize() const override
String & operator=(const std::string &newValue)
virtual std::vector< char > serialize() const
UInt16 & operator=(const uint16_t &newValue)
UInt8 & operator=(const uint8_t &newValue)
#define MQTT_VERSION_3_1_1