zigbee-herdsman 0.50.1 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +4 -2
- package/.prettierrc +9 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +20 -0
- package/dist/adapter/adapter.d.ts +4 -4
- package/dist/adapter/adapter.d.ts.map +1 -1
- package/dist/adapter/adapter.js +8 -13
- package/dist/adapter/adapter.js.map +1 -1
- package/dist/adapter/deconz/adapter/deconzAdapter.d.ts +1 -1
- package/dist/adapter/deconz/adapter/deconzAdapter.d.ts.map +1 -1
- package/dist/adapter/deconz/adapter/deconzAdapter.js +249 -155
- package/dist/adapter/deconz/adapter/deconzAdapter.js.map +1 -1
- package/dist/adapter/deconz/adapter/index.d.ts +1 -1
- package/dist/adapter/deconz/adapter/index.d.ts.map +1 -1
- package/dist/adapter/deconz/adapter/index.js.map +1 -1
- package/dist/adapter/deconz/driver/constants.d.ts +1 -1
- package/dist/adapter/deconz/driver/constants.d.ts.map +1 -1
- package/dist/adapter/deconz/driver/constants.js +7 -7
- package/dist/adapter/deconz/driver/constants.js.map +1 -1
- package/dist/adapter/deconz/driver/driver.d.ts.map +1 -1
- package/dist/adapter/deconz/driver/driver.js +92 -60
- package/dist/adapter/deconz/driver/driver.js.map +1 -1
- package/dist/adapter/deconz/driver/frameParser.d.ts.map +1 -1
- package/dist/adapter/deconz/driver/frameParser.js +55 -46
- package/dist/adapter/deconz/driver/frameParser.js.map +1 -1
- package/dist/adapter/deconz/driver/parser.js +1 -1
- package/dist/adapter/ember/adapter/emberAdapter.d.ts +27 -445
- package/dist/adapter/ember/adapter/emberAdapter.d.ts.map +1 -1
- package/dist/adapter/ember/adapter/emberAdapter.js +888 -1681
- package/dist/adapter/ember/adapter/emberAdapter.js.map +1 -1
- package/dist/adapter/ember/adapter/endpoints.d.ts.map +1 -1
- package/dist/adapter/ember/adapter/endpoints.js +4 -2
- package/dist/adapter/ember/adapter/endpoints.js.map +1 -1
- package/dist/adapter/ember/adapter/oneWaitress.d.ts +5 -4
- package/dist/adapter/ember/adapter/oneWaitress.d.ts.map +1 -1
- package/dist/adapter/ember/adapter/oneWaitress.js +44 -30
- package/dist/adapter/ember/adapter/oneWaitress.js.map +1 -1
- package/dist/adapter/ember/adapter/tokensManager.d.ts +11 -10
- package/dist/adapter/ember/adapter/tokensManager.d.ts.map +1 -1
- package/dist/adapter/ember/adapter/tokensManager.js +118 -117
- package/dist/adapter/ember/adapter/tokensManager.js.map +1 -1
- package/dist/adapter/ember/consts.d.ts +1 -0
- package/dist/adapter/ember/consts.d.ts.map +1 -1
- package/dist/adapter/ember/consts.js +29 -27
- package/dist/adapter/ember/consts.js.map +1 -1
- package/dist/adapter/ember/enums.d.ts +130 -409
- package/dist/adapter/ember/enums.d.ts.map +1 -1
- package/dist/adapter/ember/enums.js +146 -484
- package/dist/adapter/ember/enums.js.map +1 -1
- package/dist/adapter/ember/ezsp/buffalo.d.ts +15 -4
- package/dist/adapter/ember/ezsp/buffalo.d.ts.map +1 -1
- package/dist/adapter/ember/ezsp/buffalo.js +148 -38
- package/dist/adapter/ember/ezsp/buffalo.js.map +1 -1
- package/dist/adapter/ember/ezsp/consts.d.ts +2 -1
- package/dist/adapter/ember/ezsp/consts.d.ts.map +1 -1
- package/dist/adapter/ember/ezsp/consts.js +6 -5
- package/dist/adapter/ember/ezsp/consts.js.map +1 -1
- package/dist/adapter/ember/ezsp/enums.d.ts +160 -49
- package/dist/adapter/ember/ezsp/enums.d.ts.map +1 -1
- package/dist/adapter/ember/ezsp/enums.js +177 -49
- package/dist/adapter/ember/ezsp/enums.js.map +1 -1
- package/dist/adapter/ember/ezsp/ezsp.d.ts +991 -729
- package/dist/adapter/ember/ezsp/ezsp.d.ts.map +1 -1
- package/dist/adapter/ember/ezsp/ezsp.js +3219 -2683
- package/dist/adapter/ember/ezsp/ezsp.js.map +1 -1
- package/dist/adapter/ember/ezspError.d.ts +6 -0
- package/dist/adapter/ember/ezspError.d.ts.map +1 -0
- package/dist/adapter/ember/ezspError.js +13 -0
- package/dist/adapter/ember/ezspError.js.map +1 -0
- package/dist/adapter/ember/types.d.ts +91 -43
- package/dist/adapter/ember/types.d.ts.map +1 -1
- package/dist/adapter/ember/uart/ash.d.ts +16 -12
- package/dist/adapter/ember/uart/ash.d.ts.map +1 -1
- package/dist/adapter/ember/uart/ash.js +81 -82
- package/dist/adapter/ember/uart/ash.js.map +1 -1
- package/dist/adapter/ember/uart/consts.d.ts.map +1 -1
- package/dist/adapter/ember/uart/consts.js +9 -9
- package/dist/adapter/ember/uart/consts.js.map +1 -1
- package/dist/adapter/ember/uart/enums.d.ts.map +1 -1
- package/dist/adapter/ember/uart/parser.d.ts +1 -1
- package/dist/adapter/ember/uart/parser.d.ts.map +1 -1
- package/dist/adapter/ember/uart/parser.js +1 -1
- package/dist/adapter/ember/uart/parser.js.map +1 -1
- package/dist/adapter/ember/uart/queues.d.ts.map +1 -1
- package/dist/adapter/ember/uart/queues.js +1 -1
- package/dist/adapter/ember/uart/queues.js.map +1 -1
- package/dist/adapter/ember/uart/writer.d.ts +1 -1
- package/dist/adapter/ember/uart/writer.d.ts.map +1 -1
- package/dist/adapter/ember/uart/writer.js +2 -3
- package/dist/adapter/ember/uart/writer.js.map +1 -1
- package/dist/adapter/ember/utils/initters.d.ts +2 -2
- package/dist/adapter/ember/utils/initters.d.ts.map +1 -1
- package/dist/adapter/ember/utils/initters.js +1 -0
- package/dist/adapter/ember/utils/initters.js.map +1 -1
- package/dist/adapter/ember/utils/math.d.ts +0 -8
- package/dist/adapter/ember/utils/math.d.ts.map +1 -1
- package/dist/adapter/ember/utils/math.js +12 -31
- package/dist/adapter/ember/utils/math.js.map +1 -1
- package/dist/adapter/events.d.ts +1 -1
- package/dist/adapter/events.d.ts.map +1 -1
- package/dist/adapter/ezsp/adapter/backup.d.ts +1 -1
- package/dist/adapter/ezsp/adapter/backup.d.ts.map +1 -1
- package/dist/adapter/ezsp/adapter/backup.js +11 -10
- package/dist/adapter/ezsp/adapter/backup.js.map +1 -1
- package/dist/adapter/ezsp/adapter/ezspAdapter.d.ts +4 -4
- package/dist/adapter/ezsp/adapter/ezspAdapter.d.ts.map +1 -1
- package/dist/adapter/ezsp/adapter/ezspAdapter.js +74 -41
- package/dist/adapter/ezsp/adapter/ezspAdapter.js.map +1 -1
- package/dist/adapter/ezsp/adapter/index.d.ts +1 -1
- package/dist/adapter/ezsp/adapter/index.d.ts.map +1 -1
- package/dist/adapter/ezsp/adapter/index.js.map +1 -1
- package/dist/adapter/ezsp/driver/commands.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/commands.js +452 -452
- package/dist/adapter/ezsp/driver/commands.js.map +1 -1
- package/dist/adapter/ezsp/driver/consts.js +4 -4
- package/dist/adapter/ezsp/driver/consts.js.map +1 -1
- package/dist/adapter/ezsp/driver/driver.d.ts +5 -5
- package/dist/adapter/ezsp/driver/driver.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/driver.js +82 -82
- package/dist/adapter/ezsp/driver/driver.js.map +1 -1
- package/dist/adapter/ezsp/driver/ezsp.d.ts +3 -3
- package/dist/adapter/ezsp/driver/ezsp.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/ezsp.js +58 -58
- package/dist/adapter/ezsp/driver/ezsp.js.map +1 -1
- package/dist/adapter/ezsp/driver/frame.js +9 -9
- package/dist/adapter/ezsp/driver/frame.js.map +1 -1
- package/dist/adapter/ezsp/driver/index.d.ts +1 -1
- package/dist/adapter/ezsp/driver/index.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/index.js +2 -2
- package/dist/adapter/ezsp/driver/index.js.map +1 -1
- package/dist/adapter/ezsp/driver/multicast.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/multicast.js +1 -1
- package/dist/adapter/ezsp/driver/multicast.js.map +1 -1
- package/dist/adapter/ezsp/driver/parser.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/parser.js +1 -1
- package/dist/adapter/ezsp/driver/parser.js.map +1 -1
- package/dist/adapter/ezsp/driver/types/basic.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/types/basic.js +5 -5
- package/dist/adapter/ezsp/driver/types/basic.js.map +1 -1
- package/dist/adapter/ezsp/driver/types/index.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/types/index.js.map +1 -1
- package/dist/adapter/ezsp/driver/types/named.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/types/named.js +236 -234
- package/dist/adapter/ezsp/driver/types/named.js.map +1 -1
- package/dist/adapter/ezsp/driver/types/struct.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/types/struct.js +5 -3
- package/dist/adapter/ezsp/driver/types/struct.js.map +1 -1
- package/dist/adapter/ezsp/driver/uart.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/uart.js +8 -8
- package/dist/adapter/ezsp/driver/uart.js.map +1 -1
- package/dist/adapter/ezsp/driver/utils/index.d.ts +1 -1
- package/dist/adapter/ezsp/driver/utils/index.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/utils/index.js +12 -11
- package/dist/adapter/ezsp/driver/utils/index.js.map +1 -1
- package/dist/adapter/ezsp/driver/writer.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/writer.js +6 -7
- package/dist/adapter/ezsp/driver/writer.js.map +1 -1
- package/dist/adapter/index.d.ts +2 -2
- package/dist/adapter/index.d.ts.map +1 -1
- package/dist/adapter/index.js +2 -2
- package/dist/adapter/index.js.map +1 -1
- package/dist/adapter/serialPort.d.ts +1 -1
- package/dist/adapter/serialPort.d.ts.map +1 -1
- package/dist/adapter/serialPort.js +1 -1
- package/dist/adapter/serialPort.js.map +1 -1
- package/dist/adapter/serialPortUtils.js +1 -1
- package/dist/adapter/serialPortUtils.js.map +1 -1
- package/dist/adapter/socketPortUtils.js +3 -3
- package/dist/adapter/tstype.d.ts +1 -1
- package/dist/adapter/tstype.d.ts.map +1 -1
- package/dist/adapter/z-stack/adapter/adapter-backup.d.ts +3 -3
- package/dist/adapter/z-stack/adapter/adapter-backup.d.ts.map +1 -1
- package/dist/adapter/z-stack/adapter/adapter-backup.js +101 -86
- package/dist/adapter/z-stack/adapter/adapter-backup.js.map +1 -1
- package/dist/adapter/z-stack/adapter/adapter-nv-memory.d.ts +10 -10
- package/dist/adapter/z-stack/adapter/adapter-nv-memory.d.ts.map +1 -1
- package/dist/adapter/z-stack/adapter/adapter-nv-memory.js +30 -24
- package/dist/adapter/z-stack/adapter/adapter-nv-memory.js.map +1 -1
- package/dist/adapter/z-stack/adapter/endpoints.d.ts.map +1 -1
- package/dist/adapter/z-stack/adapter/endpoints.js +4 -4
- package/dist/adapter/z-stack/adapter/endpoints.js.map +1 -1
- package/dist/adapter/z-stack/adapter/index.d.ts +1 -1
- package/dist/adapter/z-stack/adapter/index.d.ts.map +1 -1
- package/dist/adapter/z-stack/adapter/index.js.map +1 -1
- package/dist/adapter/z-stack/adapter/manager.d.ts +5 -5
- package/dist/adapter/z-stack/adapter/manager.d.ts.map +1 -1
- package/dist/adapter/z-stack/adapter/manager.js +90 -81
- package/dist/adapter/z-stack/adapter/manager.js.map +1 -1
- package/dist/adapter/z-stack/adapter/tstype.d.ts +1 -1
- package/dist/adapter/z-stack/adapter/tstype.d.ts.map +1 -1
- package/dist/adapter/z-stack/adapter/zStackAdapter.d.ts +5 -5
- package/dist/adapter/z-stack/adapter/zStackAdapter.d.ts.map +1 -1
- package/dist/adapter/z-stack/adapter/zStackAdapter.js +72 -57
- package/dist/adapter/z-stack/adapter/zStackAdapter.js.map +1 -1
- package/dist/adapter/z-stack/constants/af.js +5 -5
- package/dist/adapter/z-stack/constants/af.js.map +1 -1
- package/dist/adapter/z-stack/constants/dbg.js +2 -2
- package/dist/adapter/z-stack/constants/index.d.ts +2 -2
- package/dist/adapter/z-stack/constants/index.d.ts.map +1 -1
- package/dist/adapter/z-stack/constants/index.js +2 -2
- package/dist/adapter/z-stack/constants/index.js.map +1 -1
- package/dist/adapter/z-stack/constants/mac.js +11 -11
- package/dist/adapter/z-stack/constants/sapi.js +4 -4
- package/dist/adapter/z-stack/constants/sys.js +11 -11
- package/dist/adapter/z-stack/constants/util.js +11 -11
- package/dist/adapter/z-stack/constants/utils.d.ts.map +1 -1
- package/dist/adapter/z-stack/constants/utils.js +3 -3
- package/dist/adapter/z-stack/constants/utils.js.map +1 -1
- package/dist/adapter/z-stack/constants/zdo.js +13 -13
- package/dist/adapter/z-stack/models/index.d.ts +1 -1
- package/dist/adapter/z-stack/models/startup-options.d.ts +2 -2
- package/dist/adapter/z-stack/structs/entries/address-manager-entry.d.ts +1 -1
- package/dist/adapter/z-stack/structs/entries/address-manager-entry.js +4 -4
- package/dist/adapter/z-stack/structs/entries/address-manager-entry.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/address-manager-table.d.ts +2 -2
- package/dist/adapter/z-stack/structs/entries/address-manager-table.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/address-manager-table.js +4 -7
- package/dist/adapter/z-stack/structs/entries/address-manager-table.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/aps-link-key-data-entry.d.ts +1 -1
- package/dist/adapter/z-stack/structs/entries/aps-link-key-data-entry.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/aps-link-key-data-entry.js +1 -5
- package/dist/adapter/z-stack/structs/entries/aps-link-key-data-entry.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/aps-link-key-data-table.d.ts +2 -2
- package/dist/adapter/z-stack/structs/entries/aps-link-key-data-table.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/aps-link-key-data-table.js +3 -6
- package/dist/adapter/z-stack/structs/entries/aps-link-key-data-table.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/aps-tc-link-key-entry.d.ts +1 -1
- package/dist/adapter/z-stack/structs/entries/aps-tc-link-key-entry.js +6 -6
- package/dist/adapter/z-stack/structs/entries/aps-tc-link-key-table.d.ts +2 -2
- package/dist/adapter/z-stack/structs/entries/aps-tc-link-key-table.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/aps-tc-link-key-table.js +3 -6
- package/dist/adapter/z-stack/structs/entries/aps-tc-link-key-table.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/channel-list.d.ts +1 -1
- package/dist/adapter/z-stack/structs/entries/channel-list.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/channel-list.js +1 -3
- package/dist/adapter/z-stack/structs/entries/channel-list.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/has-configured.d.ts +1 -1
- package/dist/adapter/z-stack/structs/entries/has-configured.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/has-configured.js +2 -2
- package/dist/adapter/z-stack/structs/entries/has-configured.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/index.d.ts +16 -16
- package/dist/adapter/z-stack/structs/entries/nib.d.ts +1 -1
- package/dist/adapter/z-stack/structs/entries/nib.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/nib.js +50 -50
- package/dist/adapter/z-stack/structs/entries/nib.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-key-descriptor.d.ts +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-key-descriptor.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-key-descriptor.js +1 -4
- package/dist/adapter/z-stack/structs/entries/nwk-key-descriptor.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-key.d.ts +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-key.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-key.js +1 -3
- package/dist/adapter/z-stack/structs/entries/nwk-key.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-pan-id.d.ts +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-pan-id.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-pan-id.js +1 -3
- package/dist/adapter/z-stack/structs/entries/nwk-pan-id.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-entry.d.ts +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-entry.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-entry.js +3 -3
- package/dist/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-entry.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-table.d.ts +2 -2
- package/dist/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-table.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-table.js +3 -6
- package/dist/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-table.js.map +1 -1
- package/dist/adapter/z-stack/structs/entries/security-manager-entry.d.ts +1 -1
- package/dist/adapter/z-stack/structs/entries/security-manager-entry.js +4 -4
- package/dist/adapter/z-stack/structs/entries/security-manager-table.d.ts +2 -2
- package/dist/adapter/z-stack/structs/entries/security-manager-table.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/entries/security-manager-table.js +3 -7
- package/dist/adapter/z-stack/structs/entries/security-manager-table.js.map +1 -1
- package/dist/adapter/z-stack/structs/index.d.ts +4 -4
- package/dist/adapter/z-stack/structs/serializable-memory-object.d.ts +1 -1
- package/dist/adapter/z-stack/structs/struct.d.ts +6 -6
- package/dist/adapter/z-stack/structs/struct.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/struct.js +53 -52
- package/dist/adapter/z-stack/structs/struct.js.map +1 -1
- package/dist/adapter/z-stack/structs/table.d.ts +3 -3
- package/dist/adapter/z-stack/structs/table.d.ts.map +1 -1
- package/dist/adapter/z-stack/structs/table.js +16 -16
- package/dist/adapter/z-stack/structs/table.js.map +1 -1
- package/dist/adapter/z-stack/unpi/constants.d.ts +1 -1
- package/dist/adapter/z-stack/unpi/constants.d.ts.map +1 -1
- package/dist/adapter/z-stack/unpi/constants.js +1 -1
- package/dist/adapter/z-stack/unpi/constants.js.map +1 -1
- package/dist/adapter/z-stack/unpi/frame.d.ts.map +1 -1
- package/dist/adapter/z-stack/unpi/frame.js +5 -6
- package/dist/adapter/z-stack/unpi/frame.js.map +1 -1
- package/dist/adapter/z-stack/unpi/index.d.ts +4 -4
- package/dist/adapter/z-stack/unpi/index.d.ts.map +1 -1
- package/dist/adapter/z-stack/unpi/index.js +6 -6
- package/dist/adapter/z-stack/unpi/index.js.map +1 -1
- package/dist/adapter/z-stack/unpi/parser.d.ts.map +1 -1
- package/dist/adapter/z-stack/unpi/parser.js +1 -1
- package/dist/adapter/z-stack/unpi/parser.js.map +1 -1
- package/dist/adapter/z-stack/unpi/writer.d.ts.map +1 -1
- package/dist/adapter/z-stack/unpi/writer.js.map +1 -1
- package/dist/adapter/z-stack/utils/channel-list.d.ts.map +1 -1
- package/dist/adapter/z-stack/utils/channel-list.js +5 -2
- package/dist/adapter/z-stack/utils/channel-list.js.map +1 -1
- package/dist/adapter/z-stack/utils/index.d.ts +2 -2
- package/dist/adapter/z-stack/utils/network-options.d.ts +1 -1
- package/dist/adapter/z-stack/utils/network-options.d.ts.map +1 -1
- package/dist/adapter/z-stack/utils/network-options.js +1 -1
- package/dist/adapter/z-stack/utils/network-options.js.map +1 -1
- package/dist/adapter/z-stack/znp/buffaloZnp.d.ts.map +1 -1
- package/dist/adapter/z-stack/znp/buffaloZnp.js +8 -8
- package/dist/adapter/z-stack/znp/buffaloZnp.js.map +1 -1
- package/dist/adapter/z-stack/znp/definition.d.ts.map +1 -1
- package/dist/adapter/z-stack/znp/definition.js +200 -592
- package/dist/adapter/z-stack/znp/definition.js.map +1 -1
- package/dist/adapter/z-stack/znp/index.d.ts +1 -1
- package/dist/adapter/z-stack/znp/index.d.ts.map +1 -1
- package/dist/adapter/z-stack/znp/index.js.map +1 -1
- package/dist/adapter/z-stack/znp/parameterType.d.ts.map +1 -1
- package/dist/adapter/z-stack/znp/parameterType.js.map +1 -1
- package/dist/adapter/z-stack/znp/tstype.d.ts.map +1 -1
- package/dist/adapter/z-stack/znp/znp.d.ts +3 -3
- package/dist/adapter/z-stack/znp/znp.d.ts.map +1 -1
- package/dist/adapter/z-stack/znp/znp.js +12 -15
- package/dist/adapter/z-stack/znp/znp.js.map +1 -1
- package/dist/adapter/z-stack/znp/zpiObject.d.ts +1 -1
- package/dist/adapter/z-stack/znp/zpiObject.d.ts.map +1 -1
- package/dist/adapter/z-stack/znp/zpiObject.js +17 -9
- package/dist/adapter/z-stack/znp/zpiObject.js.map +1 -1
- package/dist/adapter/zigate/adapter/index.d.ts.map +1 -1
- package/dist/adapter/zigate/adapter/index.js.map +1 -1
- package/dist/adapter/zigate/adapter/zigateAdapter.d.ts +1 -1
- package/dist/adapter/zigate/adapter/zigateAdapter.d.ts.map +1 -1
- package/dist/adapter/zigate/adapter/zigateAdapter.js +88 -92
- package/dist/adapter/zigate/adapter/zigateAdapter.js.map +1 -1
- package/dist/adapter/zigate/driver/buffaloZiGate.js.map +1 -1
- package/dist/adapter/zigate/driver/commandType.d.ts +2 -2
- package/dist/adapter/zigate/driver/commandType.d.ts.map +1 -1
- package/dist/adapter/zigate/driver/commandType.js +72 -80
- package/dist/adapter/zigate/driver/commandType.js.map +1 -1
- package/dist/adapter/zigate/driver/constants.d.ts +9 -9
- package/dist/adapter/zigate/driver/constants.d.ts.map +1 -1
- package/dist/adapter/zigate/driver/constants.js +11 -65
- package/dist/adapter/zigate/driver/constants.js.map +1 -1
- package/dist/adapter/zigate/driver/frame.d.ts.map +1 -1
- package/dist/adapter/zigate/driver/frame.js +3 -15
- package/dist/adapter/zigate/driver/frame.js.map +1 -1
- package/dist/adapter/zigate/driver/messageType.d.ts +1 -1
- package/dist/adapter/zigate/driver/messageType.d.ts.map +1 -1
- package/dist/adapter/zigate/driver/messageType.js +29 -30
- package/dist/adapter/zigate/driver/messageType.js.map +1 -1
- package/dist/adapter/zigate/driver/parameterType.d.ts.map +1 -1
- package/dist/adapter/zigate/driver/parameterType.js.map +1 -1
- package/dist/adapter/zigate/driver/ziGateObject.d.ts +2 -2
- package/dist/adapter/zigate/driver/ziGateObject.d.ts.map +1 -1
- package/dist/adapter/zigate/driver/ziGateObject.js +11 -5
- package/dist/adapter/zigate/driver/ziGateObject.js.map +1 -1
- package/dist/adapter/zigate/driver/zigate.d.ts +5 -5
- package/dist/adapter/zigate/driver/zigate.d.ts.map +1 -1
- package/dist/adapter/zigate/driver/zigate.js +12 -12
- package/dist/adapter/zigate/driver/zigate.js.map +1 -1
- package/dist/buffalo/buffalo.d.ts +1 -1
- package/dist/buffalo/buffalo.d.ts.map +1 -1
- package/dist/buffalo/buffalo.js +1 -1
- package/dist/buffalo/buffalo.js.map +1 -1
- package/dist/controller/controller.d.ts.map +1 -1
- package/dist/controller/controller.js +34 -33
- package/dist/controller/controller.js.map +1 -1
- package/dist/controller/database.d.ts.map +1 -1
- package/dist/controller/database.js +6 -2
- package/dist/controller/database.js.map +1 -1
- package/dist/controller/events.d.ts +3 -3
- package/dist/controller/events.d.ts.map +1 -1
- package/dist/controller/greenPower.d.ts +1 -1
- package/dist/controller/greenPower.d.ts.map +1 -1
- package/dist/controller/greenPower.js +15 -17
- package/dist/controller/greenPower.js.map +1 -1
- package/dist/controller/helpers/index.d.ts +1 -1
- package/dist/controller/helpers/index.d.ts.map +1 -1
- package/dist/controller/helpers/index.js.map +1 -1
- package/dist/controller/helpers/request.d.ts +1 -1
- package/dist/controller/helpers/request.d.ts.map +1 -1
- package/dist/controller/helpers/request.js +7 -10
- package/dist/controller/helpers/request.js.map +1 -1
- package/dist/controller/helpers/requestQueue.d.ts.map +1 -1
- package/dist/controller/helpers/requestQueue.js +2 -3
- package/dist/controller/helpers/requestQueue.js.map +1 -1
- package/dist/controller/helpers/zclFrameConverter.d.ts +1 -1
- package/dist/controller/helpers/zclFrameConverter.d.ts.map +1 -1
- package/dist/controller/helpers/zclFrameConverter.js.map +1 -1
- package/dist/controller/index.d.ts +1 -1
- package/dist/controller/index.d.ts.map +1 -1
- package/dist/controller/index.js.map +1 -1
- package/dist/controller/model/device.d.ts +3 -3
- package/dist/controller/model/device.d.ts.map +1 -1
- package/dist/controller/model/device.js +247 -94
- package/dist/controller/model/device.js.map +1 -1
- package/dist/controller/model/endpoint.d.ts +4 -4
- package/dist/controller/model/endpoint.d.ts.map +1 -1
- package/dist/controller/model/endpoint.js +45 -31
- package/dist/controller/model/endpoint.js.map +1 -1
- package/dist/controller/model/entity.d.ts +2 -2
- package/dist/controller/model/entity.d.ts.map +1 -1
- package/dist/controller/model/entity.js.map +1 -1
- package/dist/controller/model/group.d.ts +2 -2
- package/dist/controller/model/group.d.ts.map +1 -1
- package/dist/controller/model/group.js +8 -6
- package/dist/controller/model/group.js.map +1 -1
- package/dist/controller/model/index.d.ts +1 -1
- package/dist/controller/model/index.d.ts.map +1 -1
- package/dist/controller/model/index.js.map +1 -1
- package/dist/controller/touchlink.d.ts.map +1 -1
- package/dist/controller/touchlink.js +2 -2
- package/dist/controller/touchlink.js.map +1 -1
- package/dist/controller/tstype.d.ts.map +1 -1
- package/dist/controller/tstype.js +0 -1
- package/dist/controller/tstype.js.map +1 -1
- package/dist/models/backup-storage-legacy.d.ts +4 -4
- package/dist/models/backup-storage-legacy.d.ts.map +1 -1
- package/dist/models/backup-storage-unified.d.ts +1 -1
- package/dist/models/backup.d.ts +2 -2
- package/dist/models/index.d.ts +4 -4
- package/dist/utils/backup.d.ts +1 -1
- package/dist/utils/backup.d.ts.map +1 -1
- package/dist/utils/backup.js +71 -58
- package/dist/utils/backup.js.map +1 -1
- package/dist/utils/index.d.ts +6 -6
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +10 -10
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/isNumberArray.js +1 -1
- package/dist/utils/isNumberArray.js.map +1 -1
- package/dist/utils/queue.js +1 -1
- package/dist/utils/queue.js.map +1 -1
- package/dist/utils/waitress.d.ts.map +1 -1
- package/dist/utils/waitress.js +2 -2
- package/dist/utils/waitress.js.map +1 -1
- package/dist/zspec/consts.d.ts +1 -1
- package/dist/zspec/consts.d.ts.map +1 -1
- package/dist/zspec/consts.js +16 -16
- package/dist/zspec/consts.js.map +1 -1
- package/dist/zspec/enums.js +0 -1
- package/dist/zspec/enums.js.map +1 -1
- package/dist/zspec/utils.d.ts.map +1 -1
- package/dist/zspec/utils.js +5 -3
- package/dist/zspec/utils.js.map +1 -1
- package/dist/zspec/zcl/buffaloZcl.d.ts +2 -2
- package/dist/zspec/zcl/buffaloZcl.d.ts.map +1 -1
- package/dist/zspec/zcl/buffaloZcl.js +44 -51
- package/dist/zspec/zcl/buffaloZcl.js.map +1 -1
- package/dist/zspec/zcl/definition/cluster.d.ts.map +1 -1
- package/dist/zspec/zcl/definition/cluster.js +283 -380
- package/dist/zspec/zcl/definition/cluster.js.map +1 -1
- package/dist/zspec/zcl/definition/consts.js +10 -10
- package/dist/zspec/zcl/definition/consts.js.map +1 -1
- package/dist/zspec/zcl/definition/enums.d.ts.map +1 -1
- package/dist/zspec/zcl/definition/enums.js.map +1 -1
- package/dist/zspec/zcl/definition/foundation.d.ts +1 -1
- package/dist/zspec/zcl/definition/foundation.d.ts.map +1 -1
- package/dist/zspec/zcl/definition/foundation.js +51 -22
- package/dist/zspec/zcl/definition/foundation.js.map +1 -1
- package/dist/zspec/zcl/definition/manufacturerCode.js +0 -1
- package/dist/zspec/zcl/definition/manufacturerCode.js.map +1 -1
- package/dist/zspec/zcl/definition/status.d.ts.map +1 -1
- package/dist/zspec/zcl/definition/tstype.d.ts +1 -1
- package/dist/zspec/zcl/definition/tstype.d.ts.map +1 -1
- package/dist/zspec/zcl/definition/tstype.js +0 -1
- package/dist/zspec/zcl/definition/tstype.js.map +1 -1
- package/dist/zspec/zcl/utils.d.ts.map +1 -1
- package/dist/zspec/zcl/utils.js +59 -19
- package/dist/zspec/zcl/utils.js.map +1 -1
- package/dist/zspec/zcl/zclFrame.d.ts +1 -1
- package/dist/zspec/zcl/zclFrame.d.ts.map +1 -1
- package/dist/zspec/zcl/zclFrame.js +14 -15
- package/dist/zspec/zcl/zclFrame.js.map +1 -1
- package/dist/zspec/zcl/zclHeader.d.ts +1 -1
- package/dist/zspec/zcl/zclHeader.d.ts.map +1 -1
- package/dist/zspec/zcl/zclHeader.js +7 -7
- package/dist/zspec/zcl/zclHeader.js.map +1 -1
- package/dist/zspec/zcl/zclStatusError.d.ts.map +1 -1
- package/dist/zspec/zcl/zclStatusError.js.map +1 -1
- package/dist/zspec/zdo/buffaloZdo.d.ts +3 -3
- package/dist/zspec/zdo/buffaloZdo.d.ts.map +1 -1
- package/dist/zspec/zdo/buffaloZdo.js +92 -92
- package/dist/zspec/zdo/buffaloZdo.js.map +1 -1
- package/dist/zspec/zdo/definition/clusters.d.ts.map +1 -1
- package/dist/zspec/zdo/definition/clusters.js +0 -1
- package/dist/zspec/zdo/definition/clusters.js.map +1 -1
- package/dist/zspec/zdo/definition/consts.d.ts.map +1 -1
- package/dist/zspec/zdo/definition/consts.js.map +1 -1
- package/dist/zspec/zdo/definition/enums.d.ts.map +1 -1
- package/dist/zspec/zdo/definition/enums.js +0 -5
- package/dist/zspec/zdo/definition/enums.js.map +1 -1
- package/dist/zspec/zdo/definition/status.d.ts.map +1 -1
- package/dist/zspec/zdo/definition/status.js +0 -1
- package/dist/zspec/zdo/definition/status.js.map +1 -1
- package/dist/zspec/zdo/definition/tstypes.d.ts +2 -2
- package/dist/zspec/zdo/definition/tstypes.d.ts.map +1 -1
- package/dist/zspec/zdo/utils.d.ts.map +1 -1
- package/dist/zspec/zdo/utils.js +14 -14
- package/dist/zspec/zdo/utils.js.map +1 -1
- package/dist/zspec/zdo/zdoStatusError.d.ts.map +1 -1
- package/dist/zspec/zdo/zdoStatusError.js.map +1 -1
- package/package.json +6 -1
- package/dist/adapter/ember/adapter/requestQueue.d.ts +0 -57
- package/dist/adapter/ember/adapter/requestQueue.d.ts.map +0 -1
- package/dist/adapter/ember/adapter/requestQueue.js +0 -139
- package/dist/adapter/ember/adapter/requestQueue.js.map +0 -1
- package/dist/adapter/ember/zdo.d.ts +0 -925
- package/dist/adapter/ember/zdo.d.ts.map +0 -1
- package/dist/adapter/ember/zdo.js +0 -723
- package/dist/adapter/ember/zdo.js.map +0 -1
|
@@ -1,28 +1,58 @@
|
|
|
1
|
-
import EventEmitter from
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import EventEmitter from 'events';
|
|
2
|
+
import { EUI64, ExtendedPanId, NodeId, PanId } from '../../../zspec/tstypes';
|
|
3
|
+
import * as Zdo from '../../../zspec/zdo';
|
|
4
|
+
import { SerialPortOptions } from '../../tstype';
|
|
5
|
+
import { EmberOutgoingMessageType, EmberCounterType, EmberDutyCycleState, EmberEntropySource, EmberEventUnits, EmberLibraryId, EmberLibraryStatus, EmberMultiPhyNwkConfig, EmberNetworkStatus, EmberNodeType, EzspNetworkScanType, EzspStatus, SLStatus, EmberIncomingMessageType, EmberSourceRouteDiscoveryMode, EmberMacPassthroughType, EmberKeyStatus, SecManFlag, EmberDeviceUpdate, EmberJoinDecision, EzspZllNetworkOperation, EmberGpSecurityLevel, EmberGpKeyType, EmberTXPowerMode, EmberExtendedSecurityBitmask, EmberStackError, EmberLeaveNetworkOption, EmberGPStatus, EmberTransmitPriority } from '../enums';
|
|
6
|
+
import { EmberVersion, EmberBeaconData, EmberBindingTableEntry, EmberChildData, EmberDutyCycleLimits, EmberMultiPhyRadioParameters, EmberNeighborTableEntry, EmberNetworkInitStruct, EmberNetworkParameters, EmberPerDeviceDutyCycle, EmberRouteTableEntry, EmberApsFrame, EmberMulticastTableEntry, EmberBeaconClassificationParams, EmberInitialSecurityState, EmberCurrentSecurityState, SecManContext, SecManKey, SecManNetworkKeyInfo, SecManAPSKeyMetadata, EmberKeyData, EmberAesMmoHashContext, EmberPublicKeyData, EmberCertificateData, EmberSmacData, EmberPublicKey283k1Data, EmberCertificate283k1Data, EmberMessageDigest, EmberSignatureData, EmberSignature283k1Data, EmberPrivateKeyData, EmberZllNetwork, EmberZllInitialSecurityState, EmberZllDeviceInfoRecord, EmberZllAddressAssignment, EmberTokTypeStackZllData, EmberTokTypeStackZllSecurity, EmberGpAddress, EmberGpProxyTableEntry, EmberGpSinkTableEntry, EmberTokenInfo, EmberTokenData, EmberZigbeeNetwork, EmberEndpointDescription, EmberMultiprotocolPriorities, EmberRxPacketInfo } from '../types';
|
|
7
|
+
import { UartAsh } from '../uart/ash';
|
|
8
|
+
import { EzspBuffalo } from './buffalo';
|
|
9
|
+
import { EmberLeaveReason, EmberRejoinReason, EzspConfigId, EzspEndpointFlag, EzspExtendedValueId, EzspMfgTokenId, EzspPolicyId, EzspValueId } from './enums';
|
|
7
10
|
export declare enum EzspEvents {
|
|
8
11
|
NCP_NEEDS_RESET_AND_INIT = "NCP_NEEDS_RESET_AND_INIT",
|
|
9
|
-
/** params => status: EmberZdoStatus, sender: EmberNodeId, apsFrame: EmberApsFrame, payload: { cluster-dependent @see zdo.ts } */
|
|
10
12
|
ZDO_RESPONSE = "ZDO_RESPONSE",
|
|
11
|
-
/** params => type: EmberIncomingMessageType, apsFrame: EmberApsFrame, lastHopLqi: number, sender: EmberNodeId, messageContents: Buffer */
|
|
12
13
|
INCOMING_MESSAGE = "INCOMING_MESSAGE",
|
|
13
|
-
/** params => sourcePanId: EmberPanId, sourceAddress: EmberEUI64, groupId: number | null, lastHopLqi: number, messageContents: Buffer */
|
|
14
14
|
TOUCHLINK_MESSAGE = "TOUCHLINK_MESSAGE",
|
|
15
|
-
/** params => sender: EmberNodeId, apsFrame: EmberApsFrame, payload: EndDeviceAnnouncePayload */
|
|
16
|
-
END_DEVICE_ANNOUNCE = "END_DEVICE_ANNOUNCE",
|
|
17
|
-
/** params => status: EmberStatus */
|
|
18
15
|
STACK_STATUS = "STACK_STATUS",
|
|
19
|
-
/** params => newNodeId: EmberNodeId, newNodeEui64: EmberEUI64, status: EmberDeviceUpdate, policyDecision: EmberJoinDecision, parentOfNewNodeId: EmberNodeId */
|
|
20
16
|
TRUST_CENTER_JOIN = "TRUST_CENTER_JOIN",
|
|
21
|
-
/** params => type: EmberOutgoingMessageType, indexOrDestination: number, apsFrame: EmberApsFrame, messageTag: number, status: EmberStatus */
|
|
22
17
|
MESSAGE_SENT = "MESSAGE_SENT",
|
|
23
|
-
/** params => sequenceNumber: number, commandIdentifier: number, sourceId: number, frameCounter: number, gpdCommandId: number, gpdCommandPayload: Buffer, gpdLink: number */
|
|
24
18
|
GREENPOWER_MESSAGE = "GREENPOWER_MESSAGE"
|
|
25
19
|
}
|
|
20
|
+
interface EzspEventMap {
|
|
21
|
+
[EzspEvents.NCP_NEEDS_RESET_AND_INIT]: [status: EzspStatus];
|
|
22
|
+
[EzspEvents.ZDO_RESPONSE]: [apsFrame: EmberApsFrame, sender: NodeId, messageContents: Buffer];
|
|
23
|
+
[EzspEvents.INCOMING_MESSAGE]: [
|
|
24
|
+
type: EmberIncomingMessageType,
|
|
25
|
+
apsFrame: EmberApsFrame,
|
|
26
|
+
lastHopLqi: number,
|
|
27
|
+
sender: NodeId,
|
|
28
|
+
messageContents: Buffer
|
|
29
|
+
];
|
|
30
|
+
[EzspEvents.TOUCHLINK_MESSAGE]: [sourcePanId: PanId, sourceAddress: EUI64, groupId: number | null, lastHopLqi: number, messageContents: Buffer];
|
|
31
|
+
[EzspEvents.STACK_STATUS]: [status: SLStatus];
|
|
32
|
+
[EzspEvents.TRUST_CENTER_JOIN]: [
|
|
33
|
+
newNodeId: NodeId,
|
|
34
|
+
newNodeEui64: EUI64,
|
|
35
|
+
status: EmberDeviceUpdate,
|
|
36
|
+
policyDecision: EmberJoinDecision,
|
|
37
|
+
parentOfNewNodeId: NodeId
|
|
38
|
+
];
|
|
39
|
+
[EzspEvents.MESSAGE_SENT]: [
|
|
40
|
+
status: SLStatus,
|
|
41
|
+
type: EmberOutgoingMessageType,
|
|
42
|
+
indexOrDestination: number,
|
|
43
|
+
apsFrame: EmberApsFrame,
|
|
44
|
+
messageTag: number
|
|
45
|
+
];
|
|
46
|
+
[EzspEvents.GREENPOWER_MESSAGE]: [
|
|
47
|
+
sequenceNumber: number,
|
|
48
|
+
commandIdentifier: number,
|
|
49
|
+
sourceId: number,
|
|
50
|
+
frameCounter: number,
|
|
51
|
+
gpdCommandId: number,
|
|
52
|
+
gpdCommandPayload: Buffer,
|
|
53
|
+
gpdLink: number
|
|
54
|
+
];
|
|
55
|
+
}
|
|
26
56
|
/**
|
|
27
57
|
* Host EZSP layer.
|
|
28
58
|
*
|
|
@@ -33,33 +63,31 @@ export declare enum EzspEvents {
|
|
|
33
63
|
* Callers are expected to handle errors appropriately.
|
|
34
64
|
* - They will throw `EzspStatus` if `sendCommand` fails or the returned value(s) by NCP are invalid (wrong length, etc).
|
|
35
65
|
* - Most will return `EmberStatus` given by NCP (some `EzspStatus`, some `SLStatus`...).
|
|
36
|
-
*
|
|
37
|
-
* @event 'NCP_NEEDS_RESET_AND_INIT(EzspStatus)' An error was detected that requires resetting the NCP.
|
|
38
66
|
*/
|
|
39
|
-
export declare class Ezsp extends EventEmitter {
|
|
40
|
-
private
|
|
67
|
+
export declare class Ezsp extends EventEmitter<EzspEventMap> {
|
|
68
|
+
private version;
|
|
41
69
|
readonly ash: UartAsh;
|
|
42
70
|
private readonly buffalo;
|
|
43
71
|
/** The contents of the current EZSP frame. CAREFUL using this guy, it's pre-allocated. */
|
|
44
72
|
private readonly frameContents;
|
|
45
73
|
/** The total Length of the incoming frame */
|
|
46
74
|
private frameLength;
|
|
75
|
+
private readonly callbackBuffalo;
|
|
76
|
+
/** The contents of the current EZSP frame. CAREFUL using this guy, it's pre-allocated. */
|
|
77
|
+
private readonly callbackFrameContents;
|
|
78
|
+
/** The total Length of the incoming frame */
|
|
79
|
+
private callbackFrameLength;
|
|
47
80
|
private initialVersionSent;
|
|
48
|
-
/** True if a command is in the process of being sent. */
|
|
49
|
-
private sendingCommand;
|
|
50
81
|
/** EZSP frame sequence number. Used in EZSP_SEQUENCE_INDEX byte. */
|
|
51
82
|
private frameSequence;
|
|
52
83
|
/** Sequence used for EZSP send() tagging. static uint8_t */
|
|
53
84
|
private sendSequence;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/** Awaiting response resolve/timer struct. If waitingForResponse is not true, this should not be used. */
|
|
85
|
+
private readonly queue;
|
|
86
|
+
/** Awaiting response resolve/timer struct. Null if not waiting for response. */
|
|
57
87
|
private responseWaiter;
|
|
58
88
|
/** Counter for Queue Full errors */
|
|
59
89
|
counterErrQueueFull: number;
|
|
60
|
-
|
|
61
|
-
private tickHandle;
|
|
62
|
-
constructor(tickInterval: number, options: SerialPortOptions);
|
|
90
|
+
constructor(options: SerialPortOptions);
|
|
63
91
|
/**
|
|
64
92
|
* Returns the number of EZSP responses that have been received by the serial
|
|
65
93
|
* protocol and are ready to be collected by the EZSP layer via
|
|
@@ -67,9 +95,13 @@ export declare class Ezsp extends EventEmitter {
|
|
|
67
95
|
*/
|
|
68
96
|
get pendingResponseCount(): number;
|
|
69
97
|
/**
|
|
70
|
-
* Create a string representation of the last frame in storage
|
|
98
|
+
* Create a string representation of the last received frame in storage.
|
|
71
99
|
*/
|
|
72
100
|
get frameToString(): string;
|
|
101
|
+
/**
|
|
102
|
+
* Create a string representation of the last received callback frame in storage.
|
|
103
|
+
*/
|
|
104
|
+
get callbackFrameToString(): string;
|
|
73
105
|
private initVariables;
|
|
74
106
|
start(): Promise<EzspStatus>;
|
|
75
107
|
/**
|
|
@@ -77,6 +109,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
77
109
|
* After this function has been called, init() must be called to resume communication with the NCP.
|
|
78
110
|
*/
|
|
79
111
|
stop(): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Must be called immediately after `ezspVersion` to sync the Host protocol version.
|
|
114
|
+
* @param version Version for the Host to use.
|
|
115
|
+
*/
|
|
116
|
+
setProtocolVersion(version: number): void;
|
|
80
117
|
/**
|
|
81
118
|
* Check if connected.
|
|
82
119
|
* If not, attempt to restore the connection.
|
|
@@ -84,7 +121,13 @@ export declare class Ezsp extends EventEmitter {
|
|
|
84
121
|
* @returns
|
|
85
122
|
*/
|
|
86
123
|
checkConnection(): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Triggered by @see AshEvents.FATAL_ERROR
|
|
126
|
+
*/
|
|
87
127
|
private onAshFatalError;
|
|
128
|
+
/**
|
|
129
|
+
* Triggered by @see AshEvents.FRAME
|
|
130
|
+
*/
|
|
88
131
|
private onAshFrame;
|
|
89
132
|
/**
|
|
90
133
|
* Event from the EZSP layer indicating that the transaction with the NCP could not be completed due to a
|
|
@@ -94,10 +137,6 @@ export declare class Ezsp extends EventEmitter {
|
|
|
94
137
|
* @param status
|
|
95
138
|
*/
|
|
96
139
|
ezspErrorHandler(status: EzspStatus): void;
|
|
97
|
-
/**
|
|
98
|
-
* The Host application must call this function periodically to allow the EZSP layer to handle asynchronous events.
|
|
99
|
-
*/
|
|
100
|
-
private tick;
|
|
101
140
|
private nextFrameSequence;
|
|
102
141
|
private startCommand;
|
|
103
142
|
/**
|
|
@@ -116,7 +155,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
116
155
|
* - EzspStatus.DATA_FRAME_TOO_LONG
|
|
117
156
|
* - EzspStatus.NOT_CONNECTED
|
|
118
157
|
*
|
|
119
|
-
* if ezsp.sendCommand times out, this will be EzspStatus.
|
|
158
|
+
* if ezsp.sendCommand times out, this will be EzspStatus.ASH_ERROR_TIMEOUTS
|
|
120
159
|
*
|
|
121
160
|
* if ezsp.sendCommand resolves, this will be whatever ezsp.responseReceived returns:
|
|
122
161
|
* - EzspStatus.NO_RX_DATA (should not happen if command was sent (since we subscribe to frame event to trigger function))
|
|
@@ -128,18 +167,10 @@ export declare class Ezsp extends EventEmitter {
|
|
|
128
167
|
*/
|
|
129
168
|
private sendCommand;
|
|
130
169
|
/**
|
|
131
|
-
*
|
|
132
|
-
* If any, the response payload is stored in frameContents/frameLength.
|
|
133
|
-
* Any other return value means that an error has been detected by the serial protocol layer.
|
|
134
|
-
* @returns NO_RX_DATA if no new response has been received.
|
|
135
|
-
* @returns SUCCESS if a new response has been received.
|
|
136
|
-
*/
|
|
137
|
-
checkResponseReceived(): EzspStatus;
|
|
138
|
-
/**
|
|
139
|
-
* Check if a response was received and sets the stage for parsing if valid (indexes buffalo to params index).
|
|
170
|
+
* Sets the stage for parsing if valid (indexes buffalo to params index).
|
|
140
171
|
* @returns
|
|
141
172
|
*/
|
|
142
|
-
|
|
173
|
+
validateReceivedFrame(buffalo: EzspBuffalo): EzspStatus;
|
|
143
174
|
/**
|
|
144
175
|
* Dispatches callback frames handlers.
|
|
145
176
|
*/
|
|
@@ -155,26 +186,26 @@ export declare class Ezsp extends EventEmitter {
|
|
|
155
186
|
* Alias types expect `alias` & `sequence` params, along with `apsFrame.radius`.
|
|
156
187
|
*
|
|
157
188
|
* @param type Specifies the outgoing message type.
|
|
158
|
-
* @param indexOrDestination uint16_t Depending on the type of addressing used, this is either the
|
|
189
|
+
* @param indexOrDestination uint16_t Depending on the type of addressing used, this is either the NodeId of the destination,
|
|
159
190
|
* an index into the address table, or an index into the binding table.
|
|
160
191
|
* Unused for multicast types.
|
|
161
192
|
* This must be one of the three ZigBee broadcast addresses for broadcast.
|
|
162
193
|
* @param apsFrame [IN/OUT] EmberApsFrame * The APS frame which is to be added to the message.
|
|
194
|
+
* Sequence set in OUT as returned by ezspSend${x} command
|
|
163
195
|
* @param message uint8_t * Content of the message.
|
|
164
196
|
* @param alias The alias source address
|
|
165
197
|
* @param sequence uint8_t The alias sequence number
|
|
166
|
-
* @returns Result of the ezspSend${x} call or EmberStatus.
|
|
167
|
-
* @returns apsSequence as returned by ezspSend${x} command
|
|
198
|
+
* @returns Result of the ezspSend${x} call or EmberStatus.INVALID_PARAMETER if type not supported.
|
|
168
199
|
* @returns messageTag Tag used for ezspSend${x} command
|
|
169
200
|
*/
|
|
170
|
-
send(type: EmberOutgoingMessageType, indexOrDestination: number, apsFrame: EmberApsFrame, message: Buffer, alias:
|
|
201
|
+
send(type: EmberOutgoingMessageType, indexOrDestination: number, apsFrame: EmberApsFrame, message: Buffer, alias: NodeId, sequence: number): Promise<[SLStatus, messageTag: number]>;
|
|
171
202
|
/**
|
|
172
203
|
* Retrieving the new version info.
|
|
173
204
|
* Wrapper for `ezspGetValue`.
|
|
174
205
|
* @returns Send status
|
|
175
206
|
* @returns EmberVersion*, null if status not SUCCESS.
|
|
176
207
|
*/
|
|
177
|
-
ezspGetVersionStruct(): Promise<[
|
|
208
|
+
ezspGetVersionStruct(): Promise<[SLStatus, version: EmberVersion]>;
|
|
178
209
|
/**
|
|
179
210
|
* Function for manipulating the endpoints flags on the NCP.
|
|
180
211
|
* Wrapper for `ezspGetExtendedValue`
|
|
@@ -182,7 +213,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
182
213
|
* @param flags EzspEndpointFlags
|
|
183
214
|
* @returns EzspStatus
|
|
184
215
|
*/
|
|
185
|
-
ezspSetEndpointFlags(endpoint: number, flags: EzspEndpointFlag): Promise<
|
|
216
|
+
ezspSetEndpointFlags(endpoint: number, flags: EzspEndpointFlag): Promise<SLStatus>;
|
|
186
217
|
/**
|
|
187
218
|
* Function for manipulating the endpoints flags on the NCP.
|
|
188
219
|
* Wrapper for `ezspGetExtendedValue`.
|
|
@@ -190,49 +221,49 @@ export declare class Ezsp extends EventEmitter {
|
|
|
190
221
|
* @returns EzspStatus
|
|
191
222
|
* @returns flags
|
|
192
223
|
*/
|
|
193
|
-
ezspGetEndpointFlags(endpoint: number): Promise<[
|
|
224
|
+
ezspGetEndpointFlags(endpoint: number): Promise<[SLStatus, flags: EzspEndpointFlag]>;
|
|
194
225
|
/**
|
|
195
226
|
* Wrapper for `ezspGetExtendedValue`.
|
|
196
|
-
* @param
|
|
227
|
+
* @param NodeId
|
|
197
228
|
* @param destination
|
|
198
229
|
* @returns EzspStatus
|
|
199
230
|
* @returns overhead uint8_t
|
|
200
231
|
*/
|
|
201
|
-
ezspGetSourceRouteOverhead(destination:
|
|
232
|
+
ezspGetSourceRouteOverhead(destination: NodeId): Promise<[SLStatus, overhead: number]>;
|
|
202
233
|
/**
|
|
203
234
|
* Wrapper for `ezspGetExtendedValue`.
|
|
204
235
|
* @returns EzspStatus
|
|
205
236
|
* @returns reason
|
|
206
|
-
* @returns nodeId
|
|
237
|
+
* @returns nodeId NodeId*
|
|
207
238
|
*/
|
|
208
|
-
ezspGetLastLeaveReason(): Promise<[
|
|
239
|
+
ezspGetLastLeaveReason(): Promise<[SLStatus, reason: EmberLeaveReason, nodeId: NodeId]>;
|
|
209
240
|
/**
|
|
210
241
|
* Wrapper for `ezspGetValue`.
|
|
211
242
|
* @returns EzspStatus
|
|
212
243
|
* @returns reason
|
|
213
244
|
*/
|
|
214
|
-
ezspGetLastRejoinReason(): Promise<[
|
|
245
|
+
ezspGetLastRejoinReason(): Promise<[SLStatus, reason: EmberRejoinReason]>;
|
|
215
246
|
/**
|
|
216
247
|
* Wrapper for `ezspSetValue`.
|
|
217
248
|
* @param mask
|
|
218
249
|
* @returns
|
|
219
250
|
*/
|
|
220
|
-
ezspSetExtendedSecurityBitmask(mask: EmberExtendedSecurityBitmask): Promise<
|
|
251
|
+
ezspSetExtendedSecurityBitmask(mask: EmberExtendedSecurityBitmask): Promise<SLStatus>;
|
|
221
252
|
/**
|
|
222
253
|
* Wrapper for `ezspGetValue`.
|
|
223
254
|
* @returns
|
|
224
255
|
*/
|
|
225
|
-
ezspGetExtendedSecurityBitmask(): Promise<[
|
|
256
|
+
ezspGetExtendedSecurityBitmask(): Promise<[SLStatus, mask: EmberExtendedSecurityBitmask]>;
|
|
226
257
|
/**
|
|
227
258
|
* Wrapper for `ezspSetValue`.
|
|
228
259
|
* @returns
|
|
229
260
|
*/
|
|
230
|
-
ezspStartWritingStackTokens(): Promise<
|
|
261
|
+
ezspStartWritingStackTokens(): Promise<SLStatus>;
|
|
231
262
|
/**
|
|
232
263
|
* Wrapper for `ezspSetValue`.
|
|
233
264
|
* @returns
|
|
234
265
|
*/
|
|
235
|
-
ezspStopWritingStackTokens(): Promise<
|
|
266
|
+
ezspStopWritingStackTokens(): Promise<SLStatus>;
|
|
236
267
|
/**
|
|
237
268
|
* The command allows the Host to specify the desired EZSP version and must be
|
|
238
269
|
* sent before any other command. The response provides information about the
|
|
@@ -240,10 +271,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
240
271
|
*
|
|
241
272
|
* @param desiredProtocolVersion uint8_t The EZSP version the Host wishes to use.
|
|
242
273
|
* To successfully set the version and allow other commands, this must be same as EZSP_PROTOCOL_VERSION.
|
|
243
|
-
* @
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
* - uint16_t * The version number of the stack.
|
|
274
|
+
* @returns uint8_t The EZSP version the NCP is using.
|
|
275
|
+
* @returns uint8_t * The type of stack running on the NCP (2).
|
|
276
|
+
* @returns uint16_t * The version number of the stack.
|
|
247
277
|
*/
|
|
248
278
|
ezspVersion(desiredProtocolVersion: number): Promise<[protocolVersion: number, stackType: number, stackVersion: number]>;
|
|
249
279
|
/**
|
|
@@ -251,11 +281,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
251
281
|
*
|
|
252
282
|
* @param configId Identifies which configuration value to read.
|
|
253
283
|
* @returns
|
|
254
|
-
* -
|
|
255
|
-
* -
|
|
256
|
-
*
|
|
284
|
+
* - SLStatus.OK if the value was read successfully,
|
|
285
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR (for SL_ZIGBEE_EZSP_ERROR_INVALID_ID) if the NCP does not recognize configId.
|
|
286
|
+
* @returns uint16_t * The configuration value.
|
|
257
287
|
*/
|
|
258
|
-
ezspGetConfigurationValue(configId: EzspConfigId): Promise<[
|
|
288
|
+
ezspGetConfigurationValue(configId: EzspConfigId): Promise<[SLStatus, value: number]>;
|
|
259
289
|
/**
|
|
260
290
|
* Writes a configuration value to the NCP. Configuration values can be modified
|
|
261
291
|
* by the Host after the NCP has reset. Once the status of the stack changes to
|
|
@@ -265,13 +295,13 @@ export declare class Ezsp extends EventEmitter {
|
|
|
265
295
|
* @param configId Identifies which configuration value to change.
|
|
266
296
|
* @param value uint16_t The new configuration value.
|
|
267
297
|
* @returns EzspStatus
|
|
268
|
-
* -
|
|
269
|
-
* -
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
298
|
+
* - SLStatus.OK if the configuration value was changed,
|
|
299
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if the new value exceeded the available memory,
|
|
300
|
+
* if the new value was out of bounds,
|
|
301
|
+
* if the NCP does not recognize configId,
|
|
302
|
+
* if configuration values can no longer be modified.
|
|
273
303
|
*/
|
|
274
|
-
ezspSetConfigurationValue(configId: EzspConfigId, value: number): Promise<
|
|
304
|
+
ezspSetConfigurationValue(configId: EzspConfigId, value: number): Promise<SLStatus>;
|
|
275
305
|
/**
|
|
276
306
|
* Read attribute data on NCP endpoints.
|
|
277
307
|
* @param endpoint uint8_t Endpoint
|
|
@@ -279,13 +309,12 @@ export declare class Ezsp extends EventEmitter {
|
|
|
279
309
|
* @param attributeId uint16_t Attribute ID.
|
|
280
310
|
* @param mask uint8_t Mask.
|
|
281
311
|
* @param manufacturerCode uint16_t Manufacturer code.
|
|
282
|
-
* @returns
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* - uint8_t * Attribute data.
|
|
312
|
+
* @returns An sl_zigbee_af_status_t value indicating success or the reason for failure, handled by the EZSP layer as a uint8_t.
|
|
313
|
+
* @returns uint8_t * Attribute data type.
|
|
314
|
+
* @returns uint8_t * Length of attribute data.
|
|
315
|
+
* @returns uint8_t * Attribute data.
|
|
287
316
|
*/
|
|
288
|
-
ezspReadAttribute(endpoint: number, cluster: number, attributeId: number, mask: number, manufacturerCode: number, readLength: number): Promise<[
|
|
317
|
+
ezspReadAttribute(endpoint: number, cluster: number, attributeId: number, mask: number, manufacturerCode: number, readLength: number): Promise<[SLStatus, dataType: number, outReadLength: number, data: number[]]>;
|
|
289
318
|
/**
|
|
290
319
|
* Write attribute data on NCP endpoints.
|
|
291
320
|
* @param endpoint uint8_t Endpoint
|
|
@@ -297,9 +326,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
297
326
|
* @param justTest Override read only and data type.
|
|
298
327
|
* @param dataType uint8_t Attribute data type.
|
|
299
328
|
* @param data uint8_t * Attribute data.
|
|
300
|
-
* @returns
|
|
329
|
+
* @returns An sl_zigbee_af_status_t value indicating success or the reason for failure.
|
|
301
330
|
*/
|
|
302
|
-
ezspWriteAttribute(endpoint: number, cluster: number, attributeId: number, mask: number, manufacturerCode: number, overrideReadOnlyAndDataType: boolean, justTest: boolean, dataType: number, data: Buffer): Promise<
|
|
331
|
+
ezspWriteAttribute(endpoint: number, cluster: number, attributeId: number, mask: number, manufacturerCode: number, overrideReadOnlyAndDataType: boolean, justTest: boolean, dataType: number, data: Buffer): Promise<SLStatus>;
|
|
303
332
|
/**
|
|
304
333
|
* Configures endpoint information on the NCP. The NCP does not remember these
|
|
305
334
|
* settings after a reset. Endpoints can be added by the Host after the NCP has
|
|
@@ -311,98 +340,126 @@ export declare class Ezsp extends EventEmitter {
|
|
|
311
340
|
* @param deviceVersion uint8_t The endpoint's device version.
|
|
312
341
|
* @param inputClusterList uint16_t * Input cluster IDs the endpoint will accept.
|
|
313
342
|
* @param outputClusterList uint16_t * Output cluster IDs the endpoint may send.
|
|
314
|
-
* @returns
|
|
315
|
-
* -
|
|
316
|
-
* -
|
|
317
|
-
*
|
|
318
|
-
*
|
|
343
|
+
* @returns
|
|
344
|
+
* - SLStatus.OK if the endpoint was added,
|
|
345
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if there is not enough memory available to add the endpoint,
|
|
346
|
+
* if the endpoint already exists,
|
|
347
|
+
* if endpoints can no longer be added.
|
|
319
348
|
*/
|
|
320
|
-
ezspAddEndpoint(endpoint: number, profileId: number, deviceId: number, deviceVersion: number, inputClusterList: number[], outputClusterList: number[]): Promise<
|
|
349
|
+
ezspAddEndpoint(endpoint: number, profileId: number, deviceId: number, deviceVersion: number, inputClusterList: number[], outputClusterList: number[]): Promise<SLStatus>;
|
|
321
350
|
/**
|
|
322
351
|
* Allows the Host to change the policies used by the NCP to make fast
|
|
323
352
|
* decisions.
|
|
324
353
|
* @param policyId Identifies which policy to modify.
|
|
325
354
|
* @param decisionId The new decision for the specified policy.
|
|
326
355
|
* @returns
|
|
327
|
-
* -
|
|
328
|
-
* -
|
|
356
|
+
* - SLStatus.OK if the policy was changed,
|
|
357
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if the NCP does not recognize policyId.
|
|
329
358
|
*/
|
|
330
|
-
ezspSetPolicy(policyId: EzspPolicyId, decisionId: number): Promise<
|
|
359
|
+
ezspSetPolicy(policyId: EzspPolicyId, decisionId: number): Promise<SLStatus>;
|
|
331
360
|
/**
|
|
332
361
|
* Allows the Host to read the policies used by the NCP to make fast decisions.
|
|
333
362
|
* @param policyId Identifies which policy to read.
|
|
334
363
|
* @returns
|
|
335
|
-
* -
|
|
336
|
-
* -
|
|
337
|
-
*
|
|
364
|
+
* - SLStatus.OK if the policy was read successfully,
|
|
365
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if the NCP does not recognize policyId.
|
|
366
|
+
* @returns EzspDecisionId * The current decision for the specified policy.
|
|
338
367
|
*/
|
|
339
|
-
ezspGetPolicy(policyId: EzspPolicyId): Promise<[
|
|
368
|
+
ezspGetPolicy(policyId: EzspPolicyId): Promise<[SLStatus, number]>;
|
|
340
369
|
/**
|
|
341
370
|
* Triggers a pan id update message.
|
|
342
371
|
* @param The new Pan Id
|
|
343
372
|
* @returns true if the request was successfully handed to the stack, false otherwise
|
|
344
373
|
*/
|
|
345
|
-
ezspSendPanIdUpdate(newPan:
|
|
374
|
+
ezspSendPanIdUpdate(newPan: PanId): Promise<boolean>;
|
|
346
375
|
/**
|
|
347
376
|
* Reads a value from the NCP.
|
|
348
377
|
* @param valueId Identifies which value to read.
|
|
349
378
|
* @returns
|
|
350
|
-
* -
|
|
351
|
-
* -
|
|
352
|
-
*
|
|
353
|
-
*
|
|
379
|
+
* - SLStatus.OK if the value was read successfully,
|
|
380
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if the NCP does not recognize valueId,
|
|
381
|
+
* if the length of the returned value exceeds the size of local storage allocated to receive it.
|
|
382
|
+
* @returns uint8_t * Both a command and response parameter.
|
|
354
383
|
* On command, the maximum in bytes of local storage allocated to receive the returned value.
|
|
355
384
|
* On response, the actual length in bytes of the returned value.
|
|
356
|
-
*
|
|
385
|
+
* @returns uint8_t * The value.
|
|
357
386
|
*/
|
|
358
|
-
ezspGetValue(valueId: EzspValueId, valueLength: number): Promise<[
|
|
387
|
+
ezspGetValue(valueId: EzspValueId, valueLength: number): Promise<[SLStatus, outValueLength: number, outValue: number[]]>;
|
|
359
388
|
/**
|
|
360
389
|
* Reads a value from the NCP but passes an extra argument specific to the value
|
|
361
390
|
* being retrieved.
|
|
362
391
|
* @param valueId Identifies which extended value ID to read.
|
|
363
392
|
* @param characteristics uint32_t Identifies which characteristics of the extended value ID to read. These are specific to the value being read.
|
|
364
393
|
* @returns
|
|
365
|
-
* -
|
|
366
|
-
* -
|
|
367
|
-
*
|
|
368
|
-
*
|
|
394
|
+
* - SLStatus.OK if the value was read successfully,
|
|
395
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if the NCP does not recognize valueId,
|
|
396
|
+
* if the length of the returned value exceeds the size of local storage allocated to receive it.
|
|
397
|
+
* @returns uint8_t * Both a command and response parameter.
|
|
369
398
|
* On command, the maximum in bytes of local storage allocated to receive the returned value.
|
|
370
399
|
* On response, the actual length in bytes of the returned value.
|
|
371
|
-
*
|
|
400
|
+
* @returns uint8_t * The value.
|
|
372
401
|
*/
|
|
373
|
-
ezspGetExtendedValue(valueId: EzspExtendedValueId, characteristics: number, valueLength: number): Promise<[
|
|
402
|
+
ezspGetExtendedValue(valueId: EzspExtendedValueId, characteristics: number, valueLength: number): Promise<[SLStatus, outValueLength: number, outValue: number[]]>;
|
|
374
403
|
/**
|
|
375
404
|
* Writes a value to the NCP.
|
|
376
405
|
* @param valueId Identifies which value to change.
|
|
377
406
|
* @param valueLength uint8_t The length of the value parameter in bytes.
|
|
378
407
|
* @param value uint8_t * The new value.
|
|
379
|
-
* @returns
|
|
380
|
-
* -
|
|
381
|
-
* -
|
|
382
|
-
*
|
|
383
|
-
*
|
|
408
|
+
* @returns
|
|
409
|
+
* - SLStatus.OK if the value was changed,
|
|
410
|
+
* - SLStatus.ZIGBEE_EZSP_ERROR if the new value was out of bounds,
|
|
411
|
+
* if the NCP does not recognize valueId,
|
|
412
|
+
* if the value could not be modified.
|
|
384
413
|
*/
|
|
385
|
-
ezspSetValue(valueId: EzspValueId, valueLength: number, value: number[]): Promise<
|
|
414
|
+
ezspSetValue(valueId: EzspValueId, valueLength: number, value: number[]): Promise<SLStatus>;
|
|
386
415
|
/**
|
|
387
|
-
* Allows the Host to control the broadcast behaviour of a routing device used
|
|
388
|
-
* by the NCP.
|
|
416
|
+
* Allows the Host to control the broadcast behaviour of a routing device used by the NCP.
|
|
389
417
|
* @param config uint8_t Passive ack config enum.
|
|
390
418
|
* @param minAcksNeeded uint8_t The minimum number of acknowledgments (re-broadcasts) to wait for until
|
|
391
419
|
* deeming the broadcast transmission complete.
|
|
392
|
-
* @returns
|
|
420
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
421
|
+
*/
|
|
422
|
+
ezspSetPassiveAckConfig(config: number, minAcksNeeded: number): Promise<SLStatus>;
|
|
423
|
+
/**
|
|
424
|
+
* Set the PAN ID to be accepted by the device in a NLME Network Update command.
|
|
425
|
+
* If this is set to a different value than its default 0xFFFF, NLME network update messages will be ignored if they do not match this PAN ID.
|
|
426
|
+
* @param panId uint16_t PAN ID to be accepted in a network update.
|
|
427
|
+
*/
|
|
428
|
+
ezspSetPendingNetworkUpdatePanId(panId: PanId): Promise<void>;
|
|
429
|
+
/**
|
|
430
|
+
* Retrieve the endpoint number located at the specified index.
|
|
431
|
+
* @param index uint8_t Index to retrieve the endpoint number for.
|
|
432
|
+
* @returns uint8_t Endpoint number at the index.
|
|
393
433
|
*/
|
|
394
|
-
|
|
434
|
+
ezspGetEndpoint(index: number): Promise<number>;
|
|
435
|
+
/**
|
|
436
|
+
* Get the number of configured endpoints.
|
|
437
|
+
* @returns uint8_t Number of configured endpoints.
|
|
438
|
+
*/
|
|
439
|
+
ezspGetEndpointCount(): Promise<number>;
|
|
440
|
+
/**
|
|
441
|
+
* Retrieve the endpoint description for the given endpoint number.
|
|
442
|
+
* @param endpoint Endpoint number to get the description of.
|
|
443
|
+
* @returns Description of this endpoint.
|
|
444
|
+
*/
|
|
445
|
+
ezspGetEndpointDescription(endpoint: number): Promise<EmberEndpointDescription>;
|
|
446
|
+
/**
|
|
447
|
+
* Retrieve one of the cluster IDs associated with the given endpoint.
|
|
448
|
+
* @param endpoint Endpoint number to get a cluster ID for.
|
|
449
|
+
* @param listId Which list to get the cluster ID from. (0 for input, 1 for output).
|
|
450
|
+
* @param listIndex Index from requested list to look at the cluster ID of.
|
|
451
|
+
* @returns ID of the requested cluster.
|
|
452
|
+
*/
|
|
453
|
+
ezspGetEndpointCluster(endpoint: number, listId: number, listIndex: number): Promise<number>;
|
|
395
454
|
/**
|
|
396
455
|
* A command which does nothing. The Host can use this to set the sleep mode or to check the status of the NCP.
|
|
397
456
|
*/
|
|
398
457
|
ezspNop(): Promise<void>;
|
|
399
458
|
/**
|
|
400
|
-
* Variable length data from the Host is echoed back by the NCP.
|
|
401
|
-
* has no other effects and is designed for testing the link between the Host and NCP.
|
|
459
|
+
* Variable length data from the Host is echoed back by the NCP.
|
|
460
|
+
* This command has no other effects and is designed for testing the link between the Host and NCP.
|
|
402
461
|
* @param data uint8_t * The data to be echoed back.
|
|
403
|
-
* @returns
|
|
404
|
-
* - The length of the echo parameter in bytes.
|
|
405
|
-
* - echo uint8_t * The echo of the data.
|
|
462
|
+
* @returns uint8_t * The echo of the data.
|
|
406
463
|
*/
|
|
407
464
|
ezspEcho(data: Buffer): Promise<Buffer>;
|
|
408
465
|
/**
|
|
@@ -418,24 +475,22 @@ export declare class Ezsp extends EventEmitter {
|
|
|
418
475
|
* Sets a token (8 bytes of non-volatile storage) in the Simulated EEPROM of the NCP.
|
|
419
476
|
* @param tokenId uint8_t Which token to set
|
|
420
477
|
* @param tokenData uint8_t * The data to write to the token.
|
|
421
|
-
* @returns
|
|
478
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
422
479
|
*/
|
|
423
|
-
ezspSetToken(tokenId: number, tokenData: number[]): Promise<
|
|
480
|
+
ezspSetToken(tokenId: number, tokenData: number[]): Promise<SLStatus>;
|
|
424
481
|
/**
|
|
425
482
|
* Retrieves a token (8 bytes of non-volatile storage) from the Simulated EEPROM of the NCP.
|
|
426
483
|
* @param tokenId uint8_t Which token to read
|
|
427
|
-
* @returns
|
|
428
|
-
*
|
|
429
|
-
* - uint8_t * The contents of the token.
|
|
484
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
485
|
+
* @returns uint8_t * The contents of the token.
|
|
430
486
|
*/
|
|
431
|
-
ezspGetToken(tokenId: number): Promise<[
|
|
487
|
+
ezspGetToken(tokenId: number): Promise<[SLStatus, tokenData: number[]]>;
|
|
432
488
|
/**
|
|
433
489
|
* Retrieves a manufacturing token from the Flash Information Area of the NCP
|
|
434
490
|
* (except for EZSP_STACK_CAL_DATA which is managed by the stack).
|
|
435
|
-
* @param
|
|
436
|
-
* @returns
|
|
437
|
-
*
|
|
438
|
-
* - uint8_t * The manufacturing token data.
|
|
491
|
+
* @param tokenId Which manufacturing token to read.
|
|
492
|
+
* @returns uint8_t The length of the tokenData parameter in bytes.
|
|
493
|
+
* @returns uint8_t * The manufacturing token data.
|
|
439
494
|
*/
|
|
440
495
|
ezspGetMfgToken(tokenId: EzspMfgTokenId): Promise<[number, tokenData: number[]]>;
|
|
441
496
|
/**
|
|
@@ -445,9 +500,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
445
500
|
* EZSP_MFG_CBKE_DATA token.
|
|
446
501
|
* @param tokenId Which manufacturing token to set.
|
|
447
502
|
* @param tokenData uint8_t * The manufacturing token data.
|
|
448
|
-
* @returns An
|
|
503
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
449
504
|
*/
|
|
450
|
-
ezspSetMfgToken(tokenId: EzspMfgTokenId, tokenData: Buffer): Promise<
|
|
505
|
+
ezspSetMfgToken(tokenId: EzspMfgTokenId, tokenData: Buffer): Promise<SLStatus>;
|
|
451
506
|
/**
|
|
452
507
|
* Callback
|
|
453
508
|
* A callback invoked to inform the application that a stack token has changed.
|
|
@@ -456,11 +511,10 @@ export declare class Ezsp extends EventEmitter {
|
|
|
456
511
|
ezspStackTokenChangedHandler(tokenAddress: number): void;
|
|
457
512
|
/**
|
|
458
513
|
* Returns a pseudorandom number.
|
|
459
|
-
* @returns
|
|
460
|
-
*
|
|
461
|
-
* - uint16_t * A pseudorandom number.
|
|
514
|
+
* @returns Always returns SLStatus.OK.
|
|
515
|
+
* @returns uint16_t * A pseudorandom number.
|
|
462
516
|
*/
|
|
463
|
-
ezspGetRandomNumber(): Promise<[
|
|
517
|
+
ezspGetRandomNumber(): Promise<[SLStatus, value: number]>;
|
|
464
518
|
/**
|
|
465
519
|
* Sets a timer on the NCP. There are 2 independent timers available for use by the Host.
|
|
466
520
|
* A timer can be cancelled by setting time to 0 or units to EMBER_EVENT_INACTIVE.
|
|
@@ -470,18 +524,17 @@ export declare class Ezsp extends EventEmitter {
|
|
|
470
524
|
* This means that the actual delay will be between time and (time - 1). The maximum delay is 32767.
|
|
471
525
|
* @param units The units for time.
|
|
472
526
|
* @param repeat If true, a timerHandler callback will be generated repeatedly. If false, only a single timerHandler callback will be generated.
|
|
473
|
-
* @returns An
|
|
527
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
474
528
|
*/
|
|
475
|
-
ezspSetTimer(timerId: number, time: number, units: EmberEventUnits, repeat: boolean): Promise<
|
|
529
|
+
ezspSetTimer(timerId: number, time: number, units: EmberEventUnits, repeat: boolean): Promise<SLStatus>;
|
|
476
530
|
/**
|
|
477
531
|
* Gets information about a timer. The Host can use this command to find out how
|
|
478
532
|
* much longer it will be before a previously set timer will generate a
|
|
479
533
|
* callback.
|
|
480
534
|
* @param timerId uint8_t Which timer to get information about (0 or 1).
|
|
481
|
-
* @returns
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
* - bool * True if a timerHandler callback will be generated repeatedly. False if only a single timerHandler callback will be generated.
|
|
535
|
+
* @returns uint16_t The delay before the timerHandler callback will be generated.
|
|
536
|
+
* @returns EmberEventUnits * The units for time.
|
|
537
|
+
* @returns bool * True if a timerHandler callback will be generated repeatedly. False if only a single timerHandler callback will be generated.
|
|
485
538
|
*/
|
|
486
539
|
ezspGetTimer(timerId: number): Promise<[number, units: EmberEventUnits, repeat: boolean]>;
|
|
487
540
|
/**
|
|
@@ -494,9 +547,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
494
547
|
* Sends a debug message from the Host to the Network Analyzer utility via the NCP.
|
|
495
548
|
* @param binaryMessage true if the message should be interpreted as binary data, false if the message should be interpreted as ASCII text.
|
|
496
549
|
* @param messageContents uint8_t * The binary message.
|
|
497
|
-
* @returns An
|
|
550
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
498
551
|
*/
|
|
499
|
-
ezspDebugWrite(binaryMessage: boolean, messageContents: Buffer): Promise<
|
|
552
|
+
ezspDebugWrite(binaryMessage: boolean, messageContents: Buffer): Promise<SLStatus>;
|
|
500
553
|
/**
|
|
501
554
|
* Retrieves and clears Ember counters. See the EmberCounterType enumeration for the counter types.
|
|
502
555
|
* @returns uint16_t * A list of all counter values ordered according to the EmberCounterType enumeration.
|
|
@@ -529,12 +582,12 @@ export declare class Ezsp extends EventEmitter {
|
|
|
529
582
|
* the response contains also the manufacturer ID and the version number of the
|
|
530
583
|
* XNCP application that is running on the NCP.
|
|
531
584
|
* @returns
|
|
532
|
-
* -
|
|
533
|
-
* -
|
|
534
|
-
*
|
|
535
|
-
*
|
|
585
|
+
* - SLStatus.OK if the NCP is running the XNCP library.
|
|
586
|
+
* - SLStatus.INVALID_STATE otherwise.
|
|
587
|
+
* @returns manufacturerId uint16_t * The manufactured ID the user has defined in the XNCP application.
|
|
588
|
+
* @returns versionNumber uint16_t * The version number of the XNCP application.
|
|
536
589
|
*/
|
|
537
|
-
ezspGetXncpInfo(): Promise<[
|
|
590
|
+
ezspGetXncpInfo(): Promise<[SLStatus, manufacturerId: number, versionNumber: number]>;
|
|
538
591
|
/**
|
|
539
592
|
* Provides the customer a custom EZSP frame. On the NCP, these frames are only
|
|
540
593
|
* handled if the XNCP library is included. On the NCP side these frames are
|
|
@@ -542,28 +595,26 @@ export declare class Ezsp extends EventEmitter {
|
|
|
542
595
|
* function.
|
|
543
596
|
* @param uint8_t * The payload of the custom frame (maximum 119 bytes).
|
|
544
597
|
* @param uint8_t The expected length of the response.
|
|
545
|
-
* @returns
|
|
546
|
-
*
|
|
547
|
-
* - uint8_t *The response.
|
|
598
|
+
* @returns The status returned by the custom command.
|
|
599
|
+
* @returns uint8_t *The response.
|
|
548
600
|
*/
|
|
549
|
-
ezspCustomFrame(payload: Buffer, replyLength: number): Promise<[
|
|
601
|
+
ezspCustomFrame(payload: Buffer, replyLength: number): Promise<[SLStatus, outReply: Buffer]>;
|
|
550
602
|
/**
|
|
551
603
|
* Callback
|
|
552
604
|
* A callback indicating a custom EZSP message has been received.
|
|
553
|
-
* @param payloadLength uint8_t The length of the custom frame payload.
|
|
554
605
|
* @param payload uint8_t * The payload of the custom frame.
|
|
555
606
|
*/
|
|
556
|
-
ezspCustomFrameHandler(
|
|
607
|
+
ezspCustomFrameHandler(payload: Buffer): void;
|
|
557
608
|
/**
|
|
558
609
|
* Returns the EUI64 ID of the local node.
|
|
559
610
|
* @returns The 64-bit ID.
|
|
560
611
|
*/
|
|
561
|
-
ezspGetEui64(): Promise<
|
|
612
|
+
ezspGetEui64(): Promise<EUI64>;
|
|
562
613
|
/**
|
|
563
614
|
* Returns the 16-bit node ID of the local node.
|
|
564
615
|
* @returns The 16-bit ID.
|
|
565
616
|
*/
|
|
566
|
-
ezspGetNodeId(): Promise<
|
|
617
|
+
ezspGetNodeId(): Promise<NodeId>;
|
|
567
618
|
/**
|
|
568
619
|
* Returns number of phy interfaces present.
|
|
569
620
|
* @returns uint8_t Value indicate how many phy interfaces present.
|
|
@@ -574,30 +625,77 @@ export declare class Ezsp extends EventEmitter {
|
|
|
574
625
|
* @returns Value indicates the used entropy source.
|
|
575
626
|
*/
|
|
576
627
|
ezspGetTrueRandomEntropySource(): Promise<EmberEntropySource>;
|
|
628
|
+
/**
|
|
629
|
+
* Extend a joiner's timeout to wait for the network key on the joiner default key timeout is 3 sec,
|
|
630
|
+
* and only values greater equal to 3 sec are accepted.
|
|
631
|
+
* @param networkKeyTimeoutS Network key timeout
|
|
632
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
633
|
+
*/
|
|
634
|
+
ezspSetupDelayedJoin(networkKeyTimeoutS: number): Promise<SLStatus>;
|
|
635
|
+
/**
|
|
636
|
+
* Get the current scheduler priorities for multiprotocol apps.
|
|
637
|
+
* @returns The current priorities.
|
|
638
|
+
*/
|
|
639
|
+
ezspRadioGetSchedulerPriorities(): Promise<EmberMultiprotocolPriorities>;
|
|
640
|
+
/**
|
|
641
|
+
* Set the current scheduler priorities for multiprotocol apps.
|
|
642
|
+
* @param priorities The current priorities.
|
|
643
|
+
*/
|
|
644
|
+
ezspRadioSetSchedulerPriorities(priorities: EmberMultiprotocolPriorities): Promise<void>;
|
|
645
|
+
/**
|
|
646
|
+
* Get the current multiprotocol sliptime
|
|
647
|
+
* @returns Value of the current slip time.
|
|
648
|
+
*/
|
|
649
|
+
ezspRadioGetSchedulerSliptime(): Promise<number>;
|
|
650
|
+
/**
|
|
651
|
+
* Set the current multiprotocol sliptime
|
|
652
|
+
* @param slipTime Value of the current slip time.
|
|
653
|
+
*/
|
|
654
|
+
ezspRadioSetSchedulerSliptime(slipTime: number): Promise<void>;
|
|
655
|
+
/**
|
|
656
|
+
* Check if a particular counter is one that could report from either a 2.4GHz or sub-GHz interface.
|
|
657
|
+
* @param counter The counter to be checked.
|
|
658
|
+
* @returns Whether this counter requires a PHY index when operating on a dual-PHY system.
|
|
659
|
+
*/
|
|
660
|
+
ezspCounterRequiresPhyIndex(counter: EmberCounterType): Promise<boolean>;
|
|
661
|
+
/**
|
|
662
|
+
* Check if a particular counter can report on the destination node ID they have been triggered from.
|
|
663
|
+
* @param counter The counter to be checked.
|
|
664
|
+
* @returns Whether this counter requires the destination node ID.
|
|
665
|
+
*/
|
|
666
|
+
ezspCounterRequiresDestinationNodeId(counter: EmberCounterType): Promise<boolean>;
|
|
577
667
|
/**
|
|
578
668
|
* Sets the manufacturer code to the specified value.
|
|
579
669
|
* The manufacturer code is one of the fields of the node descriptor.
|
|
580
670
|
* @param code uint16_t The manufacturer code for the local node.
|
|
581
671
|
*/
|
|
582
672
|
ezspSetManufacturerCode(code: number): Promise<void>;
|
|
673
|
+
/**
|
|
674
|
+
* Gets the manufacturer code to the specified value.
|
|
675
|
+
* The manufacturer code is one of the fields of the node descriptor.
|
|
676
|
+
* @returns The manufacturer code for the local node.
|
|
677
|
+
*/
|
|
678
|
+
ezspGetManufacturerCode(): Promise<number>;
|
|
583
679
|
/**
|
|
584
680
|
* Sets the power descriptor to the specified value. The power descriptor is a
|
|
585
681
|
* dynamic value. Therefore, you should call this function whenever the value
|
|
586
682
|
* changes.
|
|
587
683
|
* @param descriptor uint16_t The new power descriptor for the local node.
|
|
684
|
+
* @returns An SLStatus value indicating success or the reason for failure. Always `OK` in v13-.
|
|
588
685
|
*/
|
|
589
|
-
ezspSetPowerDescriptor(descriptor: number): Promise<
|
|
686
|
+
ezspSetPowerDescriptor(descriptor: number): Promise<SLStatus>;
|
|
590
687
|
/**
|
|
591
688
|
* Resume network operation after a reboot. The node retains its original type.
|
|
592
689
|
* This should be called on startup whether or not the node was previously part
|
|
593
690
|
* of a network. EMBER_NOT_JOINED is returned if the node is not part of a
|
|
594
691
|
* network. This command accepts options to control the network initialization.
|
|
595
692
|
* @param networkInitStruct EmberNetworkInitStruct * An EmberNetworkInitStruct containing the options for initialization.
|
|
596
|
-
* @returns
|
|
597
|
-
*
|
|
598
|
-
*
|
|
693
|
+
* @returns
|
|
694
|
+
* - SLStatus.OK if successful initialization,
|
|
695
|
+
* - SLStatus.NOT_JOINED if the node is not part of a network
|
|
696
|
+
* - or the reason for failure.
|
|
599
697
|
*/
|
|
600
|
-
ezspNetworkInit(networkInitStruct: EmberNetworkInitStruct): Promise<
|
|
698
|
+
ezspNetworkInit(networkInitStruct: EmberNetworkInitStruct): Promise<SLStatus>;
|
|
601
699
|
/**
|
|
602
700
|
* Returns a value indicating whether the node is joining, joined to, or leaving a network.
|
|
603
701
|
* @returns Command send status.
|
|
@@ -613,7 +711,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
613
711
|
* updated.
|
|
614
712
|
* @param status Stack status
|
|
615
713
|
*/
|
|
616
|
-
ezspStackStatusHandler(status:
|
|
714
|
+
ezspStackStatusHandler(status: SLStatus): void;
|
|
617
715
|
/**
|
|
618
716
|
* This function will start a scan.
|
|
619
717
|
* @param scanType Indicates the type of scan to be performed. Possible values are: EZSP_ENERGY_SCAN and EZSP_ACTIVE_SCAN.
|
|
@@ -627,11 +725,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
627
725
|
* @param duration uint8_t Sets the exponent of the number of scan periods, where a scan period is 960 symbols.
|
|
628
726
|
* The scan will occur for ((2^duration) + 1) scan periods.
|
|
629
727
|
* @returns
|
|
630
|
-
* -
|
|
631
|
-
* -
|
|
632
|
-
* -
|
|
633
|
-
* -
|
|
634
|
-
* -
|
|
728
|
+
* - SLStatus.OK signals that the scan successfully started. Possible error responses and their meanings:
|
|
729
|
+
* - SLStatus.MAC_SCANNING, we are already scanning;
|
|
730
|
+
* - SLStatus.BAD_SCAN_DURATION, we have set a duration value that is not 0..14 inclusive;
|
|
731
|
+
* - SLStatus.MAC_INCORRECT_SCAN_TYPE, we have requested an undefined scanning type;
|
|
732
|
+
* - SLStatus.INVALID_CHANNEL_MASK, our channel mask did not specify any valid channels.
|
|
635
733
|
*/
|
|
636
734
|
ezspStartScan(scanType: EzspNetworkScanType, channelMask: number, duration: number): Promise<SLStatus>;
|
|
637
735
|
/**
|
|
@@ -654,12 +752,10 @@ export declare class Ezsp extends EventEmitter {
|
|
|
654
752
|
/**
|
|
655
753
|
* Callback
|
|
656
754
|
* @param channel uint8_t The channel on which the current error occurred. Undefined for the case of EMBER_SUCCESS.
|
|
657
|
-
* @param status The error condition that occurred on the current channel. Value will be
|
|
658
|
-
*
|
|
659
|
-
* EZSP_ACTIVE_SCAN. EMBER_SUCCESS signals that the scan has completed. Other
|
|
660
|
-
* error conditions signify a failure to scan on the channel specified.
|
|
755
|
+
* @param status The error condition that occurred on the current channel. Value will be SLStatus.OK when the scan has completed.
|
|
756
|
+
* Other error conditions signify a failure to scan on the channel specified.
|
|
661
757
|
*/
|
|
662
|
-
ezspScanCompleteHandler(channel: number, status:
|
|
758
|
+
ezspScanCompleteHandler(channel: number, status: SLStatus): void;
|
|
663
759
|
/**
|
|
664
760
|
* Callback
|
|
665
761
|
* This function returns an unused panID and channel pair found via the find
|
|
@@ -667,26 +763,25 @@ export declare class Ezsp extends EventEmitter {
|
|
|
667
763
|
* @param The unused panID which has been found.
|
|
668
764
|
* @param channel uint8_t The channel that the unused panID was found on.
|
|
669
765
|
*/
|
|
670
|
-
ezspUnusedPanIdFoundHandler(panId:
|
|
766
|
+
ezspUnusedPanIdFoundHandler(panId: PanId, channel: number): void;
|
|
671
767
|
/**
|
|
672
768
|
* This function starts a series of scans which will return an available panId.
|
|
673
769
|
* @param channelMask uint32_t The channels that will be scanned for available panIds.
|
|
674
770
|
* @param duration uint8_t The duration of the procedure.
|
|
675
|
-
* @returns The error condition that occurred during the scan. Value will be
|
|
676
|
-
* EMBER_SUCCESS if there are no errors.
|
|
771
|
+
* @returns The error condition that occurred during the scan. Value will be SLStatus.OK if there are no errors.
|
|
677
772
|
*/
|
|
678
|
-
ezspFindUnusedPanId(channelMask: number, duration: number): Promise<
|
|
773
|
+
ezspFindUnusedPanId(channelMask: number, duration: number): Promise<SLStatus>;
|
|
679
774
|
/**
|
|
680
775
|
* Terminates a scan in progress.
|
|
681
|
-
* @returns An
|
|
776
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
682
777
|
*/
|
|
683
|
-
ezspStopScan(): Promise<
|
|
778
|
+
ezspStopScan(): Promise<SLStatus>;
|
|
684
779
|
/**
|
|
685
780
|
* Forms a new network by becoming the coordinator.
|
|
686
781
|
* @param parameters EmberNetworkParameters * Specification of the new network.
|
|
687
|
-
* @returns An
|
|
782
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
688
783
|
*/
|
|
689
|
-
ezspFormNetwork(parameters: EmberNetworkParameters): Promise<
|
|
784
|
+
ezspFormNetwork(parameters: EmberNetworkParameters): Promise<SLStatus>;
|
|
690
785
|
/**
|
|
691
786
|
* Causes the stack to associate with the network using the specified network
|
|
692
787
|
* parameters. It can take several seconds for the stack to associate with the
|
|
@@ -695,9 +790,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
695
790
|
* @param nodeType Specification of the role that this node will have in the network.
|
|
696
791
|
* This role must not be EMBER_COORDINATOR. To be a coordinator, use the formNetwork command.
|
|
697
792
|
* @param parameters EmberNetworkParameters * Specification of the network with which the node should associate.
|
|
698
|
-
* @returns An
|
|
793
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
699
794
|
*/
|
|
700
|
-
ezspJoinNetwork(nodeType: EmberNodeType, parameters: EmberNetworkParameters): Promise<
|
|
795
|
+
ezspJoinNetwork(nodeType: EmberNodeType, parameters: EmberNetworkParameters): Promise<SLStatus>;
|
|
701
796
|
/**
|
|
702
797
|
* Causes the stack to associate with the network using the specified network
|
|
703
798
|
* parameters in the beacon parameter. It can take several seconds for the stack
|
|
@@ -713,16 +808,17 @@ export declare class Ezsp extends EventEmitter {
|
|
|
713
808
|
* @param beacon EmberBeaconData * Specifies the network with which the node should associate.
|
|
714
809
|
* @param radioTxPower int8_t The radio transmit power to use, specified in dBm.
|
|
715
810
|
* @param clearBeaconsAfterNetworkUp If true, clear beacons in cache upon join success. If join fail, do nothing.
|
|
716
|
-
* @returns An
|
|
811
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
717
812
|
*/
|
|
718
|
-
ezspJoinNetworkDirectly(localNodeType: EmberNodeType, beacon: EmberBeaconData, radioTxPower: number, clearBeaconsAfterNetworkUp: boolean): Promise<
|
|
813
|
+
ezspJoinNetworkDirectly(localNodeType: EmberNodeType, beacon: EmberBeaconData, radioTxPower: number, clearBeaconsAfterNetworkUp: boolean): Promise<SLStatus>;
|
|
719
814
|
/**
|
|
720
815
|
* Causes the stack to leave the current network. This generates a
|
|
721
816
|
* stackStatusHandler callback to indicate that the network is down. The radio
|
|
722
817
|
* will not be used until after sending a formNetwork or joinNetwork command.
|
|
723
|
-
* @
|
|
818
|
+
* @param options This parameter gives options when leave network
|
|
819
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
724
820
|
*/
|
|
725
|
-
ezspLeaveNetwork(): Promise<
|
|
821
|
+
ezspLeaveNetwork(options?: EmberLeaveNetworkOption): Promise<SLStatus>;
|
|
726
822
|
/**
|
|
727
823
|
* The application may call this function when contact with the network has been
|
|
728
824
|
* lost. The most common usage case is when an end device can no longer
|
|
@@ -740,17 +836,21 @@ export declare class Ezsp extends EventEmitter {
|
|
|
740
836
|
* If the Trust Center allows the rejoin then the current Network Key will be sent encrypted using the device's Link Key.
|
|
741
837
|
* @param channelMask uint32_t A mask indicating the channels to be scanned. See emberStartScan for format details.
|
|
742
838
|
* A value of 0 is reinterpreted as the mask for the current channel.
|
|
743
|
-
* @
|
|
839
|
+
* @param reason uint8_t A sl_zigbee_rejoin_reason_t variable which could be passed in if there is actually a reason for rejoin,
|
|
840
|
+
* or could be left at 0xFF
|
|
841
|
+
* @param nodeType uint8_t The rejoin could be triggered with a different nodeType.
|
|
842
|
+
* This value could be set to 0 or SL_ZIGBEE_DEVICE_TYPE_UNCHANGED if not needed.
|
|
843
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
744
844
|
*/
|
|
745
|
-
ezspFindAndRejoinNetwork(haveCurrentNetworkKey: boolean, channelMask: number): Promise<
|
|
845
|
+
ezspFindAndRejoinNetwork(haveCurrentNetworkKey: boolean, channelMask: number, reason?: number, nodeType?: number): Promise<SLStatus>;
|
|
746
846
|
/**
|
|
747
847
|
* Tells the stack to allow other nodes to join the network with this node as
|
|
748
848
|
* their parent. Joining is initially disabled by default.
|
|
749
849
|
* @param duration uint8_t A value of 0x00 disables joining. A value of 0xFF enables joining.
|
|
750
850
|
* Any other value enables joining for that number of seconds.
|
|
751
|
-
* @returns An
|
|
851
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
752
852
|
*/
|
|
753
|
-
ezspPermitJoining(duration: number): Promise<
|
|
853
|
+
ezspPermitJoining(duration: number): Promise<SLStatus>;
|
|
754
854
|
/**
|
|
755
855
|
* Callback
|
|
756
856
|
* Indicates that a child has joined or left.
|
|
@@ -760,7 +860,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
760
860
|
* @param childEui64 The EUI64 of the child.
|
|
761
861
|
* @param childType The node type of the child.
|
|
762
862
|
*/
|
|
763
|
-
ezspChildJoinHandler(index: number, joining: boolean, childId:
|
|
863
|
+
ezspChildJoinHandler(index: number, joining: boolean, childId: NodeId, childEui64: EUI64, childType: EmberNodeType): void;
|
|
764
864
|
/**
|
|
765
865
|
* Sends a ZDO energy scan request. This request may only be sent by the current
|
|
766
866
|
* network manager and must be unicast, not broadcast. See ezsp-utils.h for
|
|
@@ -771,58 +871,149 @@ export declare class Ezsp extends EventEmitter {
|
|
|
771
871
|
* @param scanDuration uint8_t How long to scan on each channel.
|
|
772
872
|
* Allowed values are 0..5, with the scan times as specified by 802.15.4 (0 = 31ms, 1 = 46ms, 2 = 77ms, 3 = 138ms, 4 = 261ms, 5 = 507ms).
|
|
773
873
|
* @param scanCount uint16_t The number of scans to be performed on each channel (1..8).
|
|
774
|
-
* @returns An
|
|
874
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
775
875
|
*/
|
|
776
|
-
ezspEnergyScanRequest(target:
|
|
876
|
+
ezspEnergyScanRequest(target: NodeId, scanChannels: number, scanDuration: number, scanCount: number): Promise<SLStatus>;
|
|
777
877
|
/**
|
|
778
878
|
* Returns the current network parameters.
|
|
779
|
-
* @returns An
|
|
879
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
780
880
|
* @returns EmberNodeType * An EmberNodeType value indicating the current node type.
|
|
781
881
|
* @returns EmberNetworkParameters * The current network parameters.
|
|
782
882
|
*/
|
|
783
|
-
ezspGetNetworkParameters(): Promise<[
|
|
883
|
+
ezspGetNetworkParameters(): Promise<[SLStatus, nodeType: EmberNodeType, parameters: EmberNetworkParameters]>;
|
|
784
884
|
/**
|
|
785
885
|
* Returns the current radio parameters based on phy index.
|
|
786
886
|
* @param phyIndex uint8_t Desired index of phy interface for radio parameters.
|
|
787
|
-
* @returns An
|
|
887
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
788
888
|
* @returns EmberMultiPhyRadioParameters * The current radio parameters based on provided phy index.
|
|
789
889
|
*/
|
|
790
|
-
ezspGetRadioParameters(phyIndex: number): Promise<[
|
|
890
|
+
ezspGetRadioParameters(phyIndex: number): Promise<[SLStatus, parameters: EmberMultiPhyRadioParameters]>;
|
|
791
891
|
/**
|
|
792
892
|
* Returns information about the children of the local node and the parent of
|
|
793
893
|
* the local node.
|
|
794
894
|
* @returns uint8_t The number of children the node currently has.
|
|
795
895
|
* @returns The parent's EUI64. The value is undefined for nodes without parents (coordinators and nodes that are not joined to a network).
|
|
796
|
-
* @returns
|
|
896
|
+
* @returns NodeId * The parent's node ID. The value is undefined for nodes without parents
|
|
797
897
|
* (coordinators and nodes that are not joined to a network).
|
|
798
898
|
*/
|
|
799
|
-
ezspGetParentChildParameters(): Promise<[number, parentEui64:
|
|
899
|
+
ezspGetParentChildParameters(): Promise<[number, parentEui64: EUI64, parentNodeId: NodeId]>;
|
|
900
|
+
/**
|
|
901
|
+
* Return the number of router children that the node currently has.
|
|
902
|
+
* @returns The number of router children.
|
|
903
|
+
*/
|
|
904
|
+
ezspRouterChildCount(): Promise<number>;
|
|
905
|
+
/**
|
|
906
|
+
* Return the maximum number of children for this node.
|
|
907
|
+
* The return value is undefined for nodes that are not joined to a network.
|
|
908
|
+
* @returns The maximum number of children.
|
|
909
|
+
*/
|
|
910
|
+
ezspMaxChildCount(): Promise<number>;
|
|
911
|
+
/**
|
|
912
|
+
* Return the maximum number of router children for this node.
|
|
913
|
+
* The return value is undefined for nodes that are not joined to a network.
|
|
914
|
+
* @returns The maximum number of router children.
|
|
915
|
+
*/
|
|
916
|
+
ezspMaxRouterChildCount(): Promise<number>;
|
|
917
|
+
/**
|
|
918
|
+
*
|
|
919
|
+
* @returns
|
|
920
|
+
*/
|
|
921
|
+
ezspGetParentIncomingNwkFrameCounter(): Promise<number>;
|
|
922
|
+
/**
|
|
923
|
+
*
|
|
924
|
+
* @param value uint32_t
|
|
925
|
+
* @returns
|
|
926
|
+
*/
|
|
927
|
+
ezspSetParentIncomingNwkFrameCounter(value: number): Promise<SLStatus>;
|
|
928
|
+
/**
|
|
929
|
+
* Return a bitmask indicating the stack's current tasks.
|
|
930
|
+
* The mask ::SL_ZIGBEE_HIGH_PRIORITY_TASKS defines which tasks are high priority.
|
|
931
|
+
* Devices should not sleep if any high priority tasks are active.
|
|
932
|
+
* Active tasks that are not high priority are waiting for messages to arrive from other devices.
|
|
933
|
+
* If there are active tasks, but no high priority ones, the device may sleep but should periodically wake up
|
|
934
|
+
* and call ::emberPollForData() in order to receive messages.
|
|
935
|
+
* Parents will hold messages for ::SL_ZIGBEE_INDIRECT_TRANSMISSION_TIMEOUT milliseconds before discarding them.
|
|
936
|
+
* @returns A bitmask of the stack's active tasks.
|
|
937
|
+
*/
|
|
938
|
+
ezspCurrentStackTasks(): Promise<number>;
|
|
939
|
+
/**
|
|
940
|
+
* Indicate whether the stack is currently in a state where there are no high-priority tasks, allowing the device to sleep.
|
|
941
|
+
* There may be tasks expecting incoming messages, in which case the device should periodically wake up
|
|
942
|
+
* and call ::emberPollForData() in order to receive messages.
|
|
943
|
+
* This function can only be called when the node type is ::SL_ZIGBEE_SLEEPY_END_DEVICE
|
|
944
|
+
* @returns True if the application may sleep but the stack may be expecting incoming messages.
|
|
945
|
+
*/
|
|
946
|
+
ezspOkToNap(): Promise<boolean>;
|
|
947
|
+
/**
|
|
948
|
+
* Indicate whether the parent token has been set by association.
|
|
949
|
+
* @returns True if the parent token has been set.
|
|
950
|
+
*/
|
|
951
|
+
ezspParentTokenSet(): Promise<boolean>;
|
|
952
|
+
/**
|
|
953
|
+
* Indicate whether the stack currently has any tasks pending.
|
|
954
|
+
* If no tasks are pending, ::emberTick() does not need to be called until the next time a stack API function is called.
|
|
955
|
+
* This function can only be called when the node type is ::SL_ZIGBEE_SLEEPY_END_DEVICE.
|
|
956
|
+
* @returns True if the application may sleep for as long as it wishes.
|
|
957
|
+
*/
|
|
958
|
+
ezspOkToHibernate(): Promise<boolean>;
|
|
959
|
+
/**
|
|
960
|
+
* Indicate whether the stack is currently in a state that does not require the application to periodically poll.
|
|
961
|
+
* @returns True if the device may poll less frequently.
|
|
962
|
+
*/
|
|
963
|
+
ezspOkToLongPoll(): Promise<boolean>;
|
|
964
|
+
/**
|
|
965
|
+
* Calling this function will render all other stack functions except ezspStackPowerUp() non-functional until the radio is powered back on.
|
|
966
|
+
*/
|
|
967
|
+
ezspStackPowerDown(): Promise<void>;
|
|
968
|
+
/**
|
|
969
|
+
* Initialize the radio. Typically called coming out of deep sleep.
|
|
970
|
+
* For non-sleepy devices, also turns the radio on and leaves it in RX mode.
|
|
971
|
+
*/
|
|
972
|
+
ezspStackPowerUp(): Promise<void>;
|
|
800
973
|
/**
|
|
801
974
|
* Returns information about a child of the local node.
|
|
802
975
|
* @param uint8_t The index of the child of interest in the child table. Possible indexes range from zero to EMBER_CHILD_TABLE_SIZE.
|
|
803
|
-
* @returns
|
|
976
|
+
* @returns
|
|
977
|
+
* - SLStatus.OK if there is a child at index.
|
|
978
|
+
* - SLStatus.NOT_JOINED if there is no child at index.
|
|
804
979
|
* @returns EmberChildData * The data of the child.
|
|
805
980
|
*/
|
|
806
|
-
ezspGetChildData(index: number): Promise<[
|
|
981
|
+
ezspGetChildData(index: number): Promise<[SLStatus, childData: EmberChildData]>;
|
|
807
982
|
/**
|
|
808
983
|
* Sets child data to the child table token.
|
|
809
984
|
* @param index uint8_t The index of the child of interest in the child table. Possible indexes range from zero to (EMBER_CHILD_TABLE_SIZE - 1).
|
|
810
985
|
* @param childData EmberChildData * The data of the child.
|
|
811
|
-
* @returns
|
|
986
|
+
* @returns
|
|
987
|
+
* - SLStatus.OK if the child data is set successfully at index.
|
|
988
|
+
* - SLStatus.INVALID_INDEX if provided index is out of range.
|
|
812
989
|
*/
|
|
813
|
-
ezspSetChildData(index: number, childData: EmberChildData): Promise<
|
|
990
|
+
ezspSetChildData(index: number, childData: EmberChildData): Promise<SLStatus>;
|
|
814
991
|
/**
|
|
815
992
|
* Convert a child index to a node ID
|
|
816
993
|
* @param childIndex uint8_t The index of the child of interest in the child table. Possible indexes range from zero to EMBER_CHILD_TABLE_SIZE.
|
|
817
994
|
* @returns The node ID of the child or EMBER_NULL_NODE_ID if there isn't a child at the childIndex specified
|
|
818
995
|
*/
|
|
819
|
-
ezspChildId(childIndex: number): Promise<
|
|
996
|
+
ezspChildId(childIndex: number): Promise<NodeId>;
|
|
997
|
+
/**
|
|
998
|
+
* Return radio power value of the child from the given childIndex
|
|
999
|
+
* @param childIndex uint8_t The index of the child of interest in the child table.
|
|
1000
|
+
* Possible indexes range from zero to SL_ZIGBEE_CHILD_TABLE_SIZE.
|
|
1001
|
+
* @returns The power of the child or maximum radio power, which is the power value provided by the user
|
|
1002
|
+
* while forming/joining a network if there isn't a child at the childIndex specified
|
|
1003
|
+
*/
|
|
1004
|
+
ezspChilPower(childIndex: number): Promise<number>;
|
|
1005
|
+
/**
|
|
1006
|
+
* Set the radio power value for a given child index.
|
|
1007
|
+
* @param childIndex uint8_t
|
|
1008
|
+
* @param newPower int8_t
|
|
1009
|
+
*/
|
|
1010
|
+
ezspSetChildPower(childIndex: number, newPower: number): Promise<void>;
|
|
820
1011
|
/**
|
|
821
1012
|
* Convert a node ID to a child index
|
|
822
1013
|
* @param childId The node ID of the child
|
|
823
1014
|
* @returns uint8_t The child index or 0xFF if the node ID doesn't belong to a child
|
|
824
1015
|
*/
|
|
825
|
-
ezspChildIndex(childId:
|
|
1016
|
+
ezspChildIndex(childId: NodeId): Promise<number>;
|
|
826
1017
|
/**
|
|
827
1018
|
* Returns the source route table total size.
|
|
828
1019
|
* @returns uint8_t Total size of source route table.
|
|
@@ -837,47 +1028,52 @@ export declare class Ezsp extends EventEmitter {
|
|
|
837
1028
|
* Returns information about a source route table entry
|
|
838
1029
|
* @param index uint8_t The index of the entry of interest in the source route table.
|
|
839
1030
|
* Possible indexes range from zero to SOURCE_ROUTE_TABLE_FILLED_SIZE.
|
|
840
|
-
* @returns
|
|
841
|
-
*
|
|
1031
|
+
* @returns
|
|
1032
|
+
* - SLStatus.OK if there is source route entry at index.
|
|
1033
|
+
* - SLStatus.NOT_FOUND if there is no source route at index.
|
|
1034
|
+
* @returns NodeId * The node ID of the destination in that entry.
|
|
842
1035
|
* @returns uint8_t * The closer node index for this source route table entry
|
|
843
1036
|
*/
|
|
844
|
-
ezspGetSourceRouteTableEntry(index: number): Promise<[
|
|
1037
|
+
ezspGetSourceRouteTableEntry(index: number): Promise<[SLStatus, destination: NodeId, closerIndex: number]>;
|
|
845
1038
|
/**
|
|
846
1039
|
* Returns the neighbor table entry at the given index. The number of active
|
|
847
1040
|
* neighbors can be obtained using the neighborCount command.
|
|
848
1041
|
* @param index uint8_t The index of the neighbor of interest. Neighbors are stored in ascending order by node id,
|
|
849
1042
|
* with all unused entries at the end of the table.
|
|
850
|
-
* @returns
|
|
851
|
-
*
|
|
1043
|
+
* @returns
|
|
1044
|
+
* - SLStatus.FAIL if the index is greater or equal to the number of active neighbors, or if the device is an end device.
|
|
1045
|
+
* - SLStatus.OK otherwise.
|
|
852
1046
|
* @returns EmberNeighborTableEntry * The contents of the neighbor table entry.
|
|
853
1047
|
*/
|
|
854
|
-
ezspGetNeighbor(index: number): Promise<[
|
|
1048
|
+
ezspGetNeighbor(index: number): Promise<[SLStatus, value: EmberNeighborTableEntry]>;
|
|
855
1049
|
/**
|
|
856
1050
|
* Return EmberStatus depending on whether the frame counter of the node is
|
|
857
1051
|
* found in the neighbor or child table. This function gets the last received
|
|
858
1052
|
* frame counter as found in the Network Auxiliary header for the specified
|
|
859
1053
|
* neighbor or child
|
|
860
1054
|
* @param eui64 eui64 of the node
|
|
861
|
-
* @returns
|
|
1055
|
+
* @returns
|
|
1056
|
+
* - SLStatus.NOT_FOUND if the node is not found in the neighbor or child table.
|
|
1057
|
+
* - SLStatus.OK otherwise
|
|
862
1058
|
* @returns uint32_t * Return the frame counter of the node from the neighbor or child table
|
|
863
1059
|
*/
|
|
864
|
-
ezspGetNeighborFrameCounter(eui64:
|
|
1060
|
+
ezspGetNeighborFrameCounter(eui64: EUI64): Promise<[SLStatus, returnFrameCounter: number]>;
|
|
865
1061
|
/**
|
|
866
1062
|
* Sets the frame counter for the neighbour or child.
|
|
867
1063
|
* @param eui64 eui64 of the node
|
|
868
1064
|
* @param frameCounter uint32_t Return the frame counter of the node from the neighbor or child table
|
|
869
1065
|
* @returns
|
|
870
|
-
* -
|
|
871
|
-
* -
|
|
1066
|
+
* - SLStatus.NOT_FOUND if the node is not found in the neighbor or child table.
|
|
1067
|
+
* - SLStatus.OK otherwise
|
|
872
1068
|
*/
|
|
873
|
-
ezspSetNeighborFrameCounter(eui64:
|
|
1069
|
+
ezspSetNeighborFrameCounter(eui64: EUI64, frameCounter: number): Promise<SLStatus>;
|
|
874
1070
|
/**
|
|
875
1071
|
* Sets the routing shortcut threshold to directly use a neighbor instead of
|
|
876
1072
|
* performing routing.
|
|
877
1073
|
* @param costThresh uint8_t The routing shortcut threshold to configure.
|
|
878
|
-
* @returns An
|
|
1074
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
879
1075
|
*/
|
|
880
|
-
ezspSetRoutingShortcutThreshold(costThresh: number): Promise<
|
|
1076
|
+
ezspSetRoutingShortcutThreshold(costThresh: number): Promise<SLStatus>;
|
|
881
1077
|
/**
|
|
882
1078
|
* Gets the routing shortcut threshold used to differentiate between directly
|
|
883
1079
|
* using a neighbor vs. performing routing.
|
|
@@ -894,11 +1090,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
894
1090
|
* obtained using the getConfigurationValue command.
|
|
895
1091
|
* @param index uint8_t The index of the route table entry of interest.
|
|
896
1092
|
* @returns
|
|
897
|
-
* -
|
|
898
|
-
* -
|
|
1093
|
+
* - SLStatus.FAIL if the index is out of range or the device is an end
|
|
1094
|
+
* - SLStatus.OK otherwise.
|
|
899
1095
|
* @returns EmberRouteTableEntry * The contents of the route table entry.
|
|
900
1096
|
*/
|
|
901
|
-
ezspGetRouteTableEntry(index: number): Promise<[
|
|
1097
|
+
ezspGetRouteTableEntry(index: number): Promise<[SLStatus, value: EmberRouteTableEntry]>;
|
|
902
1098
|
/**
|
|
903
1099
|
* Sets the radio output power at which a node is operating. Ember radios have
|
|
904
1100
|
* discrete power settings. For a list of available power settings, see the
|
|
@@ -908,18 +1104,18 @@ export declare class Ezsp extends EventEmitter {
|
|
|
908
1104
|
* with the node on which it is called. This can lead to disruption of existing
|
|
909
1105
|
* routes and erratic network behavior.
|
|
910
1106
|
* @param power int8_t Desired radio output power, in dBm.
|
|
911
|
-
* @returns An
|
|
1107
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
912
1108
|
*/
|
|
913
|
-
ezspSetRadioPower(power: number): Promise<
|
|
1109
|
+
ezspSetRadioPower(power: number): Promise<SLStatus>;
|
|
914
1110
|
/**
|
|
915
1111
|
* Sets the channel to use for sending and receiving messages. For a list of
|
|
916
1112
|
* available radio channels, see the technical specification for the RF
|
|
917
1113
|
* communication module in your Developer Kit. Note: Care should be taken when
|
|
918
1114
|
* using this API, as all devices on a network must use the same channel.
|
|
919
1115
|
* @param channel uint8_t Desired radio channel.
|
|
920
|
-
* @returns An
|
|
1116
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
921
1117
|
*/
|
|
922
|
-
ezspSetRadioChannel(channel: number): Promise<
|
|
1118
|
+
ezspSetRadioChannel(channel: number): Promise<SLStatus>;
|
|
923
1119
|
/**
|
|
924
1120
|
* Gets the channel in use for sending and receiving messages.
|
|
925
1121
|
* @returns uint8_t Current radio channel.
|
|
@@ -928,10 +1124,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
928
1124
|
/**
|
|
929
1125
|
* Set the configured 802.15.4 CCA mode in the radio.
|
|
930
1126
|
* @param ccaMode uint8_t A RAIL_IEEE802154_CcaMode_t value.
|
|
931
|
-
* @returns An
|
|
932
|
-
* command.
|
|
1127
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
933
1128
|
*/
|
|
934
|
-
ezspSetRadioIeee802154CcaMode(ccaMode: number): Promise<
|
|
1129
|
+
ezspSetRadioIeee802154CcaMode(ccaMode: number): Promise<SLStatus>;
|
|
935
1130
|
/**
|
|
936
1131
|
* Enable/disable concentrator support.
|
|
937
1132
|
* @param on If this bool is true the concentrator support is enabled. Otherwise is disabled.
|
|
@@ -947,16 +1142,31 @@ export declare class Ezsp extends EventEmitter {
|
|
|
947
1142
|
* @param deliveryFailureThreshold uint8_t The number of APS delivery failures that will trigger a re-broadcast of the MTORR.
|
|
948
1143
|
* @param maxHops uint8_t The maximum number of hops that the MTORR broadcast will be allowed to have.
|
|
949
1144
|
* A value of 0 will be converted to the EMBER_MAX_HOPS value set by the stack.
|
|
950
|
-
* @returns An
|
|
1145
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1146
|
+
*/
|
|
1147
|
+
ezspSetConcentrator(on: boolean, concentratorType: number, minTime: number, maxTime: number, routeErrorThreshold: number, deliveryFailureThreshold: number, maxHops: number): Promise<SLStatus>;
|
|
1148
|
+
/**
|
|
1149
|
+
* Starts periodic many-to-one route discovery.
|
|
1150
|
+
* Periodic discovery is started by default on bootup, but this function may be used if discovery
|
|
1151
|
+
* has been stopped by a call to ::ezspConcentratorStopDiscovery().
|
|
951
1152
|
*/
|
|
952
|
-
|
|
1153
|
+
ezspConcentratorStartDiscovery(): Promise<void>;
|
|
1154
|
+
/**
|
|
1155
|
+
* Stops periodic many-to-one route discovery.
|
|
1156
|
+
*/
|
|
1157
|
+
ezspConcentratorStopDiscovery(): Promise<void>;
|
|
1158
|
+
/**
|
|
1159
|
+
* Notes when a route error has occurred.
|
|
1160
|
+
* @param status
|
|
1161
|
+
* @param nodeId
|
|
1162
|
+
*/
|
|
1163
|
+
ezspConcentratorNoteRouteError(status: SLStatus, nodeId: NodeId): Promise<void>;
|
|
953
1164
|
/**
|
|
954
1165
|
* Sets the error code that is sent back from a router with a broken route.
|
|
955
1166
|
* @param errorCode uint8_t Desired error code.
|
|
956
|
-
* @returns An
|
|
957
|
-
* command.
|
|
1167
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
958
1168
|
*/
|
|
959
|
-
ezspSetBrokenRouteErrorCode(errorCode: number): Promise<
|
|
1169
|
+
ezspSetBrokenRouteErrorCode(errorCode: number): Promise<SLStatus>;
|
|
960
1170
|
/**
|
|
961
1171
|
* This causes to initialize the desired radio interface other than native and
|
|
962
1172
|
* form a new network by becoming the coordinator with same panId as native
|
|
@@ -966,15 +1176,15 @@ export declare class Ezsp extends EventEmitter {
|
|
|
966
1176
|
* @param channel uint8_t Desired radio channel.
|
|
967
1177
|
* @param power int8_t Desired radio output power, in dBm.
|
|
968
1178
|
* @param bitmask Network configuration bitmask.
|
|
969
|
-
* @returns An
|
|
1179
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
970
1180
|
*/
|
|
971
|
-
ezspMultiPhyStart(phyIndex: number, page: number, channel: number, power: number, bitmask: EmberMultiPhyNwkConfig): Promise<
|
|
1181
|
+
ezspMultiPhyStart(phyIndex: number, page: number, channel: number, power: number, bitmask: EmberMultiPhyNwkConfig): Promise<SLStatus>;
|
|
972
1182
|
/**
|
|
973
1183
|
* This causes to bring down the radio interface other than native.
|
|
974
1184
|
* @param phyIndex uint8_t Index of phy interface. The native phy index would be always zero hence valid phy index starts from one.
|
|
975
|
-
* @returns An
|
|
1185
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
976
1186
|
*/
|
|
977
|
-
ezspMultiPhyStop(phyIndex: number): Promise<
|
|
1187
|
+
ezspMultiPhyStop(phyIndex: number): Promise<SLStatus>;
|
|
978
1188
|
/**
|
|
979
1189
|
* Sets the radio output power for desired phy interface at which a node is
|
|
980
1190
|
* operating. Ember radios have discrete power settings. For a list of available
|
|
@@ -985,15 +1195,14 @@ export declare class Ezsp extends EventEmitter {
|
|
|
985
1195
|
* can lead to disruption of existing routes and erratic network behavior.
|
|
986
1196
|
* @param phyIndex uint8_t Index of phy interface. The native phy index would be always zero hence valid phy index starts from one.
|
|
987
1197
|
* @param power int8_t Desired radio output power, in dBm.
|
|
988
|
-
* @returns An
|
|
989
|
-
* command.
|
|
1198
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
990
1199
|
*/
|
|
991
|
-
ezspMultiPhySetRadioPower(phyIndex: number, power: number): Promise<
|
|
1200
|
+
ezspMultiPhySetRadioPower(phyIndex: number, power: number): Promise<SLStatus>;
|
|
992
1201
|
/**
|
|
993
1202
|
* Send Link Power Delta Request from a child to its parent
|
|
994
|
-
* @returns An
|
|
1203
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
995
1204
|
*/
|
|
996
|
-
ezspSendLinkPowerDeltaRequest(): Promise<
|
|
1205
|
+
ezspSendLinkPowerDeltaRequest(): Promise<SLStatus>;
|
|
997
1206
|
/**
|
|
998
1207
|
* Sets the channel for desired phy interface to use for sending and receiving
|
|
999
1208
|
* messages. For a list of available radio pages and channels, see the technical
|
|
@@ -1003,33 +1212,33 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1003
1212
|
* @param phyIndex uint8_t Index of phy interface. The native phy index would be always zero hence valid phy index starts from one.
|
|
1004
1213
|
* @param page uint8_t Desired radio channel page.
|
|
1005
1214
|
* @param channel uint8_t Desired radio channel.
|
|
1006
|
-
* @returns An
|
|
1215
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
1007
1216
|
*/
|
|
1008
|
-
ezspMultiPhySetRadioChannel(phyIndex: number, page: number, channel: number): Promise<
|
|
1217
|
+
ezspMultiPhySetRadioChannel(phyIndex: number, page: number, channel: number): Promise<SLStatus>;
|
|
1009
1218
|
/**
|
|
1010
1219
|
* Obtains the current duty cycle state.
|
|
1011
|
-
* @returns An
|
|
1220
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
1012
1221
|
* @returns EmberDutyCycleState * The current duty cycle state in effect.
|
|
1013
1222
|
*/
|
|
1014
|
-
ezspGetDutyCycleState(): Promise<[
|
|
1223
|
+
ezspGetDutyCycleState(): Promise<[SLStatus, returnedState: EmberDutyCycleState]>;
|
|
1015
1224
|
/**
|
|
1016
1225
|
* Set the current duty cycle limits configuration. The Default limits set by
|
|
1017
1226
|
* stack if this call is not made.
|
|
1018
1227
|
* @param limits EmberDutyCycleLimits * The duty cycle limits configuration to utilize.
|
|
1019
|
-
* @returns
|
|
1020
|
-
*
|
|
1021
|
-
*
|
|
1022
|
-
*
|
|
1228
|
+
* @returns
|
|
1229
|
+
* - SLStatus.OK if the duty cycle limit configurations set successfully,
|
|
1230
|
+
* - SLStatus.INVALID_PARAMETER if set illegal value such as setting only one of the limits to default
|
|
1231
|
+
* or violates constraints Susp > Crit > Limi,
|
|
1232
|
+
* - SLStatus.INVALID_STATE if device is operating on 2.4Ghz
|
|
1023
1233
|
*/
|
|
1024
|
-
ezspSetDutyCycleLimitsInStack(limits: EmberDutyCycleLimits): Promise<
|
|
1234
|
+
ezspSetDutyCycleLimitsInStack(limits: EmberDutyCycleLimits): Promise<SLStatus>;
|
|
1025
1235
|
/**
|
|
1026
|
-
* Obtains the current duty cycle limits that were previously set by a call to
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1029
|
-
* @returns An EmberStatus value indicating the success or failure of the command.
|
|
1236
|
+
* Obtains the current duty cycle limits that were previously set by a call to emberSetDutyCycleLimitsInStack(),
|
|
1237
|
+
* or the defaults set by the stack if no set call was made.
|
|
1238
|
+
* @returns An SLStatus value indicating the success or failure of the command.
|
|
1030
1239
|
* @returns EmberDutyCycleLimits * Return current duty cycle limits if returnedLimits is not NULL
|
|
1031
1240
|
*/
|
|
1032
|
-
ezspGetDutyCycleLimits(): Promise<[
|
|
1241
|
+
ezspGetDutyCycleLimits(): Promise<[SLStatus, returnedLimits: EmberDutyCycleLimits]>;
|
|
1033
1242
|
/**
|
|
1034
1243
|
* Returns the duty cycle of the stack's connected children that are being
|
|
1035
1244
|
* monitored, up to maxDevices. It indicates the amount of overall duty cycle
|
|
@@ -1038,12 +1247,12 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1038
1247
|
* The passed pointer arrayOfDeviceDutyCycles MUST have space for maxDevices.
|
|
1039
1248
|
* @param maxDevices uint8_t Number of devices to retrieve consumed duty cycle.
|
|
1040
1249
|
* @returns
|
|
1041
|
-
* -
|
|
1042
|
-
* -
|
|
1250
|
+
* - SLStatus.OK if the duty cycles were read successfully,
|
|
1251
|
+
* - SLStatus.INVALID_PARAMETER maxDevices is greater than SL_ZIGBEE_MAX_END_DEVICE_CHILDREN + 1.
|
|
1043
1252
|
* @returns uint8_t * Consumed duty cycles up to maxDevices. When the number of children that are being monitored is less than maxDevices,
|
|
1044
|
-
* the
|
|
1253
|
+
* the NodeId element in the EmberPerDeviceDutyCycle will be 0xFFFF.
|
|
1045
1254
|
*/
|
|
1046
|
-
ezspGetCurrentDutyCycle(maxDevices: number): Promise<[
|
|
1255
|
+
ezspGetCurrentDutyCycle(maxDevices: number): Promise<[SLStatus, arrayOfDeviceDutyCycles: number[]]>;
|
|
1047
1256
|
/**
|
|
1048
1257
|
* Callback
|
|
1049
1258
|
* Callback fires when the duty cycle state has changed
|
|
@@ -1053,29 +1262,23 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1053
1262
|
* @param totalDevices uint8_t The total number of connected end devices that are being monitored for duty cycle.
|
|
1054
1263
|
* @param arrayOfDeviceDutyCycles EmberPerDeviceDutyCycle * Consumed duty cycles of end devices that are being monitored.
|
|
1055
1264
|
* The first entry always be the local stack's nodeId, and thus the total aggregate duty cycle for the device.
|
|
1056
|
-
|
|
1265
|
+
*/
|
|
1057
1266
|
ezspDutyCycleHandler(channelPage: number, channel: number, state: EmberDutyCycleState, totalDevices: number, arrayOfDeviceDutyCycles: EmberPerDeviceDutyCycle[]): void;
|
|
1058
1267
|
/**
|
|
1059
|
-
*
|
|
1060
|
-
*
|
|
1268
|
+
* Configure the number of beacons to store when issuing active scans for networks.
|
|
1269
|
+
* @param numBeacons uint8_t The number of beacons to cache when scanning.
|
|
1061
1270
|
* @returns
|
|
1062
|
-
* -
|
|
1063
|
-
* -
|
|
1064
|
-
* - EMBER_ERR_FATAL if no first beacon found.
|
|
1065
|
-
* @returns EmberBeaconIterator * The iterator to use when returning the first beacon. This argument must not be NULL.
|
|
1271
|
+
* - SLStatus.INVALID_PARAMETER if numBeacons is greater than SL_ZIGBEE_MAX_BEACONS_TO_STORE
|
|
1272
|
+
* - SLStatus.OK
|
|
1066
1273
|
*/
|
|
1067
|
-
|
|
1274
|
+
ezspSetNumBeaconToStore(numBeacons: number): Promise<SLStatus>;
|
|
1068
1275
|
/**
|
|
1069
|
-
*
|
|
1070
|
-
*
|
|
1071
|
-
* @returns
|
|
1072
|
-
*
|
|
1073
|
-
* - EMBER_BAD_ARGUMENT if input parameters are invalid,
|
|
1074
|
-
* - EMBER_ERR_FATAL if no next beacon found.
|
|
1075
|
-
* @returns EmberBeaconData * The next beacon retrieved. It is assumed that emberGetFirstBeacon has been called first.
|
|
1076
|
-
* This argument must not be NULL.
|
|
1276
|
+
* Fetches the specified beacon in the cache. Beacons are stored in cache after issuing an active scan.
|
|
1277
|
+
* @param beaconNumber uint8_t The beacon index to fetch. Valid values range from 0 to ezspGetNumStoredBeacons-1.
|
|
1278
|
+
* @returns An appropriate SLStatus status code.
|
|
1279
|
+
* @returns EmberBeaconData * The beacon to populate upon success.
|
|
1077
1280
|
*/
|
|
1078
|
-
|
|
1281
|
+
ezspGetStoredBeacon(beaconNumber: number): Promise<[SLStatus, beacon: EmberBeaconData]>;
|
|
1079
1282
|
/**
|
|
1080
1283
|
* Returns the number of cached beacons that have been collected from a scan.
|
|
1081
1284
|
* @returns uint8_t The number of cached beacons that have been collected from a scan.
|
|
@@ -1083,40 +1286,92 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1083
1286
|
ezspGetNumStoredBeacons(): Promise<number>;
|
|
1084
1287
|
/**
|
|
1085
1288
|
* Clears all cached beacons that have been collected from a scan.
|
|
1289
|
+
* @returns An SLStatus value indicating success or the reason for failure. Always `OK` in v13-.
|
|
1086
1290
|
*/
|
|
1087
|
-
ezspClearStoredBeacons(): Promise<
|
|
1291
|
+
ezspClearStoredBeacons(): Promise<SLStatus>;
|
|
1088
1292
|
/**
|
|
1089
1293
|
* This call sets the radio channel in the stack and propagates the information
|
|
1090
1294
|
* to the hardware.
|
|
1091
1295
|
* @param radioChannel uint8_t The radio channel to be set.
|
|
1092
|
-
* @returns An
|
|
1296
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1297
|
+
*/
|
|
1298
|
+
ezspSetLogicalAndRadioChannel(radioChannel: number): Promise<SLStatus>;
|
|
1299
|
+
/**
|
|
1300
|
+
* Form a new sleepy-to-sleepy network.
|
|
1301
|
+
* If the network is using security, the device must call sli_zigbee_stack_set_initial_security_state() first.
|
|
1302
|
+
* @param parameters Specification of the new network.
|
|
1303
|
+
* @param initiator Whether this device is initiating or joining the network.
|
|
1304
|
+
* @returns An SLStatus value indicating success or a reason for failure.
|
|
1305
|
+
*/
|
|
1306
|
+
ezspSleepyToSleepyNetworkStart(parameters: EmberNetworkParameters, initiator: boolean): Promise<SLStatus>;
|
|
1307
|
+
/**
|
|
1308
|
+
* Send a Zigbee NWK Leave command to the destination.
|
|
1309
|
+
* @param destination Node ID of the device being told to leave.
|
|
1310
|
+
* @param flags Bitmask indicating additional considerations for the leave request.
|
|
1311
|
+
* @returns Status indicating success or a reason for failure. Call is invalid if destination is on network or is the local node.
|
|
1312
|
+
*/
|
|
1313
|
+
ezspSendZigbeeLeave(destination: PanId, flags: Zdo.LeaveRequestFlags): Promise<SLStatus>;
|
|
1314
|
+
/**
|
|
1315
|
+
* Indicate the state of permit joining in MAC.
|
|
1316
|
+
* @returns Whether the current network permits joining.
|
|
1317
|
+
*/
|
|
1318
|
+
ezspGetPermitJoining(): Promise<boolean>;
|
|
1319
|
+
/**
|
|
1320
|
+
* Get the 8-byte extended PAN ID of this node.
|
|
1321
|
+
* @returns Extended PAN ID of this node. Valid only if it is currently on a network.
|
|
1322
|
+
*/
|
|
1323
|
+
ezspGetExtendedPanId(): Promise<ExtendedPanId>;
|
|
1324
|
+
/**
|
|
1325
|
+
* Get the current network.
|
|
1326
|
+
* @returns Return the current network index.
|
|
1327
|
+
*/
|
|
1328
|
+
ezspGetCurrentNetwork(): Promise<number>;
|
|
1329
|
+
/**
|
|
1330
|
+
* Set initial outgoing link cost for neighbor.
|
|
1331
|
+
* @param cost The new default cost. Valid values are 0, 1, 3, 5, and 7.
|
|
1332
|
+
* @returns Whether or not initial cost was successfully set.
|
|
1333
|
+
*/
|
|
1334
|
+
ezspSetInitialNeighborOutgoingCost(cost: number): Promise<SLStatus>;
|
|
1335
|
+
/**
|
|
1336
|
+
* Get initial outgoing link cost for neighbor.
|
|
1337
|
+
* @returns The default cost associated with new neighbor's outgoing links.
|
|
1338
|
+
*/
|
|
1339
|
+
ezspGetInitialNeighborOutgoingCost(): Promise<number>;
|
|
1340
|
+
/**
|
|
1341
|
+
* Indicate whether a rejoining neighbor should have its incoming frame counter reset.
|
|
1342
|
+
* @param reset
|
|
1093
1343
|
*/
|
|
1094
|
-
|
|
1344
|
+
ezspResetRejoiningNeighborsFrameCounter(reset: boolean): Promise<void>;
|
|
1345
|
+
/**
|
|
1346
|
+
* Check whether a rejoining neighbor will have its incoming frame counter reset based on the currently set policy.
|
|
1347
|
+
* @returns Whether or not a rejoining neighbor's incoming FC gets reset (true or false).
|
|
1348
|
+
*/
|
|
1349
|
+
ezspIsResetRejoiningNeighborsFrameCounterEnabled(): Promise<boolean>;
|
|
1095
1350
|
/**
|
|
1096
1351
|
* Deletes all binding table entries.
|
|
1097
|
-
* @returns An
|
|
1352
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1098
1353
|
*/
|
|
1099
|
-
ezspClearBindingTable(): Promise<
|
|
1354
|
+
ezspClearBindingTable(): Promise<SLStatus>;
|
|
1100
1355
|
/**
|
|
1101
1356
|
* Sets an entry in the binding table.
|
|
1102
1357
|
* @param index uint8_t The index of a binding table entry.
|
|
1103
1358
|
* @param value EmberBindingTableEntry * The contents of the binding entry.
|
|
1104
|
-
* @returns An
|
|
1359
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1105
1360
|
*/
|
|
1106
|
-
ezspSetBinding(index: number, value: EmberBindingTableEntry): Promise<
|
|
1361
|
+
ezspSetBinding(index: number, value: EmberBindingTableEntry): Promise<SLStatus>;
|
|
1107
1362
|
/**
|
|
1108
1363
|
* Gets an entry from the binding table.
|
|
1109
1364
|
* @param index uint8_t The index of a binding table entry.
|
|
1110
|
-
* @returns An
|
|
1365
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1111
1366
|
* @returns EmberBindingTableEntry * The contents of the binding entry.
|
|
1112
1367
|
*/
|
|
1113
|
-
ezspGetBinding(index: number): Promise<[
|
|
1368
|
+
ezspGetBinding(index: number): Promise<[SLStatus, value: EmberBindingTableEntry]>;
|
|
1114
1369
|
/**
|
|
1115
1370
|
* Deletes a binding table entry.
|
|
1116
1371
|
* @param index uint8_t The index of a binding table entry.
|
|
1117
|
-
* @returns An
|
|
1372
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1118
1373
|
*/
|
|
1119
|
-
ezspDeleteBinding(index: number): Promise<
|
|
1374
|
+
ezspDeleteBinding(index: number): Promise<SLStatus>;
|
|
1120
1375
|
/**
|
|
1121
1376
|
* Indicates whether any messages are currently being sent using this binding
|
|
1122
1377
|
* table entry. Note that this command does not indicate whether a binding is
|
|
@@ -1138,14 +1393,14 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1138
1393
|
* @param index uint8_t The index of a binding table entry.
|
|
1139
1394
|
* @returns The short ID of the destination node or EMBER_NULL_NODE_ID if no destination is known.
|
|
1140
1395
|
*/
|
|
1141
|
-
ezspGetBindingRemoteNodeId(index: number): Promise<
|
|
1396
|
+
ezspGetBindingRemoteNodeId(index: number): Promise<NodeId>;
|
|
1142
1397
|
/**
|
|
1143
1398
|
* Set the node ID for the binding's destination. See getBindingRemoteNodeId for
|
|
1144
1399
|
* a description.
|
|
1145
1400
|
* @param index uint8_t The index of a binding table entry.
|
|
1146
1401
|
* @param The short ID of the destination node.
|
|
1147
1402
|
*/
|
|
1148
|
-
ezspSetBindingRemoteNodeId(index: number, nodeId:
|
|
1403
|
+
ezspSetBindingRemoteNodeId(index: number, nodeId: NodeId): Promise<void>;
|
|
1149
1404
|
/**
|
|
1150
1405
|
* Callback
|
|
1151
1406
|
* The NCP used the external binding modification policy to decide how to handle
|
|
@@ -1154,9 +1409,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1154
1409
|
* command.
|
|
1155
1410
|
* @param entry EmberBindingTableEntry * The requested binding.
|
|
1156
1411
|
* @param index uint8_t The index at which the binding was added.
|
|
1157
|
-
* @param policyDecision
|
|
1412
|
+
* @param policyDecision SLStatus.OK if the binding was added to the table and any other status if not.
|
|
1158
1413
|
*/
|
|
1159
|
-
ezspRemoteSetBindingHandler(entry: EmberBindingTableEntry, index: number, policyDecision:
|
|
1414
|
+
ezspRemoteSetBindingHandler(entry: EmberBindingTableEntry, index: number, policyDecision: SLStatus): void;
|
|
1160
1415
|
/**
|
|
1161
1416
|
* Callback
|
|
1162
1417
|
* The NCP used the external binding modification policy to decide how to handle
|
|
@@ -1164,116 +1419,88 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1164
1419
|
* but it can change the policy for future decisions using the setPolicy
|
|
1165
1420
|
* command.
|
|
1166
1421
|
* @param index uint8_t The index of the binding whose deletion was requested.
|
|
1167
|
-
* @param policyDecision
|
|
1422
|
+
* @param policyDecision SLStatus.OK if the binding was removed from the table and any other status if not.
|
|
1168
1423
|
*/
|
|
1169
|
-
ezspRemoteDeleteBindingHandler(index: number, policyDecision:
|
|
1424
|
+
ezspRemoteDeleteBindingHandler(index: number, policyDecision: SLStatus): void;
|
|
1170
1425
|
/**
|
|
1171
1426
|
* Returns the maximum size of the payload. The size depends on the security level in use.
|
|
1172
1427
|
* @returns uint8_t The maximum APS payload length.
|
|
1173
1428
|
*/
|
|
1174
1429
|
ezspMaximumPayloadLength(): Promise<number>;
|
|
1175
1430
|
/**
|
|
1176
|
-
* Sends a unicast message as per the ZigBee specification.
|
|
1177
|
-
* arrive at its destination only if there is a known route to the destination
|
|
1178
|
-
*
|
|
1179
|
-
*
|
|
1180
|
-
*
|
|
1181
|
-
*
|
|
1182
|
-
*
|
|
1183
|
-
*
|
|
1184
|
-
* will
|
|
1185
|
-
*
|
|
1186
|
-
*
|
|
1187
|
-
*
|
|
1188
|
-
*
|
|
1189
|
-
*
|
|
1190
|
-
*
|
|
1191
|
-
* EMBER_APS_OPTION_FRAGMENT is set and the low-order byte of the groupId field
|
|
1192
|
-
* in the APS frame is zero). For all subsequent fragments of the same message,
|
|
1193
|
-
* the application must set the sequence number field in the APS frame to the
|
|
1194
|
-
* sequence number assigned by the stack to the first fragment.
|
|
1431
|
+
* Sends a unicast message as per the ZigBee specification.
|
|
1432
|
+
* The message will arrive at its destination only if there is a known route to the destination node.
|
|
1433
|
+
* Setting the ENABLE_ROUTE_DISCOVERY option will cause a route to be discovered if none is known.
|
|
1434
|
+
* Setting the FORCE_ROUTE_DISCOVERY option will force route discovery.
|
|
1435
|
+
* Routes to end-device children of the local node are always known.
|
|
1436
|
+
* Setting the APS_RETRY option will cause the message to be retransmitted until either a matching acknowledgement is received
|
|
1437
|
+
* or three transmissions have been made.
|
|
1438
|
+
* Note: Using the FORCE_ROUTE_DISCOVERY option will cause the first transmission to be consumed by a route request as part of discovery,
|
|
1439
|
+
* so the application payload of this packet will not reach its destination on the first attempt. If you want the packet to reach its destination,
|
|
1440
|
+
* the APS_RETRY option must be set so that another attempt is made to transmit the message with its application payload
|
|
1441
|
+
* after the route has been constructed.
|
|
1442
|
+
* Note: When sending fragmented messages, the stack will only assign a new APS sequence number for the first fragment of the message
|
|
1443
|
+
* (i.e., SL_ZIGBEE_APS_OPTION_FRAGMENT is set and the low-order byte of the groupId field in the APS frame is zero).
|
|
1444
|
+
* For all subsequent fragments of the same message, the application must set the sequence number field in the APS frame
|
|
1445
|
+
* to the sequence number assigned by the stack to the first fragment.
|
|
1195
1446
|
* @param type Specifies the outgoing message type.
|
|
1196
1447
|
* Must be one of EMBER_OUTGOING_DIRECT, EMBER_OUTGOING_VIA_ADDRESS_TABLE, or EMBER_OUTGOING_VIA_BINDING.
|
|
1197
|
-
* @param indexOrDestination Depending on the type of addressing used, this is either the
|
|
1448
|
+
* @param indexOrDestination Depending on the type of addressing used, this is either the NodeId of the destination,
|
|
1198
1449
|
* an index into the address table, or an index into the binding table.
|
|
1199
1450
|
* @param apsFrame EmberApsFrame * The APS frame which is to be added to the message.
|
|
1200
|
-
* @param messageTag uint8_t A value chosen by the Host.
|
|
1451
|
+
* @param messageTag uint8_t (v14+: uint16_t) A value chosen by the Host.
|
|
1452
|
+
* This value is used in the ezspMessageSentHandler response to refer to this message.
|
|
1201
1453
|
* @param messageContents uint8_t * Content of the message.
|
|
1202
|
-
* @returns An
|
|
1454
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1203
1455
|
* @returns uint8_t * The sequence number that will be used when this message is transmitted.
|
|
1204
1456
|
*/
|
|
1205
|
-
ezspSendUnicast(type: EmberOutgoingMessageType, indexOrDestination:
|
|
1457
|
+
ezspSendUnicast(type: EmberOutgoingMessageType, indexOrDestination: NodeId, apsFrame: EmberApsFrame, messageTag: number, messageContents: Buffer): Promise<[SLStatus, apsSequence: number]>;
|
|
1206
1458
|
/**
|
|
1207
1459
|
* Sends a broadcast message as per the ZigBee specification.
|
|
1460
|
+
* @param alias uint16_t (unused in v13-) The aliased source from which we send the broadcast.
|
|
1461
|
+
* This must be SL_ZIGBEE_NULL_NODE_ID if we do not need an aliased source
|
|
1208
1462
|
* @param destination The destination to which to send the broadcast. This must be one of the three ZigBee broadcast addresses.
|
|
1463
|
+
* @param nwkSequence uint8_t (unused in v13-) The alias nwk sequence number. This won't be used if there is no aliased source.
|
|
1209
1464
|
* @param apsFrame EmberApsFrame * The APS frame for the message.
|
|
1210
1465
|
* @param radius uint8_t The message will be delivered to all nodes within radius hops of the sender.
|
|
1211
1466
|
* A radius of zero is converted to EMBER_MAX_HOPS.
|
|
1212
|
-
* @param uint8_t A value chosen by the Host.
|
|
1213
|
-
*
|
|
1214
|
-
* @
|
|
1467
|
+
* @param messageTag uint8_t (v14+: uint16_t) A value chosen by the Host.
|
|
1468
|
+
* This value is used in the ezspMessageSentHandler response to refer to this message.
|
|
1469
|
+
* @param messageContents uint8_t * The broadcast message.
|
|
1470
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1215
1471
|
* @returns uint8_t * The sequence number that will be used when this message is transmitted.
|
|
1216
1472
|
*/
|
|
1217
|
-
ezspSendBroadcast(destination:
|
|
1473
|
+
ezspSendBroadcast(alias: NodeId, destination: NodeId, nwkSequence: number, apsFrame: EmberApsFrame, radius: number, messageTag: number, messageContents: Buffer): Promise<[SLStatus, apsSequence: number]>;
|
|
1218
1474
|
/**
|
|
1219
|
-
* Sends
|
|
1220
|
-
*
|
|
1221
|
-
* @param
|
|
1222
|
-
* @
|
|
1223
|
-
* @param apsFrame EmberApsFrame * The APS frame for the message.
|
|
1224
|
-
* @param radius uint8_t The message will be delivered to all nodes within radius hops of the sender.
|
|
1225
|
-
* A radius of zero is converted to EMBER_MAX_HOPS.
|
|
1226
|
-
* @param messageTag uint8_t A value chosen by the Host. This value is used in the ezspMessageSentHandler response to refer to this message.
|
|
1227
|
-
* @param messageContents uint8_t * The broadcast message.
|
|
1228
|
-
* @returns An EmberStatus value indicating success or the reason for failure.
|
|
1229
|
-
* @returns uint8_t * The APS sequence number that will be used when this message is transmitted.
|
|
1475
|
+
* Sends proxied broadcast message for another node in conjunction with sl_zigbee_proxy_broadcast
|
|
1476
|
+
* where a long source is also specified in the NWK frame control.
|
|
1477
|
+
* @param euiSource The long source from which to send the broadcast
|
|
1478
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1230
1479
|
*/
|
|
1231
|
-
|
|
1480
|
+
ezspProxyNextBroadcastFromLong(euiSource: EUI64): Promise<SLStatus>;
|
|
1232
1481
|
/**
|
|
1233
|
-
* Sends a multicast message to all endpoints that share a specific multicast ID
|
|
1234
|
-
* and are within a specified number of hops of the sender.
|
|
1482
|
+
* Sends a multicast message to all endpoints that share a specific multicast ID and are within a specified number of hops of the sender.
|
|
1235
1483
|
* @param apsFrame EmberApsFrame * The APS frame for the message. The multicast will be sent to the groupId in this frame.
|
|
1236
1484
|
* @param hops uint8_t The message will be delivered to all nodes within this number of hops of the sender.
|
|
1237
1485
|
* A value of zero is converted to EMBER_MAX_HOPS.
|
|
1238
|
-
* @param
|
|
1486
|
+
* @param broadcastAddr uint16_t (unused in v13-) The number of hops that the message will be forwarded by devices
|
|
1487
|
+
* that are not members of the group.
|
|
1239
1488
|
* A value of 7 or greater is treated as infinite.
|
|
1240
|
-
* @param
|
|
1241
|
-
* @param
|
|
1489
|
+
* @param alias uint16_t (unused in v13-) The alias source address. This must be SL_ZIGBEE_NULL_NODE_ID if we do not need an aliased source
|
|
1490
|
+
* @param nwkSequence uint8_t (unused in v13-) The alias sequence number. This won't be used if there is no aliased source.
|
|
1491
|
+
* @param messageTag uint8_t (v14+: uint16_t) A value chosen by the Host.
|
|
1492
|
+
* This value is used in the ezspMessageSentHandler response to refer to this message.
|
|
1242
1493
|
* @param messageContents uint8_t * The multicast message.
|
|
1243
|
-
* @returns An
|
|
1244
|
-
* -
|
|
1245
|
-
* -
|
|
1246
|
-
* -
|
|
1247
|
-
* -
|
|
1248
|
-
* -
|
|
1249
|
-
* -
|
|
1494
|
+
* @returns An SLStatus value. For any result other than SLStatus.OK, the message will not be sent.
|
|
1495
|
+
* - SLStatus.OK - The message has been submitted for transmission.
|
|
1496
|
+
* - SLStatus.INVALID_INDEX - The bindingTableIndex refers to a non-multicast binding.
|
|
1497
|
+
* - SLStatus.NETWORK_DOWN - The node is not part of a network.
|
|
1498
|
+
* - SLStatus.MESSAGE_TOO_LONG - The message is too large to fit in a MAC layer frame.
|
|
1499
|
+
* - SLStatus.ALLOCATION_FAILED - The free packet buffer pool is empty.
|
|
1500
|
+
* - SLStatus.BUSY - Insufficient resources available in Network or MAC layers to send message.
|
|
1250
1501
|
* @returns uint8_t * The sequence number that will be used when this message is transmitted.
|
|
1251
1502
|
*/
|
|
1252
|
-
ezspSendMulticast(apsFrame: EmberApsFrame, hops: number,
|
|
1253
|
-
/**
|
|
1254
|
-
* Sends a multicast message to all endpoints that share a specific multicast ID
|
|
1255
|
-
* and are within a specified number of hops of the sender.
|
|
1256
|
-
* @param apsFrame EmberApsFrame * The APS frame for the message. The multicast will be sent to the groupId in this frame.
|
|
1257
|
-
* @param hops uint8_t The message will be delivered to all nodes within this number of hops of the sender.
|
|
1258
|
-
* A value of zero is converted to EMBER_MAX_HOPS.
|
|
1259
|
-
* @param nonmemberRadius uint8_t The number of hops that the message will be forwarded by devices that are not members of the group.
|
|
1260
|
-
* A value of 7 or greater is treated as infinite.
|
|
1261
|
-
* @param alias uint16_t The alias source address
|
|
1262
|
-
* @param nwkSequence uint8_t the alias sequence number
|
|
1263
|
-
* @param messageTag uint8_t A value chosen by the Host. This value is used in the ezspMessageSentHandler response to refer to this message.
|
|
1264
|
-
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
1265
|
-
* @param messageContents uint8_t * The multicast message.
|
|
1266
|
-
* @returns An EmberStatus value. For any result other than EMBER_SUCCESS, the
|
|
1267
|
-
* message will not be sent. EMBER_SUCCESS - The message has been submitted for
|
|
1268
|
-
* transmission. EMBER_INVALID_BINDING_INDEX - The bindingTableIndex refers to a
|
|
1269
|
-
* non-multicast binding. EMBER_NETWORK_DOWN - The node is not part of a
|
|
1270
|
-
* network. EMBER_MESSAGE_TOO_LONG - The message is too large to fit in a MAC
|
|
1271
|
-
* layer frame. EMBER_NO_BUFFERS - The free packet buffer pool is empty.
|
|
1272
|
-
* EMBER_NETWORK_BUSY - Insufficient resources available in Network or MAC
|
|
1273
|
-
* layers to send message.
|
|
1274
|
-
* @returns The sequence number that will be used when this message is transmitted.
|
|
1275
|
-
*/
|
|
1276
|
-
ezspSendMulticastWithAlias(apsFrame: EmberApsFrame, hops: number, nonmemberRadius: number, alias: number, nwkSequence: number, messageTag: number, messageContents: Buffer): Promise<[EmberStatus, apsSequence: number]>;
|
|
1503
|
+
ezspSendMulticast(apsFrame: EmberApsFrame, hops: number, broadcastAddr: number, alias: NodeId, nwkSequence: number, messageTag: number, messageContents: Buffer): Promise<[SLStatus, apsSequence: number]>;
|
|
1277
1504
|
/**
|
|
1278
1505
|
* Sends a reply to a received unicast message. The incomingMessageHandler
|
|
1279
1506
|
* callback for the unicast being replied to supplies the values for all the
|
|
@@ -1282,34 +1509,35 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1282
1509
|
* @param apsFrame EmberApsFrame * Value supplied by incoming unicast.
|
|
1283
1510
|
* @param uint8_t The length of the messageContents parameter in bytes.
|
|
1284
1511
|
* @param uint8_t * The reply message.
|
|
1285
|
-
* @returns
|
|
1286
|
-
* -
|
|
1512
|
+
* @returns
|
|
1513
|
+
* - SLStatus.INVALID_STATE - The SL_ZIGBEE_EZSP_UNICAST_REPLIES_POLICY is set to SL_ZIGBEE_EZSP_HOST_WILL_NOT_SUPPLY_REPLY.
|
|
1287
1514
|
* This means the NCP will automatically send an empty reply. The Host must change
|
|
1288
|
-
* the policy to
|
|
1515
|
+
* the policy to SL_ZIGBEE_EZSP_HOST_WILL_SUPPLY_REPLY before it can supply the reply.
|
|
1289
1516
|
* There is one exception to this rule: In the case of responses to message
|
|
1290
1517
|
* fragments, the host must call sendReply when a message fragment is received.
|
|
1291
1518
|
* In this case, the policy set on the NCP does not matter. The NCP expects a
|
|
1292
1519
|
* sendReply call from the Host for message fragments regardless of the current
|
|
1293
1520
|
* policy settings.
|
|
1294
|
-
* -
|
|
1295
|
-
* -
|
|
1296
|
-
* -
|
|
1521
|
+
* - SLStatus.ALLOCATION_FAILED - Not enough memory was available to send the reply.
|
|
1522
|
+
* - SLStatus.BUSY - Either no route or insufficient resources available.
|
|
1523
|
+
* - SLStatus.OK - The reply was successfully queued for transmission.
|
|
1297
1524
|
*/
|
|
1298
|
-
ezspSendReply(sender:
|
|
1525
|
+
ezspSendReply(sender: NodeId, apsFrame: EmberApsFrame, messageContents: Buffer): Promise<SLStatus>;
|
|
1299
1526
|
/**
|
|
1300
1527
|
* Callback
|
|
1301
1528
|
* A callback indicating the stack has completed sending a message.
|
|
1529
|
+
* @param status
|
|
1530
|
+
* - SL_STATUS_OK if an ACK was received from the destination
|
|
1531
|
+
* - SL_STATUS_ZIGBEE_DELIVERY_FAILED if no ACK was received.
|
|
1302
1532
|
* @param type The type of message sent.
|
|
1303
1533
|
* @param indexOrDestination uint16_t The destination to which the message was sent, for direct unicasts,
|
|
1304
1534
|
* or the address table or binding index for other unicasts. The value is unspecified for multicasts and broadcasts.
|
|
1305
1535
|
* @param apsFrame EmberApsFrame * The APS frame for the message.
|
|
1306
1536
|
* @param messageTag uint8_t The value supplied by the Host in the ezspSendUnicast, ezspSendBroadcast or ezspSendMulticast command.
|
|
1307
|
-
* @param status An EmberStatus value of EMBER_SUCCESS if an ACK was received from the destination
|
|
1308
|
-
* or EMBER_DELIVERY_FAILED if no ACK was received.
|
|
1309
1537
|
* @param messageContents uint8_t * The unicast message supplied by the Host. The message contents are only included here if the decision
|
|
1310
1538
|
* for the messageContentsInCallback policy is messageTagAndContentsInCallback.
|
|
1311
1539
|
*/
|
|
1312
|
-
ezspMessageSentHandler(type: EmberOutgoingMessageType, indexOrDestination: number, apsFrame: EmberApsFrame, messageTag: number,
|
|
1540
|
+
ezspMessageSentHandler(status: SLStatus, type: EmberOutgoingMessageType, indexOrDestination: number, apsFrame: EmberApsFrame, messageTag: number, messageContents?: Buffer): void;
|
|
1313
1541
|
/**
|
|
1314
1542
|
* Sends a route request packet that creates routes from every node in the
|
|
1315
1543
|
* network back to this node. This function should be called by an application
|
|
@@ -1343,10 +1571,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1343
1571
|
* The latter is used when the concentrator has insufficient RAM to store all outbound source routes.
|
|
1344
1572
|
* In that case, route records are sent to the concentrator prior to every inbound APS unicast.
|
|
1345
1573
|
* @param radius uint8_t The maximum number of hops the route request will be relayed. A radius of zero is converted to EMBER_MAX_HOPS
|
|
1346
|
-
* @returns
|
|
1347
|
-
* transmit queue,
|
|
1574
|
+
* @returns
|
|
1575
|
+
* - SLStatus.OK if the route request was successfully submitted to the transmit queue,
|
|
1576
|
+
* - SLStatus.FAIL otherwise.
|
|
1348
1577
|
*/
|
|
1349
|
-
ezspSendManyToOneRouteRequest(concentratorType: number, radius: number): Promise<
|
|
1578
|
+
ezspSendManyToOneRouteRequest(concentratorType: number, radius: number): Promise<SLStatus>;
|
|
1350
1579
|
/**
|
|
1351
1580
|
* Periodically request any pending data from our parent. Setting interval to 0
|
|
1352
1581
|
* or units to EMBER_EVENT_INACTIVE will generate a single poll.
|
|
@@ -1358,48 +1587,81 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1358
1587
|
* and EMBER_MAC_NO_DATA is counted as a failure.
|
|
1359
1588
|
* @returns The result of sending the first poll.
|
|
1360
1589
|
*/
|
|
1361
|
-
ezspPollForData(interval: number, units: EmberEventUnits, failureLimit: number): Promise<
|
|
1590
|
+
ezspPollForData(interval: number, units: EmberEventUnits, failureLimit: number): Promise<SLStatus>;
|
|
1362
1591
|
/**
|
|
1363
1592
|
* Callback
|
|
1364
1593
|
* Indicates the result of a data poll to the parent of the local node.
|
|
1365
|
-
* @param status An
|
|
1366
|
-
*
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1369
|
-
*
|
|
1594
|
+
* @param status An SLStatus value:
|
|
1595
|
+
* - SLStatus.OK - Data was received in response to the poll.
|
|
1596
|
+
* - SLStatus.MAC_NO_DATA - No data was pending.
|
|
1597
|
+
* - SLStatus.ZIGBEE_DELIVERY_FAILED - The poll message could not be sent.
|
|
1598
|
+
* - SLStatus.MAC_NO_ACK_RECEIVED - The poll message was sent but not acknowledged by the parent.
|
|
1599
|
+
*/
|
|
1600
|
+
ezspPollCompleteHandler(status: SLStatus): void;
|
|
1601
|
+
/**
|
|
1602
|
+
* Set a flag to indicate that a message is pending for a child.
|
|
1603
|
+
* The next time that the child polls, it will be informed that it has a pending message.
|
|
1604
|
+
* The message is sent from emberPollHandler, which is called when the child requests data.
|
|
1605
|
+
* @param childId The ID of the child that just polled for data.
|
|
1606
|
+
* @returns
|
|
1607
|
+
* - SLStatus.OK - The next time that the child polls, it will be informed that it has pending data.
|
|
1608
|
+
* - SLStatus.NOT_JOINED - The child identified by childId is not our child.
|
|
1609
|
+
*/
|
|
1610
|
+
ezspSetMessageFlag(childId: NodeId): Promise<SLStatus>;
|
|
1611
|
+
/**
|
|
1612
|
+
* Clear a flag to indicate that there are no more messages for a child.
|
|
1613
|
+
* The next time the child polls, it will be informed that it does not have any pending messages.
|
|
1614
|
+
* @param childId The ID of the child that no longer has pending messages.
|
|
1615
|
+
* @returns
|
|
1616
|
+
* - SLStatus.OK - The next time that the child polls, it will be informed that it does not have any pending messages.
|
|
1617
|
+
* - SLStatus.NOT_JOINED - The child identified by childId is not our child.
|
|
1370
1618
|
*/
|
|
1371
|
-
|
|
1619
|
+
ezspClearMessageFlag(childId: NodeId): Promise<SLStatus>;
|
|
1372
1620
|
/**
|
|
1373
1621
|
* Callback
|
|
1374
1622
|
* Indicates that the local node received a data poll from a child.
|
|
1375
1623
|
* @param childId The node ID of the child that is requesting data.
|
|
1376
1624
|
* @param transmitExpected True if transmit is expected, false otherwise.
|
|
1377
1625
|
*/
|
|
1378
|
-
ezspPollHandler(childId:
|
|
1626
|
+
ezspPollHandler(childId: NodeId, transmitExpected: boolean): void;
|
|
1379
1627
|
/**
|
|
1380
|
-
*
|
|
1381
|
-
*
|
|
1382
|
-
*
|
|
1383
|
-
*
|
|
1384
|
-
* of the
|
|
1385
|
-
* @param
|
|
1628
|
+
* Add a child to the child/neighbor table only on SoC, allowing direct manipulation of these tables by the application.
|
|
1629
|
+
* This can affect the network functionality, and needs to be used wisely.
|
|
1630
|
+
* If used appropriately, the application can maintain more than the maximum of children provided by the stack.
|
|
1631
|
+
* @param shortId The preferred short ID of the node.
|
|
1632
|
+
* @param longId The long ID of the node.
|
|
1633
|
+
* @param nodeType The nodetype e.g., SL_ZIGBEE_ROUTER defining, if this would be added to the child table or neighbor table.
|
|
1634
|
+
* @returns
|
|
1635
|
+
* - SLStatus.OK - This node has been successfully added.
|
|
1636
|
+
* - SLStatus.FAIL - The child was not added to the child/neighbor table.
|
|
1386
1637
|
*/
|
|
1387
|
-
|
|
1638
|
+
ezspAddChild(shortId: NodeId, longId: EUI64, nodeType: EmberNodeType): Promise<SLStatus>;
|
|
1639
|
+
/**
|
|
1640
|
+
* Remove a node from child/neighbor table only on SoC, allowing direct manipulation of these tables by the application.
|
|
1641
|
+
* This can affect the network functionality, and needs to be used wisely.
|
|
1642
|
+
* @param childEui64 The long ID of the node.
|
|
1643
|
+
* @returns
|
|
1644
|
+
* - SLStatus.OK - This node has been successfully removed.
|
|
1645
|
+
* - SLStatus.FAIL - The node was not found in either of the child or neighbor tables.
|
|
1646
|
+
*/
|
|
1647
|
+
ezspRemoveChild(childEui64: EUI64): Promise<SLStatus>;
|
|
1648
|
+
/**
|
|
1649
|
+
* Remove a neighbor from neighbor table only on SoC, allowing direct manipulation of neighbor table by the application.
|
|
1650
|
+
* This can affect the network functionality, and needs to be used wisely.
|
|
1651
|
+
* @param shortId The short ID of the neighbor.
|
|
1652
|
+
* @param longId The long ID of the neighbor.
|
|
1653
|
+
*/
|
|
1654
|
+
ezspRemoveNeighbor(shortId: NodeId, longId: EUI64): Promise<void>;
|
|
1388
1655
|
/**
|
|
1389
1656
|
* Callback
|
|
1390
1657
|
* A callback indicating a message has been received.
|
|
1391
1658
|
* @param type The type of the incoming message. One of the following: EMBER_INCOMING_UNICAST, EMBER_INCOMING_UNICAST_REPLY,
|
|
1392
1659
|
* EMBER_INCOMING_MULTICAST, EMBER_INCOMING_MULTICAST_LOOPBACK, EMBER_INCOMING_BROADCAST, EMBER_INCOMING_BROADCAST_LOOPBACK
|
|
1393
1660
|
* @param apsFrame EmberApsFrame * The APS frame from the incoming message.
|
|
1394
|
-
* @param
|
|
1395
|
-
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during the reception.
|
|
1396
|
-
* @param sender The sender of the message.
|
|
1397
|
-
* @param bindingIndex uint8_t The index of a binding that matches the message or 0xFF if there is no matching binding.
|
|
1398
|
-
* @param addressIndex uint8_t The index of the entry in the address table that matches the sender of the message
|
|
1399
|
-
* or 0xFF if there is no matching entry.
|
|
1661
|
+
* @param packetInfo Miscellanous message information.
|
|
1400
1662
|
* @param messageContents uint8_t * The incoming message.
|
|
1401
1663
|
*/
|
|
1402
|
-
ezspIncomingMessageHandler(type: EmberIncomingMessageType, apsFrame: EmberApsFrame,
|
|
1664
|
+
ezspIncomingMessageHandler(type: EmberIncomingMessageType, apsFrame: EmberApsFrame, packetInfo: EmberRxPacketInfo, messageContents: Buffer): void;
|
|
1403
1665
|
/**
|
|
1404
1666
|
* Sets source route discovery(MTORR) mode to on, off, reschedule
|
|
1405
1667
|
* @param mode uint8_t Source route discovery mode: off:0, on:1, reschedule:2
|
|
@@ -1409,12 +1671,12 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1409
1671
|
/**
|
|
1410
1672
|
* Callback
|
|
1411
1673
|
* A callback indicating that a many-to-one route to the concentrator with the given short and long id is available for use.
|
|
1412
|
-
* @param
|
|
1674
|
+
* @param NodeId The short id of the concentrator.
|
|
1413
1675
|
* @param longId The EUI64 of the concentrator.
|
|
1414
1676
|
* @param cost uint8_t The path cost to the concentrator. The cost may decrease as additional route request packets
|
|
1415
1677
|
* for this discovery arrive, but the callback is made only once.
|
|
1416
1678
|
*/
|
|
1417
|
-
ezspIncomingManyToOneRouteRequestHandler(source:
|
|
1679
|
+
ezspIncomingManyToOneRouteRequestHandler(source: NodeId, longId: EUI64, cost: number): void;
|
|
1418
1680
|
/**
|
|
1419
1681
|
* Callback
|
|
1420
1682
|
* A callback invoked when a route error message is received.
|
|
@@ -1440,7 +1702,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1440
1702
|
* @param status ::EMBER_SOURCE_ROUTE_FAILURE, ::EMBER_MANY_TO_ONE_ROUTE_FAILURE, ::EMBER_MAC_INDIRECT_TIMEOUT
|
|
1441
1703
|
* @param target The short id of the remote node.
|
|
1442
1704
|
*/
|
|
1443
|
-
ezspIncomingRouteErrorHandler(status:
|
|
1705
|
+
ezspIncomingRouteErrorHandler(status: SLStatus, target: NodeId): void;
|
|
1444
1706
|
/**
|
|
1445
1707
|
* Callback
|
|
1446
1708
|
* A callback invoked when a network status/route error message is received.
|
|
@@ -1454,35 +1716,27 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1454
1716
|
* @param errorCode uint8_t One byte over-the-air error code from network status message
|
|
1455
1717
|
* @param target The short ID of the remote node
|
|
1456
1718
|
*/
|
|
1457
|
-
ezspIncomingNetworkStatusHandler(errorCode: EmberStackError, target:
|
|
1719
|
+
ezspIncomingNetworkStatusHandler(errorCode: EmberStackError, target: NodeId): void;
|
|
1458
1720
|
/**
|
|
1459
1721
|
* Callback
|
|
1460
1722
|
* Reports the arrival of a route record command frame.
|
|
1461
|
-
* @param
|
|
1462
|
-
* @param
|
|
1723
|
+
* @param NodeId The source of the route record.
|
|
1724
|
+
* @param EUI64 The EUI64 of the source.
|
|
1463
1725
|
* @param lastHopLqi uint8_t The link quality from the node that last relayed the route record.
|
|
1464
1726
|
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during the reception.
|
|
1465
1727
|
* @param uint8_t The number of relays in relayList.
|
|
1466
1728
|
* @param relayList uint8_t * The route record. Each relay in the list is an uint16_t node ID.
|
|
1467
1729
|
* The list is passed as uint8_t * to avoid alignment problems.
|
|
1468
1730
|
*/
|
|
1469
|
-
ezspIncomingRouteRecordHandler(source:
|
|
1470
|
-
/**
|
|
1471
|
-
* Supply a source route for the next outgoing message.
|
|
1472
|
-
* @param destination The destination of the source route.
|
|
1473
|
-
* @param relayList uint16_t * The source route.
|
|
1474
|
-
* @returns EMBER_SUCCESS if the source route was successfully stored, and
|
|
1475
|
-
* EMBER_NO_BUFFERS otherwise.
|
|
1476
|
-
*/
|
|
1477
|
-
ezspSetSourceRoute(destination: EmberNodeId, relayList: number[]): Promise<EmberStatus>;
|
|
1731
|
+
ezspIncomingRouteRecordHandler(source: NodeId, sourceEui: EUI64, lastHopLqi: number, lastHopRssi: number, relayCount: number, relayList: number[]): void;
|
|
1478
1732
|
/**
|
|
1479
1733
|
* Send the network key to a destination.
|
|
1480
1734
|
* @param targetShort The destination node of the key.
|
|
1481
1735
|
* @param targetLong The long address of the destination node.
|
|
1482
1736
|
* @param parentShortId The parent node of the destination node.
|
|
1483
|
-
* @returns
|
|
1737
|
+
* @returns SLStatus.OK if send was successful
|
|
1484
1738
|
*/
|
|
1485
|
-
ezspUnicastCurrentNetworkKey(targetShort:
|
|
1739
|
+
ezspUnicastCurrentNetworkKey(targetShort: NodeId, targetLong: EUI64, parentShortId: NodeId): Promise<SLStatus>;
|
|
1486
1740
|
/**
|
|
1487
1741
|
* Indicates whether any messages are currently being sent using this address
|
|
1488
1742
|
* table entry. Note that this function does not indicate whether the address
|
|
@@ -1494,49 +1748,36 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1494
1748
|
*/
|
|
1495
1749
|
ezspAddressTableEntryIsActive(addressTableIndex: number): Promise<boolean>;
|
|
1496
1750
|
/**
|
|
1497
|
-
* Sets the EUI64 of an address table entry.
|
|
1498
|
-
*
|
|
1499
|
-
*
|
|
1500
|
-
*
|
|
1501
|
-
*
|
|
1502
|
-
*
|
|
1503
|
-
*
|
|
1751
|
+
* Sets the EUI64 and short ID of an address table entry.
|
|
1752
|
+
* Usually the application will not need to set the short ID in the address table.
|
|
1753
|
+
* Once the remote EUI64 is set the stack is capable of figuring out the short ID on its own.
|
|
1754
|
+
* However, in cases where the application does set the short ID, the application must set the remote EUI64 prior to setting the short ID.
|
|
1755
|
+
* This function will also check other address table entries, the child table and the neighbor table to see
|
|
1756
|
+
* if the node ID for the given EUI64 is already known.
|
|
1757
|
+
* If known then this function will set node ID. If not known it will set the node ID to SL_ZIGBEE_UNKNOWN_NODE_ID.
|
|
1758
|
+
* @param addressTableIndex
|
|
1759
|
+
* @param eui64
|
|
1760
|
+
* @param id
|
|
1504
1761
|
* @returns
|
|
1505
|
-
* -
|
|
1506
|
-
* -
|
|
1507
|
-
*/
|
|
1508
|
-
|
|
1509
|
-
/**
|
|
1510
|
-
*
|
|
1511
|
-
*
|
|
1512
|
-
*
|
|
1513
|
-
*
|
|
1514
|
-
* the remote EUI64
|
|
1515
|
-
*
|
|
1516
|
-
*
|
|
1517
|
-
*
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
* Gets the EUI64 of an address table entry.
|
|
1522
|
-
* @param addressTableIndex uint8_t The index of an address table entry.
|
|
1762
|
+
* - SLStatus.OK if the information was successfully set,
|
|
1763
|
+
* - SLStatus.ZIGBEE_ADDRESS_TABLE_ENTRY_IS_ACTIVE otherwise.
|
|
1764
|
+
*/
|
|
1765
|
+
ezspSetAddressTableInfo(addressTableIndex: number, eui64: EUI64, id: NodeId): Promise<SLStatus>;
|
|
1766
|
+
/**
|
|
1767
|
+
* Gets the EUI64 and short ID of an address table entry.
|
|
1768
|
+
* @param addressTableIndex
|
|
1769
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1770
|
+
* @returns One of the following:
|
|
1771
|
+
* - The short ID corresponding to the remote node whose EUI64 is stored in the address table at the given index.
|
|
1772
|
+
* - SL_ZIGBEE_UNKNOWN_NODE_ID:
|
|
1773
|
+
* Indicates that the EUI64 stored in the address table at the given index is valid but the short ID is currently unknown.
|
|
1774
|
+
* - SL_ZIGBEE_DISCOVERY_ACTIVE_NODE_ID:
|
|
1775
|
+
* Indicates that the EUI64 stored in the address table at the given location is valid and network address discovery is underway.
|
|
1776
|
+
* - SL_ZIGBEE_TABLE_ENTRY_UNUSED_NODE_ID:
|
|
1777
|
+
* Indicates that the entry stored in the address table at the given index is not in use.
|
|
1523
1778
|
* @returns The EUI64 of the address table entry is copied to this location.
|
|
1524
1779
|
*/
|
|
1525
|
-
|
|
1526
|
-
/**
|
|
1527
|
-
* Gets the short ID of an address table entry.
|
|
1528
|
-
* @param addressTableIndex uint8_t The index of an address table entry.
|
|
1529
|
-
* @returns One of the following: The short ID corresponding to the remote node
|
|
1530
|
-
* whose EUI64 is stored in the address table at the given index.
|
|
1531
|
-
* - EMBER_UNKNOWN_NODE_ID - Indicates that the EUI64 stored in the address table
|
|
1532
|
-
* at the given index is valid but the short ID is currently unknown.
|
|
1533
|
-
* - EMBER_DISCOVERY_ACTIVE_NODE_ID - Indicates that the EUI64 stored in the
|
|
1534
|
-
* address table at the given location is valid and network address discovery is
|
|
1535
|
-
* underway.
|
|
1536
|
-
* - EMBER_TABLE_ENTRY_UNUSED_NODE_ID - Indicates that the entry stored
|
|
1537
|
-
* in the address table at the given index is not in use.
|
|
1538
|
-
*/
|
|
1539
|
-
ezspGetAddressTableRemoteNodeId(addressTableIndex: number): Promise<EmberNodeId>;
|
|
1780
|
+
ezspGetAddressTableInfo(addressTableIndex: number): Promise<[SLStatus, nodeId: NodeId, eui64: EUI64]>;
|
|
1540
1781
|
/**
|
|
1541
1782
|
* Tells the stack whether or not the normal interval between retransmissions of a retried unicast message should
|
|
1542
1783
|
* be increased by EMBER_INDIRECT_TRANSMISSION_TIMEOUT.
|
|
@@ -1550,17 +1791,19 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1550
1791
|
* @param remoteEui64 The address of the node for which the timeout is to be set.
|
|
1551
1792
|
* @param extendedTimeout true if the retry interval should be increased by EMBER_INDIRECT_TRANSMISSION_TIMEOUT.
|
|
1552
1793
|
* false if the normal retry interval should be used.
|
|
1794
|
+
* @returns An SLStatus value indicating success or the reason for failure. Always `OK` in v13-.
|
|
1553
1795
|
*/
|
|
1554
|
-
ezspSetExtendedTimeout(remoteEui64:
|
|
1796
|
+
ezspSetExtendedTimeout(remoteEui64: EUI64, extendedTimeout: boolean): Promise<SLStatus>;
|
|
1555
1797
|
/**
|
|
1556
1798
|
* Indicates whether or not the stack will extend the normal interval between
|
|
1557
1799
|
* retransmissions of a retried unicast message by
|
|
1558
1800
|
* EMBER_INDIRECT_TRANSMISSION_TIMEOUT.
|
|
1559
1801
|
* @param remoteEui64 The address of the node for which the timeout is to be returned.
|
|
1560
|
-
* @returns
|
|
1561
|
-
*
|
|
1802
|
+
* @returns
|
|
1803
|
+
* - SLStatus.OK if the retry interval will be increased by SL_ZIGBEE_INDIRECT_TRANSMISSION_TIMEOUT
|
|
1804
|
+
* - SLStatus.FAIL if the normal retry interval will be used.
|
|
1562
1805
|
*/
|
|
1563
|
-
ezspGetExtendedTimeout(remoteEui64:
|
|
1806
|
+
ezspGetExtendedTimeout(remoteEui64: EUI64): Promise<SLStatus>;
|
|
1564
1807
|
/**
|
|
1565
1808
|
* Replaces the EUI64, short ID and extended timeout setting of an address table
|
|
1566
1809
|
* entry. The previous EUI64, short ID and extended timeout setting are
|
|
@@ -1568,52 +1811,52 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1568
1811
|
* @param addressTableIndex uint8_t The index of the address table entry that will be modified.
|
|
1569
1812
|
* @param newEui64 The EUI64 to be written to the address table entry.
|
|
1570
1813
|
* @param newId One of the following: The short ID corresponding to the new EUI64.
|
|
1571
|
-
*
|
|
1572
|
-
*
|
|
1573
|
-
* @param newExtendedTimeout true if the retry interval should be increased by
|
|
1814
|
+
* SL_ZIGBEE_UNKNOWN_NODE_ID if the new EUI64 is valid but the short ID is unknown and should be discovered by the stack.
|
|
1815
|
+
* SL_ZIGBEE_TABLE_ENTRY_UNUSED_NODE_ID if the address table entry is now unused.
|
|
1816
|
+
* @param newExtendedTimeout true if the retry interval should be increased by SL_ZIGBEE_INDIRECT_TRANSMISSION_TIMEOUT.
|
|
1574
1817
|
* false if the normal retry interval should be used.
|
|
1575
|
-
* @returns
|
|
1576
|
-
* were successfully modified,
|
|
1577
|
-
* otherwise.
|
|
1818
|
+
* @returns
|
|
1819
|
+
* - SLStatus.OK if the EUI64, short ID and extended timeout setting were successfully modified,
|
|
1820
|
+
* - SLStatus.ZIGBEE_ADDRESS_TABLE_ENTRY_IS_ACTIVE otherwise.
|
|
1578
1821
|
* @returns oldEui64 The EUI64 of the address table entry before it was modified.
|
|
1579
|
-
* @returns oldId
|
|
1580
|
-
*
|
|
1581
|
-
*
|
|
1582
|
-
* @returns oldExtendedTimeouttrue bool * if the retry interval was being increased by
|
|
1822
|
+
* @returns oldId NodeId * One of the following: The short ID corresponding to the EUI64 before it was modified.
|
|
1823
|
+
* SL_ZIGBEE_UNKNOWN_NODE_ID if the short ID was unknown. SL_ZIGBEE_DISCOVERY_ACTIVE_NODE_ID if discovery of the short ID was underway.
|
|
1824
|
+
* SL_ZIGBEE_TABLE_ENTRY_UNUSED_NODE_ID if the address table entry was unused.
|
|
1825
|
+
* @returns oldExtendedTimeouttrue bool * if the retry interval was being increased by SL_ZIGBEE_INDIRECT_TRANSMISSION_TIMEOUT.
|
|
1583
1826
|
* false if the normal retry interval was being used.
|
|
1584
1827
|
*/
|
|
1585
|
-
ezspReplaceAddressTableEntry(addressTableIndex: number, newEui64:
|
|
1828
|
+
ezspReplaceAddressTableEntry(addressTableIndex: number, newEui64: EUI64, newId: NodeId, newExtendedTimeout: boolean): Promise<[SLStatus, oldEui64: EUI64, oldId: NodeId, oldExtendedTimeout: boolean]>;
|
|
1586
1829
|
/**
|
|
1587
1830
|
* Returns the node ID that corresponds to the specified EUI64. The node ID is
|
|
1588
1831
|
* found by searching through all stack tables for the specified EUI64.
|
|
1589
1832
|
* @param eui64 The EUI64 of the node to look up.
|
|
1590
|
-
* @returns The short ID of the node or
|
|
1591
|
-
* known.
|
|
1833
|
+
* @returns The short ID of the node or SL_ZIGBEE_NULL_NODE_ID if the short ID is not known.
|
|
1592
1834
|
*/
|
|
1593
|
-
ezspLookupNodeIdByEui64(eui64:
|
|
1835
|
+
ezspLookupNodeIdByEui64(eui64: EUI64): Promise<NodeId>;
|
|
1594
1836
|
/**
|
|
1595
1837
|
* Returns the EUI64 that corresponds to the specified node ID. The EUI64 is
|
|
1596
1838
|
* found by searching through all stack tables for the specified node ID.
|
|
1597
1839
|
* @param nodeId The short ID of the node to look up.
|
|
1598
|
-
* @returns
|
|
1599
|
-
*
|
|
1840
|
+
* @returns
|
|
1841
|
+
* - SLStatus.OK if the EUI64 was found,
|
|
1842
|
+
* - SLStatus.FAIL if the EUI64 is not known.
|
|
1600
1843
|
* @returns eui64 The EUI64 of the node.
|
|
1601
1844
|
*/
|
|
1602
|
-
ezspLookupEui64ByNodeId(nodeId:
|
|
1845
|
+
ezspLookupEui64ByNodeId(nodeId: NodeId): Promise<[SLStatus, eui64: EUI64]>;
|
|
1603
1846
|
/**
|
|
1604
1847
|
* Gets an entry from the multicast table.
|
|
1605
1848
|
* @param uint8_t The index of a multicast table entry.
|
|
1606
|
-
* @returns An
|
|
1849
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1607
1850
|
* @returns EmberMulticastTableEntry * The contents of the multicast entry.
|
|
1608
1851
|
*/
|
|
1609
|
-
ezspGetMulticastTableEntry(index: number): Promise<[
|
|
1852
|
+
ezspGetMulticastTableEntry(index: number): Promise<[SLStatus, value: EmberMulticastTableEntry]>;
|
|
1610
1853
|
/**
|
|
1611
1854
|
* Sets an entry in the multicast table.
|
|
1612
1855
|
* @param index uint8_t The index of a multicast table entry
|
|
1613
1856
|
* @param EmberMulticastTableEntry * The contents of the multicast entry.
|
|
1614
|
-
* @returns An
|
|
1857
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1615
1858
|
*/
|
|
1616
|
-
ezspSetMulticastTableEntry(index: number, value: EmberMulticastTableEntry): Promise<
|
|
1859
|
+
ezspSetMulticastTableEntry(index: number, value: EmberMulticastTableEntry): Promise<SLStatus>;
|
|
1617
1860
|
/**
|
|
1618
1861
|
* Callback
|
|
1619
1862
|
* A callback invoked by the EmberZNet stack when an id conflict is discovered,
|
|
@@ -1623,80 +1866,94 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1623
1866
|
* application should discontinue any other use of the id.
|
|
1624
1867
|
* @param id The short id for which a conflict was detected
|
|
1625
1868
|
*/
|
|
1626
|
-
ezspIdConflictHandler(id:
|
|
1869
|
+
ezspIdConflictHandler(id: NodeId): void;
|
|
1627
1870
|
/**
|
|
1628
1871
|
* Write the current node Id, PAN ID, or Node type to the tokens
|
|
1629
1872
|
* @param erase Erase the node type or not
|
|
1630
|
-
* @returns An
|
|
1631
|
-
*/
|
|
1632
|
-
ezspWriteNodeData(erase: boolean): Promise<EmberStatus>;
|
|
1633
|
-
/**
|
|
1634
|
-
* Transmits the given message without modification. The MAC header is assumed
|
|
1635
|
-
* to be configured in the message at the time this function is called.
|
|
1636
|
-
* @param messageContents uint8_t * The raw message.
|
|
1637
|
-
* @returns An EmberStatus value indicating success or the reason for failure.
|
|
1873
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1638
1874
|
*/
|
|
1639
|
-
|
|
1875
|
+
ezspWriteNodeData(erase: boolean): Promise<SLStatus>;
|
|
1640
1876
|
/**
|
|
1641
1877
|
* Transmits the given message without modification. The MAC header is assumed
|
|
1642
1878
|
* to be configured in the message at the time this function is called.
|
|
1643
1879
|
* @param messageContents uint8_t * The raw message.
|
|
1644
1880
|
* @param priority uint8_t transmit priority.
|
|
1645
1881
|
* @param useCca Should we enable CCA or not.
|
|
1646
|
-
* @returns An
|
|
1882
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
1647
1883
|
*/
|
|
1648
|
-
|
|
1884
|
+
ezspSendRawMessage(messageContents: Buffer, priority: EmberTransmitPriority, useCca: boolean): Promise<SLStatus>;
|
|
1649
1885
|
/**
|
|
1650
1886
|
* Callback
|
|
1651
1887
|
* A callback invoked by the EmberZNet stack when a MAC passthrough message is
|
|
1652
1888
|
* received.
|
|
1653
1889
|
* @param messageType The type of MAC passthrough message received.
|
|
1654
|
-
* @param
|
|
1655
|
-
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during reception.
|
|
1656
|
-
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
1890
|
+
* @param packetInfo Information about the incoming packet.
|
|
1657
1891
|
* @param messageContents uint8_t * The raw message that was received.
|
|
1658
1892
|
*/
|
|
1659
|
-
ezspMacPassthroughMessageHandler(messageType: EmberMacPassthroughType,
|
|
1893
|
+
ezspMacPassthroughMessageHandler(messageType: EmberMacPassthroughType, packetInfo: EmberRxPacketInfo, messageContents: Buffer): void;
|
|
1660
1894
|
/**
|
|
1661
1895
|
* Callback
|
|
1662
1896
|
* A callback invoked by the EmberZNet stack when a raw MAC message that has
|
|
1663
1897
|
* matched one of the application's configured MAC filters.
|
|
1664
1898
|
* @param filterIndexMatch uint8_t The index of the filter that was matched.
|
|
1665
1899
|
* @param legacyPassthroughType The type of MAC passthrough message received.
|
|
1666
|
-
* @param
|
|
1667
|
-
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during reception.
|
|
1668
|
-
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
1900
|
+
* @param packetInfo Information about the incoming packet.
|
|
1669
1901
|
* @param messageContents uint8_t * The raw message that was received.
|
|
1670
1902
|
*/
|
|
1671
|
-
ezspMacFilterMatchMessageHandler(filterIndexMatch: number, legacyPassthroughType: EmberMacPassthroughType,
|
|
1903
|
+
ezspMacFilterMatchMessageHandler(filterIndexMatch: number, legacyPassthroughType: EmberMacPassthroughType, packetInfo: EmberRxPacketInfo, messageContents: Buffer): void;
|
|
1672
1904
|
/**
|
|
1673
1905
|
* Callback
|
|
1674
1906
|
* A callback invoked by the EmberZNet stack when the MAC has finished
|
|
1675
1907
|
* transmitting a raw message.
|
|
1676
|
-
* @param
|
|
1908
|
+
* @param messageContents (v14+)
|
|
1909
|
+
* @param status
|
|
1910
|
+
* - SLStatus.OK if the transmission was successful,
|
|
1911
|
+
* - SLStatus.ZIGBEE_DELIVERY_FAILED if not
|
|
1677
1912
|
*/
|
|
1678
|
-
ezspRawTransmitCompleteHandler(status:
|
|
1913
|
+
ezspRawTransmitCompleteHandler(messageContents: Buffer, status: SLStatus): void;
|
|
1679
1914
|
/**
|
|
1680
|
-
* This function is useful to sleepy end devices.
|
|
1681
|
-
* retry interval (in milliseconds) for mac data poll.
|
|
1682
|
-
* in milliseconds the device waits before retrying a data poll when a MAC level
|
|
1915
|
+
* This function is useful to sleepy end devices.
|
|
1916
|
+
* This function will set the retry interval (in milliseconds) for mac data poll.
|
|
1917
|
+
* This interval is the time in milliseconds the device waits before retrying a data poll when a MAC level
|
|
1683
1918
|
* data poll fails for any reason.
|
|
1684
1919
|
* @param waitBeforeRetryIntervalMs uint32_t Time in milliseconds the device waits before retrying
|
|
1685
1920
|
* a data poll when a MAC level data poll fails for any reason.
|
|
1686
1921
|
*/
|
|
1687
1922
|
ezspSetMacPollFailureWaitTime(waitBeforeRetryIntervalMs: number): Promise<void>;
|
|
1923
|
+
/**
|
|
1924
|
+
* Returns the maximum number of no-ack retries that will be attempted
|
|
1925
|
+
* @returns Max MAC retries
|
|
1926
|
+
*/
|
|
1927
|
+
ezspGetMaxMacRetries(): Promise<number>;
|
|
1688
1928
|
/**
|
|
1689
1929
|
* Sets the priority masks and related variables for choosing the best beacon.
|
|
1690
1930
|
* @param param EmberBeaconClassificationParams * The beacon prioritization related variable
|
|
1691
|
-
* @returns The attempt to set the
|
|
1931
|
+
* @returns The attempt to set the parameters returns SLStatus.OK
|
|
1692
1932
|
*/
|
|
1693
|
-
ezspSetBeaconClassificationParams(param: EmberBeaconClassificationParams): Promise<
|
|
1933
|
+
ezspSetBeaconClassificationParams(param: EmberBeaconClassificationParams): Promise<SLStatus>;
|
|
1694
1934
|
/**
|
|
1695
1935
|
* Gets the priority masks and related variables for choosing the best beacon.
|
|
1696
|
-
* @returns The attempt to get the
|
|
1936
|
+
* @returns The attempt to get the parameters returns SLStatus.OK
|
|
1697
1937
|
* @returns EmberBeaconClassificationParams * Gets the beacon prioritization related variable
|
|
1698
1938
|
*/
|
|
1699
|
-
ezspGetBeaconClassificationParams(): Promise<[
|
|
1939
|
+
ezspGetBeaconClassificationParams(): Promise<[SLStatus, param: EmberBeaconClassificationParams]>;
|
|
1940
|
+
/**
|
|
1941
|
+
* Indicate whether there are pending messages in the APS retry queue.
|
|
1942
|
+
* @returns True if there is a pending message for this network in the APS retry queue, false if not.
|
|
1943
|
+
*/
|
|
1944
|
+
ezspPendingAckedMessages(): Promise<boolean>;
|
|
1945
|
+
/**
|
|
1946
|
+
* Reschedule sending link status message, with first one being sent immediately.
|
|
1947
|
+
* @returns
|
|
1948
|
+
*/
|
|
1949
|
+
ezspRescheduleLinkStatusMsg(): Promise<SLStatus>;
|
|
1950
|
+
/**
|
|
1951
|
+
* Set the network update ID to the desired value. Must be called before joining or forming the network.
|
|
1952
|
+
* @param nwkUpdateId uint8_t Desired value of the network update ID.
|
|
1953
|
+
* @param setWhenOnNetwork Set to true in case change should also apply when on network.
|
|
1954
|
+
* @returns Status of set operation for the network update ID.
|
|
1955
|
+
*/
|
|
1956
|
+
ezspSetNwkUpdateId(nwkUpdateId: number, setWhenOnNetwork: boolean): Promise<SLStatus>;
|
|
1700
1957
|
/**
|
|
1701
1958
|
* Sets the security state that will be used by the device when it forms or
|
|
1702
1959
|
* joins the network. This call should not be used when restoring saved network
|
|
@@ -1705,21 +1962,21 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1705
1962
|
* @param state EmberInitialSecurityState * The security configuration to be set.
|
|
1706
1963
|
* @returns The success or failure code of the operation.
|
|
1707
1964
|
*/
|
|
1708
|
-
ezspSetInitialSecurityState(state: EmberInitialSecurityState): Promise<
|
|
1965
|
+
ezspSetInitialSecurityState(state: EmberInitialSecurityState): Promise<SLStatus>;
|
|
1709
1966
|
/**
|
|
1710
1967
|
* Gets the current security state that is being used by a device that is joined
|
|
1711
1968
|
* in the network.
|
|
1712
1969
|
* @returns The success or failure code of the operation.
|
|
1713
1970
|
* @returns EmberCurrentSecurityState * The security configuration in use by the stack.
|
|
1714
1971
|
*/
|
|
1715
|
-
ezspGetCurrentSecurityState(): Promise<[
|
|
1972
|
+
ezspGetCurrentSecurityState(): Promise<[SLStatus, state: EmberCurrentSecurityState]>;
|
|
1716
1973
|
/**
|
|
1717
1974
|
* Exports a key from security manager based on passed context.
|
|
1718
1975
|
* @param context sl_zb_sec_man_context_t * Metadata to identify the requested key.
|
|
1719
1976
|
* @returns sl_zb_sec_man_key_t * Data to store the exported key in.
|
|
1720
|
-
* @returns
|
|
1977
|
+
* @returns SLStatus * The success or failure code of the operation.
|
|
1721
1978
|
*/
|
|
1722
|
-
ezspExportKey(context: SecManContext): Promise<[key: SecManKey
|
|
1979
|
+
ezspExportKey(context: SecManContext): Promise<[SLStatus, key: SecManKey]>;
|
|
1723
1980
|
/**
|
|
1724
1981
|
* Imports a key into security manager based on passed context.
|
|
1725
1982
|
* @param context sl_zb_sec_man_context_t * Metadata to identify where the imported key should be stored.
|
|
@@ -1741,33 +1998,31 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1741
1998
|
* @param address The address to search for. Alternatively, all zeros may be passed in to search for the first empty entry.
|
|
1742
1999
|
* @param linkKey This indicates whether to search for an entry that contains a link key or a master key.
|
|
1743
2000
|
* true means to search for an entry with a Link Key.
|
|
1744
|
-
* @returns uint8_t This indicates the index of the entry that matches the search
|
|
1745
|
-
*
|
|
2001
|
+
* @returns uint8_t This indicates the index of the entry that matches the search criteria.
|
|
2002
|
+
* A value of 0xFF is returned if not matching entry is found.
|
|
1746
2003
|
*/
|
|
1747
|
-
ezspFindKeyTableEntry(address:
|
|
2004
|
+
ezspFindKeyTableEntry(address: EUI64, linkKey: boolean): Promise<number>;
|
|
1748
2005
|
/**
|
|
1749
2006
|
* This function sends an APS TransportKey command containing the current trust
|
|
1750
2007
|
* center link key. The node to which the command is sent is specified via the
|
|
1751
2008
|
* short and long address arguments.
|
|
1752
2009
|
* @param destinationNodeId The short address of the node to which this command will be sent
|
|
1753
2010
|
* @param destinationEui64 The long address of the node to which this command will be sent
|
|
1754
|
-
* @returns An
|
|
2011
|
+
* @returns An SLStatus value indicating success of failure of the operation
|
|
1755
2012
|
*/
|
|
1756
|
-
ezspSendTrustCenterLinkKey(destinationNodeId:
|
|
2013
|
+
ezspSendTrustCenterLinkKey(destinationNodeId: NodeId, destinationEui64: EUI64): Promise<SLStatus>;
|
|
1757
2014
|
/**
|
|
1758
2015
|
* This function erases the data in the key table entry at the specified index.
|
|
1759
2016
|
* If the index is invalid, false is returned.
|
|
1760
2017
|
* @param index uint8_t This indicates the index of entry to erase.
|
|
1761
|
-
* @returns
|
|
1762
|
-
* ::EMBER_KEY_INVALID if the index is out of range for the size of the key table.
|
|
2018
|
+
* @returns The success or failure of the operation.
|
|
1763
2019
|
*/
|
|
1764
|
-
ezspEraseKeyTableEntry(index: number): Promise<
|
|
2020
|
+
ezspEraseKeyTableEntry(index: number): Promise<SLStatus>;
|
|
1765
2021
|
/**
|
|
1766
2022
|
* This function clears the key table of the current network.
|
|
1767
|
-
* @returns
|
|
1768
|
-
* ::EMBER_INVALID_CALL otherwise.
|
|
2023
|
+
* @returns The success or failure of the operation.
|
|
1769
2024
|
*/
|
|
1770
|
-
ezspClearKeyTable(): Promise<
|
|
2025
|
+
ezspClearKeyTable(): Promise<SLStatus>;
|
|
1771
2026
|
/**
|
|
1772
2027
|
* A function to request a Link Key from the Trust Center with another device on
|
|
1773
2028
|
* the Network (which could be the Trust Center). A Link Key with the Trust
|
|
@@ -1785,9 +2040,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1785
2040
|
* returned via ezspZigbeeKeyEstablishmentHandler(...)
|
|
1786
2041
|
* @param partner This is the IEEE address of the partner device that will share the link key.
|
|
1787
2042
|
* @returns The success or failure of sending the request.
|
|
1788
|
-
*
|
|
2043
|
+
* This is not the final result of the attempt. ezspZigbeeKeyEstablishmentHandler(...) will return that.
|
|
1789
2044
|
*/
|
|
1790
|
-
ezspRequestLinkKey(partner:
|
|
2045
|
+
ezspRequestLinkKey(partner: EUI64): Promise<SLStatus>;
|
|
1791
2046
|
/**
|
|
1792
2047
|
* Requests a new link key from the Trust Center. This function starts by
|
|
1793
2048
|
* sending a Node Descriptor request to the Trust Center to verify its R21+
|
|
@@ -1797,10 +2052,10 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1797
2052
|
* Request Key, and Verify Key Confirm messages. The number of attempts resets for each message type sent
|
|
1798
2053
|
* (e.g., if maxAttempts is 3, up to 3 Node Descriptors are sent, up to 3 Request Keys, and up to 3 Verify Key Confirm messages are sent).
|
|
1799
2054
|
* @returns The success or failure of sending the request.
|
|
1800
|
-
*
|
|
1801
|
-
*
|
|
2055
|
+
* If the Node Descriptor is successfully transmitted, ezspZigbeeKeyEstablishmentHandler(...)
|
|
2056
|
+
* will be called at a later time with a final status result.
|
|
1802
2057
|
*/
|
|
1803
|
-
ezspUpdateTcLinkKey(maxAttempts: number): Promise<
|
|
2058
|
+
ezspUpdateTcLinkKey(maxAttempts: number): Promise<SLStatus>;
|
|
1804
2059
|
/**
|
|
1805
2060
|
* Callback
|
|
1806
2061
|
* This is a callback that indicates the success or failure of an attempt to establish a key with a partner device.
|
|
@@ -1808,7 +2063,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1808
2063
|
* This value is all zeros on a failure.
|
|
1809
2064
|
* @param status This is the status indicating what was established or why the key establishment failed.
|
|
1810
2065
|
*/
|
|
1811
|
-
ezspZigbeeKeyEstablishmentHandler(partner:
|
|
2066
|
+
ezspZigbeeKeyEstablishmentHandler(partner: EUI64, status: EmberKeyStatus): void;
|
|
1812
2067
|
/**
|
|
1813
2068
|
* Clear all of the transient link keys from RAM.
|
|
1814
2069
|
*/
|
|
@@ -1821,12 +2076,11 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1821
2076
|
ezspGetNetworkKeyInfo(): Promise<[SLStatus, networkKeyInfo: SecManNetworkKeyInfo]>;
|
|
1822
2077
|
/**
|
|
1823
2078
|
* Retrieve metadata about an APS link key. Does not retrieve contents.
|
|
1824
|
-
* @param
|
|
1825
|
-
* @returns
|
|
2079
|
+
* @param context sl_zb_sec_man_context_t * Context used to input information about key.
|
|
2080
|
+
* @returns Status of metadata retrieval operation.
|
|
1826
2081
|
* @returns sl_zb_sec_man_aps_key_metadata_t * Metadata about the referenced key.
|
|
1827
|
-
* @returns sl_status_t * Status of metadata retrieval operation.
|
|
1828
2082
|
*/
|
|
1829
|
-
ezspGetApsKeyInfo(
|
|
2083
|
+
ezspGetApsKeyInfo(context: SecManContext): Promise<[status: SLStatus, keyData: SecManAPSKeyMetadata]>;
|
|
1830
2084
|
/**
|
|
1831
2085
|
* Import an application link key into the key table.
|
|
1832
2086
|
* @param index uint8_t Index where this key is to be imported to.
|
|
@@ -1834,25 +2088,25 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1834
2088
|
* @param plaintextKey sl_zb_sec_man_key_t * The key data to be imported.
|
|
1835
2089
|
* @returns Status of key import operation.
|
|
1836
2090
|
*/
|
|
1837
|
-
ezspImportLinkKey(index: number, address:
|
|
2091
|
+
ezspImportLinkKey(index: number, address: EUI64, plaintextKey: SecManKey): Promise<SLStatus>;
|
|
1838
2092
|
/**
|
|
1839
2093
|
* Export the link key at given index from the key table.
|
|
1840
2094
|
* @param uint8_t Index of key to export.
|
|
1841
|
-
* @returns
|
|
2095
|
+
* @returns Status of key export operation.
|
|
2096
|
+
* @returns sl_zigbee_sec_man_context_t * Context referencing the exported key. Contains information like the EUI64 address it is associated with.
|
|
1842
2097
|
* @returns sl_zb_sec_man_key_t * The exported key.
|
|
1843
2098
|
* @returns sl_zb_sec_man_aps_key_metadata_t * Metadata about the key.
|
|
1844
|
-
* @returns sl_status_t * Status of key export operation.
|
|
1845
2099
|
*/
|
|
1846
|
-
ezspExportLinkKeyByIndex(index: number): Promise<[
|
|
2100
|
+
ezspExportLinkKeyByIndex(index: number): Promise<[SLStatus, context: SecManContext, plaintextKey: SecManKey, keyData: SecManAPSKeyMetadata]>;
|
|
1847
2101
|
/**
|
|
1848
2102
|
* Export the link key associated with the given EUI from the key table.
|
|
1849
2103
|
* @param eui EUI64 associated with the key to export.
|
|
2104
|
+
* @returns Status of key export operation.
|
|
1850
2105
|
* @returns sl_zb_sec_man_key_t * The exported key.
|
|
1851
|
-
* @returns
|
|
2106
|
+
* @returns sl_zigbee_sec_man_context_t * Context referencing the exported key. Contains information like the EUI64 address it is associated with.
|
|
1852
2107
|
* @returns sl_zb_sec_man_aps_key_metadata_t * Metadata about the key.
|
|
1853
|
-
* @returns sl_status_t * Status of key export operation.
|
|
1854
2108
|
*/
|
|
1855
|
-
ezspExportLinkKeyByEui(eui:
|
|
2109
|
+
ezspExportLinkKeyByEui(eui: EUI64): Promise<[SLStatus, context: SecManContext, plaintextKey: SecManKey, keyData: SecManAPSKeyMetadata]>;
|
|
1856
2110
|
/**
|
|
1857
2111
|
* Check whether a key context can be used to load a valid key.
|
|
1858
2112
|
* @param context sl_zb_sec_man_context_t * Context struct to check the validity of.
|
|
@@ -1863,28 +2117,43 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1863
2117
|
* Import a transient link key.
|
|
1864
2118
|
* @param eui64 EUI64 associated with this transient key.
|
|
1865
2119
|
* @param plaintextKey sl_zb_sec_man_key_t * The key to import.
|
|
1866
|
-
* @param sl_zigbee_sec_man_flags_t Flags associated with this transient key.
|
|
2120
|
+
* @param flags sl_zigbee_sec_man_flags_t (unused in v14+) Flags associated with this transient key.
|
|
1867
2121
|
* @returns Status of key import operation.
|
|
1868
2122
|
*/
|
|
1869
|
-
ezspImportTransientKey(eui64:
|
|
2123
|
+
ezspImportTransientKey(eui64: EUI64, plaintextKey: SecManKey, flags?: SecManFlag): Promise<SLStatus>;
|
|
1870
2124
|
/**
|
|
1871
2125
|
* Export a transient link key from a given table index.
|
|
1872
2126
|
* @param uint8_t Index to export from.
|
|
2127
|
+
* @returns Status of key export operation.
|
|
1873
2128
|
* @returns sl_zb_sec_man_context_t * Context struct for export operation.
|
|
1874
2129
|
* @returns sl_zb_sec_man_key_t * The exported key.
|
|
1875
2130
|
* @returns sl_zb_sec_man_aps_key_metadata_t * Metadata about the key.
|
|
1876
|
-
* @returns sl_status_t * Status of key export operation.
|
|
1877
2131
|
*/
|
|
1878
|
-
ezspExportTransientKeyByIndex(index: number): Promise<[context: SecManContext, plaintextKey: SecManKey, key_data: SecManAPSKeyMetadata
|
|
2132
|
+
ezspExportTransientKeyByIndex(index: number): Promise<[SLStatus, context: SecManContext, plaintextKey: SecManKey, key_data: SecManAPSKeyMetadata]>;
|
|
1879
2133
|
/**
|
|
1880
2134
|
* Export a transient link key associated with a given EUI64
|
|
1881
2135
|
* @param eui Index to export from.
|
|
2136
|
+
* @returns Status of key export operation.
|
|
1882
2137
|
* @returns sl_zb_sec_man_context_t * Context struct for export operation.
|
|
1883
2138
|
* @returns sl_zb_sec_man_key_t * The exported key.
|
|
1884
2139
|
* @returns sl_zb_sec_man_aps_key_metadata_t * Metadata about the key.
|
|
1885
|
-
* @returns sl_status_t * Status of key export operation.
|
|
1886
2140
|
*/
|
|
1887
|
-
ezspExportTransientKeyByEui(eui:
|
|
2141
|
+
ezspExportTransientKeyByEui(eui: EUI64): Promise<[SLStatus, context: SecManContext, plaintextKey: SecManKey, key_data: SecManAPSKeyMetadata]>;
|
|
2142
|
+
/**
|
|
2143
|
+
* Set the incoming TC link key frame counter to desired value.
|
|
2144
|
+
* @param frameCounter Value to set the frame counter to.
|
|
2145
|
+
*/
|
|
2146
|
+
ezspSetIncomingTcLinkKeyFrameCounter(frameCounter: number): Promise<void>;
|
|
2147
|
+
/**
|
|
2148
|
+
* Encrypt/decrypt a message in-place using APS.
|
|
2149
|
+
* @param encrypt Encrypt (true) or decrypt (false) the message.
|
|
2150
|
+
* @param lengthCombinedArg uint8_t Length of the array containing message, needs to be long enough to include the auxiliary header and MIC.
|
|
2151
|
+
* @param message uint8_t * The message to be en/de-crypted.
|
|
2152
|
+
* @param apsHeaderEndIndex uint8_t Index just past the APS frame.
|
|
2153
|
+
* @param remoteEui64 IEEE address of the device this message is associated with.
|
|
2154
|
+
* @returns Status of the encryption/decryption call.
|
|
2155
|
+
*/
|
|
2156
|
+
ezspApsCryptMessage(encrypt: boolean, lengthCombinedArg: number, message: Buffer, apsHeaderEndIndex: number, remoteEui64: EUI64): Promise<[SLStatus, cryptedMessage: Buffer]>;
|
|
1888
2157
|
/**
|
|
1889
2158
|
* Callback
|
|
1890
2159
|
* The NCP used the trust center behavior policy to decide whether to allow a
|
|
@@ -1897,7 +2166,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1897
2166
|
* @param policyDecision An EmberJoinDecision reflecting the decision made.
|
|
1898
2167
|
* @param parentOfNewNodeId The parent of the node whose status has changed.
|
|
1899
2168
|
*/
|
|
1900
|
-
ezspTrustCenterJoinHandler(newNodeId:
|
|
2169
|
+
ezspTrustCenterJoinHandler(newNodeId: NodeId, newNodeEui64: EUI64, status: EmberDeviceUpdate, policyDecision: EmberJoinDecision, parentOfNewNodeId: NodeId): void;
|
|
1901
2170
|
/**
|
|
1902
2171
|
* This function broadcasts a new encryption key, but does not tell the nodes in
|
|
1903
2172
|
* the network to start using it. To tell nodes to switch to the new key, use
|
|
@@ -1906,16 +2175,15 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1906
2175
|
* send the Switch Key after sending the alternate encryption key.
|
|
1907
2176
|
* @param key EmberKeyData * An optional pointer to a 16-byte encryption key (EMBER_ENCRYPTION_KEY_SIZE).
|
|
1908
2177
|
* An all zero key may be passed in, which will cause the stack to randomly generate a new key.
|
|
1909
|
-
* @returns
|
|
2178
|
+
* @returns SLStatus value that indicates the success or failure of the command.
|
|
1910
2179
|
*/
|
|
1911
|
-
ezspBroadcastNextNetworkKey(key: EmberKeyData): Promise<
|
|
2180
|
+
ezspBroadcastNextNetworkKey(key: EmberKeyData): Promise<SLStatus>;
|
|
1912
2181
|
/**
|
|
1913
2182
|
* This function broadcasts a switch key message to tell all nodes to change to
|
|
1914
2183
|
* the sequence number of the previously sent Alternate Encryption Key.
|
|
1915
|
-
* @returns
|
|
1916
|
-
* command.
|
|
2184
|
+
* @returns SLStatus value that indicates the success or failure of the command.
|
|
1917
2185
|
*/
|
|
1918
|
-
ezspBroadcastNetworkKeySwitch(): Promise<
|
|
2186
|
+
ezspBroadcastNetworkKeySwitch(): Promise<SLStatus>;
|
|
1919
2187
|
/**
|
|
1920
2188
|
* This routine processes the passed chunk of data and updates the hash context
|
|
1921
2189
|
* based on it. If the 'finalize' parameter is not set, then the length of the
|
|
@@ -1928,7 +2196,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1928
2196
|
* @returns The result of the operation
|
|
1929
2197
|
* @returns EmberAesMmoHashContext * The updated hash context.
|
|
1930
2198
|
*/
|
|
1931
|
-
ezspAesMmoHash(context: EmberAesMmoHashContext, finalize: boolean, data: Buffer): Promise<[
|
|
2199
|
+
ezspAesMmoHash(context: EmberAesMmoHashContext, finalize: boolean, data: Buffer): Promise<[SLStatus, returnContext: EmberAesMmoHashContext]>;
|
|
1932
2200
|
/**
|
|
1933
2201
|
* This command sends an APS remove device using APS encryption to the
|
|
1934
2202
|
* destination indicating either to remove itself from the network, or one of
|
|
@@ -1936,9 +2204,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1936
2204
|
* @param destShort The node ID of the device that will receive the message
|
|
1937
2205
|
* @param destLong The long address (EUI64) of the device that will receive the message.
|
|
1938
2206
|
* @param targetLong The long address (EUI64) of the device to be removed.
|
|
1939
|
-
* @returns An
|
|
2207
|
+
* @returns An SLStatus value indicating success, or the reason for failure
|
|
1940
2208
|
*/
|
|
1941
|
-
ezspRemoveDevice(destShort:
|
|
2209
|
+
ezspRemoveDevice(destShort: NodeId, destLong: EUI64, targetLong: EUI64): Promise<SLStatus>;
|
|
1942
2210
|
/**
|
|
1943
2211
|
* This command will send a unicast transport key message with a new NWK key to
|
|
1944
2212
|
* the specified device. APS encryption using the device's existing link key
|
|
@@ -1946,15 +2214,15 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1946
2214
|
* @param destShort The node ID of the device that will receive the message
|
|
1947
2215
|
* @param destLong The long address (EUI64) of the device that will receive the message.
|
|
1948
2216
|
* @param key EmberKeyData * The NWK key to send to the new device.
|
|
1949
|
-
* @returns An
|
|
2217
|
+
* @returns An SLStatus value indicating success, or the reason for failure
|
|
1950
2218
|
*/
|
|
1951
|
-
ezspUnicastNwkKeyUpdate(destShort:
|
|
2219
|
+
ezspUnicastNwkKeyUpdate(destShort: NodeId, destLong: EUI64, key: EmberKeyData): Promise<SLStatus>;
|
|
1952
2220
|
/**
|
|
1953
2221
|
* This call starts the generation of the ECC Ephemeral Public/Private key pair.
|
|
1954
2222
|
* When complete it stores the private key. The results are returned via
|
|
1955
2223
|
* ezspGenerateCbkeKeysHandler().
|
|
1956
2224
|
*/
|
|
1957
|
-
ezspGenerateCbkeKeys(): Promise<
|
|
2225
|
+
ezspGenerateCbkeKeys(): Promise<SLStatus>;
|
|
1958
2226
|
/**
|
|
1959
2227
|
* Callback
|
|
1960
2228
|
* A callback by the Crypto Engine indicating that a new ephemeral
|
|
@@ -1964,7 +2232,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1964
2232
|
* @param status The result of the CBKE operation.
|
|
1965
2233
|
* @param ephemeralPublicKey EmberPublicKeyData * The generated ephemeral public key.
|
|
1966
2234
|
*/
|
|
1967
|
-
ezspGenerateCbkeKeysHandler(status:
|
|
2235
|
+
ezspGenerateCbkeKeysHandler(status: SLStatus, ephemeralPublicKey: EmberPublicKeyData): void;
|
|
1968
2236
|
/**
|
|
1969
2237
|
* Calculates the SMAC verification keys for both the initiator and responder
|
|
1970
2238
|
* roles of CBKE using the passed parameters and the stored public/private key
|
|
@@ -1975,7 +2243,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1975
2243
|
* @param partnerCertificate EmberCertificateData * The key establishment partner's implicit certificate.
|
|
1976
2244
|
* @param partnerEphemeralPublicKey EmberPublicKeyData * The key establishment partner's ephemeral public key
|
|
1977
2245
|
*/
|
|
1978
|
-
ezspCalculateSmacs(amInitiator: boolean, partnerCertificate: EmberCertificateData, partnerEphemeralPublicKey: EmberPublicKeyData): Promise<
|
|
2246
|
+
ezspCalculateSmacs(amInitiator: boolean, partnerCertificate: EmberCertificateData, partnerEphemeralPublicKey: EmberPublicKeyData): Promise<SLStatus>;
|
|
1979
2247
|
/**
|
|
1980
2248
|
* Callback
|
|
1981
2249
|
* A callback to indicate that the NCP has finished calculating the Secure
|
|
@@ -1986,13 +2254,13 @@ export declare class Ezsp extends EventEmitter {
|
|
|
1986
2254
|
* @param initiatorSmac EmberSmacData * The calculated value of the initiator's SMAC
|
|
1987
2255
|
* @param responderSmac EmberSmacData * The calculated value of the responder's SMAC
|
|
1988
2256
|
*/
|
|
1989
|
-
ezspCalculateSmacsHandler(status:
|
|
2257
|
+
ezspCalculateSmacsHandler(status: SLStatus, initiatorSmac: EmberSmacData, responderSmac: EmberSmacData): void;
|
|
1990
2258
|
/**
|
|
1991
2259
|
* This call starts the generation of the ECC 283k1 curve Ephemeral
|
|
1992
2260
|
* Public/Private key pair. When complete it stores the private key. The results
|
|
1993
2261
|
* are returned via ezspGenerateCbkeKeysHandler283k1().
|
|
1994
2262
|
*/
|
|
1995
|
-
ezspGenerateCbkeKeys283k1(): Promise<
|
|
2263
|
+
ezspGenerateCbkeKeys283k1(): Promise<SLStatus>;
|
|
1996
2264
|
/**
|
|
1997
2265
|
* Callback
|
|
1998
2266
|
* A callback by the Crypto Engine indicating that a new 283k1 ephemeral
|
|
@@ -2002,7 +2270,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2002
2270
|
* @param status The result of the CBKE operation.
|
|
2003
2271
|
* @param ephemeralPublicKey EmberPublicKey283k1Data * The generated ephemeral public key.
|
|
2004
2272
|
*/
|
|
2005
|
-
ezspGenerateCbkeKeysHandler283k1(status:
|
|
2273
|
+
ezspGenerateCbkeKeysHandler283k1(status: SLStatus, ephemeralPublicKey: EmberPublicKey283k1Data): void;
|
|
2006
2274
|
/**
|
|
2007
2275
|
* Calculates the SMAC verification keys for both the initiator and responder
|
|
2008
2276
|
* roles of CBKE for the 283k1 ECC curve using the passed parameters and the
|
|
@@ -2013,7 +2281,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2013
2281
|
* @param partnerCertificate EmberCertificate283k1Data * The key establishment partner's implicit certificate.
|
|
2014
2282
|
* @param partnerEphemeralPublicKey EmberPublicKey283k1Data * The key establishment partner's ephemeral public key
|
|
2015
2283
|
*/
|
|
2016
|
-
ezspCalculateSmacs283k1(amInitiator: boolean, partnerCertificate: EmberCertificate283k1Data, partnerEphemeralPublicKey: EmberPublicKey283k1Data): Promise<
|
|
2284
|
+
ezspCalculateSmacs283k1(amInitiator: boolean, partnerCertificate: EmberCertificate283k1Data, partnerEphemeralPublicKey: EmberPublicKey283k1Data): Promise<SLStatus>;
|
|
2017
2285
|
/**
|
|
2018
2286
|
* Callback
|
|
2019
2287
|
* A callback to indicate that the NCP has finished calculating the Secure
|
|
@@ -2025,7 +2293,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2025
2293
|
* @param initiatorSmac EmberSmacData * The calculated value of the initiator's SMAC
|
|
2026
2294
|
* @param responderSmac EmberSmacData * The calculated value of the responder's SMAC
|
|
2027
2295
|
*/
|
|
2028
|
-
ezspCalculateSmacsHandler283k1(status:
|
|
2296
|
+
ezspCalculateSmacsHandler283k1(status: SLStatus, initiatorSmac: EmberSmacData, responderSmac: EmberSmacData): void;
|
|
2029
2297
|
/**
|
|
2030
2298
|
* Clears the temporary data associated with CBKE and the key establishment,
|
|
2031
2299
|
* most notably the ephemeral public/private key pair. If storeLinKey is true it
|
|
@@ -2034,7 +2302,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2034
2302
|
* @param storeLinkKey A bool indicating whether to store (true) or discard (false) the unverified link
|
|
2035
2303
|
* key derived when ezspCalculateSmacs() was previously called.
|
|
2036
2304
|
*/
|
|
2037
|
-
ezspClearTemporaryDataMaybeStoreLinkKey(storeLinkKey: boolean): Promise<
|
|
2305
|
+
ezspClearTemporaryDataMaybeStoreLinkKey(storeLinkKey: boolean): Promise<SLStatus>;
|
|
2038
2306
|
/**
|
|
2039
2307
|
* Clears the temporary data associated with CBKE and the key establishment,
|
|
2040
2308
|
* most notably the ephemeral public/private key pair. If storeLinKey is true it
|
|
@@ -2043,53 +2311,17 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2043
2311
|
* @param storeLinkKey A bool indicating whether to store (true) or discard (false) the unverified link
|
|
2044
2312
|
* key derived when ezspCalculateSmacs() was previously called.
|
|
2045
2313
|
*/
|
|
2046
|
-
ezspClearTemporaryDataMaybeStoreLinkKey283k1(storeLinkKey: boolean): Promise<
|
|
2314
|
+
ezspClearTemporaryDataMaybeStoreLinkKey283k1(storeLinkKey: boolean): Promise<SLStatus>;
|
|
2047
2315
|
/**
|
|
2048
2316
|
* Retrieves the certificate installed on the NCP.
|
|
2049
2317
|
* @returns EmberCertificateData * The locally installed certificate.
|
|
2050
2318
|
*/
|
|
2051
|
-
ezspGetCertificate(): Promise<[
|
|
2319
|
+
ezspGetCertificate(): Promise<[SLStatus, localCert: EmberCertificateData]>;
|
|
2052
2320
|
/**
|
|
2053
2321
|
* Retrieves the 283k certificate installed on the NCP.
|
|
2054
2322
|
* @returns EmberCertificate283k1Data * The locally installed certificate.
|
|
2055
2323
|
*/
|
|
2056
|
-
ezspGetCertificate283k1(): Promise<[
|
|
2057
|
-
/**
|
|
2058
|
-
* LEGACY FUNCTION: This functionality has been replaced by a single bit in the
|
|
2059
|
-
* EmberApsFrame, EMBER_APS_OPTION_DSA_SIGN. Devices wishing to send signed
|
|
2060
|
-
* messages should use that as it requires fewer function calls and message
|
|
2061
|
-
* buffering. The dsaSignHandler response is still called when
|
|
2062
|
-
* EMBER_APS_OPTION_DSA_SIGN is used. However, this function is still supported.
|
|
2063
|
-
* This function begins the process of signing the passed message contained
|
|
2064
|
-
* within the messageContents array. If no other ECC operation is going on, it
|
|
2065
|
-
* will immediately return with EMBER_OPERATION_IN_PROGRESS to indicate the
|
|
2066
|
-
* start of ECC operation. It will delay a period of time to let APS retries
|
|
2067
|
-
* take place, but then it will shut down the radio and consume the CPU
|
|
2068
|
-
* processing until the signing is complete. This may take up to 1 second. The
|
|
2069
|
-
* signed message will be returned in the dsaSignHandler response. Note that the
|
|
2070
|
-
* last byte of the messageContents passed to this function has special
|
|
2071
|
-
* significance. As the typical use case for DSA signing is to sign the ZCL
|
|
2072
|
-
* payload of a DRLC Report Event Status message in SE 1.0, there is often both
|
|
2073
|
-
* a signed portion (ZCL payload) and an unsigned portion (ZCL header). The last
|
|
2074
|
-
* byte in the content of messageToSign is therefore used as a special indicator
|
|
2075
|
-
* to signify how many bytes of leading data in the array should be excluded
|
|
2076
|
-
* from consideration during the signing process. If the signature needs to
|
|
2077
|
-
* cover the entire array (all bytes except last one), the caller should ensure
|
|
2078
|
-
* that the last byte of messageContents is 0x00. When the signature operation
|
|
2079
|
-
* is complete, this final byte will be replaced by the signature type indicator
|
|
2080
|
-
* (0x01 for ECDSA signatures), and the actual signature will be appended to the
|
|
2081
|
-
* original contents after this byte.
|
|
2082
|
-
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
2083
|
-
* @param messageContents uint8_t * The message contents for which to create a signature.
|
|
2084
|
-
* Per above notes, this may include a leading portion of data not included in the signature,
|
|
2085
|
-
* in which case the last byte of this array should be set to the index of the first byte
|
|
2086
|
-
* to be considered for signing. Otherwise, the last byte of messageContents should be 0x00
|
|
2087
|
-
* to indicate that a signature should occur across the entire contents.
|
|
2088
|
-
* @returns EMBER_OPERATION_IN_PROGRESS if the stack has queued up the operation
|
|
2089
|
-
* for execution. EMBER_INVALID_CALL if the operation can't be performed in this
|
|
2090
|
-
* context, possibly because another ECC operation is pending.
|
|
2091
|
-
*/
|
|
2092
|
-
ezspDsaSign(messageContents: Buffer): Promise<EmberStatus>;
|
|
2324
|
+
ezspGetCertificate283k1(): Promise<[SLStatus, localCert: EmberCertificate283k1Data]>;
|
|
2093
2325
|
/**
|
|
2094
2326
|
* Callback
|
|
2095
2327
|
* The handler that returns the results of the signing operation. On success,
|
|
@@ -2100,7 +2332,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2100
2332
|
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
2101
2333
|
* @param messageContents uint8_t *The message and attached which includes the original message and the appended signature.
|
|
2102
2334
|
*/
|
|
2103
|
-
ezspDsaSignHandler(status:
|
|
2335
|
+
ezspDsaSignHandler(status: SLStatus, messageContents: Buffer): void;
|
|
2104
2336
|
/**
|
|
2105
2337
|
* Verify that signature of the associated message digest was signed by the
|
|
2106
2338
|
* private key of the associated certificate.
|
|
@@ -2111,7 +2343,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2111
2343
|
* certificate must both be issued by the same Certificate Authority, so they should share the same CA Public Key.
|
|
2112
2344
|
* @param receivedSig EmberSignatureData * The signature of the signed data.
|
|
2113
2345
|
*/
|
|
2114
|
-
ezspDsaVerify(digest: EmberMessageDigest, signerCertificate: EmberCertificateData, receivedSig: EmberSignatureData): Promise<
|
|
2346
|
+
ezspDsaVerify(digest: EmberMessageDigest, signerCertificate: EmberCertificateData, receivedSig: EmberSignatureData): Promise<SLStatus>;
|
|
2115
2347
|
/**
|
|
2116
2348
|
* Callback
|
|
2117
2349
|
* This callback is executed by the stack when the DSA verification has
|
|
@@ -2121,7 +2353,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2121
2353
|
* failed and the validity is unknown.
|
|
2122
2354
|
* @param status The result of the DSA verification operation.
|
|
2123
2355
|
*/
|
|
2124
|
-
ezspDsaVerifyHandler(status:
|
|
2356
|
+
ezspDsaVerifyHandler(status: SLStatus): void;
|
|
2125
2357
|
/**
|
|
2126
2358
|
* Verify that signature of the associated message digest was signed by the
|
|
2127
2359
|
* private key of the associated certificate.
|
|
@@ -2132,7 +2364,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2132
2364
|
* certificate must both be issued by the same Certificate Authority, so they should share the same CA Public Key.
|
|
2133
2365
|
* @param receivedSig EmberSignature283k1Data * The signature of the signed data.
|
|
2134
2366
|
*/
|
|
2135
|
-
ezspDsaVerify283k1(digest: EmberMessageDigest, signerCertificate: EmberCertificate283k1Data, receivedSig: EmberSignature283k1Data): Promise<
|
|
2367
|
+
ezspDsaVerify283k1(digest: EmberMessageDigest, signerCertificate: EmberCertificate283k1Data, receivedSig: EmberSignature283k1Data): Promise<SLStatus>;
|
|
2136
2368
|
/**
|
|
2137
2369
|
* Sets the device's CA public key, local certificate, and static private key on
|
|
2138
2370
|
* the NCP associated with this node.
|
|
@@ -2140,55 +2372,55 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2140
2372
|
* @param myCert EmberCertificateData * The node's new certificate signed by the CA.
|
|
2141
2373
|
* @param myKey EmberPrivateKeyData *The node's new static private key.
|
|
2142
2374
|
*/
|
|
2143
|
-
ezspSetPreinstalledCbkeData(caPublic: EmberPublicKeyData, myCert: EmberCertificateData, myKey: EmberPrivateKeyData): Promise<
|
|
2375
|
+
ezspSetPreinstalledCbkeData(caPublic: EmberPublicKeyData, myCert: EmberCertificateData, myKey: EmberPrivateKeyData): Promise<SLStatus>;
|
|
2144
2376
|
/**
|
|
2145
2377
|
* Sets the device's 283k1 curve CA public key, local certificate, and static
|
|
2146
2378
|
* private key on the NCP associated with this node.
|
|
2147
2379
|
* @returns Status of operation
|
|
2148
2380
|
*/
|
|
2149
|
-
ezspSavePreinstalledCbkeData283k1(): Promise<
|
|
2381
|
+
ezspSavePreinstalledCbkeData283k1(): Promise<SLStatus>;
|
|
2150
2382
|
/**
|
|
2151
2383
|
* Activate use of mfglib test routines and enables the radio receiver to report
|
|
2152
2384
|
* packets it receives to the mfgLibRxHandler() callback. These packets will not
|
|
2153
2385
|
* be passed up with a CRC failure. All other mfglib functions will return an
|
|
2154
2386
|
* error until the mfglibStart() has been called
|
|
2155
2387
|
* @param rxCallback true to generate a mfglibRxHandler callback when a packet is received.
|
|
2156
|
-
* @returns An
|
|
2388
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2157
2389
|
*/
|
|
2158
|
-
|
|
2390
|
+
mfglibInternalStart(rxCallback: boolean): Promise<SLStatus>;
|
|
2159
2391
|
/**
|
|
2160
2392
|
* Deactivate use of mfglib test routines; restores the hardware to the state it
|
|
2161
2393
|
* was in prior to mfglibStart() and stops receiving packets started by
|
|
2162
2394
|
* mfglibStart() at the same time.
|
|
2163
|
-
* @returns An
|
|
2395
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2164
2396
|
*/
|
|
2165
|
-
|
|
2397
|
+
mfglibInternalEnd(): Promise<SLStatus>;
|
|
2166
2398
|
/**
|
|
2167
2399
|
* Starts transmitting an unmodulated tone on the currently set channel and
|
|
2168
2400
|
* power level. Upon successful return, the tone will be transmitting. To stop
|
|
2169
2401
|
* transmitting tone, application must call mfglibStopTone(), allowing it the
|
|
2170
2402
|
* flexibility to determine its own criteria for tone duration (time, event,
|
|
2171
2403
|
* etc.)
|
|
2172
|
-
* @returns An
|
|
2404
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2173
2405
|
*/
|
|
2174
|
-
|
|
2406
|
+
mfglibInternalStartTone(): Promise<SLStatus>;
|
|
2175
2407
|
/**
|
|
2176
2408
|
* Stops transmitting tone started by mfglibStartTone().
|
|
2177
|
-
* @returns An
|
|
2409
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2178
2410
|
*/
|
|
2179
|
-
|
|
2411
|
+
mfglibInternalStopTone(): Promise<SLStatus>;
|
|
2180
2412
|
/**
|
|
2181
2413
|
* Starts transmitting a random stream of characters. This is so that the radio
|
|
2182
2414
|
* modulation can be measured.
|
|
2183
|
-
* @returns An
|
|
2415
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2184
2416
|
*/
|
|
2185
|
-
|
|
2417
|
+
mfglibInternalStartStream(): Promise<SLStatus>;
|
|
2186
2418
|
/**
|
|
2187
2419
|
* Stops transmitting a random stream of characters started by
|
|
2188
2420
|
* mfglibStartStream().
|
|
2189
|
-
* @returns An
|
|
2421
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2190
2422
|
*/
|
|
2191
|
-
|
|
2423
|
+
mfglibInternalStopStream(): Promise<SLStatus>;
|
|
2192
2424
|
/**
|
|
2193
2425
|
* Sends a single packet consisting of the following bytes: packetLength,
|
|
2194
2426
|
* packetContents[0], ... , packetContents[packetLength - 3], CRC[0], CRC[1].
|
|
@@ -2196,21 +2428,21 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2196
2428
|
* last two bytes of packetContents[] with the 16-bit CRC for the packet.
|
|
2197
2429
|
* @param packetLength uint8_t The length of the packetContents parameter in bytes. Must be greater than 3 and less than 123.
|
|
2198
2430
|
* @param packetContents uint8_t * The packet to send. The last two bytes will be replaced with the 16-bit CRC.
|
|
2199
|
-
* @returns An
|
|
2431
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2200
2432
|
*/
|
|
2201
|
-
|
|
2433
|
+
mfglibInternalSendPacket(packetContents: Buffer): Promise<SLStatus>;
|
|
2202
2434
|
/**
|
|
2203
2435
|
* Sets the radio channel. Calibration occurs if this is the first time the
|
|
2204
2436
|
* channel has been used.
|
|
2205
2437
|
* @param channel uint8_t The channel to switch to. Valid values are 11 - 26.
|
|
2206
|
-
* @returns An
|
|
2438
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2207
2439
|
*/
|
|
2208
|
-
|
|
2440
|
+
mfglibInternalSetChannel(channel: number): Promise<SLStatus>;
|
|
2209
2441
|
/**
|
|
2210
2442
|
* Returns the current radio channel, as previously set via mfglibSetChannel().
|
|
2211
2443
|
* @returns uint8_t The current channel.
|
|
2212
2444
|
*/
|
|
2213
|
-
|
|
2445
|
+
mfglibInternalGetChannel(): Promise<number>;
|
|
2214
2446
|
/**
|
|
2215
2447
|
* First select the transmit power mode, and then include a method for selecting
|
|
2216
2448
|
* the radio transmit power. The valid power settings depend upon the specific
|
|
@@ -2219,23 +2451,23 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2219
2451
|
* available to the caller via mfglibGetPower().
|
|
2220
2452
|
* @param txPowerMode uint16_t Power mode. Refer to txPowerModes in stack/include/ember-types.h for possible values.
|
|
2221
2453
|
* @param power int8_t Power in units of dBm. Refer to radio data sheet for valid range.
|
|
2222
|
-
* @returns An
|
|
2454
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2223
2455
|
*/
|
|
2224
|
-
|
|
2456
|
+
mfglibInternalSetPower(txPowerMode: EmberTXPowerMode, power: number): Promise<SLStatus>;
|
|
2225
2457
|
/**
|
|
2226
2458
|
* Returns the current radio power setting, as previously set via mfglibSetPower().
|
|
2227
2459
|
* @returns int8_t Power in units of dBm. Refer to radio data sheet for valid range.
|
|
2228
2460
|
*/
|
|
2229
|
-
|
|
2461
|
+
mfglibInternalGetPower(): Promise<number>;
|
|
2230
2462
|
/**
|
|
2231
2463
|
* Callback
|
|
2232
2464
|
* A callback indicating a packet with a valid CRC has been received.
|
|
2233
2465
|
* @param linkQuality uint8_t The link quality observed during the reception
|
|
2234
2466
|
* @param rssi int8_t The energy level (in units of dBm) observed during the reception.
|
|
2235
|
-
* @param packetLength uint8_t The length of the packetContents parameter in bytes. Will be greater than 3 and less than 123.
|
|
2236
2467
|
* @param packetContents uint8_t * The received packet (last 2 bytes are not FCS / CRC and may be discarded)
|
|
2468
|
+
* Length will be greater than 3 and less than 123.
|
|
2237
2469
|
*/
|
|
2238
|
-
ezspMfglibRxHandler(linkQuality: number, rssi: number,
|
|
2470
|
+
ezspMfglibRxHandler(linkQuality: number, rssi: number, packetContents: Buffer): void;
|
|
2239
2471
|
/**
|
|
2240
2472
|
* Quits the current application and launches the standalone bootloader (if
|
|
2241
2473
|
* installed) The function returns an error if the standalone bootloader is not
|
|
@@ -2245,9 +2477,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2245
2477
|
* channel with current power settings. STANDALONE_BOOTLOADER_RECOVERY_MODE: Will listen for an over-the-air image
|
|
2246
2478
|
* transfer on the default channel with default power settings. Both modes also allow an image transfer to begin
|
|
2247
2479
|
* with XMODEM over the serial protocol's Bootloader Frame.
|
|
2248
|
-
* @returns An
|
|
2480
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2249
2481
|
*/
|
|
2250
|
-
ezspLaunchStandaloneBootloader(mode: number): Promise<
|
|
2482
|
+
ezspLaunchStandaloneBootloader(mode: number): Promise<SLStatus>;
|
|
2251
2483
|
/**
|
|
2252
2484
|
* Transmits the given bootload message to a neighboring node using a specific
|
|
2253
2485
|
* 802.15.4 header that allows the EmberZNet stack as well as the bootloader to
|
|
@@ -2256,9 +2488,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2256
2488
|
* @param destEui64 The EUI64 of the target node. Ignored if the broadcast field is set to true.
|
|
2257
2489
|
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
2258
2490
|
* @param messageContents uint8_t * The multicast message.
|
|
2259
|
-
* @returns An
|
|
2491
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2260
2492
|
*/
|
|
2261
|
-
ezspSendBootloadMessage(broadcast: boolean, destEui64:
|
|
2493
|
+
ezspSendBootloadMessage(broadcast: boolean, destEui64: EUI64, messageContents: Buffer): Promise<SLStatus>;
|
|
2262
2494
|
/**
|
|
2263
2495
|
* Detects if the standalone bootloader is installed, and if so returns the
|
|
2264
2496
|
* installed version. If not return 0xffff. A returned version of 0x1234 would
|
|
@@ -2270,28 +2502,31 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2270
2502
|
* @returns uint8_t * The value of MICRO on the node
|
|
2271
2503
|
* @returns uint8_t * The value of PHY on the node
|
|
2272
2504
|
*/
|
|
2273
|
-
ezspGetStandaloneBootloaderVersionPlatMicroPhy(): Promise<[
|
|
2505
|
+
ezspGetStandaloneBootloaderVersionPlatMicroPhy(): Promise<[
|
|
2506
|
+
bootloaderVersion: number,
|
|
2507
|
+
nodePlat: number,
|
|
2508
|
+
nodeMicro: number,
|
|
2509
|
+
nodePhy: number
|
|
2510
|
+
]>;
|
|
2274
2511
|
/**
|
|
2275
2512
|
* Callback
|
|
2276
2513
|
* A callback invoked by the EmberZNet stack when a bootload message is
|
|
2277
2514
|
* received.
|
|
2278
2515
|
* @param longId The EUI64 of the sending node.
|
|
2279
|
-
* @param
|
|
2280
|
-
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during the reception.
|
|
2281
|
-
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
2516
|
+
* @param packetInfo Information about the incoming packet.
|
|
2282
2517
|
* @param messageContents uint8_t *The bootload message that was sent.
|
|
2283
2518
|
*/
|
|
2284
|
-
ezspIncomingBootloadMessageHandler(longId:
|
|
2519
|
+
ezspIncomingBootloadMessageHandler(longId: EUI64, packetInfo: EmberRxPacketInfo, messageContents: Buffer): void;
|
|
2285
2520
|
/**
|
|
2286
2521
|
* Callback
|
|
2287
2522
|
* A callback invoked by the EmberZNet stack when the MAC has finished
|
|
2288
2523
|
* transmitting a bootload message.
|
|
2289
|
-
* @param status An EmberStatus value of
|
|
2290
|
-
* or
|
|
2524
|
+
* @param status An EmberStatus value of SLStatus.OK if an ACK was received from the destination
|
|
2525
|
+
* or SLStatus.ZIGBEE_DELIVERY_FAILED if no ACK was received.
|
|
2291
2526
|
* @param messageLength uint8_t The length of the messageContents parameter in bytes.
|
|
2292
2527
|
* @param messageContents uint8_t * The message that was sent.
|
|
2293
2528
|
*/
|
|
2294
|
-
ezspBootloadTransmitCompleteHandler(status:
|
|
2529
|
+
ezspBootloadTransmitCompleteHandler(status: SLStatus, messageContents: Buffer): void;
|
|
2295
2530
|
/**
|
|
2296
2531
|
* Perform AES encryption on plaintext using key.
|
|
2297
2532
|
* @param uint8_t * 16 bytes of plaintext.
|
|
@@ -2299,71 +2534,131 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2299
2534
|
* @returns uint8_t * 16 bytes of ciphertext.
|
|
2300
2535
|
*/
|
|
2301
2536
|
ezspAesEncrypt(plaintext: number[], key: number[]): Promise<number[]>;
|
|
2537
|
+
/**
|
|
2538
|
+
* Callback
|
|
2539
|
+
* A callback to be implemented on the Golden Node to process acknowledgements.
|
|
2540
|
+
* If you supply a custom version of this handler, you must define SL_ZIGBEE_APPLICATION_HAS_INCOMING_MFG_TEST_MESSAGE_HANDLER
|
|
2541
|
+
* in your application's CONFIGURATION_HEADER
|
|
2542
|
+
* @param messageType uint8_t The type of the incoming message. Currently, the only possibility is MFG_TEST_TYPE_ACK.
|
|
2543
|
+
* @param data uint8_t * A pointer to the data received in the current message.
|
|
2544
|
+
*/
|
|
2545
|
+
ezspIncomingMfgTestMessageHandler(messageType: number, messageContents: Buffer): void;
|
|
2546
|
+
/**
|
|
2547
|
+
* A function used on the Golden Node to switch between normal network operation (for testing) and manufacturing configuration.
|
|
2548
|
+
* Like emberSleep(), it may not be possible to execute this command due to pending network activity.
|
|
2549
|
+
* For the transition from normal network operation to manufacturing configuration, it is customary to loop,
|
|
2550
|
+
* calling this function alternately with emberTick() until the mode change succeeds.
|
|
2551
|
+
* @param beginConfiguration Determines the new mode of operation.
|
|
2552
|
+
* true causes the node to enter manufacturing configuration.
|
|
2553
|
+
* false causes the node to return to normal network operation.
|
|
2554
|
+
* @returns An SLStatus value indicating success or failure of the command.
|
|
2555
|
+
*/
|
|
2556
|
+
ezspMfgTestSetPacketMode(beginConfiguration: boolean): Promise<SLStatus>;
|
|
2557
|
+
/**
|
|
2558
|
+
* A function used during manufacturing configuration on the Golden Node to send the DUT a reboot command.
|
|
2559
|
+
* The usual practice is to execute this command at the end of manufacturing configuration,
|
|
2560
|
+
* to place the DUT into normal network operation for testing.
|
|
2561
|
+
* This function executes only during manufacturing configuration mode and returns an error otherwise.
|
|
2562
|
+
* If successful, the DUT acknowledges the reboot command within 20 milliseconds and then reboots.
|
|
2563
|
+
* @returns An SLStatus value indicating success or failure of the command.
|
|
2564
|
+
*/
|
|
2565
|
+
ezspMfgTestSendRebootCommand(): Promise<SLStatus>;
|
|
2566
|
+
/**
|
|
2567
|
+
* A function used during manufacturing configuration on the Golden Node to set the DUT's 8-byte EUI ID.
|
|
2568
|
+
* This function executes only during manufacturing configuration mode and returns an error otherwise.
|
|
2569
|
+
* If successful, the DUT acknowledges the new EUI ID within 150 milliseconds.
|
|
2570
|
+
* @param newId The 8-byte EUID for the DUT.
|
|
2571
|
+
* @returns An SLStatus value indicating success or failure of the command.
|
|
2572
|
+
*/
|
|
2573
|
+
ezspMfgTestSendEui64(newId: EUI64): Promise<SLStatus>;
|
|
2574
|
+
/**
|
|
2575
|
+
* A function used during manufacturing configuration on the Golden Node to set the DUT's 16-byte configuration string.
|
|
2576
|
+
* This function executes only during manufacturing configuration mode and will return an error otherwise.
|
|
2577
|
+
* If successful, the DUT will acknowledge the new string within 150 milliseconds.
|
|
2578
|
+
* @param newString The 16-byte manufacturing string.
|
|
2579
|
+
* @returns An SLStatus value indicating success or failure of the command.
|
|
2580
|
+
*/
|
|
2581
|
+
ezspMfgTestSendManufacturingString(newString: number[]): Promise<SLStatus>;
|
|
2582
|
+
/**
|
|
2583
|
+
* A function used during manufacturing configuration on the Golden Node to set the DUT's radio parameters.
|
|
2584
|
+
* This function executes only during manufacturing configuration mode and returns an error otherwise.
|
|
2585
|
+
* If successful, the DUT acknowledges the new parameters within 25 milliseconds.
|
|
2586
|
+
* @param supportedBands Sets the radio band for the DUT. See ember-common.h for possible values.
|
|
2587
|
+
* @param crystalOffset Sets the CC1020 crystal offset. This parameter has no effect on the EM2420, and it may safely be set to 0 for this RFIC.
|
|
2588
|
+
* @returns An SLStatus value indicating success or failure of the command.
|
|
2589
|
+
*/
|
|
2590
|
+
ezspMfgTestSendRadioParameters(supportedBands: number, crystalOffset: number): Promise<SLStatus>;
|
|
2591
|
+
/**
|
|
2592
|
+
* A function used in each of the manufacturing configuration API calls.
|
|
2593
|
+
* Most implementations will not need to call this function directly. See mfg-test.c for more detail.
|
|
2594
|
+
* This function executes only during manufacturing configuration mode and returns an error otherwise.
|
|
2595
|
+
* @param command A pointer to the outgoing command string.
|
|
2596
|
+
* @returns An SLStatus value indicating success or failure of the command.
|
|
2597
|
+
*/
|
|
2598
|
+
ezspMfgTestSendCommand(command: number): Promise<SLStatus>;
|
|
2302
2599
|
/**
|
|
2303
2600
|
* A consolidation of ZLL network operations with similar signatures;
|
|
2304
2601
|
* specifically, forming and joining networks or touch-linking.
|
|
2305
2602
|
* @param networkInfo EmberZllNetwork * Information about the network.
|
|
2306
2603
|
* @param op Operation indicator.
|
|
2307
2604
|
* @param radioTxPower int8_t Radio transmission power.
|
|
2308
|
-
* @returns An
|
|
2605
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2309
2606
|
*/
|
|
2310
|
-
ezspZllNetworkOps(networkInfo: EmberZllNetwork, op: EzspZllNetworkOperation, radioTxPower: number): Promise<
|
|
2607
|
+
ezspZllNetworkOps(networkInfo: EmberZllNetwork, op: EzspZllNetworkOperation, radioTxPower: number): Promise<SLStatus>;
|
|
2311
2608
|
/**
|
|
2312
2609
|
* This call will cause the device to setup the security information used in its
|
|
2313
2610
|
* network. It must be called prior to forming, starting, or joining a network.
|
|
2314
2611
|
* @param networkKey EmberKeyData * ZLL Network key.
|
|
2315
2612
|
* @param securityState EmberZllInitialSecurityState * Initial security state of the network.
|
|
2316
|
-
* @returns An
|
|
2613
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2317
2614
|
*/
|
|
2318
|
-
ezspZllSetInitialSecurityState(networkKey: EmberKeyData, securityState: EmberZllInitialSecurityState): Promise<
|
|
2615
|
+
ezspZllSetInitialSecurityState(networkKey: EmberKeyData, securityState: EmberZllInitialSecurityState): Promise<SLStatus>;
|
|
2319
2616
|
/**
|
|
2320
2617
|
* This call will update ZLL security token information. Unlike
|
|
2321
2618
|
* emberZllSetInitialSecurityState, this can be called while a network is
|
|
2322
2619
|
* already established.
|
|
2323
2620
|
* @param securityState EmberZllInitialSecurityState * Security state of the network.
|
|
2324
|
-
* @returns An
|
|
2621
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2325
2622
|
*/
|
|
2326
|
-
ezspZllSetSecurityStateWithoutKey(securityState: EmberZllInitialSecurityState): Promise<
|
|
2623
|
+
ezspZllSetSecurityStateWithoutKey(securityState: EmberZllInitialSecurityState): Promise<SLStatus>;
|
|
2327
2624
|
/**
|
|
2328
2625
|
* This call will initiate a ZLL network scan on all the specified channels.
|
|
2329
2626
|
* @param channelMask uint32_t The range of channels to scan.
|
|
2330
2627
|
* @param radioPowerForScan int8_t The radio output power used for the scan requests.
|
|
2331
2628
|
* @param nodeType The node type of the local device.
|
|
2332
|
-
* @returns An
|
|
2629
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2333
2630
|
*/
|
|
2334
|
-
ezspZllStartScan(channelMask: number, radioPowerForScan: number, nodeType: EmberNodeType): Promise<
|
|
2631
|
+
ezspZllStartScan(channelMask: number, radioPowerForScan: number, nodeType: EmberNodeType): Promise<SLStatus>;
|
|
2335
2632
|
/**
|
|
2336
2633
|
* This call will change the mode of the radio so that the receiver is on for a
|
|
2337
2634
|
* specified amount of time when the device is idle.
|
|
2338
2635
|
* @param durationMs uint32_t The duration in milliseconds to leave the radio on.
|
|
2339
|
-
* @returns An
|
|
2636
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2340
2637
|
*/
|
|
2341
|
-
ezspZllSetRxOnWhenIdle(durationMs: number): Promise<
|
|
2638
|
+
ezspZllSetRxOnWhenIdle(durationMs: number): Promise<SLStatus>;
|
|
2342
2639
|
/**
|
|
2343
2640
|
* Callback
|
|
2344
2641
|
* This call is fired when a ZLL network scan finds a ZLL network.
|
|
2345
2642
|
* @param networkInfo EmberZllNetwork * Information about the network.
|
|
2346
2643
|
* @param isDeviceInfoNull Used to interpret deviceInfo field.
|
|
2347
2644
|
* @param deviceInfo EmberZllDeviceInfoRecord * Device specific information.
|
|
2348
|
-
* @param
|
|
2349
|
-
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during reception.
|
|
2645
|
+
* @param packetInfo Information about the incoming packet received from this network.
|
|
2350
2646
|
*/
|
|
2351
|
-
ezspZllNetworkFoundHandler(networkInfo: EmberZllNetwork, isDeviceInfoNull: boolean, deviceInfo: EmberZllDeviceInfoRecord,
|
|
2647
|
+
ezspZllNetworkFoundHandler(networkInfo: EmberZllNetwork, isDeviceInfoNull: boolean, deviceInfo: EmberZllDeviceInfoRecord, packetInfo: EmberRxPacketInfo): void;
|
|
2352
2648
|
/**
|
|
2353
2649
|
* Callback
|
|
2354
2650
|
* This call is fired when a ZLL network scan is complete.
|
|
2355
2651
|
* @param status Status of the operation.
|
|
2356
2652
|
*/
|
|
2357
|
-
ezspZllScanCompleteHandler(status:
|
|
2653
|
+
ezspZllScanCompleteHandler(status: SLStatus): void;
|
|
2358
2654
|
/**
|
|
2359
2655
|
* Callback
|
|
2360
2656
|
* This call is fired when network and group addresses are assigned to a remote
|
|
2361
2657
|
* mode in a network start or network join request.
|
|
2362
2658
|
* @param addressInfo EmberZllAddressAssignment * Address assignment information.
|
|
2363
|
-
* @param
|
|
2364
|
-
* @param lastHopRssi int8_t The energy level (in units of dBm) observed during reception.
|
|
2659
|
+
* @param packetInfo Information about the incoming packet received from this network.
|
|
2365
2660
|
*/
|
|
2366
|
-
ezspZllAddressAssignmentHandler(addressInfo: EmberZllAddressAssignment,
|
|
2661
|
+
ezspZllAddressAssignmentHandler(addressInfo: EmberZllAddressAssignment, packetInfo: EmberRxPacketInfo): void;
|
|
2367
2662
|
/**
|
|
2368
2663
|
* Callback
|
|
2369
2664
|
* This call is fired when the device is a target of a touch link.
|
|
@@ -2448,40 +2743,6 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2448
2743
|
* Clear ZLL stack tokens.
|
|
2449
2744
|
*/
|
|
2450
2745
|
ezspZllClearTokens(): Promise<void>;
|
|
2451
|
-
/**
|
|
2452
|
-
* Sets whether to use parent classification when processing beacons during a
|
|
2453
|
-
* join or rejoin. Parent classification considers whether a received beacon
|
|
2454
|
-
* indicates trust center connectivity and long uptime on the network
|
|
2455
|
-
* @param enabled Enable or disable parent classification
|
|
2456
|
-
*/
|
|
2457
|
-
ezspSetParentClassificationEnabled(enabled: boolean): Promise<void>;
|
|
2458
|
-
/**
|
|
2459
|
-
* Gets whether to use parent classification when processing beacons during a
|
|
2460
|
-
* join or rejoin. Parent classification considers whether a received beacon
|
|
2461
|
-
* indicates trust center connectivity and long uptime on the network
|
|
2462
|
-
* @returns Enable or disable parent classification
|
|
2463
|
-
*/
|
|
2464
|
-
ezspGetParentClassificationEnabled(): Promise<boolean>;
|
|
2465
|
-
/**
|
|
2466
|
-
* sets the device uptime to be long or short
|
|
2467
|
-
* @param hasLongUpTime if the uptime is long or not
|
|
2468
|
-
*/
|
|
2469
|
-
ezspSetLongUpTime(hasLongUpTime: boolean): Promise<void>;
|
|
2470
|
-
/**
|
|
2471
|
-
* sets the hub connectivity to be true or false
|
|
2472
|
-
* @param connected if the hub is connected or not
|
|
2473
|
-
*/
|
|
2474
|
-
ezspSetHubConnectivity(connected: boolean): Promise<void>;
|
|
2475
|
-
/**
|
|
2476
|
-
* checks if the device uptime is long or short
|
|
2477
|
-
* @returns if the uptime is long or not
|
|
2478
|
-
*/
|
|
2479
|
-
ezspIsUpTimeLong(): Promise<boolean>;
|
|
2480
|
-
/**
|
|
2481
|
-
* checks if the hub is connected or not
|
|
2482
|
-
* @returns if the hub is connected or not
|
|
2483
|
-
*/
|
|
2484
|
-
ezspIsHubConnected(): Promise<boolean>;
|
|
2485
2746
|
/**
|
|
2486
2747
|
* Update the GP Proxy table based on a GP pairing.
|
|
2487
2748
|
* @param options uint32_t The options field of the GP Pairing command.
|
|
@@ -2496,7 +2757,7 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2496
2757
|
* @param forwardingRadius uint8_t The forwarding radius.
|
|
2497
2758
|
* @returns Whether a GP Pairing has been created or not.
|
|
2498
2759
|
*/
|
|
2499
|
-
ezspGpProxyTableProcessGpPairing(options: number, addr: EmberGpAddress, commMode: number, sinkNetworkAddress: number, sinkGroupId: number, assignedAlias: number, sinkIeeeAddress:
|
|
2760
|
+
ezspGpProxyTableProcessGpPairing(options: number, addr: EmberGpAddress, commMode: number, sinkNetworkAddress: number, sinkGroupId: number, assignedAlias: number, sinkIeeeAddress: EUI64, gpdKey: EmberKeyData, gpdSecurityFrameCounter: number, forwardingRadius: number): Promise<boolean>;
|
|
2500
2761
|
/**
|
|
2501
2762
|
* Adds/removes an entry from the GP Tx Queue.
|
|
2502
2763
|
* @param action The action to perform on the GP TX queue (true to add, false to remove).
|
|
@@ -2506,17 +2767,17 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2506
2767
|
* @param gpdAsdu uint8_t * The GP command payload.
|
|
2507
2768
|
* @param gpepHandle uint8_t The handle to refer to the GPDF.
|
|
2508
2769
|
* @param gpTxQueueEntryLifetimeMs uint16_t How long to keep the GPDF in the TX Queue.
|
|
2509
|
-
* @returns An
|
|
2770
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2510
2771
|
*/
|
|
2511
|
-
ezspDGpSend(action: boolean, useCca: boolean, addr: EmberGpAddress, gpdCommandId: number, gpdAsdu: Buffer, gpepHandle: number, gpTxQueueEntryLifetimeMs: number): Promise<
|
|
2772
|
+
ezspDGpSend(action: boolean, useCca: boolean, addr: EmberGpAddress, gpdCommandId: number, gpdAsdu: Buffer, gpepHandle: number, gpTxQueueEntryLifetimeMs: number): Promise<SLStatus>;
|
|
2512
2773
|
/**
|
|
2513
2774
|
* Callback
|
|
2514
2775
|
* A callback to the GP endpoint to indicate the result of the GPDF
|
|
2515
2776
|
* transmission.
|
|
2516
|
-
* @param status An
|
|
2777
|
+
* @param status An SLStatus value indicating success or the reason for failure.
|
|
2517
2778
|
* @param gpepHandle uint8_t The handle of the GPDF.
|
|
2518
2779
|
*/
|
|
2519
|
-
ezspDGpSentHandler(status:
|
|
2780
|
+
ezspDGpSentHandler(status: SLStatus, gpepHandle: number): void;
|
|
2520
2781
|
/**
|
|
2521
2782
|
* Callback
|
|
2522
2783
|
* A callback invoked by the ZigBee GP stack when a GPDF is received.
|
|
@@ -2535,14 +2796,14 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2535
2796
|
* @param proxyTableIndex uint8_tThe proxy table index of the corresponding proxy table entry to the incoming GPDF.
|
|
2536
2797
|
* @param gpdCommandPayload uint8_t * The GPD command payload.
|
|
2537
2798
|
*/
|
|
2538
|
-
ezspGpepIncomingMessageHandler(status:
|
|
2799
|
+
ezspGpepIncomingMessageHandler(status: EmberGPStatus, gpdLink: number, sequenceNumber: number, addr: EmberGpAddress, gpdfSecurityLevel: EmberGpSecurityLevel, gpdfSecurityKeyType: EmberGpKeyType, autoCommissioning: boolean, bidirectionalInfo: number, gpdSecurityFrameCounter: number, gpdCommandId: number, mic: number, proxyTableIndex: number, gpdCommandPayload: Buffer): void;
|
|
2539
2800
|
/**
|
|
2540
2801
|
* Retrieves the proxy table entry stored at the passed index.
|
|
2541
2802
|
* @param proxyIndex uint8_t The index of the requested proxy table entry.
|
|
2542
|
-
* @returns An
|
|
2803
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2543
2804
|
* @returns EmberGpProxyTableEntry * An EmberGpProxyTableEntry struct containing a copy of the requested proxy entry.
|
|
2544
2805
|
*/
|
|
2545
|
-
ezspGpProxyTableGetEntry(proxyIndex: number): Promise<[
|
|
2806
|
+
ezspGpProxyTableGetEntry(proxyIndex: number): Promise<[SLStatus, entry: EmberGpProxyTableEntry]>;
|
|
2546
2807
|
/**
|
|
2547
2808
|
* Finds the index of the passed address in the gp table.
|
|
2548
2809
|
* @param addr EmberGpAddress * The address to search for
|
|
@@ -2552,10 +2813,10 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2552
2813
|
/**
|
|
2553
2814
|
* Retrieves the sink table entry stored at the passed index.
|
|
2554
2815
|
* @param sinkIndex uint8_t The index of the requested sink table entry.
|
|
2555
|
-
* @returns An
|
|
2816
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2556
2817
|
* @returns EmberGpSinkTableEntry * An EmberGpSinkTableEntry struct containing a copy of the requested sink entry.
|
|
2557
2818
|
*/
|
|
2558
|
-
ezspGpSinkTableGetEntry(sinkIndex: number): Promise<[
|
|
2819
|
+
ezspGpSinkTableGetEntry(sinkIndex: number): Promise<[SLStatus, entry: EmberGpSinkTableEntry]>;
|
|
2559
2820
|
/**
|
|
2560
2821
|
* Finds the index of the passed address in the gp table.
|
|
2561
2822
|
* @param addr EmberGpAddress *The address to search for.
|
|
@@ -2566,9 +2827,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2566
2827
|
* Retrieves the sink table entry stored at the passed index.
|
|
2567
2828
|
* @param sinkIndex uint8_t The index of the requested sink table entry.
|
|
2568
2829
|
* @param entry EmberGpSinkTableEntry * An EmberGpSinkTableEntry struct containing a copy of the sink entry to be updated.
|
|
2569
|
-
* @returns An
|
|
2830
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2570
2831
|
*/
|
|
2571
|
-
ezspGpSinkTableSetEntry(sinkIndex: number, entry: EmberGpSinkTableEntry): Promise<
|
|
2832
|
+
ezspGpSinkTableSetEntry(sinkIndex: number, entry: EmberGpSinkTableEntry): Promise<SLStatus>;
|
|
2572
2833
|
/**
|
|
2573
2834
|
* Removes the sink table entry stored at the passed index.
|
|
2574
2835
|
* @param uint8_t The index of the requested sink table entry.
|
|
@@ -2600,9 +2861,9 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2600
2861
|
* @param uint16_t gpm address for security.
|
|
2601
2862
|
* @param uint16_t gpm address for pairing.
|
|
2602
2863
|
* @param uint8_t sink endpoint.
|
|
2603
|
-
* @returns An
|
|
2864
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2604
2865
|
*/
|
|
2605
|
-
ezspGpSinkCommission(options: number, gpmAddrForSecurity: number, gpmAddrForPairing: number, sinkEndpoint: number): Promise<
|
|
2866
|
+
ezspGpSinkCommission(options: number, gpmAddrForSecurity: number, gpmAddrForPairing: number, sinkEndpoint: number): Promise<SLStatus>;
|
|
2606
2867
|
/**
|
|
2607
2868
|
* Clears all entries within the translation table.
|
|
2608
2869
|
*/
|
|
@@ -2620,35 +2881,35 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2620
2881
|
/**
|
|
2621
2882
|
* Gets the token information for a single token at provided index
|
|
2622
2883
|
* @param index uint8_t Index of the token in the token table for which information is needed.
|
|
2623
|
-
* @returns An
|
|
2884
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2624
2885
|
* @returns EmberTokenInfo * Token information.
|
|
2625
2886
|
*/
|
|
2626
|
-
ezspGetTokenInfo(index: number): Promise<[
|
|
2887
|
+
ezspGetTokenInfo(index: number): Promise<[SLStatus, tokenInfo: EmberTokenInfo]>;
|
|
2627
2888
|
/**
|
|
2628
2889
|
* Gets the token data for a single token with provided key
|
|
2629
2890
|
* @param token uint32_t Key of the token in the token table for which data is needed.
|
|
2630
2891
|
* @param index uint32_t Index in case of the indexed token.
|
|
2631
|
-
* @returns An
|
|
2892
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2632
2893
|
* @returns EmberTokenData * Token Data
|
|
2633
2894
|
*/
|
|
2634
|
-
ezspGetTokenData(token: number, index: number): Promise<[
|
|
2895
|
+
ezspGetTokenData(token: number, index: number): Promise<[SLStatus, tokenData: EmberTokenData]>;
|
|
2635
2896
|
/**
|
|
2636
2897
|
* Sets the token data for a single token with provided key
|
|
2637
2898
|
* @param token uint32_t Key of the token in the token table for which data is to be set.
|
|
2638
2899
|
* @param index uint32_t Index in case of the indexed token.
|
|
2639
2900
|
* @param EmberTokenData * Token Data
|
|
2640
|
-
* @returns An
|
|
2901
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2641
2902
|
*/
|
|
2642
|
-
ezspSetTokenData(token: number, index: number, tokenData: EmberTokenData): Promise<
|
|
2903
|
+
ezspSetTokenData(token: number, index: number, tokenData: EmberTokenData): Promise<SLStatus>;
|
|
2643
2904
|
/**
|
|
2644
2905
|
* Reset the node by calling halReboot.
|
|
2645
2906
|
*/
|
|
2646
2907
|
ezspResetNode(): Promise<void>;
|
|
2647
2908
|
/**
|
|
2648
2909
|
* Run GP security test vectors.
|
|
2649
|
-
* @returns An
|
|
2910
|
+
* @returns An SLStatus value indicating success or the reason for failure.
|
|
2650
2911
|
*/
|
|
2651
|
-
ezspGpSecurityTestVectors(): Promise<
|
|
2912
|
+
ezspGpSecurityTestVectors(): Promise<SLStatus>;
|
|
2652
2913
|
/**
|
|
2653
2914
|
* Factory reset all configured zigbee tokens
|
|
2654
2915
|
* @param excludeOutgoingFC Exclude network and APS outgoing frame counter tokens.
|
|
@@ -2656,4 +2917,5 @@ export declare class Ezsp extends EventEmitter {
|
|
|
2656
2917
|
*/
|
|
2657
2918
|
ezspTokenFactoryReset(excludeOutgoingFC: boolean, excludeBootCounter: boolean): Promise<void>;
|
|
2658
2919
|
}
|
|
2920
|
+
export {};
|
|
2659
2921
|
//# sourceMappingURL=ezsp.d.ts.map
|