pub struct CellBalanceState;Expand description
Represents a command to request the balance state of individual cells.
Implementations§
Source§impl CellBalanceState
impl CellBalanceState
Sourcepub fn reply_size() -> usize
pub fn reply_size() -> usize
Expected size of the reply frame for a cell balance state request.
Sourcepub fn decode(rx_buffer: &[u8], n_cells: u8) -> Result<Vec<bool>, Error>
pub fn decode(rx_buffer: &[u8], n_cells: u8) -> Result<Vec<bool>, Error>
Decodes the cell balance state data from a response frame.
§Arguments
rx_buffer- The response frame received from the BMS.n_cells- The total number of cells in the battery pack.
§Returns
A Result containing a Vec<bool> where true indicates the cell is balancing,
or an Error if decoding fails.
This is a low-level function. Users might prefer client methods.
Auto Trait Implementations§
impl Freeze for CellBalanceState
impl RefUnwindSafe for CellBalanceState
impl Send for CellBalanceState
impl Sync for CellBalanceState
impl Unpin for CellBalanceState
impl UnwindSafe for CellBalanceState
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