pub struct FeedConfig {
pub active: bool,
pub execute: bool,
pub schedule_check_interval: u32,
pub device_switch_delay_millis: u32,
pub strategy_multiple_schedule_entries_in_past: i32,
}Expand description
Holds the configuration data for the feed control. The configuration is loaded from the .toml configuration file. This struct does not contain any implementation.
Fields§
§active: boolcontrol will only be active when the flag is set to true
execute: boolindicates if the thread shall be started or not
schedule_check_interval: u32interval for the main control in seconds
device_switch_delay_millis: u32waiting time in milliseconds before switching on or off a device during feed
strategy_multiple_schedule_entries_in_past: i32Describes the strategy to use when there are multiple feed schedule entries in the past. Using strategy_multiple_schedule_entries_in_past: negative value: execute none of them positive value: execute the xth entry according to how they are stacked in time Example 0: Execute the first entry which has a timestamp closest to the current time. Example 1: Execute the second last entry which lies closest to the current time. Example 99: Numbers higher than the number of entries found in the past will trigger execution of the last entry which has a timestamp furthest from the current time.
Trait Implementations§
Source§impl Clone for FeedConfig
impl Clone for FeedConfig
Source§fn clone(&self) -> FeedConfig
fn clone(&self) -> FeedConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more