Struct RefillConfig

Source
pub struct RefillConfig {
Show 13 fields pub active: bool, pub execute: bool, pub initial_wait_interval: u64, pub check_interval: u64, pub max_refill_count_24h: u64, pub max_refill_volume_24h: f64, pub max_refill_count_hour: u64, pub max_refill_volume_hour: f64, pub min_interval_last_refill: u64, pub max_duration_since_last_refill: u64, pub refill_pump_flow: f64, pub max_refill_volume: f64, pub additional_refill_volume: f64,
}
Expand description

Holds the configuration data for the refill control. The configuration is loaded from the .toml configuration file. This struct does not contain any implementation.

Fields§

§active: bool

control will only be active when the flag is set to true

§execute: bool

indicates if the thread shall be started or not

§initial_wait_interval: u64

time interval in seconds which need to pass after initialization of the application before refill control is becoming active

§check_interval: u64

interval for the main control in seconds

§max_refill_count_24h: u64

the maximum number of permitted refill operations within the last 24h

  • If this number is exceeded, then the refill control will not further refill even if the water level sensor signal value is low.
§max_refill_volume_24h: f64

maximum permitted refill volume within the last 24h

  • If this number is exceeded, then the refill control will not further refill even if the water level sensor signal value is low.
§max_refill_count_hour: u64

the maximum number of permitted refill operations within the last hour

  • If this number is exceeded, then the refill control will not further refill even if the water level sensor signal value is low.
§max_refill_volume_hour: f64

maximum permitted refill volume within the last hour

  • If this number is exceeded, then the refill control will not further refill even if the water level sensor signal value is low.
§min_interval_last_refill: u64

minimum time which has to pass after a refill operation before a further refill operation is started

§max_duration_since_last_refill: u64

time interval in seconds which need to pass before the application recognizes a potential tank level switch fault

§refill_pump_flow: f64

flow of the refill pump in liters / second

§max_refill_volume: f64

maximum permitted refill volume in one refill operation

§additional_refill_volume: f64

Refill volume which is added to the tank in a refill operation after the application recognizes tank level position high Background: This volume shall avoid too frequent refill operations. Too high values may lead to unstable water level. It is recommended to calibrate a value, which is a fraction of max_refill_volume.

Trait Implementations§

Source§

impl Clone for RefillConfig

Source§

fn clone(&self) -> RefillConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'de> Deserialize<'de> for RefillConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T