MeterLogger
|
Go to the source code of this file.
Data Structures | |
struct | mqtt_message |
struct | mqtt_connection |
struct | mqtt_connect_info |
Typedefs | |
typedef struct mqtt_message | mqtt_message_t |
typedef struct mqtt_connection | mqtt_connection_t |
typedef struct mqtt_connect_info | mqtt_connect_info_t |
Enumerations | |
enum | mqtt_message_type { MQTT_MSG_TYPE_CONNECT = 1, MQTT_MSG_TYPE_CONNACK = 2, MQTT_MSG_TYPE_PUBLISH = 3, MQTT_MSG_TYPE_PUBACK = 4, MQTT_MSG_TYPE_PUBREC = 5, MQTT_MSG_TYPE_PUBREL = 6, MQTT_MSG_TYPE_PUBCOMP = 7, MQTT_MSG_TYPE_SUBSCRIBE = 8, MQTT_MSG_TYPE_SUBACK = 9, MQTT_MSG_TYPE_UNSUBSCRIBE = 10, MQTT_MSG_TYPE_UNSUBACK = 11, MQTT_MSG_TYPE_PINGREQ = 12, MQTT_MSG_TYPE_PINGRESP = 13, MQTT_MSG_TYPE_DISCONNECT = 14 } |
enum | mqtt_connect_return_code { CONNECTION_ACCEPTED = 0, CONNECTION_REFUSE_PROTOCOL, CONNECTION_REFUSE_ID_REJECTED, CONNECTION_REFUSE_SERVER_UNAVAILABLE, CONNECTION_REFUSE_BAD_USERNAME, CONNECTION_REFUSE_NOT_AUTHORIZED } |
typedef struct mqtt_connect_info mqtt_connect_info_t |
typedef struct mqtt_connection mqtt_connection_t |
typedef struct mqtt_message mqtt_message_t |
Enumerator | |
---|---|
CONNECTION_ACCEPTED | |
CONNECTION_REFUSE_PROTOCOL | |
CONNECTION_REFUSE_ID_REJECTED | |
CONNECTION_REFUSE_SERVER_UNAVAILABLE | |
CONNECTION_REFUSE_BAD_USERNAME | |
CONNECTION_REFUSE_NOT_AUTHORIZED |
Definition at line 69 of file mqtt_msg.h.
enum mqtt_message_type |
Definition at line 51 of file mqtt_msg.h.
|
inlinestatic |
Definition at line 112 of file mqtt_msg.h.
Referenced by mqtt_tcpclient_recv().
|
inlinestatic |
Definition at line 113 of file mqtt_msg.h.
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().
|
inlinestatic |
Definition at line 114 of file mqtt_msg.h.
Referenced by mqtt_get_id(), mqtt_get_publish_data(), and mqtt_tcpclient_recv().
|
inlinestatic |
Definition at line 115 of file mqtt_msg.h.
References mqtt_message::data, ICACHE_FLASH_ATTR, mqtt_message::length, mqtt_get_id(), mqtt_get_publish_data(), mqtt_get_publish_topic(), mqtt_get_total_length(), mqtt_msg_connect(), mqtt_msg_disconnect(), mqtt_msg_init(), 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().
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().
|
inlinestatic |
Definition at line 111 of file mqtt_msg.h.
Referenced by mqtt_get_id(), mqtt_send_keepalive(), MQTT_Task(), mqtt_tcpclient_connect_cb(), 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().