pub struct MosfetStatus {
pub mode: MosfetMode,
pub charging_mosfet: bool,
pub discharging_mosfet: bool,
pub bms_cycles: u8,
pub capacity_ah: f32,
}Expand description
Represents the status of the MOSFETs and battery capacity.
Fields§
§mode: MosfetModeCurrent operational mode of the MOSFETs.
charging_mosfet: boolTrue if the charging MOSFET is enabled.
discharging_mosfet: boolTrue if the discharging MOSFET is enabled.
bms_cycles: u8Number of BMS cycles (e.g., charge/discharge cycles).
capacity_ah: f32Remaining battery capacity in Ampere-hours (Ah).
Implementations§
Trait Implementations§
Source§impl Clone for MosfetStatus
impl Clone for MosfetStatus
Source§fn clone(&self) -> MosfetStatus
fn clone(&self) -> MosfetStatus
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MosfetStatus
impl Debug for MosfetStatus
Source§impl<'de> Deserialize<'de> for MosfetStatus
impl<'de> Deserialize<'de> for MosfetStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MosfetStatus
impl RefUnwindSafe for MosfetStatus
impl Send for MosfetStatus
impl Sync for MosfetStatus
impl Unpin for MosfetStatus
impl UnwindSafe for MosfetStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more