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

MQTT PUBREC packet (v5) More...

#include <v5_pubrec.hpp>

Public Member Functions

 basic_pubrec_packet (packet_id_t packet_id, pubrec_reason_code reason_code, properties props)
 constructor
 
 basic_pubrec_packet (packet_id_t packet_id)
 constructor
 
 basic_pubrec_packet (packet_id_t packet_id, pubrec_reason_code reason_code)
 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.
 
constexpr 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.
 
pubrec_reason_code code () const
 
properties constprops () const
 

Detailed Description

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

MQTT PUBREC packet (v5)

Template Parameters
PacketIdBytessize of packet_id

If basic_endpoint::set_auto_pub_response() is called with true, then this packet is automatically sent when PUBLISH (QoS2) v5::basic_publish_packet is received.

When the packet is received with error reason_code, the packet_id is automatically released and become reusable.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901131

Constructor & Destructor Documentation

◆ basic_pubrec_packet() [1/3]

template<std::size_t PacketIdBytes>
async_mqtt::v5::basic_pubrec_packet< PacketIdBytes >::basic_pubrec_packet ( packet_id_t packet_id,
pubrec_reason_code reason_code,
properties props )
inline

constructor

Parameters
packet_idMQTT PacketIdentifier that is corresponding to the PUBLISH(QoS2) packet
reason_codePubcompReasonCode
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901134
propsproperties.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901135

◆ basic_pubrec_packet() [2/3]

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

constructor

Parameters
packet_idMQTT PacketIdentifier that is corresponding to the PUBLISH(QoS2) packet

◆ basic_pubrec_packet() [3/3]

template<std::size_t PacketIdBytes>
async_mqtt::v5::basic_pubrec_packet< PacketIdBytes >::basic_pubrec_packet ( packet_id_t packet_id,
pubrec_reason_code reason_code )
inline

constructor

Parameters
packet_idMQTT PacketIdentifier that is corresponding to the PUBLISH(QoS2) packet
reason_codePubcompReasonCode
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901134

Member Function Documentation

◆ code()

template<std::size_t PacketIdBytes>
pubrec_reason_code async_mqtt::v5::basic_pubrec_packet< PacketIdBytes >::code ( ) const
inline

@breif Get reason code

Returns
reason_code

◆ const_buffer_sequence()

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

Create const buffer sequence it is for boost asio APIs.

Returns
const buffer sequence

◆ num_of_const_buffer_sequence()

template<std::size_t PacketIdBytes>
constexpr std::size_t async_mqtt::v5::basic_pubrec_packet< PacketIdBytes >::num_of_const_buffer_sequence ( ) const
inlineconstexpr

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_pubrec_packet< PacketIdBytes >::packet_id ( ) const
inline

Get packet_id.

Returns
packet_id

◆ props()

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

@breif Get properties

Returns
properties

◆ size()

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

Get packet size.

Returns
packet size

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