zigbee-herdsman 6.0.2 → 6.0.3

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 (252) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.json +12 -3
  3. package/.github/ISSUE_TEMPLATE/config.yml +0 -5
  4. package/.github/dependabot.yml +0 -22
  5. package/.github/workflows/ci.yml +0 -69
  6. package/.github/workflows/release-please.yml +0 -18
  7. package/.github/workflows/stale.yml +0 -20
  8. package/.github/workflows/typedoc.yaml +0 -47
  9. package/.release-please-manifest.json +0 -3
  10. package/.vscode/extensions.json +0 -3
  11. package/.vscode/settings.json +0 -11
  12. package/biome.json +0 -98
  13. package/examples/join-and-log.js +0 -24
  14. package/release-please-config.json +0 -9
  15. package/src/adapter/adapter.ts +0 -189
  16. package/src/adapter/adapterDiscovery.ts +0 -666
  17. package/src/adapter/const.ts +0 -12
  18. package/src/adapter/deconz/adapter/deconzAdapter.ts +0 -877
  19. package/src/adapter/deconz/driver/constants.ts +0 -246
  20. package/src/adapter/deconz/driver/driver.ts +0 -1540
  21. package/src/adapter/deconz/driver/frame.ts +0 -11
  22. package/src/adapter/deconz/driver/frameParser.ts +0 -753
  23. package/src/adapter/deconz/driver/parser.ts +0 -45
  24. package/src/adapter/deconz/driver/writer.ts +0 -22
  25. package/src/adapter/deconz/types.d.ts +0 -13
  26. package/src/adapter/ember/adapter/emberAdapter.ts +0 -2265
  27. package/src/adapter/ember/adapter/endpoints.ts +0 -86
  28. package/src/adapter/ember/adapter/oneWaitress.ts +0 -324
  29. package/src/adapter/ember/adapter/tokensManager.ts +0 -782
  30. package/src/adapter/ember/consts.ts +0 -178
  31. package/src/adapter/ember/enums.ts +0 -1746
  32. package/src/adapter/ember/ezsp/buffalo.ts +0 -1392
  33. package/src/adapter/ember/ezsp/consts.ts +0 -148
  34. package/src/adapter/ember/ezsp/enums.ts +0 -1114
  35. package/src/adapter/ember/ezsp/ezsp.ts +0 -9061
  36. package/src/adapter/ember/ezspError.ts +0 -10
  37. package/src/adapter/ember/types.ts +0 -866
  38. package/src/adapter/ember/uart/ash.ts +0 -1960
  39. package/src/adapter/ember/uart/consts.ts +0 -109
  40. package/src/adapter/ember/uart/enums.ts +0 -192
  41. package/src/adapter/ember/uart/parser.ts +0 -48
  42. package/src/adapter/ember/uart/queues.ts +0 -247
  43. package/src/adapter/ember/uart/writer.ts +0 -53
  44. package/src/adapter/ember/utils/initters.ts +0 -58
  45. package/src/adapter/ember/utils/math.ts +0 -73
  46. package/src/adapter/events.ts +0 -21
  47. package/src/adapter/ezsp/adapter/backup.ts +0 -109
  48. package/src/adapter/ezsp/adapter/ezspAdapter.ts +0 -614
  49. package/src/adapter/ezsp/driver/commands.ts +0 -2497
  50. package/src/adapter/ezsp/driver/consts.ts +0 -11
  51. package/src/adapter/ezsp/driver/driver.ts +0 -1002
  52. package/src/adapter/ezsp/driver/ezsp.ts +0 -802
  53. package/src/adapter/ezsp/driver/frame.ts +0 -101
  54. package/src/adapter/ezsp/driver/index.ts +0 -4
  55. package/src/adapter/ezsp/driver/multicast.ts +0 -78
  56. package/src/adapter/ezsp/driver/parser.ts +0 -81
  57. package/src/adapter/ezsp/driver/types/basic.ts +0 -201
  58. package/src/adapter/ezsp/driver/types/index.ts +0 -239
  59. package/src/adapter/ezsp/driver/types/named.ts +0 -2330
  60. package/src/adapter/ezsp/driver/types/struct.ts +0 -844
  61. package/src/adapter/ezsp/driver/uart.ts +0 -460
  62. package/src/adapter/ezsp/driver/utils/crc16ccitt.ts +0 -44
  63. package/src/adapter/ezsp/driver/utils/index.ts +0 -32
  64. package/src/adapter/ezsp/driver/writer.ts +0 -64
  65. package/src/adapter/index.ts +0 -3
  66. package/src/adapter/serialPort.ts +0 -58
  67. package/src/adapter/socketPortUtils.ts +0 -16
  68. package/src/adapter/tstype.ts +0 -78
  69. package/src/adapter/z-stack/adapter/adapter-backup.ts +0 -519
  70. package/src/adapter/z-stack/adapter/adapter-nv-memory.ts +0 -457
  71. package/src/adapter/z-stack/adapter/endpoints.ts +0 -57
  72. package/src/adapter/z-stack/adapter/manager.ts +0 -543
  73. package/src/adapter/z-stack/adapter/tstype.ts +0 -6
  74. package/src/adapter/z-stack/adapter/zStackAdapter.ts +0 -1190
  75. package/src/adapter/z-stack/constants/af.ts +0 -27
  76. package/src/adapter/z-stack/constants/common.ts +0 -285
  77. package/src/adapter/z-stack/constants/dbg.ts +0 -23
  78. package/src/adapter/z-stack/constants/index.ts +0 -11
  79. package/src/adapter/z-stack/constants/mac.ts +0 -128
  80. package/src/adapter/z-stack/constants/sapi.ts +0 -25
  81. package/src/adapter/z-stack/constants/sys.ts +0 -72
  82. package/src/adapter/z-stack/constants/util.ts +0 -82
  83. package/src/adapter/z-stack/constants/utils.ts +0 -14
  84. package/src/adapter/z-stack/constants/zdo.ts +0 -103
  85. package/src/adapter/z-stack/models/startup-options.ts +0 -13
  86. package/src/adapter/z-stack/structs/entries/address-manager-entry.ts +0 -44
  87. package/src/adapter/z-stack/structs/entries/address-manager-table.ts +0 -19
  88. package/src/adapter/z-stack/structs/entries/aps-link-key-data-entry.ts +0 -12
  89. package/src/adapter/z-stack/structs/entries/aps-link-key-data-table.ts +0 -21
  90. package/src/adapter/z-stack/structs/entries/aps-tc-link-key-entry.ts +0 -19
  91. package/src/adapter/z-stack/structs/entries/aps-tc-link-key-table.ts +0 -21
  92. package/src/adapter/z-stack/structs/entries/channel-list.ts +0 -8
  93. package/src/adapter/z-stack/structs/entries/has-configured.ts +0 -16
  94. package/src/adapter/z-stack/structs/entries/index.ts +0 -16
  95. package/src/adapter/z-stack/structs/entries/nib.ts +0 -66
  96. package/src/adapter/z-stack/structs/entries/nwk-key-descriptor.ts +0 -15
  97. package/src/adapter/z-stack/structs/entries/nwk-key.ts +0 -13
  98. package/src/adapter/z-stack/structs/entries/nwk-pan-id.ts +0 -8
  99. package/src/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-entry.ts +0 -20
  100. package/src/adapter/z-stack/structs/entries/nwk-sec-material-descriptor-table.ts +0 -19
  101. package/src/adapter/z-stack/structs/entries/security-manager-entry.ts +0 -33
  102. package/src/adapter/z-stack/structs/entries/security-manager-table.ts +0 -22
  103. package/src/adapter/z-stack/structs/index.ts +0 -4
  104. package/src/adapter/z-stack/structs/serializable-memory-object.ts +0 -14
  105. package/src/adapter/z-stack/structs/struct.ts +0 -367
  106. package/src/adapter/z-stack/structs/table.ts +0 -198
  107. package/src/adapter/z-stack/unpi/constants.ts +0 -33
  108. package/src/adapter/z-stack/unpi/frame.ts +0 -62
  109. package/src/adapter/z-stack/unpi/index.ts +0 -4
  110. package/src/adapter/z-stack/unpi/parser.ts +0 -56
  111. package/src/adapter/z-stack/unpi/writer.ts +0 -21
  112. package/src/adapter/z-stack/utils/channel-list.ts +0 -40
  113. package/src/adapter/z-stack/utils/index.ts +0 -2
  114. package/src/adapter/z-stack/utils/network-options.ts +0 -26
  115. package/src/adapter/z-stack/znp/buffaloZnp.ts +0 -175
  116. package/src/adapter/z-stack/znp/definition.ts +0 -2713
  117. package/src/adapter/z-stack/znp/index.ts +0 -2
  118. package/src/adapter/z-stack/znp/parameterType.ts +0 -22
  119. package/src/adapter/z-stack/znp/tstype.ts +0 -44
  120. package/src/adapter/z-stack/znp/utils.ts +0 -10
  121. package/src/adapter/z-stack/znp/znp.ts +0 -342
  122. package/src/adapter/z-stack/znp/zpiObject.ts +0 -148
  123. package/src/adapter/zboss/adapter/zbossAdapter.ts +0 -526
  124. package/src/adapter/zboss/commands.ts +0 -1184
  125. package/src/adapter/zboss/consts.ts +0 -9
  126. package/src/adapter/zboss/driver.ts +0 -422
  127. package/src/adapter/zboss/enums.ts +0 -360
  128. package/src/adapter/zboss/frame.ts +0 -227
  129. package/src/adapter/zboss/reader.ts +0 -65
  130. package/src/adapter/zboss/types.ts +0 -0
  131. package/src/adapter/zboss/uart.ts +0 -428
  132. package/src/adapter/zboss/utils.ts +0 -58
  133. package/src/adapter/zboss/writer.ts +0 -49
  134. package/src/adapter/zigate/adapter/patchZdoBuffaloBE.ts +0 -27
  135. package/src/adapter/zigate/adapter/zigateAdapter.ts +0 -618
  136. package/src/adapter/zigate/driver/LICENSE +0 -17
  137. package/src/adapter/zigate/driver/buffaloZiGate.ts +0 -212
  138. package/src/adapter/zigate/driver/commandType.ts +0 -418
  139. package/src/adapter/zigate/driver/constants.ts +0 -150
  140. package/src/adapter/zigate/driver/frame.ts +0 -197
  141. package/src/adapter/zigate/driver/messageType.ts +0 -287
  142. package/src/adapter/zigate/driver/parameterType.ts +0 -32
  143. package/src/adapter/zigate/driver/ziGateObject.ts +0 -146
  144. package/src/adapter/zigate/driver/zigate.ts +0 -423
  145. package/src/adapter/zoh/adapter/utils.ts +0 -27
  146. package/src/adapter/zoh/adapter/zohAdapter.ts +0 -838
  147. package/src/buffalo/buffalo.ts +0 -342
  148. package/src/buffalo/index.ts +0 -1
  149. package/src/controller/controller.ts +0 -1022
  150. package/src/controller/database.ts +0 -124
  151. package/src/controller/events.ts +0 -52
  152. package/src/controller/greenPower.ts +0 -603
  153. package/src/controller/helpers/index.ts +0 -1
  154. package/src/controller/helpers/installCodes.ts +0 -107
  155. package/src/controller/helpers/request.ts +0 -96
  156. package/src/controller/helpers/requestQueue.ts +0 -125
  157. package/src/controller/helpers/zclFrameConverter.ts +0 -47
  158. package/src/controller/helpers/zclTransactionSequenceNumber.ts +0 -19
  159. package/src/controller/index.ts +0 -6
  160. package/src/controller/model/device.ts +0 -1249
  161. package/src/controller/model/endpoint.ts +0 -1105
  162. package/src/controller/model/entity.ts +0 -23
  163. package/src/controller/model/group.ts +0 -424
  164. package/src/controller/model/index.ts +0 -5
  165. package/src/controller/model/zigbeeEntity.ts +0 -30
  166. package/src/controller/touchlink.ts +0 -189
  167. package/src/controller/tstype.ts +0 -274
  168. package/src/index.ts +0 -12
  169. package/src/models/backup-storage-legacy.ts +0 -48
  170. package/src/models/backup-storage-unified.ts +0 -47
  171. package/src/models/backup.ts +0 -37
  172. package/src/models/index.ts +0 -5
  173. package/src/models/network-options.ts +0 -11
  174. package/src/utils/backup.ts +0 -152
  175. package/src/utils/index.ts +0 -5
  176. package/src/utils/logger.ts +0 -20
  177. package/src/utils/patchBigIntSerialization.ts +0 -8
  178. package/src/utils/queue.ts +0 -76
  179. package/src/utils/types.d.ts +0 -3
  180. package/src/utils/utils.ts +0 -19
  181. package/src/utils/wait.ts +0 -5
  182. package/src/utils/waitress.ts +0 -96
  183. package/src/zspec/consts.ts +0 -84
  184. package/src/zspec/enums.ts +0 -22
  185. package/src/zspec/index.ts +0 -3
  186. package/src/zspec/tstypes.ts +0 -18
  187. package/src/zspec/utils.ts +0 -247
  188. package/src/zspec/zcl/buffaloZcl.ts +0 -1220
  189. package/src/zspec/zcl/definition/cluster.ts +0 -5915
  190. package/src/zspec/zcl/definition/clusters-typegen.ts +0 -588
  191. package/src/zspec/zcl/definition/clusters-types.ts +0 -7331
  192. package/src/zspec/zcl/definition/consts.ts +0 -24
  193. package/src/zspec/zcl/definition/enums.ts +0 -203
  194. package/src/zspec/zcl/definition/foundation.ts +0 -329
  195. package/src/zspec/zcl/definition/manufacturerCode.ts +0 -729
  196. package/src/zspec/zcl/definition/status.ts +0 -69
  197. package/src/zspec/zcl/definition/tstype.ts +0 -377
  198. package/src/zspec/zcl/index.ts +0 -11
  199. package/src/zspec/zcl/utils.ts +0 -321
  200. package/src/zspec/zcl/zclFrame.ts +0 -356
  201. package/src/zspec/zcl/zclHeader.ts +0 -102
  202. package/src/zspec/zcl/zclStatusError.ts +0 -10
  203. package/src/zspec/zdo/buffaloZdo.ts +0 -2336
  204. package/src/zspec/zdo/definition/clusters.ts +0 -722
  205. package/src/zspec/zdo/definition/consts.ts +0 -16
  206. package/src/zspec/zdo/definition/enums.ts +0 -99
  207. package/src/zspec/zdo/definition/status.ts +0 -105
  208. package/src/zspec/zdo/definition/tstypes.ts +0 -1062
  209. package/src/zspec/zdo/index.ts +0 -7
  210. package/src/zspec/zdo/utils.ts +0 -76
  211. package/src/zspec/zdo/zdoStatusError.ts +0 -10
  212. package/test/adapter/adapter.test.ts +0 -1062
  213. package/test/adapter/ember/ash.test.ts +0 -337
  214. package/test/adapter/ember/consts.ts +0 -131
  215. package/test/adapter/ember/emberAdapter.test.ts +0 -3449
  216. package/test/adapter/ember/ezsp.test.ts +0 -385
  217. package/test/adapter/ember/ezspBuffalo.test.ts +0 -93
  218. package/test/adapter/ember/ezspError.test.ts +0 -12
  219. package/test/adapter/ember/math.test.ts +0 -206
  220. package/test/adapter/ezsp/frame.test.ts +0 -30
  221. package/test/adapter/ezsp/uart.test.ts +0 -181
  222. package/test/adapter/z-stack/adapter.test.ts +0 -3984
  223. package/test/adapter/z-stack/constants.test.ts +0 -33
  224. package/test/adapter/z-stack/structs.test.ts +0 -115
  225. package/test/adapter/z-stack/unpi.test.ts +0 -213
  226. package/test/adapter/z-stack/znp.test.ts +0 -1284
  227. package/test/adapter/zboss/fixZdoResponse.test.ts +0 -179
  228. package/test/adapter/zigate/patchZdoBuffaloBE.test.ts +0 -81
  229. package/test/adapter/zigate/zdo.test.ts +0 -187
  230. package/test/adapter/zoh/utils.test.ts +0 -36
  231. package/test/adapter/zoh/zohAdapter.test.ts +0 -1307
  232. package/test/benchOptions.ts +0 -14
  233. package/test/buffalo.test.ts +0 -431
  234. package/test/controller.bench.ts +0 -214
  235. package/test/controller.test.ts +0 -8702
  236. package/test/greenpower.test.ts +0 -1408
  237. package/test/mockAdapters.ts +0 -65
  238. package/test/mockDevices.ts +0 -598
  239. package/test/requests.bench.ts +0 -229
  240. package/test/testUtils.ts +0 -20
  241. package/test/tsconfig.json +0 -9
  242. package/test/utils/math.ts +0 -19
  243. package/test/utils.test.ts +0 -279
  244. package/test/vitest.config.mts +0 -26
  245. package/test/zcl.test.ts +0 -2831
  246. package/test/zspec/utils.test.ts +0 -68
  247. package/test/zspec/zcl/buffalo.test.ts +0 -1374
  248. package/test/zspec/zcl/frame.test.ts +0 -960
  249. package/test/zspec/zcl/utils.test.ts +0 -273
  250. package/test/zspec/zdo/buffalo.test.ts +0 -1850
  251. package/test/zspec/zdo/utils.test.ts +0 -241
  252. package/tsconfig.json +0 -24
