acl  3.5.3.0
acl::mqtt_suback类 参考

#include <mqtt_suback.hpp>

+ 类 acl::mqtt_suback 继承关系图:
+ acl::mqtt_suback 的协作图:

Public 成员函数

 mqtt_suback (void)
 
 mqtt_suback (const mqtt_header &header)
 
 ~mqtt_suback (void)
 
mqtt_subackset_pkt_id (unsigned short id)
 
mqtt_subackadd_topic_qos (mqtt_qos_t qos)
 
mqtt_subackadd_topic_qos (const std::vector< mqtt_qos_t > &qoses)
 
unsigned short get_pkt_id (void) const
 
const std::vector< mqtt_qos_t > & get_qoses (void) const
 
int update_header_var (const char *data, int dlen)
 
int update_topic_qos (const char *data, int dlen)
 
- Public 成员函数 继承自 acl::mqtt_message
 mqtt_message (mqtt_type_t type)
 
 mqtt_message (const mqtt_header &header)
 
virtual ~mqtt_message (void)
 
mqtt_headerget_header (void)
 
const mqtt_headerget_header (void) const
 

Protected 成员函数

bool to_string (string &out)
 
int update (const char *data, int dlen)
 
bool finished (void) const
 
- Protected 成员函数 继承自 acl::mqtt_message
void pack_add (unsigned char ch, string &out)
 
void pack_add (unsigned short n, string &out)
 
void pack_add (const string &s, string &out)
 
bool unpack_short (const char *data, size_t len, unsigned short &out)
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 acl::mqtt_message
static mqtt_messagecreate_message (const mqtt_header &header)
 
- Protected 属性 继承自 acl::mqtt_message
mqtt_header header_
 

详细描述

mqtt message object for MQTT_SUBACK type.

在文件 mqtt_suback.hpp11 行定义.

构造及析构函数说明

◆ mqtt_suback() [1/2]

acl::mqtt_suback::mqtt_suback ( void  )

constructor for creating MQTT_SUBACK mqtt message object.

参见
mqtt_ack

◆ mqtt_suback() [2/2]

acl::mqtt_suback::mqtt_suback ( const mqtt_header header)

constructor for creating MQTT_SUBACK mqtt message object.

参见
mqtt_ack

◆ ~mqtt_suback()

acl::mqtt_suback::~mqtt_suback ( void  )

成员函数说明

◆ add_topic_qos() [1/2]

mqtt_suback& acl::mqtt_suback::add_topic_qos ( mqtt_qos_t  qos)

add the topic's qos.

参数
qos{mqtt_qos_t}
返回
{mqtt_suback&}

◆ add_topic_qos() [2/2]

mqtt_suback& acl::mqtt_suback::add_topic_qos ( const std::vector< mqtt_qos_t > &  qoses)

add some qoses of topics.

参数
qoses{const std::vector<mqtt_qos_t>&}
返回
{mqtt_suback&}

◆ finished()

bool acl::mqtt_suback::finished ( void  ) const
inlineprotectedvirtual

重载 acl::mqtt_message .

在文件 mqtt_suback.hpp72 行定义.

72  {
73  return finished_;
74  }

◆ get_pkt_id()

unsigned short acl::mqtt_suback::get_pkt_id ( void  ) const
inline

get the messsage's id.

返回
{unsigned short} some error happened if return 0.

在文件 mqtt_suback.hpp52 行定义.

52  {
53  return pkt_id_;
54  }

◆ get_qoses()

const std::vector<mqtt_qos_t>& acl::mqtt_suback::get_qoses ( void  ) const
inline

get all qoses of the topics.

返回
{const std::vector<mqtt_qos_t>&}

在文件 mqtt_suback.hpp60 行定义.

60  {
61  return qoses_;
62  }

◆ set_pkt_id()

mqtt_suback& acl::mqtt_suback::set_pkt_id ( unsigned short  id)

set the messsage's id.

参数
id{unsigned short} should > 0 && <= 65535.
返回
{mqtt_suback&}

◆ to_string()

bool acl::mqtt_suback::to_string ( string out)
protectedvirtual

实现了 acl::mqtt_message.

◆ update()

int acl::mqtt_suback::update ( const char *  data,
int  dlen 
)
protectedvirtual

实现了 acl::mqtt_message.

◆ update_header_var()

int acl::mqtt_suback::update_header_var ( const char *  data,
int  dlen 
)

◆ update_topic_qos()

int acl::mqtt_suback::update_topic_qos ( const char *  data,
int  dlen 
)

该类的文档由以下文件生成: