Struct HeatingConfig

Source
pub struct HeatingConfig {
    pub active: bool,
    pub execute: bool,
    pub switch_on_temperature: f32,
    pub switch_off_temperature: f32,
    pub stop_on_refill_error: bool,
    pub stop_on_refill_error_delay: u32,
    pub saw_tooth_profile_config: SawToothProfileConfig,
    pub heater_power: f32,
    pub switch_on_when_out_of_schedule: bool,
    pub switch_on_when_external_stop: bool,
    pub set_value_check_interval: u64,
}
Expand description

Holds the configuration data for the heating 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

§switch_on_temperature: f32

The temperature at which the heater is switched on for 100% of the time. This temperature must be lower than switch_off_temperature. It is overwritten with valid database values once obtained.

§switch_off_temperature: f32

The temperature at which the heater is switched off for 100% of the time. This temperature must be higher than switch_on_temperature. It is overwritten with valid database values once obtained.

§stop_on_refill_error: bool

Flag to determine behavior in case the refill control has a problem and the water level stays low for longer periods of time. If this flag is true, then the heating control will switch off the heater regardless of measured temperature to avoid overheating of the fish tank or the heater itself. Background: If the water level is too low, the temperature sensor may be exposed to ambient air instead of water. This condition results in a wrong temperature reading and thus in the wrong actuation of the heater. Furthermore, exposing the heater to air instead of water and switching it on will not allow the heater to dissipate the heat, and it therefore might suffer damage.

§stop_on_refill_error_delay: u32

Number of seconds which need to pass with low water level before the heater is switched off

§saw_tooth_profile_config: SawToothProfileConfig

Configuration of saw tooth profile for generation of low-frequency PWM signal

§heater_power: f32

Electrical power consumption of heater in Watt

§switch_on_when_out_of_schedule: bool

strategy when schedule check does not allow operation: true=heating will be switched on; false=heating will be switched off

§switch_on_when_external_stop: bool

strategy when the external request for stopping heating control has been received: true=heating will be switched on; false=heating will be switched off

§set_value_check_interval: u64

interval in seconds for polling the database

Trait Implementations§

Source§

impl Clone for HeatingConfig

Source§

fn clone(&self) -> HeatingConfig

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 HeatingConfig

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