Functions

bool emberZclOtaBootloadServerGetImageNotifyInfoCallback ( EmberIpv6Address *address, EmberZclOtaBootloadFileSpec_t *fileSpec)
EmberZclStatus_t emberZclOtaBootloadServerGetNextImageCallback (const EmberIpv6Address *source, const EmberZclOtaBootloadFileSpec_t *currentFileSpec, EmberZclOtaBootloadFileSpec_t *nextFileSpec)
uint32_t emberZclOtaBootloadServerUpgradeEndRequestCallback (const EmberIpv6Address *source, const EmberZclOtaBootloadFileSpec_t *fileSpec, EmberZclStatus_t status)

Detailed Description

These callbacks are contributed by the OTA Bootload Server plugin.

Function Documentation

bool emberZclOtaBootloadServerGetImageNotifyInfoCallback ( EmberIpv6Address * address,
EmberZclOtaBootloadFileSpec_t * fileSpec
)

Get the information needed to send an ImageNotify command.

Parameters
address Address to which to send the ImageNotify command
fileSpec The OTA file specification data contained in the ImageNotify command payload. See OTA specification for more details.
Returns
true if the ImageNotify command should be sent, false otherwise.
Note
If false is returned, then the ImageNotify command will be rescheduled to be sent at a later time.
EmberZclStatus_t emberZclOtaBootloadServerGetNextImageCallback ( const EmberIpv6Address * source,
const EmberZclOtaBootloadFileSpec_t * currentFileSpec,
EmberZclOtaBootloadFileSpec_t * nextFileSpec
)

Get the next OTA file to send in response to a QueryNextImage command.

Parameters
currentFileSpec The current file spec from the QueryNextImage command
nextFileSpec The next file spec to be downloaded by the client
Returns
One of the following EmberZclStatus_t values.

References EMBER_ZCL_STATUS_NO_IMAGE_AVAILABLE .

uint32_t emberZclOtaBootloadServerUpgradeEndRequestCallback ( const EmberIpv6Address * source,
const EmberZclOtaBootloadFileSpec_t * fileSpec,
EmberZclStatus_t status
)

Get the status to send to an OTA client after a download has completed.

Parameters
source The source address of the OTA client that has completed a download
fileSpec The file specification of the OTA file that the client has downloaded
status The status reported by the client upon completing the download
Returns
The time at which the client should upgrade to the newly downloaded image.
Note
This callback is called regardless of whether or not the client completed the download successfully. If the status parameter is not equal to EMBER_ZCL_STATUS_SUCCESS , then the server will not tell the client to proceed with the upgrade.