Skip to main content

Module nvm3

Module nvm3 

Source
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.
Nvm3Error
Why an image could not be read.
NvmInfo
What a controller backup says about itself.
Version
A version file: major.minor.patch and 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 backup so it can be written onto the controller whose current image is target: 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 size bytes holding files, packed from the first page, the rest erased. Files must fit one page each.