//! Power-supply (PSU) information reported by a miner's firmware. //! //! A backend fills in only what its firmware actually exposes; every field is //! optional. Some firmware reports the PSU's identity and rated voltage envelope //! (min/max output voltage), others also report the live output voltage and //! current. Voltages are in volts and currents in amps. #[cfg(feature = "python")] use pyo3::pyclass; use serde::{Deserialize, Serialize}; use ts_rs::TS; /// Power-supply identity and voltage telemetry for one miner. #[cfg_attr(feature = "python", pyclass(from_py_object, module = "asic_rs"))] #[cfg_attr(feature = "python", asic_rs_pydantic::py_pydantic_model(getters))] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default, TS)] pub struct PsuInfo { /// PSU model / type identifier, when reported. pub model: Option, /// PSU firmware/hardware version, when reported. pub version: Option, /// Minimum rated output voltage in volts, when reported. pub voltage_min: Option, /// Maximum rated output voltage in volts, when reported. pub voltage_max: Option, /// Live output voltage in volts, when reported. pub output_voltage: Option, /// Live output current in amps, when reported. pub output_current: Option, }