pub struct Mapping {Show 16 fields
pub space: i32,
pub offset: u32,
pub length_words: u32,
pub bit_index: u32,
pub byte_order: i32,
pub word_order: i32,
pub sign_magnitude: bool,
pub stride_words: u32,
pub model_relative_offset: u32,
pub composed: Option<Box<ComposedMapping>>,
pub allowed_function_codes: Vec<u32>,
pub string_encoding: Option<StringEncoding>,
pub storage_type: i32,
pub bit_offset: u32,
pub bit_length: u32,
pub length_ref: Option<PointRef>,
}Expand description
§9, §14, §14.1 Physical location and encoding of a point’s raw data.
Fields§
§space: i32§offset: u32§length_words: u32§bit_index: u32§byte_order: i32§word_order: i32§sign_magnitude: boolv0.4 — sign-magnitude instead of two’s complement
stride_words: u32v0.4 — repeating-array element stride (§14.1)
model_relative_offset: u32v0.4 — offset within a discovered model (§7.3)
composed: Option<Box<ComposedMapping>>§allowed_function_codes: Vec<u32>§7.2
string_encoding: Option<StringEncoding>§15
storage_type: i32§14 (composed sub-mappings). Storage type of the sub-value; determines signedness (and width when no bit window is set). Spec’d since v0.4 §14; the field was missing from the schema.
bit_offset: u32v0.5 §14 — bit window over the assembled sub-mapping window, for values whose mantissa and exponent share a register word (embedded decade exponent, e.g. Iskra T5/T6, Eaton PXM “GENERAL FORMAT”). LSB = 0, counted across the whole mapped window (as RegisterField §13.1). A sub-value with a bit window sign-extends from bit_length, not the storage width. bit_length = 0 means “no bit window”.
bit_length: u32§length_ref: Option<PointRef>v0.5 §11.7 — dynamic element/word count for this mapping’s read, resolved from another point in the same device profile at read time (e.g. an “Output Message Length” register gating a variable-length signature-blob read). Effective word count = the decoded value of the referenced point, clamped to length_words as an upper bound if length_words is also set. Must resolve within the same device profile (MDE407); must reference an integer-valued point (MDE505); must not form a cycle (MDE506).
Implementations§
Source§impl Mapping
impl Mapping
Sourcepub fn space(&self) -> AddressSpace
pub fn space(&self) -> AddressSpace
Returns the enum value of space, or the default if the field is set to an invalid enum value.
Sourcepub fn set_space(&mut self, value: AddressSpace)
pub fn set_space(&mut self, value: AddressSpace)
Sets space to the provided enum value.
Sourcepub fn byte_order(&self) -> ByteOrder
pub fn byte_order(&self) -> ByteOrder
Returns the enum value of byte_order, or the default if the field is set to an invalid enum value.
Sourcepub fn set_byte_order(&mut self, value: ByteOrder)
pub fn set_byte_order(&mut self, value: ByteOrder)
Sets byte_order to the provided enum value.
Sourcepub fn word_order(&self) -> WordOrder
pub fn word_order(&self) -> WordOrder
Returns the enum value of word_order, or the default if the field is set to an invalid enum value.
Sourcepub fn set_word_order(&mut self, value: WordOrder)
pub fn set_word_order(&mut self, value: WordOrder)
Sets word_order to the provided enum value.
Sourcepub fn storage_type(&self) -> StorageType
pub fn storage_type(&self) -> StorageType
Returns the enum value of storage_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_storage_type(&mut self, value: StorageType)
pub fn set_storage_type(&mut self, value: StorageType)
Sets storage_type to the provided enum value.
Trait Implementations§
§impl<'de> Deserialize<'de> for Mapping
impl<'de> Deserialize<'de> for Mapping
§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 Message for Mapping
impl Message for Mapping
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.