#include <Mqtt5Packets.h>
Data model of an MQTT5 PUBLISH packet
◆ PublishPacket() [1/5]
Aws::Crt::Mqtt5::PublishPacket::PublishPacket |
( |
const aws_mqtt5_packet_publish_view & |
raw_options, |
|
|
Allocator * |
allocator = ApiAllocator() |
|
) |
| |
|
noexcept |
◆ PublishPacket() [2/5]
◆ PublishPacket() [3/5]
◆ ~PublishPacket()
Aws::Crt::Mqtt5::PublishPacket::~PublishPacket |
( |
| ) |
|
|
virtual |
◆ PublishPacket() [4/5]
Aws::Crt::Mqtt5::PublishPacket::PublishPacket |
( |
const PublishPacket & |
| ) |
|
|
delete |
◆ PublishPacket() [5/5]
Aws::Crt::Mqtt5::PublishPacket::PublishPacket |
( |
PublishPacket && |
| ) |
|
|
deletenoexcept |
◆ getContentType()
Property specifying the content type of the payload. Not internally meaningful to MQTT5.
See MQTT5 Content Type
- Returns
- ByteCursor to opaque binary data to the content type of the payload.
◆ getCorrelationData()
Opaque binary data used to correlate between publish messages, as a potential method for request-response implementation. Not internally meaningful to MQTT5.
See MQTT5 Correlation Data
- Returns
- ByteCursor to opaque binary data used to correlate between publish messages.
◆ getMessageExpiryIntervalSec()
const Crt::Optional< uint32_t > & Aws::Crt::Mqtt5::PublishPacket::getMessageExpiryIntervalSec |
( |
| ) |
const |
|
noexcept |
Sent publishes - indicates the maximum amount of time allowed to elapse for message delivery before the server should instead delete the message (relative to a recipient).
Received publishes - indicates the remaining amount of time (from the server's perspective) before the message would have been deleted relative to the subscribing client.
If left null, indicates no expiration timeout.
See MQTT5 Message Expiry Interval
- Returns
- The message expiry interval associated with this PUBLISH packet.
◆ getPayload()
const ByteCursor & Aws::Crt::Mqtt5::PublishPacket::getPayload |
( |
| ) |
const |
|
noexcept |
◆ getPayloadFormatIndicator()
Property specifying the format of the payload data. The mqtt5 client does not enforce or use this value in a meaningful way.
See MQTT5 Payload Format Indicator
- Returns
- Property specifying the format of the payload data.
◆ getQOS()
Mqtt5::QOS Aws::Crt::Mqtt5::PublishPacket::getQOS |
( |
| ) |
const |
|
noexcept |
Sent publishes - The MQTT quality of service level this message should be delivered with.
Received publishes - The MQTT quality of service level this message was delivered at.
See MQTT5 QoS
- Returns
- The MQTT quality of service associated with this PUBLISH packet.
◆ getResponseTopic()
Opaque topic string intended to assist with request/response implementations. Not internally meaningful to MQTT5 or this client.
See MQTT5 Response Topic
- Returns
- ByteCursor to topic string intended to assist with request/response implementations.
◆ getRetain()
bool Aws::Crt::Mqtt5::PublishPacket::getRetain |
( |
| ) |
const |
|
noexcept |
True if this is a retained message, false otherwise.
Always set on received publishes.
See MQTT5 Retain
- Returns
- True if this is a retained message, false otherwise.
◆ getSubscriptionIdentifiers()
const Crt::Vector< uint32_t > & Aws::Crt::Mqtt5::PublishPacket::getSubscriptionIdentifiers |
( |
| ) |
const |
|
noexcept |
Sent publishes - ignored
Received publishes - the subscription identifiers of all the subscriptions this message matched.
See MQTT5 Subscription Identifier
- Returns
- the subscription identifiers of all the subscriptions this message matched.
◆ getTopic()
const Crt::String & Aws::Crt::Mqtt5::PublishPacket::getTopic |
( |
| ) |
const |
|
noexcept |
Sent publishes - The topic this message should be published to.
Received publishes - The topic this message was published to.
See MQTT5 Topic Name
- Returns
- The topic associated with this PUBLISH packet.
◆ getTopicAlias()
const Crt::Optional< uint16_t > & Aws::Crt::Mqtt5::PublishPacket::getTopicAlias |
( |
| ) |
const |
|
noexcept |
Sent publishes - Topic alias to use, if possible, when encoding this packet. Only used if the client's outbound topic aliasing mode is set to Manual.
Received publishes - topic alias used by the server when transmitting the publish to the client.
See MQTT5 Topic Alias
- Returns
- the topic alias, if any, associated with this PUBLISH packet
◆ getType()
PacketType Aws::Crt::Mqtt5::PublishPacket::getType |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getUserProperties()
List of MQTT5 user properties included with the packet.
See MQTT5 User Property
- Returns
- List of MQTT5 user properties included with the packet.
◆ initializeRawOptions()
bool Aws::Crt::Mqtt5::PublishPacket::initializeRawOptions |
( |
aws_mqtt5_packet_publish_view & |
raw_options | ) |
|
|
noexcept |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ WithCorrelationData()
Sets the opaque binary data used to correlate between publish messages, as a potential method for request-response implementation. Not internally meaningful to MQTT5.
See MQTT5 Correlation Data
- Parameters
-
correlationData | Opaque binary data used to correlate between publish messages |
- Returns
- The PublishPacket Object after setting the correlation data.
◆ WithMessageExpiryIntervalSec()
PublishPacket & Aws::Crt::Mqtt5::PublishPacket::WithMessageExpiryIntervalSec |
( |
uint32_t |
second | ) |
|
|
noexcept |
Sets the maximum amount of time allowed to elapse for message delivery before the server should instead delete the message (relative to a recipient).
See MQTT5 Message Expiry Interval
- Parameters
-
second | The maximum amount of time allowed to elapse for message delivery before the server should instead delete the message (relative to a recipient). |
- Returns
- The PublishPacket Object after setting the message expiry interval.
◆ WithPayload()
Sets the payload for the publish message.
See MQTT5 Publish Payload
- Parameters
-
payload | The payload for the publish message. |
- Returns
- The PublishPacket Object after setting the payload.
◆ WithPayloadFormatIndicator()
Sets the property specifying the format of the payload data. The mqtt5 client does not enforce or use this value in a meaningful way.
See MQTT5 Payload Format Indicator
- Parameters
-
payloadFormat | Property specifying the format of the payload data |
- Returns
- The PublishPacket Object after setting the payload format.
◆ WithQOS()
Sets the MQTT quality of service level the message should be delivered with.
See MQTT5 QoS
- Parameters
-
packetQOS | The MQTT quality of service level the message should be delivered with. |
- Returns
- The PublishPacket Object after setting the QOS.
◆ WithResponseTopic()
Sets the opaque topic string intended to assist with request/response implementations. Not internally meaningful to MQTT5 or this client.
See MQTT5 Response Topic
- Parameters
-
- Returns
- The PublishPacket Object after setting the response topic.
◆ WithRetain()
PublishPacket & Aws::Crt::Mqtt5::PublishPacket::WithRetain |
( |
bool |
retain | ) |
|
|
noexcept |
Sets if this should be a retained message.
See MQTT5 Retain
- Parameters
-
retain | if this is a retained message. |
- Returns
- The PublishPacket Object after setting the retain setting.
◆ WithTopic()
Sets the topic this message should be published to. See MQTT5 Topic Name
- Parameters
-
topic | The topic this message should be published to. |
- Returns
- The PublishPacket Object after setting the topic.
◆ WithTopicAlias()
PublishPacket & Aws::Crt::Mqtt5::PublishPacket::WithTopicAlias |
( |
uint16_t |
topicAlias | ) |
|
|
noexcept |
Sets the opic alias to use, if possible, when encoding this packet. Only used if the client's outbound topic aliasing mode is set to Manual.
See MQTT5 Topic Alias
◆ WithUserProperties() [1/2]
Sets the list of MQTT5 user properties included with the packet.
See MQTT5 User Property
- Parameters
-
userProperties | List of MQTT5 user properties included with the packet. |
- Returns
- The PublishPacket Object after setting the user properties
◆ WithUserProperties() [2/2]
Sets the list of MQTT5 user properties included with the packet.
See MQTT5 User Property
- Parameters
-
userProperties | List of MQTT5 user properties included with the packet. |
- Returns
- The PublishPacket Object after setting the user properties
◆ WithUserProperty()
Put a MQTT5 user property to the back of the packet user property vector/list
See MQTT5 User Property
- Parameters
-
property | set of userProperty of MQTT5 user properties included with the packet. |
- Returns
- The PublishPacket Object after setting the user property
The documentation for this class was generated from the following files: