async_mqtt 9.0.1
Loading...
Searching...
No Matches
Collaboration diagram for PUBLISH packet flags:

Classes

struct  async_mqtt::pub::opts
 MQTT PublishOptions. More...
 

Enumerations

enum class  async_mqtt::pub::retain : std::uint8_t { retain::yes = 0b00000001 , retain::no = 0b00000000 }
 MQTT RETAIN. More...
 
enum class  async_mqtt::pub::dup : std::uint8_t { dup::yes = 0b00001000 , dup::no = 0b00000000 }
 MQTT DUP. More...
 

Functions

constexpr bool is_dup (std::uint8_t v)
 Check fixed header is DUP.
 
constexpr qos get_qos (std::uint8_t v)
 Get qos from the fixed header.
 
constexpr bool is_retain (std::uint8_t v)
 Check fixed header is RETAIN.
 
constexpr void set_dup (std::uint8_t &fixed_header, bool dup)
 Set DUP to the fixed header.
 
constexpr char const * retain_to_str (retain v)
 stringize retain
 
std::ostream & operator<< (std::ostream &o, retain v)
 output to the stream
 
constexpr char const * dup_to_str (dup v)
 stringize dup
 
std::ostream & operator<< (std::ostream &o, dup v)
 output to the stream
 

Detailed Description

Enumeration Type Documentation

◆ dup

enum class async_mqtt::pub::dup : std::uint8_t
strong

MQTT DUP.


See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901102

Requirements

Enumerator
yes 

Duplicated.

no 

No Duplicated.

◆ retain

enum class async_mqtt::pub::retain : std::uint8_t
strong

MQTT RETAIN.


See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901104

Requirements

Enumerator
yes 

Retain.

no 

No Retain.

Function Documentation

◆ dup_to_str()

char const * dup_to_str ( dup v)
related

stringize dup

Parameters
vtarget
Returns
dup string

Requirements

◆ get_qos()

qos get_qos ( std::uint8_t v)
related

Get qos from the fixed header.

Parameters
vfixed_header byte
Returns
qos

Requirements

◆ is_dup()

bool is_dup ( std::uint8_t v)
related

Check fixed header is DUP.

Parameters
vfixed_header byte
Returns
If DUP return true, otherwise false.

Requirements

◆ is_retain()

bool is_retain ( std::uint8_t v)
related

Check fixed header is RETAIN.

Parameters
vfixed_header byte
Returns
If RETAIN return true, otherwise false.

Requirements

◆ operator<<() [1/2]

std::ostream & operator<< ( std::ostream & o,
dup v )
related

output to the stream

Parameters
ooutput stream
vtarget
Returns
output stream

Requirements

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream & o,
retain v )
related

output to the stream

Parameters
ooutput stream
vtarget
Returns
output stream

Requirements

◆ retain_to_str()

char const * retain_to_str ( retain v)
related

stringize retain

Parameters
vtarget
Returns
retain string

Requirements

◆ set_dup()

void set_dup ( std::uint8_t & fixed_header,
bool dup )
related

Set DUP to the fixed header.

Parameters
fixed_headerfixed_header byte
dupDUP to set

Requirements