Upgrade Policy API
The Upgrade Policy API allows us to specify wether we can perform upgrades or downgrades. The upgrade policy object is created using the UpgradePolicyBuilder, by specifying setAllowUpgrade (to allow upgrades), setAllowDowngrade (to allow downgrades) and setAllowAllUpgrades (to allow all OTA upgrades and downgrades on all devices, as aligned with the ZigBee specification).
By enabling setAllowAllUpgrades, upgrades or downgrades could start automatically if initiated by the end device. If setAllowAllUpgrades is disabled, upgrades or downgrades can only start if initiated by coordinator (using startOtaUpgrade method). By default AllowUpgrade is true, AllowDowngrade is false, and AllowAllUpgrades is false.
Below shows how to apply the upgrade policy.
UpgradePolicyBuilder builder = new UpgradePolicyBuilder();
// allowUpgrade can be true or false
builder.setAllowUpgrade(allowUpgrade);
// allowUpgrade can be true or false
builder.setAllowDowngrade(allowDowngrade);
// allowAllUpgrades can be true or false
builder.setAllowAllUpgrades(allowAllUpgrades);
UpgradePolicy policy = builder.create();
gw.getInternalOtaHandler().setOtaUpgradePolicy(policy);
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.