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/server/broker/Message.h"
44#ifndef DOXYGEN_SHOULD_SKIP_THIS
47#include <nlohmann/json.hpp>
51namespace iot::mqtt::server::
broker {
54 const std::string& originClientId,
const std::string& topic,
const std::string& message, uint8_t qoS,
bool originRetain)
98 json[
"topic"] =
topic;
108 topic = json[
"topic"];
void setMessage(const std::string &message)
const std::string & getOriginClientId() const
std::string originClientId
nlohmann::json toJson() const
const std::string & getTopic() const
void setTopic(const std::string &topic)
bool getOriginRetain() const
const std::string & getMessage() const
Message(const std::string &originClientId, const std::string &topic, const std::string &message, uint8_t qoS, bool originRetain)
Message & fromJson(const nlohmann::json &json)