AWS IoT C++ SDK
|
Last Will and Testament Definition. More...
#include <Common.hpp>
Public Member Functions | |
WillOptions (bool is_retained, QoS qos, std::unique_ptr< Utf8String > p_topic_name, util::String &message) | |
Constructor. More... | |
WillOptions (WillOptions &&)=default | |
WillOptions & | operator= (WillOptions &&) &=default |
WillOptions (const WillOptions &source) | |
WillOptions & | operator= (const WillOptions &source) & |
size_t | Length () |
Get length of Will Options message. More... | |
void | WriteToBuffer (util::String &buf) |
Serialize and write Will Options to provided buffer. More... | |
void | SetConnectFlags (unsigned char &p_flag) |
Set Connect flags in the provided buffer based on Will Options instance. More... | |
Static Public Member Functions | |
static std::unique_ptr< WillOptions > | Create (bool is_retained, QoS qos, std::unique_ptr< Utf8String > p_topic_name, util::String &message) |
Factory method to Create a Will Options instance. More... | |
Defining a type for the MQTT "Last Will and Testament" (LWT) parameters.
awsiotsdk::mqtt::WillOptions::WillOptions | ( | bool | is_retained, |
QoS | qos, | ||
std::unique_ptr< Utf8String > | p_topic_name, | ||
util::String & | message | ||
) |
is_retained | - MQTT Is Retained flag |
qos | - QoS for the Will Message |
p_topic_name | - Topic name on which to publish the will message |
p_message | - Payload of the message to publish |
|
static |
is_retained | - MQTT Is Retained flag |
qos | - QoS for the Will Message |
p_topic_name | - Topic name on which to publish the will message |
p_message | - Payload of the message to publish |
size_t awsiotsdk::mqtt::WillOptions::Length | ( | ) |
void awsiotsdk::mqtt::WillOptions::SetConnectFlags | ( | unsigned char & | p_flag | ) |
p_flag | Target buffer |
void awsiotsdk::mqtt::WillOptions::WriteToBuffer | ( | util::String & | buf | ) |
buf | - Reference to target buffer |