Configuration header file.
bool MQTT_isStarted()
Check if MQTT is initialized and has started.
bool MQTT_subscribe(char *pTopicStr, uint8_t qos_e)
Subscribe to a give topic.
bool MQTT_isConnected()
Check if MQTT is connected to broker.
bool MQTT_close()
Close and terminate MQTT connection.
bool MQTT_init(mqttConfig_st *ps_config)
Initialize MQTT library with given MQTT configuration.
mqttStates_et
Definition: lib_mqtt.h:19
@ STATE_MQTT_DISCONNECTED
Definition: lib_mqtt.h:22
@ STATE_MQTT_IDLE
Definition: lib_mqtt.h:20
@ STATE_MQTT_START
Definition: lib_mqtt.h:21
@ STATE_MQTT_ABORT
Definition: lib_mqtt.h:24
@ STATE_MQTT_CONNECTED
Definition: lib_mqtt.h:23
bool MQTT_read(mqttMsg_st *ps_msg)
Read the received message received.
void MQTT_printStatus()
Print the status of MQTT library.
mqttWrtStatus_et
Definition: lib_mqtt.h:33
void MQTT_sync()
Run MQTT library, this function should be called periodically by the application.
uint8_t MQTT_availableToRead()
Check is messages are available on subsribed topics. The library maintains a buffer to store received...
bool MQTT_publish(mqttMsg_st *ps_msg)
Publish a given message.
MQTT message header file.
MQTT configuration structure.
Definition: lib_mqtt.h:44
char * pUserNameStr
Definition: lib_mqtt.h:47
char * pPasswordStr
Definition: lib_mqtt.h:48
char * pCertStr
Definition: lib_mqtt.h:46
char * pUriStr
Definition: lib_mqtt.h:45
Structure to represent MQTT message.
Definition: lib_msg.h:48