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.
mqttInterface.
publish = mqttPublish;
....
otaInterfaces.
mqtt = mqttInterface
....
&otaInterfaces,
( CLIENT_IDENTIFIER ),
otaAppCallback )
OtaErr_t OTA_Init(OtaAppBuffer_t *pOtaBuffer, OtaInterfaces_t *pOtaInterfaces, const uint8_t *pThingName, OtaAppCallback_t OtaAppCallback)
OTA Agent initialization function.
Definition: ota.c:3063
OTA Interface for referencing different components.
Definition: ota.h:253
OtaMqttInterface_t mqtt
MQTT interface that references the publish subscribe methods and callbacks.
Definition: ota.h:255
OTA Event Interface structure.
Definition: ota_mqtt_interface.h:156
OtaMqttPublish_t publish
Interface for publishing MQTT messages.
Definition: ota_mqtt_interface.h:159
OtaMqttSubscribe_t subscribe
Interface for subscribing to Mqtt topics.
Definition: ota_mqtt_interface.h:157
OtaMqttUnsubscribe_t unsubscribe
interface for unsubscribing to MQTT topics.
Definition: ota_mqtt_interface.h:158