OTA Bootload Client Callbacks

Functions

bool emberZclOtaBootloadClientSetVersionInfoCallback ()
 
bool emberZclOtaBootloadClientServerHasStaticAddressCallback (EmberZclOtaBootloadClientServerInfo_t *serverInfo)
 
bool emberZclOtaBootloadClientServerHasDnsNameCallback (EmberZclOtaBootloadClientServerInfo_t *serverInfo)
 
bool emberZclOtaBootloadClientServerHasDiscByClusterId (const EmberZclClusterSpec_t *clusterSpec, EmberCoapResponseHandler responseHandler)
 
bool emberZclOtaBootloadClientExpectSecureOta ()
 
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
fileSpecThe specification for the OTA file in question.
statusThe 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 emberZclOtaBootloadClientExpectSecureOta ( )

Determine expected server connection security

Returns
true if the specification requires a DTLS connection to the server
bool emberZclOtaBootloadClientGetQueryNextImageParametersCallback ( EmberZclOtaBootloadFileSpec_t fileSpec,
EmberZclOtaBootloadHardwareVersion_t hardwareVersion 
)

Get the parameters for a QueryNextImage command.

Parameters
fileSpecThe OTA file specification to include in the query.
hardwareVersionThe 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
fileSpecThe 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
serverInfoInformation 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
clusterSpecserver specifications
responseHandlerfunction 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
serverInfoUpdated 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
serverInfoStructure 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
fileSpecThe specification for the OTA file to potentially be downloaded.
existingFileA 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