AWS IoT Over-the-air Update  v3.1.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 )
OtaMqttInterface_t::publish
OtaMqttPublish_t publish
Interface for publishing MQTT messages.
Definition: ota_mqtt_interface.h:165
OtaMqttInterface_t::unsubscribe
OtaMqttUnsubscribe_t unsubscribe
interface for unsubscribing to MQTT topics.
Definition: ota_mqtt_interface.h:164
OtaMqttInterface_t::subscribe
OtaMqttSubscribe_t subscribe
Interface for subscribing to Mqtt topics.
Definition: ota_mqtt_interface.h:163
OtaInterfaces_t
OTA Interface for referencing different components.
Definition: ota.h:257
OtaMqttInterface_t
OTA Event Interface structure.
Definition: ota_mqtt_interface.h:162
OTA_Init
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:3062
OtaInterfaces_t::mqtt
OtaMqttInterface_t mqtt
MQTT interface that references the publish subscribe methods and callbacks.
Definition: ota.h:259