Enum AquariumSignal

Source
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

Source

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 - The f32 floating-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.

Source

pub fn get_next_atlas_scientific_signal(&self) -> AquariumSignal

Defines the sequence of measurement used by AtlasScientific

Trait Implementations§

Source§

impl Clone for AquariumSignal

Source§

fn clone(&self) -> AquariumSignal

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 Debug for AquariumSignal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for AquariumSignal

Source§

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 the fmt::Display trait.
§Returns

A fmt::Result indicating whether the formatting operation was successful.

Source§

impl PartialEq for AquariumSignal

Source§

fn eq(&self, other: &AquariumSignal) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for AquariumSignal

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T