#include <mqtt_publish.hpp>
mqtt message object for MQTT_PUBLISH type.
在文件 mqtt_publish.hpp 第 10 行定义.
◆ mqtt_publish() [1/2]
acl::mqtt_publish::mqtt_publish |
( |
void |
| ) |
|
constructor for creating MQTT_PUBLISH mqtt message object.
- 参见
- mqtt_message
◆ mqtt_publish() [2/2]
acl::mqtt_publish::mqtt_publish |
( |
const mqtt_header & |
header | ) |
|
constructor for creating MQTT_PUBLISH mqtt message object.
- 参见
- mqtt_message
◆ ~mqtt_publish()
acl::mqtt_publish::~mqtt_publish |
( |
void |
| ) |
|
◆ finished()
bool acl::mqtt_publish::finished |
( |
void |
| ) |
const |
|
inlineprotectedvirtual |
◆ get_payload()
const string& acl::mqtt_publish::get_payload |
( |
void |
| ) |
const |
|
inline |
◆ get_payload_len()
unsigned acl::mqtt_publish::get_payload_len |
( |
void |
| ) |
const |
|
inline |
◆ get_pkt_id()
unsigned short acl::mqtt_publish::get_pkt_id |
( |
void |
| ) |
const |
|
inline |
get the message's id.
- 返回
- {unsigned short} the message will be invalid if return 0.
在文件 mqtt_publish.hpp 第 60 行定义.
◆ get_topic()
const char* acl::mqtt_publish::get_topic |
( |
void |
| ) |
const |
|
inline |
◆ set_payload()
mqtt_publish& acl::mqtt_publish::set_payload |
( |
unsigned |
len, |
|
|
const char * |
data = NULL |
|
) |
| |
set the message payload.
- 参数
-
len | {unsigned} the length of the payload. |
data | {const char*} the payload data. |
- 返回
- {mqtt_publish&}
◆ set_pkt_id()
mqtt_publish& acl::mqtt_publish::set_pkt_id |
( |
unsigned short |
id | ) |
|
set the message id.
- 参数
-
id | {unsigned short} the value must > 0 && <= 65535. |
- 返回
- {mqtt_publish&}
◆ set_topic()
mqtt_publish& acl::mqtt_publish::set_topic |
( |
const char * |
topic | ) |
|
◆ to_string()
bool acl::mqtt_publish::to_string |
( |
string & |
out | ) |
|
|
protectedvirtual |
◆ update()
int acl::mqtt_publish::update |
( |
const char * |
data, |
|
|
int |
dlen |
|
) |
| |
|
protectedvirtual |
◆ update_header_var()
int acl::mqtt_publish::update_header_var |
( |
const char * |
data, |
|
|
int |
dlen |
|
) |
| |
◆ update_payload()
int acl::mqtt_publish::update_payload |
( |
const char * |
data, |
|
|
int |
dlen |
|
) |
| |
◆ update_pktid()
int acl::mqtt_publish::update_pktid |
( |
const char * |
data, |
|
|
int |
dlen |
|
) |
| |
◆ update_topic_len()
int acl::mqtt_publish::update_topic_len |
( |
const char * |
data, |
|
|
int |
dlen |
|
) |
| |
◆ update_topic_val()
int acl::mqtt_publish::update_topic_val |
( |
const char * |
data, |
|
|
int |
dlen |
|
) |
| |
该类的文档由以下文件生成: