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

MQTT SUBSCRIBE packet (v5) More...

#include <v5_subscribe.hpp>

Public Member Functions

 basic_subscribe_packet (packet_id_t packet_id, std::vector< topic_subopts > params, properties props={})
 constructor
 
std::vector< as::const_buffer > const_buffer_sequence () const
 Create const buffer sequence it is for boost asio APIs.
 
std::size_t size () const
 Get packet size.
 
std::size_t num_of_const_buffer_sequence () const
 Get number of element of const_buffer_sequence.
 
packet_id_t packet_id () const
 Get packet_id.
 
std::vector< topic_subopts > constentries () const
 Get entries.
 
properties constprops () const
 

Detailed Description

template<std::size_t PacketIdBytes>
class async_mqtt::v5::basic_subscribe_packet< PacketIdBytes >

MQTT SUBSCRIBE packet (v5)

Template Parameters
PacketIdBytessize of packet_id

MQTT SUBSCRIBE packet.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901161

Constructor & Destructor Documentation

◆ basic_subscribe_packet()

template<std::size_t PacketIdBytes>
async_mqtt::v5::basic_subscribe_packet< PacketIdBytes >::basic_subscribe_packet ( packet_id_t packet_id,
std::vector< topic_subopts > params,
properties props = {} )
inline

constructor

Parameters
packet_idMQTT PacketIdentifier.the packet_id must be acquired by basic_endpoint::acquire_unique_packet_id().
paramssubscribe entries.
propsproperties.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901164

Member Function Documentation

◆ const_buffer_sequence()

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

Create const buffer sequence it is for boost asio APIs.

Returns
const buffer sequence

◆ entries()

template<std::size_t PacketIdBytes>
std::vector< topic_subopts > const & async_mqtt::v5::basic_subscribe_packet< PacketIdBytes >::entries ( ) const
inline

Get entries.

Returns
entries

◆ num_of_const_buffer_sequence()

template<std::size_t PacketIdBytes>
std::size_t async_mqtt::v5::basic_subscribe_packet< PacketIdBytes >::num_of_const_buffer_sequence ( ) const
inline

Get number of element of const_buffer_sequence.

Returns
number of element of const_buffer_sequence

◆ packet_id()

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

Get packet_id.

Returns
packet_id

◆ props()

template<std::size_t PacketIdBytes>
properties const & async_mqtt::v5::basic_subscribe_packet< PacketIdBytes >::props ( ) const
inline

@breif Get properties

Returns
properties

◆ size()

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

Get packet size.

Returns
packet size

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