Macros and APIs for ota-unicast-bootloader server. More...

Macros

#define EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_MAX_STACK_ERRORS 8
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 4
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 250
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 during an image distribution process to retrieve a contiguous segment of the image being distributed. More...
void emberAfPluginOtaUnicastBootloaderServerImageDistributionCompleteCallback ( EmberAfOtaUnicastBootloaderStatus status)
A callback invoked 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 when a bootload request process has completed. More...

Detailed Description

Macros and APIs for ota-unicast-bootloader server.

License

Copyright 2018 Silicon Laboratories Inc. www.silabs.com

The licensor of this software is Silicon Laboratories Inc. Your use of this software is governed by the terms of Silicon Labs Master Software License Agreement (MSLA) available at www.silabs.com/about-us/legal/master-software-license-agreement. This software is distributed to you in Source Code format and is governed by the sections of the MSLA applicable to Source Code.

See ota-unicast-bootloader-server.h for source code.

Macro Definition Documentation

#define EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_MAX_STACK_ERRORS 8

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 34 of file ota-unicast-bootloader-server.h .

#define EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_MAX_UNICAST_ERRORS 4

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 40 of file ota-unicast-bootloader-server.h .

#define EMBER_AF_PLUGIN_OTA_UNICAST_BOOTLOADER_SERVER_RESPONSE_TIMEOUT_MS 250

The time in milliseconds after which the server gives up waiting for a response from a client.

Definition at line 46 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:
bool emberAfPluginOtaUnicastBootloaderServerGetImageSegmentCallback ( uint32_t startIndex,
uint32_t endIndex,
uint8_t imageTag,
uint8_t * imageSegment
)

A callback invoked during an image distribution process to retrieve a contiguous segment of the image being distributed.

Parameters
[in] startIndex The index of the first byte the application should copy into the passed array.
[in] endIndex The index of the last byte the application should copy into the passed array.
[in] imageTag A 1-byte tag of the image for which a segment is requested.
[out] 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 server shall abort the ongoing distribution process.
void emberAfPluginOtaUnicastBootloaderServerImageDistributionCompleteCallback ( EmberAfOtaUnicastBootloaderStatus status )

A callback invoked when the image distribution process is terminated.

Parameters
[in] status An EmberAfOtaUnicastBootloaderStatus value of:
EmberAfOtaUnicastBootloaderStatus emberAfPluginOtaUnicastBootloaderServerInitiateImageDistribution ( EmberNodeId targetId,
uint32_t imageSize,
uint8_t imageTag
)

Initiates the image distribution process.

Parameters
[in] targetId The target’s short ID of the image distribution process
[in] imageSize The image size in bytes to be distributed.
[in] 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:
void emberAfPluginOtaUnicastBootloaderServerRequestTargetBootloadCompleteCallback ( EmberAfOtaUnicastBootloaderStatus status )

A callback invoked when a bootload request process has completed.

Parameters
[in] status An EmberAfOtaUnicastBootloaderStatus value of:
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
[in] bootloadDelayMs The delay in milliseconds after which all the targets should perform an image bootload.
[in] imageTag A 1-byte tag that identifies the image to be bootloaded at the target device.
[in] targetId
Returns
An EmberAfOtaUnicastBootloaderStatus value of: