AWS IoT Over-the-air Update  v2.0.0 (Release Candidate)
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 )
OtaMqttInterface_t::publish
OtaMqttPublish_t publish
Interface for publishing MQTT messages.
Definition: ota_mqtt_interface.h:159
OTA_Init
OtaErr_t OTA_Init(OtaAppBuffer_t *pOtaBuffer, OtaInterfaces_t *pOtaInterfaces, const uint8_t *pThingName, OtaAppCallback_t OtaAppCallback)
OTA Agent initialization function.
Definition: ota.c:3006
OtaMqttInterface_t::unsubscribe
OtaMqttUnsubscribe_t unsubscribe
interface for unsubscribing to MQTT topics.
Definition: ota_mqtt_interface.h:158
OtaMqttInterface_t::subscribe
OtaMqttSubscribe_t subscribe
Interface for subscribing to Mqtt topics.
Definition: ota_mqtt_interface.h:157
OtaInterfaces_t
OTA Interface for referencing different components.
Definition: ota.h:228
OtaMqttInterface_t
OTA Event Interface structure.
Definition: ota_mqtt_interface.h:156
OtaInterfaces_t::mqtt
OtaMqttInterface_t mqtt
MQTT interface that references the publish subscribe methods and callbacks.
Definition: ota.h:230