diff --git a/packages/nvmedit/src/convert.test.ts.md b/packages/nvmedit/src/convert.test.ts.md index 708d5d6addf3..edb42938b836 100644 --- a/packages/nvmedit/src/convert.test.ts.md +++ b/packages/nvmedit/src/convert.test.ts.md @@ -11,6 +11,7 @@ Generated by [AVA](https://avajs.dev). { controller: { applicationData: 'a11d19000200001e3212270efd213a04fa1d00020000000000000000fd39277c022e000100000000000000000199445b8fcb3e537977d642e808b6568700000000000000000000000000000000000000000000008756e008a3cc6f339248ef5d663f50e136e12e8fe7432265349446d6c5541bf3c500be6567027beeb0e7712b11e21ddf53d86f0b134c00a3bdcd24963a89ef0d753a35b3033f64d1b759077a24d59b45da0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', + applicationName: null, applicationVersion: '7.0.0', commandClasses: { includedInsecurely: [ @@ -47,6 +48,7 @@ Generated by [AVA](https://avajs.dev). enablePTI: null, maxTXPower: null, measured0dBm: 3.3, + nodeIdType: null, rfRegion: 5, txPower: 0, }, @@ -174,7 +176,8 @@ Generated by [AVA](https://avajs.dev). meta: { deviceFamily: 2047, memoryMapped: true, - pageSize: 65536, + pageSize: 2048, + sharedFileSystem: false, writeSize: 1, }, nodes: { @@ -361,6 +364,7 @@ Generated by [AVA](https://avajs.dev). { controller: { applicationData: 'a11d19000200001e321b9884fdec8bdd380e00020000000000000000fd8e8c480f1700010000000000000000014c72cc54358f3dc9ce70ac752beb3e7a0000000000000000000000000000000000000000000000873206e7a00af5746fbc07ba927a6bde014d36396481ce9cce689ceba3f12841d85ffcc430bddb814dad5874aa73866b6a1361c9802cac47fc4df1627838f5857eb334b1bb0a8565a09d46bb8e722ac7910000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', + applicationName: null, applicationVersion: '7.12.0', commandClasses: { includedInsecurely: [ @@ -397,6 +401,7 @@ Generated by [AVA](https://avajs.dev). enablePTI: null, maxTXPower: null, measured0dBm: 3.3, + nodeIdType: null, rfRegion: 33, txPower: 0, }, @@ -749,6 +754,7 @@ Generated by [AVA](https://avajs.dev). deviceFamily: 46, memoryMapped: true, pageSize: 2048, + sharedFileSystem: false, writeSize: 1, }, nodes: { @@ -1104,6 +1110,7 @@ Generated by [AVA](https://avajs.dev). { controller: { applicationData: '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', + applicationName: null, applicationVersion: '7.15.4', commandClasses: { includedInsecurely: [ @@ -1147,6 +1154,7 @@ Generated by [AVA](https://avajs.dev). enablePTI: 0, maxTXPower: 14, measured0dBm: 3.3, + nodeIdType: null, rfRegion: 0, txPower: 0, }, @@ -1452,6 +1460,7 @@ Generated by [AVA](https://avajs.dev). deviceFamily: 46, memoryMapped: true, pageSize: 2048, + sharedFileSystem: false, writeSize: 1, }, nodes: { @@ -1600,6 +1609,7 @@ Generated by [AVA](https://avajs.dev). { controller: { applicationData: '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', + applicationName: null, applicationVersion: '7.16.2', commandClasses: { includedInsecurely: [], @@ -1626,6 +1636,7 @@ Generated by [AVA](https://avajs.dev). enablePTI: 0, maxTXPower: 14, measured0dBm: 3.3, + nodeIdType: null, rfRegion: 1, txPower: 0, }, @@ -2772,6 +2783,7 @@ Generated by [AVA](https://avajs.dev). deviceFamily: 46, memoryMapped: true, pageSize: 2048, + sharedFileSystem: false, writeSize: 1, }, nodes: { @@ -3286,6 +3298,7 @@ Generated by [AVA](https://avajs.dev). { controller: { applicationData: '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', + applicationName: null, applicationVersion: '255.0.0', commandClasses: { includedInsecurely: [ @@ -3330,6 +3343,7 @@ Generated by [AVA](https://avajs.dev). enablePTI: 0, maxTXPower: 14, measured0dBm: 3.3, + nodeIdType: null, rfRegion: 1, txPower: 0, }, @@ -4557,6 +4571,7 @@ Generated by [AVA](https://avajs.dev). deviceFamily: 42, memoryMapped: true, pageSize: 2048, + sharedFileSystem: false, writeSize: 1, }, nodes: { @@ -6971,6 +6986,7 @@ Generated by [AVA](https://avajs.dev). { controller: { applicationData: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', + applicationName: null, applicationVersion: '7.17.2', commandClasses: { includedInsecurely: [ @@ -7014,6 +7030,7 @@ Generated by [AVA](https://avajs.dev). enablePTI: 0, maxTXPower: 14, measured0dBm: -2.3, + nodeIdType: null, rfRegion: 0, txPower: 9.9, }, @@ -7029,6 +7046,7 @@ Generated by [AVA](https://avajs.dev). deviceFamily: 46, memoryMapped: true, pageSize: 2048, + sharedFileSystem: false, writeSize: 1, }, nodes: { @@ -7172,6 +7190,7 @@ Generated by [AVA](https://avajs.dev). { controller: { applicationData: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', + applicationName: null, applicationVersion: '7.18.1', commandClasses: { includedInsecurely: [ @@ -7215,6 +7234,7 @@ Generated by [AVA](https://avajs.dev). enablePTI: 0, maxTXPower: 14, measured0dBm: -2.3, + nodeIdType: null, rfRegion: 0, txPower: 9.9, }, @@ -7230,6 +7250,7 @@ Generated by [AVA](https://avajs.dev). deviceFamily: 46, memoryMapped: true, pageSize: 2048, + sharedFileSystem: false, writeSize: 1, }, nodes: { @@ -7372,6 +7393,7 @@ Generated by [AVA](https://avajs.dev). { controller: { applicationData: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', + applicationName: null, applicationVersion: '7.18.2', commandClasses: { includedInsecurely: [ @@ -7415,6 +7437,7 @@ Generated by [AVA](https://avajs.dev). enablePTI: 0, maxTXPower: 14, measured0dBm: -2.3, + nodeIdType: null, rfRegion: 0, txPower: 9.9, }, @@ -7430,6 +7453,7 @@ Generated by [AVA](https://avajs.dev). deviceFamily: 46, memoryMapped: true, pageSize: 2048, + sharedFileSystem: false, writeSize: 1, }, nodes: { @@ -7572,6 +7596,7 @@ Generated by [AVA](https://avajs.dev). { controller: { applicationData: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', + applicationName: null, applicationVersion: '7.18.3', commandClasses: { includedInsecurely: [ @@ -7615,6 +7640,7 @@ Generated by [AVA](https://avajs.dev). enablePTI: 0, maxTXPower: 14, measured0dBm: -2.3, + nodeIdType: null, rfRegion: 0, txPower: 9.9, }, @@ -7630,6 +7656,7 @@ Generated by [AVA](https://avajs.dev). deviceFamily: 46, memoryMapped: true, pageSize: 2048, + sharedFileSystem: false, writeSize: 1, }, nodes: { @@ -7772,6 +7799,7 @@ Generated by [AVA](https://avajs.dev). { controller: { applicationData: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', + applicationName: null, applicationVersion: '7.18.4', commandClasses: { includedInsecurely: [ @@ -7815,6 +7843,7 @@ Generated by [AVA](https://avajs.dev). enablePTI: 0, maxTXPower: 14, measured0dBm: -2.3, + nodeIdType: null, rfRegion: 0, txPower: 9.9, }, @@ -7830,6 +7859,7 @@ Generated by [AVA](https://avajs.dev). deviceFamily: 46, memoryMapped: true, pageSize: 2048, + sharedFileSystem: false, writeSize: 1, }, nodes: { @@ -7972,6 +8002,7 @@ Generated by [AVA](https://avajs.dev). { controller: { applicationData: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', + applicationName: null, applicationVersion: '7.19.0', commandClasses: { includedInsecurely: [ @@ -8015,6 +8046,7 @@ Generated by [AVA](https://avajs.dev). enablePTI: 0, maxTXPower: 14, measured0dBm: -2.3, + nodeIdType: null, rfRegion: 0, txPower: 9.9, }, @@ -8030,6 +8062,7 @@ Generated by [AVA](https://avajs.dev). deviceFamily: 46, memoryMapped: true, pageSize: 2048, + sharedFileSystem: false, writeSize: 1, }, nodes: { @@ -8172,6 +8205,7 @@ Generated by [AVA](https://avajs.dev). { controller: { applicationData: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', + applicationName: null, applicationVersion: '7.19.1', commandClasses: { includedInsecurely: [ @@ -8215,6 +8249,7 @@ Generated by [AVA](https://avajs.dev). enablePTI: 0, maxTXPower: 14, measured0dBm: -2.3, + nodeIdType: null, rfRegion: 0, txPower: 9.9, }, @@ -8230,6 +8265,7 @@ Generated by [AVA](https://avajs.dev). deviceFamily: 46, memoryMapped: true, pageSize: 2048, + sharedFileSystem: false, writeSize: 1, }, nodes: { diff --git a/packages/nvmedit/src/convert.test.ts.snap b/packages/nvmedit/src/convert.test.ts.snap index d547bd8163d9..b4d5570f19a7 100644 Binary files a/packages/nvmedit/src/convert.test.ts.snap and b/packages/nvmedit/src/convert.test.ts.snap differ diff --git a/packages/nvmedit/src/convert.ts b/packages/nvmedit/src/convert.ts index 426f3f6b8259..7ae67ce4cf2c 100644 --- a/packages/nvmedit/src/convert.ts +++ b/packages/nvmedit/src/convert.ts @@ -1,6 +1,7 @@ import { type CommandClasses, ControllerCapabilityFlags, + NodeIDType, type NodeProtocolInfo, NodeType, RFRegion, @@ -9,7 +10,7 @@ import { isZWaveError, stripUndefined, } from "@zwave-js/core/safe"; -import { cloneDeep, pick } from "@zwave-js/shared/safe"; +import { cloneDeep, num2hex, pick } from "@zwave-js/shared/safe"; import { isObject } from "alcalzone-shared/typeguards"; import semver from "semver"; import { MAX_PROTOCOL_FILE_FORMAT, SUC_MAX_UPDATES } from "./consts"; @@ -23,6 +24,8 @@ import { ApplicationTypeFile, ApplicationTypeFileID, ApplicationVersionFile, + ApplicationVersionFile800, + ApplicationVersionFile800ID, ApplicationVersionFileID, ControllerInfoFile, ControllerInfoFileID, @@ -65,6 +68,10 @@ import { nodeIdToRouteCacheFileIDV1, sucUpdateIndexToSUCUpdateEntriesFileIDV5, } from "./files"; +import { + ApplicationNameFile, + ApplicationNameFileID, +} from "./files/ApplicationNameFile"; import { type NVM3Objects, type NVMMeta, @@ -122,6 +129,7 @@ export interface NVMJSONController { }; applicationData?: string | null; + applicationName?: string | null; } export interface NVMJSONControllerRFConfig { @@ -130,6 +138,7 @@ export interface NVMJSONControllerRFConfig { measured0dBm: number; enablePTI: number | null; maxTXPower: number | null; + nodeIdType: NodeIDType | null; } export interface NVMJSONNodeWithInfo @@ -202,8 +211,7 @@ function createEmptyPhysicalNode(): NVMJSONNodeWithInfo { /** Converts a compressed set of NVM objects to a JSON representation */ export function nvmObjectsToJSON( - applicationObjects: ReadonlyMap, - protocolObjects: ReadonlyMap, + objects: ReadonlyMap, ): NVMJSON { const nodes = new Map(); const getNode = (id: number): NVMJSONNode => { @@ -215,12 +223,9 @@ export function nvmObjectsToJSON( id: number | ((id: number) => boolean), ): NVM3Object | undefined => { if (typeof id === "number") { - return protocolObjects.get(id) ?? applicationObjects.get(id); + return objects.get(id); } else { - for (const [key, obj] of protocolObjects) { - if (id(key)) return obj; - } - for (const [key, obj] of applicationObjects) { + for (const [key, obj] of objects) { if (id(key)) return obj; } } @@ -232,7 +237,9 @@ export function nvmObjectsToJSON( const ret = getObject(id); if (ret) return ret; throw new ZWaveError( - `Object${typeof id === "number" ? ` ${id}` : ""} not found!`, + `Object${ + typeof id === "number" ? ` ${num2hex(id)} (${id})` : "" + } not found!`, ZWaveErrorCodes.NVM_ObjectNotFound, ); }; @@ -414,10 +421,22 @@ export function nvmObjectsToJSON( // === Application NVM files === - const applicationVersionFile = getFileOrThrow( + const applicationVersionFile700 = getFile( ApplicationVersionFileID, "7.0.0", // We don't know the version here yet ); + const applicationVersionFile800 = getFile( + ApplicationVersionFile800ID, + "7.0.0", // We don't know the version here yet + ); + const applicationVersionFile = applicationVersionFile700 + ?? applicationVersionFile800; + if (!applicationVersionFile) { + throw new ZWaveError( + "ApplicationVersionFile not found!", + ZWaveErrorCodes.NVM_ObjectNotFound, + ); + } const applicationVersion = `${applicationVersionFile.major}.${applicationVersionFile.minor}.${applicationVersionFile.patch}`; @@ -437,6 +456,11 @@ export function nvmObjectsToJSON( ApplicationTypeFileID, applicationVersion, ); + const applicationNameFile = getFile( + ApplicationNameFileID, + applicationVersion, + ); + const preferredRepeaters = getFile( ProtocolPreferredRepeatersFileID, applicationVersion, @@ -459,10 +483,8 @@ export function nvmObjectsToJSON( "dcdcConfig", ] as const; const controller: NVMJSONController = { - protocolVersion: - `${protocolVersionFile.major}.${protocolVersionFile.minor}.${protocolVersionFile.patch}`, - applicationVersion: - `${applicationVersionFile.major}.${applicationVersionFile.minor}.${applicationVersionFile.patch}`, + protocolVersion, + applicationVersion, homeId: `0x${controllerInfoFile.homeId.toString("hex")}`, ...pick(controllerInfoFile, controllerProps), ...pick(applicationTypeFile, [ @@ -485,11 +507,13 @@ export function nvmObjectsToJSON( measured0dBm: rfConfigFile.measured0dBm, enablePTI: rfConfigFile.enablePTI ?? null, maxTXPower: rfConfigFile.maxTXPower ?? null, + nodeIdType: rfConfigFile.nodeIdType ?? null, }, } : {}), sucUpdateEntries, applicationData: applicationDataFile?.data.toString("hex") ?? null, + applicationName: applicationNameFile?.name ?? null, }; // Make sure all props are defined @@ -609,6 +633,7 @@ function serializeCommonApplicationObjects(nvm: NVMJSON): NVM3Object[] { ]), enablePTI: nvm.controller.rfConfig.enablePTI ?? undefined, maxTXPower: nvm.controller.rfConfig.maxTXPower ?? undefined, + nodeIdType: nvm.controller.rfConfig.nodeIdType ?? undefined, fileVersion: nvm.controller.applicationVersion, }); ret.push(applRFConfigFile.serialize()); @@ -623,6 +648,15 @@ function serializeCommonApplicationObjects(nvm: NVMJSON): NVM3Object[] { ret.push(applDataFile.serialize()); } + if (nvm.controller.applicationName && nvm.meta?.sharedFileSystem) { + // The application name only seems to be used with the shared file system + const applNameFile = new ApplicationNameFile({ + name: nvm.controller.applicationName, + fileVersion: nvm.controller.applicationVersion, + }); + ret.push(applNameFile.serialize()); + } + return ret; } @@ -858,12 +892,13 @@ export function jsonToNVMObjects_v7_11_0( let targetProtocolVersion: semver.SemVer; let targetProtocolFormat: number; - // We currently support application version migrations up to 7.19.1 + // We currently support application version migrations up to: + const HIGHEST_SUPPORTED_SDK_VERSION = "7.21.0"; // For all higher ones, set the highest version we support and let the controller handle the migration itself - if (semver.lte(targetSDKVersion, "7.19.1")) { + if (semver.lte(targetSDKVersion, HIGHEST_SUPPORTED_SDK_VERSION)) { targetApplicationVersion = semver.parse(targetSDKVersion)!; } else { - targetApplicationVersion = semver.parse("7.19.1")!; + targetApplicationVersion = semver.parse(HIGHEST_SUPPORTED_SDK_VERSION)!; } // The protocol version file only seems to be updated when the format of the protocol file system changes @@ -905,7 +940,10 @@ export function jsonToNVMObjects_v7_11_0( }; // Application files - const applVersionFile = new ApplicationVersionFile({ + const ApplicationVersionConstructor = json.meta?.sharedFileSystem + ? ApplicationVersionFile800 + : ApplicationVersionFile; + const applVersionFile = new ApplicationVersionConstructor({ // The SDK compares 4-byte values where the format is set to 0 to determine whether a migration is needed format: 0, major: targetApplicationVersion.major, @@ -923,6 +961,7 @@ export function jsonToNVMObjects_v7_11_0( measured0dBm: +3.3, enablePTI: null, maxTXPower: null, + nodeIdType: null, }; // Make sure the RF config format matches the application version. @@ -931,6 +970,9 @@ export function jsonToNVMObjects_v7_11_0( target.controller.rfConfig.enablePTI ??= 0; target.controller.rfConfig.maxTXPower ??= 14.0; } + if (semver.gte(targetSDKVersion, "7.21.0")) { + target.controller.rfConfig.nodeIdType ??= NodeIDType.Short; + } addApplicationObjects(...serializeCommonApplicationObjects(target)); @@ -1041,8 +1083,18 @@ export function nvmToJSON( debugLogs: boolean = false, ): Required { const nvm = parseNVM(buffer, debugLogs); - const ret = nvmObjectsToJSON(nvm.applicationObjects, nvm.protocolObjects); - ret.meta = getNVMMeta(nvm.protocolPages[0]); + const objects = new Map([ + ...nvm.applicationObjects, + ...nvm.protocolObjects, + ]); + // 800 series doesn't distinguish between the storage for application and protocol objects + const sharedFileSystem = nvm.applicationObjects.size > 0 + && nvm.protocolObjects.size === 0; + const ret = nvmObjectsToJSON(objects); + const firstPage = sharedFileSystem + ? nvm.applicationPages[0] + : nvm.protocolPages[0]; + ret.meta = getNVMMeta(firstPage, sharedFileSystem); return ret as Required; } @@ -1374,12 +1426,20 @@ export function migrateNVM(sourceNVM: Buffer, targetNVM: Buffer): Buffer { && targetProtocolFileFormat > MAX_PROTOCOL_FILE_FORMAT && sourceProtocolFileFormat && sourceProtocolFileFormat <= targetProtocolFileFormat + && sourceNVM.length === targetNVM.length ) { // ...both the source and the target are 700 series, but at least the target uses an unsupported protocol version. - // We can be sure hwoever that the target can upgrade any 700 series NVM to its protocol version, as long as the + // We can be sure however that the target can upgrade any 700 series NVM to its protocol version, as long as the // source protocol version is not higher than the target's return sourceNVM; - } else if (source.type === 700 && target.type === 700) { + } else if ( + source.type === 700 + && target.type === 700 + // ...the source and target NVMs have the same size and structure + && sourceNVM.length === targetNVM.length + && source.json.meta.sharedFileSystem + === target.json.meta.sharedFileSystem + ) { // ... the source and target protocol versions are compatible without conversion const sourceProtocolVersion = source.json.controller.protocolVersion; const targetProtocolVersion = target.json.controller.protocolVersion; diff --git a/packages/nvmedit/src/files/ApplicationNameFile.ts b/packages/nvmedit/src/files/ApplicationNameFile.ts new file mode 100644 index 000000000000..a40bcf0f855a --- /dev/null +++ b/packages/nvmedit/src/files/ApplicationNameFile.ts @@ -0,0 +1,39 @@ +import { cpp2js } from "@zwave-js/shared"; +import { type NVMObject } from ".."; +import { + NVMFile, + type NVMFileCreationOptions, + type NVMFileDeserializationOptions, + getNVMFileIDStatic, + gotDeserializationOptions, + nvmFileID, +} from "./NVMFile"; + +export interface ApplicationNameFileOptions extends NVMFileCreationOptions { + name: string; +} + +@nvmFileID(0x4100c) +export class ApplicationNameFile extends NVMFile { + public constructor( + options: NVMFileDeserializationOptions | ApplicationNameFileOptions, + ) { + super(options); + if (gotDeserializationOptions(options)) { + this.name = cpp2js(this.payload.toString("utf8")); + } else { + this.name = options.name; + } + } + + public name: string; + + public serialize(): NVMObject { + // Return a zero-terminated string with a fixed length of 30 bytes + const nameAsString = Buffer.from(this.name, "utf8"); + this.payload = Buffer.alloc(30, 0); + nameAsString.subarray(0, this.payload.length - 1).copy(this.payload); + return super.serialize(); + } +} +export const ApplicationNameFileID = getNVMFileIDStatic(ApplicationNameFile); diff --git a/packages/nvmedit/src/files/ApplicationRFConfigFile.ts b/packages/nvmedit/src/files/ApplicationRFConfigFile.ts index b6ffadd831e4..5c824be842b4 100644 --- a/packages/nvmedit/src/files/ApplicationRFConfigFile.ts +++ b/packages/nvmedit/src/files/ApplicationRFConfigFile.ts @@ -1,4 +1,9 @@ -import { RFRegion, ZWaveError, ZWaveErrorCodes } from "@zwave-js/core/safe"; +import { + NodeIDType, + RFRegion, + ZWaveError, + ZWaveErrorCodes, +} from "@zwave-js/core/safe"; import { type AllOrNone, getEnumMemberName } from "@zwave-js/shared/safe"; import semver from "semver"; import type { NVM3Object } from "../nvm3/object"; @@ -21,7 +26,10 @@ export type ApplicationRFConfigFileOptions = & AllOrNone<{ enablePTI?: number; maxTXPower?: number; - }>; + }> + & { + nodeIdType?: number; + }; @nvmFileID(104) export class ApplicationRFConfigFile extends NVMFile { @@ -44,6 +52,13 @@ export class ApplicationRFConfigFile extends NVMFile { this.measured0dBm = this.payload.readInt16LE(3) / 10; this.enablePTI = this.payload[5]; this.maxTXPower = this.payload.readInt16LE(6) / 10; + } else if (this.payload.length === 9) { + this.rfRegion = this.payload[0]; + this.txPower = this.payload.readInt16LE(1) / 10; + this.measured0dBm = this.payload.readInt16LE(3) / 10; + this.enablePTI = this.payload[5]; + this.maxTXPower = this.payload.readInt16LE(6) / 10; + this.nodeIdType = this.payload[8]; } else { throw new ZWaveError( `ApplicationRFConfigFile has unsupported length ${this.payload.length}`, @@ -56,6 +71,7 @@ export class ApplicationRFConfigFile extends NVMFile { this.measured0dBm = options.measured0dBm; this.enablePTI = options.enablePTI; this.maxTXPower = options.maxTXPower; + this.nodeIdType = options.nodeIdType; } } @@ -64,6 +80,7 @@ export class ApplicationRFConfigFile extends NVMFile { public measured0dBm: number; public enablePTI?: number; public maxTXPower?: number; + public nodeIdType?: NodeIDType; public serialize(): NVM3Object { if (semver.lt(this.fileVersion, "7.18.1")) { @@ -78,13 +95,21 @@ export class ApplicationRFConfigFile extends NVMFile { this.payload[3] = this.enablePTI ?? 0; this.payload.writeInt16LE((this.maxTXPower ?? 0) * 10, 4); } - } else { + } else if (semver.lt(this.fileVersion, "7.21.0")) { this.payload = Buffer.alloc(8, 0); this.payload[0] = this.rfRegion; this.payload.writeInt16LE(this.txPower * 10, 1); this.payload.writeInt16LE(this.measured0dBm * 10, 3); this.payload[5] = this.enablePTI ?? 0; this.payload.writeInt16LE((this.maxTXPower ?? 0) * 10, 6); + } else { + this.payload = Buffer.alloc(9, 0); + this.payload[0] = this.rfRegion; + this.payload.writeInt16LE(this.txPower * 10, 1); + this.payload.writeInt16LE(this.measured0dBm * 10, 3); + this.payload[5] = this.enablePTI ?? 0; + this.payload.writeInt16LE((this.maxTXPower ?? 0) * 10, 6); + this.payload[8] = this.nodeIdType ?? NodeIDType.Short; } return super.serialize(); } @@ -103,6 +128,12 @@ export class ApplicationRFConfigFile extends NVMFile { if (this.maxTXPower != undefined) { ret["max TX power"] = `${this.maxTXPower.toFixed(1)} dBm`; } + if (this.nodeIdType != undefined) { + ret["node ID type"] = getEnumMemberName( + NodeIDType, + this.nodeIdType, + ); + } return ret; } } diff --git a/packages/nvmedit/src/files/VersionFiles.ts b/packages/nvmedit/src/files/VersionFiles.ts index 47a9e63d68c3..6ef0d0467c21 100644 --- a/packages/nvmedit/src/files/VersionFiles.ts +++ b/packages/nvmedit/src/files/VersionFiles.ts @@ -64,6 +64,14 @@ export const ApplicationVersionFileID = getNVMFileIDStatic( ApplicationVersionFile, ); +// The 800 series has a shared application/protocol file system +// and uses a different ID for the application version file +@nvmFileID(0x41000) +export class ApplicationVersionFile800 extends VersionFile {} +export const ApplicationVersionFile800ID = getNVMFileIDStatic( + ApplicationVersionFile800, +); + @nvmFileID(0x50000) export class ProtocolVersionFile extends VersionFile {} export const ProtocolVersionFileID = getNVMFileIDStatic(ProtocolVersionFile); diff --git a/packages/nvmedit/src/nvm3/consts.ts b/packages/nvmedit/src/nvm3/consts.ts index af2f8a80e2b1..3701475f70f1 100644 --- a/packages/nvmedit/src/nvm3/consts.ts +++ b/packages/nvmedit/src/nvm3/consts.ts @@ -1,6 +1,9 @@ // NVM area sizes export const ZWAVE_APPLICATION_NVM_SIZE = 0x3000; export const ZWAVE_PROTOCOL_NVM_SIZE = 0xc000 - ZWAVE_APPLICATION_NVM_SIZE; +// The 800 series has a shared application/protocol NVM, which is 8 KB smaller +// than the 700 series +export const ZWAVE_SHARED_NVM_SIZE = 0xA000; // Everything must be word-aligned export const NVM3_WORD_SIZE = 4; @@ -11,7 +14,9 @@ export const NVM3_PAGE_HEADER_SIZE = 20; export const NVM3_PAGE_COUNTER_SIZE = 27; export const NVM3_PAGE_COUNTER_MASK = (1 << NVM3_PAGE_COUNTER_SIZE) - 1; export const NVM3_PAGE_MAGIC = 0xb29a; -export const FLASH_MAX_PAGE_SIZE = 2048; + +export const FLASH_MAX_PAGE_SIZE_700 = 2048; // not sure if this is true for all 700 series chips +export const FLASH_MAX_PAGE_SIZE_800 = 8192; export enum PageStatus { OK = 0xffffffff, diff --git a/packages/nvmedit/src/nvm3/nvm.ts b/packages/nvmedit/src/nvm3/nvm.ts index bdec6c5aad21..149875483ef9 100644 --- a/packages/nvmedit/src/nvm3/nvm.ts +++ b/packages/nvmedit/src/nvm3/nvm.ts @@ -1,7 +1,9 @@ import { ZWaveError, ZWaveErrorCodes } from "@zwave-js/core/safe"; import { pick } from "@zwave-js/shared/safe"; +import { ApplicationVersionFile800ID } from "../files"; import { - FLASH_MAX_PAGE_SIZE, + FLASH_MAX_PAGE_SIZE_700, + FLASH_MAX_PAGE_SIZE_800, NVM3_COUNTER_SIZE, NVM3_OBJ_HEADER_SIZE_SMALL, NVM3_PAGE_HEADER_SIZE, @@ -11,6 +13,7 @@ import { PageWriteSize, ZWAVE_APPLICATION_NVM_SIZE, ZWAVE_PROTOCOL_NVM_SIZE, + ZWAVE_SHARED_NVM_SIZE, } from "./consts"; import { type NVM3Object, @@ -30,6 +33,7 @@ function comparePages(p1: NVM3Page, p2: NVM3Page) { } export interface NVMMeta { + sharedFileSystem: boolean; pageSize: number; deviceFamily: number; writeSize: PageWriteSize; @@ -63,12 +67,27 @@ export function parseNVM( offset += bytesRead; } - const applicationPages = pages.filter( - (p) => p.header.offset < ZWAVE_APPLICATION_NVM_SIZE, - ); - const protocolPages = pages.filter( - (p) => p.header.offset >= ZWAVE_APPLICATION_NVM_SIZE, + // 800 series has a shared NVM for protocol and application data. + // We can distinguish between the two, because the application version is stored in a different file ID + + const isSharedFileSystem = pages.some( + (p) => p.objects.some((o) => o.key === ApplicationVersionFile800ID), ); + // By convention, we only use the applicationPages in that case + let applicationPages: NVM3Page[]; + let protocolPages: NVM3Page[]; + + if (isSharedFileSystem) { + applicationPages = pages; + protocolPages = []; + } else { + applicationPages = pages.filter( + (p) => p.header.offset < ZWAVE_APPLICATION_NVM_SIZE, + ); + protocolPages = pages.filter( + (p) => p.header.offset >= ZWAVE_APPLICATION_NVM_SIZE, + ); + } // The pages are written in a ring buffer, find the one with the lowest erase count and start reading from there in order applicationPages.sort(comparePages); @@ -121,9 +140,12 @@ export function encodeNVM( writeSize = PageWriteSize.WRITE_SIZE_16, memoryMapped = true, } = options ?? {}; + const maxPageSize = options?.sharedFileSystem + ? FLASH_MAX_PAGE_SIZE_800 + : FLASH_MAX_PAGE_SIZE_700; const pageSize = Math.min( - options?.pageSize ?? FLASH_MAX_PAGE_SIZE, - FLASH_MAX_PAGE_SIZE, + options?.pageSize ?? maxPageSize, + maxPageSize, ); const createEmptyPage = (): Buffer => { @@ -141,16 +163,6 @@ export function encodeNVM( return ret; }; - const applicationPages: Buffer[] = []; - for (let i = 0; i < ZWAVE_APPLICATION_NVM_SIZE / pageSize; i++) { - applicationPages.push(createEmptyPage()); - } - - const protocolPages: Buffer[] = []; - for (let i = 0; i < ZWAVE_PROTOCOL_NVM_SIZE / pageSize; i++) { - protocolPages.push(createEmptyPage()); - } - const writeObjects = ( pages: Buffer[], objects: Map, @@ -219,17 +231,45 @@ export function encodeNVM( } }; - writeObjects(applicationPages, applicationObjects); - writeObjects(protocolPages, protocolObjects); + if (options?.sharedFileSystem) { + const pages: Buffer[] = []; + for (let i = 0; i < ZWAVE_SHARED_NVM_SIZE / pageSize; i++) { + pages.push(createEmptyPage()); + } + + const objects = new Map([ + ...applicationObjects, + ...protocolObjects, + ]); + writeObjects(pages, objects); + + return Buffer.concat(pages); + } else { + const applicationPages: Buffer[] = []; + for (let i = 0; i < ZWAVE_APPLICATION_NVM_SIZE / pageSize; i++) { + applicationPages.push(createEmptyPage()); + } + + const protocolPages: Buffer[] = []; + for (let i = 0; i < ZWAVE_PROTOCOL_NVM_SIZE / pageSize; i++) { + protocolPages.push(createEmptyPage()); + } + + writeObjects(applicationPages, applicationObjects); + writeObjects(protocolPages, protocolObjects); - return Buffer.concat([...applicationPages, ...protocolPages]); + return Buffer.concat([...applicationPages, ...protocolPages]); + } } -export function getNVMMeta(page: NVM3Page): NVMMeta { - return pick(page.header, [ - "pageSize", - "writeSize", - "memoryMapped", - "deviceFamily", - ]); +export function getNVMMeta(page: NVM3Page, sharedFileSystem: boolean): NVMMeta { + return { + sharedFileSystem, + ...pick(page.header, [ + "pageSize", + "writeSize", + "memoryMapped", + "deviceFamily", + ]), + }; } diff --git a/packages/nvmedit/src/nvm3/page.ts b/packages/nvmedit/src/nvm3/page.ts index 49fa65f0388a..4e967f1b80a6 100644 --- a/packages/nvmedit/src/nvm3/page.ts +++ b/packages/nvmedit/src/nvm3/page.ts @@ -1,6 +1,5 @@ import { ZWaveError, ZWaveErrorCodes } from "@zwave-js/core/safe"; import { - FLASH_MAX_PAGE_SIZE, NVM3_MIN_PAGE_SIZE, NVM3_PAGE_COUNTER_MASK, NVM3_PAGE_COUNTER_SIZE, @@ -42,6 +41,87 @@ export function readPage( buffer: Buffer, offset: number, ): { page: NVM3Page; bytesRead: number } { + const { version, eraseCount } = tryGetVersionAndEraseCount(buffer, offset); + + // Page status + const status = buffer.readUInt32LE(offset + 12); + + const devInfo = buffer.readUInt16LE(offset + 16); + const deviceFamily = devInfo & 0x7ff; + const writeSize = (devInfo >> 11) & 0b1; + const memoryMapped = !!((devInfo >> 12) & 0b1); + let pageSize = pageSizeFromBits((devInfo >> 13) & 0b111); + + if (pageSize > 0xffff) { + // Some controllers have no valid info in the page size bits, resulting + // in an impossibly large page size. To try and figure out the actual page + // size without knowing the hardware, we scan the buffer for the next valid + // page start. + for (let exponent = 0; exponent < 0b111; exponent++) { + const testPageSize = pageSizeFromBits(exponent); + const nextOffset = offset + testPageSize; + if ( + // exactly end of NVM OR + buffer.length === nextOffset + // next page + || isValidPageHeaderAtOffset(buffer, nextOffset) + ) { + pageSize = testPageSize; + break; + } + } + } + if (pageSize > 0xffff) { + throw new ZWaveError( + "Could not determine page size!", + ZWaveErrorCodes.NVM_InvalidFormat, + ); + } + + if (buffer.length < offset + pageSize) { + throw new ZWaveError( + "Incomplete page in buffer!", + ZWaveErrorCodes.NVM_InvalidFormat, + ); + } + + const formatInfo = buffer.readUInt16LE(offset + 18); + + const encrypted = !(formatInfo & 0b1); + + const header: NVM3PageHeader = { + offset, + version, + eraseCount, + status, + encrypted, + pageSize, + writeSize, + memoryMapped, + deviceFamily, + }; + const bytesRead = pageSize; + const data = buffer.subarray(offset + 20, offset + bytesRead); + + const { objects } = readObjects(data); + + return { + page: { header, objects }, + bytesRead, + }; +} + +function tryGetVersionAndEraseCount( + buffer: Buffer, + offset: number, +): { version: number; eraseCount: number } { + if (offset > buffer.length - NVM3_PAGE_HEADER_SIZE) { + throw new ZWaveError( + "Incomplete page in buffer!", + ZWaveErrorCodes.NVM_InvalidFormat, + ); + } + const version = buffer.readUInt16LE(offset); const magic = buffer.readUInt16LE(offset + 2); if (magic !== NVM3_PAGE_MAGIC) { @@ -79,49 +159,19 @@ export function readPage( ); } - // Page status - const status = buffer.readUInt32LE(offset + 12); - - const devInfo = buffer.readUInt16LE(offset + 16); - const deviceFamily = devInfo & 0x7ff; - const writeSize = (devInfo >> 11) & 0b1; - const memoryMapped = !!((devInfo >> 12) & 0b1); - const pageSize = pageSizeFromBits((devInfo >> 13) & 0b111); - - // Application NVM pages seem to get written with a page size of 0xffff - const actualPageSize = Math.min(pageSize, FLASH_MAX_PAGE_SIZE); + return { version, eraseCount }; +} - if (buffer.length < offset + actualPageSize) { - throw new ZWaveError( - "Incomplete page in buffer!", - ZWaveErrorCodes.NVM_InvalidFormat, - ); +function isValidPageHeaderAtOffset( + buffer: Buffer, + offset: number, +): boolean { + try { + tryGetVersionAndEraseCount(buffer, offset); + return true; + } catch { + return false; } - - const formatInfo = buffer.readUInt16LE(offset + 18); - - const encrypted = !(formatInfo & 0b1); - - const header: NVM3PageHeader = { - offset, - version, - eraseCount, - status, - encrypted, - pageSize, - writeSize, - memoryMapped, - deviceFamily, - }; - const bytesRead = actualPageSize; - const data = buffer.subarray(offset + 20, offset + bytesRead); - - const { objects } = readObjects(data); - - return { - page: { header, objects }, - bytesRead, - }; } export function writePageHeader( diff --git a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.11.json b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.11.json index ff1720e42371..8f680ba780c7 100644 --- a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.11.json +++ b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.11.json @@ -28,7 +28,8 @@ "txPower": 0, "measured0dBm": 3.3, "enablePTI": null, - "maxTXPower": null + "maxTXPower": null, + "nodeIdType": null }, "sucUpdateEntries": [ { @@ -87,6 +88,7 @@ "controlledCCs": [] } ], + "applicationName": null, "applicationData": "a11d19000200001e3212270efd213a04fa1d00020000000000000000fd39277c022e000100000000000000000199445b8fcb3e537977d642e808b6568700000000000000000000000000000000000000000000008756e008a3cc6f339248ef5d663f50e136e12e8fe7432265349446d6c5541bf3c500be6567027beeb0e7712b11e21ddf53d86f0b134c00a3bdcd24963a89ef0d753a35b3033f64d1b759077a24d59b45da0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "lastNodeIdLR": null, "maxNodeIdLR": null, diff --git a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.12.json b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.12.json index a6cb369c78cc..fbeb80d746a0 100644 --- a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.12.json +++ b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.12.json @@ -28,7 +28,8 @@ "txPower": 0, "measured0dBm": 3.3, "enablePTI": null, - "maxTXPower": null + "maxTXPower": null, + "nodeIdType": null }, "sucUpdateEntries": [ { @@ -182,6 +183,7 @@ "controlledCCs": [] } ], + "applicationName": null, "applicationData": "a11d19000200001e321b9884fdec8bdd380e00020000000000000000fd8e8c480f1700010000000000000000014c72cc54358f3dc9ce70ac752beb3e7a0000000000000000000000000000000000000000000000873206e7a00af5746fbc07ba927a6bde014d36396481ce9cce689ceba3f12841d85ffcc430bddb814dad5874aa73866b6a1361c9802cac47fc4df1627838f5857eb334b1bb0a8565a09d46bb8e722ac7910000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "lastNodeIdLR": null, "maxNodeIdLR": null, diff --git a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.15.2.json b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.15.2.json index b0605fac22f0..5cdc7b73231a 100644 --- a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.15.2.json +++ b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.15.2.json @@ -35,7 +35,8 @@ "txPower": 0, "measured0dBm": 3.3, "enablePTI": null, - "maxTXPower": null + "maxTXPower": null, + "nodeIdType": null }, "sucUpdateEntries": [ { @@ -176,6 +177,7 @@ "controlledCCs": [] } ], + "applicationName": null, "applicationData": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "sucAwarenessPushNeeded": null }, diff --git a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.16.2.json b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.16.2.json index bc0846fb95d7..a8d4c2f6631f 100644 --- a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.16.2.json +++ b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.16.2.json @@ -1,6 +1,7 @@ { "format": 3, "meta": { + "sharedFileSystem": false, "deviceFamily": 1234, "memoryMapped": true, "pageSize": 1024, @@ -38,7 +39,8 @@ "txPower": 0, "measured0dBm": 3.3, "enablePTI": 0, - "maxTXPower": 14 + "maxTXPower": 14, + "nodeIdType": null }, "sucUpdateEntries": [ { @@ -516,6 +518,7 @@ "controlledCCs": [] } ], + "applicationName": null, "applicationData": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "sucAwarenessPushNeeded": null }, diff --git a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.17.2.json b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.17.2.json index b135863ef374..cc712d18d5fa 100644 --- a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.17.2.json +++ b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.17.2.json @@ -35,9 +35,11 @@ "txPower": 9.9, "measured0dBm": -2.3, "enablePTI": 0, - "maxTXPower": 14 + "maxTXPower": 14, + "nodeIdType": null }, "sucUpdateEntries": [], + "applicationName": null, "applicationData": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "sucAwarenessPushNeeded": null }, @@ -156,6 +158,7 @@ } }, "meta": { + "sharedFileSystem": false, "pageSize": 2048, "writeSize": 1, "memoryMapped": true, diff --git a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.1.json b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.1.json index 332a46273fab..74d727c3780f 100644 --- a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.1.json +++ b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.1.json @@ -35,9 +35,11 @@ "txPower": 9.9, "measured0dBm": 0, "enablePTI": 233, - "maxTXPower": 25.5 + "maxTXPower": 25.5, + "nodeIdType": null }, "sucUpdateEntries": [], + "applicationName": null, "applicationData": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "sucAwarenessPushNeeded": null }, @@ -155,6 +157,7 @@ } }, "meta": { + "sharedFileSystem": false, "pageSize": 2048, "writeSize": 1, "memoryMapped": true, diff --git a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.2.json b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.2.json index 8aaa5ae3404b..f9fb554ad65b 100644 --- a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.2.json +++ b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.2.json @@ -35,9 +35,11 @@ "txPower": 9.9, "measured0dBm": 0, "enablePTI": 233, - "maxTXPower": 25.5 + "maxTXPower": 25.5, + "nodeIdType": null }, "sucUpdateEntries": [], + "applicationName": null, "applicationData": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "sucAwarenessPushNeeded": null }, @@ -155,6 +157,7 @@ } }, "meta": { + "sharedFileSystem": false, "pageSize": 2048, "writeSize": 1, "memoryMapped": true, diff --git a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.3.json b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.3.json index 8991129b5d92..a4ec070d94e5 100644 --- a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.3.json +++ b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.3.json @@ -35,9 +35,11 @@ "txPower": 9.9, "measured0dBm": 0, "enablePTI": 233, - "maxTXPower": 25.5 + "maxTXPower": 25.5, + "nodeIdType": null }, "sucUpdateEntries": [], + "applicationName": null, "applicationData": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "sucAwarenessPushNeeded": null }, @@ -155,6 +157,7 @@ } }, "meta": { + "sharedFileSystem": false, "pageSize": 2048, "writeSize": 1, "memoryMapped": true, diff --git a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.4.json b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.4.json index d9721e616135..d9c7d49c4fb8 100644 --- a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.4.json +++ b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.18.4.json @@ -35,9 +35,11 @@ "txPower": 9.9, "measured0dBm": -2.3, "enablePTI": 0, - "maxTXPower": 14 + "maxTXPower": 14, + "nodeIdType": null }, "sucUpdateEntries": [], + "applicationName": null, "applicationData": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "sucAwarenessPushNeeded": null }, @@ -155,6 +157,7 @@ } }, "meta": { + "sharedFileSystem": false, "pageSize": 2048, "writeSize": 1, "memoryMapped": true, diff --git a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.19.0.json b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.19.0.json index a06f327c60e1..1f94ce144f10 100644 --- a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.19.0.json +++ b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.19.0.json @@ -35,9 +35,11 @@ "txPower": 9.9, "measured0dBm": -2.3, "enablePTI": 0, - "maxTXPower": 14 + "maxTXPower": 14, + "nodeIdType": null }, "sucUpdateEntries": [], + "applicationName": null, "applicationData": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "sucAwarenessPushNeeded": null }, @@ -155,6 +157,7 @@ } }, "meta": { + "sharedFileSystem": false, "pageSize": 2048, "writeSize": 1, "memoryMapped": true, diff --git a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.19.1.json b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.19.1.json index f1ae4979c4b0..3d45963b7cf5 100644 --- a/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.19.1.json +++ b/packages/nvmedit/test/fixtures/nvm_700_json/ctrlr_backup_700_7.19.1.json @@ -35,9 +35,11 @@ "txPower": 9.9, "measured0dBm": -2.3, "enablePTI": 0, - "maxTXPower": 14 + "maxTXPower": 14, + "nodeIdType": null }, "sucUpdateEntries": [], + "applicationName": null, "applicationData": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "sucAwarenessPushNeeded": null }, @@ -155,6 +157,7 @@ } }, "meta": { + "sharedFileSystem": false, "pageSize": 2048, "writeSize": 1, "memoryMapped": true,