pub struct CellVoltage(/* private fields */);Implementations§
Source§impl CellVoltage
impl CellVoltage
Sourcepub const fn with_high_val_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_high_val_checked(self, value: f32) -> Result<Self, ()>
The highest voltage cell value
Units: V
Bits: 0..16
Sourcepub const fn with_high_val(self, value: f32) -> Self
pub const fn with_high_val(self, value: f32) -> Self
The highest voltage cell value
Units: V
Bits: 0..16
Sourcepub const fn set_high_val(&mut self, value: f32)
pub const fn set_high_val(&mut self, value: f32)
The highest voltage cell value
Units: V
Bits: 0..16
Sourcepub const fn set_high_val_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_high_val_checked(&mut self, value: f32) -> Result<(), ()>
The highest voltage cell value
Units: V
Bits: 0..16
Sourcepub const fn with_high_chip_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_high_chip_checked(self, value: u8) -> Result<Self, ()>
The highest voltage cell chip #
Bits: 16..20
Sourcepub const fn with_high_chip(self, value: u8) -> Self
pub const fn with_high_chip(self, value: u8) -> Self
The highest voltage cell chip #
Bits: 16..20
Sourcepub const fn set_high_chip(&mut self, value: u8)
pub const fn set_high_chip(&mut self, value: u8)
The highest voltage cell chip #
Bits: 16..20
Sourcepub const fn set_high_chip_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_high_chip_checked(&mut self, value: u8) -> Result<(), ()>
The highest voltage cell chip #
Bits: 16..20
Sourcepub const fn high_cell(&self) -> u8
pub const fn high_cell(&self) -> u8
The highest voltage cell #
Zero indexed within the chip
Bits: 20..24
Sourcepub const fn with_high_cell_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_high_cell_checked(self, value: u8) -> Result<Self, ()>
The highest voltage cell #
Zero indexed within the chip
Bits: 20..24
Sourcepub const fn with_high_cell(self, value: u8) -> Self
pub const fn with_high_cell(self, value: u8) -> Self
The highest voltage cell #
Zero indexed within the chip
Bits: 20..24
Sourcepub const fn set_high_cell(&mut self, value: u8)
pub const fn set_high_cell(&mut self, value: u8)
The highest voltage cell #
Zero indexed within the chip
Bits: 20..24
Sourcepub const fn set_high_cell_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_high_cell_checked(&mut self, value: u8) -> Result<(), ()>
The highest voltage cell #
Zero indexed within the chip
Bits: 20..24
Sourcepub const fn with_low_val_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_low_val_checked(self, value: f32) -> Result<Self, ()>
The lowest voltage cell value
Units: V
Bits: 24..40
Sourcepub const fn with_low_val(self, value: f32) -> Self
pub const fn with_low_val(self, value: f32) -> Self
The lowest voltage cell value
Units: V
Bits: 24..40
Sourcepub const fn set_low_val(&mut self, value: f32)
pub const fn set_low_val(&mut self, value: f32)
The lowest voltage cell value
Units: V
Bits: 24..40
Sourcepub const fn set_low_val_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_low_val_checked(&mut self, value: f32) -> Result<(), ()>
The lowest voltage cell value
Units: V
Bits: 24..40
Sourcepub const fn with_low_chip_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_low_chip_checked(self, value: u8) -> Result<Self, ()>
The lowest voltage cell chip #
Bits: 40..44
Sourcepub const fn with_low_chip(self, value: u8) -> Self
pub const fn with_low_chip(self, value: u8) -> Self
The lowest voltage cell chip #
Bits: 40..44
Sourcepub const fn set_low_chip(&mut self, value: u8)
pub const fn set_low_chip(&mut self, value: u8)
The lowest voltage cell chip #
Bits: 40..44
Sourcepub const fn set_low_chip_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_low_chip_checked(&mut self, value: u8) -> Result<(), ()>
The lowest voltage cell chip #
Bits: 40..44
Sourcepub const fn with_low_cell_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_low_cell_checked(self, value: u8) -> Result<Self, ()>
The lowest voltage cell #
Bits: 44..48
Sourcepub const fn with_low_cell(self, value: u8) -> Self
pub const fn with_low_cell(self, value: u8) -> Self
The lowest voltage cell #
Bits: 44..48
Sourcepub const fn set_low_cell(&mut self, value: u8)
pub const fn set_low_cell(&mut self, value: u8)
The lowest voltage cell #
Bits: 44..48
Sourcepub const fn set_low_cell_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_low_cell_checked(&mut self, value: u8) -> Result<(), ()>
The lowest voltage cell #
Bits: 44..48
Sourcepub const fn with_avg_val_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_avg_val_checked(self, value: f32) -> Result<Self, ()>
The average voltage of all cells
Units: V
Bits: 48..64
Sourcepub const fn with_avg_val(self, value: f32) -> Self
pub const fn with_avg_val(self, value: f32) -> Self
The average voltage of all cells
Units: V
Bits: 48..64
Sourcepub const fn set_avg_val(&mut self, value: f32)
pub const fn set_avg_val(&mut self, value: f32)
The average voltage of all cells
Units: V
Bits: 48..64
Source§impl CellVoltage
impl CellVoltage
Sourcepub fn try_with_high_val(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_high_val(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_high_val but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_high_val(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_high_val(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_high_val but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_low_val(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_low_val(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_low_val but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_low_val(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_low_val(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_low_val but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_avg_val(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_avg_val(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_avg_val but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_avg_val(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_avg_val(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_avg_val but returns
OutOfRange instead of saturating an unrepresentable value.
Trait Implementations§
Source§impl Clone for CellVoltage
impl Clone for CellVoltage
Source§fn clone(&self) -> CellVoltage
fn clone(&self) -> CellVoltage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more