MQTT will message.
More...
#include <will.hpp>
MQTT will message.
Thread Safety
- Distinct objects: Safe
- Shared objects: Unsafe
Requirements
◆ will()
template<typename StringViewLikeTopic , typename StringViewLikeMessage , std::enable_if_t< std::is_convertible_v< std::decay_t< StringViewLikeTopic >, std::string_view > &&std::is_convertible_v< std::decay_t< StringViewLikeMessage >, std::string_view >, std::nullptr_t > = nullptr>
async_mqtt::will::will |
( |
StringViewLikeTopic && | topic, |
|
|
StringViewLikeMessage && | message, |
|
|
pub::opts | pubopts = {}, |
|
|
properties | props = {} ) |
|
inlineexplicit |
constructor
- Parameters
-
topic | A topic name to publish as a will |
message | The contents to publish as a will |
pubopts | Qos and retain flag |
props | will properties |
◆ get_qos()
qos async_mqtt::will::get_qos |
( |
| ) |
const |
|
inlineconstexpr |
◆ get_retain()
Get retain.
- Returns
- retain
◆ message()
std::string async_mqtt::will::message |
( |
| ) |
const |
|
inline |
Get message.
- Returns
- message
◆ message_as_buffer() [1/2]
buffer & async_mqtt::will::message_as_buffer |
( |
| ) |
|
|
inline |
Get message as a buffer.
- Returns
- message
◆ message_as_buffer() [2/2]
buffer const & async_mqtt::will::message_as_buffer |
( |
| ) |
const |
|
inline |
Get message as a buffer.
- Returns
- message
◆ props() [1/2]
Get properties.
- Returns
- properties
◆ props() [2/2]
properties const & async_mqtt::will::props |
( |
| ) |
const |
|
inlineconstexpr |
Get properties.
- Returns
- properties
◆ topic()
std::string async_mqtt::will::topic |
( |
| ) |
const |
|
inline |
◆ topic_as_buffer() [1/2]
buffer & async_mqtt::will::topic_as_buffer |
( |
| ) |
|
|
inline |
Get topic as a buffer.
- Returns
- topic
◆ topic_as_buffer() [2/2]
buffer const & async_mqtt::will::topic_as_buffer |
( |
| ) |
const |
|
inline |
Get topic as a buffer.
- Returns
- topic
◆ operator<
bool operator< |
( |
will const & | lhs, |
|
|
will const & | rhs ) |
|
friend |
less than operator
- Parameters
-
lhs | compare target |
rhs | compare target |
- Returns
- true if the lhs less than the rhs, otherwise false.
◆ operator==
bool operator== |
( |
will const & | lhs, |
|
|
will const & | rhs ) |
|
friend |
equal operator
- Parameters
-
lhs | compare target |
rhs | compare target |
- Returns
- true if the lhs equal to the rhs, otherwise false.
The documentation for this class was generated from the following file:
- /home/kondo/work/async_mqtt/include/async_mqtt/packet/will.hpp