zigbee-herdsman 0.28.0 → 0.29.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.
Files changed (304) hide show
  1. package/.babelrc.js +0 -4
  2. package/.release-please-manifest.json +1 -1
  3. package/CHANGELOG.md +16 -0
  4. package/dist/adapter/adapter.js +21 -45
  5. package/dist/adapter/adapter.js.map +1 -1
  6. package/dist/adapter/deconz/adapter/deconzAdapter.js +76 -98
  7. package/dist/adapter/deconz/adapter/deconzAdapter.js.map +1 -1
  8. package/dist/adapter/deconz/adapter/index.js +2 -8
  9. package/dist/adapter/deconz/adapter/index.js.map +1 -1
  10. package/dist/adapter/deconz/driver/constants.js +1 -3
  11. package/dist/adapter/deconz/driver/constants.js.map +1 -1
  12. package/dist/adapter/deconz/driver/driver.js +77 -72
  13. package/dist/adapter/deconz/driver/driver.js.map +1 -1
  14. package/dist/adapter/deconz/driver/frame.js +1 -3
  15. package/dist/adapter/deconz/driver/frame.js.map +1 -1
  16. package/dist/adapter/deconz/driver/frameParser.js +36 -41
  17. package/dist/adapter/deconz/driver/frameParser.js.map +1 -1
  18. package/dist/adapter/deconz/driver/parser.js +8 -34
  19. package/dist/adapter/deconz/driver/parser.js.map +1 -1
  20. package/dist/adapter/deconz/driver/writer.js +6 -34
  21. package/dist/adapter/deconz/driver/writer.js.map +1 -1
  22. package/dist/adapter/events.js +2 -4
  23. package/dist/adapter/events.js.map +1 -1
  24. package/dist/adapter/ezsp/adapter/backup.js +10 -15
  25. package/dist/adapter/ezsp/adapter/backup.js.map +1 -1
  26. package/dist/adapter/ezsp/adapter/ezspAdapter.js +59 -81
  27. package/dist/adapter/ezsp/adapter/ezspAdapter.js.map +1 -1
  28. package/dist/adapter/ezsp/adapter/index.js +2 -8
  29. package/dist/adapter/ezsp/adapter/index.js.map +1 -1
  30. package/dist/adapter/ezsp/driver/commands.js +629 -628
  31. package/dist/adapter/ezsp/driver/commands.js.map +1 -1
  32. package/dist/adapter/ezsp/driver/consts.js +10 -13
  33. package/dist/adapter/ezsp/driver/consts.js.map +1 -1
  34. package/dist/adapter/ezsp/driver/driver.js +100 -96
  35. package/dist/adapter/ezsp/driver/driver.js.map +1 -1
  36. package/dist/adapter/ezsp/driver/ezsp.js +85 -104
  37. package/dist/adapter/ezsp/driver/ezsp.js.map +1 -1
  38. package/dist/adapter/ezsp/driver/index.js +3 -7
  39. package/dist/adapter/ezsp/driver/index.js.map +1 -1
  40. package/dist/adapter/ezsp/driver/multicast.js +17 -19
  41. package/dist/adapter/ezsp/driver/multicast.js.map +1 -1
  42. package/dist/adapter/ezsp/driver/parser.js +6 -35
  43. package/dist/adapter/ezsp/driver/parser.js.map +1 -1
  44. package/dist/adapter/ezsp/driver/types/basic.js +35 -57
  45. package/dist/adapter/ezsp/driver/types/basic.js.map +1 -1
  46. package/dist/adapter/ezsp/driver/types/index.js +12 -119
  47. package/dist/adapter/ezsp/driver/types/index.js.map +1 -1
  48. package/dist/adapter/ezsp/driver/types/named.js +1548 -1627
  49. package/dist/adapter/ezsp/driver/types/named.js.map +1 -1
  50. package/dist/adapter/ezsp/driver/types/struct.js +649 -668
  51. package/dist/adapter/ezsp/driver/types/struct.js.map +1 -1
  52. package/dist/adapter/ezsp/driver/uart.js +35 -57
  53. package/dist/adapter/ezsp/driver/uart.js.map +1 -1
  54. package/dist/adapter/ezsp/driver/utils/crc16ccitt.js +1 -3
  55. package/dist/adapter/ezsp/driver/utils/crc16ccitt.js.map +1 -1
  56. package/dist/adapter/ezsp/driver/utils/index.js +23 -27
  57. package/dist/adapter/ezsp/driver/utils/index.js.map +1 -1
  58. package/dist/adapter/ezsp/driver/writer.js +7 -37
  59. package/dist/adapter/ezsp/driver/writer.js.map +1 -1
  60. package/dist/adapter/index.js +4 -35
  61. package/dist/adapter/index.js.map +1 -1
  62. package/dist/adapter/serialPort.js +6 -10
  63. package/dist/adapter/serialPort.js.map +1 -1
  64. package/dist/adapter/serialPortUtils.js +7 -9
  65. package/dist/adapter/serialPortUtils.js.map +1 -1
  66. package/dist/adapter/socketPortUtils.js +1 -3
  67. package/dist/adapter/socketPortUtils.js.map +1 -1
  68. package/dist/adapter/tstype.js +1 -2
  69. package/dist/adapter/z-stack/adapter/adapter-backup.js +79 -108
  70. package/dist/adapter/z-stack/adapter/adapter-backup.js.map +1 -1
  71. package/dist/adapter/z-stack/adapter/adapter-nv-memory.js +23 -27
  72. package/dist/adapter/z-stack/adapter/adapter-nv-memory.js.map +1 -1
  73. package/dist/adapter/z-stack/adapter/endpoints.js +3 -29
  74. package/dist/adapter/z-stack/adapter/endpoints.js.map +1 -1
  75. package/dist/adapter/z-stack/adapter/index.js +2 -8
  76. package/dist/adapter/z-stack/adapter/index.js.map +1 -1
  77. package/dist/adapter/z-stack/adapter/manager.js +77 -102
  78. package/dist/adapter/z-stack/adapter/manager.js.map +1 -1
  79. package/dist/adapter/z-stack/adapter/tstype.js +2 -4
  80. package/dist/adapter/z-stack/adapter/tstype.js.map +1 -1
  81. package/dist/adapter/z-stack/adapter/zStackAdapter.js +62 -79
  82. package/dist/adapter/z-stack/adapter/zStackAdapter.js.map +1 -1
  83. package/dist/adapter/z-stack/constants/af.js +1 -3
  84. package/dist/adapter/z-stack/constants/af.js.map +1 -1
  85. package/dist/adapter/z-stack/constants/common.js +16 -19
  86. package/dist/adapter/z-stack/constants/common.js.map +1 -1
  87. package/dist/adapter/z-stack/constants/dbg.js +1 -3
  88. package/dist/adapter/z-stack/constants/dbg.js.map +1 -1
  89. package/dist/adapter/z-stack/constants/index.js +10 -47
  90. package/dist/adapter/z-stack/constants/index.js.map +1 -1
  91. package/dist/adapter/z-stack/constants/mac.js +1 -3
  92. package/dist/adapter/z-stack/constants/mac.js.map +1 -1
  93. package/dist/adapter/z-stack/constants/sapi.js +1 -3
  94. package/dist/adapter/z-stack/constants/sapi.js.map +1 -1
  95. package/dist/adapter/z-stack/constants/sys.js +1 -3
  96. package/dist/adapter/z-stack/constants/sys.js.map +1 -1
  97. package/dist/adapter/z-stack/constants/util.js +1 -3
  98. package/dist/adapter/z-stack/constants/util.js.map +1 -1
  99. package/dist/adapter/z-stack/constants/utils.js +3 -7
  100. package/dist/adapter/z-stack/constants/utils.js.map +1 -1
  101. package/dist/adapter/z-stack/constants/zdo.js +1 -3
  102. package/dist/adapter/z-stack/constants/zdo.js.map +1 -1
  103. package/dist/adapter/z-stack/models/index.js +1 -17
  104. package/dist/adapter/z-stack/models/index.js.map +1 -1
  105. package/dist/adapter/z-stack/models/startup-options.js +1 -2
  106. package/dist/adapter/z-stack/structs/entries/address-manager-entry.js +5 -9
  107. package/dist/adapter/z-stack/structs/entries/address-manager-entry.js.map +1 -1
  108. package/dist/adapter/z-stack/structs/entries/address-manager-table.js +5 -9
  109. package/dist/adapter/z-stack/structs/entries/address-manager-table.js.map +1 -1
  110. package/dist/adapter/z-stack/structs/entries/aps-link-key-data-entry.js +3 -7
  111. package/dist/adapter/z-stack/structs/entries/aps-link-key-data-entry.js.map +1 -1
  112. package/dist/adapter/z-stack/structs/entries/aps-link-key-data-table.js +5 -9
  113. package/dist/adapter/z-stack/structs/entries/aps-link-key-data-table.js.map +1 -1
  114. package/dist/adapter/z-stack/structs/entries/aps-tc-link-key-entry.js +3 -7
  115. package/dist/adapter/z-stack/structs/entries/aps-tc-link-key-entry.js.map +1 -1
  116. package/dist/adapter/z-stack/structs/entries/aps-tc-link-key-table.js +5 -9
  117. package/dist/adapter/z-stack/structs/entries/aps-tc-link-key-table.js.map +1 -1
  118. package/dist/adapter/z-stack/structs/entries/channel-list.js +2 -6
  119. package/dist/adapter/z-stack/structs/entries/channel-list.js.map +1 -1
  120. package/dist/adapter/z-stack/structs/entries/has-configured.js +2 -6
  121. package/dist/adapter/z-stack/structs/entries/has-configured.js.map +1 -1
  122. package/dist/adapter/z-stack/structs/entries/index.js +16 -32
  123. package/dist/adapter/z-stack/structs/entries/index.js.map +1 -1
  124. package/dist/adapter/z-stack/structs/entries/nib.js +6 -10
  125. package/dist/adapter/z-stack/structs/entries/nib.js.map +1 -1
  126. package/dist/adapter/z-stack/structs/entries/nwk-key-descriptor.js +2 -6
  127. package/dist/adapter/z-stack/structs/entries/nwk-key-descriptor.js.map +1 -1
  128. package/dist/adapter/z-stack/structs/entries/nwk-key.js +2 -6
  129. package/dist/adapter/z-stack/structs/entries/nwk-key.js.map +1 -1
  130. package/dist/adapter/z-stack/structs/entries/nwk-pan-id.js +2 -6
  131. package/dist/adapter/z-stack/structs/entries/nwk-pan-id.js.map +1 -1
  132. package/dist/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-entry.js +2 -6
  133. package/dist/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-entry.js.map +1 -1
  134. package/dist/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-table.js +5 -9
  135. package/dist/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-table.js.map +1 -1
  136. package/dist/adapter/z-stack/structs/entries/security-manager-entry.js +5 -9
  137. package/dist/adapter/z-stack/structs/entries/security-manager-entry.js.map +1 -1
  138. package/dist/adapter/z-stack/structs/entries/security-manager-table.js +6 -10
  139. package/dist/adapter/z-stack/structs/entries/security-manager-table.js.map +1 -1
  140. package/dist/adapter/z-stack/structs/index.js +4 -20
  141. package/dist/adapter/z-stack/structs/index.js.map +1 -1
  142. package/dist/adapter/z-stack/structs/serializable-memory-object.js +1 -2
  143. package/dist/adapter/z-stack/structs/struct.js +8 -11
  144. package/dist/adapter/z-stack/structs/struct.js.map +1 -1
  145. package/dist/adapter/z-stack/structs/table.js +7 -9
  146. package/dist/adapter/z-stack/structs/table.js.map +1 -1
  147. package/dist/adapter/z-stack/unpi/constants.js +3 -12
  148. package/dist/adapter/z-stack/unpi/constants.js.map +1 -1
  149. package/dist/adapter/z-stack/unpi/frame.js +13 -9
  150. package/dist/adapter/z-stack/unpi/frame.js.map +1 -1
  151. package/dist/adapter/z-stack/unpi/index.js +5 -37
  152. package/dist/adapter/z-stack/unpi/index.js.map +1 -1
  153. package/dist/adapter/z-stack/unpi/parser.js +13 -40
  154. package/dist/adapter/z-stack/unpi/parser.js.map +1 -1
  155. package/dist/adapter/z-stack/unpi/writer.js +4 -32
  156. package/dist/adapter/z-stack/unpi/writer.js.map +1 -1
  157. package/dist/adapter/z-stack/utils/channel-list.js +5 -11
  158. package/dist/adapter/z-stack/utils/channel-list.js.map +1 -1
  159. package/dist/adapter/z-stack/utils/index.js +2 -18
  160. package/dist/adapter/z-stack/utils/index.js.map +1 -1
  161. package/dist/adapter/z-stack/utils/network-options.js +3 -7
  162. package/dist/adapter/z-stack/utils/network-options.js.map +1 -1
  163. package/dist/adapter/z-stack/znp/buffaloZnp.js +3 -5
  164. package/dist/adapter/z-stack/znp/buffaloZnp.js.map +1 -1
  165. package/dist/adapter/z-stack/znp/definition.js +1280 -1285
  166. package/dist/adapter/z-stack/znp/definition.js.map +1 -1
  167. package/dist/adapter/z-stack/znp/index.js +3 -10
  168. package/dist/adapter/z-stack/znp/index.js.map +1 -1
  169. package/dist/adapter/z-stack/znp/parameterType.js +1 -3
  170. package/dist/adapter/z-stack/znp/parameterType.js.map +1 -1
  171. package/dist/adapter/z-stack/znp/tstype.js +1 -2
  172. package/dist/adapter/z-stack/znp/znp.js +64 -81
  173. package/dist/adapter/z-stack/znp/znp.js.map +1 -1
  174. package/dist/adapter/z-stack/znp/zpiObject.js +30 -29
  175. package/dist/adapter/z-stack/znp/zpiObject.js.map +1 -1
  176. package/dist/adapter/zigate/adapter/index.js +2 -8
  177. package/dist/adapter/zigate/adapter/index.js.map +1 -1
  178. package/dist/adapter/zigate/adapter/zigateAdapter.js +64 -87
  179. package/dist/adapter/zigate/adapter/zigateAdapter.js.map +1 -1
  180. package/dist/adapter/zigate/debug.js +3 -9
  181. package/dist/adapter/zigate/debug.js.map +1 -1
  182. package/dist/adapter/zigate/driver/buffaloZiGate.js +7 -9
  183. package/dist/adapter/zigate/driver/buffaloZiGate.js.map +1 -1
  184. package/dist/adapter/zigate/driver/commandType.js +45 -50
  185. package/dist/adapter/zigate/driver/commandType.js.map +1 -1
  186. package/dist/adapter/zigate/driver/constants.js +31 -34
  187. package/dist/adapter/zigate/driver/constants.js.map +1 -1
  188. package/dist/adapter/zigate/driver/frame.js +11 -14
  189. package/dist/adapter/zigate/driver/frame.js.map +1 -1
  190. package/dist/adapter/zigate/driver/messageType.js +27 -30
  191. package/dist/adapter/zigate/driver/messageType.js.map +1 -1
  192. package/dist/adapter/zigate/driver/parameterType.js +1 -3
  193. package/dist/adapter/zigate/driver/parameterType.js.map +1 -1
  194. package/dist/adapter/zigate/driver/ziGateObject.js +17 -18
  195. package/dist/adapter/zigate/driver/ziGateObject.js.map +1 -1
  196. package/dist/adapter/zigate/driver/zigate.js +55 -47
  197. package/dist/adapter/zigate/driver/zigate.js.map +1 -1
  198. package/dist/buffalo/buffalo.js +5 -5
  199. package/dist/buffalo/buffalo.js.map +1 -1
  200. package/dist/buffalo/index.js +3 -33
  201. package/dist/buffalo/index.js.map +1 -1
  202. package/dist/buffalo/tstype.js +1 -2
  203. package/dist/controller/controller.js +99 -110
  204. package/dist/controller/controller.js.map +1 -1
  205. package/dist/controller/database.js +13 -16
  206. package/dist/controller/database.js.map +1 -1
  207. package/dist/controller/events.js +2 -5
  208. package/dist/controller/events.js.map +1 -1
  209. package/dist/controller/greenPower.js +17 -44
  210. package/dist/controller/greenPower.js.map +1 -1
  211. package/dist/controller/helpers/index.js +2 -28
  212. package/dist/controller/helpers/index.js.map +1 -1
  213. package/dist/controller/helpers/request.js +38 -32
  214. package/dist/controller/helpers/request.js.map +1 -1
  215. package/dist/controller/helpers/requestQueue.js +8 -11
  216. package/dist/controller/helpers/requestQueue.js.map +1 -1
  217. package/dist/controller/helpers/zclFrameConverter.js +5 -13
  218. package/dist/controller/helpers/zclFrameConverter.js.map +1 -1
  219. package/dist/controller/helpers/zclTransactionSequenceNumber.js +2 -4
  220. package/dist/controller/helpers/zclTransactionSequenceNumber.js.map +1 -1
  221. package/dist/controller/index.js +5 -8
  222. package/dist/controller/index.js.map +1 -1
  223. package/dist/controller/logger-stub.js +1 -2
  224. package/dist/controller/model/device.js +86 -90
  225. package/dist/controller/model/device.js.map +1 -1
  226. package/dist/controller/model/endpoint.d.ts.map +1 -1
  227. package/dist/controller/model/endpoint.js +60 -79
  228. package/dist/controller/model/endpoint.js.map +1 -1
  229. package/dist/controller/model/entity.js +5 -10
  230. package/dist/controller/model/entity.js.map +1 -1
  231. package/dist/controller/model/group.js +32 -57
  232. package/dist/controller/model/group.js.map +1 -1
  233. package/dist/controller/model/index.js +5 -14
  234. package/dist/controller/model/index.js.map +1 -1
  235. package/dist/controller/touchlink.js +11 -37
  236. package/dist/controller/touchlink.js.map +1 -1
  237. package/dist/controller/tstype.js +2 -4
  238. package/dist/controller/tstype.js.map +1 -1
  239. package/dist/index.js +3 -33
  240. package/dist/index.js.map +1 -1
  241. package/dist/models/backup-storage-legacy.js +1 -2
  242. package/dist/models/backup-storage-unified.js +1 -2
  243. package/dist/models/backup.js +1 -2
  244. package/dist/models/index.js +4 -20
  245. package/dist/models/index.js.map +1 -1
  246. package/dist/models/network-options.js +1 -2
  247. package/dist/utils/assertString.js +1 -3
  248. package/dist/utils/assertString.js.map +1 -1
  249. package/dist/utils/backup.js +15 -46
  250. package/dist/utils/backup.js.map +1 -1
  251. package/dist/utils/equalsPartial.js +3 -8
  252. package/dist/utils/equalsPartial.js.map +1 -1
  253. package/dist/utils/index.js +9 -45
  254. package/dist/utils/index.js.map +1 -1
  255. package/dist/utils/isNumberArray.js +1 -3
  256. package/dist/utils/isNumberArray.js.map +1 -1
  257. package/dist/utils/queue.js +3 -3
  258. package/dist/utils/queue.js.map +1 -1
  259. package/dist/utils/realpathSync.js +3 -8
  260. package/dist/utils/realpathSync.js.map +1 -1
  261. package/dist/utils/wait.js +1 -3
  262. package/dist/utils/wait.js.map +1 -1
  263. package/dist/utils/waitress.js +5 -3
  264. package/dist/utils/waitress.js.map +1 -1
  265. package/dist/zcl/buffaloZcl.js +17 -45
  266. package/dist/zcl/buffaloZcl.js.map +1 -1
  267. package/dist/zcl/definition/buffaloZclDataType.js +1 -3
  268. package/dist/zcl/definition/buffaloZclDataType.js.map +1 -1
  269. package/dist/zcl/definition/cluster.d.ts.map +1 -1
  270. package/dist/zcl/definition/cluster.js +2364 -2336
  271. package/dist/zcl/definition/cluster.js.map +1 -1
  272. package/dist/zcl/definition/dataType.js +1 -3
  273. package/dist/zcl/definition/dataType.js.map +1 -1
  274. package/dist/zcl/definition/direction.js +1 -3
  275. package/dist/zcl/definition/direction.js.map +1 -1
  276. package/dist/zcl/definition/endpointDeviceType.js +1 -3
  277. package/dist/zcl/definition/endpointDeviceType.js.map +1 -1
  278. package/dist/zcl/definition/foundation.js +53 -58
  279. package/dist/zcl/definition/foundation.js.map +1 -1
  280. package/dist/zcl/definition/frameControl.js +1 -2
  281. package/dist/zcl/definition/frameType.js +1 -3
  282. package/dist/zcl/definition/frameType.js.map +1 -1
  283. package/dist/zcl/definition/index.js +12 -51
  284. package/dist/zcl/definition/index.js.map +1 -1
  285. package/dist/zcl/definition/manufacturerCode.js +1 -3
  286. package/dist/zcl/definition/manufacturerCode.js.map +1 -1
  287. package/dist/zcl/definition/powerSource.js +1 -3
  288. package/dist/zcl/definition/powerSource.js.map +1 -1
  289. package/dist/zcl/definition/status.js +1 -3
  290. package/dist/zcl/definition/status.js.map +1 -1
  291. package/dist/zcl/definition/tstype.js +1 -2
  292. package/dist/zcl/index.js +14 -55
  293. package/dist/zcl/index.js.map +1 -1
  294. package/dist/zcl/tstype.js +2 -4
  295. package/dist/zcl/tstype.js.map +1 -1
  296. package/dist/zcl/utils.js +23 -29
  297. package/dist/zcl/utils.js.map +1 -1
  298. package/dist/zcl/zclFrame.js +46 -70
  299. package/dist/zcl/zclFrame.js.map +1 -1
  300. package/dist/zcl/zclHeader.js +1 -2
  301. package/dist/zcl/zclStatusError.js +4 -8
  302. package/dist/zcl/zclStatusError.js.map +1 -1
  303. package/package.json +1 -4
  304. package/tsconfig.json +4 -3
@@ -1,67 +1,34 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.EzspSourceRouteOverheadInformation = exports.EzspZllNetworkOperation = exports.EmberZllKeyIndex = exports.EmberZllState = exports.EmberConcentratorType = exports.EmberZdoConfigurationFlags = exports.EmberJoinMethod = exports.EmberCounterType = exports.EmberKeyStatus = exports.EmberDeviceUpdate = exports.EmberKeyStructBitmask = exports.EmberKeyType = exports.EmberCurrentSecurityBitmask = exports.EmberInitialSecurityBitmask = exports.EmberJoinDecision = exports.EzspNetworkScanType = exports.EmberApsOption = exports.EmberBindingType = exports.EmberMacPassthroughType = exports.EmberOutgoingMessageType = exports.EmberIncomingMessageType = exports.EmberNetworkStatus = exports.EmberNodeType = exports.EmberEventUnits = exports.EmberStatus = exports.EzspStatus = exports.EzspMfgTokenId = exports.EzspDecisionId = exports.EzspPolicyId = exports.EmberConfigTxPowerMode = exports.EzspEndpointFlags = exports.EzspExtendedValueId = exports.EzspValueId = exports.EzspConfigId = exports.Bool = exports.SecureEzspSessionId = exports.SecureEzspRandomNumber = exports.EmberGpKeyType = exports.EmberGpSecurityLevel = exports.SecureEzspSecurityLevel = exports.SecureEzspSecurityType = exports.EmberLibraryStatus = exports.EmberEUI64 = exports.EmberMulticastId = exports.EmberPanId = exports.EmberNodeId = exports.EmberRf4ceApplicationCapabilities = exports.EmberRf4ceNodeCapabilities = exports.EmberRf4ceTxOption = exports.NcpResetCode = void 0;
27
- exports.EzspDecisionBitmask = exports.EmberZDOCmd = exports.EmberNetworkInitBitmask = void 0;
28
1
  /* istanbul ignore file */
29
2
  /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
30
- const basic = __importStar(require("./basic"));
31
- const basic_1 = require("./basic");
3
+ import * as basic from './basic';
4
+ import { fixed_list } from './basic';
32
5
  console.assert(basic.uint8_t);
