Expand description
NVM3, the flash file system of 700 and 800 series controllers.
An image is made of pages (a header with a Berger-coded erase count, then word-aligned objects with Berger-coded headers). Objects are keyed files; a file may be split into fragments; the newest copy wins. A 700 series image holds two volumes (application, then protocol); an 800 series image one shared volume.
This module reads images (to identify a backup before restoring it),
writes them, and converts a backup to another controller’s layout and SDK
(convert), following Z-Wave JS’s migrateNVM for the 700/800 path.
Structs§
- Nvm3
- A parsed image.
- Nvm3
Error - Why an image could not be read.
- NvmInfo
- What a controller backup says about itself.
- Version
- A version file:
major.minor.patchand the file format.
Constants§
- APPLICATION_
SIZE_ 700 - The application volume’s size in a 700 series image.
- APPLICATION_
VERSION_ FILE_ 700 - Application version file, 700 series.
- APPLICATION_
VERSION_ FILE_ 800 - Application version file, 800 series (marks a shared volume).
- CONTROLLER_
INFO_ FILE - Controller information file (home id, node id).
- IMAGE_
SIZE_ 700 - A 700 series image (application and protocol volumes).
- IMAGE_
SIZE_ 800 - An 800 series image (one shared volume).
- PROTOCOL_
VERSION_ FILE - Protocol version file.
- RF_
CONFIG_ FILE - The RF configuration file (region, TX power): the target’s is kept.
Functions§
- convert
- Converts
backupso it can be written onto the controller whose current image istarget: the same series and SDK give the backup back as it is; otherwise every file of the backup is repacked in the target’s layout (one shared volume on the 800 series, application and protocol volumes on the 700 series) with the target’s application version and RF configuration, and the protocol files as the backup has them, which the target’s firmware migrates to its own format on start. Refused when the backup’s protocol format is newer than the target’s SDK reads, or when either image’s format cannot be told. - write_
volume - Writes a volume of
sizebytes holdingfiles, packed from the first page, the rest erased. Files must fit one page each.