|
AWS IoT for ESP32 v1.0.0
An ESP-IDF based solution
|
MQTT library header file. More...
Go to the source code of this file.
Data Structures | |
| struct | mqttConfig_st |
| MQTT configuration structure. More... | |
Enumerations | |
| enum | mqttStates_et { STATE_MQTT_IDLE , STATE_MQTT_START , STATE_MQTT_DISCONNECTED , STATE_MQTT_CONNECTED , STATE_MQTT_ABORT , STATE_MQTT_MAX } |
| enum | mqttWrtStatus_et |
Functions | |
| bool | MQTT_init (mqttConfig_st *ps_config) |
| Initialize MQTT library with given MQTT configuration. More... | |
| void | MQTT_sync () |
| Run MQTT library, this function should be called periodically by the application. More... | |
| bool | MQTT_isConnected () |
| Check if MQTT is connected to broker. More... | |
| bool | MQTT_isStarted () |
| Check if MQTT is initialized and has started. More... | |
| bool | MQTT_close () |
| Close and terminate MQTT connection. More... | |
| bool | MQTT_subscribe (char *pTopicStr, uint8_t qos_e) |
| Subscribe to a give topic. More... | |
| bool | MQTT_publish (mqttMsg_st *ps_msg) |
| Publish a given message. More... | |
| uint8_t | MQTT_availableToRead () |
| Check is messages are available on subsribed topics. The library maintains a buffer to store received messages. More... | |
| bool | MQTT_read (mqttMsg_st *ps_msg) |
| Read the received message received. More... | |
| void | MQTT_printStatus () |
| Print the status of MQTT library. More... | |
MQTT library header file.
| enum mqttStates_et |
| enum mqttWrtStatus_et |
An enum to represent MQTT status.
| uint8_t MQTT_availableToRead | ( | ) |
Check is messages are available on subsribed topics. The library maintains a buffer to store received messages.
| none |
| bool MQTT_close | ( | ) |
Close and terminate MQTT connection.
| none |
| true | if closed successfully |
| false | if failed to close |
| bool MQTT_init | ( | mqttConfig_st * | ps_config | ) |
Initialize MQTT library with given MQTT configuration.
| [in] | ps_config | MQTT configuration |
| true | on success |
| false | on failure |
| bool MQTT_isConnected | ( | ) |
Check if MQTT is connected to broker.
| none |
| true | if connected |
| false | if disconnected |
| bool MQTT_isStarted | ( | ) |
Check if MQTT is initialized and has started.
| none |
| true | if MQTT has started |
| false | if MQTT has not started |
| void MQTT_printStatus | ( | ) |
Print the status of MQTT library.
| none |
| bool MQTT_publish | ( | mqttMsg_st * | ps_msg | ) |
Publish a given message.
| [in] | ps_msg | Message to be published |
| true | if published |
| false | on error |
| bool MQTT_read | ( | mqttMsg_st * | ps_msg | ) |
Read the received message received.
| [out] | ps_msg |
| true | on success |
| false | on failure |
| bool MQTT_subscribe | ( | char * | pTopicStr, |
| uint8_t | qos_e | ||
| ) |
Subscribe to a give topic.
| [in] | pTopicStr | Topic to subscribe |
| [in] | qos_e | QOS Level |
| true | subscribed successfully |
| false | failed to subscribe |
| void MQTT_sync | ( | ) |
Run MQTT library, this function should be called periodically by the application.
| none |