pub struct PvRange {
pub high: f32,
pub low: f32,
}Expand description
PV scale range, read once before the test starts (PvSH/PvSL in the legacy app’s
ReadInitialOPCvalues) – distinct from MvRange, used only to express the
oscillation amplitude as a percentage in core-tuning-math::measure_oscillation.
Fields§
§high: f32§low: f32Implementations§
Source§impl PvRange
impl PvRange
Sourcepub fn new(high: f32, low: f32) -> Result<Self, RangeError>
pub fn new(high: f32, low: f32) -> Result<Self, RangeError>
Validates a PV range read from an untrusted source (a live OPC DA tag, a CLI flag
override). Rejects a non-finite bound (NaN/infinite) or a zero span (high == low,
which would make measure_oscillation’s amplitude-as-a-percentage-of-range
calculation divide by zero). Unlike MvRange, the two bounds are not required to
be in low < high order – only genuinely distinct – since the PV range is used
solely as a span magnitude here, not as an inequality bound the way the MV range is
in clamp_relay_amplitude.
Trait Implementations§
impl Copy for PvRange
Source§impl<'de> Deserialize<'de> for PvRange
impl<'de> Deserialize<'de> for PvRange
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
impl StructuralPartialEq for PvRange
Auto Trait Implementations§
impl Freeze for PvRange
impl RefUnwindSafe for PvRange
impl Send for PvRange
impl Sync for PvRange
impl Unpin for PvRange
impl UnsafeUnpin for PvRange
impl UnwindSafe for PvRange
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