eOTA_ClientUpgradeEndRequest

teZCL_Status eOTA_ClientUpgradeEndRequest(
    uint8 u8SourceEndpoint,
    uint8 u8DestinationEndpoint,
    tsZCL_Address *psDestinationAddress,
    tsOTA_UpgradeEndRequestPayload
    *psUpgradeEndRequestPayload);

Description

This function can be used during an image download to send an Upgrade End Request to the server. This is normally used to indicate that all the image data has been received and that the image has been successfully verified - it is the responsibility of the client to determine when all the image data has been received (using the image size quoted in the original Query Next Image Response) and then to verify the image.

In addition to the status OTA_STATUS_SUCCESS described above, the function can be used by the client to report other conditions to the server:

  • OTA_REQUIRE_MORE_IMAGE: The downloaded image was successfully received and verified, but the client requires multiple images before performing an upgrade

  • OTA_STATUS_INVALID_IMAGE: The downloaded image failed the verification checks and will be discarded

  • OTA_STATUS_ABORT The image download that is currently in progress should be cancelled

In all three of the above cases, the client may then request another download.

When the function is called to report success, an Upgrade End Response will (eventually) be received from the server, indicating when the image upgrade should be implemented (a time delay may be indicated in the response). The arrival of this response will trigger an E_CLD_OTA_COMMAND_UPGRADE_END_RESPONSE event.

Note: The cluster client automatically sends an Upgrade End Request to the server on completion of a download, so it is not normally necessary for the application to call this function.

Parameters

  • u8SourceEndpoint: Number of endpoint (on client) from which the request is sent

  • u8DestinationEndpoint: Number of endpoint (on server) to which the request is sent

  • psDestinationAddress: Pointer to structure containing the address of the target server (see Section 6.1.4)

  • psUpgradeEndRequestPayload: Pointer to structure containing payload for request, including reported status (see Section49.11.11)

Returns

  • E_ZCL_SUCCESS

  • E_ZCL_FAIL

Parent topic:Client Functions