pub enum InternalCommand {
Show 15 variants
SwitchOn(AquariumDevice),
SwitchOff(AquariumDevice),
Pulse(AquariumDevice, u16),
SetRelay(u16),
UnsetRelay(u16),
PulseRelay(u16, u16),
RequestSignal(AquariumSignal),
ResetAllErrors,
Quit,
Terminate,
ScheduleCheck,
Start,
Stop,
Execute(i32),
Unknown,
}Expand description
Enum is used for internal thread messaging. Note: Relay state and device state do not necessarily correlate.
Variants§
SwitchOn(AquariumDevice)
Switch on a device
SwitchOff(AquariumDevice)
Switch off a device
Pulse(AquariumDevice, u16)
Pulse a device (switch on, pause, switch off)
SetRelay(u16)
Set a relay
UnsetRelay(u16)
Unset a relay
PulseRelay(u16, u16)
Pulse a relay (switch on, pause, switch off)
RequestSignal(AquariumSignal)
Request a signal
ResetAllErrors
Reset existing errors (used for refill control)
Quit
Quit the application - first step to terminate the application
Terminate
Terminate - second step to terminating the application
ScheduleCheck
ScheduleCheck - request permission to run based on time of day
Start
(Re-)start controller (Balling, Ventilation, Refill, Heating)
Stop
(Temporarily) stop controller (Balling, Ventilation, Refill, Heating)
Execute(i32)
Execute a (feed) profile with a given ID
Unknown
Default value used when unknown command is received via IPC-message
Implementations§
Trait Implementations§
Source§impl Clone for InternalCommand
impl Clone for InternalCommand
Source§fn clone(&self) -> InternalCommand
fn clone(&self) -> InternalCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InternalCommand
impl Debug for InternalCommand
Source§impl Display for InternalCommand
impl Display for InternalCommand
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the InternalCommand enum into its human-readable string representation.
This implementation allows InternalCommand variants to be displayed directly
using macros like println! or format!, returning the name of the command.
For variants that hold data (e.g., SwitchOn(_)), only the command name is displayed,
not the associated data.
§Arguments
f- A mutable reference to the formatter, as required by thefmt::Displaytrait.
§Returns
A fmt::Result indicating whether the formatting operation was successful.