#[repr(C)]pub struct PamojaControlSpec {
pub kind: PamojaControlKind,
pub setpoint: f32,
pub hysteresis: f32,
pub cooling: bool,
pub safe_band: f32,
pub empty: f32,
pub warn_within: u32,
pub rising: bool,
pub limit: f32,
}Expand description
A control policy, flattened so every variant crosses as one value.
Only the fields belonging to kind carry meaning; the rest are zero.
Fields§
§kind: PamojaControlKindWhich policy this describes.
setpoint: f32The target reading, for PamojaControlKind::Setpoint.
hysteresis: f32Half the deadband width, for PamojaControlKind::Setpoint.
cooling: boolWhether the output cools rather than heats, for
PamojaControlKind::Setpoint.
safe_band: f32How far the reading may stray before an alert, for
PamojaControlKind::Setpoint.
empty: f32The level treated as empty, for PamojaControlKind::Level.
warn_within: u32How many samples ahead to warn, for PamojaControlKind::Level.
rising: boolWhether a rise rather than a fall is watched, for
PamojaControlKind::Surge.
limit: f32The largest safe change per sample, for PamojaControlKind::Surge.
Trait Implementations§
Source§impl Clone for PamojaControlSpec
impl Clone for PamojaControlSpec
Source§fn clone(&self) -> PamojaControlSpec
fn clone(&self) -> PamojaControlSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PamojaControlSpec
Source§impl Debug for PamojaControlSpec
impl Debug for PamojaControlSpec
Source§impl From<ControlSpec> for PamojaControlSpec
impl From<ControlSpec> for PamojaControlSpec
Source§impl PartialEq for PamojaControlSpec
impl PartialEq for PamojaControlSpec
Source§fn eq(&self, other: &PamojaControlSpec) -> bool
fn eq(&self, other: &PamojaControlSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PamojaControlSpec
Auto Trait Implementations§
impl Freeze for PamojaControlSpec
impl RefUnwindSafe for PamojaControlSpec
impl Send for PamojaControlSpec
impl Sync for PamojaControlSpec
impl Unpin for PamojaControlSpec
impl UnsafeUnpin for PamojaControlSpec
impl UnwindSafe for PamojaControlSpec
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