async_mqtt 4.1.0
Loading...
Searching...
No Matches
async_mqtt::pub::opts Struct Referencefinal

MQTT PublishOptions. More...

#include <pubopts.hpp>

Public Member Functions

constexpr opts (std::uint8_t value)
 constructor
 
constexpr opts (retain value)
 constructor
 
constexpr opts (dup value)
 constructor
 
constexpr opts (qos value)
 constructor
 
constexpr opts operator| (opts rhs) const
 Combine opts operator.
 
constexpr opts operator| (retain rhs) const
 Combine opts operator.
 
constexpr opts operator| (dup rhs) const
 Combine opts operator.
 
constexpr opts operator| (qos rhs) const
 Combine opts operator.
 
constexpr optsoperator|= (opts rhs)
 Combine opts operator.
 
constexpr optsoperator|= (retain rhs)
 Combine opts operator.
 
constexpr optsoperator|= (dup rhs)
 Combine opts operator.
 
constexpr optsoperator|= (qos rhs)
 Combine opts operator.
 
constexpr retain get_retain () const
 Get retain.
 
constexpr dup get_dup () const
 Get dup.
 
constexpr qos get_qos () const
 Get qos.
 
constexpr operator std::uint8_t () const
 Get byte image.
 
constexpr bool operator== (opts rhs) const
 equal operator
 
constexpr bool operator< (opts rhs) const
 less than operator
 

Related Symbols

(Note that these are not member symbols.)

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 opts operator| (retain lhs, dup rhs)
 Combine opts operator.
 
constexpr opts operator| (retain lhs, qos rhs)
 Combine opts operator.
 
constexpr opts operator| (dup lhs, retain rhs)
 Combine opts operator.
 
constexpr opts operator| (dup lhs, qos rhs)
 Combine opts operator.
 
constexpr opts operator| (qos lhs, retain rhs)
 Combine opts operator.
 
constexpr opts operator| (qos lhs, dup rhs)
 Combine opts operator.
 
constexpr char constretain_to_str (retain v)
 stringize retain
 
std::ostream & operator<< (std::ostream &os, retain val)
 output to the stream retain
 
constexpr char constdup_to_str (dup v)
 stringize dup
 
std::ostream & operator<< (std::ostream &os, dup val)
 output to the stream dup
 

Detailed Description

Constructor & Destructor Documentation

◆ opts() [1/4]

constexpr async_mqtt::pub::opts::opts ( std::uint8_t value)
inlineexplicitconstexpr

constructor

Parameters
valueByte image of the options

◆ opts() [2/4]

constexpr async_mqtt::pub::opts::opts ( retain value)
inlineconstexpr

constructor

Parameters
valueretain

◆ opts() [3/4]

constexpr async_mqtt::pub::opts::opts ( dup value)
inlineconstexpr

constructor

Parameters
valuedup

◆ opts() [4/4]

constexpr async_mqtt::pub::opts::opts ( qos value)
inlineconstexpr

constructor

Parameters
valueqos

Member Function Documentation

◆ get_dup()

constexpr dup async_mqtt::pub::opts::get_dup ( ) const
inlineconstexpr

Get dup.

Returns
dup

◆ get_qos()

constexpr qos async_mqtt::pub::opts::get_qos ( ) const
inlineconstexpr

Get qos.

Returns
qos

◆ get_retain()

constexpr retain async_mqtt::pub::opts::get_retain ( ) const
inlineconstexpr

Get retain.

Returns
retain

◆ operator std::uint8_t()

constexpr async_mqtt::pub::opts::operator std::uint8_t ( ) const
inlineexplicitconstexpr

Get byte image.

Returns
byte image

Friends And Related Symbol Documentation

◆ get_qos()

constexpr qos get_qos ( std::uint8_t v)
related

Get qos from the fixed header.

Parameters
vfixed_header byte
Returns
qos

◆ is_dup()

constexpr bool is_dup ( std::uint8_t v)
related

Check fixed header is DUP.

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

◆ is_retain()

constexpr bool is_retain ( std::uint8_t v)
related

Check fixed header is RETAIN.

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

◆ set_dup()

constexpr 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

The documentation for this struct was generated from the following file: