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

Resume OTA agent operations .

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;
}
OTA_Resume
OtaErr_t OTA_Resume(void)
Resume OTA agent operations .
Definition: ota.c:3398
OtaAgentEventStart
@ OtaAgentEventStart
Start the OTA state machine.
Definition: ota_private.h:346
OtaErr_t
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
OTA_SignalEvent
bool OTA_SignalEvent(const OtaEventMsg_t *const pEventMsg)
Signal event to the OTA Agent task.
Definition: ota.c:2921
OtaErrUninitialized
@ OtaErrUninitialized
The error code has not yet been set by a logic path.
Definition: ota.h:81
OtaEventMsg_t::eventId
OtaEvent_t eventId
Definition: ota_private.h:436
OtaErrNone
@ OtaErrNone
No error occurred during the operation.
Definition: ota.h:80
OtaEventMsg_t
Stores information about the event message.
Definition: ota_private.h:434
OTA_GetState
OtaState_t OTA_GetState(void)
Get the current state of the OTA agent.
Definition: ota.c:3215