OTA Bootload Server Callbacks
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
-
addressAddress to which to send the ImageNotify command fileSpecThe OTA file specification data contained in the ImageNotify command payload. See OTA specification for more details.
- Returns
-
trueif the ImageNotify command should be sent,falseotherwise.
- Note
-
If
falseis 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
-
currentFileSpecThe current file spec from the QueryNextImage command nextFileSpecThe next file spec to be downloaded by the client
- Returns
-
One of the following
EmberZclStatus_t
values.
- EMBER_ZCL_STATUS_SUCCESS if the server should tell the client to start downloading the OTA file described by the nextFileSpec data
- EMBER_ZCL_STATUS_NO_IMAGE_AVAILABLE if there is no image available for the client to download
- EMBER_ZCL_STATUS_NOT_AUTHORIZED if the client is not authorized to download the next image
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
-
sourceThe source address of the OTA client that has completed a download fileSpecThe file specification of the OTA file that the client has downloaded statusThe 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.