zigbee-herdsman 7.0.6 → 8.0.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 (79) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/adapter/adapterDiscovery.d.ts.map +1 -1
  3. package/dist/adapter/adapterDiscovery.js +13 -0
  4. package/dist/adapter/adapterDiscovery.js.map +1 -1
  5. package/dist/adapter/deconz/driver/driver.d.ts +1 -0
  6. package/dist/adapter/deconz/driver/driver.d.ts.map +1 -1
  7. package/dist/adapter/deconz/driver/driver.js +11 -11
  8. package/dist/adapter/deconz/driver/driver.js.map +1 -1
  9. package/dist/adapter/deconz/driver/frameParser.d.ts.map +1 -1
  10. package/dist/adapter/deconz/driver/frameParser.js +15 -3
  11. package/dist/adapter/deconz/driver/frameParser.js.map +1 -1
  12. package/dist/adapter/ember/adapter/endpoints.js +1 -1
  13. package/dist/adapter/ember/ezsp/ezsp.d.ts.map +1 -1
  14. package/dist/adapter/ember/ezsp/ezsp.js +3 -3
  15. package/dist/adapter/ember/ezsp/ezsp.js.map +1 -1
  16. package/dist/adapter/ezsp/driver/driver.js +2 -2
  17. package/dist/adapter/ezsp/driver/driver.js.map +1 -1
  18. package/dist/adapter/ezsp/driver/ezsp.d.ts.map +1 -1
  19. package/dist/adapter/ezsp/driver/ezsp.js +3 -2
  20. package/dist/adapter/ezsp/driver/ezsp.js.map +1 -1
  21. package/dist/adapter/ezsp/driver/uart.d.ts.map +1 -1
  22. package/dist/adapter/ezsp/driver/uart.js +4 -3
  23. package/dist/adapter/ezsp/driver/uart.js.map +1 -1
  24. package/dist/adapter/z-stack/adapter/zStackAdapter.d.ts.map +1 -1
  25. package/dist/adapter/z-stack/adapter/zStackAdapter.js +8 -4
  26. package/dist/adapter/z-stack/adapter/zStackAdapter.js.map +1 -1
  27. package/dist/adapter/z-stack/znp/znp.d.ts.map +1 -1
  28. package/dist/adapter/z-stack/znp/znp.js +4 -3
  29. package/dist/adapter/z-stack/znp/znp.js.map +1 -1
  30. package/dist/adapter/zboss/driver.d.ts.map +1 -1
  31. package/dist/adapter/zboss/driver.js +4 -3
  32. package/dist/adapter/zboss/driver.js.map +1 -1
  33. package/dist/adapter/zboss/uart.d.ts.map +1 -1
  34. package/dist/adapter/zboss/uart.js +3 -2
  35. package/dist/adapter/zboss/uart.js.map +1 -1
  36. package/dist/adapter/zigate/driver/zigate.d.ts.map +1 -1
  37. package/dist/adapter/zigate/driver/zigate.js +7 -7
  38. package/dist/adapter/zigate/driver/zigate.js.map +1 -1
  39. package/dist/controller/helpers/zclFrameConverter.d.ts.map +1 -1
  40. package/dist/controller/helpers/zclFrameConverter.js +10 -2
  41. package/dist/controller/helpers/zclFrameConverter.js.map +1 -1
  42. package/dist/controller/model/endpoint.d.ts.map +1 -1
  43. package/dist/controller/model/endpoint.js +21 -1
  44. package/dist/controller/model/endpoint.js.map +1 -1
  45. package/dist/controller/model/group.d.ts.map +1 -1
  46. package/dist/controller/model/group.js +4 -1
  47. package/dist/controller/model/group.js.map +1 -1
  48. package/dist/utils/async-mutex.d.ts +7 -0
  49. package/dist/utils/async-mutex.d.ts.map +1 -0
  50. package/dist/utils/async-mutex.js +31 -0
  51. package/dist/utils/async-mutex.js.map +1 -0
  52. package/dist/zspec/zcl/buffaloZcl.d.ts +2 -32
  53. package/dist/zspec/zcl/buffaloZcl.d.ts.map +1 -1
  54. package/dist/zspec/zcl/buffaloZcl.js +76 -190
  55. package/dist/zspec/zcl/buffaloZcl.js.map +1 -1
  56. package/dist/zspec/zcl/definition/cluster.d.ts.map +1 -1
  57. package/dist/zspec/zcl/definition/cluster.js +5035 -3044
  58. package/dist/zspec/zcl/definition/cluster.js.map +1 -1
  59. package/dist/zspec/zcl/definition/clusters-types.d.ts +4501 -3149
  60. package/dist/zspec/zcl/definition/clusters-types.d.ts.map +1 -1
  61. package/dist/zspec/zcl/definition/datatypes.d.ts +2173 -0
  62. package/dist/zspec/zcl/definition/datatypes.d.ts.map +1 -0
  63. package/dist/zspec/zcl/definition/datatypes.js +2315 -0
  64. package/dist/zspec/zcl/definition/datatypes.js.map +1 -0
  65. package/dist/zspec/zcl/definition/foundation.js +54 -54
  66. package/dist/zspec/zcl/definition/tstype.d.ts +73 -10
  67. package/dist/zspec/zcl/definition/tstype.d.ts.map +1 -1
  68. package/dist/zspec/zcl/utils.d.ts +6 -1
  69. package/dist/zspec/zcl/utils.d.ts.map +1 -1
  70. package/dist/zspec/zcl/utils.js +118 -0
  71. package/dist/zspec/zcl/utils.js.map +1 -1
  72. package/dist/zspec/zcl/zclFrame.d.ts.map +1 -1
  73. package/dist/zspec/zcl/zclFrame.js +4 -2
  74. package/dist/zspec/zcl/zclFrame.js.map +1 -1
  75. package/package.json +1 -1
  76. package/dist/zspec/zcl/definition/clusters-typegen.d.ts +0 -2
  77. package/dist/zspec/zcl/definition/clusters-typegen.d.ts.map +0 -1
  78. package/dist/zspec/zcl/definition/clusters-typegen.js +0 -348
  79. package/dist/zspec/zcl/definition/clusters-typegen.js.map +0 -1
@@ -37,9 +37,12 @@ exports.BuffaloZcl = void 0;
37
37
  const buffalo_1 = require("../../buffalo");
38
38
  const logger_1 = require("../../utils/logger");
39
39
  const utils_1 = require("../../utils/utils");
40
+ const datatypes_1 = require("./definition/datatypes");
40
41
  const enums_1 = require("./definition/enums");
41
42
  const Utils = __importStar(require("./utils"));
42
43
  const NS = "zh:zcl:buffalo";
44
+ const UINT8_NON_VALUE = datatypes_1.ZCL_TYPE_INVALID_BY_TYPE[datatypes_1.ZclType.Uint8];
45
+ const UINT16_NON_VALUE = datatypes_1.ZCL_TYPE_INVALID_BY_TYPE[datatypes_1.ZclType.Uint16];
43
46
  const SEC_KEY_LENGTH = 16;
44
47
  const EXTENSION_FIELD_SETS_DATA_TYPE = {
45
48
  6: [enums_1.DataType.UINT8],
@@ -47,145 +50,29 @@ const EXTENSION_FIELD_SETS_DATA_TYPE = {
47
50
  258: [enums_1.DataType.UINT8, enums_1.DataType.UINT8],
48
51
  768: [enums_1.DataType.UINT16, enums_1.DataType.UINT16, enums_1.DataType.UINT16, enums_1.DataType.UINT8, enums_1.DataType.UINT8, enums_1.DataType.UINT8, enums_1.DataType.UINT16, enums_1.DataType.UINT16],
49
52
  };
50
- // UINT8_TMP_FIX: temporary return 0xff instead of Number.NaN
51
- // Will be replaced by https://github.com/Koenkk/zigbee-herdsman/pull/1503
52
- // https://github.com/Koenkk/zigbee-herdsman/issues/1498
53
- // https://github.com/Koenkk/zigbee-herdsman/pull/1510
54
53
  class BuffaloZcl extends buffalo_1.Buffalo {
55
- writeZclUInt8(value) {
56
- this.writeUInt8(value);
57
- // See UINT8_TMP_FIX
58
- // this.writeUInt8(Number.isNaN(value) ? 0xff : value);
59
- }
60
- readZclUInt8() {
54
+ readLengthUInt8() {
61
55
  const value = this.readUInt8();
62
- return value;
63
- // See UINT8_TMP_FIX
64
- // return value === 0xff ? Number.NaN : value;
65
- }
66
- writeZclUInt16(value) {
67
- this.writeUInt16(Number.isNaN(value) ? 0xffff : value);
56
+ return value === UINT8_NON_VALUE ? Number.NaN : value;
68
57
  }
69
- readZclUInt16() {
58
+ readLengthUInt16() {
70
59
  const value = this.readUInt16();
71
- return value === 0xffff ? Number.NaN : value;
72
- }
73
- writeZclUInt24(value) {
74
- this.writeUInt24(Number.isNaN(value) ? 0xffffff : value);
75
- }
76
- readZclUInt24() {
77
- const value = this.readUInt24();
78
- return value === 0xffffff ? Number.NaN : value;
79
- }
80
- writeZclUInt32(value) {
81
- this.writeUInt32(Number.isNaN(value) ? 0xffffffff : value);
82
- }
83
- readZclUInt32() {
84
- const value = this.readUInt32();
85
- return value === 0xffffffff ? Number.NaN : value;
86
- }
87
- writeZclUInt40(value) {
88
- this.writeUInt40(Number.isNaN(value) ? 0xffffffffff : value);
89
- }
90
- readZclUInt40() {
91
- const value = this.readUInt40();
92
- return value === 0xffffffffff ? Number.NaN : value;
93
- }
94
- writeZclUInt48(value) {
95
- this.writeUInt48(Number.isNaN(value) ? 0xffffffffffff : value);
96
- }
97
- readZclUInt48() {
98
- const value = this.readUInt48();
99
- return value === 0xffffffffffff ? Number.NaN : value;
100
- }
101
- writeZclUInt56(value) {
102
- this.writeUInt56(value === undefined ? 0xffffffffffffffn : value);
103
- }
104
- readZclUInt56() {
105
- const value = this.readUInt56();
106
- return value === 0xffffffffffffffn ? undefined : value;
107
- }
108
- writeZclUInt64(value) {
109
- this.writeUInt64(value === undefined ? 0xffffffffffffffffn : value);
110
- }
111
- readZclUInt64() {
112
- const value = this.readUInt64();
113
- return value === 0xffffffffffffffffn ? undefined : value;
114
- }
115
- writeZclInt8(value) {
116
- this.writeInt8(Number.isNaN(value) ? -0x80 : value);
117
- }
118
- readZclInt8() {
119
- const value = this.readInt8();
120
- return value === -0x80 ? Number.NaN : value;
121
- }
122
- writeZclInt16(value) {
123
- this.writeInt16(Number.isNaN(value) ? -0x8000 : value);
124
- }
125
- readZclInt16() {
126
- const value = this.readInt16();
127
- return value === -0x8000 ? Number.NaN : value;
128
- }
129
- writeZclInt24(value) {
130
- this.writeInt24(Number.isNaN(value) ? -0x800000 : value);
131
- }
132
- readZclInt24() {
133
- const value = this.readInt24();
134
- return value === -0x800000 ? Number.NaN : value;
135
- }
136
- writeZclInt32(value) {
137
- this.writeInt32(Number.isNaN(value) ? -0x80000000 : value);
138
- }
139
- readZclInt32() {
140
- const value = this.readInt32();
141
- return value === -0x80000000 ? Number.NaN : value;
142
- }
143
- writeZclInt40(value) {
144
- this.writeInt40(Number.isNaN(value) ? -0x8000000000 : value);
145
- }
146
- readZclInt40() {
147
- const value = this.readInt40();
148
- return value === -0x8000000000 ? Number.NaN : value;
149
- }
150
- writeZclInt48(value) {
151
- this.writeInt48(Number.isNaN(value) ? -0x800000000000 : value);
152
- }
153
- readZclInt48() {
154
- const value = this.readInt48();
155
- return value === -0x800000000000 ? Number.NaN : value;
156
- }
157
- writeZclInt56(value) {
158
- this.writeInt56(value === undefined ? -0x80000000000000n : value);
159
- }
160
- readZclInt56() {
161
- const value = this.readInt56();
162
- return value === -0x80000000000000n ? undefined : value;
163
- }
164
- writeZclInt64(value) {
165
- this.writeInt64(value === undefined ? -0x8000000000000000n : value);
166
- }
167
- readZclInt64() {
168
- const value = this.readInt64();
169
- return value === -0x8000000000000000n ? undefined : value;
60
+ return value === UINT16_NON_VALUE ? Number.NaN : value;
170
61
  }
171
62
  writeOctetStr(value) {
172
63
  if (value) {
173
64
  this.writeUInt8(value.length);
174
65
  this.writeBuffer(value, value.length);
175
- /* v8 ignore start */
176
66
  }
177
67
  else {
178
- // ignore because of UINT8_TMP_FIX
179
- this.writeUInt8(0xff); // non-value
68
+ this.writeUInt8(UINT8_NON_VALUE);
180
69
  }
181
- /* v8 ignore stop */
182
70
  }
183
71
  readOctetStr() {
184
- const length = this.readZclUInt8();
185
- // See UINT8_TMP_FIX
186
- return length < 0xff ? this.readBuffer(length) : Buffer.from([]); // non-value
187
- // return Number.isNaN(length) ? Buffer.from([]) : this.readBuffer(length);
72
+ const length = this.readLengthUInt8();
73
+ return Number.isNaN(length) ? Buffer.from([]) : this.readBuffer(length);
188
74
  }
75
+ // TODO: support read/write with specific `length` from attribute metadata (CHAR_STR & LONG_CHAR_STR)
189
76
  writeCharStr(value) {
190
77
  // In case of an empty string, send 0 length, from the spec:
191
78
  // "Setting this sub-field to 0x00 represents a character string with no character data (an “empty string”). Setting
@@ -201,14 +88,12 @@ class BuffaloZcl extends buffalo_1.Buffalo {
201
88
  }
202
89
  }
203
90
  else {
204
- this.writeUInt8(0xff); // non-value
91
+ this.writeUInt8(UINT8_NON_VALUE);
205
92
  }
206
93
  }
207
94
  readCharStr() {
208
- const length = this.readZclUInt8();
209
- // See UINT8_TMP_FIX
210
- return length < 0xff ? this.readUtf8String(length) : ""; // non-value
211
- // return Number.isNaN(length) ? "" : this.readUtf8String(length);
95
+ const length = this.readLengthUInt8();
96
+ return Number.isNaN(length) ? "" : this.readUtf8String(length);
212
97
  }
213
98
  writeLongOctetStr(value) {
214
99
  if (value) {
@@ -216,11 +101,11 @@ class BuffaloZcl extends buffalo_1.Buffalo {
216
101
  this.writeBuffer(value, value.length);
217
102
  }
218
103
  else {
219
- this.writeUInt16(0xffff); // non-value
104
+ this.writeUInt16(UINT16_NON_VALUE);
220
105
  }
221
106
  }
222
107
  readLongOctetStr() {
223
- const length = this.readZclUInt16();
108
+ const length = this.readLengthUInt16();
224
109
  return Number.isNaN(length) ? Buffer.from([]) : this.readBuffer(length);
225
110
  }
226
111
  writeLongCharStr(value) {
@@ -233,11 +118,11 @@ class BuffaloZcl extends buffalo_1.Buffalo {
233
118
  this.writeUtf8String(value);
234
119
  }
235
120
  else {
236
- this.writeUInt16(0xffff); // non-value
121
+ this.writeUInt16(UINT16_NON_VALUE);
237
122
  }
238
123
  }
239
124
  readLongCharStr() {
240
- const length = this.readZclUInt16();
125
+ const length = this.readLengthUInt16();
241
126
  return Number.isNaN(length) ? "" : this.readUtf8String(length);
242
127
  }
243
128
  writeArray(value) {
@@ -251,13 +136,14 @@ class BuffaloZcl extends buffalo_1.Buffalo {
251
136
  }
252
137
  else {
253
138
  this.writeUInt8(enums_1.DataType.NO_DATA); // XXX: correct value?
254
- this.writeUInt16(0xffff); // non-value
139
+ this.writeUInt16(UINT16_NON_VALUE);
255
140
  }
256
141
  }
142
+ // TODO: support read [] with specific length (`arrayLengthSize` & `arrayLengthField`) from parameter metadata
257
143
  readArray() {
258
144
  const values = [];
259
145
  const elementType = this.readUInt8();
260
- const numberOfElements = this.readZclUInt16();
146
+ const numberOfElements = this.readLengthUInt16();
261
147
  if (!Number.isNaN(numberOfElements)) {
262
148
  // not non-value
263
149
  for (let i = 0; i < numberOfElements; i++) {
@@ -276,12 +162,12 @@ class BuffaloZcl extends buffalo_1.Buffalo {
276
162
  }
277
163
  }
278
164
  else {
279
- this.writeUInt16(0xffff); // non-value
165
+ this.writeUInt16(UINT16_NON_VALUE);
280
166
  }
281
167
  }
282
168
  readStruct() {
283
169
  const values = [];
284
- const numberOfElements = this.readZclUInt16();
170
+ const numberOfElements = this.readLengthUInt16();
285
171
  if (!Number.isNaN(numberOfElements)) {
286
172
  // not non-value
287
173
  for (let i = 0; i < numberOfElements; i++) {
@@ -293,16 +179,16 @@ class BuffaloZcl extends buffalo_1.Buffalo {
293
179
  return values;
294
180
  }
295
181
  writeToD(value) {
296
- this.writeUInt8(value.hours == null || Number.isNaN(value.hours) ? 0xff : value.hours);
297
- this.writeUInt8(value.minutes == null || Number.isNaN(value.minutes) ? 0xff : value.minutes);
298
- this.writeUInt8(value.seconds == null || Number.isNaN(value.seconds) ? 0xff : value.seconds);
299
- this.writeUInt8(value.hundredths == null || Number.isNaN(value.hundredths) ? 0xff : value.hundredths);
182
+ this.writeUInt8(value.hours == null || Number.isNaN(value.hours) ? UINT8_NON_VALUE : value.hours);
183
+ this.writeUInt8(value.minutes == null || Number.isNaN(value.minutes) ? UINT8_NON_VALUE : value.minutes);
184
+ this.writeUInt8(value.seconds == null || Number.isNaN(value.seconds) ? UINT8_NON_VALUE : value.seconds);
185
+ this.writeUInt8(value.hundredths == null || Number.isNaN(value.hundredths) ? UINT8_NON_VALUE : value.hundredths);
300
186
  }
301
187
  readToD() {
302
- const hours = this.readZclUInt8();
303
- const minutes = this.readZclUInt8();
304
- const seconds = this.readZclUInt8();
305
- const hundredths = this.readZclUInt8();
188
+ const hours = this.readLengthUInt8();
189
+ const minutes = this.readLengthUInt8();
190
+ const seconds = this.readLengthUInt8();
191
+ const hundredths = this.readLengthUInt8();
306
192
  return {
307
193
  hours,
308
194
  minutes,
@@ -311,16 +197,16 @@ class BuffaloZcl extends buffalo_1.Buffalo {
311
197
  };
312
198
  }
313
199
  writeDate(value) {
314
- this.writeUInt8(value.year == null || Number.isNaN(value.year) ? 0xff : value.year - 1900);
315
- this.writeUInt8(value.month == null || Number.isNaN(value.month) ? 0xff : value.month);
316
- this.writeUInt8(value.dayOfMonth == null || Number.isNaN(value.dayOfMonth) ? 0xff : value.dayOfMonth);
317
- this.writeUInt8(value.dayOfWeek == null || Number.isNaN(value.dayOfWeek) ? 0xff : value.dayOfWeek);
200
+ this.writeUInt8(value.year == null || Number.isNaN(value.year) ? UINT8_NON_VALUE : value.year - 1900);
201
+ this.writeUInt8(value.month == null || Number.isNaN(value.month) ? UINT8_NON_VALUE : value.month);
202
+ this.writeUInt8(value.dayOfMonth == null || Number.isNaN(value.dayOfMonth) ? UINT8_NON_VALUE : value.dayOfMonth);
203
+ this.writeUInt8(value.dayOfWeek == null || Number.isNaN(value.dayOfWeek) ? UINT8_NON_VALUE : value.dayOfWeek);
318
204
  }
319
205
  readDate() {
320
- const year = this.readZclUInt8();
321
- const month = this.readZclUInt8();
322
- const dayOfMonth = this.readZclUInt8();
323
- const dayOfWeek = this.readZclUInt8();
206
+ const year = this.readLengthUInt8();
207
+ const month = this.readLengthUInt8();
208
+ const dayOfMonth = this.readLengthUInt8();
209
+ const dayOfWeek = this.readLengthUInt8();
324
210
  return {
325
211
  year: year + 1900, // remains NaN if year is NaN
326
212
  month,
@@ -377,10 +263,10 @@ class BuffaloZcl extends buffalo_1.Buffalo {
377
263
  for (const entry of value) {
378
264
  this.writeUInt16(entry.transitionTime);
379
265
  if (entry.heatSetpoint != null) {
380
- this.writeUInt16(entry.heatSetpoint);
266
+ this.writeInt16(entry.heatSetpoint);
381
267
  }
382
268
  if (entry.coolSetpoint != null) {
383
- this.writeUInt16(entry.coolSetpoint);
269
+ this.writeInt16(entry.coolSetpoint);
384
270
  }
385
271
  }
386
272
  }
@@ -396,10 +282,10 @@ class BuffaloZcl extends buffalo_1.Buffalo {
396
282
  transitionTime: this.readUInt16(),
397
283
  };
398
284
  if (heat) {
399
- entry.heatSetpoint = this.readUInt16();
285
+ entry.heatSetpoint = this.readInt16();
400
286
  }
401
287
  if (cool) {
402
- entry.coolSetpoint = this.readUInt16();
288
+ entry.coolSetpoint = this.readInt16();
403
289
  }
404
290
  result.push(entry);
405
291
  }
@@ -647,7 +533,7 @@ class BuffaloZcl extends buffalo_1.Buffalo {
647
533
  readMiStruct() {
648
534
  const length = this.readUInt8();
649
535
  const value = {};
650
- if (length === 0xff) {
536
+ if (length === UINT8_NON_VALUE) {
651
537
  return value;
652
538
  }
653
539
  for (let i = 0; i < length; i++) {
@@ -677,7 +563,7 @@ class BuffaloZcl extends buffalo_1.Buffalo {
677
563
  case enums_1.DataType.BITMAP8:
678
564
  case enums_1.DataType.UINT8:
679
565
  case enums_1.DataType.ENUM8: {
680
- this.writeZclUInt8(value);
566
+ this.writeUInt8(value);
681
567
  break;
682
568
  }
683
569
  case enums_1.DataType.DATA16:
@@ -686,13 +572,13 @@ class BuffaloZcl extends buffalo_1.Buffalo {
686
572
  case enums_1.DataType.ENUM16:
687
573
  case enums_1.DataType.CLUSTER_ID:
688
574
  case enums_1.DataType.ATTR_ID: {
689
- this.writeZclUInt16(value);
575
+ this.writeUInt16(value);
690
576
  break;
691
577
  }
692
578
  case enums_1.DataType.DATA24:
693
579
  case enums_1.DataType.BITMAP24:
694
580
  case enums_1.DataType.UINT24: {
695
- this.writeZclUInt24(value);
581
+ this.writeUInt24(value);
696
582
  break;
697
583
  }
698
584
  case enums_1.DataType.DATA32:
@@ -700,63 +586,63 @@ class BuffaloZcl extends buffalo_1.Buffalo {
700
586
  case enums_1.DataType.UINT32:
701
587
  case enums_1.DataType.UTC:
702
588
  case enums_1.DataType.BAC_OID: {
703
- this.writeZclUInt32(value);
589
+ this.writeUInt32(value);
704
590
  break;
705
591
  }
706
592
  case enums_1.DataType.DATA40:
707
593
  case enums_1.DataType.BITMAP40:
708
594
  case enums_1.DataType.UINT40: {
709
- this.writeZclUInt40(value);
595
+ this.writeUInt40(value);
710
596
  break;
711
597
  }
712
598
  case enums_1.DataType.DATA48:
713
599
  case enums_1.DataType.BITMAP48:
714
600
  case enums_1.DataType.UINT48: {
715
- this.writeZclUInt48(value);
601
+ this.writeUInt48(value);
716
602
  break;
717
603
  }
718
604
  case enums_1.DataType.DATA56:
719
605
  case enums_1.DataType.BITMAP56:
720
606
  case enums_1.DataType.UINT56: {
721
- this.writeZclUInt56(value);
607
+ this.writeUInt56(value);
722
608
  break;
723
609
  }
724
610
  case enums_1.DataType.DATA64:
725
611
  case enums_1.DataType.BITMAP64:
726
612
  case enums_1.DataType.UINT64: {
727
- this.writeZclUInt64(value);
613
+ this.writeUInt64(value);
728
614
  break;
729
615
  }
730
616
  case enums_1.DataType.INT8: {
731
- this.writeZclInt8(value);
617
+ this.writeInt8(value);
732
618
  break;
733
619
  }
734
620
  case enums_1.DataType.INT16: {
735
- this.writeZclInt16(value);
621
+ this.writeInt16(value);
736
622
  break;
737
623
  }
738
624
  case enums_1.DataType.INT24: {
739
- this.writeZclInt24(value);
625
+ this.writeInt24(value);
740
626
  break;
741
627
  }
742
628
  case enums_1.DataType.INT32: {
743
- this.writeZclInt32(value);
629
+ this.writeInt32(value);
744
630
  break;
745
631
  }
746
632
  case enums_1.DataType.INT40: {
747
- this.writeZclInt40(value);
633
+ this.writeInt40(value);
748
634
  break;
749
635
  }
750
636
  case enums_1.DataType.INT48: {
751
- this.writeZclInt48(value);
637
+ this.writeInt48(value);
752
638
  break;
753
639
  }
754
640
  case enums_1.DataType.INT56: {
755
- this.writeZclInt56(value);
641
+ this.writeInt56(value);
756
642
  break;
757
643
  }
758
644
  case enums_1.DataType.INT64: {
759
- this.writeZclInt64(value);
645
+ this.writeInt64(value);
760
646
  break;
761
647
  }
762
648
  // case DataType.SEMI_PREC: {
@@ -902,7 +788,7 @@ class BuffaloZcl extends buffalo_1.Buffalo {
902
788
  case enums_1.DataType.BITMAP8:
903
789
  case enums_1.DataType.UINT8:
904
790
  case enums_1.DataType.ENUM8: {
905
- return this.readZclUInt8();
791
+ return this.readUInt8();
906
792
  }
907
793
  case enums_1.DataType.DATA16:
908
794
  case enums_1.DataType.BITMAP16:
@@ -910,63 +796,63 @@ class BuffaloZcl extends buffalo_1.Buffalo {
910
796
  case enums_1.DataType.ENUM16:
911
797
  case enums_1.DataType.CLUSTER_ID:
912
798
  case enums_1.DataType.ATTR_ID: {
913
- return this.readZclUInt16();
799
+ return this.readUInt16();
914
800
  }
915
801
  case enums_1.DataType.DATA24:
916
802
  case enums_1.DataType.BITMAP24:
917
803
  case enums_1.DataType.UINT24: {
918
- return this.readZclUInt24();
804
+ return this.readUInt24();
919
805
  }
920
806
  case enums_1.DataType.DATA32:
921
807
  case enums_1.DataType.BITMAP32:
922
808
  case enums_1.DataType.UINT32:
923
809
  case enums_1.DataType.UTC:
924
810
  case enums_1.DataType.BAC_OID: {
925
- return this.readZclUInt32();
811
+ return this.readUInt32();
926
812
  }
927
813
  case enums_1.DataType.DATA40:
928
814
  case enums_1.DataType.BITMAP40:
929
815
  case enums_1.DataType.UINT40: {
930
- return this.readZclUInt40();
816
+ return this.readUInt40();
931
817
  }
932
818
  case enums_1.DataType.DATA48:
933
819
  case enums_1.DataType.BITMAP48:
934
820
  case enums_1.DataType.UINT48: {
935
- return this.readZclUInt48();
821
+ return this.readUInt48();
936
822
  }
937
823
  case enums_1.DataType.DATA56:
938
824
  case enums_1.DataType.BITMAP56:
939
825
  case enums_1.DataType.UINT56: {
940
- return this.readZclUInt56();
826
+ return this.readUInt56();
941
827
  }
942
828
  case enums_1.DataType.DATA64:
943
829
  case enums_1.DataType.BITMAP64:
944
830
  case enums_1.DataType.UINT64: {
945
- return this.readZclUInt64();
831
+ return this.readUInt64();
946
832
  }
947
833
  case enums_1.DataType.INT8: {
948
- return this.readZclInt8();
834
+ return this.readInt8();
949
835
  }
950
836
  case enums_1.DataType.INT16: {
951
- return this.readZclInt16();
837
+ return this.readInt16();
952
838
  }
953
839
  case enums_1.DataType.INT24: {
954
- return this.readZclInt24();
840
+ return this.readInt24();
955
841
  }
956
842
  case enums_1.DataType.INT32: {
957
- return this.readZclInt32();
843
+ return this.readInt32();
958
844
  }
959
845
  case enums_1.DataType.INT40: {
960
- return this.readZclInt40();
846
+ return this.readInt40();
961
847
  }
962
848
  case enums_1.DataType.INT48: {
963
- return this.readZclInt48();
849
+ return this.readInt48();
964
850
  }
965
851
  case enums_1.DataType.INT56: {
966
- return this.readZclInt56();
852
+ return this.readInt56();
967
853
  }
968
854
  case enums_1.DataType.INT64: {
969
- return this.readZclInt64();
855
+ return this.readInt64();
970
856
  }
971
857
  // case DataType.SEMI_PREC: {
972
858
  // // https://tc39.es/proposal-float16array/