MeterLogger
|
Go to the source code of this file.
Macros | |
#define | MQTT_MAX_FIXED_HEADER_SIZE 3 |
Enumerations | |
enum | mqtt_connect_flag { MQTT_CONNECT_FLAG_USERNAME = 1 << 7, MQTT_CONNECT_FLAG_PASSWORD = 1 << 6, MQTT_CONNECT_FLAG_WILL_RETAIN = 1 << 5, MQTT_CONNECT_FLAG_WILL = 1 << 2, MQTT_CONNECT_FLAG_CLEAN_SESSION = 1 << 1 } |
#define MQTT_MAX_FIXED_HEADER_SIZE 3 |
Definition at line 35 of file mqtt_msg.c.
Referenced by fini_message(), and init_message().
enum mqtt_connect_flag |
Enumerator | |
---|---|
MQTT_CONNECT_FLAG_USERNAME | |
MQTT_CONNECT_FLAG_PASSWORD | |
MQTT_CONNECT_FLAG_WILL_RETAIN | |
MQTT_CONNECT_FLAG_WILL | |
MQTT_CONNECT_FLAG_CLEAN_SESSION |
Definition at line 37 of file mqtt_msg.c.
struct __attribute | ( | (__packed__) | ) |
Definition at line 46 of file mqtt_msg.c.
|
static |
Definition at line 76 of file mqtt_msg.c.
References mqtt_connection::buffer, mqtt_connection::buffer_length, mqtt_message::length, mqtt_connection::message, and mqtt_connection::message_id.
Referenced by mqtt_msg_puback(), mqtt_msg_pubcomp(), mqtt_msg_publish(), mqtt_msg_pubrec(), mqtt_msg_pubrel(), mqtt_msg_subscribe(), and mqtt_msg_unsubscribe().
|
static |
Definition at line 63 of file mqtt_msg.c.
References mqtt_connection::buffer, mqtt_connection::buffer_length, mqtt_message::length, memcpy, and mqtt_connection::message.
Referenced by mqtt_msg_connect(), mqtt_msg_publish(), mqtt_msg_subscribe(), and mqtt_msg_unsubscribe().
|
static |
Definition at line 98 of file mqtt_msg.c.
References mqtt_connection::buffer, mqtt_message::data, mqtt_message::length, and mqtt_connection::message.
Referenced by mqtt_msg_connect(), mqtt_msg_puback(), mqtt_msg_pubcomp(), mqtt_msg_publish(), mqtt_msg_pubrec(), mqtt_msg_pubrel(), mqtt_msg_subscribe(), and mqtt_msg_unsubscribe().
|
static |
Definition at line 105 of file mqtt_msg.c.
References mqtt_connection::buffer, mqtt_message::data, mqtt_message::length, mqtt_connection::message, and MQTT_MAX_FIXED_HEADER_SIZE.
Referenced by mqtt_msg_connect(), mqtt_msg_disconnect(), mqtt_msg_pingreq(), mqtt_msg_pingresp(), mqtt_msg_puback(), mqtt_msg_pubcomp(), mqtt_msg_publish(), mqtt_msg_pubrec(), mqtt_msg_pubrel(), mqtt_msg_subscribe(), and mqtt_msg_unsubscribe().
|
static |
Definition at line 92 of file mqtt_msg.c.
References mqtt_message::length, mqtt_connection::message, and MQTT_MAX_FIXED_HEADER_SIZE.
Referenced by mqtt_msg_connect(), mqtt_msg_disconnect(), mqtt_msg_pingreq(), mqtt_msg_pingresp(), mqtt_msg_puback(), mqtt_msg_pubcomp(), mqtt_msg_publish(), mqtt_msg_pubrec(), mqtt_msg_pubrel(), mqtt_msg_subscribe(), and mqtt_msg_unsubscribe().
uint16_t ICACHE_FLASH_ATTR mqtt_get_id | ( | uint8_t * | buffer, |
uint16_t | length | ||
) |
Definition at line 229 of file mqtt_msg.c.
References mqtt_get_qos(), mqtt_get_type(), MQTT_MSG_TYPE_PUBACK, MQTT_MSG_TYPE_PUBCOMP, MQTT_MSG_TYPE_PUBLISH, MQTT_MSG_TYPE_PUBREC, MQTT_MSG_TYPE_PUBREL, MQTT_MSG_TYPE_SUBACK, MQTT_MSG_TYPE_SUBSCRIBE, and MQTT_MSG_TYPE_UNSUBACK.
Referenced by mqtt_get_retain(), mqtt_send_keepalive(), MQTT_Task(), mqtt_tcpclient_connect_cb(), and mqtt_tcpclient_recv().
const char* ICACHE_FLASH_ATTR mqtt_get_publish_data | ( | uint8_t * | buffer, |
uint16_t * | length | ||
) |
Definition at line 183 of file mqtt_msg.c.
References mqtt_get_qos(), and NULL.
Referenced by deliver_publish(), and mqtt_get_retain().
const char* ICACHE_FLASH_ATTR mqtt_get_publish_topic | ( | uint8_t * | buffer, |
uint16_t * | length | ||
) |
Definition at line 154 of file mqtt_msg.c.
References NULL.
Referenced by deliver_publish(), and mqtt_get_retain().
int ICACHE_FLASH_ATTR mqtt_get_total_length | ( | uint8_t * | buffer, |
uint16_t | length | ||
) |
Definition at line 135 of file mqtt_msg.c.
Referenced by mqtt_get_retain(), and mqtt_tcpclient_recv().
mqtt_message_t* ICACHE_FLASH_ATTR mqtt_msg_connect | ( | mqtt_connection_t * | connection, |
mqtt_connect_info_t * | info | ||
) |
Definition at line 291 of file mqtt_msg.c.
References append_string(), mqtt_connection::buffer, mqtt_connection::buffer_length, mqtt_connect_info::clean_session, mqtt_connect_info::client_id, fail_message(), fini_message(), init_message(), mqtt_connect_info::keepalive, mqtt_message::length, memcpy, mqtt_connection::message, MQTT_CONNECT_FLAG_CLEAN_SESSION, MQTT_CONNECT_FLAG_PASSWORD, MQTT_CONNECT_FLAG_USERNAME, MQTT_CONNECT_FLAG_WILL, MQTT_CONNECT_FLAG_WILL_RETAIN, MQTT_MSG_TYPE_CONNECT, NULL, mqtt_connect_info::password, strlen, mqtt_connect_info::username, mqtt_connect_info::will_message, mqtt_connect_info::will_qos, mqtt_connect_info::will_retain, and mqtt_connect_info::will_topic.
Referenced by mqtt_get_retain(), and mqtt_tcpclient_connect_cb().
mqtt_message_t* ICACHE_FLASH_ATTR mqtt_msg_disconnect | ( | mqtt_connection_t * | connection | ) |
Definition at line 483 of file mqtt_msg.c.
References fini_message(), init_message(), and MQTT_MSG_TYPE_DISCONNECT.
Referenced by mqtt_get_retain().
void ICACHE_FLASH_ATTR mqtt_msg_init | ( | mqtt_connection_t * | connection, |
uint8_t * | buffer, | ||
uint16_t | buffer_length | ||
) |
Definition at line 128 of file mqtt_msg.c.
References mqtt_connection::buffer, mqtt_connection::buffer_length, and memset.
Referenced by mqtt_get_retain(), MQTT_InitClient(), and mqtt_tcpclient_connect_cb().
mqtt_message_t* ICACHE_FLASH_ATTR mqtt_msg_pingreq | ( | mqtt_connection_t * | connection | ) |
Definition at line 471 of file mqtt_msg.c.
References fini_message(), init_message(), and MQTT_MSG_TYPE_PINGREQ.
Referenced by mqtt_get_retain(), MQTT_Ping(), and mqtt_send_keepalive().
mqtt_message_t* ICACHE_FLASH_ATTR mqtt_msg_pingresp | ( | mqtt_connection_t * | connection | ) |
Definition at line 477 of file mqtt_msg.c.
References fini_message(), init_message(), and MQTT_MSG_TYPE_PINGRESP.
Referenced by mqtt_get_retain(), and mqtt_tcpclient_recv().
mqtt_message_t* ICACHE_FLASH_ATTR mqtt_msg_puback | ( | mqtt_connection_t * | connection, |
uint16_t | message_id | ||
) |
Definition at line 403 of file mqtt_msg.c.
References append_message_id(), fail_message(), fini_message(), init_message(), and MQTT_MSG_TYPE_PUBACK.
Referenced by mqtt_get_retain(), and mqtt_tcpclient_recv().
mqtt_message_t* ICACHE_FLASH_ATTR mqtt_msg_pubcomp | ( | mqtt_connection_t * | connection, |
uint16_t | message_id | ||
) |
Definition at line 427 of file mqtt_msg.c.
References append_message_id(), fail_message(), fini_message(), init_message(), and MQTT_MSG_TYPE_PUBCOMP.
Referenced by mqtt_get_retain(), and mqtt_tcpclient_recv().
mqtt_message_t* ICACHE_FLASH_ATTR mqtt_msg_publish | ( | mqtt_connection_t * | connection, |
const char * | topic, | ||
const char * | data, | ||
int | data_length, | ||
int | qos, | ||
int | retain, | ||
uint16_t * | message_id | ||
) |
Definition at line 377 of file mqtt_msg.c.
References append_message_id(), append_string(), mqtt_connection::buffer, mqtt_connection::buffer_length, fail_message(), fini_message(), init_message(), mqtt_message::length, memcpy, mqtt_connection::message, MQTT_MSG_TYPE_PUBLISH, NULL, and strlen.
Referenced by mqtt_get_retain(), and MQTT_Publish().
mqtt_message_t* ICACHE_FLASH_ATTR mqtt_msg_pubrec | ( | mqtt_connection_t * | connection, |
uint16_t | message_id | ||
) |
Definition at line 411 of file mqtt_msg.c.
References append_message_id(), fail_message(), fini_message(), init_message(), and MQTT_MSG_TYPE_PUBREC.
Referenced by mqtt_get_retain(), and mqtt_tcpclient_recv().
mqtt_message_t* ICACHE_FLASH_ATTR mqtt_msg_pubrel | ( | mqtt_connection_t * | connection, |
uint16_t | message_id | ||
) |
Definition at line 419 of file mqtt_msg.c.
References append_message_id(), fail_message(), fini_message(), init_message(), and MQTT_MSG_TYPE_PUBREL.
Referenced by mqtt_get_retain(), and mqtt_tcpclient_recv().
mqtt_message_t* ICACHE_FLASH_ATTR mqtt_msg_subscribe | ( | mqtt_connection_t * | connection, |
const char * | topic, | ||
int | qos, | ||
uint16_t * | message_id | ||
) |
Definition at line 435 of file mqtt_msg.c.
References append_message_id(), append_string(), mqtt_connection::buffer, mqtt_connection::buffer_length, fail_message(), fini_message(), init_message(), mqtt_message::length, mqtt_connection::message, MQTT_MSG_TYPE_SUBSCRIBE, NULL, and strlen.
Referenced by mqtt_get_retain(), and MQTT_Subscribe().
mqtt_message_t* ICACHE_FLASH_ATTR mqtt_msg_unsubscribe | ( | mqtt_connection_t * | connection, |
const char * | topic, | ||
uint16_t * | message_id | ||
) |
Definition at line 455 of file mqtt_msg.c.
References append_message_id(), append_string(), fail_message(), fini_message(), init_message(), MQTT_MSG_TYPE_UNSUBSCRIBE, NULL, and strlen.
Referenced by mqtt_get_retain(), and MQTT_UnSubscribe().