|
AWS IoT C++ SDK
|
Publish Message Packet Type. More...
#include <Publish.hpp>
Public Member Functions | |
| PublishPacket (const PublishPacket &)=delete | |
| PublishPacket (PublishPacket &&)=delete | |
| PublishPacket & | operator= (const PublishPacket &) &=delete |
| PublishPacket & | operator= (PublishPacket &&) &=delete |
| PublishPacket (std::unique_ptr< Utf8String > p_topic_name, bool is_retained, bool is_duplicate, QoS qos, const util::String &payload) | |
| Constructor, Individual data. More... | |
| PublishPacket (const util::Vector< unsigned char > &buf, bool is_retained, bool is_duplicate, QoS qos) | |
| Constructor, Deserializes data from buffer. More... | |
| bool | IsRetained () |
| Get the value of the Is Retained flag. More... | |
| bool | IsDuplicate () |
| Get the value of the Is Duplicate message flag. More... | |
| util::String | GetTopicName () |
| Get String containing topic name for this message. More... | |
| util::String | GetPayload () |
| Get string containing Payload. More... | |
| size_t | GetPayloadLen () |
| Get length of the payload. More... | |
| util::String | ToString () |
| Serialize this packet into a String. More... | |
| QoS | GetQoS () |
Public Member Functions inherited from awsiotsdk::mqtt::Packet | |
| Packet (const Packet &)=delete | |
| Packet (Packet &&)=delete | |
| Packet & | operator= (const Packet &) &=delete |
| Packet & | operator= (Packet &&) &=delete |
| uint16_t | GetActionId () |
| Get ID of the current run of this Action. More... | |
| void | SetActionId (uint16_t action_id) |
| Set the Action ID for this run of the Action. More... | |
| bool | isPacketDataValid () |
| uint16_t | GetPacketId () |
| void | SetPacketId (uint16_t packet_id) |
| size_t | Size () |
| virtual util::String | ToString ()=0 |
Public Member Functions inherited from awsiotsdk::ActionData | |
| ActionData (const ActionData &)=default | |
| ActionData (ActionData &&)=default | |
| ActionData & | operator= (const ActionData &) &=default |
| ActionData & | operator= (ActionData &&) &=default |
| virtual uint16_t | GetActionId ()=0 |
| Get ID of the current run of this Action. More... | |
| virtual void | SetActionId (uint16_t action_id)=0 |
| Set the Action ID for this run of the Action. More... | |
Static Public Member Functions | |
| static std::shared_ptr< PublishPacket > | Create (std::unique_ptr< Utf8String > p_topic_name, bool is_retained, bool is_duplicate, QoS qos, const util::String &payload) |
| Create Factory method using Individual data. More... | |
| static std::shared_ptr< PublishPacket > | Create (const util::Vector< unsigned char > &buf, bool is_retained, bool is_duplicate, QoS qos) |
| Create Factory method which deserializes data from a buffer. More... | |
Static Public Member Functions inherited from awsiotsdk::mqtt::Packet | |
| static void | AppendUInt16ToBuffer (util::String &buf, uint16_t value) |
| static void | AppendUtf8StringToBuffer (util::String &buf, std::unique_ptr< Utf8String > &utf8_str) |
| static void | AppendUtf8StringToBuffer (util::String &buf, std::shared_ptr< Utf8String > &utf8_str) |
| static uint16_t | ReadUInt16FromBuffer (const util::Vector< unsigned char > &buf, size_t &extract_index) |
| static std::unique_ptr< Utf8String > | ReadUtf8StringFromBuffer (const util::Vector< unsigned char > &buf, size_t &extract_index) |
Protected Attributes | |
| bool | is_retained_ |
| Retained messages are NOT supported by the AWS IoT Service at the time of this SDK release. | |
| bool | is_duplicate_ |
| Is this message a duplicate QoS > 0 message? Handled automatically by the MQTT client. | |
| QoS | qos_ |
| Message Quality of Service. | |
| std::unique_ptr< Utf8String > | p_topic_name_ |
| Topic Name this packet was published to. | |
| util::String | payload_ |
| MQTT message payload. | |
Protected Attributes inherited from awsiotsdk::mqtt::Packet | |
| PacketFixedHeader | fixed_header_ |
| Fixed header for this packet instance. | |
| size_t | packet_size_ |
| Size of the packet. | |
| size_t | serialized_packet_length_ |
| Serialized length of the entire packet including fixed header. | |
| std::atomic_uint_fast16_t | packet_id_ |
| Message sequence identifier. Handled automatically by the MQTT client. | |
Additional Inherited Members | |
Public Types inherited from awsiotsdk::ActionData | |
| typedef std::function< void(uint16_t action_id, ResponseCode rc)> | AsyncAckNotificationHandlerPtr |
Data Fields inherited from awsiotsdk::ActionData | |
| AsyncAckNotificationHandlerPtr | p_async_ack_handler_ |
| Handler to call when response is received for this action. | |
Defines a type for MQTT Publish messages. Used for both incoming and out going messages
| awsiotsdk::mqtt::PublishPacket::PublishPacket | ( | std::unique_ptr< Utf8String > | p_topic_name, |
| bool | is_retained, | ||
| bool | is_duplicate, | ||
| QoS | qos, | ||
| const util::String & | payload | ||
| ) |
| p_topic_name | Topic name on which message is to be published |
| is_retained | Is retained flag |
| is_duplicate | Is duplicate message flag |
| qos | QoS to use for this message, QoS2 is not supported currently |
| payload | String containing payload to send with message. Can be zero length. |
| awsiotsdk::mqtt::PublishPacket::PublishPacket | ( | const util::Vector< unsigned char > & | buf, |
| bool | is_retained, | ||
| bool | is_duplicate, | ||
| QoS | qos | ||
| ) |
| buf | Buffer containing packet data |
| is_retained | Is retained flag |
| is_duplicate | Is duplicate message flag |
| qos | QoS used by this message |
|
static |
| buf | Buffer containing packet data |
| is_retained | Is retained flag |
| is_duplicate | Is duplicate message flag |
| qos | QoS used by this message |
|
static |
| p_topic_name | Topic name on which message is to be published |
| is_retained | Is retained flag |
| is_duplicate | Is duplicate message flag |
| qos | QoS to use for this message, QoS2 is not supported currently |
| payload | String containing payload to send with message. Can be zero length |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Implements awsiotsdk::mqtt::Packet.