33
- class NcpResetCode extends basic.uint8_t {
6
+ export class NcpResetCode extends basic.uint8_t {
7
+ //Reset and Error Codes for NCP
8
+ static RESET_UNKNOWN_REASON = 0x00;
9
+ static RESET_EXTERNAL = 0x01;
10
+ static RESET_POWER_ON = 0x02;
11
+ static RESET_WATCHDOG = 0x03;
12
+ static RESET_ASSERT = 0x06;
13
+ static RESET_BOOTLOADER = 0x09;
14
+ static RESET_SOFTWARE = 0x0B;
15
+ static ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT = 0x51;
16
+ static ERROR_UNKNOWN_EM3XX_ERROR = 0x80;
34
17
  }
35
- exports.NcpResetCode = NcpResetCode;
36
- //Reset and Error Codes for NCP
37
- NcpResetCode.RESET_UNKNOWN_REASON = 0x00;
38
- NcpResetCode.RESET_EXTERNAL = 0x01;
39
- NcpResetCode.RESET_POWER_ON = 0x02;
40
- NcpResetCode.RESET_WATCHDOG = 0x03;
41
- NcpResetCode.RESET_ASSERT = 0x06;
42
- NcpResetCode.RESET_BOOTLOADER = 0x09;
43
- NcpResetCode.RESET_SOFTWARE = 0x0B;
44
- NcpResetCode.ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT = 0x51;
45
- NcpResetCode.ERROR_UNKNOWN_EM3XX_ERROR = 0x80;
46
- class EmberRf4ceTxOption extends basic.uint8_t {
18
+ export class EmberRf4ceTxOption extends basic.uint8_t {
47
19
  }
48
- exports.EmberRf4ceTxOption = EmberRf4ceTxOption;
49
- class EmberRf4ceNodeCapabilities extends basic.uint8_t {
20
+ export class EmberRf4ceNodeCapabilities extends basic.uint8_t {
50
21
  }
51
- exports.EmberRf4ceNodeCapabilities = EmberRf4ceNodeCapabilities;
52
- class EmberRf4ceApplicationCapabilities extends basic.uint8_t {
22
+ export class EmberRf4ceApplicationCapabilities extends basic.uint8_t {
53
23
  }
54
- exports.EmberRf4ceApplicationCapabilities = EmberRf4ceApplicationCapabilities;
55
- class EmberNodeId extends basic.uint16_t {
24
+ export class EmberNodeId extends basic.uint16_t {
56
25
  }
57
- exports.EmberNodeId = EmberNodeId;
58
- class EmberPanId extends basic.uint16_t {
26
+ export class EmberPanId extends basic.uint16_t {
59
27
  }
60
- exports.EmberPanId = EmberPanId;
61
- class EmberMulticastId extends basic.uint16_t {
28
+ export class EmberMulticastId extends basic.uint16_t {
62
29
  }
63
- exports.EmberMulticastId = EmberMulticastId;
64
- class EmberEUI64 extends (0, basic_1.fixed_list)(8, basic.uint8_t) {
30
+ export class EmberEUI64 extends fixed_list(8, basic.uint8_t) {
31
+ _value;
65
32
  constructor(_value) {
66
33
  super();
67
34
  this._value = _value;
@@ -106,1622 +73,1576 @@ class EmberEUI64 extends (0, basic_1.fixed_list)(8, basic.uint8_t) {
106
73
  return Buffer.from(this._value).toString('hex');
107
74
  }
108
75
  }
109
- exports.EmberEUI64 = EmberEUI64;
110
- class EmberLibraryStatus extends basic.uint8_t {
76
+ export class EmberLibraryStatus extends basic.uint8_t {
111
77
  }
112
- exports.EmberLibraryStatus = EmberLibraryStatus;
113
- class SecureEzspSecurityType extends basic.uint32_t {
78
+ export class SecureEzspSecurityType extends basic.uint32_t {
114
79
  }
115
- exports.SecureEzspSecurityType = SecureEzspSecurityType;
116
- class SecureEzspSecurityLevel extends basic.uint8_t {
80
+ export class SecureEzspSecurityLevel extends basic.uint8_t {
117
81
  }
118
- exports.SecureEzspSecurityLevel = SecureEzspSecurityLevel;
119
- class EmberGpSecurityLevel extends basic.uint8_t {
82
+ export class EmberGpSecurityLevel extends basic.uint8_t {
120
83
  }
121
- exports.EmberGpSecurityLevel = EmberGpSecurityLevel;
122
- class EmberGpKeyType extends basic.uint8_t {
84
+ export class EmberGpKeyType extends basic.uint8_t {
123
85
  }
124
- exports.EmberGpKeyType = EmberGpKeyType;
125
- class SecureEzspRandomNumber extends basic.uint64_t {
86
+ export class SecureEzspRandomNumber extends basic.uint64_t {
126
87
  }
127
- exports.SecureEzspRandomNumber = SecureEzspRandomNumber;
128
- class SecureEzspSessionId extends basic.uint64_t {
88
+ export class SecureEzspSessionId extends basic.uint64_t {
129
89
  }
130
- exports.SecureEzspSessionId = SecureEzspSessionId;
131
- class Bool extends basic.uint8_t {
90
+ export class Bool extends basic.uint8_t {
91
+ static false = 0x00; // An alias for zero, used for clarity.
92
+ static true = 0x01; // An alias for one, used for clarity.
132
93
  }
133
- exports.Bool = Bool;
134
- Bool.false = 0x00; // An alias for zero, used for clarity.
135
- Bool.true = 0x01; // An alias for one, used for clarity.
136
- class EzspConfigId extends basic.uint8_t {
94
+ export class EzspConfigId extends basic.uint8_t {
95
+ // Identifies a configuration value.
96
+ // The number of packet buffers available to the stack. When set to the
97
+ // special value 0xFF, the NCP will allocate all remaining configuration RAM
98
+ // towards packet buffers, such that the resulting count will be the largest
99
+ // whole number of packet buffers that can fit into the available memory.
100
+ static CONFIG_PACKET_BUFFER_COUNT = 0x01;
101
+ // The maximum number of router neighbors the stack can keep track of. A
102
+ // neighbor is a node within radio range.
103
+ static CONFIG_NEIGHBOR_TABLE_SIZE = 0x02;
104
+ // The maximum number of APS retried messages the stack can be transmitting
105
+ // at any time.
106
+ static CONFIG_APS_UNICAST_MESSAGE_COUNT = 0x03;
107
+ // The maximum number of non-volatile bindings supported by the stack.
108
+ static CONFIG_BINDING_TABLE_SIZE = 0x04;
109
+ // The maximum number of EUI64 to network address associations that the
110
+ // stack can maintain for the application. (Note, the total number of such
111
+ // address associations maintained by the NCP is the sum of the value of
112
+ // this setting and the value of ::CONFIG_TRUST_CENTER_ADDRESS_CACHE_SIZE).
113
+ static CONFIG_ADDRESS_TABLE_SIZE = 0x05;
114
+ // The maximum number of multicast groups that the device may be a member
115
+ // of.
116
+ static CONFIG_MULTICAST_TABLE_SIZE = 0x06;
117
+ // The maximum number of destinations to which a node can route messages.
118
+ // This includes both messages originating at this node and those relayed
119
+ // for others.
120
+ static CONFIG_ROUTE_TABLE_SIZE = 0x07;
121
+ // The number of simultaneous route discoveries that a node will support.
122
+ static CONFIG_DISCOVERY_TABLE_SIZE = 0x08;
123
+ // The size of the alarm broadcast buffer.
124
+ static CONFIG_BROADCAST_ALARM_DATA_SIZE = 0x09;
125
+ // The size of the unicast alarm buffers allocated for end device children.
126
+ static CONFIG_UNICAST_ALARM_DATA_SIZE = 0x0A;
127
+ // Specifies the stack profile.
128
+ static CONFIG_STACK_PROFILE = 0x0C;
129
+ // The security level used for security at the MAC and network layers. The
130
+ // supported values are 0 (no security) and 5 (payload is encrypted and a
131
+ // four-byte MIC is used for authentication).
132
+ static CONFIG_SECURITY_LEVEL = 0x0D;
133
+ // The maximum number of hops for a message.
134
+ static CONFIG_MAX_HOPS = 0x10;
135
+ // The maximum number of end device children that a router will support.
136
+ static CONFIG_MAX_END_DEVICE_CHILDREN = 0x11;
137
+ // The maximum amount of time that the MAC will hold a message for indirect
138
+ // transmission to a child.
139
+ static CONFIG_INDIRECT_TRANSMISSION_TIMEOUT = 0x12;
140
+ // The maximum amount of time that an end device child can wait between
141
+ // polls. If no poll is heard within this timeout, then the parent removes
142
+ // the end device from its tables.
143
+ static CONFIG_END_DEVICE_POLL_TIMEOUT = 0x13;
144
+ // The maximum amount of time that a mobile node can wait between polls. If
145
+ // no poll is heard within this timeout, then the parent removes the mobile
146
+ // node from its tables.
147
+ static CONFIG_MOBILE_NODE_POLL_TIMEOUT = 0x14;
148
+ // The number of child table entries reserved for use only by mobile nodes.
149
+ static CONFIG_RESERVED_MOBILE_CHILD_ENTRIES = 0x15;
150
+ // Enables boost power mode and/or the alternate transmitter output.
151
+ static CONFIG_TX_POWER_MODE = 0x17;
152
+ // 0: Allow this node to relay messages. 1: Prevent this node from relaying
153
+ // messages.
154
+ static CONFIG_DISABLE_RELAY = 0x18;
155
+ // The maximum number of EUI64 to network address associations that the
156
+ // Trust Center can maintain. These address cache entries are reserved for
157
+ // and reused by the Trust Center when processing device join/rejoin
158
+ // authentications. This cache size limits the number of overlapping joins
159
+ // the Trust Center can process within a narrow time window (e.g. two
160
+ // seconds), and thus should be set to the maximum number of near
161
+ // simultaneous joins the Trust Center is expected to accommodate. (Note,
162
+ // the total number of such address associations maintained by the NCP is
163
+ // the sum of the value of this setting and the value of
164
+ // ::CONFIG_ADDRESS_TABLE_SIZE.)
165
+ static CONFIG_TRUST_CENTER_ADDRESS_CACHE_SIZE = 0x19;
166
+ // The size of the source route table.
167
+ static CONFIG_SOURCE_ROUTE_TABLE_SIZE = 0x1A;
168
+ // The units used for timing out end devices on their parents.
169
+ static CONFIG_END_DEVICE_POLL_TIMEOUT_SHIFT = 0x1B;
170
+ // The number of blocks of a fragmented message that can be sent in a single
171
+ // window.
172
+ static CONFIG_FRAGMENT_WINDOW_SIZE = 0x1C;
173
+ // The time the stack will wait (in milliseconds) between sending blocks of
174
+ // a fragmented message.
175
+ static CONFIG_FRAGMENT_DELAY_MS = 0x1D;
176
+ // The size of the Key Table used for storing individual link keys (if the
177
+ // device is a Trust Center) or Application Link Keys (if the device is a
178
+ // normal node).
179
+ static CONFIG_KEY_TABLE_SIZE = 0x1E;
180
+ // The APS ACK timeout value. The stack waits this amount of time between
181
+ // resends of APS retried messages.
182
+ static CONFIG_APS_ACK_TIMEOUT = 0x1F;
183
+ // The duration of an active scan, in the units used by the 15.4 scan
184
+ // parameter (((1 << duration) + 1) * 15ms). This also controls the jitter
185
+ // used when responding to a beacon request.
186
+ static CONFIG_ACTIVE_SCAN_DURATION = 0x20;
187
+ // The time the coordinator will wait (in seconds) for a second end device
188
+ // bind request to arrive.
189
+ static CONFIG_END_DEVICE_BIND_TIMEOUT = 0x21;
190
+ // The number of PAN id conflict reports that must be received by the
191
+ // network manager within one minute to trigger a PAN id change.
192
+ static CONFIG_PAN_ID_CONFLICT_REPORT_THRESHOLD = 0x22;
193
+ // The timeout value in minutes for how long the Trust Center or a normal
194
+ // node waits for the ZigBee Request Key to complete. On the Trust Center
195
+ // this controls whether or not the device buffers the request, waiting for
196
+ // a matching pair of ZigBee Request Key. If the value is non-zero, the
197
+ // Trust Center buffers and waits for that amount of time. If the value is
198
+ // zero, the Trust Center does not buffer the request and immediately
199
+ // responds to the request. Zero is the most compliant behavior.
200
+ static CONFIG_REQUEST_KEY_TIMEOUT = 0x24;
201
+ // This value indicates the size of the runtime modifiable certificate
202
+ // table. Normally certificates are stored in MFG tokens but this table can
203
+ // be used to field upgrade devices with new Smart Energy certificates.
204
+ // This value cannot be set, it can only be queried.
205
+ static CONFIG_CERTIFICATE_TABLE_SIZE = 0x29;
206
+ // This is a bitmask that controls which incoming ZDO request messages are
207
+ // passed to the application. The bits are defined in the
208
+ // EmberZdoConfigurationFlags enumeration. To see if the application is
209
+ // required to send a ZDO response in reply to an incoming message, the
210
+ // application must check the APS options bitfield within the
211
+ // incomingMessageHandler callback to see if the
212
+ // APS_OPTION_ZDO_RESPONSE_REQUIRED flag is set.
213
+ static CONFIG_APPLICATION_ZDO_FLAGS = 0x2A;
214
+ // The maximum number of broadcasts during a single broadcast timeout
215
+ // period.
216
+ static CONFIG_BROADCAST_TABLE_SIZE = 0x2B;
217
+ // The size of the MAC filter list table.
218
+ static CONFIG_MAC_FILTER_TABLE_SIZE = 0x2C;
219
+ // The number of supported networks.
220
+ static CONFIG_SUPPORTED_NETWORKS = 0x2D;
221
+ // Whether multicasts are sent to the RxOnWhenIdle=true address (0xFFFD) or
222
+ // the sleepy broadcast address (0xFFFF). The RxOnWhenIdle=true address is
223
+ // the ZigBee compliant destination for multicasts.
224
+ static CONFIG_SEND_MULTICASTS_TO_SLEEPY_ADDRESS = 0x2E;
225
+ // ZLL group address initial configuration.
226
+ static CONFIG_ZLL_GROUP_ADDRESSES = 0x2F;
227
+ // ZLL rssi threshold initial configuration.
228
+ static CONFIG_ZLL_RSSI_THRESHOLD = 0x30;
229
+ // The maximum number of pairings supported by the stack. Controllers
230
+ // must support at least one pairing table entry while targets must
231
+ // support at least five.
232
+ static CONFIG_RF4CE_PAIRING_TABLE_SIZE = 0x31;
233
+ // The maximum number of outgoing RF4CE packets supported by the stack.
234
+ static CONFIG_RF4CE_PENDING_OUTGOING_PACKET_TABLE_SIZE = 0x32;
235
+ // Toggles the mtorr flow control in the stack.
236
+ static CONFIG_MTORR_FLOW_CONTROL = 0x33;
237
+ // Setting the retry queue size.
238
+ static CONFIG_RETRY_QUEUE_SIZE = 0x34;
239
+ // Setting the new broadcast entry threshold.
240
+ static CONFIG_NEW_BROADCAST_ENTRY_THRESHOLD = 0x35;
241
+ // The length of time, in seconds, that a trust center will store a
242
+ // transient link key that a device can use to join its network. A transient
243
+ // key is added with a call to emberAddTransientLinkKey. After the transient
244
+ // key is added, it will be removed once this amount of time has passed. A
245
+ // joining device will not be able to use that key to join until it is added
246
+ // again on the trust center. The default value is 300 seconds, i.e., 5
247
+ // minutes.
248
+ static CONFIG_TRANSIENT_KEY_TIMEOUT_S = 0x36;
249
+ // The number of passive acknowledgements to record from neighbors before we stop
250
+ // re-transmitting broadcasts
251
+ static CONFIG_BROADCAST_MIN_ACKS_NEEDED = 0x37;
252
+ // The length of time, in seconds, that a trust center will allow a Trust Center
253
+ // (insecure) rejoin for a device that is using the well-known link key. This timeout
254
+ // takes effect once rejoins using the well-known key has been allowed. This command
255
+ // updates the emAllowTcRejoinsUsingWellKnownKeyTimeoutSec value.
256
+ static CONFIG_TC_REJOINS_USING_WELL_KNOWN_KEY_TIMEOUT_S = 0x38;
137
257
  }
138
- exports.EzspConfigId = EzspConfigId;
139
- // Identifies a configuration value.
140
- // The number of packet buffers available to the stack. When set to the
141
- // special value 0xFF, the NCP will allocate all remaining configuration RAM
142
- // towards packet buffers, such that the resulting count will be the largest
143
- // whole number of packet buffers that can fit into the available memory.
144
- EzspConfigId.CONFIG_PACKET_BUFFER_COUNT = 0x01;
145
- // The maximum number of router neighbors the stack can keep track of. A
146
- // neighbor is a node within radio range.
147
- EzspConfigId.CONFIG_NEIGHBOR_TABLE_SIZE = 0x02;
148
- // The maximum number of APS retried messages the stack can be transmitting
149
- // at any time.
150
- EzspConfigId.CONFIG_APS_UNICAST_MESSAGE_COUNT = 0x03;
151
- // The maximum number of non-volatile bindings supported by the stack.
152
- EzspConfigId.CONFIG_BINDING_TABLE_SIZE = 0x04;
153
- // The maximum number of EUI64 to network address associations that the
154
- // stack can maintain for the application. (Note, the total number of such
155
- // address associations maintained by the NCP is the sum of the value of
156
- // this setting and the value of ::CONFIG_TRUST_CENTER_ADDRESS_CACHE_SIZE).
157
- EzspConfigId.CONFIG_ADDRESS_TABLE_SIZE = 0x05;
158
- // The maximum number of multicast groups that the device may be a member
159
- // of.
160
- EzspConfigId.CONFIG_MULTICAST_TABLE_SIZE = 0x06;
161
- // The maximum number of destinations to which a node can route messages.
162
- // This includes both messages originating at this node and those relayed
163
- // for others.
164
- EzspConfigId.CONFIG_ROUTE_TABLE_SIZE = 0x07;
165
- // The number of simultaneous route discoveries that a node will support.
166
- EzspConfigId.CONFIG_DISCOVERY_TABLE_SIZE = 0x08;
167
- // The size of the alarm broadcast buffer.
168
- EzspConfigId.CONFIG_BROADCAST_ALARM_DATA_SIZE = 0x09;
169
- // The size of the unicast alarm buffers allocated for end device children.
170
- EzspConfigId.CONFIG_UNICAST_ALARM_DATA_SIZE = 0x0A;
171
- // Specifies the stack profile.
172
- EzspConfigId.CONFIG_STACK_PROFILE = 0x0C;
173
- // The security level used for security at the MAC and network layers. The
174
- // supported values are 0 (no security) and 5 (payload is encrypted and a
175
- // four-byte MIC is used for authentication).
176
- EzspConfigId.CONFIG_SECURITY_LEVEL = 0x0D;
177
- // The maximum number of hops for a message.
178
- EzspConfigId.CONFIG_MAX_HOPS = 0x10;
179
- // The maximum number of end device children that a router will support.
180
- EzspConfigId.CONFIG_MAX_END_DEVICE_CHILDREN = 0x11;
181
- // The maximum amount of time that the MAC will hold a message for indirect
182
- // transmission to a child.
183
- EzspConfigId.CONFIG_INDIRECT_TRANSMISSION_TIMEOUT = 0x12;
184
- // The maximum amount of time that an end device child can wait between
185
- // polls. If no poll is heard within this timeout, then the parent removes
186
- // the end device from its tables.
187
- EzspConfigId.CONFIG_END_DEVICE_POLL_TIMEOUT = 0x13;
188
- // The maximum amount of time that a mobile node can wait between polls. If
189
- // no poll is heard within this timeout, then the parent removes the mobile
190
- // node from its tables.
191
- EzspConfigId.CONFIG_MOBILE_NODE_POLL_TIMEOUT = 0x14;
192
- // The number of child table entries reserved for use only by mobile nodes.
193
- EzspConfigId.CONFIG_RESERVED_MOBILE_CHILD_ENTRIES = 0x15;
194
- // Enables boost power mode and/or the alternate transmitter output.
195
- EzspConfigId.CONFIG_TX_POWER_MODE = 0x17;
196
- // 0: Allow this node to relay messages. 1: Prevent this node from relaying
197
- // messages.
198
- EzspConfigId.CONFIG_DISABLE_RELAY = 0x18;
199
- // The maximum number of EUI64 to network address associations that the
200
- // Trust Center can maintain. These address cache entries are reserved for
201
- // and reused by the Trust Center when processing device join/rejoin
202
- // authentications. This cache size limits the number of overlapping joins
203
- // the Trust Center can process within a narrow time window (e.g. two
204
- // seconds), and thus should be set to the maximum number of near
205
- // simultaneous joins the Trust Center is expected to accommodate. (Note,
206
- // the total number of such address associations maintained by the NCP is
207
- // the sum of the value of this setting and the value of
208
- // ::CONFIG_ADDRESS_TABLE_SIZE.)
209
- EzspConfigId.CONFIG_TRUST_CENTER_ADDRESS_CACHE_SIZE = 0x19;
210
- // The size of the source route table.
211
- EzspConfigId.CONFIG_SOURCE_ROUTE_TABLE_SIZE = 0x1A;
212
- // The units used for timing out end devices on their parents.
213
- EzspConfigId.CONFIG_END_DEVICE_POLL_TIMEOUT_SHIFT = 0x1B;
214
- // The number of blocks of a fragmented message that can be sent in a single
215
- // window.
216
- EzspConfigId.CONFIG_FRAGMENT_WINDOW_SIZE = 0x1C;
217
- // The time the stack will wait (in milliseconds) between sending blocks of
218
- // a fragmented message.
219
- EzspConfigId.CONFIG_FRAGMENT_DELAY_MS = 0x1D;
220
- // The size of the Key Table used for storing individual link keys (if the
221
- // device is a Trust Center) or Application Link Keys (if the device is a
222
- // normal node).
223
- EzspConfigId.CONFIG_KEY_TABLE_SIZE = 0x1E;
224
- // The APS ACK timeout value. The stack waits this amount of time between
225
- // resends of APS retried messages.
226
- EzspConfigId.CONFIG_APS_ACK_TIMEOUT = 0x1F;
227
- // The duration of an active scan, in the units used by the 15.4 scan
228
- // parameter (((1 << duration) + 1) * 15ms). This also controls the jitter
229
- // used when responding to a beacon request.
230
- EzspConfigId.CONFIG_ACTIVE_SCAN_DURATION = 0x20;
231
- // The time the coordinator will wait (in seconds) for a second end device
232
- // bind request to arrive.
233
- EzspConfigId.CONFIG_END_DEVICE_BIND_TIMEOUT = 0x21;
234
- // The number of PAN id conflict reports that must be received by the
235
- // network manager within one minute to trigger a PAN id change.
236
- EzspConfigId.CONFIG_PAN_ID_CONFLICT_REPORT_THRESHOLD = 0x22;
237
- // The timeout value in minutes for how long the Trust Center or a normal
238
- // node waits for the ZigBee Request Key to complete. On the Trust Center
239
- // this controls whether or not the device buffers the request, waiting for
240
- // a matching pair of ZigBee Request Key. If the value is non-zero, the
241
- // Trust Center buffers and waits for that amount of time. If the value is
242
- // zero, the Trust Center does not buffer the request and immediately
243
- // responds to the request. Zero is the most compliant behavior.
244
- EzspConfigId.CONFIG_REQUEST_KEY_TIMEOUT = 0x24;
245
- // This value indicates the size of the runtime modifiable certificate
246
- // table. Normally certificates are stored in MFG tokens but this table can
247
- // be used to field upgrade devices with new Smart Energy certificates.
248
- // This value cannot be set, it can only be queried.
249
- EzspConfigId.CONFIG_CERTIFICATE_TABLE_SIZE = 0x29;
250
- // This is a bitmask that controls which incoming ZDO request messages are
251
- // passed to the application. The bits are defined in the
252
- // EmberZdoConfigurationFlags enumeration. To see if the application is
253
- // required to send a ZDO response in reply to an incoming message, the
254
- // application must check the APS options bitfield within the
255
- // incomingMessageHandler callback to see if the
256
- // APS_OPTION_ZDO_RESPONSE_REQUIRED flag is set.
257
- EzspConfigId.CONFIG_APPLICATION_ZDO_FLAGS = 0x2A;
258
- // The maximum number of broadcasts during a single broadcast timeout
259
- // period.
260
- EzspConfigId.CONFIG_BROADCAST_TABLE_SIZE = 0x2B;
261
- // The size of the MAC filter list table.
262
- EzspConfigId.CONFIG_MAC_FILTER_TABLE_SIZE = 0x2C;
263
- // The number of supported networks.
264
- EzspConfigId.CONFIG_SUPPORTED_NETWORKS = 0x2D;
265
- // Whether multicasts are sent to the RxOnWhenIdle=true address (0xFFFD) or
266
- // the sleepy broadcast address (0xFFFF). The RxOnWhenIdle=true address is
267
- // the ZigBee compliant destination for multicasts.
268
- EzspConfigId.CONFIG_SEND_MULTICASTS_TO_SLEEPY_ADDRESS = 0x2E;
269
- // ZLL group address initial configuration.
270
- EzspConfigId.CONFIG_ZLL_GROUP_ADDRESSES = 0x2F;
271
- // ZLL rssi threshold initial configuration.
272
- EzspConfigId.CONFIG_ZLL_RSSI_THRESHOLD = 0x30;
273
- // The maximum number of pairings supported by the stack. Controllers
274
- // must support at least one pairing table entry while targets must
275
- // support at least five.
276
- EzspConfigId.CONFIG_RF4CE_PAIRING_TABLE_SIZE = 0x31;
277
- // The maximum number of outgoing RF4CE packets supported by the stack.
278
- EzspConfigId.CONFIG_RF4CE_PENDING_OUTGOING_PACKET_TABLE_SIZE = 0x32;
279
- // Toggles the mtorr flow control in the stack.
280
- EzspConfigId.CONFIG_MTORR_FLOW_CONTROL = 0x33;
281
- // Setting the retry queue size.
282
- EzspConfigId.CONFIG_RETRY_QUEUE_SIZE = 0x34;
283
- // Setting the new broadcast entry threshold.
284
- EzspConfigId.CONFIG_NEW_BROADCAST_ENTRY_THRESHOLD = 0x35;
285
- // The length of time, in seconds, that a trust center will store a
286
- // transient link key that a device can use to join its network. A transient
287
- // key is added with a call to emberAddTransientLinkKey. After the transient
288
- // key is added, it will be removed once this amount of time has passed. A
289
- // joining device will not be able to use that key to join until it is added
290
- // again on the trust center. The default value is 300 seconds, i.e., 5
291
- // minutes.
292
- EzspConfigId.CONFIG_TRANSIENT_KEY_TIMEOUT_S = 0x36;
293
- // The number of passive acknowledgements to record from neighbors before we stop
294
- // re-transmitting broadcasts
295
- EzspConfigId.CONFIG_BROADCAST_MIN_ACKS_NEEDED = 0x37;
296
- // The length of time, in seconds, that a trust center will allow a Trust Center
297
- // (insecure) rejoin for a device that is using the well-known link key. This timeout
298
- // takes effect once rejoins using the well-known key has been allowed. This command
299
- // updates the emAllowTcRejoinsUsingWellKnownKeyTimeoutSec value.
300
- EzspConfigId.CONFIG_TC_REJOINS_USING_WELL_KNOWN_KEY_TIMEOUT_S = 0x38;
301
- class EzspValueId extends basic.uint8_t {
258
+ export class EzspValueId extends basic.uint8_t {
259
+ // Identifies a value.
260
+ // The contents of the node data stack token.
261
+ static VALUE_TOKEN_STACK_NODE_DATA = 0x00;
262
+ // The types of MAC passthrough messages that the host wishes to receive.
263
+ static VALUE_MAC_PASSTHROUGH_FLAGS = 0x01;
264
+ // The source address used to filter legacy EmberNet messages when the
265
+ // MAC_PASSTHROUGH_EMBERNET_SOURCE flag is set in
266
+ // VALUE_MAC_PASSTHROUGH_FLAGS.
267
+ static VALUE_EMBERNET_PASSTHROUGH_SOURCE_ADDRESS = 0x02;
268
+ // The number of available message buffers.
269
+ static VALUE_FREE_BUFFERS = 0x03;
270
+ // Selects sending synchronous callbacks in ezsp-uart.
271
+ static VALUE_UART_SYNCH_CALLBACKS = 0x04;
272
+ // The maximum incoming transfer size for the local node.
273
+ static VALUE_MAXIMUM_INCOMING_TRANSFER_SIZE = 0x05;
274
+ // The maximum outgoing transfer size for the local node.
275
+ static VALUE_MAXIMUM_OUTGOING_TRANSFER_SIZE = 0x06;
276
+ // A boolean indicating whether stack tokens are written to persistent
277
+ // storage as they change.
278
+ static VALUE_STACK_TOKEN_WRITING = 0x07;
279
+ // A read-only value indicating whether the stack is currently performing a
280
+ // rejoin.
281
+ static VALUE_STACK_IS_PERFORMING_REJOIN = 0x08;
282
+ // A list of EmberMacFilterMatchData values.
283
+ static VALUE_MAC_FILTER_LIST = 0x09;
284
+ // The Ember Extended Security Bitmask.
285
+ static VALUE_EXTENDED_SECURITY_BITMASK = 0x0A;
286
+ // The node short ID.
287
+ static VALUE_NODE_SHORT_ID = 0x0B;
288
+ // The descriptor capability of the local node.
289
+ static VALUE_DESCRIPTOR_CAPABILITY = 0x0C;
290
+ // The stack device request sequence number of the local node.
291
+ static VALUE_STACK_DEVICE_REQUEST_SEQUENCE_NUMBER = 0x0D;
292
+ // Enable or disable radio hold-off.
293
+ static VALUE_RADIO_HOLD_OFF = 0x0E;
294
+ // The flags field associated with the endpoint data.
295
+ static VALUE_ENDPOINT_FLAGS = 0x0F;
296
+ // Enable/disable the Mfg security config key settings.
297
+ static VALUE_MFG_SECURITY_CONFIG = 0x10;
298
+ // Retrieves the version information from the stack on the NCP.
299
+ static VALUE_VERSION_INFO = 0x11;
300
+ // This will get/set the rejoin reason noted by the host for a subsequent
301
+ // call to emberFindAndRejoinNetwork(). After a call to
302
+ // emberFindAndRejoinNetwork() the host's rejoin reason will be set to
303
+ // REJOIN_REASON_NONE. The NCP will store the rejoin reason used by the
304
+ // call to emberFindAndRejoinNetwork()
305
+ static VALUE_NEXT_HOST_REJOIN_REASON = 0x12;
306
+ // This is the reason that the last rejoin took place. This value may only
307
+ // be retrieved, not set. The rejoin may have been initiated by the stack
308
+ // (NCP) or the application (host). If a host initiated a rejoin the reason
309
+ // will be set by default to REJOIN_DUE_TO_APP_EVENT_1. If the application
310
+ // wishes to denote its own rejoin reasons it can do so by calling
311
+ // ezspSetValue(VALUE_HOST_REJOIN_REASON, REJOIN_DUE_TO_APP_EVENT_X). X is a
312
+ // number corresponding to one of the app events defined. If the NCP
313
+ // initiated a rejoin it will record this value internally for retrieval by
314
+ // ezspGetValue(VALUE_REAL_REJOIN_REASON).
315
+ static VALUE_LAST_REJOIN_REASON = 0x13;
316
+ // The next ZigBee sequence number.
317
+ static VALUE_NEXT_ZIGBEE_SEQUENCE_NUMBER = 0x14;
318
+ // CCA energy detect threshold for radio.
319
+ static VALUE_CCA_THRESHOLD = 0x15;
320
+ // The threshold value for a counter
321
+ static VALUE_SET_COUNTER_THRESHOLD = 0x17;
322
+ // Resets all counters thresholds to 0xFF
323
+ static VALUE_RESET_COUNTER_THRESHOLDS = 0x18;
324
+ // Clears all the counters
325
+ static VALUE_CLEAR_COUNTERS = 0x19;
326
+ // The device RF4CE base channel
327
+ static VALUE_RF4CE_BASE_CHANNEL = 0x1A;
328
+ // The RF4CE device types supported by the node
329
+ static VALUE_RF4CE_SUPPORTED_DEVICE_TYPES_LIST = 0x1B;
330
+ // The RF4CE profiles supported by the node
331
+ static VALUE_RF4CE_SUPPORTED_PROFILES_LIST = 0x1C;
332
+ // Setting this byte enables R21 behavior on the NCP.
333
+ static VALUE_ENABLE_R21_BEHAVIOR = 0x29;
334
+ // Configure the antenna mode(0-primary,1-secondary,2- toggle on tx ack
335
+ // fail).
336
+ static VALUE_ANTENNA_MODE = 0x30;
337
+ // The GDP binding recipient parameters
338
+ static VALUE_RF4CE_GDP_BINDING_RECIPIENT_PARAMETERS = 0x1D;
339
+ // The GDP binding push button stimulus received pending flag
340
+ static VALUE_RF4CE_GDP_PUSH_BUTTON_STIMULUS_RECEIVED_PENDING_FLAG = 0x1E;
341
+ // The GDP originator proxy flag in the advanced binding options
342
+ static VALUE_RF4CE_GDP_BINDING_PROXY_FLAG = 0x1F;
343
+ // The GDP application specific user s join unti_VALUE_RF4CE_MSO_USER_STRING
344
+ // 0x21 The MSO user string
345
+ static VALUE_RF4CE_GDP_APPLICATION_SPECIFIC_USER_STRING = 0x20;
346
+ // The MSO user string
347
+ static VALUE_RF4CE_MSO_USER_STRING = 0x21;
348
+ // The MSO binding recipient parameters
349
+ static VALUE_RF4CE_MSO_BINDING_RECIPIENT_PARAMETERS = 0x22;
350
+ // The NWK layer security frame counter value
351
+ static VALUE_NWK_FRAME_COUNTER = 0x23;
352
+ // The APS layer security frame counter value
353
+ static VALUE_APS_FRAME_COUNTER = 0x24;
354
+ // Sets the device type to use on the next rejoin using device type
355
+ static VALUE_RETRY_DEVICE_TYPE = 0x25;
356
+ // The device RF4CE base channel
357
+ static VALUE_RF4CE_BASE_CHANNEL2 = 0x26;
358
+ // The RF4CE device types supported by the node
359
+ static VALUE_RF4CE_SUPPORTED_DEVICE_TYPES_LIST2 = 0x27;
360
+ // The RF4CE profiles supported by the node
361
+ static VALUE_RF4CE_SUPPORTED_PROFILES_LIST2 = 0x28;
362
+ // Enable or disable packet traffic arbitration.
363
+ static VALUE_ENABLE_PTA = 0x31;
364
+ // Set packet traffic arbitration configuration options.
365
+ static VALUE_PTA_OPTIONS = 0x32;
366
+ // Configure manufacturing library options(0-non-CSMA transmits,1-CSMA transmits).
367
+ static VALUE_MFGLIB_OPTIONS = 0x33;
368
+ static VALUE_END_DEVICE_KEEP_ALIVE_SUPPORT_MODE = 0x3F;
302
369
  }
303
- exports.EzspValueId = EzspValueId;
304
- // Identifies a value.
305
- // The contents of the node data stack token.
306
- EzspValueId.VALUE_TOKEN_STACK_NODE_DATA = 0x00;
307
- // The types of MAC passthrough messages that the host wishes to receive.
308
- EzspValueId.VALUE_MAC_PASSTHROUGH_FLAGS = 0x01;
309
- // The source address used to filter legacy EmberNet messages when the
310
- // MAC_PASSTHROUGH_EMBERNET_SOURCE flag is set in
311
- // VALUE_MAC_PASSTHROUGH_FLAGS.
312
- EzspValueId.VALUE_EMBERNET_PASSTHROUGH_SOURCE_ADDRESS = 0x02;
313
- // The number of available message buffers.
314
- EzspValueId.VALUE_FREE_BUFFERS = 0x03;
315
- // Selects sending synchronous callbacks in ezsp-uart.
316
- EzspValueId.VALUE_UART_SYNCH_CALLBACKS = 0x04;
317
- // The maximum incoming transfer size for the local node.
318
- EzspValueId.VALUE_MAXIMUM_INCOMING_TRANSFER_SIZE = 0x05;
319
- // The maximum outgoing transfer size for the local node.
320
- EzspValueId.VALUE_MAXIMUM_OUTGOING_TRANSFER_SIZE = 0x06;
321
- // A boolean indicating whether stack tokens are written to persistent
322
- // storage as they change.
323
- EzspValueId.VALUE_STACK_TOKEN_WRITING = 0x07;
324
- // A read-only value indicating whether the stack is currently performing a
325
- // rejoin.
326
- EzspValueId.VALUE_STACK_IS_PERFORMING_REJOIN = 0x08;
327
- // A list of EmberMacFilterMatchData values.
328
- EzspValueId.VALUE_MAC_FILTER_LIST = 0x09;
329
- // The Ember Extended Security Bitmask.
330
- EzspValueId.VALUE_EXTENDED_SECURITY_BITMASK = 0x0A;
331
- // The node short ID.
332
- EzspValueId.VALUE_NODE_SHORT_ID = 0x0B;
333
- // The descriptor capability of the local node.
334
- EzspValueId.VALUE_DESCRIPTOR_CAPABILITY = 0x0C;
335
- // The stack device request sequence number of the local node.
336
- EzspValueId.VALUE_STACK_DEVICE_REQUEST_SEQUENCE_NUMBER = 0x0D;
337
- // Enable or disable radio hold-off.
338
- EzspValueId.VALUE_RADIO_HOLD_OFF = 0x0E;
339
- // The flags field associated with the endpoint data.
340
- EzspValueId.VALUE_ENDPOINT_FLAGS = 0x0F;
341
- // Enable/disable the Mfg security config key settings.
342
- EzspValueId.VALUE_MFG_SECURITY_CONFIG = 0x10;
343
- // Retrieves the version information from the stack on the NCP.
344
- EzspValueId.VALUE_VERSION_INFO = 0x11;
345
- // This will get/set the rejoin reason noted by the host for a subsequent
346
- // call to emberFindAndRejoinNetwork(). After a call to
347
- // emberFindAndRejoinNetwork() the host's rejoin reason will be set to
348
- // REJOIN_REASON_NONE. The NCP will store the rejoin reason used by the
349
- // call to emberFindAndRejoinNetwork()
350
- EzspValueId.VALUE_NEXT_HOST_REJOIN_REASON = 0x12;
351
- // This is the reason that the last rejoin took place. This value may only
352
- // be retrieved, not set. The rejoin may have been initiated by the stack
353
- // (NCP) or the application (host). If a host initiated a rejoin the reason
354
- // will be set by default to REJOIN_DUE_TO_APP_EVENT_1. If the application
355
- // wishes to denote its own rejoin reasons it can do so by calling
356
- // ezspSetValue(VALUE_HOST_REJOIN_REASON, REJOIN_DUE_TO_APP_EVENT_X). X is a
357
- // number corresponding to one of the app events defined. If the NCP
358
- // initiated a rejoin it will record this value internally for retrieval by
359
- // ezspGetValue(VALUE_REAL_REJOIN_REASON).
360
- EzspValueId.VALUE_LAST_REJOIN_REASON = 0x13;
361
- // The next ZigBee sequence number.
362
- EzspValueId.VALUE_NEXT_ZIGBEE_SEQUENCE_NUMBER = 0x14;
363
- // CCA energy detect threshold for radio.
364
- EzspValueId.VALUE_CCA_THRESHOLD = 0x15;
365
- // The threshold value for a counter
366
- EzspValueId.VALUE_SET_COUNTER_THRESHOLD = 0x17;
367
- // Resets all counters thresholds to 0xFF
368
- EzspValueId.VALUE_RESET_COUNTER_THRESHOLDS = 0x18;
369
- // Clears all the counters
370
- EzspValueId.VALUE_CLEAR_COUNTERS = 0x19;
371
- // The device RF4CE base channel
372
- EzspValueId.VALUE_RF4CE_BASE_CHANNEL = 0x1A;
373
- // The RF4CE device types supported by the node
374
- EzspValueId.VALUE_RF4CE_SUPPORTED_DEVICE_TYPES_LIST = 0x1B;
375
- // The RF4CE profiles supported by the node
376
- EzspValueId.VALUE_RF4CE_SUPPORTED_PROFILES_LIST = 0x1C;
377
- // Setting this byte enables R21 behavior on the NCP.
378
- EzspValueId.VALUE_ENABLE_R21_BEHAVIOR = 0x29;
379
- // Configure the antenna mode(0-primary,1-secondary,2- toggle on tx ack
380
- // fail).
381
- EzspValueId.VALUE_ANTENNA_MODE = 0x30;
382
- // The GDP binding recipient parameters
383
- EzspValueId.VALUE_RF4CE_GDP_BINDING_RECIPIENT_PARAMETERS = 0x1D;
384
- // The GDP binding push button stimulus received pending flag
385
- EzspValueId.VALUE_RF4CE_GDP_PUSH_BUTTON_STIMULUS_RECEIVED_PENDING_FLAG = 0x1E;
386
- // The GDP originator proxy flag in the advanced binding options
387
- EzspValueId.VALUE_RF4CE_GDP_BINDING_PROXY_FLAG = 0x1F;
388
- // The GDP application specific user s join unti_VALUE_RF4CE_MSO_USER_STRING
389
- // 0x21 The MSO user string
390
- EzspValueId.VALUE_RF4CE_GDP_APPLICATION_SPECIFIC_USER_STRING = 0x20;
391
- // The MSO user string
392
- EzspValueId.VALUE_RF4CE_MSO_USER_STRING = 0x21;
393
- // The MSO binding recipient parameters
394
- EzspValueId.VALUE_RF4CE_MSO_BINDING_RECIPIENT_PARAMETERS = 0x22;
395
- // The NWK layer security frame counter value
396
- EzspValueId.VALUE_NWK_FRAME_COUNTER = 0x23;
397
- // The APS layer security frame counter value
398
- EzspValueId.VALUE_APS_FRAME_COUNTER = 0x24;
399
- // Sets the device type to use on the next rejoin using device type
400
- EzspValueId.VALUE_RETRY_DEVICE_TYPE = 0x25;
401
- // The device RF4CE base channel
402
- EzspValueId.VALUE_RF4CE_BASE_CHANNEL2 = 0x26;
403
- // The RF4CE device types supported by the node
404
- EzspValueId.VALUE_RF4CE_SUPPORTED_DEVICE_TYPES_LIST2 = 0x27;
405
- // The RF4CE profiles supported by the node
406
- EzspValueId.VALUE_RF4CE_SUPPORTED_PROFILES_LIST2 = 0x28;
407
- // Enable or disable packet traffic arbitration.
408
- EzspValueId.VALUE_ENABLE_PTA = 0x31;
409
- // Set packet traffic arbitration configuration options.
410
- EzspValueId.VALUE_PTA_OPTIONS = 0x32;
411
- // Configure manufacturing library options(0-non-CSMA transmits,1-CSMA transmits).
412
- EzspValueId.VALUE_MFGLIB_OPTIONS = 0x33;
413
- EzspValueId.VALUE_END_DEVICE_KEEP_ALIVE_SUPPORT_MODE = 0x3F;
414
- class EzspExtendedValueId extends basic.uint8_t {
370
+ export class EzspExtendedValueId extends basic.uint8_t {
371
+ // Identifies a value based on specified characteristics. Each set of
372
+ // characteristics is unique to that value and is specified during the call
373
+ // to get the extended value.
374
+ // The flags field associated with the specified endpoint.
375
+ static EXTENDED_VALUE_ENDPOINT_FLAGS = 0x00;
376
+ // This is the reason for the node to leave the network as well as the
377
+ // device that told it to leave. The leave reason is the 1st byte of the
378
+ // value while the node ID is the 2nd and 3rd byte. If the leave was caused
379
+ // due to an API call rather than an over the air message, the node ID will
380
+ // be UNKNOWN_NODE_ID (0xFFFD).
381
+ static EXTENDED_VALUE_LAST_LEAVE_REASON = 0x01;
382
+ // This number of bytes of overhead required in the network frame for source
383
+ // routing to a particular destination.
384
+ static EXTENDED_VALUE_GET_SOURCE_ROUTE_OVERHEAD = 0x02;
415
385
  }
416
- exports.EzspExtendedValueId = EzspExtendedValueId;
417
- // Identifies a value based on specified characteristics. Each set of
418
- // characteristics is unique to that value and is specified during the call
419
- // to get the extended value.
420
- // The flags field associated with the specified endpoint.
421
- EzspExtendedValueId.EXTENDED_VALUE_ENDPOINT_FLAGS = 0x00;
422
- // This is the reason for the node to leave the network as well as the
423
- // device that told it to leave. The leave reason is the 1st byte of the
424
- // value while the node ID is the 2nd and 3rd byte. If the leave was caused
425
- // due to an API call rather than an over the air message, the node ID will
426
- // be UNKNOWN_NODE_ID (0xFFFD).
427
- EzspExtendedValueId.EXTENDED_VALUE_LAST_LEAVE_REASON = 0x01;
428
- // This number of bytes of overhead required in the network frame for source
429
- // routing to a particular destination.
430
- EzspExtendedValueId.EXTENDED_VALUE_GET_SOURCE_ROUTE_OVERHEAD = 0x02;
431
- class EzspEndpointFlags extends basic.uint16_t {
386
+ export class EzspEndpointFlags extends basic.uint16_t {
387
+ // Flags associated with the endpoint data configured on the NCP.
388
+ // Indicates that the endpoint is disabled and NOT discoverable via ZDO.
389
+ static ENDPOINT_DISABLED = 0x00;
390
+ // Indicates that the endpoint is enabled and discoverable via ZDO.
391
+ static ENDPOINT_ENABLED = 0x01;
432
392
  }
433
- exports.EzspEndpointFlags = EzspEndpointFlags;
434
- // Flags associated with the endpoint data configured on the NCP.
435
- // Indicates that the endpoint is disabled and NOT discoverable via ZDO.
436
- EzspEndpointFlags.ENDPOINT_DISABLED = 0x00;
437
- // Indicates that the endpoint is enabled and discoverable via ZDO.
438
- EzspEndpointFlags.ENDPOINT_ENABLED = 0x01;
439
- class EmberConfigTxPowerMode extends basic.uint16_t {
393
+ export class EmberConfigTxPowerMode extends basic.uint16_t {
394
+ // Values for CONFIG_TX_POWER_MODE.
395
+ // Normal power mode and bi-directional RF transmitter output.
396
+ static TX_POWER_MODE_DEFAULT = 0x00;
397
+ // Enable boost power mode. This is a high performance radio mode which
398
+ // offers increased receive sensitivity and transmit power at the cost of an
399
+ // increase in power consumption.
400
+ static TX_POWER_MODE_BOOST = 0x01;
401
+ // Enable the alternate transmitter output. This allows for simplified
402
+ // connection to an external power amplifier via the RF_TX_ALT_P and
403
+ // RF_TX_ALT_N pins. TX_POWER_MODE_BOOST_AND_ALTERNATE 0x03 Enable both
404
+ // boost mode and the alternate transmitter output.
405
+ static TX_POWER_MODE_ALTERNATE = 0x02;
440
406
  }
441
- exports.EmberConfigTxPowerMode = EmberConfigTxPowerMode;
442
- // Values for CONFIG_TX_POWER_MODE.
443
- // Normal power mode and bi-directional RF transmitter output.
444
- EmberConfigTxPowerMode.TX_POWER_MODE_DEFAULT = 0x00;
445
- // Enable boost power mode. This is a high performance radio mode which
446
- // offers increased receive sensitivity and transmit power at the cost of an
447
- // increase in power consumption.
448
- EmberConfigTxPowerMode.TX_POWER_MODE_BOOST = 0x01;
449
- // Enable the alternate transmitter output. This allows for simplified
450
- // connection to an external power amplifier via the RF_TX_ALT_P and
451
- // RF_TX_ALT_N pins. TX_POWER_MODE_BOOST_AND_ALTERNATE 0x03 Enable both
452
- // boost mode and the alternate transmitter output.
453
- EmberConfigTxPowerMode.TX_POWER_MODE_ALTERNATE = 0x02;
454
- class EzspPolicyId extends basic.uint8_t {
407
+ export class EzspPolicyId extends basic.uint8_t {
408
+ // Identifies a policy.
409
+ // Controls trust center behavior.
410
+ static TRUST_CENTER_POLICY = 0x00;
411
+ // Controls how external binding modification requests are handled.
412
+ static BINDING_MODIFICATION_POLICY = 0x01;
413
+ // Controls whether the Host supplies unicast replies.
414
+ static UNICAST_REPLIES_POLICY = 0x02;
415
+ // Controls whether pollHandler callbacks are generated.
416
+ static POLL_HANDLER_POLICY = 0x03;
417
+ // Controls whether the message contents are included in the
418
+ // messageSentHandler callback.
419
+ static MESSAGE_CONTENTS_IN_CALLBACK_POLICY = 0x04;
420
+ // Controls whether the Trust Center will respond to Trust Center link key
421
+ // requests.
422
+ static TC_KEY_REQUEST_POLICY = 0x05;
423
+ // Controls whether the Trust Center will respond to application link key
424
+ // requests.
425
+ static APP_KEY_REQUEST_POLICY = 0x06;
426
+ // Controls whether ZigBee packets that appear invalid are automatically
427
+ // dropped by the stack. A counter will be incremented when this occurs.
428
+ static PACKET_VALIDATE_LIBRARY_POLICY = 0x07;
429
+ // Controls whether the stack will process ZLL messages.
430
+ static ZLL_POLICY = 0x08;
431
+ static TC_REJOINS_USING_WELL_KNOWN_KEY_POLICY = 0x09;
455
432
  }
456
- exports.EzspPolicyId = EzspPolicyId;
457
- // Identifies a policy.
458
- // Controls trust center behavior.
459
- EzspPolicyId.TRUST_CENTER_POLICY = 0x00;
460
- // Controls how external binding modification requests are handled.
461
- EzspPolicyId.BINDING_MODIFICATION_POLICY = 0x01;
462
- // Controls whether the Host supplies unicast replies.
463
- EzspPolicyId.UNICAST_REPLIES_POLICY = 0x02;
464
- // Controls whether pollHandler callbacks are generated.
465
- EzspPolicyId.POLL_HANDLER_POLICY = 0x03;
466
- // Controls whether the message contents are included in the
467
- // messageSentHandler callback.
468
- EzspPolicyId.MESSAGE_CONTENTS_IN_CALLBACK_POLICY = 0x04;
469
- // Controls whether the Trust Center will respond to Trust Center link key
470
- // requests.
471
- EzspPolicyId.TC_KEY_REQUEST_POLICY = 0x05;
472
- // Controls whether the Trust Center will respond to application link key
473
- // requests.
474
- EzspPolicyId.APP_KEY_REQUEST_POLICY = 0x06;
475
- // Controls whether ZigBee packets that appear invalid are automatically
476
- // dropped by the stack. A counter will be incremented when this occurs.
477
- EzspPolicyId.PACKET_VALIDATE_LIBRARY_POLICY = 0x07;
478
- // Controls whether the stack will process ZLL messages.
479
- EzspPolicyId.ZLL_POLICY = 0x08;
480
- EzspPolicyId.TC_REJOINS_USING_WELL_KNOWN_KEY_POLICY = 0x09;
481
- class EzspDecisionId extends basic.uint16_t {
433
+ export class EzspDecisionId extends basic.uint16_t {
434
+ // Identifies a policy decision.
435
+ // Send the network key in the clear to all joining and rejoining devices.
436
+ static ALLOW_JOINS = 0x00;
437
+ // Send the network key in the clear to all joining devices. Rejoining
438
+ // devices are sent the network key encrypted with their trust center link
439
+ // key. The trust center and any rejoining device are assumed to share a
440
+ // link key, either preconfigured or obtained under a previous policy.
441
+ static ALLOW_JOINS_REJOINS_HAVE_LINK_KEY = 0x04;
442
+ // Send the network key encrypted with the joining or rejoining device's
443
+ // trust center link key. The trust center and any joining or rejoining
444
+ // device are assumed to share a link key, either preconfigured or obtained
445
+ // under a previous policy. This is the default value for the
446
+ // TRUST_CENTER_POLICY.
447
+ static ALLOW_PRECONFIGURED_KEY_JOINS = 0x01;
448
+ // Send the network key encrypted with the rejoining device's trust center
449
+ // link key. The trust center and any rejoining device are assumed to share
450
+ // a link key, either preconfigured or obtained under a previous policy. No
451
+ // new devices are allowed to join.
452
+ static ALLOW_REJOINS_ONLY = 0x02;
453
+ // Reject all unsecured join and rejoin attempts.
454
+ static DISALLOW_ALL_JOINS_AND_REJOINS = 0x03;
455
+ // Take no action on trust center rejoin attempts.
456
+ static IGNORE_TRUST_CENTER_REJOINS = 0x05;
457
+ // BINDING_MODIFICATION_POLICY default decision. Do not allow the local
458
+ // binding table to be changed by remote nodes.
459
+ static DISALLOW_BINDING_MODIFICATION = 0x10;
460
+ // BINDING_MODIFICATION_POLICY decision. Allow remote nodes to change
461
+ // the local binding table.
462
+ static ALLOW_BINDING_MODIFICATION = 0x11;
463
+ // BINDING_MODIFICATION_POLICY decision. Allows remote nodes to set local
464
+ // binding entries only if the entries correspond to endpoints defined on
465
+ // the device, and for output clusters bound to those endpoints.
466
+ static CHECK_BINDING_MODIFICATIONS_ARE_VALID_ENDPOINT_CLUSTERS = 0x12;
467
+ // UNICAST_REPLIES_POLICY default decision. The NCP will automatically send
468
+ // an empty reply (containing no payload) for every unicast received.
469
+ static HOST_WILL_NOT_SUPPLY_REPLY = 0x20;
470
+ // UNICAST_REPLIES_POLICY decision. The NCP will only send a reply if it
471
+ // receives a sendReply command from the Host.
472
+ static HOST_WILL_SUPPLY_REPLY = 0x21;
473
+ // POLL_HANDLER_POLICY default decision. Do not inform the Host when a child
474
+ // polls.
475
+ static POLL_HANDLER_IGNORE = 0x30;
476
+ // POLL_HANDLER_POLICY decision. Generate a pollHandler callback when a
477
+ // child polls.
478
+ static POLL_HANDLER_CALLBACK = 0x31;
479
+ // MESSAGE_CONTENTS_IN_CALLBACK_POLICY default decision. Include only the
480
+ // message tag in the messageSentHandler callback.
481
+ static MESSAGE_TAG_ONLY_IN_CALLBACK = 0x40;
482
+ // MESSAGE_CONTENTS_IN_CALLBACK_POLICY decision. Include both the message
483
+ // tag and the message contents in the messageSentHandler callback.
484
+ static MESSAGE_TAG_AND_CONTENTS_IN_CALLBACK = 0x41;
485
+ // TC_KEY_REQUEST_POLICY decision. When the Trust Center receives a request
486
+ // for a Trust Center link key, it will be ignored.
487
+ static DENY_TC_KEY_REQUESTS = 0x50;
488
+ // TC_KEY_REQUEST_POLICY decision. When the Trust Center receives a request
489
+ // for a Trust Center link key, it will reply to it with the corresponding
490
+ // key.
491
+ static ALLOW_TC_KEY_REQUESTS = 0x51;
492
+ // TC_KEY_REQUEST_POLICY decision. When the Trust Center receives a request
493
+ // for a Trust Center link key, it will generate a key to send to the
494
+ // joiner.
495
+ static GENERATE_NEW_TC_LINK_KEY = 0x52;
496
+ // APP_KEY_REQUEST_POLICY decision. When the Trust Center receives a request
497
+ // for an application link key, it will be ignored.
498
+ static DENY_APP_KEY_REQUESTS = 0x60;
499
+ // APP_KEY_REQUEST_POLICY decision. When the Trust Center receives a request
500
+ // for an application link key, it will randomly generate a key and send it
501
+ // to both partners.
502
+ static ALLOW_APP_KEY_REQUESTS = 0x61;
503
+ // Indicates that packet validate library checks are enabled on the NCP.
504
+ static PACKET_VALIDATE_LIBRARY_CHECKS_ENABLED = 0x62;
505
+ // Indicates that packet validate library checks are NOT enabled on the NCP.
506
+ static PACKET_VALIDATE_LIBRARY_CHECKS_DISABLED = 0x63;
482
507
  }
483
- exports.EzspDecisionId = EzspDecisionId;
484
- // Identifies a policy decision.
485
- // Send the network key in the clear to all joining and rejoining devices.
486
- EzspDecisionId.ALLOW_JOINS = 0x00;
487
- // Send the network key in the clear to all joining devices. Rejoining
488
- // devices are sent the network key encrypted with their trust center link
489
- // key. The trust center and any rejoining device are assumed to share a
490
- // link key, either preconfigured or obtained under a previous policy.
491
- EzspDecisionId.ALLOW_JOINS_REJOINS_HAVE_LINK_KEY = 0x04;
492
- // Send the network key encrypted with the joining or rejoining device's
493
- // trust center link key. The trust center and any joining or rejoining
494
- // device are assumed to share a link key, either preconfigured or obtained
495
- // under a previous policy. This is the default value for the
496
- // TRUST_CENTER_POLICY.
497
- EzspDecisionId.ALLOW_PRECONFIGURED_KEY_JOINS = 0x01;
498
- // Send the network key encrypted with the rejoining device's trust center
499
- // link key. The trust center and any rejoining device are assumed to share
500
- // a link key, either preconfigured or obtained under a previous policy. No
501
- // new devices are allowed to join.
502
- EzspDecisionId.ALLOW_REJOINS_ONLY = 0x02;
503
- // Reject all unsecured join and rejoin attempts.
504
- EzspDecisionId.DISALLOW_ALL_JOINS_AND_REJOINS = 0x03;
505
- // Take no action on trust center rejoin attempts.
506
- EzspDecisionId.IGNORE_TRUST_CENTER_REJOINS = 0x05;
507
- // BINDING_MODIFICATION_POLICY default decision. Do not allow the local
508
- // binding table to be changed by remote nodes.
509
- EzspDecisionId.DISALLOW_BINDING_MODIFICATION = 0x10;
510
- // BINDING_MODIFICATION_POLICY decision. Allow remote nodes to change
511
- // the local binding table.
512
- EzspDecisionId.ALLOW_BINDING_MODIFICATION = 0x11;
513
- // BINDING_MODIFICATION_POLICY decision. Allows remote nodes to set local
514
- // binding entries only if the entries correspond to endpoints defined on
515
- // the device, and for output clusters bound to those endpoints.
516
- EzspDecisionId.CHECK_BINDING_MODIFICATIONS_ARE_VALID_ENDPOINT_CLUSTERS = 0x12;
517
- // UNICAST_REPLIES_POLICY default decision. The NCP will automatically send
518
- // an empty reply (containing no payload) for every unicast received.
519
- EzspDecisionId.HOST_WILL_NOT_SUPPLY_REPLY = 0x20;
520
- // UNICAST_REPLIES_POLICY decision. The NCP will only send a reply if it
521
- // receives a sendReply command from the Host.
522
- EzspDecisionId.HOST_WILL_SUPPLY_REPLY = 0x21;
523
- // POLL_HANDLER_POLICY default decision. Do not inform the Host when a child
524
- // polls.
525
- EzspDecisionId.POLL_HANDLER_IGNORE = 0x30;
526
- // POLL_HANDLER_POLICY decision. Generate a pollHandler callback when a
527
- // child polls.
528
- EzspDecisionId.POLL_HANDLER_CALLBACK = 0x31;
529
- // MESSAGE_CONTENTS_IN_CALLBACK_POLICY default decision. Include only the
530
- // message tag in the messageSentHandler callback.
531
- EzspDecisionId.MESSAGE_TAG_ONLY_IN_CALLBACK = 0x40;
532
- // MESSAGE_CONTENTS_IN_CALLBACK_POLICY decision. Include both the message
533
- // tag and the message contents in the messageSentHandler callback.
534
- EzspDecisionId.MESSAGE_TAG_AND_CONTENTS_IN_CALLBACK = 0x41;
535
- // TC_KEY_REQUEST_POLICY decision. When the Trust Center receives a request
536
- // for a Trust Center link key, it will be ignored.
537
- EzspDecisionId.DENY_TC_KEY_REQUESTS = 0x50;
538
- // TC_KEY_REQUEST_POLICY decision. When the Trust Center receives a request
539
- // for a Trust Center link key, it will reply to it with the corresponding
540
- // key.
541
- EzspDecisionId.ALLOW_TC_KEY_REQUESTS = 0x51;
542
- // TC_KEY_REQUEST_POLICY decision. When the Trust Center receives a request
543
- // for a Trust Center link key, it will generate a key to send to the
544
- // joiner.
545
- EzspDecisionId.GENERATE_NEW_TC_LINK_KEY = 0x52;
546
- // APP_KEY_REQUEST_POLICY decision. When the Trust Center receives a request
547
- // for an application link key, it will be ignored.
548
- EzspDecisionId.DENY_APP_KEY_REQUESTS = 0x60;
549
- // APP_KEY_REQUEST_POLICY decision. When the Trust Center receives a request
550
- // for an application link key, it will randomly generate a key and send it
551
- // to both partners.
552
- EzspDecisionId.ALLOW_APP_KEY_REQUESTS = 0x61;
553
- // Indicates that packet validate library checks are enabled on the NCP.
554
- EzspDecisionId.PACKET_VALIDATE_LIBRARY_CHECKS_ENABLED = 0x62;
555
- // Indicates that packet validate library checks are NOT enabled on the NCP.
556
- EzspDecisionId.PACKET_VALIDATE_LIBRARY_CHECKS_DISABLED = 0x63;
557
- class EzspMfgTokenId extends basic.uint8_t {
508
+ export class EzspMfgTokenId extends basic.uint8_t {
509
+ // Manufacturing token IDs used by ezspGetMfgToken().
510
+ // Custom version (2 bytes).
511
+ static MFG_CUSTOM_VERSION = 0x00;
512
+ // Manufacturing string (16 bytes).
513
+ static MFG_STRING = 0x01;
514
+ // Board name (16 bytes).
515
+ static MFG_BOARD_NAME = 0x02;
516
+ // Manufacturing ID (2 bytes).
517
+ static MFG_MANUF_ID = 0x03;
518
+ // Radio configuration (2 bytes).
519
+ static MFG_PHY_CONFIG = 0x04;
520
+ // Bootload AES key (16 bytes).
521
+ static MFG_BOOTLOAD_AES_KEY = 0x05;
522
+ // ASH configuration (40 bytes).
523
+ static MFG_ASH_CONFIG = 0x06;
524
+ // EZSP storage (8 bytes).
525
+ static MFG_STORAGE = 0x07;
526
+ // Radio calibration data (64 bytes). 4 bytes are stored for each of the 16
527
+ // channels. This token is not stored in the Flash Information Area. It is
528
+ // updated by the stack each time a calibration is performed.
529
+ static STACK_CAL_DATA = 0x08;
530
+ // Certificate Based Key Exchange (CBKE) data (92 bytes).
531
+ static MFG_CBKE_DATA = 0x09;
532
+ // Installation code (20 bytes).
533
+ static MFG_INSTALLATION_CODE = 0x0A;
534
+ // Radio channel filter calibration data (1 byte). This token is not stored
535
+ // in the Flash Information Area. It is updated by the stack each time a
536
+ // calibration is performed.
537
+ static STACK_CAL_FILTER = 0x0B;
538
+ // Custom EUI64 MAC address (8 bytes).
539
+ static MFG_CUSTOM_EUI_64 = 0x0C;
540
+ // CTUNE value (2 byte).
541
+ static MFG_CTUNE = 0x0D;
558
542
  }
559
- exports.EzspMfgTokenId = EzspMfgTokenId;
560
- // Manufacturing token IDs used by ezspGetMfgToken().
561
- // Custom version (2 bytes).
562
- EzspMfgTokenId.MFG_CUSTOM_VERSION = 0x00;
563
- // Manufacturing string (16 bytes).
564
- EzspMfgTokenId.MFG_STRING = 0x01;
565
- // Board name (16 bytes).
566
- EzspMfgTokenId.MFG_BOARD_NAME = 0x02;
567
- // Manufacturing ID (2 bytes).
568
- EzspMfgTokenId.MFG_MANUF_ID = 0x03;
569
- // Radio configuration (2 bytes).
570
- EzspMfgTokenId.MFG_PHY_CONFIG = 0x04;
571
- // Bootload AES key (16 bytes).
572
- EzspMfgTokenId.MFG_BOOTLOAD_AES_KEY = 0x05;
573
- // ASH configuration (40 bytes).
574
- EzspMfgTokenId.MFG_ASH_CONFIG = 0x06;
575
- // EZSP storage (8 bytes).
576
- EzspMfgTokenId.MFG_STORAGE = 0x07;
577
- // Radio calibration data (64 bytes). 4 bytes are stored for each of the 16
578
- // channels. This token is not stored in the Flash Information Area. It is
579
- // updated by the stack each time a calibration is performed.
580
- EzspMfgTokenId.STACK_CAL_DATA = 0x08;
581
- // Certificate Based Key Exchange (CBKE) data (92 bytes).
582
- EzspMfgTokenId.MFG_CBKE_DATA = 0x09;
583
- // Installation code (20 bytes).
584
- EzspMfgTokenId.MFG_INSTALLATION_CODE = 0x0A;
585
- // Radio channel filter calibration data (1 byte). This token is not stored
586
- // in the Flash Information Area. It is updated by the stack each time a
587
- // calibration is performed.
588
- EzspMfgTokenId.STACK_CAL_FILTER = 0x0B;
589
- // Custom EUI64 MAC address (8 bytes).
590
- EzspMfgTokenId.MFG_CUSTOM_EUI_64 = 0x0C;
591
- // CTUNE value (2 byte).
592
- EzspMfgTokenId.MFG_CTUNE = 0x0D;
593
- class EzspStatus extends basic.uint8_t {
543
+ export class EzspStatus extends basic.uint8_t {
544
+ // Status values used by EZSP.
545
+ // Success.
546
+ static SUCCESS = 0x00;
547
+ // Fatal error.
548
+ static SPI_ERR_FATAL = 0x10;
549
+ // The Response frame of the current transaction indicates the NCP has
550
+ // reset.
551
+ static SPI_ERR_NCP_RESET = 0x11;
552
+ // The NCP is reporting that the Command frame of the current transaction is
553
+ // oversized (the length byte is too large).
554
+ static SPI_ERR_OVERSIZED_FRAME = 0x12;
555
+ // The Response frame of the current transaction indicates the previous
556
+ // transaction was aborted (nSSEL deasserted too soon).
557
+ static SPI_ERR_ABORTED_TRANSACTION = 0x13;
558
+ // The Response frame of the current transaction indicates the frame
559
+ // terminator is missing from the Command frame.
560
+ static SPI_ERR_MISSING_FRAME_TERMINATOR = 0x14;
561
+ // The NCP has not provided a Response within the time limit defined by
562
+ // WAIT_SECTION_TIMEOUT.
563
+ static SPI_ERR_WAIT_SECTION_TIMEOUT = 0x15;
564
+ // The Response frame from the NCP is missing the frame terminator.
565
+ static SPI_ERR_NO_FRAME_TERMINATOR = 0x16;
566
+ // The Host attempted to send an oversized Command (the length byte is too
567
+ // large) and the AVR's spi-protocol.c blocked the transmission.
568
+ static SPI_ERR_COMMAND_OVERSIZED = 0x17;
569
+ // The NCP attempted to send an oversized Response (the length byte is too
570
+ // large) and the AVR's spi-protocol.c blocked the reception.
571
+ static SPI_ERR_RESPONSE_OVERSIZED = 0x18;
572
+ // The Host has sent the Command and is still waiting for the NCP to send a
573
+ // Response.
574
+ static SPI_WAITING_FOR_RESPONSE = 0x19;
575
+ // The NCP has not asserted nHOST_INT within the time limit defined by
576
+ // WAKE_HANDSHAKE_TIMEOUT.
577
+ static SPI_ERR_HANDSHAKE_TIMEOUT = 0x1A;
578
+ // The NCP has not asserted nHOST_INT after an NCP reset within the time
579
+ // limit defined by STARTUP_TIMEOUT.
580
+ static SPI_ERR_STARTUP_TIMEOUT = 0x1B;
581
+ // The Host attempted to verify the SPI Protocol activity and version
582
+ // number, and the verification failed.
583
+ static SPI_ERR_STARTUP_FAIL = 0x1C;
584
+ // The Host has sent a command with a SPI Byte that is unsupported by the
585
+ // current mode the NCP is operating in.
586
+ static SPI_ERR_UNSUPPORTED_SPI_COMMAND = 0x1D;
587
+ // Operation not yet complete.
588
+ static ASH_IN_PROGRESS = 0x20;
589
+ // Fatal error detected by host.
590
+ static HOST_FATAL_ERROR = 0x21;
591
+ // Fatal error detected by NCP.
592
+ static ASH_NCP_FATAL_ERROR = 0x22;
593
+ // Tried to send DATA frame too long.
594
+ static DATA_FRAME_TOO_LONG = 0x23;
595
+ // Tried to send DATA frame too short.
596
+ static DATA_FRAME_TOO_SHORT = 0x24;
597
+ // No space for tx'ed DATA frame.
598
+ static NO_TX_SPACE = 0x25;
599
+ // No space for rec'd DATA frame.
600
+ static NO_RX_SPACE = 0x26;
601
+ // No receive data available.
602
+ static NO_RX_DATA = 0x27;
603
+ // Not in Connected state.
604
+ static NOT_CONNECTED = 0x28;
605
+ // The NCP received a command before the EZSP version had been set.
606
+ static ERROR_VERSION_NOT_SET = 0x30;
607
+ // The NCP received a command containing an unsupported frame ID.
608
+ static ERROR_INVALID_FRAME_ID = 0x31;
609
+ // The direction flag in the frame control field was incorrect.
610
+ static ERROR_WRONG_DIRECTION = 0x32;
611
+ // The truncated flag in the frame control field was set, indicating there
612
+ // was not enough memory available to complete the response or that the
613
+ // response would have exceeded the maximum EZSP frame length.
614
+ static ERROR_TRUNCATED = 0x33;
615
+ // The overflow flag in the frame control field was set, indicating one or
616
+ // more callbacks occurred since the previous response and there was not
617
+ // enough memory available to report them to the Host.
618
+ static ERROR_OVERFLOW = 0x34;
619
+ // Insufficient memory was available.
620
+ static ERROR_OUT_OF_MEMORY = 0x35;
621
+ // The value was out of bounds.
622
+ static ERROR_INVALID_VALUE = 0x36;
623
+ // The configuration id was not recognized.
624
+ static ERROR_INVALID_ID = 0x37;
625
+ // Configuration values can no longer be modified.
626
+ static ERROR_INVALID_CALL = 0x38;
627
+ // The NCP failed to respond to a command.
628
+ static ERROR_NO_RESPONSE = 0x39;
629
+ // The length of the command exceeded the maximum EZSP frame length.
630
+ static ERROR_COMMAND_TOO_LONG = 0x40;
631
+ // The UART receive queue was full causing a callback response to be
632
+ // dropped.
633
+ static ERROR_QUEUE_FULL = 0x41;
634
+ // The command has been filtered out by NCP.
635
+ static ERROR_COMMAND_FILTERED = 0x42;
636
+ // EZSP Security Key is already set
637
+ static ERROR_SECURITY_KEY_ALREADY_SET = 0x43;
638
+ // EZSP Security Type is invalid
639
+ static ERROR_SECURITY_TYPE_INVALID = 0x44;
640
+ // EZSP Security Parameters are invalid
641
+ static ERROR_SECURITY_PARAMETERS_INVALID = 0x45;
642
+ // EZSP Security Parameters are already set
643
+ static ERROR_SECURITY_PARAMETERS_ALREADY_SET = 0x46;
644
+ // EZSP Security Key is not set
645
+ static ERROR_SECURITY_KEY_NOT_SET = 0x47;
646
+ // EZSP Security Parameters are not set
647
+ static ERROR_SECURITY_PARAMETERS_NOT_SET = 0x48;
648
+ // Received frame with unsupported control byte
649
+ static ERROR_UNSUPPORTED_CONTROL = 0x49;
650
+ // Received frame is unsecure, when security is established
651
+ static ERROR_UNSECURE_FRAME = 0x4A;
652
+ // Incompatible ASH version
653
+ static ASH_ERROR_VERSION = 0x50;
654
+ // Exceeded max ACK timeouts
655
+ static ASH_ERROR_TIMEOUTS = 0x51;
656
+ // Timed out waiting for RSTACK
657
+ static ASH_ERROR_RESET_FAIL = 0x52;
658
+ // Unexpected ncp reset
659
+ static ASH_ERROR_NCP_RESET = 0x53;
660
+ // Serial port initialization failed
661
+ static ERROR_SERIAL_INIT = 0x54;
662
+ // Invalid ncp processor type
663
+ static ASH_ERROR_NCP_TYPE = 0x55;
664
+ // Invalid ncp reset method
665
+ static ASH_ERROR_RESET_METHOD = 0x56;
666
+ // XON/XOFF not supported by host driver
667
+ static ASH_ERROR_XON_XOFF = 0x57;
668
+ // ASH protocol started
669
+ static ASH_STARTED = 0x70;
670
+ // ASH protocol connected
671
+ static ASH_CONNECTED = 0x71;
672
+ // ASH protocol disconnected
673
+ static ASH_DISCONNECTED = 0x72;
674
+ // Timer expired waiting for ack
675
+ static ASH_ACK_TIMEOUT = 0x73;
676
+ // Frame in progress cancelled
677
+ static ASH_CANCELLED = 0x74;
678
+ // Received frame out of sequence
679
+ static ASH_OUT_OF_SEQUENCE = 0x75;
680
+ // Received frame with CRC error
681
+ static ASH_BAD_CRC = 0x76;
682
+ // Received frame with comm error
683
+ static ASH_COMM_ERROR = 0x77;
684
+ // Received frame with bad ackNum
685
+ static ASH_BAD_ACKNUM = 0x78;
686
+ // Received frame shorter than minimum
687
+ static ASH_TOO_SHORT = 0x79;
688
+ // Received frame longer than maximum
689
+ static ASH_TOO_LONG = 0x7A;
690
+ // Received frame with illegal control byte
691
+ static ASH_BAD_CONTROL = 0x7B;
692
+ // Received frame with illegal length for its type
693
+ static ASH_BAD_LENGTH = 0x7C;
694
+ // Received ASH Ack
695
+ static ASH_ACK_RECEIVED = 0x7D;
696
+ // Sent ASH Ack
697
+ static ASH_ACK_SENT = 0x7E;
698
+ // No reset or error
699
+ static NO_ERROR = 0xFF;
594
700
  }
595
- exports.EzspStatus = EzspStatus;
596
- // Status values used by EZSP.
597
- // Success.
598
- EzspStatus.SUCCESS = 0x00;
599
- // Fatal error.
600
- EzspStatus.SPI_ERR_FATAL = 0x10;
601
- // The Response frame of the current transaction indicates the NCP has
602
- // reset.
603
- EzspStatus.SPI_ERR_NCP_RESET = 0x11;
604
- // The NCP is reporting that the Command frame of the current transaction is
605
- // oversized (the length byte is too large).
606
- EzspStatus.SPI_ERR_OVERSIZED_FRAME = 0x12;
607
- // The Response frame of the current transaction indicates the previous
608
- // transaction was aborted (nSSEL deasserted too soon).
609
- EzspStatus.SPI_ERR_ABORTED_TRANSACTION = 0x13;
610
- // The Response frame of the current transaction indicates the frame
611
- // terminator is missing from the Command frame.
612
- EzspStatus.SPI_ERR_MISSING_FRAME_TERMINATOR = 0x14;
613
- // The NCP has not provided a Response within the time limit defined by
614
- // WAIT_SECTION_TIMEOUT.
615
- EzspStatus.SPI_ERR_WAIT_SECTION_TIMEOUT = 0x15;
616
- // The Response frame from the NCP is missing the frame terminator.
617
- EzspStatus.SPI_ERR_NO_FRAME_TERMINATOR = 0x16;
618
- // The Host attempted to send an oversized Command (the length byte is too
619
- // large) and the AVR's spi-protocol.c blocked the transmission.
620
- EzspStatus.SPI_ERR_COMMAND_OVERSIZED = 0x17;
621
- // The NCP attempted to send an oversized Response (the length byte is too
622
- // large) and the AVR's spi-protocol.c blocked the reception.
623
- EzspStatus.SPI_ERR_RESPONSE_OVERSIZED = 0x18;
624
- // The Host has sent the Command and is still waiting for the NCP to send a
625
- // Response.
626
- EzspStatus.SPI_WAITING_FOR_RESPONSE = 0x19;
627
- // The NCP has not asserted nHOST_INT within the time limit defined by
628
- // WAKE_HANDSHAKE_TIMEOUT.
629
- EzspStatus.SPI_ERR_HANDSHAKE_TIMEOUT = 0x1A;
630
- // The NCP has not asserted nHOST_INT after an NCP reset within the time
631
- // limit defined by STARTUP_TIMEOUT.
632
- EzspStatus.SPI_ERR_STARTUP_TIMEOUT = 0x1B;
633
- // The Host attempted to verify the SPI Protocol activity and version
634
- // number, and the verification failed.
635
- EzspStatus.SPI_ERR_STARTUP_FAIL = 0x1C;
636
- // The Host has sent a command with a SPI Byte that is unsupported by the
637
- // current mode the NCP is operating in.
638
- EzspStatus.SPI_ERR_UNSUPPORTED_SPI_COMMAND = 0x1D;
639
- // Operation not yet complete.
640
- EzspStatus.ASH_IN_PROGRESS = 0x20;
641
- // Fatal error detected by host.
642
- EzspStatus.HOST_FATAL_ERROR = 0x21;
643
- // Fatal error detected by NCP.
644
- EzspStatus.ASH_NCP_FATAL_ERROR = 0x22;
645
- // Tried to send DATA frame too long.
646
- EzspStatus.DATA_FRAME_TOO_LONG = 0x23;
647
- // Tried to send DATA frame too short.
648
- EzspStatus.DATA_FRAME_TOO_SHORT = 0x24;
649
- // No space for tx'ed DATA frame.
650
- EzspStatus.NO_TX_SPACE = 0x25;
651
- // No space for rec'd DATA frame.
652
- EzspStatus.NO_RX_SPACE = 0x26;
653
- // No receive data available.
654
- EzspStatus.NO_RX_DATA = 0x27;
655
- // Not in Connected state.
656
- EzspStatus.NOT_CONNECTED = 0x28;
657
- // The NCP received a command before the EZSP version had been set.
658
- EzspStatus.ERROR_VERSION_NOT_SET = 0x30;
659
- // The NCP received a command containing an unsupported frame ID.
660
- EzspStatus.ERROR_INVALID_FRAME_ID = 0x31;
661
- // The direction flag in the frame control field was incorrect.
662
- EzspStatus.ERROR_WRONG_DIRECTION = 0x32;
663
- // The truncated flag in the frame control field was set, indicating there
664
- // was not enough memory available to complete the response or that the
665
- // response would have exceeded the maximum EZSP frame length.
666
- EzspStatus.ERROR_TRUNCATED = 0x33;
667
- // The overflow flag in the frame control field was set, indicating one or
668
- // more callbacks occurred since the previous response and there was not
669
- // enough memory available to report them to the Host.
670
- EzspStatus.ERROR_OVERFLOW = 0x34;
671
- // Insufficient memory was available.
672
- EzspStatus.ERROR_OUT_OF_MEMORY = 0x35;
673
- // The value was out of bounds.
674
- EzspStatus.ERROR_INVALID_VALUE = 0x36;
675
- // The configuration id was not recognized.
676
- EzspStatus.ERROR_INVALID_ID = 0x37;
677
- // Configuration values can no longer be modified.
678
- EzspStatus.ERROR_INVALID_CALL = 0x38;
679
- // The NCP failed to respond to a command.
680
- EzspStatus.ERROR_NO_RESPONSE = 0x39;
681
- // The length of the command exceeded the maximum EZSP frame length.
682
- EzspStatus.ERROR_COMMAND_TOO_LONG = 0x40;
683
- // The UART receive queue was full causing a callback response to be
684
- // dropped.
685
- EzspStatus.ERROR_QUEUE_FULL = 0x41;
686
- // The command has been filtered out by NCP.
687
- EzspStatus.ERROR_COMMAND_FILTERED = 0x42;
688
- // EZSP Security Key is already set
689
- EzspStatus.ERROR_SECURITY_KEY_ALREADY_SET = 0x43;
690
- // EZSP Security Type is invalid
691
- EzspStatus.ERROR_SECURITY_TYPE_INVALID = 0x44;
692
- // EZSP Security Parameters are invalid
693
- EzspStatus.ERROR_SECURITY_PARAMETERS_INVALID = 0x45;
694
- // EZSP Security Parameters are already set
695
- EzspStatus.ERROR_SECURITY_PARAMETERS_ALREADY_SET = 0x46;
696
- // EZSP Security Key is not set
697
- EzspStatus.ERROR_SECURITY_KEY_NOT_SET = 0x47;
698
- // EZSP Security Parameters are not set
699
- EzspStatus.ERROR_SECURITY_PARAMETERS_NOT_SET = 0x48;
700
- // Received frame with unsupported control byte
701
- EzspStatus.ERROR_UNSUPPORTED_CONTROL = 0x49;
702
- // Received frame is unsecure, when security is established
703
- EzspStatus.ERROR_UNSECURE_FRAME = 0x4A;
704
- // Incompatible ASH version
705
- EzspStatus.ASH_ERROR_VERSION = 0x50;
706
- // Exceeded max ACK timeouts
707
- EzspStatus.ASH_ERROR_TIMEOUTS = 0x51;
708
- // Timed out waiting for RSTACK
709
- EzspStatus.ASH_ERROR_RESET_FAIL = 0x52;
710
- // Unexpected ncp reset
711
- EzspStatus.ASH_ERROR_NCP_RESET = 0x53;
712
- // Serial port initialization failed
713
- EzspStatus.ERROR_SERIAL_INIT = 0x54;
714
- // Invalid ncp processor type
715
- EzspStatus.ASH_ERROR_NCP_TYPE = 0x55;
716
- // Invalid ncp reset method
717
- EzspStatus.ASH_ERROR_RESET_METHOD = 0x56;
718
- // XON/XOFF not supported by host driver
719
- EzspStatus.ASH_ERROR_XON_XOFF = 0x57;
720
- // ASH protocol started
721
- EzspStatus.ASH_STARTED = 0x70;
722
- // ASH protocol connected
723
- EzspStatus.ASH_CONNECTED = 0x71;
724
- // ASH protocol disconnected
725
- EzspStatus.ASH_DISCONNECTED = 0x72;
726
- // Timer expired waiting for ack
727
- EzspStatus.ASH_ACK_TIMEOUT = 0x73;
728
- // Frame in progress cancelled
729
- EzspStatus.ASH_CANCELLED = 0x74;
730
- // Received frame out of sequence
731
- EzspStatus.ASH_OUT_OF_SEQUENCE = 0x75;
732
- // Received frame with CRC error
733
- EzspStatus.ASH_BAD_CRC = 0x76;
734
- // Received frame with comm error
735
- EzspStatus.ASH_COMM_ERROR = 0x77;
736
- // Received frame with bad ackNum
737
- EzspStatus.ASH_BAD_ACKNUM = 0x78;
738
- // Received frame shorter than minimum
739
- EzspStatus.ASH_TOO_SHORT = 0x79;
740
- // Received frame longer than maximum
741
- EzspStatus.ASH_TOO_LONG = 0x7A;
742
- // Received frame with illegal control byte
743
- EzspStatus.ASH_BAD_CONTROL = 0x7B;
744
- // Received frame with illegal length for its type
745
- EzspStatus.ASH_BAD_LENGTH = 0x7C;
746
- // Received ASH Ack
747
- EzspStatus.ASH_ACK_RECEIVED = 0x7D;
748
- // Sent ASH Ack
749
- EzspStatus.ASH_ACK_SENT = 0x7E;
750
- // No reset or error
751
- EzspStatus.NO_ERROR = 0xFF;
752
- class EmberStatus extends basic.uint8_t {
701
+ export class EmberStatus extends basic.uint8_t {
702
+ // Return type for stack functions.
703
+ // The generic 'no error' message.
704
+ static SUCCESS = 0x00;
705
+ // The generic 'fatal error' message.
706
+ static ERR_FATAL = 0x01;
707
+ // An invalid value was passed as an argument to a function
708
+ static BAD_ARGUMENT = 0x02;
709
+ // The manufacturing and stack token format in nonvolatile memory is
710
+ // different than what the stack expects (returned at initialization).
711
+ static EEPROM_MFG_STACK_VERSION_MISMATCH = 0x04;
712
+ // The static memory definitions in ember-staticmemory.h are incompatible
713
+ // with this stack version.
714
+ static INCOMPATIBLE_STATIC_MEMORY_DEFINITIONS = 0x05;
715
+ // The manufacturing token format in non-volatile memory is different than
716
+ // what the stack expects (returned at initialization).
717
+ static EEPROM_MFG_VERSION_MISMATCH = 0x06;
718
+ // The stack token format in non-volatile memory is different than what the
719
+ // stack expects (returned at initialization).
720
+ static EEPROM_STACK_VERSION_MISMATCH = 0x07;
721
+ // There are no more buffers.
722
+ static NO_BUFFERS = 0x18;
723
+ // Specified an invalid baud rate.
724
+ static SERIAL_INVALID_BAUD_RATE = 0x20;
725
+ // Specified an invalid serial port.
726
+ static SERIAL_INVALID_PORT = 0x21;
727
+ // Tried to send too much data.
728
+ static SERIAL_TX_OVERFLOW = 0x22;
729
+ // There was not enough space to store a received character and the
730
+ // character was dropped.
731
+ static SERIAL_RX_OVERFLOW = 0x23;
732
+ // Detected a UART framing error.
733
+ static SERIAL_RX_FRAME_ERROR = 0x24;
734
+ // Detected a UART parity error.
735
+ static SERIAL_RX_PARITY_ERROR = 0x25;
736
+ // There is no received data to process.
737
+ static SERIAL_RX_EMPTY = 0x26;
738
+ // The receive interrupt was not handled in time, and a character was
739
+ // dropped.
740
+ static SERIAL_RX_OVERRUN_ERROR = 0x27;
741
+ // The MAC transmit queue is full.
742
+ static MAC_TRANSMIT_QUEUE_FULL = 0x39;
743
+ // MAC header FCR error on receive.
744
+ static MAC_UNKNOWN_HEADER_TYPE = 0x3A;
745
+ // The MAC can't complete this task because it is scanning.
746
+ static MAC_SCANNING = 0x3D;
747
+ // No pending data exists for device doing a data poll.
748
+ static MAC_NO_DATA = 0x31;
749
+ // Attempt to scan when we are joined to a network.
750
+ static MAC_JOINED_NETWORK = 0x32;
751
+ // Scan duration must be 0 to 14 inclusive. Attempt was made to scan with an
752
+ // incorrect duration value.
753
+ static MAC_BAD_SCAN_DURATION = 0x33;
754
+ // emberStartScan was called with an incorrect scan type.
755
+ static MAC_INCORRECT_SCAN_TYPE = 0x34;
756
+ // emberStartScan was called with an invalid channel mask.
757
+ static MAC_INVALID_CHANNEL_MASK = 0x35;
758
+ // Failed to scan current channel because we were unable to transmit the
759
+ // relevant MAC command.
760
+ static MAC_COMMAND_TRANSMIT_FAILURE = 0x36;
761
+ // We expected to receive an ACK following the transmission, but the MAC
762
+ // level ACK was never received.
763
+ static MAC_NO_ACK_RECEIVED = 0x40;
764
+ // Indirect data message timed out before polled.
765
+ static MAC_INDIRECT_TIMEOUT = 0x42;
766
+ // The Simulated EEPROM is telling the application that there is at least
767
+ // one flash page to be erased. The GREEN status means the current page has
768
+ // not filled above the ERASE_CRITICAL_THRESHOLD. The application should
769
+ // call the function halSimEepromErasePage when it can to erase a page.
770
+ static SIM_EEPROM_ERASE_PAGE_GREEN = 0x43;
771
+ // The Simulated EEPROM is telling the application that there is at least
772
+ // one flash page to be erased. The RED status means the current page has
773
+ // filled above the ERASE_CRITICAL_THRESHOLD. Due to the shrinking
774
+ // availability of write space, there is a danger of data loss. The
775
+ // application must call the function halSimEepromErasePage as soon as
776
+ // possible to erase a page.
777
+ static SIM_EEPROM_ERASE_PAGE_RED = 0x44;
778
+ // The Simulated EEPROM has run out of room to write any new data and the
779
+ // data trying to be set has been lost. This error code is the result of
780
+ // ignoring the SIM_EEPROM_ERASE_PAGE_RED error code. The application must
781
+ // call the function halSimEepromErasePage to make room for any further
782
+ // calls to set a token.
783
+ static SIM_EEPROM_FULL = 0x45;
784
+ // A fatal error has occurred while trying to write data to the Flash. The
785
+ // target memory attempting to be programmed is already programmed. The
786
+ // flash write routines were asked to flip a bit from a 0 to 1, which is
787
+ // physically impossible and the write was therefore inhibited. The data in
788
+ // the flash cannot be trusted after this error.
789
+ static ERR_FLASH_WRITE_INHIBITED = 0x46;
790
+ // A fatal error has occurred while trying to write data to the Flash and
791
+ // the write verification has failed. The data in the flash cannot be
792
+ // trusted after this error, and it is possible this error is the result of
793
+ // exceeding the life cycles of the flash.
794
+ static ERR_FLASH_VERIFY_FAILED = 0x47;
795
+ // Attempt 1 to initialize the Simulated EEPROM has failed. This failure
796
+ // means the information already stored in Flash (or a lack thereof), is
797
+ // fatally incompatible with the token information compiled into the code
798
+ // image being run.
799
+ static SIM_EEPROM_INIT_1_FAILED = 0x48;
800
+ // Attempt 2 to initialize the Simulated EEPROM has failed. This failure
801
+ // means Attempt 1 failed, and the token system failed to properly reload
802
+ // default tokens and reset the Simulated EEPROM.
803
+ static SIM_EEPROM_INIT_2_FAILED = 0x49;
804
+ // Attempt 3 to initialize the Simulated EEPROM has failed. This failure
805
+ // means one or both of the tokens TOKEN_MFG_NVDATA_VERSION or
806
+ // TOKEN_STACK_NVDATA_VERSION were incorrect and the token system failed to
807
+ // properly reload default tokens and reset the Simulated EEPROM.
808
+ static SIM_EEPROM_INIT_3_FAILED = 0x4A;
809
+ // A fatal error has occurred while trying to write data to the flash,
810
+ // possibly due to write protection or an invalid address. The data in the
811
+ // flash cannot be trusted after this error, and it is possible this error
812
+ // is the result of exceeding the life cycles of the flash.
813
+ static ERR_FLASH_PROG_FAIL = 0x4B;
814
+ // A fatal error has occurred while trying to erase flash, possibly due to
815
+ // write protection. The data in the flash cannot be trusted after this
816
+ // error, and it is possible this error is the result of exceeding the life
817
+ // cycles of the flash.
818
+ static ERR_FLASH_ERASE_FAIL = 0x4C;
819
+ // The bootloader received an invalid message (failed attempt to go into
820
+ // bootloader).
821
+ static ERR_BOOTLOADER_TRAP_TABLE_BAD = 0x58;
822
+ // Bootloader received an invalid message (failed attempt to go into
823
+ // bootloader).
824
+ static ERR_BOOTLOADER_TRAP_UNKNOWN = 0x59;
825
+ // The bootloader cannot complete the bootload operation because either an
826
+ // image was not found or the image exceeded memory bounds.
827
+ static ERR_BOOTLOADER_NO_IMAGE = 0x5A;
828
+ // The APS layer attempted to send or deliver a message, but it failed.
829
+ static DELIVERY_FAILED = 0x66;
830
+ // This binding index is out of range of the current binding table.
831
+ static BINDING_INDEX_OUT_OF_RANGE = 0x69;
832
+ // This address table index is out of range for the current address table.
833
+ static ADDRESS_TABLE_INDEX_OUT_OF_RANGE = 0x6A;
834
+ // An invalid binding table index was given to a function.
835
+ static INVALID_BINDING_INDEX = 0x6C;
836
+ // The API call is not allowed given the current state of the stack.
837
+ static INVALID_CALL = 0x70;
838
+ // The link cost to a node is not known.
839
+ static COST_NOT_KNOWN = 0x71;
840
+ // The maximum number of in-flight messages (i.e.
841
+ // APS_UNICAST_MESSAGE_COUNT) has been reached.
842
+ static MAX_MESSAGE_LIMIT_REACHED = 0x72;
843
+ // The message to be transmitted is too big to fit into a single over-the-
844
+ // air packet.
845
+ static MESSAGE_TOO_LONG = 0x74;
846
+ // The application is trying to delete or overwrite a binding that is in
847
+ // use.
848
+ static BINDING_IS_ACTIVE = 0x75;
849
+ // The application is trying to overwrite an address table entry that is in
850
+ // use.
851
+ static ADDRESS_TABLE_ENTRY_IS_ACTIVE = 0x76;
852
+ // Conversion is complete.
853
+ static ADC_CONVERSION_DONE = 0x80;
854
+ // Conversion cannot be done because a request is being processed.
855
+ static ADC_CONVERSION_BUSY = 0x81;
856
+ // Conversion is deferred until the current request has been processed.
857
+ static ADC_CONVERSION_DEFERRED = 0x82;
858
+ // No results are pending.
859
+ static ADC_NO_CONVERSION_PENDING = 0x84;
860
+ // Sleeping (for a duration) has been abnormally interrupted and exited
861
+ // prematurely.
862
+ static SLEEP_INTERRUPTED = 0x85;
863
+ // The transmit hardware buffer underflowed.
864
+ static PHY_TX_UNDERFLOW = 0x88;
865
+ // The transmit hardware did not finish transmitting a packet.
866
+ static PHY_TX_INCOMPLETE = 0x89;
867
+ // An unsupported channel setting was specified.
868
+ static PHY_INVALID_CHANNEL = 0x8A;
869
+ // An unsupported power setting was specified.
870
+ static PHY_INVALID_POWER = 0x8B;
871
+ // The packet cannot be transmitted because the physical MAC layer is
872
+ // currently transmitting a packet. (This is used for the MAC backoff
873
+ // algorithm.) PHY_TX_CCA_FAIL 0x8D The transmit attempt failed because all
874
+ // CCA attempts indicated that the channel was busy
875
+ static PHY_TX_BUSY = 0x8C;
876
+ // The software installed on the hardware doesn't recognize the hardware
877
+ // radio type.
878
+ static PHY_OSCILLATOR_CHECK_FAILED = 0x8E;
879
+ // The expected ACK was received after the last transmission.
880
+ static PHY_ACK_RECEIVED = 0x8F;
881
+ // The stack software has completed initialization and is ready to send and
882
+ // receive packets over the air.
883
+ static NETWORK_UP = 0x90;
884
+ // The network is not operating.
885
+ static NETWORK_DOWN = 0x91;
886
+ // An attempt to join a network failed.
887
+ static JOIN_FAILED = 0x94;
888
+ // After moving, a mobile node's attempt to re-establish contact with the
889
+ // network failed.
890
+ static MOVE_FAILED = 0x96;
891
+ // An attempt to join as a router failed due to a ZigBee versus ZigBee Pro
892
+ // incompatibility. ZigBee devices joining ZigBee Pro networks (or vice
893
+ // versa) must join as End Devices, not Routers.
894
+ static CANNOT_JOIN_AS_ROUTER = 0x98;
895
+ // The local node ID has changed. The application can obtain the new node ID
896
+ // by calling emberGetNodeId().
897
+ static NODE_ID_CHANGED = 0x99;
898
+ // The local PAN ID has changed. The application can obtain the new PAN ID
899
+ // by calling emberGetPanId().
900
+ static PAN_ID_CHANGED = 0x9A;
901
+ // An attempt to join or rejoin the network failed because no router beacons
902
+ // could be heard by the joining node.
903
+ static NO_BEACONS = 0xAB;
904
+ // An attempt was made to join a Secured Network using a pre-configured key,
905
+ // but the Trust Center sent back a Network Key in-the-clear when an
906
+ // encrypted Network Key was required.
907
+ static RECEIVED_KEY_IN_THE_CLEAR = 0xAC;
908
+ // An attempt was made to join a Secured Network, but the device did not
909
+ // receive a Network Key.
910
+ static NO_NETWORK_KEY_RECEIVED = 0xAD;
911
+ // After a device joined a Secured Network, a Link Key was requested but no
912
+ // response was ever received.
913
+ static NO_LINK_KEY_RECEIVED = 0xAE;
914
+ // An attempt was made to join a Secured Network without a pre-configured
915
+ // key, but the Trust Center sent encrypted data using a pre-configured key.
916
+ static PRECONFIGURED_KEY_REQUIRED = 0xAF;
917
+ // The node has not joined a network.
918
+ static NOT_JOINED = 0x93;
919
+ // The chosen security level (the value of SECURITY_LEVEL) is not supported
920
+ // by the stack.
921
+ static INVALID_SECURITY_LEVEL = 0x95;
922
+ // A message cannot be sent because the network is currently overloaded.
923
+ static NETWORK_BUSY = 0xA1;
924
+ // The application tried to send a message using an endpoint that it has not
925
+ // defined.
926
+ static INVALID_ENDPOINT = 0xA3;
927
+ // The application tried to use a binding that has been remotely modified
928
+ // and the change has not yet been reported to the application.
929
+ static BINDING_HAS_CHANGED = 0xA4;
930
+ // An attempt to generate random bytes failed because of insufficient random
931
+ // data from the radio.
932
+ static INSUFFICIENT_RANDOM_DATA = 0xA5;
933
+ // There was an error in trying to encrypt at the APS Level. This could
934
+ // result from either an inability to determine the long address of the
935
+ // recipient from the short address (no entry in the binding table) or there
936
+ // is no link key entry in the table associated with the destination, or
937
+ // there was a failure to load the correct key into the encryption core.
938
+ // TRUST_CENTER_MASTER_KEY_NOT_SET 0xA7 There was an attempt to form a
939
+ // network using commercial security without setting the Trust Center master
940
+ // key first.
941
+ static APS_ENCRYPTION_ERROR = 0xA6;
942
+ // There was an attempt to form or join a network with security without
943
+ // calling emberSetInitialSecurityState() first.
944
+ static SECURITY_STATE_NOT_SET = 0xA8;
945
+ // There was an attempt to set an entry in the key table using an invalid
946
+ // long address. An entry cannot be set using either the local device's or
947
+ // Trust Center's IEEE address. Or an entry already exists in the table with
948
+ // the same IEEE address. An Address of all zeros or all F's are not valid
949
+ // addresses in 802.15.4.
950
+ static KEY_TABLE_INVALID_ADDRESS = 0xB3;
951
+ // There was an attempt to set a security configuration that is not valid
952
+ // given the other security settings.
953
+ static SECURITY_CONFIGURATION_INVALID = 0xB7;
954
+ // There was an attempt to broadcast a key switch too quickly after
955
+ // broadcasting the next network key. The Trust Center must wait at least a
956
+ // period equal to the broadcast timeout so that all routers have a chance
957
+ // to receive the broadcast of the new network key.
958
+ static TOO_SOON_FOR_SWITCH_KEY = 0xB8;
959
+ // The message could not be sent because the link key corresponding to the
960
+ // destination is not authorized for use in APS data messages. APS Commands
961
+ // (sent by the stack) are allowed. To use it for encryption of APS data
962
+ // messages it must be authorized using a key agreement protocol (such as
963
+ // CBKE).
964
+ static KEY_NOT_AUTHORIZED = 0xBB;
965
+ // The security data provided was not valid, or an integrity check failed.
966
+ static SECURITY_DATA_INVALID = 0xBD;
967
+ // A ZigBee route error command frame was received indicating that a source
968
+ // routed message from this node failed en route.
969
+ static SOURCE_ROUTE_FAILURE = 0xA9;
970
+ // A ZigBee route error command frame was received indicating that a message
971
+ // sent to this node along a many-to-one route failed en route. The route
972
+ // error frame was delivered by an ad-hoc search for a functioning route.
973
+ static MANY_TO_ONE_ROUTE_FAILURE = 0xAA;
974
+ // A critical and fatal error indicating that the version of the stack
975
+ // trying to run does not match with the chip it is running on. The software
976
+ // (stack) on the chip must be replaced with software that is compatible
977
+ // with the chip.
978
+ static STACK_AND_HARDWARE_MISMATCH = 0xB0;
979
+ // An index was passed into the function that was larger than the valid
980
+ // range.
981
+ static INDEX_OUT_OF_RANGE = 0xB1;
982
+ // There are no empty entries left in the table.
983
+ static TABLE_FULL = 0xB4;
984
+ // The requested table entry has been erased and contains no valid data.
985
+ static TABLE_ENTRY_ERASED = 0xB6;
986
+ // The requested function cannot be executed because the library that
987
+ // contains the necessary functionality is not present.
988
+ static LIBRARY_NOT_PRESENT = 0xB5;
989
+ // The stack accepted the command and is currently processing the request.
990
+ // The results will be returned via an appropriate handler.
991
+ static OPERATION_IN_PROGRESS = 0xBA;
992
+ // This error is reserved for customer application use. This will never be
993
+ // returned from any portion of the network stack or HAL.
994
+ static APPLICATION_ERROR_0 = 0xF0;
995
+ // This error is reserved for customer application use. This will never be
996
+ // returned from any portion of the network stack or HAL.
997
+ static APPLICATION_ERROR_1 = 0xF1;
998
+ // This error is reserved for customer application use. This will never be
999
+ // returned from any portion of the network stack or HAL.
1000
+ static APPLICATION_ERROR_2 = 0xF2;
1001
+ // This error is reserved for customer application use. This will never be
1002
+ // returned from any portion of the network stack or HAL.
1003
+ static APPLICATION_ERROR_3 = 0xF3;
1004
+ // This error is reserved for customer application use. This will never be
1005
+ // returned from any portion of the network stack or HAL.
1006
+ static APPLICATION_ERROR_4 = 0xF4;
1007
+ // This error is reserved for customer application use. This will never be
1008
+ // returned from any portion of the network stack or HAL.
1009
+ static APPLICATION_ERROR_5 = 0xF5;
1010
+ // This error is reserved for customer application use. This will never be
1011
+ // returned from any portion of the network stack or HAL.
1012
+ static APPLICATION_ERROR_6 = 0xF6;
1013
+ // This error is reserved for customer application use. This will never be
1014
+ // returned from any portion of the network stack or HAL.
1015
+ static APPLICATION_ERROR_7 = 0xF7;
1016
+ // This error is reserved for customer application use. This will never be
1017
+ // returned from any portion of the network stack or HAL.
1018
+ static APPLICATION_ERROR_8 = 0xF8;
1019
+ // This error is reserved for customer application use. This will never be
1020
+ // returned from any portion of the network stack or HAL.
1021
+ static APPLICATION_ERROR_9 = 0xF9;
1022
+ // This error is reserved for customer application use. This will never be
1023
+ // returned from any portion of the network stack or HAL.
1024
+ static APPLICATION_ERROR_10 = 0xFA;
1025
+ // This error is reserved for customer application use. This will never be
1026
+ // returned from any portion of the network stack or HAL.
1027
+ static APPLICATION_ERROR_11 = 0xFB;
1028
+ // This error is reserved for customer application use. This will never be
1029
+ // returned from any portion of the network stack or HAL.
1030
+ static APPLICATION_ERROR_12 = 0xFC;
1031
+ // This error is reserved for customer application use. This will never be
1032
+ // returned from any portion of the network stack or HAL.
1033
+ static APPLICATION_ERROR_13 = 0xFD;
1034
+ // This error is reserved for customer application use. This will never be
1035
+ // returned from any portion of the network stack or HAL.
1036
+ static APPLICATION_ERROR_14 = 0xFE;
1037
+ // This error is reserved for customer application use. This will never be
1038
+ // returned from any portion of the network stack or HAL.
1039
+ static APPLICATION_ERROR_15 = 0xFF;
753
1040
  }
754
- exports.EmberStatus = EmberStatus;
755
- // Return type for stack functions.
756
- // The generic 'no error' message.
757
- EmberStatus.SUCCESS = 0x00;
758
- // The generic 'fatal error' message.
759
- EmberStatus.ERR_FATAL = 0x01;
760
- // An invalid value was passed as an argument to a function
761
- EmberStatus.BAD_ARGUMENT = 0x02;
762
- // The manufacturing and stack token format in nonvolatile memory is
763
- // different than what the stack expects (returned at initialization).
764
- EmberStatus.EEPROM_MFG_STACK_VERSION_MISMATCH = 0x04;
765
- // The static memory definitions in ember-staticmemory.h are incompatible
766
- // with this stack version.
767
- EmberStatus.INCOMPATIBLE_STATIC_MEMORY_DEFINITIONS = 0x05;
768
- // The manufacturing token format in non-volatile memory is different than
769
- // what the stack expects (returned at initialization).
770
- EmberStatus.EEPROM_MFG_VERSION_MISMATCH = 0x06;
771
- // The stack token format in non-volatile memory is different than what the
772
- // stack expects (returned at initialization).
773
- EmberStatus.EEPROM_STACK_VERSION_MISMATCH = 0x07;
774
- // There are no more buffers.
775
- EmberStatus.NO_BUFFERS = 0x18;
776
- // Specified an invalid baud rate.
777
- EmberStatus.SERIAL_INVALID_BAUD_RATE = 0x20;
778
- // Specified an invalid serial port.
779
- EmberStatus.SERIAL_INVALID_PORT = 0x21;
780
- // Tried to send too much data.
781
- EmberStatus.SERIAL_TX_OVERFLOW = 0x22;
782
- // There was not enough space to store a received character and the
783
- // character was dropped.
784
- EmberStatus.SERIAL_RX_OVERFLOW = 0x23;
785
- // Detected a UART framing error.
786
- EmberStatus.SERIAL_RX_FRAME_ERROR = 0x24;
787
- // Detected a UART parity error.
788
- EmberStatus.SERIAL_RX_PARITY_ERROR = 0x25;
789
- // There is no received data to process.
790
- EmberStatus.SERIAL_RX_EMPTY = 0x26;
791
- // The receive interrupt was not handled in time, and a character was
792
- // dropped.
793
- EmberStatus.SERIAL_RX_OVERRUN_ERROR = 0x27;
794
- // The MAC transmit queue is full.
795
- EmberStatus.MAC_TRANSMIT_QUEUE_FULL = 0x39;
796
- // MAC header FCR error on receive.
797
- EmberStatus.MAC_UNKNOWN_HEADER_TYPE = 0x3A;
798
- // The MAC can't complete this task because it is scanning.
799
- EmberStatus.MAC_SCANNING = 0x3D;
800
- // No pending data exists for device doing a data poll.
801
- EmberStatus.MAC_NO_DATA = 0x31;
802
- // Attempt to scan when we are joined to a network.
803
- EmberStatus.MAC_JOINED_NETWORK = 0x32;
804
- // Scan duration must be 0 to 14 inclusive. Attempt was made to scan with an
805
- // incorrect duration value.
806
- EmberStatus.MAC_BAD_SCAN_DURATION = 0x33;
807
- // emberStartScan was called with an incorrect scan type.
808
- EmberStatus.MAC_INCORRECT_SCAN_TYPE = 0x34;
809
- // emberStartScan was called with an invalid channel mask.
810
- EmberStatus.MAC_INVALID_CHANNEL_MASK = 0x35;
811
- // Failed to scan current channel because we were unable to transmit the
812
- // relevant MAC command.
813
- EmberStatus.MAC_COMMAND_TRANSMIT_FAILURE = 0x36;
814
- // We expected to receive an ACK following the transmission, but the MAC
815
- // level ACK was never received.
816
- EmberStatus.MAC_NO_ACK_RECEIVED = 0x40;
817
- // Indirect data message timed out before polled.
818
- EmberStatus.MAC_INDIRECT_TIMEOUT = 0x42;
819
- // The Simulated EEPROM is telling the application that there is at least
820
- // one flash page to be erased. The GREEN status means the current page has
821
- // not filled above the ERASE_CRITICAL_THRESHOLD. The application should
822
- // call the function halSimEepromErasePage when it can to erase a page.
823
- EmberStatus.SIM_EEPROM_ERASE_PAGE_GREEN = 0x43;
824
- // The Simulated EEPROM is telling the application that there is at least
825
- // one flash page to be erased. The RED status means the current page has
826
- // filled above the ERASE_CRITICAL_THRESHOLD. Due to the shrinking
827
- // availability of write space, there is a danger of data loss. The
828
- // application must call the function halSimEepromErasePage as soon as
829
- // possible to erase a page.
830
- EmberStatus.SIM_EEPROM_ERASE_PAGE_RED = 0x44;
831
- // The Simulated EEPROM has run out of room to write any new data and the
832
- // data trying to be set has been lost. This error code is the result of
833
- // ignoring the SIM_EEPROM_ERASE_PAGE_RED error code. The application must
834
- // call the function halSimEepromErasePage to make room for any further
835
- // calls to set a token.
836
- EmberStatus.SIM_EEPROM_FULL = 0x45;
837
- // A fatal error has occurred while trying to write data to the Flash. The
838
- // target memory attempting to be programmed is already programmed. The
839
- // flash write routines were asked to flip a bit from a 0 to 1, which is
840
- // physically impossible and the write was therefore inhibited. The data in
841
- // the flash cannot be trusted after this error.
842
- EmberStatus.ERR_FLASH_WRITE_INHIBITED = 0x46;
843
- // A fatal error has occurred while trying to write data to the Flash and
844
- // the write verification has failed. The data in the flash cannot be
845
- // trusted after this error, and it is possible this error is the result of
846
- // exceeding the life cycles of the flash.
847
- EmberStatus.ERR_FLASH_VERIFY_FAILED = 0x47;
848
- // Attempt 1 to initialize the Simulated EEPROM has failed. This failure
849
- // means the information already stored in Flash (or a lack thereof), is
850
- // fatally incompatible with the token information compiled into the code
851
- // image being run.
852
- EmberStatus.SIM_EEPROM_INIT_1_FAILED = 0x48;
853
- // Attempt 2 to initialize the Simulated EEPROM has failed. This failure
854
- // means Attempt 1 failed, and the token system failed to properly reload
855
- // default tokens and reset the Simulated EEPROM.
856
- EmberStatus.SIM_EEPROM_INIT_2_FAILED = 0x49;
857
- // Attempt 3 to initialize the Simulated EEPROM has failed. This failure
858
- // means one or both of the tokens TOKEN_MFG_NVDATA_VERSION or
859
- // TOKEN_STACK_NVDATA_VERSION were incorrect and the token system failed to
860
- // properly reload default tokens and reset the Simulated EEPROM.
861
- EmberStatus.SIM_EEPROM_INIT_3_FAILED = 0x4A;
862
- // A fatal error has occurred while trying to write data to the flash,
863
- // possibly due to write protection or an invalid address. The data in the
864
- // flash cannot be trusted after this error, and it is possible this error
865
- // is the result of exceeding the life cycles of the flash.
866
- EmberStatus.ERR_FLASH_PROG_FAIL = 0x4B;
867
- // A fatal error has occurred while trying to erase flash, possibly due to
868
- // write protection. The data in the flash cannot be trusted after this
869
- // error, and it is possible this error is the result of exceeding the life
870
- // cycles of the flash.
871
- EmberStatus.ERR_FLASH_ERASE_FAIL = 0x4C;
872
- // The bootloader received an invalid message (failed attempt to go into
873
- // bootloader).
874
- EmberStatus.ERR_BOOTLOADER_TRAP_TABLE_BAD = 0x58;
875
- // Bootloader received an invalid message (failed attempt to go into
876
- // bootloader).
877
- EmberStatus.ERR_BOOTLOADER_TRAP_UNKNOWN = 0x59;
878
- // The bootloader cannot complete the bootload operation because either an
879
- // image was not found or the image exceeded memory bounds.
880
- EmberStatus.ERR_BOOTLOADER_NO_IMAGE = 0x5A;
881
- // The APS layer attempted to send or deliver a message, but it failed.
882
- EmberStatus.DELIVERY_FAILED = 0x66;
883
- // This binding index is out of range of the current binding table.
884
- EmberStatus.BINDING_INDEX_OUT_OF_RANGE = 0x69;
885
- // This address table index is out of range for the current address table.
886
- EmberStatus.ADDRESS_TABLE_INDEX_OUT_OF_RANGE = 0x6A;
887
- // An invalid binding table index was given to a function.
888
- EmberStatus.INVALID_BINDING_INDEX = 0x6C;
889
- // The API call is not allowed given the current state of the stack.
890
- EmberStatus.INVALID_CALL = 0x70;
891
- // The link cost to a node is not known.
892
- EmberStatus.COST_NOT_KNOWN = 0x71;
893
- // The maximum number of in-flight messages (i.e.
894
- // APS_UNICAST_MESSAGE_COUNT) has been reached.
895
- EmberStatus.MAX_MESSAGE_LIMIT_REACHED = 0x72;
896
- // The message to be transmitted is too big to fit into a single over-the-
897
- // air packet.
898
- EmberStatus.MESSAGE_TOO_LONG = 0x74;
899
- // The application is trying to delete or overwrite a binding that is in
900
- // use.
901
- EmberStatus.BINDING_IS_ACTIVE = 0x75;
902
- // The application is trying to overwrite an address table entry that is in
903
- // use.
904
- EmberStatus.ADDRESS_TABLE_ENTRY_IS_ACTIVE = 0x76;
905
- // Conversion is complete.
906
- EmberStatus.ADC_CONVERSION_DONE = 0x80;
907
- // Conversion cannot be done because a request is being processed.
908
- EmberStatus.ADC_CONVERSION_BUSY = 0x81;
909
- // Conversion is deferred until the current request has been processed.
910
- EmberStatus.ADC_CONVERSION_DEFERRED = 0x82;
911
- // No results are pending.
912
- EmberStatus.ADC_NO_CONVERSION_PENDING = 0x84;
913
- // Sleeping (for a duration) has been abnormally interrupted and exited
914
- // prematurely.
915
- EmberStatus.SLEEP_INTERRUPTED = 0x85;
916
- // The transmit hardware buffer underflowed.
917
- EmberStatus.PHY_TX_UNDERFLOW = 0x88;
918
- // The transmit hardware did not finish transmitting a packet.
919
- EmberStatus.PHY_TX_INCOMPLETE = 0x89;
920
- // An unsupported channel setting was specified.
921
- EmberStatus.PHY_INVALID_CHANNEL = 0x8A;
922
- // An unsupported power setting was specified.
923
- EmberStatus.PHY_INVALID_POWER = 0x8B;
924
- // The packet cannot be transmitted because the physical MAC layer is
925
- // currently transmitting a packet. (This is used for the MAC backoff
926
- // algorithm.) PHY_TX_CCA_FAIL 0x8D The transmit attempt failed because all
927
- // CCA attempts indicated that the channel was busy
928
- EmberStatus.PHY_TX_BUSY = 0x8C;
929
- // The software installed on the hardware doesn't recognize the hardware
930
- // radio type.
931
- EmberStatus.PHY_OSCILLATOR_CHECK_FAILED = 0x8E;
932
- // The expected ACK was received after the last transmission.
933
- EmberStatus.PHY_ACK_RECEIVED = 0x8F;
934
- // The stack software has completed initialization and is ready to send and
935
- // receive packets over the air.
936
- EmberStatus.NETWORK_UP = 0x90;
937
- // The network is not operating.
938
- EmberStatus.NETWORK_DOWN = 0x91;
939
- // An attempt to join a network failed.
940
- EmberStatus.JOIN_FAILED = 0x94;
941
- // After moving, a mobile node's attempt to re-establish contact with the
942
- // network failed.
943
- EmberStatus.MOVE_FAILED = 0x96;
944
- // An attempt to join as a router failed due to a ZigBee versus ZigBee Pro
945
- // incompatibility. ZigBee devices joining ZigBee Pro networks (or vice
946
- // versa) must join as End Devices, not Routers.
947
- EmberStatus.CANNOT_JOIN_AS_ROUTER = 0x98;
948
- // The local node ID has changed. The application can obtain the new node ID
949
- // by calling emberGetNodeId().
950
- EmberStatus.NODE_ID_CHANGED = 0x99;
951
- // The local PAN ID has changed. The application can obtain the new PAN ID
952
- // by calling emberGetPanId().
953
- EmberStatus.PAN_ID_CHANGED = 0x9A;
954
- // An attempt to join or rejoin the network failed because no router beacons
955
- // could be heard by the joining node.
956
- EmberStatus.NO_BEACONS = 0xAB;
957
- // An attempt was made to join a Secured Network using a pre-configured key,
958
- // but the Trust Center sent back a Network Key in-the-clear when an
959
- // encrypted Network Key was required.
960
- EmberStatus.RECEIVED_KEY_IN_THE_CLEAR = 0xAC;
961
- // An attempt was made to join a Secured Network, but the device did not
962
- // receive a Network Key.
963
- EmberStatus.NO_NETWORK_KEY_RECEIVED = 0xAD;
964
- // After a device joined a Secured Network, a Link Key was requested but no
965
- // response was ever received.
966
- EmberStatus.NO_LINK_KEY_RECEIVED = 0xAE;
967
- // An attempt was made to join a Secured Network without a pre-configured
968
- // key, but the Trust Center sent encrypted data using a pre-configured key.
969
- EmberStatus.PRECONFIGURED_KEY_REQUIRED = 0xAF;
970
- // The node has not joined a network.
971
- EmberStatus.NOT_JOINED = 0x93;
972
- // The chosen security level (the value of SECURITY_LEVEL) is not supported
973
- // by the stack.
974
- EmberStatus.INVALID_SECURITY_LEVEL = 0x95;
975
- // A message cannot be sent because the network is currently overloaded.
976
- EmberStatus.NETWORK_BUSY = 0xA1;
977
- // The application tried to send a message using an endpoint that it has not
978
- // defined.
979
- EmberStatus.INVALID_ENDPOINT = 0xA3;
980
- // The application tried to use a binding that has been remotely modified
981
- // and the change has not yet been reported to the application.
982
- EmberStatus.BINDING_HAS_CHANGED = 0xA4;
983
- // An attempt to generate random bytes failed because of insufficient random
984
- // data from the radio.
985
- EmberStatus.INSUFFICIENT_RANDOM_DATA = 0xA5;
986
- // There was an error in trying to encrypt at the APS Level. This could
987
- // result from either an inability to determine the long address of the
988
- // recipient from the short address (no entry in the binding table) or there
989
- // is no link key entry in the table associated with the destination, or
990
- // there was a failure to load the correct key into the encryption core.
991
- // TRUST_CENTER_MASTER_KEY_NOT_SET 0xA7 There was an attempt to form a
992
- // network using commercial security without setting the Trust Center master
993
- // key first.
994
- EmberStatus.APS_ENCRYPTION_ERROR = 0xA6;
995
- // There was an attempt to form or join a network with security without
996
- // calling emberSetInitialSecurityState() first.
997
- EmberStatus.SECURITY_STATE_NOT_SET = 0xA8;
998
- // There was an attempt to set an entry in the key table using an invalid
999
- // long address. An entry cannot be set using either the local device's or
1000
- // Trust Center's IEEE address. Or an entry already exists in the table with
1001
- // the same IEEE address. An Address of all zeros or all F's are not valid
1002
- // addresses in 802.15.4.
1003
- EmberStatus.KEY_TABLE_INVALID_ADDRESS = 0xB3;
1004
- // There was an attempt to set a security configuration that is not valid
1005
- // given the other security settings.
1006
- EmberStatus.SECURITY_CONFIGURATION_INVALID = 0xB7;
1007
- // There was an attempt to broadcast a key switch too quickly after
1008
- // broadcasting the next network key. The Trust Center must wait at least a
1009
- // period equal to the broadcast timeout so that all routers have a chance
1010
- // to receive the broadcast of the new network key.
1011
- EmberStatus.TOO_SOON_FOR_SWITCH_KEY = 0xB8;
1012
- // The message could not be sent because the link key corresponding to the
1013
- // destination is not authorized for use in APS data messages. APS Commands
1014
- // (sent by the stack) are allowed. To use it for encryption of APS data
1015
- // messages it must be authorized using a key agreement protocol (such as
1016
- // CBKE).
1017
- EmberStatus.KEY_NOT_AUTHORIZED = 0xBB;
1018
- // The security data provided was not valid, or an integrity check failed.
1019
- EmberStatus.SECURITY_DATA_INVALID = 0xBD;
1020
- // A ZigBee route error command frame was received indicating that a source
1021
- // routed message from this node failed en route.
1022
- EmberStatus.SOURCE_ROUTE_FAILURE = 0xA9;
1023
- // A ZigBee route error command frame was received indicating that a message
1024
- // sent to this node along a many-to-one route failed en route. The route
1025
- // error frame was delivered by an ad-hoc search for a functioning route.
1026
- EmberStatus.MANY_TO_ONE_ROUTE_FAILURE = 0xAA;
1027
- // A critical and fatal error indicating that the version of the stack
1028
- // trying to run does not match with the chip it is running on. The software
1029
- // (stack) on the chip must be replaced with software that is compatible
1030
- // with the chip.
1031
- EmberStatus.STACK_AND_HARDWARE_MISMATCH = 0xB0;
1032
- // An index was passed into the function that was larger than the valid
1033
- // range.
1034
- EmberStatus.INDEX_OUT_OF_RANGE = 0xB1;
1035
- // There are no empty entries left in the table.
1036
- EmberStatus.TABLE_FULL = 0xB4;
1037
- // The requested table entry has been erased and contains no valid data.
1038
- EmberStatus.TABLE_ENTRY_ERASED = 0xB6;
1039
- // The requested function cannot be executed because the library that
1040
- // contains the necessary functionality is not present.
1041
- EmberStatus.LIBRARY_NOT_PRESENT = 0xB5;
1042
- // The stack accepted the command and is currently processing the request.
1043
- // The results will be returned via an appropriate handler.
1044
- EmberStatus.OPERATION_IN_PROGRESS = 0xBA;
1045
- // This error is reserved for customer application use. This will never be
1046
- // returned from any portion of the network stack or HAL.
1047
- EmberStatus.APPLICATION_ERROR_0 = 0xF0;
1048
- // This error is reserved for customer application use. This will never be
1049
- // returned from any portion of the network stack or HAL.
1050
- EmberStatus.APPLICATION_ERROR_1 = 0xF1;
1051
- // This error is reserved for customer application use. This will never be
1052
- // returned from any portion of the network stack or HAL.
1053
- EmberStatus.APPLICATION_ERROR_2 = 0xF2;
1054
- // This error is reserved for customer application use. This will never be
1055
- // returned from any portion of the network stack or HAL.
1056
- EmberStatus.APPLICATION_ERROR_3 = 0xF3;
1057
- // This error is reserved for customer application use. This will never be
1058
- // returned from any portion of the network stack or HAL.
1059
- EmberStatus.APPLICATION_ERROR_4 = 0xF4;
1060
- // This error is reserved for customer application use. This will never be
1061
- // returned from any portion of the network stack or HAL.
1062
- EmberStatus.APPLICATION_ERROR_5 = 0xF5;
1063
- // This error is reserved for customer application use. This will never be
1064
- // returned from any portion of the network stack or HAL.
1065
- EmberStatus.APPLICATION_ERROR_6 = 0xF6;
1066
- // This error is reserved for customer application use. This will never be
1067
- // returned from any portion of the network stack or HAL.
1068
- EmberStatus.APPLICATION_ERROR_7 = 0xF7;
1069
- // This error is reserved for customer application use. This will never be
1070
- // returned from any portion of the network stack or HAL.
1071
- EmberStatus.APPLICATION_ERROR_8 = 0xF8;
1072
- // This error is reserved for customer application use. This will never be
1073
- // returned from any portion of the network stack or HAL.
1074
- EmberStatus.APPLICATION_ERROR_9 = 0xF9;
1075
- // This error is reserved for customer application use. This will never be
1076
- // returned from any portion of the network stack or HAL.
1077
- EmberStatus.APPLICATION_ERROR_10 = 0xFA;
1078
- // This error is reserved for customer application use. This will never be
1079
- // returned from any portion of the network stack or HAL.
1080
- EmberStatus.APPLICATION_ERROR_11 = 0xFB;
1081
- // This error is reserved for customer application use. This will never be
1082
- // returned from any portion of the network stack or HAL.
1083
- EmberStatus.APPLICATION_ERROR_12 = 0xFC;
1084
- // This error is reserved for customer application use. This will never be
1085
- // returned from any portion of the network stack or HAL.
1086
- EmberStatus.APPLICATION_ERROR_13 = 0xFD;
1087
- // This error is reserved for customer application use. This will never be
1088
- // returned from any portion of the network stack or HAL.
1089
- EmberStatus.APPLICATION_ERROR_14 = 0xFE;
1090
- // This error is reserved for customer application use. This will never be
1091
- // returned from any portion of the network stack or HAL.
1092
- EmberStatus.APPLICATION_ERROR_15 = 0xFF;
1093
- class EmberEventUnits extends basic.uint8_t {
1041
+ export class EmberEventUnits extends basic.uint8_t {
1042
+ // Either marks an event as inactive or specifies the units for the event
1043
+ // execution time.
1044
+ // The event is not scheduled to run.
1045
+ static EVENT_INACTIVE = 0x00;
1046
+ // The execution time is in approximate milliseconds.
1047
+ static EVENT_MS_TIME = 0x01;
1048
+ // The execution time is in 'binary' quarter seconds (256 approximate
1049
+ // milliseconds each).
1050
+ static EVENT_QS_TIME = 0x02;
1051
+ // The execution time is in 'binary' minutes (65536 approximate milliseconds
1052
+ // each).
1053
+ static EVENT_MINUTE_TIME = 0x03;
1094
1054
  }
1095
- exports.EmberEventUnits = EmberEventUnits;
1096
- // Either marks an event as inactive or specifies the units for the event
1097
- // execution time.
1098
- // The event is not scheduled to run.
1099
- EmberEventUnits.EVENT_INACTIVE = 0x00;
1100
- // The execution time is in approximate milliseconds.
1101
- EmberEventUnits.EVENT_MS_TIME = 0x01;
1102
- // The execution time is in 'binary' quarter seconds (256 approximate
1103
- // milliseconds each).
1104
- EmberEventUnits.EVENT_QS_TIME = 0x02;
1105
- // The execution time is in 'binary' minutes (65536 approximate milliseconds
1106
- // each).
1107
- EmberEventUnits.EVENT_MINUTE_TIME = 0x03;
1108
- class EmberNodeType extends basic.uint8_t {
1055
+ export class EmberNodeType extends basic.uint8_t {
1056
+ // The type of the node.
1057
+ // Device is not joined.
1058
+ static UNKNOWN_DEVICE = 0x00;
1059
+ // Will relay messages and can act as a parent to other nodes.
1060
+ static COORDINATOR = 0x01;
1061
+ // Will relay messages and can act as a parent to other nodes.
1062
+ static ROUTER = 0x02;
1063
+ // Communicates only with its parent and will not relay messages.
1064
+ static END_DEVICE = 0x03;
1065
+ // An end device whose radio can be turned off to save power. The
1066
+ // application must poll to receive messages.
1067
+ static SLEEPY_END_DEVICE = 0x04;
1068
+ // A sleepy end device that can move through the network.
1069
+ static MOBILE_END_DEVICE = 0x05;
1109
1070
  }
1110
- exports.EmberNodeType = EmberNodeType;
1111
- // The type of the node.
1112
- // Device is not joined.
1113
- EmberNodeType.UNKNOWN_DEVICE = 0x00;
1114
- // Will relay messages and can act as a parent to other nodes.
1115
- EmberNodeType.COORDINATOR = 0x01;
1116
- // Will relay messages and can act as a parent to other nodes.
1117
- EmberNodeType.ROUTER = 0x02;
1118
- // Communicates only with its parent and will not relay messages.
1119
- EmberNodeType.END_DEVICE = 0x03;
1120
- // An end device whose radio can be turned off to save power. The
1121
- // application must poll to receive messages.
1122
- EmberNodeType.SLEEPY_END_DEVICE = 0x04;
1123
- // A sleepy end device that can move through the network.
1124
- EmberNodeType.MOBILE_END_DEVICE = 0x05;
1125
- class EmberNetworkStatus extends basic.uint8_t {
1071
+ export class EmberNetworkStatus extends basic.uint8_t {
1072
+ // The possible join states for a node.
1073
+ // The node is not associated with a network in any way.
1074
+ static NO_NETWORK = 0x00;
1075
+ // The node is currently attempting to join a network.
1076
+ static JOINING_NETWORK = 0x01;
1077
+ // The node is joined to a network.
1078
+ static JOINED_NETWORK = 0x02;
1079
+ // The node is an end device joined to a network but its parent is not
1080
+ // responding.
1081
+ static JOINED_NETWORK_NO_PARENT = 0x03;
1082
+ // The node is in the process of leaving its current network.
1083
+ static LEAVING_NETWORK = 0x04;
1126
1084
  }
1127
- exports.EmberNetworkStatus = EmberNetworkStatus;
1128
- // The possible join states for a node.
1129
- // The node is not associated with a network in any way.
1130
- EmberNetworkStatus.NO_NETWORK = 0x00;
1131
- // The node is currently attempting to join a network.
1132
- EmberNetworkStatus.JOINING_NETWORK = 0x01;
1133
- // The node is joined to a network.
1134
- EmberNetworkStatus.JOINED_NETWORK = 0x02;
1135
- // The node is an end device joined to a network but its parent is not
1136
- // responding.
1137
- EmberNetworkStatus.JOINED_NETWORK_NO_PARENT = 0x03;
1138
- // The node is in the process of leaving its current network.
1139
- EmberNetworkStatus.LEAVING_NETWORK = 0x04;
1140
- class EmberIncomingMessageType extends basic.uint8_t {
1085
+ export class EmberIncomingMessageType extends basic.uint8_t {
1086
+ // Incoming message types.
1087
+ // Unicast.
1088
+ static INCOMING_UNICAST = 0x00;
1089
+ // Unicast reply.
1090
+ static INCOMING_UNICAST_REPLY = 0x01;
1091
+ // Multicast.
1092
+ static INCOMING_MULTICAST = 0x02;
1093
+ // Multicast sent by the local device.
1094
+ static INCOMING_MULTICAST_LOOPBACK = 0x03;
1095
+ // Broadcast.
1096
+ static INCOMING_BROADCAST = 0x04;
1097
+ // Broadcast sent by the local device.
1098
+ static INCOMING_BROADCAST_LOOPBACK = 0x05;
1099
+ // Many to one route request.
1100
+ static INCOMING_MANY_TO_ONE_ROUTE_REQUEST = 0x06;
1141
1101
  }
1142
- exports.EmberIncomingMessageType = EmberIncomingMessageType;
1143
- // Incoming message types.
1144
- // Unicast.
1145
- EmberIncomingMessageType.INCOMING_UNICAST = 0x00;
1146
- // Unicast reply.
1147
- EmberIncomingMessageType.INCOMING_UNICAST_REPLY = 0x01;
1148
- // Multicast.
1149
- EmberIncomingMessageType.INCOMING_MULTICAST = 0x02;
1150
- // Multicast sent by the local device.
1151
- EmberIncomingMessageType.INCOMING_MULTICAST_LOOPBACK = 0x03;
1152
- // Broadcast.
1153
- EmberIncomingMessageType.INCOMING_BROADCAST = 0x04;
1154
- // Broadcast sent by the local device.
1155
- EmberIncomingMessageType.INCOMING_BROADCAST_LOOPBACK = 0x05;
1156
- // Many to one route request.
1157
- EmberIncomingMessageType.INCOMING_MANY_TO_ONE_ROUTE_REQUEST = 0x06;
1158
- class EmberOutgoingMessageType extends basic.uint8_t {
1102
+ export class EmberOutgoingMessageType extends basic.uint8_t {
1103
+ // Outgoing message types.
1104
+ // Unicast sent directly to an EmberNodeId.
1105
+ static OUTGOING_DIRECT = 0x00;
1106
+ // Unicast sent using an entry in the address table.
1107
+ static OUTGOING_VIA_ADDRESS_TABLE = 0x01;
1108
+ // Unicast sent using an entry in the binding table.
1109
+ static OUTGOING_VIA_BINDING = 0x02;
1110
+ // Multicast message. This value is passed to emberMessageSentHandler()
1111
+ // only. It may not be passed to emberSendUnicast().
1112
+ static OUTGOING_MULTICAST = 0x03;
1113
+ // Broadcast message. This value is passed to emberMessageSentHandler()
1114
+ // only. It may not be passed to emberSendUnicast().
1115
+ static OUTGOING_BROADCAST = 0x04;
1159
1116
  }
1160
- exports.EmberOutgoingMessageType = EmberOutgoingMessageType;
1161
- // Outgoing message types.
1162
- // Unicast sent directly to an EmberNodeId.
1163
- EmberOutgoingMessageType.OUTGOING_DIRECT = 0x00;
1164
- // Unicast sent using an entry in the address table.
1165
- EmberOutgoingMessageType.OUTGOING_VIA_ADDRESS_TABLE = 0x01;
1166
- // Unicast sent using an entry in the binding table.
1167
- EmberOutgoingMessageType.OUTGOING_VIA_BINDING = 0x02;
1168
- // Multicast message. This value is passed to emberMessageSentHandler()
1169
- // only. It may not be passed to emberSendUnicast().
1170
- EmberOutgoingMessageType.OUTGOING_MULTICAST = 0x03;
1171
- // Broadcast message. This value is passed to emberMessageSentHandler()
1172
- // only. It may not be passed to emberSendUnicast().
1173
- EmberOutgoingMessageType.OUTGOING_BROADCAST = 0x04;
1174
- class EmberMacPassthroughType extends basic.uint8_t {
1117
+ export class EmberMacPassthroughType extends basic.uint8_t {
1118
+ // MAC passthrough message type flags.
1119
+ // No MAC passthrough messages.
1120
+ static MAC_PASSTHROUGH_NONE = 0x00;
1121
+ // SE InterPAN messages.
1122
+ static MAC_PASSTHROUGH_SE_INTERPAN = 0x01;
1123
+ // Legacy EmberNet messages.
1124
+ static MAC_PASSTHROUGH_EMBERNET = 0x02;
1125
+ // Legacy EmberNet messages filtered by their source address.
1126
+ static MAC_PASSTHROUGH_EMBERNET_SOURCE = 0x04;
1127
+ static MAC_PASSTHROUGH_APPLICATION = 0x08;
1128
+ static MAC_PASSTHROUGH_CUSTOM = 0x10;
1129
+ static MAC_PASSTHROUGH_INTERNAL = 0x80;
1175
1130
  }
1176
- exports.EmberMacPassthroughType = EmberMacPassthroughType;
1177
- // MAC passthrough message type flags.
1178
- // No MAC passthrough messages.
1179
- EmberMacPassthroughType.MAC_PASSTHROUGH_NONE = 0x00;
1180
- // SE InterPAN messages.
1181
- EmberMacPassthroughType.MAC_PASSTHROUGH_SE_INTERPAN = 0x01;
1182
- // Legacy EmberNet messages.
1183
- EmberMacPassthroughType.MAC_PASSTHROUGH_EMBERNET = 0x02;
1184
- // Legacy EmberNet messages filtered by their source address.
1185
- EmberMacPassthroughType.MAC_PASSTHROUGH_EMBERNET_SOURCE = 0x04;
1186
- EmberMacPassthroughType.MAC_PASSTHROUGH_APPLICATION = 0x08;
1187
- EmberMacPassthroughType.MAC_PASSTHROUGH_CUSTOM = 0x10;
1188
- EmberMacPassthroughType.MAC_PASSTHROUGH_INTERNAL = 0x80;
1189
- class EmberBindingType extends basic.uint8_t {
1131
+ export class EmberBindingType extends basic.uint8_t {
1132
+ // Binding types.
1133
+ // A binding that is currently not in use.
1134
+ static UNUSED_BINDING = 0x00;
1135
+ // A unicast binding whose 64-bit identifier is the destination EUI64.
1136
+ static UNICAST_BINDING = 0x01;
1137
+ // A unicast binding whose 64-bit identifier is the aggregator EUI64.
1138
+ static MANY_TO_ONE_BINDING = 0x02;
1139
+ // A multicast binding whose 64-bit identifier is the group address. A
1140
+ // multicast binding can be used to send messages to the group and to
1141
+ // receive messages sent to the group.
1142
+ static MULTICAST_BINDING = 0x03;
1190
1143
  }
1191
- exports.EmberBindingType = EmberBindingType;
1192
- // Binding types.
1193
- // A binding that is currently not in use.
1194
- EmberBindingType.UNUSED_BINDING = 0x00;
1195
- // A unicast binding whose 64-bit identifier is the destination EUI64.
1196
- EmberBindingType.UNICAST_BINDING = 0x01;
1197
- // A unicast binding whose 64-bit identifier is the aggregator EUI64.
1198
- EmberBindingType.MANY_TO_ONE_BINDING = 0x02;
1199
- // A multicast binding whose 64-bit identifier is the group address. A
1200
- // multicast binding can be used to send messages to the group and to
1201
- // receive messages sent to the group.
1202
- EmberBindingType.MULTICAST_BINDING = 0x03;
1203
- class EmberApsOption extends basic.uint16_t {
1144
+ export class EmberApsOption extends basic.uint16_t {
1145
+ // Options to use when sending a message.
1146
+ // No options.
1147
+ static APS_OPTION_NONE = 0x0000;
1148
+ // UNKNOWN: Discovered while receiving data
1149
+ static APS_OPTION_UNKNOWN = 0x0008;
1150
+ // Send the message using APS Encryption, using the Link Key shared with the
1151
+ // destination node to encrypt the data at the APS Level.
1152
+ static APS_OPTION_ENCRYPTION = 0x0020;
1153
+ // Resend the message using the APS retry mechanism.
1154
+ static APS_OPTION_RETRY = 0x0040;
1155
+ // Causes a route discovery to be initiated if no route to the destination
1156
+ // is known.
1157
+ static APS_OPTION_ENABLE_ROUTE_DISCOVERY = 0x0100;
1158
+ // Causes a route discovery to be initiated even if one is known.
1159
+ static APS_OPTION_FORCE_ROUTE_DISCOVERY = 0x0200;
1160
+ // Include the source EUI64 in the network frame.
1161
+ static APS_OPTION_SOURCE_EUI64 = 0x0400;
1162
+ // Include the destination EUI64 in the network frame.
1163
+ static APS_OPTION_DESTINATION_EUI64 = 0x0800;
1164
+ // Send a ZDO request to discover the node ID of the destination, if it is
1165
+ // not already know.
1166
+ static APS_OPTION_ENABLE_ADDRESS_DISCOVERY = 0x1000;
1167
+ // Reserved.
1168
+ static APS_OPTION_POLL_RESPONSE = 0x2000;
1169
+ // This incoming message is a ZDO request not handled by the EmberZNet
1170
+ // stack, and the application is responsible for sending a ZDO response.
1171
+ // This flag is used only when the ZDO is configured to have requests
1172
+ // handled by the application. See the CONFIG_APPLICATION_ZDO_FLAGS
1173
+ // configuration parameter for more information.
1174
+ static APS_OPTION_ZDO_RESPONSE_REQUIRED = 0x4000;
1175
+ // This message is part of a fragmented message. This option may only be set
1176
+ // for unicasts. The groupId field gives the index of this fragment in the
1177
+ // low-order byte. If the low-order byte is zero this is the first fragment
1178
+ // and the high-order byte contains the number of fragments in the message.
1179
+ static APS_OPTION_FRAGMENT = 0x8000;
1204
1180
  }
1205
- exports.EmberApsOption = EmberApsOption;
1206
- // Options to use when sending a message.
1207
- // No options.
1208
- EmberApsOption.APS_OPTION_NONE = 0x0000;
1209
- // UNKNOWN: Discovered while receiving data
1210
- EmberApsOption.APS_OPTION_UNKNOWN = 0x0008;
1211
- // Send the message using APS Encryption, using the Link Key shared with the
1212
- // destination node to encrypt the data at the APS Level.
1213
- EmberApsOption.APS_OPTION_ENCRYPTION = 0x0020;
1214
- // Resend the message using the APS retry mechanism.
1215
- EmberApsOption.APS_OPTION_RETRY = 0x0040;
1216
- // Causes a route discovery to be initiated if no route to the destination
1217
- // is known.
1218
- EmberApsOption.APS_OPTION_ENABLE_ROUTE_DISCOVERY = 0x0100;
1219
- // Causes a route discovery to be initiated even if one is known.
1220
- EmberApsOption.APS_OPTION_FORCE_ROUTE_DISCOVERY = 0x0200;
1221
- // Include the source EUI64 in the network frame.
1222
- EmberApsOption.APS_OPTION_SOURCE_EUI64 = 0x0400;
1223
- // Include the destination EUI64 in the network frame.
1224
- EmberApsOption.APS_OPTION_DESTINATION_EUI64 = 0x0800;
1225
- // Send a ZDO request to discover the node ID of the destination, if it is
1226
- // not already know.
1227
- EmberApsOption.APS_OPTION_ENABLE_ADDRESS_DISCOVERY = 0x1000;
1228
- // Reserved.
1229
- EmberApsOption.APS_OPTION_POLL_RESPONSE = 0x2000;
1230
- // This incoming message is a ZDO request not handled by the EmberZNet
1231
- // stack, and the application is responsible for sending a ZDO response.
1232
- // This flag is used only when the ZDO is configured to have requests
1233
- // handled by the application. See the CONFIG_APPLICATION_ZDO_FLAGS
1234
- // configuration parameter for more information.
1235
- EmberApsOption.APS_OPTION_ZDO_RESPONSE_REQUIRED = 0x4000;
1236
- // This message is part of a fragmented message. This option may only be set
1237
- // for unicasts. The groupId field gives the index of this fragment in the
1238
- // low-order byte. If the low-order byte is zero this is the first fragment
1239
- // and the high-order byte contains the number of fragments in the message.
1240
- EmberApsOption.APS_OPTION_FRAGMENT = 0x8000;
1241
- class EzspNetworkScanType extends basic.uint8_t {
1181
+ export class EzspNetworkScanType extends basic.uint8_t {
1182
+ // Network scan types.
1183
+ // An energy scan scans each channel for its RSSI value.
1184
+ static ENERGY_SCAN = 0x00;
1185
+ // An active scan scans each channel for available networks.
1186
+ static ACTIVE_SCAN = 0x01;
1242
1187
  }
1243
- exports.EzspNetworkScanType = EzspNetworkScanType;
1244
- // Network scan types.
1245
- // An energy scan scans each channel for its RSSI value.
1246
- EzspNetworkScanType.ENERGY_SCAN = 0x00;
1247
- // An active scan scans each channel for available networks.
1248
- EzspNetworkScanType.ACTIVE_SCAN = 0x01;
1249
- class EmberJoinDecision extends basic.uint8_t {
1188
+ export class EmberJoinDecision extends basic.uint8_t {
1189
+ // Decision made by the trust center when a node attempts to join.
1190
+ // Allow the node to join. The joining node should have a pre-configured
1191
+ // key. The security data sent to it will be encrypted with that key.
1192
+ static USE_PRECONFIGURED_KEY = 0x00;
1193
+ // Allow the node to join. Send the necessary key (the Network Key in
1194
+ // Standard Security mode, the Trust Center Master in High Security mode)
1195
+ // in-the-clear to the joining device.
1196
+ static SEND_KEY_IN_THE_CLEAR = 0x01;
1197
+ // Deny join.
1198
+ static DENY_JOIN = 0x02;
1199
+ // Take no action.
1200
+ static NO_ACTION = 0x03;
1250
1201
  }
1251
- exports.EmberJoinDecision = EmberJoinDecision;
1252
- // Decision made by the trust center when a node attempts to join.
1253
- // Allow the node to join. The joining node should have a pre-configured
1254
- // key. The security data sent to it will be encrypted with that key.
1255
- EmberJoinDecision.USE_PRECONFIGURED_KEY = 0x00;
1256
- // Allow the node to join. Send the necessary key (the Network Key in
1257
- // Standard Security mode, the Trust Center Master in High Security mode)
1258
- // in-the-clear to the joining device.
1259
- EmberJoinDecision.SEND_KEY_IN_THE_CLEAR = 0x01;
1260
- // Deny join.
1261
- EmberJoinDecision.DENY_JOIN = 0x02;
1262
- // Take no action.
1263
- EmberJoinDecision.NO_ACTION = 0x03;
1264
- class EmberInitialSecurityBitmask extends basic.uint16_t {
1202
+ export class EmberInitialSecurityBitmask extends basic.uint16_t {
1203
+ // This is the Initial Security Bitmask that controls the use of various
1204
+ // security features.
1205
+ // This enables ZigBee Standard Security on the node.
1206
+ static STANDARD_SECURITY_MODE = 0x0000;
1207
+ // This enables Distributed Trust Center Mode for the device forming the
1208
+ // network. (Previously known as NO_TRUST_CENTER_MODE)
1209
+ static DISTRIBUTED_TRUST_CENTER_MODE = 0x0002;
1210
+ // This enables a Global Link Key for the Trust Center. All nodes will share
1211
+ // the same Trust Center Link Key.
1212
+ static TRUST_CENTER_GLOBAL_LINK_KEY = 0x0004;
1213
+ // This enables devices that perform MAC Association with a pre-configured
1214
+ // Network Key to join the network. It is only set on the Trust Center.
1215
+ static PRECONFIGURED_NETWORK_KEY_MODE = 0x0008;
1216
+ // This denotes that the preconfiguredKey is not the actual Link Key but a
1217
+ // Secret Key known only to the Trust Center. It is hashed with the IEEE
1218
+ // Address of the destination device in order to create the actual Link Key
1219
+ // used in encryption. This is bit is only used by the Trust Center. The
1220
+ // joining device need not set this.
1221
+ static TRUST_CENTER_USES_HASHED_LINK_KEY = 0x0084;
1222
+ // This denotes that the preconfiguredKey element has valid data that should
1223
+ // be used to configure the initial security state.
1224
+ static HAVE_PRECONFIGURED_KEY = 0x0100;
1225
+ // This denotes that the networkKey element has valid data that should be
1226
+ // used to configure the initial security state.
1227
+ static HAVE_NETWORK_KEY = 0x0200;
1228
+ // This denotes to a joining node that it should attempt to acquire a Trust
1229
+ // Center Link Key during joining. This is only necessary if the device does
1230
+ // not have a pre-configured key.
1231
+ static GET_LINK_KEY_WHEN_JOINING = 0x0400;
1232
+ // This denotes that a joining device should only accept an encrypted
1233
+ // network key from the Trust Center (using its preconfigured key). A key
1234
+ // sent in-the-clear by the Trust Center will be rejected and the join will
1235
+ // fail. This option is only valid when utilizing a pre-configured key.
1236
+ static REQUIRE_ENCRYPTED_KEY = 0x0800;
1237
+ // This denotes whether the device should NOT reset its outgoing frame
1238
+ // counters (both NWK and APS) when ::emberSetInitialSecurityState() is
1239
+ // called. Normally it is advised to reset the frame counter before joining
1240
+ // a new network. However in cases where a device is joining to the same
1241
+ // network a again (but not using ::emberRejoinNetwork()) it should keep the
1242
+ // NWK and APS frame counters stored in its tokens.
1243
+ static NO_FRAME_COUNTER_RESET = 0x1000;
1244
+ // This denotes that the device should obtain its preconfigured key from an
1245
+ // installation code stored in the manufacturing token. The token contains a
1246
+ // value that will be hashed to obtain the actual preconfigured key. If that
1247
+ // token is not valid, then the call to emberSetInitialSecurityState() will
1248
+ // fail.
1249
+ static GET_PRECONFIGURED_KEY_FROM_INSTALL_CODE = 0x2000;
1250
+ // This denotes that the
1251
+ // ::EmberInitialSecurityState::preconfiguredTrustCenterEui64 has a value in
1252
+ // it containing the trust center EUI64. The device will only join a network
1253
+ // and accept commands from a trust center with that EUI64. Normally this
1254
+ // bit is NOT set, and the EUI64 of the trust center is learned during the
1255
+ // join process. When commissioning a device to join onto an existing
1256
+ // network, which is using a trust center, and without sending any messages,
1257
+ // this bit must be set and the field
1258
+ // ::EmberInitialSecurityState::preconfiguredTrustCenterEui64 must be
1259
+ // populated with the appropriate EUI64.
1260
+ static HAVE_TRUST_CENTER_EUI64 = 0x0040;
1265
1261
  }
1266
- exports.EmberInitialSecurityBitmask = EmberInitialSecurityBitmask;
1267
- // This is the Initial Security Bitmask that controls the use of various
1268
- // security features.
1269
- // This enables ZigBee Standard Security on the node.
1270
- EmberInitialSecurityBitmask.STANDARD_SECURITY_MODE = 0x0000;
1271
- // This enables Distributed Trust Center Mode for the device forming the
1272
- // network. (Previously known as NO_TRUST_CENTER_MODE)
1273
- EmberInitialSecurityBitmask.DISTRIBUTED_TRUST_CENTER_MODE = 0x0002;
1274
- // This enables a Global Link Key for the Trust Center. All nodes will share
1275
- // the same Trust Center Link Key.
1276
- EmberInitialSecurityBitmask.TRUST_CENTER_GLOBAL_LINK_KEY = 0x0004;
1277
- // This enables devices that perform MAC Association with a pre-configured
1278
- // Network Key to join the network. It is only set on the Trust Center.
1279
- EmberInitialSecurityBitmask.PRECONFIGURED_NETWORK_KEY_MODE = 0x0008;
1280
- // This denotes that the preconfiguredKey is not the actual Link Key but a
1281
- // Secret Key known only to the Trust Center. It is hashed with the IEEE
1282
- // Address of the destination device in order to create the actual Link Key
1283
- // used in encryption. This is bit is only used by the Trust Center. The
1284
- // joining device need not set this.
1285
- EmberInitialSecurityBitmask.TRUST_CENTER_USES_HASHED_LINK_KEY = 0x0084;
1286
- // This denotes that the preconfiguredKey element has valid data that should
1287
- // be used to configure the initial security state.
1288
- EmberInitialSecurityBitmask.HAVE_PRECONFIGURED_KEY = 0x0100;
1289
- // This denotes that the networkKey element has valid data that should be
1290
- // used to configure the initial security state.
1291
- EmberInitialSecurityBitmask.HAVE_NETWORK_KEY = 0x0200;
1292
- // This denotes to a joining node that it should attempt to acquire a Trust
1293
- // Center Link Key during joining. This is only necessary if the device does
1294
- // not have a pre-configured key.
1295
- EmberInitialSecurityBitmask.GET_LINK_KEY_WHEN_JOINING = 0x0400;
1296
- // This denotes that a joining device should only accept an encrypted
1297
- // network key from the Trust Center (using its preconfigured key). A key
1298
- // sent in-the-clear by the Trust Center will be rejected and the join will
1299
- // fail. This option is only valid when utilizing a pre-configured key.
1300
- EmberInitialSecurityBitmask.REQUIRE_ENCRYPTED_KEY = 0x0800;
1301
- // This denotes whether the device should NOT reset its outgoing frame
1302
- // counters (both NWK and APS) when ::emberSetInitialSecurityState() is
1303
- // called. Normally it is advised to reset the frame counter before joining
1304
- // a new network. However in cases where a device is joining to the same
1305
- // network a again (but not using ::emberRejoinNetwork()) it should keep the
1306
- // NWK and APS frame counters stored in its tokens.
1307
- EmberInitialSecurityBitmask.NO_FRAME_COUNTER_RESET = 0x1000;
1308
- // This denotes that the device should obtain its preconfigured key from an
1309
- // installation code stored in the manufacturing token. The token contains a
1310
- // value that will be hashed to obtain the actual preconfigured key. If that
1311
- // token is not valid, then the call to emberSetInitialSecurityState() will
1312
- // fail.
1313
- EmberInitialSecurityBitmask.GET_PRECONFIGURED_KEY_FROM_INSTALL_CODE = 0x2000;
1314
- // This denotes that the
1315
- // ::EmberInitialSecurityState::preconfiguredTrustCenterEui64 has a value in
1316
- // it containing the trust center EUI64. The device will only join a network
1317
- // and accept commands from a trust center with that EUI64. Normally this
1318
- // bit is NOT set, and the EUI64 of the trust center is learned during the
1319
- // join process. When commissioning a device to join onto an existing
1320
- // network, which is using a trust center, and without sending any messages,
1321
- // this bit must be set and the field
1322
- // ::EmberInitialSecurityState::preconfiguredTrustCenterEui64 must be
1323
- // populated with the appropriate EUI64.
1324
- EmberInitialSecurityBitmask.HAVE_TRUST_CENTER_EUI64 = 0x0040;
1325
- class EmberCurrentSecurityBitmask extends basic.uint16_t {
1262
+ export class EmberCurrentSecurityBitmask extends basic.uint16_t {
1263
+ // This is the Current Security Bitmask that details the use of various
1264
+ // security features.
1265
+ // This denotes that the device is running in a network with ZigBee Standard
1266
+ // Security.
1267
+ static STANDARD_SECURITY_MODE = 0x0000;
1268
+ // This denotes that the device is running in a network with ZigBee High
1269
+ // Security.
1270
+ static HIGH_SECURITY_MODE = 0x0001;
1271
+ // This denotes that the device is running in a network without a
1272
+ // centralized Trust Center.
1273
+ static DISTRIBUTED_TRUST_CENTER_MODE = 0x0002;
1274
+ // This denotes that the device has a Global Link Key. The Trust Center Link
1275
+ // Key is the same across multiple nodes.
1276
+ static GLOBAL_LINK_KEY = 0x0004;
1277
+ // This denotes that the node has a Trust Center Link Key.
1278
+ static HAVE_TRUST_CENTER_LINK_KEY = 0x0010;
1279
+ // This denotes that the Trust Center is using a Hashed Link Key.
1280
+ static TRUST_CENTER_USES_HASHED_LINK_KEY = 0x0084;
1326
1281
  }
1327
- exports.EmberCurrentSecurityBitmask = EmberCurrentSecurityBitmask;
1328
- // This is the Current Security Bitmask that details the use of various
1329
- // security features.
1330
- // This denotes that the device is running in a network with ZigBee Standard
1331
- // Security.
1332
- EmberCurrentSecurityBitmask.STANDARD_SECURITY_MODE = 0x0000;
1333
- // This denotes that the device is running in a network with ZigBee High
1334
- // Security.
1335
- EmberCurrentSecurityBitmask.HIGH_SECURITY_MODE = 0x0001;
1336
- // This denotes that the device is running in a network without a
1337
- // centralized Trust Center.
1338
- EmberCurrentSecurityBitmask.DISTRIBUTED_TRUST_CENTER_MODE = 0x0002;
1339
- // This denotes that the device has a Global Link Key. The Trust Center Link
1340
- // Key is the same across multiple nodes.
1341
- EmberCurrentSecurityBitmask.GLOBAL_LINK_KEY = 0x0004;
1342
- // This denotes that the node has a Trust Center Link Key.
1343
- EmberCurrentSecurityBitmask.HAVE_TRUST_CENTER_LINK_KEY = 0x0010;
1344
- // This denotes that the Trust Center is using a Hashed Link Key.
1345
- EmberCurrentSecurityBitmask.TRUST_CENTER_USES_HASHED_LINK_KEY = 0x0084;
1346
- class EmberKeyType extends basic.uint8_t {
1282
+ export class EmberKeyType extends basic.uint8_t {
1283
+ // Describes the type of ZigBee security key.
1284
+ // A shared key between the Trust Center and a device.
1285
+ static TRUST_CENTER_LINK_KEY = 0x01;
1286
+ // A shared secret used for deriving keys between the Trust Center and a
1287
+ // device
1288
+ static TRUST_CENTER_MASTER_KEY = 0x02;
1289
+ // The current active Network Key used by all devices in the network.
1290
+ static CURRENT_NETWORK_KEY = 0x03;
1291
+ // The alternate Network Key that was previously in use, or the newer key
1292
+ // that will be switched to.
1293
+ static NEXT_NETWORK_KEY = 0x04;
1294
+ // An Application Link Key shared with another (non-Trust Center) device.
1295
+ static APPLICATION_LINK_KEY = 0x05;
1296
+ // An Application Master Key shared secret used to derive an Application
1297
+ // Link Key.
1298
+ static APPLICATION_MASTER_KEY = 0x06;
1347
1299
  }
1348
- exports.EmberKeyType = EmberKeyType;
1349
- // Describes the type of ZigBee security key.
1350
- // A shared key between the Trust Center and a device.
1351
- EmberKeyType.TRUST_CENTER_LINK_KEY = 0x01;
1352
- // A shared secret used for deriving keys between the Trust Center and a
1353
- // device
1354
- EmberKeyType.TRUST_CENTER_MASTER_KEY = 0x02;
1355
- // The current active Network Key used by all devices in the network.
1356
- EmberKeyType.CURRENT_NETWORK_KEY = 0x03;
1357
- // The alternate Network Key that was previously in use, or the newer key
1358
- // that will be switched to.
1359
- EmberKeyType.NEXT_NETWORK_KEY = 0x04;
1360
- // An Application Link Key shared with another (non-Trust Center) device.
1361
- EmberKeyType.APPLICATION_LINK_KEY = 0x05;
1362
- // An Application Master Key shared secret used to derive an Application
1363
- // Link Key.
1364
- EmberKeyType.APPLICATION_MASTER_KEY = 0x06;
1365
- class EmberKeyStructBitmask extends basic.uint16_t {
1300
+ export class EmberKeyStructBitmask extends basic.uint16_t {
1301
+ // Describes the presence of valid data within the EmberKeyStruct structure.
1302
+ // The key has a sequence number associated with it.
1303
+ static KEY_HAS_SEQUENCE_NUMBER = 0x0001;
1304
+ // The key has an outgoing frame counter associated with it.
1305
+ static KEY_HAS_OUTGOING_FRAME_COUNTER = 0x0002;
1306
+ // The key has an incoming frame counter associated with it.
1307
+ static KEY_HAS_INCOMING_FRAME_COUNTER = 0x0004;
1308
+ // The key has a Partner IEEE address associated with it.
1309
+ static KEY_HAS_PARTNER_EUI64 = 0x0008;
1366
1310
  }
1367
- exports.EmberKeyStructBitmask = EmberKeyStructBitmask;
1368
- // Describes the presence of valid data within the EmberKeyStruct structure.
1369
- // The key has a sequence number associated with it.
1370
- EmberKeyStructBitmask.KEY_HAS_SEQUENCE_NUMBER = 0x0001;
1371
- // The key has an outgoing frame counter associated with it.
1372
- EmberKeyStructBitmask.KEY_HAS_OUTGOING_FRAME_COUNTER = 0x0002;
1373
- // The key has an incoming frame counter associated with it.
1374
- EmberKeyStructBitmask.KEY_HAS_INCOMING_FRAME_COUNTER = 0x0004;
1375
- // The key has a Partner IEEE address associated with it.
1376
- EmberKeyStructBitmask.KEY_HAS_PARTNER_EUI64 = 0x0008;
1377
- class EmberDeviceUpdate extends basic.uint8_t {
1311
+ export class EmberDeviceUpdate extends basic.uint8_t {
1312
+ // The status of the device update.
1313
+ static STANDARD_SECURITY_SECURED_REJOIN = 0x0;
1314
+ static STANDARD_SECURITY_UNSECURED_JOIN = 0x1;
1315
+ static DEVICE_LEFT = 0x2;
1316
+ static STANDARD_SECURITY_UNSECURED_REJOIN = 0x3;
1317
+ static HIGH_SECURITY_SECURED_REJOIN = 0x4;
1318
+ static HIGH_SECURITY_UNSECURED_JOIN = 0x5;
1319
+ static HIGH_SECURITY_UNSECURED_REJOIN = 0x7;
1378
1320
  }
1379
- exports.EmberDeviceUpdate = EmberDeviceUpdate;
1380
- // The status of the device update.
1381
- EmberDeviceUpdate.STANDARD_SECURITY_SECURED_REJOIN = 0x0;
1382
- EmberDeviceUpdate.STANDARD_SECURITY_UNSECURED_JOIN = 0x1;
1383
- EmberDeviceUpdate.DEVICE_LEFT = 0x2;
1384
- EmberDeviceUpdate.STANDARD_SECURITY_UNSECURED_REJOIN = 0x3;
1385
- EmberDeviceUpdate.HIGH_SECURITY_SECURED_REJOIN = 0x4;
1386
- EmberDeviceUpdate.HIGH_SECURITY_UNSECURED_JOIN = 0x5;
1387
- EmberDeviceUpdate.HIGH_SECURITY_UNSECURED_REJOIN = 0x7;
1388
- class EmberKeyStatus extends basic.uint8_t {
1321
+ export class EmberKeyStatus extends basic.uint8_t {
1322
+ // The status of the attempt to establish a key.
1323
+ static APP_LINK_KEY_ESTABLISHED = 0x01;
1324
+ static APP_MASTER_KEY_ESTABLISHED = 0x02;
1325
+ static TRUST_CENTER_LINK_KEY_ESTABLISHED = 0x03;
1326
+ static KEY_ESTABLISHMENT_TIMEOUT = 0x04;
1327
+ static KEY_TABLE_FULL = 0x05;
1328
+ static TC_RESPONDED_TO_KEY_REQUEST = 0x06;
1329
+ static TC_APP_KEY_SENT_TO_REQUESTER = 0x07;
1330
+ static TC_RESPONSE_TO_KEY_REQUEST_FAILED = 0x08;
1331
+ static TC_REQUEST_KEY_TYPE_NOT_SUPPORTED = 0x09;
1332
+ static TC_NO_LINK_KEY_FOR_REQUESTER = 0x0A;
1333
+ static TC_REQUESTER_EUI64_UNKNOWN = 0x0B;
1334
+ static TC_RECEIVED_FIRST_APP_KEY_REQUEST = 0x0C;
1335
+ static TC_TIMEOUT_WAITING_FOR_SECOND_APP_KEY_REQUEST = 0x0D;
1336
+ static TC_NON_MATCHING_APP_KEY_REQUEST_RECEIVED = 0x0E;
1337
+ static TC_FAILED_TO_SEND_APP_KEYS = 0x0F;
1338
+ static TC_FAILED_TO_STORE_APP_KEY_REQUEST = 0x10;
1339
+ static TC_REJECTED_APP_KEY_REQUEST = 0x11;
1389
1340
  }
1390
- exports.EmberKeyStatus = EmberKeyStatus;
1391
- // The status of the attempt to establish a key.
1392
- EmberKeyStatus.APP_LINK_KEY_ESTABLISHED = 0x01;
1393
- EmberKeyStatus.APP_MASTER_KEY_ESTABLISHED = 0x02;
1394
- EmberKeyStatus.TRUST_CENTER_LINK_KEY_ESTABLISHED = 0x03;
1395
- EmberKeyStatus.KEY_ESTABLISHMENT_TIMEOUT = 0x04;
1396
- EmberKeyStatus.KEY_TABLE_FULL = 0x05;
1397
- EmberKeyStatus.TC_RESPONDED_TO_KEY_REQUEST = 0x06;
1398
- EmberKeyStatus.TC_APP_KEY_SENT_TO_REQUESTER = 0x07;
1399
- EmberKeyStatus.TC_RESPONSE_TO_KEY_REQUEST_FAILED = 0x08;
1400
- EmberKeyStatus.TC_REQUEST_KEY_TYPE_NOT_SUPPORTED = 0x09;
1401
- EmberKeyStatus.TC_NO_LINK_KEY_FOR_REQUESTER = 0x0A;
1402
- EmberKeyStatus.TC_REQUESTER_EUI64_UNKNOWN = 0x0B;
1403
- EmberKeyStatus.TC_RECEIVED_FIRST_APP_KEY_REQUEST = 0x0C;
1404
- EmberKeyStatus.TC_TIMEOUT_WAITING_FOR_SECOND_APP_KEY_REQUEST = 0x0D;
1405
- EmberKeyStatus.TC_NON_MATCHING_APP_KEY_REQUEST_RECEIVED = 0x0E;
1406
- EmberKeyStatus.TC_FAILED_TO_SEND_APP_KEYS = 0x0F;
1407
- EmberKeyStatus.TC_FAILED_TO_STORE_APP_KEY_REQUEST = 0x10;
1408
- EmberKeyStatus.TC_REJECTED_APP_KEY_REQUEST = 0x11;
1409
- class EmberCounterType extends basic.uint8_t {
1341
+ export class EmberCounterType extends basic.uint8_t {
1342
+ // Defines the events reported to the application by the
1343
+ // readAndClearCounters command.
1344
+ // The MAC received a broadcast.
1345
+ static COUNTER_MAC_RX_BROADCAST = 0;
1346
+ // The MAC transmitted a broadcast.
1347
+ static COUNTER_MAC_TX_BROADCAST = 1;
1348
+ // The MAC received a unicast.
1349
+ static COUNTER_MAC_RX_UNICAST = 2;
1350
+ // The MAC successfully transmitted a unicast.
1351
+ static COUNTER_MAC_TX_UNICAST_SUCCESS = 3;
1352
+ // The MAC retried a unicast.
1353
+ static COUNTER_MAC_TX_UNICAST_RETRY = 4;
1354
+ // The MAC unsuccessfully transmitted a unicast.
1355
+ static COUNTER_MAC_TX_UNICAST_FAILED = 5;
1356
+ // The APS layer received a data broadcast.
1357
+ static COUNTER_APS_DATA_RX_BROADCAST = 6;
1358
+ // The APS layer transmitted a data broadcast.
1359
+ static COUNTER_APS_DATA_TX_BROADCAST = 7;
1360
+ // The APS layer received a data unicast.
1361
+ static COUNTER_APS_DATA_RX_UNICAST = 8;
1362
+ // The APS layer successfully transmitted a data unicast.
1363
+ static COUNTER_APS_DATA_TX_UNICAST_SUCCESS = 9;
1364
+ // The APS layer retried a data unicast.
1365
+ static COUNTER_APS_DATA_TX_UNICAST_RETRY = 10;
1366
+ // The APS layer unsuccessfully transmitted a data unicast.
1367
+ static COUNTER_APS_DATA_TX_UNICAST_FAILED = 11;
1368
+ // The network layer successfully submitted a new route discovery to the
1369
+ // MAC.
1370
+ static COUNTER_ROUTE_DISCOVERY_INITIATED = 12;
1371
+ // An entry was added to the neighbor table.
1372
+ static COUNTER_NEIGHBOR_ADDED = 13;
1373
+ // An entry was removed from the neighbor table.
1374
+ static COUNTER_NEIGHBOR_REMOVED = 14;
1375
+ // A neighbor table entry became stale because it had not been heard from.
1376
+ static COUNTER_NEIGHBOR_STALE = 15;
1377
+ // A node joined or rejoined to the network via this node.
1378
+ static COUNTER_JOIN_INDICATION = 16;
1379
+ // An entry was removed from the child table.
1380
+ static COUNTER_CHILD_REMOVED = 17;
1381
+ // EZSP-UART only. An overflow error occurred in the UART.
1382
+ static COUNTER_ASH_OVERFLOW_ERROR = 18;
1383
+ // EZSP-UART only. A framing error occurred in the UART.
1384
+ static COUNTER_ASH_FRAMING_ERROR = 19;
1385
+ // EZSP-UART only. An overrun error occurred in the UART.
1386
+ static COUNTER_ASH_OVERRUN_ERROR = 20;
1387
+ // A message was dropped at the network layer because the NWK frame counter
1388
+ // was not higher than the last message seen from that source.
1389
+ static COUNTER_NWK_FRAME_COUNTER_FAILURE = 21;
1390
+ // A message was dropped at the APS layer because the APS frame counter was
1391
+ // not higher than the last message seen from that source.
1392
+ static COUNTER_APS_FRAME_COUNTER_FAILURE = 22;
1393
+ // Utility counter for general debugging use.
1394
+ static COUNTER_UTILITY = 23;
1395
+ // A message was dropped at the APS layer because it had APS encryption but
1396
+ // the key associated with the sender has not been authenticated, and thus
1397
+ // the key is not authorized for use in APS data messages.
1398
+ static COUNTER_APS_LINK_KEY_NOT_AUTHORIZED = 24;
1399
+ // A NWK encrypted message was received but dropped because decryption
1400
+ // failed.
1401
+ static COUNTER_NWK_DECRYPTION_FAILURE = 25;
1402
+ // An APS encrypted message was received but dropped because decryption
1403
+ // failed.
1404
+ static COUNTER_APS_DECRYPTION_FAILURE = 26;
1405
+ // The number of times we failed to allocate a set of linked packet buffers.
1406
+ // This doesn't necessarily mean that the packet buffer count was 0 at the
1407
+ // time, but that the number requested was greater than the number free.
1408
+ static COUNTER_ALLOCATE_PACKET_BUFFER_FAILURE = 27;
1409
+ // The number of relayed unicast packets.
1410
+ static COUNTER_RELAYED_UNICAST = 28;
1411
+ // The number of times we dropped a packet due to reaching
1412
+ // the preset PHY to MAC queue limit (emMaxPhyToMacQueueLength).
1413
+ static COUNTER_PHY_TO_MAC_QUEUE_LIMIT_REACHED = 29;
1414
+ // The number of times we dropped a packet due to the
1415
+ // packet-validate library checking a packet and rejecting it
1416
+ // due to length or other formatting problems.
1417
+ static COUNTER_PACKET_VALIDATE_LIBRARY_DROPPED_COUNT = 30;
1418
+ // The number of times the NWK retry queue is full and a
1419
+ // new message failed to be added.
1420
+ static COUNTER_TYPE_NWK_RETRY_OVERFLOW = 31;
1421
+ // The number of times the PHY layer was unable to transmit
1422
+ // due to a failed CCA.
1423
+ static COUNTER_PHY_CCA_FAIL_COUNT = 32;
1424
+ // The number of times a NWK broadcast was dropped because
1425
+ // the broadcast table was full.
1426
+ static COUNTER_BROADCAST_TABLE_FULL = 33;
1427
+ // The number of low priority packet traffic arbitration requests.
1428
+ static COUNTER_PTA_LO_PRI_REQUESTED = 34;
1429
+ // The number of high priority packet traffic arbitration requests.
1430
+ static COUNTER_PTA_HI_PRI_REQUESTED = 35;
1431
+ // The number of low priority packet traffic arbitration requests denied.
1432
+ static COUNTER_PTA_LO_PRI_DENIED = 36;
1433
+ // The number of high priority packet traffic arbitration requests denied.
1434
+ static COUNTER_PTA_HI_PRI_DENIED = 37;
1435
+ // The number of aborted low priority packet traffic arbitration transmissions.
1436
+ static COUNTER_PTA_LO_PRI_TX_ABORTED = 38;
1437
+ // The number of aborted high priority packet traffic arbitration transmissions.
1438
+ static COUNTER_PTA_HI_PRI_TX_ABORTED = 39;
1439
+ // A placeholder giving the number of Ember counter types.
1440
+ static COUNTER_TYPE_COUNT = 40;
1410
1441
  }
1411
- exports.EmberCounterType = EmberCounterType;
1412
- // Defines the events reported to the application by the
1413
- // readAndClearCounters command.
1414
- // The MAC received a broadcast.
1415
- EmberCounterType.COUNTER_MAC_RX_BROADCAST = 0;
1416
- // The MAC transmitted a broadcast.
1417
- EmberCounterType.COUNTER_MAC_TX_BROADCAST = 1;
1418
- // The MAC received a unicast.
1419
- EmberCounterType.COUNTER_MAC_RX_UNICAST = 2;
1420
- // The MAC successfully transmitted a unicast.
1421
- EmberCounterType.COUNTER_MAC_TX_UNICAST_SUCCESS = 3;
1422
- // The MAC retried a unicast.
1423
- EmberCounterType.COUNTER_MAC_TX_UNICAST_RETRY = 4;
1424
- // The MAC unsuccessfully transmitted a unicast.
1425
- EmberCounterType.COUNTER_MAC_TX_UNICAST_FAILED = 5;
1426
- // The APS layer received a data broadcast.
1427
- EmberCounterType.COUNTER_APS_DATA_RX_BROADCAST = 6;
1428
- // The APS layer transmitted a data broadcast.
1429
- EmberCounterType.COUNTER_APS_DATA_TX_BROADCAST = 7;
1430
- // The APS layer received a data unicast.
1431
- EmberCounterType.COUNTER_APS_DATA_RX_UNICAST = 8;
1432
- // The APS layer successfully transmitted a data unicast.
1433
- EmberCounterType.COUNTER_APS_DATA_TX_UNICAST_SUCCESS = 9;
1434
- // The APS layer retried a data unicast.
1435
- EmberCounterType.COUNTER_APS_DATA_TX_UNICAST_RETRY = 10;
1436
- // The APS layer unsuccessfully transmitted a data unicast.
1437
- EmberCounterType.COUNTER_APS_DATA_TX_UNICAST_FAILED = 11;
1438
- // The network layer successfully submitted a new route discovery to the
1439
- // MAC.
1440
- EmberCounterType.COUNTER_ROUTE_DISCOVERY_INITIATED = 12;
1441
- // An entry was added to the neighbor table.
1442
- EmberCounterType.COUNTER_NEIGHBOR_ADDED = 13;
1443
- // An entry was removed from the neighbor table.
1444
- EmberCounterType.COUNTER_NEIGHBOR_REMOVED = 14;
1445
- // A neighbor table entry became stale because it had not been heard from.
1446
- EmberCounterType.COUNTER_NEIGHBOR_STALE = 15;
1447
- // A node joined or rejoined to the network via this node.
1448
- EmberCounterType.COUNTER_JOIN_INDICATION = 16;
1449
- // An entry was removed from the child table.
1450
- EmberCounterType.COUNTER_CHILD_REMOVED = 17;
1451
- // EZSP-UART only. An overflow error occurred in the UART.
1452
- EmberCounterType.COUNTER_ASH_OVERFLOW_ERROR = 18;
1453
- // EZSP-UART only. A framing error occurred in the UART.
1454
- EmberCounterType.COUNTER_ASH_FRAMING_ERROR = 19;
1455
- // EZSP-UART only. An overrun error occurred in the UART.
1456
- EmberCounterType.COUNTER_ASH_OVERRUN_ERROR = 20;
1457
- // A message was dropped at the network layer because the NWK frame counter
1458
- // was not higher than the last message seen from that source.
1459
- EmberCounterType.COUNTER_NWK_FRAME_COUNTER_FAILURE = 21;
1460
- // A message was dropped at the APS layer because the APS frame counter was
1461
- // not higher than the last message seen from that source.
1462
- EmberCounterType.COUNTER_APS_FRAME_COUNTER_FAILURE = 22;
1463
- // Utility counter for general debugging use.
1464
- EmberCounterType.COUNTER_UTILITY = 23;
1465
- // A message was dropped at the APS layer because it had APS encryption but
1466
- // the key associated with the sender has not been authenticated, and thus
1467
- // the key is not authorized for use in APS data messages.
1468
- EmberCounterType.COUNTER_APS_LINK_KEY_NOT_AUTHORIZED = 24;
1469
- // A NWK encrypted message was received but dropped because decryption
1470
- // failed.
1471
- EmberCounterType.COUNTER_NWK_DECRYPTION_FAILURE = 25;
1472
- // An APS encrypted message was received but dropped because decryption
1473
- // failed.
1474
- EmberCounterType.COUNTER_APS_DECRYPTION_FAILURE = 26;
1475
- // The number of times we failed to allocate a set of linked packet buffers.
1476
- // This doesn't necessarily mean that the packet buffer count was 0 at the
1477
- // time, but that the number requested was greater than the number free.
1478
- EmberCounterType.COUNTER_ALLOCATE_PACKET_BUFFER_FAILURE = 27;
1479
- // The number of relayed unicast packets.
1480
- EmberCounterType.COUNTER_RELAYED_UNICAST = 28;
1481
- // The number of times we dropped a packet due to reaching
1482
- // the preset PHY to MAC queue limit (emMaxPhyToMacQueueLength).
1483
- EmberCounterType.COUNTER_PHY_TO_MAC_QUEUE_LIMIT_REACHED = 29;
1484
- // The number of times we dropped a packet due to the
1485
- // packet-validate library checking a packet and rejecting it
1486
- // due to length or other formatting problems.
1487
- EmberCounterType.COUNTER_PACKET_VALIDATE_LIBRARY_DROPPED_COUNT = 30;
1488
- // The number of times the NWK retry queue is full and a
1489
- // new message failed to be added.
1490
- EmberCounterType.COUNTER_TYPE_NWK_RETRY_OVERFLOW = 31;
1491
- // The number of times the PHY layer was unable to transmit
1492
- // due to a failed CCA.
1493
- EmberCounterType.COUNTER_PHY_CCA_FAIL_COUNT = 32;
1494
- // The number of times a NWK broadcast was dropped because
1495
- // the broadcast table was full.
1496
- EmberCounterType.COUNTER_BROADCAST_TABLE_FULL = 33;
1497
- // The number of low priority packet traffic arbitration requests.
1498
- EmberCounterType.COUNTER_PTA_LO_PRI_REQUESTED = 34;
1499
- // The number of high priority packet traffic arbitration requests.
1500
- EmberCounterType.COUNTER_PTA_HI_PRI_REQUESTED = 35;
1501
- // The number of low priority packet traffic arbitration requests denied.
1502
- EmberCounterType.COUNTER_PTA_LO_PRI_DENIED = 36;
1503
- // The number of high priority packet traffic arbitration requests denied.
1504
- EmberCounterType.COUNTER_PTA_HI_PRI_DENIED = 37;
1505
- // The number of aborted low priority packet traffic arbitration transmissions.
1506
- EmberCounterType.COUNTER_PTA_LO_PRI_TX_ABORTED = 38;
1507
- // The number of aborted high priority packet traffic arbitration transmissions.
1508
- EmberCounterType.COUNTER_PTA_HI_PRI_TX_ABORTED = 39;
1509
- // A placeholder giving the number of Ember counter types.
1510
- EmberCounterType.COUNTER_TYPE_COUNT = 40;
1511
- class EmberJoinMethod extends basic.uint8_t {
1442
+ export class EmberJoinMethod extends basic.uint8_t {
1443
+ // The type of method used for joining.
1444
+ // Normally devices use MAC Association to join a network, which respects
1445
+ // the "permit joining" flag in the MAC Beacon. For mobile nodes this value
1446
+ // causes the device to use an Ember Mobile Node Join, which is functionally
1447
+ // equivalent to a MAC association. This value should be used by default.
1448
+ static USE_MAC_ASSOCIATION = 0x0;
1449
+ // For those networks where the "permit joining" flag is never turned on,
1450
+ // they will need to use a ZigBee NWK Rejoin. This value causes the rejoin
1451
+ // to be sent without NWK security and the Trust Center will be asked to
1452
+ // send the NWK key to the device. The NWK key sent to the device can be
1453
+ // encrypted with the device's corresponding Trust Center link key. That is
1454
+ // determined by the ::EmberJoinDecision on the Trust Center returned by the
1455
+ // ::emberTrustCenterJoinHandler(). For a mobile node this value will cause
1456
+ // it to use an Ember Mobile node rejoin, which is functionally equivalent.
1457
+ static USE_NWK_REJOIN = 0x1;
1458
+ // For those networks where the "permit joining" flag is never turned on,
1459
+ // they will need to use a NWK Rejoin. If those devices have been
1460
+ // preconfigured with the NWK key (including sequence number) they can use a
1461
+ // secured rejoin. This is only necessary for end devices since they need a
1462
+ // parent. Routers can simply use the ::USE_NWK_COMMISSIONING join method
1463
+ // below.
1464
+ static USE_NWK_REJOIN_HAVE_NWK_KEY = 0x2;
1465
+ // For those networks where all network and security information is known
1466
+ // ahead of time, a router device may be commissioned such that it does not
1467
+ // need to send any messages to begin communicating on the network.
1468
+ static USE_NWK_COMMISSIONING = 0x3;
1512
1469
  }
1513
- exports.EmberJoinMethod = EmberJoinMethod;
1514
- // The type of method used for joining.
1515
- // Normally devices use MAC Association to join a network, which respects
1516
- // the "permit joining" flag in the MAC Beacon. For mobile nodes this value
1517
- // causes the device to use an Ember Mobile Node Join, which is functionally
1518
- // equivalent to a MAC association. This value should be used by default.
1519
- EmberJoinMethod.USE_MAC_ASSOCIATION = 0x0;
1520
- // For those networks where the "permit joining" flag is never turned on,
1521
- // they will need to use a ZigBee NWK Rejoin. This value causes the rejoin
1522
- // to be sent without NWK security and the Trust Center will be asked to
1523
- // send the NWK key to the device. The NWK key sent to the device can be
1524
- // encrypted with the device's corresponding Trust Center link key. That is
1525
- // determined by the ::EmberJoinDecision on the Trust Center returned by the
1526
- // ::emberTrustCenterJoinHandler(). For a mobile node this value will cause
1527
- // it to use an Ember Mobile node rejoin, which is functionally equivalent.
1528
- EmberJoinMethod.USE_NWK_REJOIN = 0x1;
1529
- // For those networks where the "permit joining" flag is never turned on,
1530
- // they will need to use a NWK Rejoin. If those devices have been
1531
- // preconfigured with the NWK key (including sequence number) they can use a
1532
- // secured rejoin. This is only necessary for end devices since they need a
1533
- // parent. Routers can simply use the ::USE_NWK_COMMISSIONING join method
1534
- // below.
1535
- EmberJoinMethod.USE_NWK_REJOIN_HAVE_NWK_KEY = 0x2;
1536
- // For those networks where all network and security information is known
1537
- // ahead of time, a router device may be commissioned such that it does not
1538
- // need to send any messages to begin communicating on the network.
1539
- EmberJoinMethod.USE_NWK_COMMISSIONING = 0x3;
1540
- class EmberZdoConfigurationFlags extends basic.uint8_t {
1470
+ export class EmberZdoConfigurationFlags extends basic.uint8_t {
1471
+ // Flags for controlling which incoming ZDO requests are passed to the
1472
+ // application. To see if the application is required to send a ZDO response
1473
+ // to an incoming message, the application must check the APS options
1474
+ // bitfield within the incomingMessageHandler callback to see if the
1475
+ // APS_OPTION_ZDO_RESPONSE_REQUIRED flag is set.
1476
+ // Set this flag in order to receive supported ZDO request messages via the
1477
+ // incomingMessageHandler callback. A supported ZDO request is one that is
1478
+ // handled by the EmberZNet stack. The stack will continue to handle the
1479
+ // request and send the appropriate ZDO response even if this configuration
1480
+ // option is enabled.
1481
+ static APP_RECEIVES_SUPPORTED_ZDO_REQUESTS = 0x01;
1482
+ // Set this flag in order to receive unsupported ZDO request messages via
1483
+ // the incomingMessageHandler callback. An unsupported ZDO request is one
1484
+ // that is not handled by the EmberZNet stack, other than to send a 'not
1485
+ // supported' ZDO response. If this configuration option is enabled, the
1486
+ // stack will no longer send any ZDO response, and it is the application's
1487
+ // responsibility to do so.
1488
+ static APP_HANDLES_UNSUPPORTED_ZDO_REQUESTS = 0x02;
1489
+ // Set this flag in order to receive the following ZDO request messages via
1490
+ // the incomingMessageHandler callback: SIMPLE_DESCRIPTOR_REQUEST,
1491
+ // MATCH_DESCRIPTORS_REQUEST, and ACTIVE_ENDPOINTS_REQUEST. If this
1492
+ // configuration option is enabled, the stack will no longer send any ZDO
1493
+ // response for these requests, and it is the application's responsibility
1494
+ // to do so.
1495
+ static APP_HANDLES_ZDO_ENDPOINT_REQUESTS = 0x04;
1496
+ // Set this flag in order to receive the following ZDO request messages via
1497
+ // the incomingMessageHandler callback: BINDING_TABLE_REQUEST, BIND_REQUEST,
1498
+ // and UNBIND_REQUEST. If this configuration option is enabled, the stack
1499
+ // will no longer send any ZDO response for these requests, and it is the
1500
+ // application's responsibility to do so.
1501
+ static APP_HANDLES_ZDO_BINDING_REQUESTS = 0x08;
1541
1502
  }
1542
- exports.EmberZdoConfigurationFlags = EmberZdoConfigurationFlags;
1543
- // Flags for controlling which incoming ZDO requests are passed to the
1544
- // application. To see if the application is required to send a ZDO response
1545
- // to an incoming message, the application must check the APS options
1546
- // bitfield within the incomingMessageHandler callback to see if the
1547
- // APS_OPTION_ZDO_RESPONSE_REQUIRED flag is set.
1548
- // Set this flag in order to receive supported ZDO request messages via the
1549
- // incomingMessageHandler callback. A supported ZDO request is one that is
1550
- // handled by the EmberZNet stack. The stack will continue to handle the
1551
- // request and send the appropriate ZDO response even if this configuration
1552
- // option is enabled.
1553
- EmberZdoConfigurationFlags.APP_RECEIVES_SUPPORTED_ZDO_REQUESTS = 0x01;
1554
- // Set this flag in order to receive unsupported ZDO request messages via
1555
- // the incomingMessageHandler callback. An unsupported ZDO request is one
1556
- // that is not handled by the EmberZNet stack, other than to send a 'not
1557
- // supported' ZDO response. If this configuration option is enabled, the
1558
- // stack will no longer send any ZDO response, and it is the application's
1559
- // responsibility to do so.
1560
- EmberZdoConfigurationFlags.APP_HANDLES_UNSUPPORTED_ZDO_REQUESTS = 0x02;
1561
- // Set this flag in order to receive the following ZDO request messages via
1562
- // the incomingMessageHandler callback: SIMPLE_DESCRIPTOR_REQUEST,
1563
- // MATCH_DESCRIPTORS_REQUEST, and ACTIVE_ENDPOINTS_REQUEST. If this
1564
- // configuration option is enabled, the stack will no longer send any ZDO
1565
- // response for these requests, and it is the application's responsibility
1566
- // to do so.
1567
- EmberZdoConfigurationFlags.APP_HANDLES_ZDO_ENDPOINT_REQUESTS = 0x04;
1568
- // Set this flag in order to receive the following ZDO request messages via
1569
- // the incomingMessageHandler callback: BINDING_TABLE_REQUEST, BIND_REQUEST,
1570
- // and UNBIND_REQUEST. If this configuration option is enabled, the stack
1571
- // will no longer send any ZDO response for these requests, and it is the
1572
- // application's responsibility to do so.
1573
- EmberZdoConfigurationFlags.APP_HANDLES_ZDO_BINDING_REQUESTS = 0x08;
1574
- class EmberConcentratorType extends basic.uint16_t {
1503
+ export class EmberConcentratorType extends basic.uint16_t {
1504
+ // Type of concentrator.
1505
+ // A concentrator with insufficient memory to store source routes for the
1506
+ // entire network. Route records are sent to the concentrator prior to every
1507
+ // inbound APS unicast.
1508
+ static LOW_RAM_CONCENTRATOR = 0xFFF8;
1509
+ // A concentrator with sufficient memory to store source routes for the
1510
+ // entire network. Remote nodes stop sending route records once the
1511
+ // concentrator has successfully received one.
1512
+ static HIGH_RAM_CONCENTRATOR = 0xFFF9;
1575
1513
  }
1576
- exports.EmberConcentratorType = EmberConcentratorType;
1577
- // Type of concentrator.
1578
- // A concentrator with insufficient memory to store source routes for the
1579
- // entire network. Route records are sent to the concentrator prior to every
1580
- // inbound APS unicast.
1581
- EmberConcentratorType.LOW_RAM_CONCENTRATOR = 0xFFF8;
1582
- // A concentrator with sufficient memory to store source routes for the
1583
- // entire network. Remote nodes stop sending route records once the
1584
- // concentrator has successfully received one.
1585
- EmberConcentratorType.HIGH_RAM_CONCENTRATOR = 0xFFF9;
1586
- class EmberZllState extends basic.uint16_t {
1514
+ export class EmberZllState extends basic.uint16_t {
1515
+ // ZLL device state identifier.
1516
+ // No state.
1517
+ static ZLL_STATE_NONE = 0x0000;
1518
+ // The device is factory new.
1519
+ static ZLL_STATE_FACTORY_NEW = 0x0001;
1520
+ // The device is capable of assigning addresses to other devices.
1521
+ static ZLL_STATE_ADDRESS_ASSIGNMENT_CAPABLE = 0x0002;
1522
+ // The device is initiating a link operation.
1523
+ static ZLL_STATE_LINK_INITIATOR = 0x0010;
1524
+ // The device is requesting link priority.
1525
+ static ZLL_STATE_LINK_PRIORITY_REQUEST = 0x0020;
1526
+ // The device is on a non-ZLL network.
1527
+ static ZLL_STATE_NON_ZLL_NETWORK = 0x0100;
1587
1528
  }
1588
- exports.EmberZllState = EmberZllState;
1589
- // ZLL device state identifier.
1590
- // No state.
1591
- EmberZllState.ZLL_STATE_NONE = 0x0000;
1592
- // The device is factory new.
1593
- EmberZllState.ZLL_STATE_FACTORY_NEW = 0x0001;
1594
- // The device is capable of assigning addresses to other devices.
1595
- EmberZllState.ZLL_STATE_ADDRESS_ASSIGNMENT_CAPABLE = 0x0002;
1596
- // The device is initiating a link operation.
1597
- EmberZllState.ZLL_STATE_LINK_INITIATOR = 0x0010;
1598
- // The device is requesting link priority.
1599
- EmberZllState.ZLL_STATE_LINK_PRIORITY_REQUEST = 0x0020;
1600
- // The device is on a non-ZLL network.
1601
- EmberZllState.ZLL_STATE_NON_ZLL_NETWORK = 0x0100;
1602
- class EmberZllKeyIndex extends basic.uint8_t {
1529
+ export class EmberZllKeyIndex extends basic.uint8_t {
1530
+ // ZLL key encryption algorithm enumeration.
1531
+ // Key encryption algorithm for use during development.
1532
+ static ZLL_KEY_INDEX_DEVELOPMENT = 0x00;
1533
+ // Key encryption algorithm shared by all certified devices.
1534
+ static ZLL_KEY_INDEX_MASTER = 0x04;
1535
+ // Key encryption algorithm for use during development and certification.
1536
+ static ZLL_KEY_INDEX_CERTIFICATION = 0x0F;
1603
1537
  }
1604
- exports.EmberZllKeyIndex = EmberZllKeyIndex;
1605
- // ZLL key encryption algorithm enumeration.
1606
- // Key encryption algorithm for use during development.
1607
- EmberZllKeyIndex.ZLL_KEY_INDEX_DEVELOPMENT = 0x00;
1608
- // Key encryption algorithm shared by all certified devices.
1609
- EmberZllKeyIndex.ZLL_KEY_INDEX_MASTER = 0x04;
1610
- // Key encryption algorithm for use during development and certification.
1611
- EmberZllKeyIndex.ZLL_KEY_INDEX_CERTIFICATION = 0x0F;
1612
- class EzspZllNetworkOperation extends basic.uint8_t {
1538
+ export class EzspZllNetworkOperation extends basic.uint8_t {
1539
+ // Differentiates among ZLL network operations.
1540
+ static ZLL_FORM_NETWORK = 0x00; // ZLL form network command.
1541
+ static ZLL_JOIN_TARGET = 0x01; // ZLL join target command.
1613
1542
  }
1614
- exports.EzspZllNetworkOperation = EzspZllNetworkOperation;
1615
- // Differentiates among ZLL network operations.
1616
- EzspZllNetworkOperation.ZLL_FORM_NETWORK = 0x00; // ZLL form network command.
1617
- EzspZllNetworkOperation.ZLL_JOIN_TARGET = 0x01; // ZLL join target command.
1618
- class EzspSourceRouteOverheadInformation extends basic.uint8_t {
1543
+ export class EzspSourceRouteOverheadInformation extends basic.uint8_t {
1544
+ // Validates Source Route Overhead Information cached.
1545
+ // Ezsp source route overhead unknown
1546
+ static SOURCE_ROUTE_OVERHEAD_UNKNOWN = 0xFF;
1619
1547
  }
1620
- exports.EzspSourceRouteOverheadInformation = EzspSourceRouteOverheadInformation;
1621
- // Validates Source Route Overhead Information cached.
1622
- // Ezsp source route overhead unknown
1623
- EzspSourceRouteOverheadInformation.SOURCE_ROUTE_OVERHEAD_UNKNOWN = 0xFF;
1624
- class EmberNetworkInitBitmask extends basic.uint16_t {
1548
+ export class EmberNetworkInitBitmask extends basic.uint16_t {
1549
+ // Bitmask options for emberNetworkInit().
1550
+ // No options for Network Init
1551
+ static NETWORK_INIT_NO_OPTIONS = 0x0000;
1552
+ // Save parent info (node ID and EUI64) in a token during joining/rejoin,
1553
+ // and restore on reboot.
1554
+ static NETWORK_INIT_PARENT_INFO_IN_TOKEN = 0x0001;
1625
1555
  }
1626
- exports.EmberNetworkInitBitmask = EmberNetworkInitBitmask;
1627
- // Bitmask options for emberNetworkInit().
1628
- // No options for Network Init
1629
- EmberNetworkInitBitmask.NETWORK_INIT_NO_OPTIONS = 0x0000;
1630
- // Save parent info (node ID and EUI64) in a token during joining/rejoin,
1631
- // and restore on reboot.
1632
- EmberNetworkInitBitmask.NETWORK_INIT_PARENT_INFO_IN_TOKEN = 0x0001;
1633
- class EmberZDOCmd extends basic.uint16_t {
1556
+ export class EmberZDOCmd extends basic.uint16_t {
1557
+ // Device and Service Discovery Server Requests
1558
+ static NWK_addr_req = 0x0000;
1559
+ static IEEE_addr_req = 0x0001;
1560
+ static Node_Desc_req = 0x0002;
1561
+ static Power_Desc_req = 0x0003;
1562
+ static Simple_Desc_req = 0x0004;
1563
+ static Active_EP_req = 0x0005;
1564
+ static Match_Desc_req = 0x0006;
1565
+ static Complex_Desc_req = 0x0010;
1566
+ static User_Desc_req = 0x0011;
1567
+ static Discovery_Cache_req = 0x0012;
1568
+ static Device_annce = 0x0013;
1569
+ static User_Desc_set = 0x0014;
1570
+ static System_Server_Discovery_req = 0x0015;
1571
+ static Discovery_store_req = 0x0016;
1572
+ static Node_Desc_store_req = 0x0017;
1573
+ static Active_EP_store_req = 0x0019;
1574
+ static Simple_Desc_store_req = 0x001A;
1575
+ static Remove_node_cache_req = 0x001B;
1576
+ static Find_node_cache_req = 0x001C;
1577
+ static Extended_Simple_Desc_req = 0x001D;
1578
+ static Extended_Active_EP_req = 0x001E;
1579
+ static Parent_annce = 0x001F;
1580
+ // Bind Management Server Services Responses
1581
+ static End_Device_Bind_req = 0x0020;
1582
+ static Bind_req = 0x0021;
1583
+ static Unbind_req = 0x0022;
1584
+ // Network Management Server Services Requests
1585
+ // ... TODO optional stuff ...
1586
+ static Mgmt_Lqi_req = 0x0031;
1587
+ static Mgmt_Rtg_req = 0x0032;
1588
+ // ... TODO optional stuff ...
1589
+ static Mgmt_Leave_req = 0x0034;
1590
+ static Mgmt_Permit_Joining_req = 0x0036;
1591
+ static Mgmt_NWK_Update_req = 0x0038;
1592
+ // ... TODO optional stuff ...
1593
+ // Responses
1594
+ // Device and Service Discovery Server Responses
1595
+ static NWK_addr_rsp = 0x8000;
1596
+ static IEEE_addr_rsp = 0x8001;
1597
+ static Node_Desc_rsp = 0x8002;
1598
+ static Power_Desc_rsp = 0x8003;
1599
+ static Simple_Desc_rsp = 0x8004;
1600
+ static Active_EP_rsp = 0x8005;
1601
+ static Match_Desc_rsp = 0x8006;
1602
+ static Complex_Desc_rsp = 0x8010;
1603
+ static User_Desc_rsp = 0x8011;
1604
+ static Discovery_Cache_rsp = 0x8012;
1605
+ static User_Desc_conf = 0x8014;
1606
+ static System_Server_Discovery_rsp = 0x8015;
1607
+ static Discovery_Store_rsp = 0x8016;
1608
+ static Node_Desc_store_rsp = 0x8017;
1609
+ static Power_Desc_store_rsp = 0x8018;
1610
+ static Active_EP_store_rsp = 0x8019;
1611
+ static Simple_Desc_store_rsp = 0x801A;
1612
+ static Remove_node_cache_rsp = 0x801B;
1613
+ static Find_node_cache_rsp = 0x801C;
1614
+ static Extended_Simple_Desc_rsp = 0x801D;
1615
+ static Extended_Active_EP_rsp = 0x801E;
1616
+ static Parent_annce_rsp = 0x801F;
1617
+ // Bind Management Server Services Responses
1618
+ static End_Device_Bind_rsp = 0x8020;
1619
+ static Bind_rsp = 0x8021;
1620
+ static Unbind_rsp = 0x8022;
1621
+ // ... TODO optional stuff ...
1622
+ // Network Management Server Services Responses
1623
+ static Mgmt_Lqi_rsp = 0x8031;
1624
+ static Mgmt_Rtg_rsp = 0x8032;
1625
+ // ... TODO optional stuff ...
1626
+ static Mgmt_Leave_rsp = 0x8034;
1627
+ static Mgmt_Permit_Joining_rsp = 0x8036;
1628
+ // ... TODO optional stuff ...
1629
+ static Mgmt_NWK_Update_rsp = 0x8038;
1634
1630
  }
1635
- exports.EmberZDOCmd = EmberZDOCmd;
1636
- // Device and Service Discovery Server Requests
1637
- EmberZDOCmd.NWK_addr_req = 0x0000;
1638
- EmberZDOCmd.IEEE_addr_req = 0x0001;
1639
- EmberZDOCmd.Node_Desc_req = 0x0002;
1640
- EmberZDOCmd.Power_Desc_req = 0x0003;
1641
- EmberZDOCmd.Simple_Desc_req = 0x0004;
1642
- EmberZDOCmd.Active_EP_req = 0x0005;
1643
- EmberZDOCmd.Match_Desc_req = 0x0006;
1644
- EmberZDOCmd.Complex_Desc_req = 0x0010;
1645
- EmberZDOCmd.User_Desc_req = 0x0011;
1646
- EmberZDOCmd.Discovery_Cache_req = 0x0012;
1647
- EmberZDOCmd.Device_annce = 0x0013;
1648
- EmberZDOCmd.User_Desc_set = 0x0014;
1649
- EmberZDOCmd.System_Server_Discovery_req = 0x0015;
1650
- EmberZDOCmd.Discovery_store_req = 0x0016;
1651
- EmberZDOCmd.Node_Desc_store_req = 0x0017;
1652
- EmberZDOCmd.Active_EP_store_req = 0x0019;
1653
- EmberZDOCmd.Simple_Desc_store_req = 0x001A;
1654
- EmberZDOCmd.Remove_node_cache_req = 0x001B;
1655
- EmberZDOCmd.Find_node_cache_req = 0x001C;
1656
- EmberZDOCmd.Extended_Simple_Desc_req = 0x001D;
1657
- EmberZDOCmd.Extended_Active_EP_req = 0x001E;
1658
- EmberZDOCmd.Parent_annce = 0x001F;
1659
- // Bind Management Server Services Responses
1660
- EmberZDOCmd.End_Device_Bind_req = 0x0020;
1661
- EmberZDOCmd.Bind_req = 0x0021;
1662
- EmberZDOCmd.Unbind_req = 0x0022;
1663
- // Network Management Server Services Requests
1664
- // ... TODO optional stuff ...
1665
- EmberZDOCmd.Mgmt_Lqi_req = 0x0031;
1666
- EmberZDOCmd.Mgmt_Rtg_req = 0x0032;
1667
- // ... TODO optional stuff ...
1668
- EmberZDOCmd.Mgmt_Leave_req = 0x0034;
1669
- EmberZDOCmd.Mgmt_Permit_Joining_req = 0x0036;
1670
- EmberZDOCmd.Mgmt_NWK_Update_req = 0x0038;
1671
- // ... TODO optional stuff ...
1672
- // Responses
1673
- // Device and Service Discovery Server Responses
1674
- EmberZDOCmd.NWK_addr_rsp = 0x8000;
1675
- EmberZDOCmd.IEEE_addr_rsp = 0x8001;
1676
- EmberZDOCmd.Node_Desc_rsp = 0x8002;
1677
- EmberZDOCmd.Power_Desc_rsp = 0x8003;
1678
- EmberZDOCmd.Simple_Desc_rsp = 0x8004;
1679
- EmberZDOCmd.Active_EP_rsp = 0x8005;
1680
- EmberZDOCmd.Match_Desc_rsp = 0x8006;
1681
- EmberZDOCmd.Complex_Desc_rsp = 0x8010;
1682
- EmberZDOCmd.User_Desc_rsp = 0x8011;
1683
- EmberZDOCmd.Discovery_Cache_rsp = 0x8012;
1684
- EmberZDOCmd.User_Desc_conf = 0x8014;
1685
- EmberZDOCmd.System_Server_Discovery_rsp = 0x8015;
1686
- EmberZDOCmd.Discovery_Store_rsp = 0x8016;
1687
- EmberZDOCmd.Node_Desc_store_rsp = 0x8017;
1688
- EmberZDOCmd.Power_Desc_store_rsp = 0x8018;
1689
- EmberZDOCmd.Active_EP_store_rsp = 0x8019;
1690
- EmberZDOCmd.Simple_Desc_store_rsp = 0x801A;
1691
- EmberZDOCmd.Remove_node_cache_rsp = 0x801B;
1692
- EmberZDOCmd.Find_node_cache_rsp = 0x801C;
1693
- EmberZDOCmd.Extended_Simple_Desc_rsp = 0x801D;
1694
- EmberZDOCmd.Extended_Active_EP_rsp = 0x801E;
1695
- EmberZDOCmd.Parent_annce_rsp = 0x801F;
1696
- // Bind Management Server Services Responses
1697
- EmberZDOCmd.End_Device_Bind_rsp = 0x8020;
1698
- EmberZDOCmd.Bind_rsp = 0x8021;
1699
- EmberZDOCmd.Unbind_rsp = 0x8022;
1700
- // ... TODO optional stuff ...
1701
- // Network Management Server Services Responses
1702
- EmberZDOCmd.Mgmt_Lqi_rsp = 0x8031;
1703
- EmberZDOCmd.Mgmt_Rtg_rsp = 0x8032;
1704
- // ... TODO optional stuff ...
1705
- EmberZDOCmd.Mgmt_Leave_rsp = 0x8034;
1706
- EmberZDOCmd.Mgmt_Permit_Joining_rsp = 0x8036;
1707
- // ... TODO optional stuff ...
1708
- EmberZDOCmd.Mgmt_NWK_Update_rsp = 0x8038;
1709
- class EzspDecisionBitmask extends basic.uint16_t {
1631
+ export class EzspDecisionBitmask extends basic.uint16_t {
1632
+ // EZSP Decision bitmask.
1633
+ // Disallow joins and rejoins.
1634
+ static DEFAULT_CONFIGURATION = 0x0000;
1635
+ // Send the network key to all joining devices.
1636
+ static ALLOW_JOINS = 0x0001;
1637
+ // Send the network key to all rejoining devices.
1638
+ static ALLOW_UNSECURED_REJOINS = 0x0002;
1639
+ // Send the network key in the clear.
1640
+ static SEND_KEY_IN_CLEAR = 0x0004;
1641
+ // Do nothing for unsecured rejoins.
1642
+ static IGNORE_UNSECURED_REJOINS = 0x0008;
1643
+ // Allow joins if there is an entry in the transient key table.
1644
+ static JOINS_USE_INSTALL_CODE_KEY = 0x0010;
1645
+ // Delay sending the network key to a new joining device.
1646
+ static DEFER_JOINS = 0x0020;
1710
1647
  }
1711
- exports.EzspDecisionBitmask = EzspDecisionBitmask;
1712
- // EZSP Decision bitmask.
1713
- // Disallow joins and rejoins.
1714
- EzspDecisionBitmask.DEFAULT_CONFIGURATION = 0x0000;
1715
- // Send the network key to all joining devices.
1716
- EzspDecisionBitmask.ALLOW_JOINS = 0x0001;
1717
- // Send the network key to all rejoining devices.
1718
- EzspDecisionBitmask.ALLOW_UNSECURED_REJOINS = 0x0002;
1719
- // Send the network key in the clear.
1720
- EzspDecisionBitmask.SEND_KEY_IN_CLEAR = 0x0004;
1721
- // Do nothing for unsecured rejoins.
1722
- EzspDecisionBitmask.IGNORE_UNSECURED_REJOINS = 0x0008;
1723
- // Allow joins if there is an entry in the transient key table.
1724
- EzspDecisionBitmask.JOINS_USE_INSTALL_CODE_KEY = 0x0010;
1725
- // Delay sending the network key to a new joining device.
1726
- EzspDecisionBitmask.DEFER_JOINS = 0x0020;
1727
1648
  //# sourceMappingURL=named.js.map