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#ifndef IOT_MQTTFAST_PACKETS_CONNECT_H
43#define IOT_MQTTFAST_PACKETS_CONNECT_H
45#include "iot/mqtt-fast/ControlPacket.h"
51#ifndef DOXYGEN_SHOULD_SKIP_THIS
58#define MQTT_CONNECT 0x01
60#define MQTT_VERSION_3_1_1 0x04
66 explicit Connect(
const std::string& clientId,
67 const std::string& protocol =
"MQTT",
70 uint16_t keepAlive = 0x003C);
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
void putInt8(uint8_t value)
ControlPacket(iot::mqtt_fast::ControlPacketFactory &controlPacketFactory)
void putInt16(uint16_t value)
void putString(const std::string &value)
ControlPacket(uint8_t type, uint8_t reserved=0)
const std::string & getWillTopic() const
Connect(const std::string &clientId, const std::string &protocol="MQTT", uint8_t version=4, uint8_t flags=0, uint16_t keepAlive=0x003C)
uint16_t getKeepAlive() const
std::string getProtocol() const
const std::string & getUsername() const
uint8_t getWillQoS() const
bool getPasswordFlag() const
const std::string & getWillMessage() const
const std::string & getClientId() const
bool getCleanSession() const
bool getWillRetain() const
const std::string & getPassword() const
Connect(iot::mqtt_fast::ControlPacketFactory &controlPacketFactory)
bool getUsernameFlag() const