Skip to main content

Crate viva_genapi

Crate viva_genapi 

Source
Expand description

GenApi node system: typed feature access backed by register IO.

What a node caches, and how its register is addressed, are the node map’s business, not the API’s (ADR-0030): read a value through NodeMap, and a register’s address with NodeMap::register_address.

ⓘ
// A formula's cached value and generation are private (backlog API-07).
fn peek(node: &viva_genapi::SkNode) -> bool {
    node.cache.borrow().is_some()
}
ⓘ
// So is a register's.
fn peek(node: &viva_genapi::RegisterNode) -> bool {
    node.cache.borrow().is_some()
}
ⓘ
// A node's addressing is `viva_genapi_xml::Addressing`, which keeps
// changing; it is not part of this crate's API (backlog API-02).
fn terms(node: &viva_genapi::IntegerNode) -> bool {
    node.addressing.is_some()
}

Re-exports§

pub use persistence::Configuration;
pub use persistence::LoadReport;
pub use persistence::PersistencePlan;
pub use swissknife::AstNode;
pub use swissknife::EvalMode;
pub use swissknife::Value;
pub use swissknife::VarAttr;

Modules§

persistence
Saving a camera’s configuration and restoring it: GenICam’s <Streamable> features (ADR-0028).
swissknife
GenApi formula parser and evaluator.

Structs§

BitField
Bitfield metadata describing a sub-range of a register payload.
BooleanNode
Boolean feature metadata.
CategoryNode
Category node describing child feature names.
ChunkData
The chunks of one stream buffer, by chunk ID: what a nodemap’s chunk ports read.
CommandNode
Command feature metadata.
ConverterNode
Converter node transforming a raw register value to/from a float feature value via two formulas.
DocumentIdentity
Which camera a document describes, and which revision of the document it is: the <RegisterDescription> attributes of GenICam Standard v2.1.1 §2.7.
EnumEntryDecl
Declaration for a single enumeration entry.
EnumNode
Enumeration feature metadata and mapping tables.
FeatureState
The live state of one feature, read from the device in a single call.
FloatNode
Floating point feature metadata.
FormulaVar
One variable a formula reads: the identifier it appears as, the node behind it, and which property of that node it denotes.
IgnoredElement
A child element of a node that the parser read past without interpreting it: the node loaded, but whatever the element says was not taken into account.
IntConverterNode
IntConverter node transforming a raw register value to/from an integer feature value via two formulas.
IntegerNode
Integer feature metadata extracted from the XML description.
ManualClock
A clock that moves only when told to: for tests, and for a host without a system clock, which advances it from its own (a browser’s performance.now(), say).
NodeMap
Runtime nodemap built from an XmlModel capable of reading and writing feature values via a RegisterIo transport.
NodeMeta
Shared metadata present on every GenICam node.
NullIo
No-op register I/O that returns zeroed data for reads and ignores writes.
PredicateRefs
References to predicate provider nodes used for runtime gating.
RegisterNode
<Register> node: raw byte-array access to a register block.
SkNode
SwissKnife node evaluating an arithmetic expression referencing other nodes.
SkippedNode
A node element that could not be parsed and was left out of the model.
StringNode
A string feature: a <StringReg>, which reads a register, or a <String>, which holds a value or reads and writes the node its <pValue> names (GenICam Standard v2.1.1 §2.8.11, §2.8.12).
SystemClock
The system’s monotonic clock, std::time::Instant.
ValueRange
The current bounds of a numeric feature.

Enums§

AccessDirection
Which way an access was refused.
AccessMode
Access privileges for a GenICam node as described in the XML.
ByteOrder
Byte order used to interpret a multi-byte register payload.
CachingMode
<Cachable>: whether a register’s value may be answered from a cache.
CommandValueSrc
Where a <Command> takes the value it writes.
EnumValueSrc
Source of the numeric value backing an enumeration entry.
FeatureValue
A feature’s current value, typed by the node that holds it.
FloatEncoding
Byte-level encoding of the payload behind a <Float> / <FloatReg> node.
GenApiError
Error type produced by GenApi operations.
Node
Node kinds supported by the Tier-1 subset.
PortKind
What a <Port> gives access to.
RangeViolation
How a value falls outside what a node accepts.
Representation
Recommended UI representation for a numeric feature.
Sign
Whether a register’s bits are interpreted as a signed or unsigned integer.
SkOutput
Output type of a SwissKnife expression node.
Slope
How a converter’s <FormulaFrom> moves with its raw value.
Visibility
Visibility level controlling which users see a feature.

Traits§

Clock
A monotonic time source.
RegisterIo
Register access abstraction backed by transports such as GVCP/GenCP.