AWS IoT Over-the-air Update v3.4.0
Client library for AWS IoT OTA
ota_mqtt_interface.h File Reference

Contains OTA MQTT Statuses, function type definitions and mqtt interface structure. More...

#include <stddef.h>
#include <stdint.h>
Include dependency graph for ota_mqtt_interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  OtaMqttInterface_t
 OTA Event Interface structure. More...
 

Typedefs

typedef OtaMqttStatus_t(* OtaMqttSubscribe_t) (const char *pTopicFilter, uint16_t topicFilterLength, uint8_t ucQoS)
 Subscribe to the Mqtt topics. More...
 
typedef OtaMqttStatus_t(* OtaMqttUnsubscribe_t) (const char *pTopicFilter, uint16_t topicFilterLength, uint8_t ucQoS)
 Unsubscribe to the Mqtt topics. More...
 
typedef OtaMqttStatus_t(* OtaMqttPublish_t) (const char *const pacTopic, uint16_t usTopicLen, const char *pcMsg, uint32_t ulMsgSize, uint8_t ucQoS)
 Publish message to a topic. More...
 

Enumerations

enum  OtaMqttStatus_t { OtaMqttSuccess = 0 , OtaMqttPublishFailed = 0xa0 , OtaMqttSubscribeFailed , OtaMqttUnsubscribeFailed }
 The OTA MQTT interface return status. More...
 

Detailed Description

Contains OTA MQTT Statuses, function type definitions and mqtt interface structure.

Typedef Documentation

◆ OtaMqttSubscribe_t

typedef OtaMqttStatus_t(* OtaMqttSubscribe_t) (const char *pTopicFilter, uint16_t topicFilterLength, uint8_t ucQoS)

Subscribe to the Mqtt topics.

This function subscribes to the Mqtt topics with the Quality of service received as parameter. This function also registers a callback for the topicfilter.

Parameters
[pTopicFilter]Mqtt topic filter.
[topicFilterLength]Length of the topic filter.
[ucQoS]Quality of Service
Returns
OtaMqttSuccess if success , other error code on failure.

◆ OtaMqttUnsubscribe_t

typedef OtaMqttStatus_t(* OtaMqttUnsubscribe_t) (const char *pTopicFilter, uint16_t topicFilterLength, uint8_t ucQoS)

Unsubscribe to the Mqtt topics.

This function unsubscribes to the Mqtt topics with the Quality of service received as parameter.

Parameters
[pTopicFilter]Mqtt topic filter.
[topicFilterLength]Length of the topic filter.
[ucQoS]Quality of Service
Returns
OtaMqttSuccess if success , other error code on failure.

◆ OtaMqttPublish_t

typedef OtaMqttStatus_t(* OtaMqttPublish_t) (const char *const pacTopic, uint16_t usTopicLen, const char *pcMsg, uint32_t ulMsgSize, uint8_t ucQoS)

Publish message to a topic.

This function publishes a message to a given topic & QoS.

Parameters
[pacTopic]Mqtt topic filter.
[usTopicLen]Length of the topic filter.
[pcMsg]Message to publish.
[ulMsgSize]Message size.
[ucQoS]Quality of Service
Returns
OtaMqttSuccess if success , other error code on failure.