pub enum Addressing {
Sum {
terms: Vec<AddressTerm>,
len: u32,
port: Option<String>,
p_length: Option<String>,
},
}Expand description
Register addressing metadata for a node.
Variants§
Sum
Register address is the sum of every declared address term.
This is the GenICam register address model: <Address>, <pAddress>
and <pIndex> may each appear any number of times on one register and
all of them add up. A node such as
<IntReg Name="SerialPortSource_Val">
<pAddress>SerialPortSourceAddr</pAddress>
<Address>0x00000008</Address>
</IntReg>lives eight bytes past the block base, not at the base and not at offset eight. Keeping only one term reads the wrong register and says nothing about it — that was issue #35.
Fields
terms: Vec<AddressTerm>Terms to add together, in declaration order.
port: Option<String><pPort>: the port the address is relative to, verbatim; None
when the element is absent, which means the device.
A chunk port’s addresses count from the start of one chunk in a
stream buffer, an event port’s from the start of one event — not
from anywhere in the device’s memory (GenICam Standard v2.1.1
§2.8.16). XmlModel::ports says which port is which.
Implementations§
Source§impl Addressing
impl Addressing
Sourcepub fn byte_len(&self) -> u32
pub fn byte_len(&self) -> u32
Register block length in bytes, as declared by <Length>; 0 for a
register whose length is read from Addressing::length_node.
Sourcepub fn length_node(&self) -> Option<&str>
pub fn length_node(&self) -> Option<&str>
The <pLength> node the length is read from at runtime, if any.
Sourcepub fn port(&self) -> Option<&str>
pub fn port(&self) -> Option<&str>
The <pPort> the address is relative to; None means the device.
Sourcepub fn referenced_nodes(&self) -> Vec<&str>
pub fn referenced_nodes(&self) -> Vec<&str>
Names of every node this addressing reads at resolution time.
Used to build the invalidation graph: when one of these changes, the address changes, so anything cached against it is stale.