pub enum Addressing {
Sum {
terms: Vec<AddressTerm>,
len: u32,
},
BySelector {
selector: String,
map: Vec<(String, (u64, u32))>,
},
}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.
BySelector
Node switches between register blocks based on a selector value.
This is <Selected>/<pSelected>, which picks one block rather than
contributing an offset, so it is not a term in the sum above.
Implementations§
Source§impl Addressing
impl Addressing
Sourcepub fn byte_len(&self) -> Option<u32>
pub fn byte_len(&self) -> Option<u32>
Register block length in bytes, when it does not depend on a selector.
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.
Trait Implementations§
Source§impl Clone for Addressing
impl Clone for Addressing
Source§fn clone(&self) -> Addressing
fn clone(&self) -> Addressing
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Addressing
impl Debug for Addressing
Source§impl<'de> Deserialize<'de> for Addressing
impl<'de> Deserialize<'de> for Addressing
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for Addressing
impl PartialEq for Addressing
Source§fn eq(&self, other: &Addressing) -> bool
fn eq(&self, other: &Addressing) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for Addressing
impl Serialize for Addressing
impl Eq for Addressing
impl StructuralPartialEq for Addressing
Auto Trait Implementations§
impl Freeze for Addressing
impl RefUnwindSafe for Addressing
impl Send for Addressing
impl Sync for Addressing
impl Unpin for Addressing
impl UnsafeUnpin for Addressing
impl UnwindSafe for Addressing
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.