AWS IoT Over-the-air Update v2.0.0 (Release Candidate)
Client library for AWS IoT OTA
ota_mqtt_private.h
Go to the documentation of this file.
1/*
2 * AWS IoT Over-the-air Update v2.0.0 (Release Candidate)
3 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy of
6 * this software and associated documentation files (the "Software"), to deal in
7 * the Software without restriction, including without limitation the rights to
8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 * the Software, and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 */
22
28#ifndef OTA_MQTT_H
29#define OTA_MQTT_H
30
31/* OTA includes. */
32#include "ota.h"
33#include "ota_private.h"
34
47
60
74
92OtaErr_t decodeFileBlock_Mqtt( const uint8_t * pMessageBuffer,
93 size_t messageSize,
94 int32_t * pFileId,
95 int32_t * pBlockId,
96 int32_t * pBlockSize,
97 uint8_t ** pPayload,
98 size_t * pPayloadSize );
99
112
124OtaErr_t cleanupData_Mqtt( const OtaAgentContext_t * pAgentCtx );
125
144 OtaJobStatus_t status,
145 int32_t reason,
146 int32_t subReason );
147
155const char * OTA_MQTT_strerror( OtaMqttStatus_t status );
156
157#endif /* ifndef OTA_MQTT_H */
OtaErr_t
The OTA API return status. OTA agent error codes are in the upper 8 bits of the 32 bit OTA error word...
Definition: ota.h:73
OtaMqttStatus_t
The OTA MQTT interface return status.
Definition: ota_mqtt_interface.h:82
OTA Agent Interface.
OtaErr_t updateJobStatus_Mqtt(OtaAgentContext_t *pAgentCtx, OtaJobStatus_t status, int32_t reason, int32_t subReason)
Update job status over MQTT.
Definition: ota_mqtt.c:971
OtaErr_t cleanupData_Mqtt(const OtaAgentContext_t *pAgentCtx)
Cleanup related to OTA data plane over MQTT.
Definition: ota_mqtt.c:1267
const char * OTA_MQTT_strerror(OtaMqttStatus_t status)
Status to string conversion for OTA MQTT interface status.
Definition: ota_mqtt.c:1289
OtaErr_t initFileTransfer_Mqtt(OtaAgentContext_t *pAgentCtx)
Initialize file transfer over MQTT.
Definition: ota_mqtt.c:1038
OtaErr_t cleanupControl_Mqtt(const OtaAgentContext_t *pAgentCtx)
Cleanup related to OTA control plane over MQTT.
Definition: ota_mqtt.c:1242
OtaErr_t requestFileBlock_Mqtt(OtaAgentContext_t *pAgentCtx)
Request File block over MQTT.
Definition: ota_mqtt.c:1101
OtaErr_t requestJob_Mqtt(OtaAgentContext_t *pAgentCtx)
Check for available OTA job over MQTT.
Definition: ota_mqtt.c:875
OtaErr_t decodeFileBlock_Mqtt(const uint8_t *pMessageBuffer, size_t messageSize, int32_t *pFileId, int32_t *pBlockId, int32_t *pBlockSize, uint8_t **pPayload, size_t *pPayloadSize)
Decode a cbor encoded fileblock.
Definition: ota_mqtt.c:1203
Macros, enums, variables, and definitions internal to the OTA Agent module and shared by other OTA mo...
OtaJobStatus_t
Gives the status of the job parsing operation.
Definition: ota_private.h:226
The OTA agent is a singleton today. The structure keeps it nice and organized.
Definition: ota.h:265