#include <Publish.h>
Public Member Functions | |
| Publish (uint16_t packetIdentifier, const std::string &topic, const std::string &message, bool dup=false, uint8_t qoS=0, bool retain=false) | |
| Publish (iot::mqtt_fast::ControlPacketFactory &controlPacketFactory) | |
| bool | getDup () const |
| uint8_t | getQoS () const |
| uint16_t | getPacketIdentifier () const |
| const std::string & | getTopic () const |
| const std::string & | getMessage () const |
| bool | getRetain () const |
| Public Member Functions inherited from iot::mqtt_fast::ControlPacket | |
| ControlPacket (uint8_t type, uint8_t reserved=0) | |
| ControlPacket (iot::mqtt_fast::ControlPacketFactory &controlPacketFactory) | |
| ControlPacket (const ControlPacket &)=delete | |
| ControlPacket (ControlPacket &&)=delete | |
| ControlPacket & | operator= (const ControlPacket &)=delete |
| ControlPacket & | operator= (ControlPacket &&)=delete |
| uint8_t | getType () const |
| uint8_t | getReserved () const |
| uint64_t | getRemainingLength () const |
| std::vector< char > | getPacket () |
| bool | isError () const |
Private Attributes | |
| uint16_t | packetIdentifier = 0 |
| std::string | topic |
| std::string | message |
| bool | dup = false |
| uint8_t | qoS = 0 |
| bool | retain = false |
Additional Inherited Members | |
| Protected Member Functions inherited from iot::mqtt_fast::ControlPacket | |
| std::vector< char > & | getValue () |
| uint8_t | getInt8 () |
| uint16_t | getInt16 () |
| uint32_t | getInt32 () |
| uint64_t | getInt64 () |
| uint32_t | getIntV () |
| std::string | getString () |
| std::string | getStringRaw () |
| std::list< uint8_t > | getUint8ListRaw () |
| void | putInt8 (uint8_t value) |
| void | putInt16 (uint16_t value) |
| void | putInt32 (uint32_t value) |
| void | putInt64 (uint64_t value) |
| void | putIntV (uint32_t value) |
| void | putString (const std::string &value) |
| void | putStringRaw (const std::string &value) |
| void | putUint8ListRaw (const std::list< uint8_t > &value) |
| bool | isError () |
| Protected Attributes inherited from iot::mqtt_fast::ControlPacket | |
| bool | error = false |
| iot::mqtt_fast::packets::Publish::Publish | ( | uint16_t | packetIdentifier, |
| const std::string & | topic, | ||
| const std::string & | message, | ||
| bool | dup = false, | ||
| uint8_t | qoS = 0, | ||
| bool | retain = false ) |
Definition at line 52 of file Publish.cpp.
References iot::mqtt_fast::ControlPacket::ControlPacket(), dup, message, packetIdentifier, iot::mqtt_fast::ControlPacket::putInt16(), iot::mqtt_fast::ControlPacket::putString(), iot::mqtt_fast::ControlPacket::putStringRaw(), qoS, retain, and topic.
Referenced by iot::mqtt_fast::SocketContext::sendPublish().
|
explicit |
Definition at line 72 of file Publish.cpp.
References iot::mqtt_fast::ControlPacket::ControlPacket(), dup, iot::mqtt_fast::ControlPacket::error, iot::mqtt_fast::ControlPacket::getInt16(), iot::mqtt_fast::ControlPacketFactory::getPacketFlags(), iot::mqtt_fast::ControlPacket::getString(), iot::mqtt_fast::ControlPacket::getStringRaw(), iot::mqtt_fast::ControlPacket::isError(), message, packetIdentifier, qoS, retain, and topic.
Referenced by iot::mqtt_fast::SocketContext::onReceivedFromPeer().
| bool iot::mqtt_fast::packets::Publish::getDup | ( | ) | const |
| const std::string & iot::mqtt_fast::packets::Publish::getMessage | ( | ) | const |
| uint16_t iot::mqtt_fast::packets::Publish::getPacketIdentifier | ( | ) | const |
Definition at line 99 of file Publish.cpp.
References packetIdentifier.
| uint8_t iot::mqtt_fast::packets::Publish::getQoS | ( | ) | const |
| bool iot::mqtt_fast::packets::Publish::getRetain | ( | ) | const |
| const std::string & iot::mqtt_fast::packets::Publish::getTopic | ( | ) | const |
|
private |
|
private |
Definition at line 83 of file Publish.h.
Referenced by getMessage(), Publish(), and Publish().
|
private |
Definition at line 81 of file Publish.h.
Referenced by getPacketIdentifier(), Publish(), and Publish().
|
private |
|
private |
Definition at line 86 of file Publish.h.
Referenced by getRetain(), Publish(), and Publish().
|
private |
Definition at line 82 of file Publish.h.
Referenced by getTopic(), Publish(), and Publish().