Expand description
Saving a camera’s configuration and restoring it: GenICam’s <Streamable>
features (ADR-0028).
GenICam Standard v2.1.1 §2.8.1 marks a feature <Streamable> when it “is
prepared to be stored to and loaded from a file via the GenApi node tree.
The idea is to persist the state of a camera by storing the features marked
as Streamable and restore the state by writing those features back to the
node tree.” This module is that idea, in three parts:
NodeMap::persistence_plandecides from the XML alone which features a configuration holds, which selectors each is saved under, and the order a restore writes them in;NodeMap::save_configurationreads them from the device into aConfiguration, andNodeMap::load_configurationwrites one back, reporting every value it could not write;Configuration::to_textandConfiguration::parseare the file format: the text format of GenApi’s reference implementation (CFeatureBag), chosen in ADR-0028.
Nothing here touches a file or a socket, so it builds for wasm.
Structs§
- Configuration
- A camera configuration: the streamable features’ values, and the camera they were read from.
- Load
Failure - A value
NodeMap::load_configurationcould not write. - Load
Report - What
NodeMap::load_configurationdid. - Omission
- A feature a save left out, and why.
- Parse
Configuration Error - A configuration file that could not be read.
- Persistence
Plan - What a configuration holds and the order a restore writes it in, decided
from the XML alone. See
NodeMap::persistence_plan. - Planned
Feature - One feature as a configuration holds it.
- Saved
Value - One value of a configuration.
Constants§
- FILE_
MAGIC - The first line of every file: the magic GUID that GenApi’s reference
implementation (
Persistence.h,GENAPI_PERSISTENCE_MAGIC) writes and requires. - MAX_
SELECTOR_ COMBINATIONS - How many values one feature may be saved under, counting every combination of its selectors’ entries. A bound, so that a save always ends: an integer selector may declare no useful maximum.