Struct VentilationConfig

Source
pub struct VentilationConfig {
    pub active: bool,
    pub execute: bool,
    pub switch_on_temperature: f32,
    pub switch_off_temperature: f32,
    pub switch_on_when_terminating: bool,
    pub saw_tooth_profile_config: SawToothProfileConfig,
    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 ventilation 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 ventilation is switched on for 100% of the time. This temperature must be higher than switch_off_temperature. It is overwritten with valid database values once obtained.

§switch_off_temperature: f32

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

§switch_on_when_terminating: bool

A flag to determine the behavior of the control when the application is terminating If this flag is true, the application will switch on the ventilation when exiting.

§saw_tooth_profile_config: SawToothProfileConfig

The configuration of saw tooth profile for generation of low-frequency PWM signal

§switch_on_when_out_of_schedule: bool

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

§switch_on_when_external_stop: bool

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

§set_value_check_interval: u64

interval in seconds for polling the database

Trait Implementations§

Source§

impl<'de> Deserialize<'de> for VentilationConfig

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> 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, 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