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-fast/ControlPacket.h"
44#include "iot/mqtt-fast/ControlPacketFactory.h"
46#ifndef DOXYGEN_SHOULD_SKIP_THIS
78 std::vector<
char> packet;
80 packet.push_back(
static_cast<
char>((
type << 0x04) | (
reserved & 0x0F)));
84 uint8_t encodedByte =
static_cast<uint8_t>(remainingLength % 0x80);
85 remainingLength /= 0x80;
86 if (remainingLength > 0) {
89 packet.push_back(
static_cast<
char>(encodedByte));
90 }
while (remainingLength > 0);
iot::mqtt_fast::types::Binary & getPacket()
std::vector< char > getPacket()
void putInt8(uint8_t value)
ControlPacket(iot::mqtt_fast::ControlPacketFactory &controlPacketFactory)
void putInt16(uint16_t value)
void putString(const std::string &value)
iot::mqtt_fast::types::Binary data
ControlPacket(uint8_t type, uint8_t reserved=0)
void putIntV(uint32_t value)
void putStringRaw(const std::string &value)
uint64_t getRemainingLength() const
void putInt32(uint32_t value)
uint8_t getReserved() const
std::list< uint8_t > getUint8ListRaw()
void putUint8ListRaw(const std::list< uint8_t > &value)
void putInt64(uint64_t value)
std::vector< char > & getValue()
std::string getStringRaw()
void putUint8ListRaw(const std::list< uint8_t > &values)
void putInt64(uint64_t value)
std::list< uint8_t > getUint8ListRaw()
std::string getStringRaw()
void putStringRaw(const std::string &string)
void putInt8(uint8_t value)
void putInt32(uint32_t value)
std::vector< char > & getValue()
void putString(const std::string &string)
std::vector< char >::size_type getLength() const
void putIntV(uint32_t value)
void putInt16(uint16_t value)