2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
20#ifndef IOT_MQTTFAST_PACKETS_CONNECT_H
21#define IOT_MQTTFAST_PACKETS_CONNECT_H
23#include "iot/mqtt-fast/ControlPacket.h"
29#ifndef DOXYGEN_SHOULD_SKIP_THIS
36#define MQTT_CONNECT 0x01
38#define MQTT_VERSION_3_1_1 0x04
44 explicit Connect(
const std::string& clientId,
45 const std::string& protocol =
"MQTT",
48 uint16_t keepAlive = 0x003C);
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
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