Summary of Methods

Below is the summary of the methods available in the OTA API.

 

registerOtaFile

Registers an OTA file on the server if an OTA server exists. Returns true if it was successfully registered and false if it was not successful. Below is how the function is called:

Gateway gw = ... gw.registerOtaFile(otaFilePath, connectionInfo);

deregisterOtaFile

Deregisters an OTA file from the server if an OTA server exists. Returns true if it was successfully deregistered and false if it was not successful. Below is how the function is called:

Gateway gw = ... gw.deregisterOtaFile(otaFileName, connectionInfo);

getRegisteredOtaFiles.

Gets the registered OTA files on the server if an OTA server exists. Returns a list of String containing the OTA file names. Below is how the function is called:

Gateway gw = ... List<String> registeredOtaFiles = gw.getRegisteredOtaFiles(connectionInfo);

startOtaUpgrade

Notifies the remote device that an OTA image is available for upgrade. Returns true if OTA image notification is sent out successfully; false otherwise. Below is how the function is called:

abortOtaUpgrade

Aborts an on going OTA upgrade. Returns true if aborting OTA upgrade is sent out successfully; false otherwise. Below is how the function is called:

registerOtaProgressHandler

Registers the OTA upgrade progress handler, which displays the upgrade progress. Below is how the function is called:

deregisterOtaProgressHandler

Deregisters the OTA upgrade progress handler, which stops displaying upgrade progress. Below is how the function is called:

setOtaUpgradePolicy

Sets the OTA upgrade policy of the OTA server using the UpgradePolicy class. The upgrade policy object is created using the UpgradePolicyBuilder, by specifying setAllowUpgrade (i.e. allowing upgrades), setAllowDowngrade (i.e. allowing downgrades), and setAllowAllUpgrades (i.e. specifies if OTA upgrade or downgrade is allowed on all devices, as aligned with the ZigBee specification). By setting allow all upgrades, upgrades or downgrades could start automatically if initiated by the end device. If allow all upgrades is not set, upgrades or downgrades can only start if initiated by the gateway (using startOtaUpgrade method). By default AllowUpgrade is true, AllowDowngrade is false, and AllowAllUpgrades is false. Below is how the function is called:

pauseOtaUpgrade

Pauses an on-going OTA upgrade. Below is how the function is called:

unpauseOtaUpgrade

Unpauses a paused OTA upgrade. Below is how the function is called:

setRateLimitPolicy

Allows you to limit the rate of the OTA upgrades by defining the upgrade interval and upgrade delay. The rate limit policy can be created in two ways, either by defining the upgrade delay and upgrade speed like below:

Or by defining the upgrade delay and upgrade interval between every upgrade frame like below:

resetRateLimitPolicy

Reset the rate limit policy of the OTA upgrade to default.

 

Legal Notices

Copyright © 2020 MMB Networks, Inc. All rights reserved.
Confidential materials prepared and delivered by MMB Networks for receipt and review only by any partner subject to a valid and enforceable MMB Networks confidentiality agreement. Any receipt, review, or misuse of any of the content exchanged hereunder by any party not a party to this confidential exchange shall be subject to any and all rights available under the law. All rights, title and interest to the materials shall remain with MMB Networks.
Any suggestions provided to MMB Networks with respect to MMB Networks' products or services shall be collectively deemed “Feedback.” You, on behalf of yourself, or if you are providing Feedback on behalf of your employer or another entity, represent and warrant that you have full legal authority to bind such entity to these terms, agree to grant and hereby grant to MMB Networks a nonexclusive, perpetual, irrevocable, royalty free, worldwide license to use and otherwise exploit such Feedback within any MMB Networks products and services.