#[repr(C)]pub struct PamojaReaction {
pub has_actuator: bool,
pub actuator: bool,
pub alert: PamojaAlertKind,
pub reading: f32,
pub samples: u32,
pub rate: f32,
}Expand description
What a controller decided about one reading.
Only the field belonging to alert carries meaning; the rest are zero.
Fields§
§has_actuator: boolWhether the profile drives an output at all.
false means the profile observes rather than controls, and actuator
should be ignored.
actuator: boolThe setting the output should take, when has_actuator is true.
alert: PamojaAlertKindWhich threshold the reading crossed.
reading: f32The offending reading, for PamojaAlertKind::OutOfRange.
samples: u32The estimated samples until empty, for PamojaAlertKind::RunningOut.
rate: f32The change since the previous sample, for
PamojaAlertKind::ChangingFast.
Trait Implementations§
Source§impl Clone for PamojaReaction
impl Clone for PamojaReaction
Source§fn clone(&self) -> PamojaReaction
fn clone(&self) -> PamojaReaction
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 PamojaReaction
Source§impl Debug for PamojaReaction
impl Debug for PamojaReaction
Source§impl PartialEq for PamojaReaction
impl PartialEq for PamojaReaction
Source§fn eq(&self, other: &PamojaReaction) -> bool
fn eq(&self, other: &PamojaReaction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PamojaReaction
Auto Trait Implementations§
impl Freeze for PamojaReaction
impl RefUnwindSafe for PamojaReaction
impl Send for PamojaReaction
impl Sync for PamojaReaction
impl Unpin for PamojaReaction
impl UnsafeUnpin for PamojaReaction
impl UnwindSafe for PamojaReaction
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