pub enum FloatEncoding {
Ieee754,
ScaledInteger,
}Expand description
Byte-level encoding of the payload behind a <Float> / <FloatReg> node.
GenICam’s XSD lets a float feature be backed by either:
- a native IEEE 754 register — a
<FloatReg>element, or a<Float>whose addressing reads exactly 4 or 8 bytes and carries no<Scale>/<Offset>; - a scaled integer register — a
<Float>that declares<Scale>and/or<Offset>and reads the register bytes as a signed integer.
Prior to this field, get_float/set_float always used the scaled-integer
codec. That returned the bit pattern of the IEEE 754 value decoded as i64
for fields such as AcquisitionFrameRate (e.g. 1106247680 for 30.0) —
see doc/2026-04-12-genapi-numeric-type-dispatch.md.
Variants§
Ieee754
Register bytes are an IEEE 754 value (4 bytes → f32, 8 bytes → f64).
ScaledInteger
Register bytes are a signed integer; Scale and Offset map to the
user-facing value.
Trait Implementations§
Source§impl Clone for FloatEncoding
impl Clone for FloatEncoding
Source§fn clone(&self) -> FloatEncoding
fn clone(&self) -> FloatEncoding
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FloatEncoding
impl Debug for FloatEncoding
Source§impl Default for FloatEncoding
impl Default for FloatEncoding
Source§fn default() -> FloatEncoding
fn default() -> FloatEncoding
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FloatEncoding
impl<'de> Deserialize<'de> for FloatEncoding
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FloatEncoding
impl PartialEq for FloatEncoding
Source§impl Serialize for FloatEncoding
impl Serialize for FloatEncoding
impl Copy for FloatEncoding
impl Eq for FloatEncoding
impl StructuralPartialEq for FloatEncoding
Auto Trait Implementations§
impl Freeze for FloatEncoding
impl RefUnwindSafe for FloatEncoding
impl Send for FloatEncoding
impl Sync for FloatEncoding
impl Unpin for FloatEncoding
impl UnwindSafe for FloatEncoding
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
Mutably borrows from an owned value. Read more