SNode.C
|
#include <Publish.h>
Public Member Functions | |
Publish () | |
Publish (uint16_t packetIdentifier, const std::string &topic, const std::string &message, uint8_t qoS, bool dup, bool retain) | |
bool | getDup () const |
uint8_t | getQoS () const |
uint16_t | getPacketIdentifier () const |
std::string | getTopic () const |
std::string | getMessage () const |
bool | getRetain () const |
![]() | |
ControlPacket (uint8_t type, const std::string &name) | |
ControlPacket (const ControlPacket &)=default | |
ControlPacket (ControlPacket &&)=default | |
virtual | ~ControlPacket () |
ControlPacket & | operator= (const ControlPacket &)=default |
ControlPacket & | operator= (ControlPacket &&)=default |
std::vector< char > | serialize () const |
const std::string & | getName () const |
uint8_t | getType () const |
uint8_t | getFlags () const |
Protected Attributes | |
iot::mqtt::types::UInt16 | packetIdentifier |
iot::mqtt::types::String | topic |
iot::mqtt::types::StringRaw | message |
bool | dup = false |
uint8_t | qoS = 0 |
bool | retain = false |
![]() | |
uint8_t | flags = 0 |
Private Member Functions | |
std::vector< char > | serializeVP () const override |
iot::mqtt::packets::Publish::Publish | ( | ) |
Definition at line 52 of file Publish.cpp.
References iot::mqtt::ControlPacket::ControlPacket().
Referenced by Publish().
iot::mqtt::packets::Publish::Publish | ( | uint16_t | packetIdentifier, |
const std::string & | topic, | ||
const std::string & | message, | ||
uint8_t | qoS, | ||
bool | dup, | ||
bool | retain | ||
) |
Definition at line 56 of file Publish.cpp.
References dup, iot::mqtt::ControlPacket::flags, message, iot::mqtt::types::String::operator=(), iot::mqtt::types::StringRaw::operator=(), iot::mqtt::types::UInt16::operator=(), packetIdentifier, Publish(), qoS, retain, and topic.
Referenced by iot::mqtt::Session::fromJson(), and iot::mqtt::Mqtt::sendPublish().
bool iot::mqtt::packets::Publish::getDup | ( | ) | const |
Definition at line 81 of file Publish.cpp.
References dup.
Referenced by iot::mqtt::Mqtt::_onPublish(), and iot::mqtt::Session::toJson().
std::string iot::mqtt::packets::Publish::getMessage | ( | ) | const |
Definition at line 97 of file Publish.cpp.
References message.
Referenced by iot::mqtt::Mqtt::_onPublish(), iot::mqtt::server::Mqtt::_onPublish(), and iot::mqtt::Session::toJson().
uint16_t iot::mqtt::packets::Publish::getPacketIdentifier | ( | ) | const |
Definition at line 89 of file Publish.cpp.
References packetIdentifier.
Referenced by iot::mqtt::Mqtt::_onPublish().
uint8_t iot::mqtt::packets::Publish::getQoS | ( | ) | const |
Definition at line 85 of file Publish.cpp.
References qoS.
Referenced by iot::mqtt::Mqtt::_onPublish(), iot::mqtt::server::Mqtt::_onPublish(), and iot::mqtt::Session::toJson().
bool iot::mqtt::packets::Publish::getRetain | ( | ) | const |
Definition at line 101 of file Publish.cpp.
References retain.
Referenced by iot::mqtt::Mqtt::_onPublish(), iot::mqtt::server::Mqtt::_onPublish(), and iot::mqtt::Session::toJson().
std::string iot::mqtt::packets::Publish::getTopic | ( | ) | const |
Definition at line 93 of file Publish.cpp.
References topic.
Referenced by iot::mqtt::Mqtt::_onPublish(), iot::mqtt::server::Mqtt::_onPublish(), and iot::mqtt::Session::toJson().
|
overrideprivatevirtual |
Implements iot::mqtt::ControlPacket.
Definition at line 67 of file Publish.cpp.
References message, packetIdentifier, qoS, iot::mqtt::types::TypeBase< ValueTypeT >::serialize(), iot::mqtt::types::String::serialize(), and topic.
|
protected |
Definition at line 81 of file Publish.h.
Referenced by getDup(), Publish(), iot::mqtt::client::packets::Publish::Publish(), and iot::mqtt::server::packets::Publish::Publish().
|
protected |
Definition at line 79 of file Publish.h.
Referenced by iot::mqtt::client::packets::Publish::deserializeVP(), iot::mqtt::server::packets::Publish::deserializeVP(), getMessage(), Publish(), and serializeVP().
|
protected |
Definition at line 77 of file Publish.h.
Referenced by iot::mqtt::client::packets::Publish::deserializeVP(), iot::mqtt::server::packets::Publish::deserializeVP(), getPacketIdentifier(), Publish(), and serializeVP().
|
protected |
Definition at line 82 of file Publish.h.
Referenced by iot::mqtt::client::packets::Publish::deserializeVP(), iot::mqtt::server::packets::Publish::deserializeVP(), getQoS(), Publish(), iot::mqtt::client::packets::Publish::Publish(), iot::mqtt::server::packets::Publish::Publish(), and serializeVP().
|
protected |
Definition at line 83 of file Publish.h.
Referenced by getRetain(), Publish(), iot::mqtt::client::packets::Publish::Publish(), and iot::mqtt::server::packets::Publish::Publish().
|
protected |
Definition at line 78 of file Publish.h.
Referenced by iot::mqtt::client::packets::Publish::deserializeVP(), iot::mqtt::server::packets::Publish::deserializeVP(), getTopic(), Publish(), and serializeVP().