@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
|
@@ -1,77 +1,117 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
6
34
|
};
|
|
7
35
|
import { CommandClasses } from "@zwave-js/core/safe";
|
|
8
36
|
import { Bytes } from "@zwave-js/shared/safe";
|
|
9
37
|
import { NVMFile, gotDeserializationOptions, nvmFileID, nvmSection, } from "./NVMFile.js";
|
|
10
38
|
const MAX_CCs = 35;
|
|
11
39
|
export const ApplicationCCsFileID = 103;
|
|
12
|
-
let ApplicationCCsFile =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
offset += MAX_CCs;
|
|
27
|
-
numCCs = this.payload[offset];
|
|
28
|
-
this.includedSecurelySecureCCs = [
|
|
29
|
-
...this.payload.subarray(offset + 1, offset + 1 + numCCs),
|
|
30
|
-
];
|
|
40
|
+
let ApplicationCCsFile = (() => {
|
|
41
|
+
let _classDecorators = [nvmFileID(ApplicationCCsFileID), nvmSection("application")];
|
|
42
|
+
let _classDescriptor;
|
|
43
|
+
let _classExtraInitializers = [];
|
|
44
|
+
let _classThis;
|
|
45
|
+
let _classSuper = NVMFile;
|
|
46
|
+
var ApplicationCCsFile = class extends _classSuper {
|
|
47
|
+
static { _classThis = this; }
|
|
48
|
+
static {
|
|
49
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
50
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
51
|
+
ApplicationCCsFile = _classThis = _classDescriptor.value;
|
|
52
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
53
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
31
54
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
55
|
+
constructor(options) {
|
|
56
|
+
super(options);
|
|
57
|
+
if (gotDeserializationOptions(options)) {
|
|
58
|
+
let offset = 0;
|
|
59
|
+
let numCCs = this.payload[offset];
|
|
60
|
+
this.includedInsecurely = [
|
|
61
|
+
...this.payload.subarray(offset + 1, offset + 1 + numCCs),
|
|
62
|
+
];
|
|
63
|
+
offset += MAX_CCs;
|
|
64
|
+
numCCs = this.payload[offset];
|
|
65
|
+
this.includedSecurelyInsecureCCs = [
|
|
66
|
+
...this.payload.subarray(offset + 1, offset + 1 + numCCs),
|
|
67
|
+
];
|
|
68
|
+
offset += MAX_CCs;
|
|
69
|
+
numCCs = this.payload[offset];
|
|
70
|
+
this.includedSecurelySecureCCs = [
|
|
71
|
+
...this.payload.subarray(offset + 1, offset + 1 + numCCs),
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
this.includedInsecurely = options.includedInsecurely;
|
|
76
|
+
this.includedSecurelyInsecureCCs =
|
|
77
|
+
options.includedSecurelyInsecureCCs;
|
|
78
|
+
this.includedSecurelySecureCCs = options.includedSecurelySecureCCs;
|
|
79
|
+
}
|
|
37
80
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
81
|
+
includedInsecurely;
|
|
82
|
+
includedSecurelyInsecureCCs;
|
|
83
|
+
includedSecurelySecureCCs;
|
|
84
|
+
serialize() {
|
|
85
|
+
this.payload = new Bytes((1 + MAX_CCs) * 3);
|
|
86
|
+
let offset = 0;
|
|
87
|
+
for (const array of [
|
|
88
|
+
this.includedInsecurely,
|
|
89
|
+
this.includedSecurelyInsecureCCs,
|
|
90
|
+
this.includedSecurelySecureCCs,
|
|
91
|
+
]) {
|
|
92
|
+
this.payload[offset] = array.length;
|
|
93
|
+
this.payload.set(array, offset + 1);
|
|
94
|
+
offset += 1 + MAX_CCs;
|
|
95
|
+
}
|
|
96
|
+
return super.serialize();
|
|
53
97
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
ApplicationCCsFile = __decorate([
|
|
73
|
-
nvmFileID(ApplicationCCsFileID),
|
|
74
|
-
nvmSection("application")
|
|
75
|
-
], ApplicationCCsFile);
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
99
|
+
toJSON() {
|
|
100
|
+
return {
|
|
101
|
+
...super.toJSON(),
|
|
102
|
+
"included insecurely": this.includedInsecurely
|
|
103
|
+
.map((cc) => CommandClasses[cc])
|
|
104
|
+
.join(", "),
|
|
105
|
+
"included securely (insecure)": this.includedSecurelyInsecureCCs
|
|
106
|
+
.map((cc) => CommandClasses[cc])
|
|
107
|
+
.join(", "),
|
|
108
|
+
"included securely (secure)": this.includedSecurelySecureCCs
|
|
109
|
+
.map((cc) => CommandClasses[cc])
|
|
110
|
+
.join(", "),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
return ApplicationCCsFile = _classThis;
|
|
115
|
+
})();
|
|
76
116
|
export { ApplicationCCsFile };
|
|
77
117
|
//# sourceMappingURL=ApplicationCCsFile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationCCsFile.js","sourceRoot":"","sources":["../../../../../src/lib/nvm3/files/ApplicationCCsFile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApplicationCCsFile.js","sourceRoot":"","sources":["../../../../../src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B,EAAE,IAAI,CAAC,2BAA2B;qBAC9D,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;qBAC/B,IAAI,CAAC,IAAI,CAAC;gBACZ,4BAA4B,EAAE,IAAI,CAAC,yBAAyB;qBAC1D,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;qBAC/B,IAAI,CAAC,IAAI,CAAC;aACZ,CAAC;QACH,CAAC;;;;SAjEW,kBAAkB"}
|
|
@@ -1,29 +1,69 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
14
23
|
}
|
|
15
24
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
22
32
|
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
23
34
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
import { NVMFile, gotDeserializationOptions, nvmFileID, nvmSection, } from "./NVMFile.js";
|
|
36
|
+
export const ApplicationDataFileID = 200;
|
|
37
|
+
let ApplicationDataFile = (() => {
|
|
38
|
+
let _classDecorators = [nvmFileID(ApplicationDataFileID), nvmSection("application")];
|
|
39
|
+
let _classDescriptor;
|
|
40
|
+
let _classExtraInitializers = [];
|
|
41
|
+
let _classThis;
|
|
42
|
+
let _classSuper = NVMFile;
|
|
43
|
+
var ApplicationDataFile = class extends _classSuper {
|
|
44
|
+
static { _classThis = this; }
|
|
45
|
+
static {
|
|
46
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
47
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
48
|
+
ApplicationDataFile = _classThis = _classDescriptor.value;
|
|
49
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
50
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
51
|
+
}
|
|
52
|
+
constructor(options) {
|
|
53
|
+
super(options);
|
|
54
|
+
if (!gotDeserializationOptions(options)) {
|
|
55
|
+
this.payload = options.applicationData;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Just binary data
|
|
59
|
+
get applicationData() {
|
|
60
|
+
return this.payload;
|
|
61
|
+
}
|
|
62
|
+
set applicationData(value) {
|
|
63
|
+
this.payload = value;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return ApplicationDataFile = _classThis;
|
|
67
|
+
})();
|
|
28
68
|
export { ApplicationDataFile };
|
|
29
69
|
//# sourceMappingURL=ApplicationDataFile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationDataFile.js","sourceRoot":"","sources":["../../../../../src/lib/nvm3/files/ApplicationDataFile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApplicationDataFile.js","sourceRoot":"","sources":["../../../../../src/lib/nvm3/files/ApplicationDataFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EACN,OAAO,EAGP,yBAAyB,EACzB,SAAS,EACT,UAAU,GACV,MAAM,cAAc,CAAC;AAMtB,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;IAI5B,mBAAmB;4BAF/B,SAAS,CAAC,qBAAqB,CAAC,EAChC,UAAU,CAAC,aAAa,CAAC;;;;sBACe,OAAO;mCAAf,SAAQ,WAAO;;;;YAAhD,6KAiBC;;;YAjBY,uDAAmB;;QAC/B,YACC,OAAmE;YAEnE,KAAK,CAAC,OAAO,CAAC,CAAC;YACf,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,EAAE,CAAC;gBACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC;YACxC,CAAC;QACF,CAAC;QAED,mBAAmB;QACnB,IAAW,eAAe;YACzB,OAAO,IAAI,CAAC,OAAO,CAAC;QACrB,CAAC;QACD,IAAW,eAAe,CAAC,KAAY;YACtC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACtB,CAAC;;;;SAhBW,mBAAmB"}
|
|
@@ -1,34 +1,74 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
6
34
|
};
|
|
7
35
|
import { Bytes, cpp2js } from "@zwave-js/shared";
|
|
8
36
|
import { NVMFile, gotDeserializationOptions, nvmFileID, nvmSection, } from "./NVMFile.js";
|
|
9
37
|
export const ApplicationNameFileID = 0x4100c;
|
|
10
|
-
let ApplicationNameFile =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
38
|
+
let ApplicationNameFile = (() => {
|
|
39
|
+
let _classDecorators = [nvmFileID(ApplicationNameFileID), nvmSection("application")];
|
|
40
|
+
let _classDescriptor;
|
|
41
|
+
let _classExtraInitializers = [];
|
|
42
|
+
let _classThis;
|
|
43
|
+
let _classSuper = NVMFile;
|
|
44
|
+
var ApplicationNameFile = class extends _classSuper {
|
|
45
|
+
static { _classThis = this; }
|
|
46
|
+
static {
|
|
47
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
48
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
49
|
+
ApplicationNameFile = _classThis = _classDescriptor.value;
|
|
50
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
51
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
15
52
|
}
|
|
16
|
-
|
|
17
|
-
|
|
53
|
+
constructor(options) {
|
|
54
|
+
super(options);
|
|
55
|
+
if (gotDeserializationOptions(options)) {
|
|
56
|
+
this.name = cpp2js(this.payload.toString("utf8"));
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
this.name = options.name;
|
|
60
|
+
}
|
|
18
61
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
nvmFileID(ApplicationNameFileID),
|
|
31
|
-
nvmSection("application")
|
|
32
|
-
], ApplicationNameFile);
|
|
62
|
+
name;
|
|
63
|
+
serialize() {
|
|
64
|
+
// Return a zero-terminated string with a fixed length of 30 bytes
|
|
65
|
+
const nameAsString = Bytes.from(this.name, "utf8");
|
|
66
|
+
this.payload = new Bytes(30).fill(0);
|
|
67
|
+
this.payload.set(nameAsString.subarray(0, this.payload.length), 0);
|
|
68
|
+
return super.serialize();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
return ApplicationNameFile = _classThis;
|
|
72
|
+
})();
|
|
33
73
|
export { ApplicationNameFile };
|
|
34
74
|
//# sourceMappingURL=ApplicationNameFile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationNameFile.js","sourceRoot":"","sources":["../../../../../src/lib/nvm3/files/ApplicationNameFile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApplicationNameFile.js","sourceRoot":"","sources":["../../../../../src/lib/nvm3/files/ApplicationNameFile.ts"],"names":[],"mappings":";;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