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

Resume OTA agent operations .

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:79
OtaErr_t OTA_Resume(void)
Resume OTA agent operations .
Definition: ota.c:3411
Returns
OtaErrNone if successful, otherwise an error code prefixed with 'OtaErr' from the list above.

Example Resume the OTA agent after the network errors are resolved.

bool handleReconnect()
{
// OTA event message used for sending event to OTA Agent.
OtaEventMsg_t eventMsg = { 0 };
bool returnStatus = establishConnection();
if( returnStatus == EXIT_SUCCESS )
{
// Check if OTA process was suspended and resume if required.
if( OTA_GetState() == OtaAgentStateSuspended )
{
// Resume OTA operations.
otaErr = OTA_Resume();
}
else
{
// Send start event to OTA Agent.
OTA_SignalEvent( &eventMsg );
}
if( otaErr != OtaErrNone )
returnStatus = false;
}
return returnStatus;
}
@ OtaAgentEventStart
Start the OTA state machine.
Definition: ota_private.h:346
@ OtaErrUninitialized
The error code has not yet been set by a logic path.
Definition: ota.h:81
@ OtaErrNone
No error occurred during the operation.
Definition: ota.h:80
bool OTA_SignalEvent(const OtaEventMsg_t *const pEventMsg)
Signal event to the OTA Agent task.
Definition: ota.c:2934
OtaState_t OTA_GetState(void)
Get the current state of the OTA agent.
Definition: ota.c:3228
Stores information about the event message.
Definition: ota_private.h:430
OtaEvent_t eventId
Definition: ota_private.h:432