pub struct VocTuning(/* private fields */);Expand description
Configuration for the VOC Index algorithm.
Implementations§
Source§impl VocTuning
impl VocTuning
Sourcepub fn new(
index_offset: i16,
learning_time_offset: i16,
learning_time_gain: i16,
gating_max_durations: i16,
initial_standard_deviation: i16,
gain_factor: i16,
) -> Result<Self, DataError>
pub fn new( index_offset: i16, learning_time_offset: i16, learning_time_gain: i16, gating_max_durations: i16, initial_standard_deviation: i16, gain_factor: i16, ) -> Result<Self, DataError>
Creates a new VocTuning Index configuration:
index_offset: VOC Index representing typical conditions. Range: 1 - 250, Default: 100.learning_time_offset: Time constant to estimate the offset from the history in hours. After twice the learning time events are forgotten. Range: 1 - 1,000h, Default: 12hlearning_time_gain: Time constant to estimate the gain from the history in hours. After twice the learning time events are forgotten. Range 1 - 1,000h, Default: 12hgating_max_durations: Maximum duration the estimator freezes on a high VOC index signal. Zero disables the gating. Range 0 - 3,000min, Default 180min.initial_standard_deviation: Initial estimate for the standard deviation. Range 10 - 5,000, Default: 50.gain_factor: Factor to amplify/attunate the VOC index output. Range 1 - 1,000, Default: 230.
§Errors
ValueOutOfRange`: If the values with scaling are not in range.
Trait Implementations§
Source§impl TryFrom<&[u8]> for VocTuning
impl TryFrom<&[u8]> for VocTuning
impl StructuralPartialEq for VocTuning
Auto Trait Implementations§
impl Freeze for VocTuning
impl RefUnwindSafe for VocTuning
impl Send for VocTuning
impl Sync for VocTuning
impl Unpin for VocTuning
impl UnwindSafe for VocTuning
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