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/Publish.h"
44#ifndef DOXYGEN_SHOULD_SKIP_THIS
56 Publish::
Publish(uint16_t packetIdentifier,
const std::string& topic,
const std::string& message, uint8_t qoS,
bool dup,
bool retain)
58 this->flags =
static_cast<uint8_t>((dup ? 0x08 : 0x00) | ((qoS << 1) & 0x06) | (retain ? 0x01 : 0x00));
72 packet.insert(packet.end(), tmpVector.begin(), tmpVector.end());
76 packet.insert(packet.end(), tmpVector.begin(), tmpVector.end());
ControlPacket(uint8_t type, const std::string &name)
iot::mqtt::types::StringRaw message
std::string getTopic() const
std::string getMessage() const
Publish(uint16_t packetIdentifier, const std::string &topic, const std::string &message, uint8_t qoS, bool dup, bool retain)
iot::mqtt::types::UInt16 packetIdentifier
uint16_t getPacketIdentifier() const
iot::mqtt::types::String topic
std::vector< char > serializeVP() const override
StringRaw & operator=(const std::string &newValue)
std::vector< char > serialize() const override
String & operator=(const std::string &newValue)
virtual std::vector< char > serialize() const
UInt16 & operator=(const uint16_t &newValue)