@@ -1,178 +0,0 @@
1
- //-------------------------------------------------------------------------------------------------
2
- // General
3
-
4
- /** Serves to initialize cache for config IDs */
5
- export const INVALID_CONFIG_VALUE = 0xffff;
6
- /** Serves to initialize cache */
7
- export const INVALID_RADIO_CHANNEL = 0xff;
8
- /**
9
- * A distinguished network ID that will never be assigned to any node.
10
- * This value is returned when getting the remote node ID from the binding table and the given binding table index refers
11
- * to a multicast binding entry.
12
- */
13
- export const EMBER_MULTICAST_NODE_ID = 0xfffe;
14
- /**
15
- * A distinguished network ID that will never be assigned
16
- * to any node. This value is used when getting the remote node ID
17
- * from the address or binding tables. It indicates that the address
18
- * or binding table entry is currently in use but the node ID
19
- * corresponding to the EUI64 in the table is currently unknown.
20
- */
21
- export const EMBER_UNKNOWN_NODE_ID = 0xfffd;
22
- /**
23
- * A distinguished network ID that will never be assigned
24
- * to any node. This value is used when getting the remote node ID
25
- * from the address or binding tables. It indicates that the address
26
- * or binding table entry is currently in use and network address
27
- * discovery is underway.
28
- */
29
- export const EMBER_DISCOVERY_ACTIVE_NODE_ID = 0xfffc;
30
- /** A distinguished address table index used to indicate the absence of an address table entry. */
31
- export const EMBER_NULL_ADDRESS_TABLE_INDEX = 0xff;
32
- /** Invalidates cached information */
33
- export const SOURCE_ROUTE_OVERHEAD_UNKNOWN = 0xff;
34
-
35
- //-------------------------------------------------------------------------------------------------
36
- // Network
37
-
38
- // From table 3.51 of 053474r14
39
- // When sending many-to-one route requests, the following
40
- // addresses are used
41
- // 0xFFF9 indicates a non-memory-constrained many-to-one route request
42
- // 0xFFF8 indicates a memory-constrained many-to-one route request
43
- export const EMBER_MIN_BROADCAST_ADDRESS = 0xfff8;
44
-
45
- /**
46
- * The additional overhead required for network source routing (relay count = 1, relay index = 1).
47
- * This does not include the size of the relay list itself.
48
- */
49
- export const NWK_SOURCE_ROUTE_OVERHEAD = 2;
50
- export const SOURCE_ROUTING_RESERVED_PAYLOAD_LENGTH = 0;
51
- /**
52
- * The maximum APS payload, not including any APS options.
53
- * This value is also available from emberMaximumApsPayloadLength() or ezspMaximumPayloadLength().
54
- * See http://portal.ember.com/faq/payload for more information.
55
- */
56
- export const MAXIMUM_APS_PAYLOAD_LENGTH = 82 - SOURCE_ROUTING_RESERVED_PAYLOAD_LENGTH;
57
- // export const MAXIMUM_APS_PAYLOAD_LENGTH_SECURITY_NONE = (100 - SOURCE_ROUTING_RESERVED_PAYLOAD_LENGTH);
58
- /** The additional overhead required for APS encryption (security = 5, MIC = 4). */
59
- export const APS_ENCRYPTION_OVERHEAD = 9;
60
- /** The additional overhead required for APS fragmentation. */
61
- export const APS_FRAGMENTATION_OVERHEAD = 2;
62
-
63
- /** An inactive concentrator. */
64
- export const EMBER_INACTIVE_CONCENTRATOR = 0xffff;
65
- /**
66
- * A concentrator with insufficient memory to store source routes for the entire network.
67
- * Route records are sent to the concentrator prior to every inbound APS unicast.
68
- */
69
- export const EMBER_LOW_RAM_CONCENTRATOR = 0xfff8;
70
- /**
71
- * A concentrator with sufficient memory to store source routes for the entire network.
72
- * Remote nodes stop sending route records once the concentrator has successfully received one.
73
- */
74
- export const EMBER_HIGH_RAM_CONCENTRATOR = 0xfff9;
75
-
76
- //-------------------------------------------------------------------------------------------------
77
- // Security
78
-
79
- /** The short address of the trust center. This address never changes dynamically. */
80
- export const EMBER_TRUST_CENTER_NODE_ID = 0x0000;
81
-
82
- /**
83
- * Default value for context's PSA algorithm permission (CCM* with 4 byte tag).
84
- * Only used by NCPs with secure key storage; define is mirrored here to allow
85
- * host code to initialize the context itself rather than needing a new EZSP frame.
86
- */
87
- export const ZB_PSA_ALG = 0x05440100;
88
-
89
- export const STACK_PROFILE_ZIGBEE_PRO = 0x02;
90
- export const SECURITY_LEVEL_Z3 = 0x05;
91
-
92
- /** This key is "ZigBeeAlliance09" */
93
- export const ZIGBEE_PROFILE_INTEROPERABILITY_LINK_KEY: readonly number[] = [
94
- 0x5a, 0x69, 0x67, 0x42, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x30, 0x39,
95
- ];
96
-
97
- //-------------------------------------------------------------------------------------------------
98
- // Zigbee Green Power types and defines.
99
-
100
- /** Number of GP sink list entries. Minimum is 2 sink list entries. */
101
- export const GP_SINK_LIST_ENTRIES = 2;
102
- /** The size of the SinkList entries in sink table in format of octet string that has a format of {<1 byte length>, <n bytes for sink groups>} */
103
- export const GP_SIZE_OF_SINK_LIST_ENTRIES_OCTET_STRING = 1 + GP_SINK_LIST_ENTRIES * 4; // sizeof(EmberGpSinkGroup) === uint16_t * 2
104
-
105
- //-------------------------------------------------------------------------------------------------
106
- //-- InterPAN
107
-
108
- // Max PHY size = 128
109
- // -1 byte for PHY length
110
- // -2 bytes for MAC CRC
111
- export const MAXIMUM_INTERPAN_LENGTH = 125;
112
-
113
- // MAC frame control
114
- // Bits:
115
- // | 0-2 | 3 | 4 | 5 | 6 | 7-9 | 10-11 | 12-13 | 14-15 |
116
- // | Frame | Security | Frame | Ack | Intra | Reserved | Dest. | Reserved | Src |
117
- // | Type | Enabled | Pending | Req | PAN | | Addr. | | Adrr. |
118
- // | | | | | | | Mode | | Mode |
119
-
120
- // Frame Type
121
- // 000 = Beacon
122
- // 001 = Data
123
- // 010 = Acknwoledgement
124
- // 011 = MAC Command
125
- // 100 - 111 = Reserved
126
-
127
- // Addressing Mode
128
- // 00 - PAN ID and address field are not present
129
- // 01 - Reserved
130
- // 10 - Address field contains a 16-bit short address
131
- // 11 - Address field contains a 64-bit extended address
132
-
133
- const MAC_FRAME_TYPE_DATA = 0x0001;
134
- // const MAC_FRAME_SOURCE_MODE_SHORT = 0x8000;
135
- const MAC_FRAME_SOURCE_MODE_LONG = 0xc000;
136
- const MAC_FRAME_DESTINATION_MODE_SHORT = 0x0800;
137
- const MAC_FRAME_DESTINATION_MODE_LONG = 0x0c00;
138
-
139
- // The two possible incoming MAC frame controls.
140
- // Using short source address is not allowed.
141
- export const SHORT_DEST_FRAME_CONTROL = MAC_FRAME_TYPE_DATA | MAC_FRAME_DESTINATION_MODE_SHORT | MAC_FRAME_SOURCE_MODE_LONG;
142
- export const LONG_DEST_FRAME_CONTROL = MAC_FRAME_TYPE_DATA | MAC_FRAME_DESTINATION_MODE_LONG | MAC_FRAME_SOURCE_MODE_LONG;
143
-
144
- export const MAC_ACK_REQUIRED = 0x0020;
145
-
146
- /** NWK stub frame has two control bytes. */
147
- export const STUB_NWK_SIZE = 2;
148
- export const STUB_NWK_FRAME_CONTROL = 0x000b;
149
-
150
- /**
151
- * Interpan APS Unicast, same for Broadcast.
152
- * - Frame Control (1-byte)
153
- * - Cluster ID (2-bytes)
154
- * - Profile ID (2-bytes)
155
- */
156
- export const INTERPAN_APS_UNICAST_BROADCAST_SIZE = 5;
157
- /**
158
- * Interpan APS Multicast
159
- * - Frame Control (1-byte)
160
- * - Group ID (2-bytes)
161
- * - Cluster ID (2-bytes)
162
- * - Profile ID (2-bytes)
163
- */
164
- export const INTERPAN_APS_MULTICAST_SIZE = 7;
165
-
166
- export const MAX_STUB_APS_SIZE = INTERPAN_APS_MULTICAST_SIZE;
167
- export const MIN_STUB_APS_SIZE = INTERPAN_APS_UNICAST_BROADCAST_SIZE;
168
-
169
- export const INTERPAN_APS_FRAME_TYPE = 0x03;
170
- export const INTERPAN_APS_FRAME_TYPE_MASK = 0x03;
171
-
172
- /** The only allowed APS FC value (without the delivery mode subfield) */
173
- export const INTERPAN_APS_FRAME_CONTROL_NO_DELIVERY_MODE = INTERPAN_APS_FRAME_TYPE;
174
-
175
- export const INTERPAN_APS_FRAME_DELIVERY_MODE_MASK = 0x0c;
176
- export const INTERPAN_APS_FRAME_SECURITY = 0x20;
177
-
178
- export const MANUFACTURING_STRING_SIZE = 16;