async_mqtt 9.0.1
Loading...
Searching...
No Matches
MQTT packets
Collaboration diagram for MQTT packets:

Topics

 protocol version 3.1.1
 
 protocol version 5.0
 
 implementation class
 
 variant class for all packets
 

Classes

struct  async_mqtt::basic_packet_id_type< PacketIdBytes >
 packet idenfitifer type class template More...
 
class  async_mqtt::topic_sharename
 topic and sharename More...
 
class  async_mqtt::topic_subopts
 subsscription entry More...
 

Typedefs

using async_mqtt::packet_id_type = typename basic_packet_id_type<2>::type
 packet idenfitifer type
 
template<template< typename... > typename Container, typename Buffer >
using async_mqtt::packet_iterator = as::buffers_iterator<Container<Buffer>>
 iterator type of buffer sequence
 

Enumerations

enum class  async_mqtt::control_packet_type : std::uint8_t {
  control_packet_type::connect = 0b00010000 , control_packet_type::connack = 0b00100000 , control_packet_type::publish = 0b00110000 , control_packet_type::puback = 0b01000000 ,
  control_packet_type::pubrec = 0b01010000 , control_packet_type::pubrel = 0b01100000 , control_packet_type::pubcomp = 0b01110000 , control_packet_type::subscribe = 0b10000000 ,
  control_packet_type::suback = 0b10010000 , control_packet_type::unsubscribe = 0b10100000 , control_packet_type::unsuback = 0b10110000 , control_packet_type::pingreq = 0b11000000 ,
  control_packet_type::pingresp = 0b11010000 , control_packet_type::disconnect = 0b11100000 , control_packet_type::auth = 0b11110000
}
 MQTT control packet type. More...
 

Functions

constexpr char const * async_mqtt::control_packet_type_to_str (control_packet_type v)
 stringize control_packet_type
 
std::ostream & async_mqtt::operator<< (std::ostream &o, control_packet_type v)
 output to the stream
 
template<typename Packet >
hex_dump_t< Packet > async_mqtt::hex_dump (Packet const &p)
 hexdump the packet. Usage. std::cout << hex_dump(p) << std::endl;
 
template<template< typename... > typename Container, typename Buffer >
std::pair< packet_iterator< Container, Buffer >, packet_iterator< Container, Buffer > > async_mqtt::make_packet_range (Container< Buffer > const &cbs)
 create packet iterator range
 
template<template< typename... > typename Container, typename Buffer >
std::string async_mqtt::to_string (Container< Buffer > const &cbs)
 convert buffer sequence to the string
 

Detailed Description

Typedef Documentation

◆ packet_id_type

packet idenfitifer type

Requirements

◆ packet_iterator

template<template< typename... > typename Container, typename Buffer >
using async_mqtt::packet_iterator = as::buffers_iterator<Container<Buffer>>

iterator type of buffer sequence

Requirements

Enumeration Type Documentation

◆ control_packet_type

enum class async_mqtt::control_packet_type : std::uint8_t
strong

MQTT control packet type.

Requirements

Enumerator
connect 

CONNECT(1)

connack 

CONNACK(2)

publish 

PUBLISH(3)

puback 

PUBACK(4)

pubrec 

PUBREC(5)

pubrel 

PUBREL(6)

pubcomp 

PUBCOMP(7)

subscribe 

SUBSCRIBE(8)

suback 

SUBACK(9)

unsubscribe 

UNSUBSCRIBE(10)

unsuback 

UNSUBACK(11)

pingreq 

PINGREQ(12)

pingresp 

PINGRESP(13)

disconnect 

DISCONNECT(14)

auth 

AUTH(15)

Function Documentation

◆ control_packet_type_to_str()

char const * async_mqtt::control_packet_type_to_str ( control_packet_type v)
constexpr

stringize control_packet_type

Parameters
vtarget
Returns
control_packet_type

Requirements

◆ hex_dump()

template<typename Packet >
hex_dump_t< Packet > async_mqtt::hex_dump ( Packet const & p)

hexdump the packet. Usage. std::cout << hex_dump(p) << std::endl;

Parameters
ppacket to dump. p must be valid packet. packet_variant system_error cannot be accepted.
Returns
id

Requirements

◆ make_packet_range()

template<template< typename... > typename Container, typename Buffer >
std::pair< packet_iterator< Container, Buffer >, packet_iterator< Container, Buffer > > async_mqtt::make_packet_range ( Container< Buffer > const & cbs)

create packet iterator range

Parameters
cbscollection of th buffer
Returns
the pair of packet_iterator

Requirements

◆ operator<<()

std::ostream & async_mqtt::operator<< ( std::ostream & o,
control_packet_type v )
inline

output to the stream

Parameters
ooutput stream
vtarget
Returns
output stream

Requirements

◆ to_string()

template<template< typename... > typename Container, typename Buffer >
std::string async_mqtt::to_string ( Container< Buffer > const & cbs)

convert buffer sequence to the string

Parameters
cbscollection of th buffer
Returns
string that all buffers are concatenated

Requirements