7#if !defined(ASYNC_MQTT_PACKET_V3_1_1_UNSUBACK_HPP)
8#define ASYNC_MQTT_PACKET_V3_1_1_UNSUBACK_HPP
10#include <async_mqtt/buffer_to_packet_variant.hpp>
12#include <async_mqtt/packet/control_packet_type.hpp>
13#include <async_mqtt/packet/packet_id_type.hpp>
15#include <async_mqtt/util/buffer.hpp>
16#include <async_mqtt/util/static_vector.hpp>
28namespace async_mqtt::v3_1_1 {
30namespace as = boost::asio;
49template <std::
size_t PacketIdBytes>
98 template <std::
size_t PacketIdBytesArg>
102#if defined(ASYNC_MQTT_UNIT_TEST_FOR_PACKET)
103 friend struct ::ut_packet::v311_unsuback;
104 friend struct ::ut_packet::v311_unsuback_pid4;
105 friend struct ::ut_packet::v311_unsuback_error;
112 static_vector<char, 2 + PacketIdBytes> all_;
127template <std::
size_t PacketIdBytes>
142template <std::
size_t PacketIdBytes>
157template <std::
size_t PacketIdBytes>
174#if !defined(ASYNC_MQTT_SEPARATE_COMPILATION)
175#include <async_mqtt/packet/impl/v3_1_1_unsuback.ipp>
The varaint type of all packets and system_error.
Definition packet_variant_fwd.hpp:37
buffer that has string_view interface and shared ownership This class is only for advanced usecase su...
Definition buffer.hpp:46
MQTT UNSUBACK packet (v3.1.1)
Definition v3_1_1_unsuback.hpp:50
bool operator==(basic_unsuback_packet< PacketIdBytes > const &lhs, basic_unsuback_packet< PacketIdBytes > const &rhs)
equal operator
static constexpr std::size_t num_of_const_buffer_sequence()
Get number of element of const_buffer_sequence.
Definition v3_1_1_unsuback.hpp:86
bool operator<(basic_unsuback_packet< PacketIdBytes > const &lhs, basic_unsuback_packet< PacketIdBytes > const &rhs)
less than operator
basic_unsuback_packet(typename basic_packet_id_type< PacketIdBytes >::type packet_id)
constructor
std::ostream & operator<<(std::ostream &o, basic_unsuback_packet< PacketIdBytes > const &v)
stream output operator
std::vector< as::const_buffer > const_buffer_sequence() const
Create const buffer sequence it is for boost asio APIs.
basic_packet_id_type< PacketIdBytes >::type packet_id() const
Get packet_id.
std::size_t size() const
Get packet size.
static constexpr control_packet_type type()
Get MQTT control packet type.
Definition v3_1_1_unsuback.hpp:65
sys::error_code error_code
sys is a namespace alias of boost::sytem.
Definition error.hpp:56
protocol_version
MQTT protocol version.
Definition protocol_version.hpp:29
basic_packet_variant< PacketIdBytes > buffer_to_basic_packet_variant(buffer buf, protocol_version ver, error_code &ec)
create basic_packet_variant from the buffer
control_packet_type
MQTT control packet type.
Definition control_packet_type.hpp:26
packet idenfitifer type class template
Definition packet_id_type.hpp:25