Functions

bool emberZclOtaBootloadClientSetVersionInfoCallback ()
bool emberZclOtaBootloadClientServerHasStaticAddressCallback ( EmberZclOtaBootloadClientServerInfo_t *serverInfo)
bool emberZclOtaBootloadClientServerHasDnsNameCallback ( EmberZclOtaBootloadClientServerInfo_t *serverInfo)
bool emberZclOtaBootloadClientServerHasDiscByClusterId (const EmberZclClusterSpec_t *clusterSpec, EmberCoapResponseHandler responseHandler)
bool emberZclOtaBootloadClientServerDiscoveredCallback (const EmberZclOtaBootloadClientServerInfo_t *serverInfo)
bool emberZclOtaBootloadClientGetQueryNextImageParametersCallback ( EmberZclOtaBootloadFileSpec_t *fileSpec, EmberZclOtaBootloadHardwareVersion_t *hardwareVersion)
bool emberZclOtaBootloadClientStartDownloadCallback (const EmberZclOtaBootloadFileSpec_t *fileSpec, bool existingFile)
EmberZclStatus_t emberZclOtaBootloadClientDownloadCompleteCallback (const EmberZclOtaBootloadFileSpec_t *fileSpec, EmberZclStatus_t status)
void emberZclOtaBootloadClientPreBootloadCallback (const EmberZclOtaBootloadFileSpec_t *fileSpec)

Detailed Description

These callbacks are contributed by the OTA Bootload Client plugin.

Function Documentation

EmberZclStatus_t emberZclOtaBootloadClientDownloadCompleteCallback ( const EmberZclOtaBootloadFileSpec_t * fileSpec,
EmberZclStatus_t status
)

An OTA file has been downloaded and verified, or failed to do one of the two.

Parameters
fileSpec The specification for the OTA file in question.
status The status of file download and verification.
Returns
A status based on the application's analysis of the downloaded file. This is an opportunity for the application to verify the downloaded image and return a related status.
See also
emberZclOtaBootloadStorageFind
bool emberZclOtaBootloadClientGetQueryNextImageParametersCallback ( EmberZclOtaBootloadFileSpec_t * fileSpec,
EmberZclOtaBootloadHardwareVersion_t * hardwareVersion
)

Get the parameters for a QueryNextImage command.

Parameters
fileSpec The OTA file specification to include in the query.
hardwareVersion The current hardware version of the device, or EMBER_ZCL_OTA_BOOTLOAD_HARDWARE_VERSION_NULL if this information is to be ignored.
Returns
true if the device should continue to send a QueryNextImage command, or false if it should reschedule the command for a later time.
void emberZclOtaBootloadClientPreBootloadCallback ( const EmberZclOtaBootloadFileSpec_t * fileSpec )

An OTA file is about to be installed.

Parameters
fileSpec The specification for the OTA file that will be installed.
See also
emberZclOtaBootloadStorageFind
bool emberZclOtaBootloadClientServerDiscoveredCallback ( const EmberZclOtaBootloadClientServerInfo_t * serverInfo )

A potential OTA Server has been discovered.

Parameters
serverInfo Information about the discovered OTA Server device.
Returns
true if the device should be chosen as the OTA Server, false otherwise.
Note
If true is returned, the OTA Client state machine will move to the next state, which is querying the OTA Server device for a new OTA file to download. If false is returned, the OTA Client will continue to try to discover an OTA Server.
bool emberZclOtaBootloadClientServerHasDiscByClusterId ( const EmberZclClusterSpec_t * clusterSpec,
EmberCoapResponseHandler responseHandler
)

Initiate a server discovery

Parameters
clusterSpec server specifications
responseHandler function to handle the response to the CoAP message
Returns
true if the specification is valid and the request has been sent
Note
If true is returned, the OTA Client state machine will wait until the responseHandler is called

References emberZclDiscByClusterId() .

bool emberZclOtaBootloadClientServerHasDnsNameCallback ( EmberZclOtaBootloadClientServerInfo_t * serverInfo )

Start a DNS hostname resolution

Parameters
serverInfo Updated to the default server parameters
Returns
true if the device should use the DNS hostname for the OTA Server
Note
If true is returned, the OTA Client state machine will wait for the DNS hostname to be resolved.
bool emberZclOtaBootloadClientServerHasStaticAddressCallback ( EmberZclOtaBootloadClientServerInfo_t * serverInfo )

Check to see if a static IP address should be used for the OTA server

Parameters
serverInfo Structure to store the OTA server parameters
Returns
true if the device should use a static address for the OTA Server
Note
If true is returned, the OTA Client state machine will move to the next state, which is querying the OTA Server device for a new OTA file to download. If false is returned, the OTA Client will continue to try to discover an OTA Server.
bool emberZclOtaBootloadClientSetVersionInfoCallback ( )

This function attempts to set the cluster attribute values to those in the policy parameters. The attributes affected are 'OTA Current File Version', 'Manufacturer ID', and 'Image Type ID'.

Returns
true if there was an error setting one of the attributes
bool emberZclOtaBootloadClientStartDownloadCallback ( const EmberZclOtaBootloadFileSpec_t * fileSpec,
bool existingFile
)

A download of an OTA file can be started.

Parameters
fileSpec The specification for the OTA file to potentially be downloaded.
existingFile A file with this same specification currently exists in OTA storage.
Returns
true if the device should kick off the download process for this file, or false if it should continue to query for new images.
See also
emberZclOtaBootloadStorageFind