async_mqtt 5.0.0
Loading...
Searching...
No Matches
async_mqtt::basic_store_packet_variant< PacketIdBytes > Class Template Reference

MQTT packet variant for store. More...

#include <store_packet_variant.hpp>

Public Member Functions

 basic_store_packet_variant (v3_1_1::basic_publish_packet< PacketIdBytes > packet)
 constructor
 
 basic_store_packet_variant (v3_1_1::basic_pubrel_packet< PacketIdBytes > packet)
 constructor
 
 basic_store_packet_variant (v5::basic_publish_packet< PacketIdBytes > packet)
 constructor
 
 basic_store_packet_variant (v5::basic_pubrel_packet< PacketIdBytes > packet)
 constructor
 
template<typename Func >
auto visit (Func &&func) const &
 visit to variant
 
template<typename Func >
auto visit (Func &&func) &
 visit to variant
 
template<typename Func >
auto visit (Func &&func) &&
 visit to variant
 
std::vector< as::const_buffer > const_buffer_sequence () const
 Create const buffer sequence it is for boost asio APIs.
 
packet_id_t packet_id () const
 Get packet id.
 
std::size_t size () const
 Get packet size.
 
std::uint32_t get_message_expiry_interval () const
 
void update_message_expiry_interval (std::uint32_t val) const
 
response_packet response_packet_type () const
 Get response packet type corresponding to this packet.
 

Detailed Description

template<std::size_t PacketIdBytes>
class async_mqtt::basic_store_packet_variant< PacketIdBytes >

MQTT packet variant for store.

Template Parameters
PacketIdBytesMQTT spec is 2. You can use store_packet_variant for that.

Constructor & Destructor Documentation

◆ basic_store_packet_variant() [1/4]

template<std::size_t PacketIdBytes>
async_mqtt::basic_store_packet_variant< PacketIdBytes >::basic_store_packet_variant ( v3_1_1::basic_publish_packet< PacketIdBytes > packet)
inline

constructor

Parameters
packetPUBLISH packet QoS1 or 2

◆ basic_store_packet_variant() [2/4]

template<std::size_t PacketIdBytes>
async_mqtt::basic_store_packet_variant< PacketIdBytes >::basic_store_packet_variant ( v3_1_1::basic_pubrel_packet< PacketIdBytes > packet)
inline

constructor

Parameters
packetPUBREL packet

◆ basic_store_packet_variant() [3/4]

template<std::size_t PacketIdBytes>
async_mqtt::basic_store_packet_variant< PacketIdBytes >::basic_store_packet_variant ( v5::basic_publish_packet< PacketIdBytes > packet)
inline

constructor

Parameters
packetPUBLISH packet QoS1 or 2

◆ basic_store_packet_variant() [4/4]

template<std::size_t PacketIdBytes>
async_mqtt::basic_store_packet_variant< PacketIdBytes >::basic_store_packet_variant ( v5::basic_pubrel_packet< PacketIdBytes > packet)
inline

constructor

Parameters
packetPUBREL packet

Member Function Documentation

◆ const_buffer_sequence()

template<std::size_t PacketIdBytes>
std::vector< as::const_buffer > async_mqtt::basic_store_packet_variant< PacketIdBytes >::const_buffer_sequence ( ) const
inline

Create const buffer sequence it is for boost asio APIs.

Returns
const buffer sequence

◆ get_message_expiry_interval()

template<std::size_t PacketIdBytes>
std::uint32_t async_mqtt::basic_store_packet_variant< PacketIdBytes >::get_message_expiry_interval ( ) const
inline

@breif Get MessageExpiryInterval property value

Returns
message_expiry_interval

◆ packet_id()

template<std::size_t PacketIdBytes>
packet_id_t async_mqtt::basic_store_packet_variant< PacketIdBytes >::packet_id ( ) const
inline

Get packet id.

Returns
packet_id

◆ response_packet_type()

template<std::size_t PacketIdBytes>
response_packet async_mqtt::basic_store_packet_variant< PacketIdBytes >::response_packet_type ( ) const
inline

Get response packet type corresponding to this packet.

Returns
response_packet

◆ size()

template<std::size_t PacketIdBytes>
std::size_t async_mqtt::basic_store_packet_variant< PacketIdBytes >::size ( ) const
inline

Get packet size.

Returns
packet size

◆ update_message_expiry_interval()

template<std::size_t PacketIdBytes>
void async_mqtt::basic_store_packet_variant< PacketIdBytes >::update_message_expiry_interval ( std::uint32_t val) const
inline

@breif Update MessageExpiryInterval property

Parameters
valmessage_expiry_interval

◆ visit() [1/3]

template<std::size_t PacketIdBytes>
template<typename Func >
auto async_mqtt::basic_store_packet_variant< PacketIdBytes >::visit ( Func && func) &
inline

visit to variant

Parameters
funcVisitor function

◆ visit() [2/3]

template<std::size_t PacketIdBytes>
template<typename Func >
auto async_mqtt::basic_store_packet_variant< PacketIdBytes >::visit ( Func && func) &&
inline

visit to variant

Parameters
funcVisitor function

◆ visit() [3/3]

template<std::size_t PacketIdBytes>
template<typename Func >
auto async_mqtt::basic_store_packet_variant< PacketIdBytes >::visit ( Func && func) const &
inline

visit to variant

Parameters
funcVisitor function

The documentation for this class was generated from the following files: