@zwave-js/nvmedit 14.0.0-beta.4 → 14.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.
- package/build/cjs/lib/nvm3/files/ApplicationCCsFile.js +105 -58
- package/build/cjs/lib/nvm3/files/ApplicationCCsFile.js.map +2 -2
- package/build/cjs/lib/nvm3/files/ApplicationDataFile.js +69 -22
- package/build/cjs/lib/nvm3/files/ApplicationDataFile.js.map +2 -2
- package/build/cjs/lib/nvm3/files/ApplicationNameFile.js +71 -24
- package/build/cjs/lib/nvm3/files/ApplicationNameFile.js.map +2 -2
- package/build/cjs/lib/nvm3/files/ApplicationRFConfigFile.js +140 -93
- package/build/cjs/lib/nvm3/files/ApplicationRFConfigFile.js.map +2 -2
- package/build/cjs/lib/nvm3/files/ApplicationTypeFile.js +92 -45
- package/build/cjs/lib/nvm3/files/ApplicationTypeFile.js.map +2 -2
- package/build/cjs/lib/nvm3/files/ControllerInfoFile.js +176 -129
- package/build/cjs/lib/nvm3/files/ControllerInfoFile.js.map +2 -2
- package/build/cjs/lib/nvm3/files/NVMFile.d.ts +3 -3
- package/build/cjs/lib/nvm3/files/NVMFile.js.map +1 -1
- package/build/cjs/lib/nvm3/files/NodeInfoFiles.js +186 -111
- package/build/cjs/lib/nvm3/files/NodeInfoFiles.js.map +2 -2
- package/build/cjs/lib/nvm3/files/ProtocolNodeMaskFiles.js +243 -84
- package/build/cjs/lib/nvm3/files/ProtocolNodeMaskFiles.js.map +2 -2
- package/build/cjs/lib/nvm3/files/RouteCacheFiles.js +143 -82
- package/build/cjs/lib/nvm3/files/RouteCacheFiles.js.map +2 -2
- package/build/cjs/lib/nvm3/files/SUCUpdateEntriesFile.js +134 -73
- package/build/cjs/lib/nvm3/files/SUCUpdateEntriesFile.js.map +2 -2
- package/build/cjs/lib/nvm3/files/VersionFiles.js +98 -23
- package/build/cjs/lib/nvm3/files/VersionFiles.js.map +2 -2
- package/build/esm/lib/nvm3/files/ApplicationCCsFile.js +106 -66
- package/build/esm/lib/nvm3/files/ApplicationCCsFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/ApplicationDataFile.js +63 -23
- package/build/esm/lib/nvm3/files/ApplicationDataFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/ApplicationNameFile.js +66 -26
- package/build/esm/lib/nvm3/files/ApplicationNameFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/ApplicationRFConfigFile.js +137 -97
- package/build/esm/lib/nvm3/files/ApplicationRFConfigFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/ApplicationTypeFile.js +87 -47
- package/build/esm/lib/nvm3/files/ApplicationTypeFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/ControllerInfoFile.js +172 -132
- package/build/esm/lib/nvm3/files/ControllerInfoFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/NVMFile.d.ts +3 -3
- package/build/esm/lib/nvm3/files/NVMFile.d.ts.map +1 -1
- package/build/esm/lib/nvm3/files/NodeInfoFiles.js +191 -127
- package/build/esm/lib/nvm3/files/NodeInfoFiles.js.map +1 -1
- package/build/esm/lib/nvm3/files/ProtocolNodeMaskFiles.js +221 -85
- package/build/esm/lib/nvm3/files/ProtocolNodeMaskFiles.js.map +1 -1
- package/build/esm/lib/nvm3/files/RouteCacheFiles.js +143 -91
- package/build/esm/lib/nvm3/files/RouteCacheFiles.js.map +1 -1
- package/build/esm/lib/nvm3/files/SUCUpdateEntriesFile.js +126 -74
- package/build/esm/lib/nvm3/files/SUCUpdateEntriesFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/VersionFiles.js +87 -23
- package/build/esm/lib/nvm3/files/VersionFiles.js.map +1 -1
- package/package.json +3 -3
|
@@ -34,11 +34,44 @@ module.exports = __toCommonJS(NodeInfoFiles_exports);
|
|
|
34
34
|
var import_safe = require("@zwave-js/core/safe");
|
|
35
35
|
var import_safe2 = require("@zwave-js/shared/safe");
|
|
36
36
|
var import_NVMFile = require("./NVMFile.js");
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
38
|
+
function accept(f) {
|
|
39
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
40
|
+
return f;
|
|
41
|
+
}
|
|
42
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
43
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
44
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
45
|
+
var _, done = false;
|
|
46
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
47
|
+
var context = {};
|
|
48
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
49
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
50
|
+
context.addInitializer = function(f) {
|
|
51
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
52
|
+
extraInitializers.push(accept(f || null));
|
|
53
|
+
};
|
|
54
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
55
|
+
if (kind === "accessor") {
|
|
56
|
+
if (result === void 0) continue;
|
|
57
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
58
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
59
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
60
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
61
|
+
} else if (_ = accept(result)) {
|
|
62
|
+
if (kind === "field") initializers.unshift(_);
|
|
63
|
+
else descriptor[key] = _;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
67
|
+
done = true;
|
|
68
|
+
};
|
|
69
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
70
|
+
var useValue = arguments.length > 2;
|
|
71
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
72
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
73
|
+
}
|
|
74
|
+
return useValue ? value : void 0;
|
|
42
75
|
};
|
|
43
76
|
const NODEINFOS_PER_FILE_V1 = 4;
|
|
44
77
|
const LR_NODEINFOS_PER_FILE_V5 = 50;
|
|
@@ -150,127 +183,169 @@ const NodeInfoFileV0IDBase = 327936;
|
|
|
150
183
|
function nodeIdToNodeInfoFileIDV0(nodeId) {
|
|
151
184
|
return NodeInfoFileV0IDBase + nodeId - 1;
|
|
152
185
|
}
|
|
153
|
-
let NodeInfoFileV0 =
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
186
|
+
let NodeInfoFileV0 = (() => {
|
|
187
|
+
let _classDecorators = [(0, import_NVMFile.nvmFileID)((id) => id >= NodeInfoFileV0IDBase && id < NodeInfoFileV0IDBase + import_safe.MAX_NODES), (0, import_NVMFile.nvmSection)("protocol")];
|
|
188
|
+
let _classDescriptor;
|
|
189
|
+
let _classExtraInitializers = [];
|
|
190
|
+
let _classThis;
|
|
191
|
+
let _classSuper = import_NVMFile.NVMFile;
|
|
192
|
+
var NodeInfoFileV02 = class extends _classSuper {
|
|
193
|
+
static {
|
|
194
|
+
_classThis = this;
|
|
160
195
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
196
|
+
static {
|
|
197
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
198
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
199
|
+
NodeInfoFileV02 = _classThis = _classDescriptor.value;
|
|
200
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
201
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
202
|
+
}
|
|
203
|
+
constructor(options) {
|
|
204
|
+
super(options);
|
|
205
|
+
if ((0, import_NVMFile.gotDeserializationOptions)(options)) {
|
|
206
|
+
this.nodeInfo = parseNodeInfo(this.fileId - NodeInfoFileV0IDBase + 1, this.payload, 0);
|
|
207
|
+
} else {
|
|
208
|
+
this.nodeInfo = options.nodeInfo;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
nodeInfo;
|
|
212
|
+
serialize() {
|
|
213
|
+
this.fileId = nodeIdToNodeInfoFileIDV0(this.nodeInfo.nodeId);
|
|
214
|
+
this.payload = encodeNodeInfo(this.nodeInfo);
|
|
215
|
+
return super.serialize();
|
|
216
|
+
}
|
|
217
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
218
|
+
toJSON() {
|
|
219
|
+
return {
|
|
220
|
+
...super.toJSON(),
|
|
221
|
+
nodeInfo: this.nodeInfo
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
return NodeInfoFileV02 = _classThis;
|
|
226
|
+
})();
|
|
180
227
|
const NodeInfoFileV1IDBase = 328192;
|
|
181
228
|
function nodeIdToNodeInfoFileIDV1(nodeId) {
|
|
182
229
|
return NodeInfoFileV1IDBase + Math.floor((nodeId - 1) / NODEINFOS_PER_FILE_V1);
|
|
183
230
|
}
|
|
184
|
-
let NodeInfoFileV1 =
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
231
|
+
let NodeInfoFileV1 = (() => {
|
|
232
|
+
let _classDecorators = [(0, import_NVMFile.nvmFileID)((id) => id >= NodeInfoFileV1IDBase && id < NodeInfoFileV1IDBase + import_safe.MAX_NODES / NODEINFOS_PER_FILE_V1), (0, import_NVMFile.nvmSection)("protocol")];
|
|
233
|
+
let _classDescriptor;
|
|
234
|
+
let _classExtraInitializers = [];
|
|
235
|
+
let _classThis;
|
|
236
|
+
let _classSuper = import_NVMFile.NVMFile;
|
|
237
|
+
var NodeInfoFileV12 = class extends _classSuper {
|
|
238
|
+
static {
|
|
239
|
+
_classThis = this;
|
|
240
|
+
}
|
|
241
|
+
static {
|
|
242
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
243
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
244
|
+
NodeInfoFileV12 = _classThis = _classDescriptor.value;
|
|
245
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
246
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
247
|
+
}
|
|
248
|
+
constructor(options) {
|
|
249
|
+
super(options);
|
|
250
|
+
if ((0, import_NVMFile.gotDeserializationOptions)(options)) {
|
|
251
|
+
this.nodeInfos = [];
|
|
252
|
+
for (let i = 0; i < NODEINFOS_PER_FILE_V1; i++) {
|
|
253
|
+
const nodeId = (this.fileId - NodeInfoFileV1IDBase) * NODEINFOS_PER_FILE_V1 + 1 + i;
|
|
254
|
+
const offset = i * NODEINFO_SIZE;
|
|
255
|
+
const entry = this.payload.subarray(offset, offset + NODEINFO_SIZE);
|
|
256
|
+
if (entry.equals(emptyNodeInfo))
|
|
257
|
+
continue;
|
|
258
|
+
const nodeInfo = parseNodeInfo(nodeId, entry, 0);
|
|
259
|
+
this.nodeInfos.push(nodeInfo);
|
|
260
|
+
}
|
|
261
|
+
} else {
|
|
262
|
+
this.nodeInfos = options.nodeInfos;
|
|
197
263
|
}
|
|
198
|
-
} else {
|
|
199
|
-
this.nodeInfos = options.nodeInfos;
|
|
200
264
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
265
|
+
nodeInfos;
|
|
266
|
+
serialize() {
|
|
267
|
+
this.nodeInfos.sort((a, b) => a.nodeId - b.nodeId);
|
|
268
|
+
const minNodeId = this.nodeInfos[0].nodeId;
|
|
269
|
+
this.fileId = nodeIdToNodeInfoFileIDV1(minNodeId);
|
|
270
|
+
this.payload = new import_safe2.Bytes(NODEINFO_SIZE * NODEINFOS_PER_FILE_V1).fill(EMPTY_NODEINFO_FILL);
|
|
271
|
+
const minFileNodeId = Math.floor((minNodeId - 1) / NODEINFOS_PER_FILE_V1) * NODEINFOS_PER_FILE_V1 + 1;
|
|
272
|
+
for (const nodeInfo of this.nodeInfos) {
|
|
273
|
+
const offset = (nodeInfo.nodeId - minFileNodeId) * NODEINFO_SIZE;
|
|
274
|
+
this.payload.set(encodeNodeInfo(nodeInfo), offset);
|
|
275
|
+
}
|
|
276
|
+
return super.serialize();
|
|
212
277
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
};
|
|
223
|
-
NodeInfoFileV1 = __decorate([
|
|
224
|
-
(0, import_NVMFile.nvmFileID)((id) => id >= NodeInfoFileV1IDBase && id < NodeInfoFileV1IDBase + import_safe.MAX_NODES / NODEINFOS_PER_FILE_V1),
|
|
225
|
-
(0, import_NVMFile.nvmSection)("protocol")
|
|
226
|
-
], NodeInfoFileV1);
|
|
278
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
279
|
+
toJSON() {
|
|
280
|
+
return {
|
|
281
|
+
...super.toJSON(),
|
|
282
|
+
"node infos": this.nodeInfos
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
return NodeInfoFileV12 = _classThis;
|
|
287
|
+
})();
|
|
227
288
|
const LRNodeInfoFileV5IDBase = 329728;
|
|
228
289
|
function nodeIdToLRNodeInfoFileIDV5(nodeId) {
|
|
229
290
|
return LRNodeInfoFileV5IDBase + Math.floor((nodeId - 256) / LR_NODEINFOS_PER_FILE_V5);
|
|
230
291
|
}
|
|
231
|
-
let LRNodeInfoFileV5 =
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
292
|
+
let LRNodeInfoFileV5 = (() => {
|
|
293
|
+
let _classDecorators = [(0, import_NVMFile.nvmFileID)((id) => id >= LRNodeInfoFileV5IDBase && id < LRNodeInfoFileV5IDBase + import_safe.MAX_NODES_LR / LR_NODEINFOS_PER_FILE_V5), (0, import_NVMFile.nvmSection)("protocol")];
|
|
294
|
+
let _classDescriptor;
|
|
295
|
+
let _classExtraInitializers = [];
|
|
296
|
+
let _classThis;
|
|
297
|
+
let _classSuper = import_NVMFile.NVMFile;
|
|
298
|
+
var LRNodeInfoFileV52 = class extends _classSuper {
|
|
299
|
+
static {
|
|
300
|
+
_classThis = this;
|
|
301
|
+
}
|
|
302
|
+
static {
|
|
303
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
304
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
305
|
+
LRNodeInfoFileV52 = _classThis = _classDescriptor.value;
|
|
306
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
307
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
308
|
+
}
|
|
309
|
+
constructor(options) {
|
|
310
|
+
super(options);
|
|
311
|
+
if ((0, import_NVMFile.gotDeserializationOptions)(options)) {
|
|
312
|
+
this.nodeInfos = [];
|
|
313
|
+
for (let i = 0; i < LR_NODEINFOS_PER_FILE_V5; i++) {
|
|
314
|
+
const nodeId = (this.fileId - LRNodeInfoFileV5IDBase) * LR_NODEINFOS_PER_FILE_V5 + 256 + i;
|
|
315
|
+
const offset = i * LR_NODEINFO_SIZE;
|
|
316
|
+
const entry = this.payload.subarray(offset, offset + LR_NODEINFO_SIZE);
|
|
317
|
+
if (entry.equals(emptyNodeInfo))
|
|
318
|
+
continue;
|
|
319
|
+
const nodeInfo = parseLRNodeInfo(nodeId, entry, 0);
|
|
320
|
+
this.nodeInfos.push(nodeInfo);
|
|
321
|
+
}
|
|
322
|
+
} else {
|
|
323
|
+
this.nodeInfos = options.nodeInfos;
|
|
244
324
|
}
|
|
245
|
-
} else {
|
|
246
|
-
this.nodeInfos = options.nodeInfos;
|
|
247
325
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
326
|
+
nodeInfos;
|
|
327
|
+
serialize() {
|
|
328
|
+
this.nodeInfos.sort((a, b) => a.nodeId - b.nodeId);
|
|
329
|
+
const minNodeId = this.nodeInfos[0].nodeId;
|
|
330
|
+
this.fileId = nodeIdToLRNodeInfoFileIDV5(minNodeId);
|
|
331
|
+
this.payload = new import_safe2.Bytes(LR_NODEINFO_SIZE * LR_NODEINFOS_PER_FILE_V5).fill(EMPTY_NODEINFO_FILL);
|
|
332
|
+
const minFileNodeId = Math.floor((minNodeId - 256) / LR_NODEINFOS_PER_FILE_V5) * LR_NODEINFOS_PER_FILE_V5 + 256;
|
|
333
|
+
for (const nodeInfo of this.nodeInfos) {
|
|
334
|
+
const offset = (nodeInfo.nodeId - minFileNodeId) * LR_NODEINFO_SIZE;
|
|
335
|
+
this.payload.set(encodeLRNodeInfo(nodeInfo), offset);
|
|
336
|
+
}
|
|
337
|
+
return super.serialize();
|
|
259
338
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
};
|
|
270
|
-
LRNodeInfoFileV5 = __decorate([
|
|
271
|
-
(0, import_NVMFile.nvmFileID)((id) => id >= LRNodeInfoFileV5IDBase && id < LRNodeInfoFileV5IDBase + import_safe.MAX_NODES_LR / LR_NODEINFOS_PER_FILE_V5),
|
|
272
|
-
(0, import_NVMFile.nvmSection)("protocol")
|
|
273
|
-
], LRNodeInfoFileV5);
|
|
339
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
340
|
+
toJSON() {
|
|
341
|
+
return {
|
|
342
|
+
...super.toJSON(),
|
|
343
|
+
"node infos": this.nodeInfos
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
return LRNodeInfoFileV52 = _classThis;
|
|
348
|
+
})();
|
|
274
349
|
// Annotate the CommonJS export names for ESM import in node:
|
|
275
350
|
0 && (module.exports = {
|
|
276
351
|
LRNodeInfoFileV5,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/lib/nvm3/files/NodeInfoFiles.ts"],
|
|
4
4
|
"sourcesContent": ["import {\n\ttype DataRate,\n\ttype FLiRS,\n\tMAX_NODES,\n\tMAX_NODES_LR,\n\tNUM_NODEMASK_BYTES,\n\ttype NodeProtocolInfo,\n\tNodeType,\n\tencodeBitMask,\n\tencodeNodeProtocolInfo,\n\tparseBitMask,\n\tparseNodeProtocolInfo,\n} from \"@zwave-js/core/safe\";\nimport { Bytes, pick } from \"@zwave-js/shared/safe\";\nimport type { NVM3Object } from \"../object.js\";\nimport {\n\tNVMFile,\n\ttype NVMFileCreationOptions,\n\ttype NVMFileDeserializationOptions,\n\tgotDeserializationOptions,\n\tnvmFileID,\n\tnvmSection,\n} from \"./NVMFile.js\";\n\nexport const NODEINFOS_PER_FILE_V1 = 4;\nexport const LR_NODEINFOS_PER_FILE_V5 = 50;\nconst NODEINFO_SIZE = 1 + 5 + NUM_NODEMASK_BYTES;\nconst LR_NODEINFO_SIZE = 3;\nconst EMPTY_NODEINFO_FILL = 0xff;\nconst emptyNodeInfo = new Uint8Array(NODEINFO_SIZE).fill(EMPTY_NODEINFO_FILL);\n\nexport interface NodeInfo\n\textends Omit<NodeProtocolInfo, \"hasSpecificDeviceClass\">\n{\n\tnodeId: number;\n\tgenericDeviceClass: number;\n\tspecificDeviceClass?: number | null;\n\tneighbors: number[];\n\tsucUpdateIndex: number;\n}\n\nfunction parseNodeInfo(\n\tnodeId: number,\n\tbuffer: Uint8Array,\n\toffset: number,\n): NodeInfo {\n\tconst { hasSpecificDeviceClass, ...protocolInfo } = parseNodeProtocolInfo(\n\t\tbuffer,\n\t\toffset,\n\t);\n\tconst genericDeviceClass = buffer[offset + 3];\n\tconst specificDeviceClass = hasSpecificDeviceClass\n\t\t? buffer[offset + 4]\n\t\t: null;\n\tconst neighbors = parseBitMask(\n\t\tbuffer.subarray(offset + 5, offset + 5 + NUM_NODEMASK_BYTES),\n\t);\n\tconst sucUpdateIndex = buffer[offset + 5 + NUM_NODEMASK_BYTES];\n\treturn {\n\t\tnodeId,\n\t\t...protocolInfo,\n\t\tgenericDeviceClass,\n\t\tspecificDeviceClass,\n\t\tneighbors,\n\t\tsucUpdateIndex,\n\t};\n}\n\nfunction encodeNodeInfo(nodeInfo: NodeInfo): Bytes {\n\tconst ret = new Bytes(NODEINFO_SIZE);\n\n\tconst hasSpecificDeviceClass = nodeInfo.specificDeviceClass != null;\n\tconst protocolInfo: NodeProtocolInfo = {\n\t\t...pick(nodeInfo, [\n\t\t\t\"isListening\",\n\t\t\t\"isFrequentListening\",\n\t\t\t\"isRouting\",\n\t\t\t\"supportedDataRates\",\n\t\t\t\"protocolVersion\",\n\t\t\t\"optionalFunctionality\",\n\t\t\t\"nodeType\",\n\t\t\t\"supportsSecurity\",\n\t\t\t\"supportsBeaming\",\n\t\t]),\n\t\thasSpecificDeviceClass,\n\t};\n\tret.set(encodeNodeProtocolInfo(protocolInfo), 0);\n\n\tret[3] = nodeInfo.genericDeviceClass;\n\tif (hasSpecificDeviceClass) ret[4] = nodeInfo.specificDeviceClass!;\n\tret.set(encodeBitMask(nodeInfo.neighbors, MAX_NODES), 5);\n\tret[5 + NUM_NODEMASK_BYTES] = nodeInfo.sucUpdateIndex;\n\n\treturn ret;\n}\n\nexport interface LRNodeInfo\n\textends Omit<NodeProtocolInfo, \"hasSpecificDeviceClass\">\n{\n\tnodeId: number;\n\tgenericDeviceClass: number;\n\tspecificDeviceClass?: number | null;\n}\n\nfunction parseLRNodeInfo(\n\tnodeId: number,\n\tbuffer: Uint8Array,\n\toffset: number,\n): LRNodeInfo {\n\t// The node info in LR NVM files is packed:\n\t// Byte 0 CAPABILITY:\n\t// Bit 0: Routing (?)\n\t// Bit 1: Listening\n\t// Bit 2: has specific device class (?)\n\t// Bit 3: Beam capability\n\t// Bit 4: Optional functionality\n\t// Bits 5-6: FLiRS\n\t// Bit 7: Unused (?)\n\t// Byte 1: Generic device class\n\t// Byte 2: Specific device class\n\n\t// Protocol version is always 3\n\t// Security is always true\n\t// Supported speed is always 100kbps (speed = 0, speed ext = 2)\n\t// Never: routing end node, controller\n\n\tconst capability = buffer[offset];\n\tconst isRouting = !!(capability & 0b0000_0001); // ZWLR Mesh??\n\tconst isListening = !!(capability & 0b0000_0010);\n\tconst hasSpecificDeviceClass = !!(capability & 0b0000_0100);\n\tconst supportsBeaming = !!(capability & 0b0000_1000);\n\tconst optionalFunctionality = !!(capability & 0b0001_0000);\n\tlet isFrequentListening: FLiRS;\n\tswitch (capability & 0b0110_0000) {\n\t\tcase 0b0100_0000:\n\t\t\tisFrequentListening = \"1000ms\";\n\t\t\tbreak;\n\t\tcase 0b0010_0000:\n\t\t\tisFrequentListening = \"250ms\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tisFrequentListening = false;\n\t}\n\tconst nodeType = NodeType[\"End Node\"];\n\tconst supportsSecurity = true;\n\tconst protocolVersion = 3;\n\tconst supportedDataRates: DataRate[] = [100000];\n\n\treturn {\n\t\tnodeId,\n\t\tisRouting,\n\t\tisListening,\n\t\tsupportsBeaming,\n\t\tisFrequentListening,\n\t\toptionalFunctionality,\n\t\tnodeType,\n\t\tsupportsSecurity,\n\t\tprotocolVersion,\n\t\tsupportedDataRates,\n\t\tgenericDeviceClass: buffer[offset + 1],\n\t\tspecificDeviceClass: hasSpecificDeviceClass ? buffer[offset + 2] : null,\n\t};\n}\n\nfunction encodeLRNodeInfo(nodeInfo: LRNodeInfo): Uint8Array {\n\tconst ret = new Bytes(LR_NODEINFO_SIZE);\n\n\tlet capability = 0;\n\tif (nodeInfo.isRouting) capability |= 0b0000_0001;\n\tif (nodeInfo.isListening) capability |= 0b0000_0010;\n\tif (nodeInfo.specificDeviceClass != null) capability |= 0b0000_0100;\n\tif (nodeInfo.supportsBeaming) capability |= 0b0000_1000;\n\tif (nodeInfo.optionalFunctionality) capability |= 0b0001_0000;\n\tif (nodeInfo.isFrequentListening === \"1000ms\") {\n\t\tcapability |= 0b0100_0000;\n\t} else if (nodeInfo.isFrequentListening === \"250ms\") {\n\t\tcapability |= 0b0010_0000;\n\t}\n\n\tret[0] = capability;\n\tret[1] = nodeInfo.genericDeviceClass;\n\tret[2] = nodeInfo.specificDeviceClass ?? 0;\n\n\treturn ret;\n}\n\nexport interface NodeInfoFileV0Options extends NVMFileCreationOptions {\n\tnodeInfo: NodeInfo;\n}\n\nexport const NodeInfoFileV0IDBase = 0x50100;\nexport function nodeIdToNodeInfoFileIDV0(nodeId: number): number {\n\treturn NodeInfoFileV0IDBase + nodeId - 1;\n}\n\n@nvmFileID(\n\t(id) => id >= NodeInfoFileV0IDBase && id < NodeInfoFileV0IDBase + MAX_NODES,\n)\n@nvmSection(\"protocol\")\nexport class NodeInfoFileV0 extends NVMFile {\n\tpublic constructor(\n\t\toptions: NVMFileDeserializationOptions | NodeInfoFileV0Options,\n\t) {\n\t\tsuper(options);\n\t\tif (gotDeserializationOptions(options)) {\n\t\t\tthis.nodeInfo = parseNodeInfo(\n\t\t\t\tthis.fileId - NodeInfoFileV0IDBase + 1,\n\t\t\t\tthis.payload,\n\t\t\t\t0,\n\t\t\t);\n\t\t} else {\n\t\t\tthis.nodeInfo = options.nodeInfo;\n\t\t}\n\t}\n\n\tpublic nodeInfo: NodeInfo;\n\n\tpublic serialize(): NVM3Object & { data: Bytes } {\n\t\tthis.fileId = nodeIdToNodeInfoFileIDV0(this.nodeInfo.nodeId);\n\t\tthis.payload = encodeNodeInfo(this.nodeInfo);\n\t\treturn super.serialize();\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic toJSON() {\n\t\treturn {\n\t\t\t...super.toJSON(),\n\t\t\tnodeInfo: this.nodeInfo,\n\t\t};\n\t}\n}\n\nexport interface NodeInfoFileV1Options extends NVMFileCreationOptions {\n\tnodeInfos: NodeInfo[];\n}\n\nexport const NodeInfoFileV1IDBase = 0x50200;\nexport function nodeIdToNodeInfoFileIDV1(nodeId: number): number {\n\treturn (\n\t\tNodeInfoFileV1IDBase + Math.floor((nodeId - 1) / NODEINFOS_PER_FILE_V1)\n\t);\n}\n\n@nvmFileID(\n\t(id) =>\n\t\tid >= NodeInfoFileV1IDBase\n\t\t&& id < NodeInfoFileV1IDBase + MAX_NODES / NODEINFOS_PER_FILE_V1,\n)\n@nvmSection(\"protocol\")\nexport class NodeInfoFileV1 extends NVMFile {\n\tpublic constructor(\n\t\toptions: NVMFileDeserializationOptions | NodeInfoFileV1Options,\n\t) {\n\t\tsuper(options);\n\t\tif (gotDeserializationOptions(options)) {\n\t\t\tthis.nodeInfos = [];\n\t\t\tfor (let i = 0; i < NODEINFOS_PER_FILE_V1; i++) {\n\t\t\t\tconst nodeId = (this.fileId - NodeInfoFileV1IDBase)\n\t\t\t\t\t\t* NODEINFOS_PER_FILE_V1\n\t\t\t\t\t+ 1\n\t\t\t\t\t+ i;\n\t\t\t\tconst offset = i * NODEINFO_SIZE;\n\t\t\t\tconst entry = this.payload.subarray(\n\t\t\t\t\toffset,\n\t\t\t\t\toffset + NODEINFO_SIZE,\n\t\t\t\t);\n\t\t\t\tif (entry.equals(emptyNodeInfo)) continue;\n\n\t\t\t\tconst nodeInfo = parseNodeInfo(\n\t\t\t\t\tnodeId,\n\t\t\t\t\tentry,\n\t\t\t\t\t0,\n\t\t\t\t);\n\t\t\t\tthis.nodeInfos.push(nodeInfo);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.nodeInfos = options.nodeInfos;\n\t\t}\n\t}\n\n\tpublic nodeInfos: NodeInfo[];\n\n\tpublic serialize(): NVM3Object & { data: Bytes } {\n\t\t// The infos must be sorted by node ID\n\t\tthis.nodeInfos.sort((a, b) => a.nodeId - b.nodeId);\n\t\tconst minNodeId = this.nodeInfos[0].nodeId;\n\t\tthis.fileId = nodeIdToNodeInfoFileIDV1(minNodeId);\n\n\t\tthis.payload = new Bytes(NODEINFO_SIZE * NODEINFOS_PER_FILE_V1).fill(\n\t\t\tEMPTY_NODEINFO_FILL,\n\t\t);\n\n\t\tconst minFileNodeId =\n\t\t\tMath.floor((minNodeId - 1) / NODEINFOS_PER_FILE_V1)\n\t\t\t\t* NODEINFOS_PER_FILE_V1\n\t\t\t+ 1;\n\n\t\tfor (const nodeInfo of this.nodeInfos) {\n\t\t\tconst offset = (nodeInfo.nodeId - minFileNodeId) * NODEINFO_SIZE;\n\t\t\tthis.payload.set(encodeNodeInfo(nodeInfo), offset);\n\t\t}\n\n\t\treturn super.serialize();\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic toJSON() {\n\t\treturn {\n\t\t\t...super.toJSON(),\n\t\t\t\"node infos\": this.nodeInfos,\n\t\t};\n\t}\n}\n\nexport interface LRNodeInfoFileV5Options extends NVMFileCreationOptions {\n\tnodeInfos: LRNodeInfo[];\n}\n\nexport const LRNodeInfoFileV5IDBase = 0x50800;\nexport function nodeIdToLRNodeInfoFileIDV5(nodeId: number): number {\n\treturn (\n\t\tLRNodeInfoFileV5IDBase\n\t\t+ Math.floor((nodeId - 256) / LR_NODEINFOS_PER_FILE_V5)\n\t);\n}\n\n// Counting starts with 5, because we only implemented this after reaching protocol file format 5\n@nvmFileID(\n\t(id) =>\n\t\tid >= LRNodeInfoFileV5IDBase\n\t\t&& id\n\t\t\t< LRNodeInfoFileV5IDBase + MAX_NODES_LR / LR_NODEINFOS_PER_FILE_V5,\n)\n@nvmSection(\"protocol\")\nexport class LRNodeInfoFileV5 extends NVMFile {\n\tpublic constructor(\n\t\toptions: NVMFileDeserializationOptions | LRNodeInfoFileV5Options,\n\t) {\n\t\tsuper(options);\n\t\tif (gotDeserializationOptions(options)) {\n\t\t\tthis.nodeInfos = [];\n\t\t\tfor (let i = 0; i < LR_NODEINFOS_PER_FILE_V5; i++) {\n\t\t\t\tconst nodeId = (this.fileId - LRNodeInfoFileV5IDBase)\n\t\t\t\t\t\t* LR_NODEINFOS_PER_FILE_V5\n\t\t\t\t\t+ 256\n\t\t\t\t\t+ i;\n\t\t\t\tconst offset = i * LR_NODEINFO_SIZE;\n\t\t\t\tconst entry = this.payload.subarray(\n\t\t\t\t\toffset,\n\t\t\t\t\toffset + LR_NODEINFO_SIZE,\n\t\t\t\t);\n\t\t\t\tif (entry.equals(emptyNodeInfo)) continue;\n\n\t\t\t\tconst nodeInfo = parseLRNodeInfo(\n\t\t\t\t\tnodeId,\n\t\t\t\t\tentry,\n\t\t\t\t\t0,\n\t\t\t\t);\n\t\t\t\tthis.nodeInfos.push(nodeInfo);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.nodeInfos = options.nodeInfos;\n\t\t}\n\t}\n\n\tpublic nodeInfos: LRNodeInfo[];\n\n\tpublic serialize(): NVM3Object & { data: Bytes } {\n\t\t// The infos must be sorted by node ID\n\t\tthis.nodeInfos.sort((a, b) => a.nodeId - b.nodeId);\n\t\tconst minNodeId = this.nodeInfos[0].nodeId;\n\t\tthis.fileId = nodeIdToLRNodeInfoFileIDV5(minNodeId);\n\n\t\tthis.payload = new Bytes(LR_NODEINFO_SIZE * LR_NODEINFOS_PER_FILE_V5)\n\t\t\t.fill(EMPTY_NODEINFO_FILL);\n\n\t\tconst minFileNodeId =\n\t\t\tMath.floor((minNodeId - 256) / LR_NODEINFOS_PER_FILE_V5)\n\t\t\t\t* LR_NODEINFOS_PER_FILE_V5\n\t\t\t+ 256;\n\n\t\tfor (const nodeInfo of this.nodeInfos) {\n\t\t\tconst offset = (nodeInfo.nodeId - minFileNodeId) * LR_NODEINFO_SIZE;\n\t\t\tthis.payload.set(encodeLRNodeInfo(nodeInfo), offset);\n\t\t}\n\n\t\treturn super.serialize();\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic toJSON() {\n\t\treturn {\n\t\t\t...super.toJSON(),\n\t\t\t\"node infos\": this.nodeInfos,\n\t\t};\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAYO;AACP,IAAAA,eAA4B;AAE5B,qBAOO
|
|
6
|
-
"names": ["import_safe"
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAYO;AACP,IAAAA,eAA4B;AAE5B,qBAOO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,wBAAwB;AAC9B,MAAM,2B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