pub struct BmsChargeMessageSend(/* private fields */);Implementations§
Source§impl BmsChargeMessageSend
impl BmsChargeMessageSend
Sourcepub const fn charge_volts(&self) -> f32
pub const fn charge_volts(&self) -> f32
Voltage to charge to
Units: V
Bits: 0..16
Sourcepub const fn with_charge_volts_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_charge_volts_checked(self, value: f32) -> Result<Self, ()>
Voltage to charge to
Units: V
Bits: 0..16
Sourcepub const fn with_charge_volts(self, value: f32) -> Self
pub const fn with_charge_volts(self, value: f32) -> Self
Voltage to charge to
Units: V
Bits: 0..16
Sourcepub const fn set_charge_volts(&mut self, value: f32)
pub const fn set_charge_volts(&mut self, value: f32)
Voltage to charge to
Units: V
Bits: 0..16
Sourcepub const fn set_charge_volts_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_charge_volts_checked(&mut self, value: f32) -> Result<(), ()>
Voltage to charge to
Units: V
Bits: 0..16
Sourcepub const fn charge_current(&self) -> f32
pub const fn charge_current(&self) -> f32
Current to charge at
Units: A
Bits: 16..32
Sourcepub const fn with_charge_current_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_charge_current_checked(self, value: f32) -> Result<Self, ()>
Current to charge at
Units: A
Bits: 16..32
Sourcepub const fn with_charge_current(self, value: f32) -> Self
pub const fn with_charge_current(self, value: f32) -> Self
Current to charge at
Units: A
Bits: 16..32
Sourcepub const fn set_charge_current(&mut self, value: f32)
pub const fn set_charge_current(&mut self, value: f32)
Current to charge at
Units: A
Bits: 16..32
Sourcepub const fn set_charge_current_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_charge_current_checked(&mut self, value: f32) -> Result<(), ()>
Current to charge at
Units: A
Bits: 16..32
Sourcepub const fn enable_charging(&self) -> u8
pub const fn enable_charging(&self) -> u8
Whether to charge
0xFF=no charging
Bits: 32..40
Sourcepub const fn with_enable_charging_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_enable_charging_checked(self, value: u8) -> Result<Self, ()>
Whether to charge
0xFF=no charging
Bits: 32..40
Sourcepub const fn with_enable_charging(self, value: u8) -> Self
pub const fn with_enable_charging(self, value: u8) -> Self
Whether to charge
0xFF=no charging
Bits: 32..40
Sourcepub const fn set_enable_charging(&mut self, value: u8)
pub const fn set_enable_charging(&mut self, value: u8)
Whether to charge
0xFF=no charging
Bits: 32..40
Source§impl BmsChargeMessageSend
impl BmsChargeMessageSend
Sourcepub fn try_with_charge_volts(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_charge_volts(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_charge_volts but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_charge_volts(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_charge_volts(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_charge_volts but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_charge_current(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_charge_current(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_charge_current but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_charge_current(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_charge_current(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_charge_current but returns
OutOfRange instead of saturating an unrepresentable value.
Trait Implementations§
Source§impl Clone for BmsChargeMessageSend
impl Clone for BmsChargeMessageSend
Source§fn clone(&self) -> BmsChargeMessageSend
fn clone(&self) -> BmsChargeMessageSend
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more