Ota Bootloader Server Plugin
Macros |
|
#define | EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_MAX_STACK_ERRORS |
The number of consecutive stack message submission errors or stack related errors such as CCA failures after which the plugin gives up.
More...
|
|
#define | EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_MAX_UNICAST_ERRORS |
The number of consecutive unicast attempts after which a target is declared unreachable. Legal values for this are in the [0,7] range.
More...
|
|
#define | EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_RESPONSE_TIMEOUT_MS |
The time in milliseconds after which the server gives up waiting for a response from a client.
More...
|
|
Functions |
|
EmberAfOtaUnicastBootloaderStatus | emberAfPluginOtaUnicastBootloaderServerInitiateImageDistribution ( EmberNodeId targetId, uint32_t imageSize, uint8_t imageTag) |
Initiates the image distribution process.
More...
|
|
bool | emberAfPluginOtaUnicastBootloaderServerGetImageSegmentCallback (uint32_t startIndex, uint32_t endIndex, uint8_t imageTag, uint8_t *imageSegment) |
A callback invoked by the OTA Unicast Bootloader Server plugin during an image distribution process to retrieve a contiguous segment of the image being distributed.
More...
|
|
void | emberAfPluginOtaUnicastBootloaderServerImageDistributionCompleteCallback ( EmberAfOtaUnicastBootloaderStatus status) |
A callback invoked by the OTA Bootloader Unicast Server plugin when the image distribution process is terminated.
More...
|
|
EmberAfOtaUnicastBootloaderStatus | emberAfPluginUnicastBootloaderServerInitiateRequestTargetBootload (uint32_t bootloadDelayMs, uint8_t imageTag, EmberNodeId targetId) |
Requests a target device to initiate the bootload of a received image at some point in the future.
More...
|
|
EmberAfOtaUnicastBootloaderStatus | emberAfPluginOtaUnicastBootloaderServerAbortCurrentProcess (void) |
Aborts the ongoing process, such as image distribution, status request, or bootload request.
More...
|
|
void | emberAfPluginOtaUnicastBootloaderServerRequestTargetBootloadCompleteCallback ( EmberAfOtaUnicastBootloaderStatus status) |
A callback invoked by the OTA Unicast Bootloader Server plugin when a bootload request process has completed.
More...
|
|
Detailed Description
See
ota-unicast-bootloader-server.h
for source code.
Macro Definition Documentation
#define EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_MAX_STACK_ERRORS |
The number of consecutive stack message submission errors or stack related errors such as CCA failures after which the plugin gives up.
Definition at line
18
of file
ota-unicast-bootloader-server.h
.
#define EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_MAX_UNICAST_ERRORS |
The number of consecutive unicast attempts after which a target is declared unreachable. Legal values for this are in the [0,7] range.
Definition at line
24
of file
ota-unicast-bootloader-server.h
.
#define EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_RESPONSE_TIMEOUT_MS |
The time in milliseconds after which the server gives up waiting for a response from a client.
Definition at line
30
of file
ota-unicast-bootloader-server.h
.
Function Documentation
EmberAfOtaUnicastBootloaderStatus emberAfPluginOtaUnicastBootloaderServerAbortCurrentProcess | ( | void |
|
) |
Aborts the ongoing process, such as image distribution, status request, or bootload request.
- Returns
-
An
EmberAfOtaUnicastBootloaderStatus
value of:
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_SUCCESS if the current ongoing process was successfully aborted.
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_INVALID_CALL if the server is not currently involved in any process.
bool emberAfPluginOtaUnicastBootloaderServerGetImageSegmentCallback | ( | uint32_t |
startIndex,
|
uint32_t |
endIndex,
|
||
uint8_t |
imageTag,
|
||
uint8_t * |
imageSegment
|
||
) |
A callback invoked by the OTA Unicast Bootloader Server plugin during an image distribution process to retrieve a contiguous segment of the image being distributed.
- Parameters
-
startIndex
The index of the first byte the application should copy into the passed array. endIndex
The index of the last byte the application should copy into the passed array. imageTag
A 1-byte tag of the image for which a segment is requested. imageSegment
An array of (endIndex - startIndex + 1) length to which the application should copy the requested image segment.
- Returns
- A boolean indicating whether the application successfully copied the requested bytes into the passed array. If the application returns FALSE, the OTA Unicast Server plugin aborts the ongoing distribution process.
void emberAfPluginOtaUnicastBootloaderServerImageDistributionCompleteCallback | ( | EmberAfOtaUnicastBootloaderStatus |
status
|
) |
A callback invoked by the OTA Bootloader Unicast Server plugin when the image distribution process is terminated.
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_SUCCESS if the target confirms that the full image is received.
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_DATA_UNDERFLOW if the application failed to supply the requested image segments.
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_STACK_ERROR if the server encountered multiple consecutive transmission errors. The Server gives up the image distribution process if EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_MAX_STACK_ERRORS consecutive transmission errors are encountered.
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_FAILED if the distribution process terminated prematurely because the target can't be reached.
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_TIMEOUT if the target has not responded within EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_RESPONSE_TIMEOUT_MS
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_ABORTED if the application aborted the current image distribution process.
EmberAfOtaUnicastBootloaderStatus emberAfPluginOtaUnicastBootloaderServerInitiateImageDistribution | ( | EmberNodeId |
targetId,
|
uint32_t |
imageSize,
|
||
uint8_t |
imageTag
|
||
) |
Initiates the image distribution process.
- Parameters
-
targetId
The target’s short ID of the image distribution process. imageSize
The image size in bytes to be distributed. imageTag
A 1-byte tag that will be embedded in the server-to-client over-the-air messages. The application can use the image tag for versioning purposes and/or for distinguishing between different image types.
- Returns
-
An
EmberAfOtaUnicastBootloaderStatus
value of:
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_BUSY if an image distriution is already in progress
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_INVALID_CALL if the given target or the image size is invalid
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_SUCCESS if the image distribution was successfully initiated.
void emberAfPluginOtaUnicastBootloaderServerRequestTargetBootloadCompleteCallback | ( | EmberAfOtaUnicastBootloaderStatus |
status
|
) |
A callback invoked by the OTA Unicast Bootloader Server plugin when a bootload request process has completed.
- Parameters
-
status
An EmberAfOtaUnicastBootloaderStatus value of: - EMBER_OTA_UNICAST_BOOTLOADER_STATUS_SUCCESS if all the targets have been requested to perform a bootload. Note that some targets might have been declared unreachable.
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_STACK_ERROR if the server encountered multiple consecutive transmission errors. The Server gives up the bootload request process if EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_MAX_STACK_ERRORS consecutive transmission errors are encountered.
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_ABORTED if the application aborted the current bootload request process.
EmberAfOtaUnicastBootloaderStatus emberAfPluginUnicastBootloaderServerInitiateRequestTargetBootload | ( | uint32_t |
bootloadDelayMs,
|
uint8_t |
imageTag,
|
||
EmberNodeId |
targetId
|
||
) |
Requests a target device to initiate the bootload of a received image at some point in the future.
- Parameters
-
bootloadDelayMs
The delay in milliseconds after which all the targets should perform an image bootload. imageTag
A 1-byte tag that identifies the image to be bootloaded at the target device. targetId
- Returns
-
An
EmberAfOtaUnicastBootloaderStatus
value of:
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_SUCCESS if the plugin successfully started the process to request a target and initiate a bootload. If this is the case, the corresponding callback ::emberAfPluginBootloaderServerRequestTargetBootloadCompleteCallback() is invoked when the request process to all targets completed.
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_INVALID_CALL if some of the passed parameters are invalid.
- EMBER_OTA_UNICAST_BOOTLOADER_STATUS_BUSY if the server is currently involved in another over-the-air process.