AWS IoT Over-the-air Update v3.3.0
Client library for AWS IoT OTA
OTA MQTT Interface

The OTA PAL interface definition.

OTA MQTT Overview

The OTA MQTT interface is a set of APIs that must be implemented by a library to enable the OTA library to connect to AWS IoT and manage notification and request data. The OTA library uses MQTT PUBLISH messages to inform AWS IoT about the job status and receives notifications and datablock over job and stream topics.

The OTA MQTT interface is defined in ota_mqtt_interface.h.

The functions that must be implemented are:

These functions can be grouped into the structure OtaMqttInterface_t and passed to OtaInterfaces_t to represent the MQTT interface.

OtaMqttInterface_t mqttInterface;
mqttInterface.subscribe = mqttSubscribe;
mqttInterface.unsubscribe = mqttUnsubscribe;
mqttInterface.publish = mqttPublish;
....
OtaInterfaces_t otaInterfaces;
otaInterfaces.mqtt = mqttInterface
....
OTA_Init( &otaBuffer,
&otaInterfaces,
( CLIENT_IDENTIFIER ),
otaAppCallback )
OtaErr_t OTA_Init(OtaAppBuffer_t *pOtaBuffer, const OtaInterfaces_t *pOtaInterfaces, const uint8_t *pThingName, OtaAppCallback_t OtaAppCallback)
OTA Agent initialization function.
Definition: ota.c:3075
OTA Interface for referencing different components.
Definition: ota.h:258
OtaMqttInterface_t mqtt
MQTT interface that references the publish subscribe methods and callbacks.
Definition: ota.h:260
OTA Event Interface structure.
Definition: ota_mqtt_interface.h:162
OtaMqttPublish_t publish
Interface for publishing MQTT messages.
Definition: ota_mqtt_interface.h:165
OtaMqttSubscribe_t subscribe
Interface for subscribing to Mqtt topics.
Definition: ota_mqtt_interface.h:163
OtaMqttUnsubscribe_t unsubscribe
interface for unsubscribing to MQTT topics.
Definition: ota_mqtt_interface.h:164