pub enum AquariumSignal {
WaterTemperature,
pH,
Conductivity,
AmbientTemperature,
AmbientHumidity,
TankLevelSwitchPosition,
TankLevelSwitchInvalid,
TankLevelSwitchPositionStabilized,
HeatingControlStatus,
VentilationControlStatus,
RefillPumpStatus,
}Expand description
Enum is used for internal thread messaging between various threads The values indicate which information the thread shall return.
Variants§
WaterTemperature
water temperature in °C
pH
pH Value
Conductivity
conductivity im uS/cm
AmbientTemperature
ambient (air) temperature in °C
AmbientHumidity
ambient humidity in %
TankLevelSwitchPosition
position of tank level switch
TankLevelSwitchInvalid
status bit of tank level switch signal
TankLevelSwitchPositionStabilized
stabilized position of tank level switch
HeatingControlStatus
heating control status
VentilationControlStatus
ventilation control status
RefillPumpStatus
refill pump status
Implementations§
Source§impl AquariumSignal
impl AquariumSignal
Sourcepub fn output_file_string(&self, signal: f32) -> String
pub fn output_file_string(&self, signal: f32) -> String
Formats a given floating-point signal value into a String based on the specific AquariumSignal type.
This function applies specific formatting rules (e.g., number of decimal places) for common aquarium sensor signals to ensure consistent output strings, suitable for display or logging.
§Arguments
signal- Thef32floating-point value of the signal to be formatted.
§Returns
A String representation of the signal, formatted according to its AquariumSignal type.
For example, WaterTemperature is formatted to one decimal place, pH to two, etc.
Sourcepub fn get_next_atlas_scientific_signal(&self) -> AquariumSignal
pub fn get_next_atlas_scientific_signal(&self) -> AquariumSignal
Defines the sequence of measurement used by AtlasScientific
Trait Implementations§
Source§impl Clone for AquariumSignal
impl Clone for AquariumSignal
Source§fn clone(&self) -> AquariumSignal
fn clone(&self) -> AquariumSignal
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AquariumSignal
impl Debug for AquariumSignal
Source§impl Display for AquariumSignal
impl Display for AquariumSignal
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the AquariumSignal enum into its human-readable string representation.
This implementation enables AquariumSignal variants to be printed directly
using macros like println! or format!, returning the descriptive name of the signal.
§Arguments
f- A mutable reference to the formatter, as required by thefmt::Displaytrait.
§Returns
A fmt::Result indicating whether the formatting operation was successful.