BetaCellDataDebug

Struct BetaCellDataDebug 

Source
pub struct BetaCellDataDebug(/* private fields */);

Implementations§

Source§

impl BetaCellDataDebug

Source

pub const fn new() -> Self

Creates a new default initialized bitfield.

Source

pub const fn from_bits(bits: u64) -> Self

Convert from bits.

Source

pub const fn into_bits(self) -> u64

Convert into bits.

Source

pub const fn therm(&self) -> f32

Therm temperature

Units: C

Bits: 0..10

Source

pub const fn with_therm_checked(self, value: f32) -> Result<Self, ()>

Therm temperature

Units: C

Bits: 0..10

Source

pub const fn with_therm(self, value: f32) -> Self

Therm temperature

Units: C

Bits: 0..10

Source

pub const fn set_therm(&mut self, value: f32)

Therm temperature

Units: C

Bits: 0..10

Source

pub const fn set_therm_checked(&mut self, value: f32) -> Result<(), ()>

Therm temperature

Units: C

Bits: 0..10

Source

pub const fn voltage_a(&self) -> f32

Cell voltage

Units: V

Bits: 10..23

Source

pub const fn with_voltage_a_checked(self, value: f32) -> Result<Self, ()>

Cell voltage

Units: V

Bits: 10..23

Source

pub const fn with_voltage_a(self, value: f32) -> Self

Cell voltage

Units: V

Bits: 10..23

Source

pub const fn set_voltage_a(&mut self, value: f32)

Cell voltage

Units: V

Bits: 10..23

Source

pub const fn set_voltage_a_checked(&mut self, value: f32) -> Result<(), ()>

Cell voltage

Units: V

Bits: 10..23

Source

pub const fn voltage_b(&self) -> f32

Cell voltage

Units: V

Bits: 23..36

Source

pub const fn with_voltage_b_checked(self, value: f32) -> Result<Self, ()>

Cell voltage

Units: V

Bits: 23..36

Source

pub const fn with_voltage_b(self, value: f32) -> Self

Cell voltage

Units: V

Bits: 23..36

Source

pub const fn set_voltage_b(&mut self, value: f32)

Cell voltage

Units: V

Bits: 23..36

Source

pub const fn set_voltage_b_checked(&mut self, value: f32) -> Result<(), ()>

Cell voltage

Units: V

Bits: 23..36

Source

pub const fn chip_id(&self) -> u8

Bits: 36..40

Source

pub const fn with_chip_id_checked(self, value: u8) -> Result<Self, ()>

Bits: 36..40

Source

pub const fn with_chip_id(self, value: u8) -> Self

Bits: 36..40

Source

pub const fn set_chip_id(&mut self, value: u8)

Bits: 36..40

Source

pub const fn set_chip_id_checked(&mut self, value: u8) -> Result<(), ()>

Bits: 36..40

Source

pub const fn cell_a(&self) -> u8

Bits: 40..44

Source

pub const fn with_cell_a_checked(self, value: u8) -> Result<Self, ()>

Bits: 40..44

Source

pub const fn with_cell_a(self, value: u8) -> Self

Bits: 40..44

Source

pub const fn set_cell_a(&mut self, value: u8)

Bits: 40..44

Source

pub const fn set_cell_a_checked(&mut self, value: u8) -> Result<(), ()>

Bits: 40..44

Source

pub const fn cell_b(&self) -> u8

Bits: 44..48

Source

pub const fn with_cell_b_checked(self, value: u8) -> Result<Self, ()>

Bits: 44..48

Source

pub const fn with_cell_b(self, value: u8) -> Self

Bits: 44..48

Source

pub const fn set_cell_b(&mut self, value: u8)

Bits: 44..48

Source

pub const fn set_cell_b_checked(&mut self, value: u8) -> Result<(), ()>

Bits: 44..48

Source

pub const fn discharging_a(&self) -> bool

Whether cell is burning

Bits: 48..49

Source

pub const fn with_discharging_a_checked(self, value: bool) -> Result<Self, ()>

Whether cell is burning

Bits: 48..49

Source

pub const fn with_discharging_a(self, value: bool) -> Self

Whether cell is burning

Bits: 48..49

Source

pub const fn set_discharging_a(&mut self, value: bool)

Whether cell is burning

Bits: 48..49

Source

pub const fn set_discharging_a_checked(&mut self, value: bool) -> Result<(), ()>

Whether cell is burning

Bits: 48..49

Source

pub const fn discharging_b(&self) -> bool

Whether cell is burning

Bits: 49..50

Source

pub const fn with_discharging_b_checked(self, value: bool) -> Result<Self, ()>

Whether cell is burning

Bits: 49..50

Source

pub const fn with_discharging_b(self, value: bool) -> Self

Whether cell is burning

Bits: 49..50

Source

pub const fn set_discharging_b(&mut self, value: bool)

Whether cell is burning

Bits: 49..50

Source

pub const fn set_discharging_b_checked(&mut self, value: bool) -> Result<(), ()>

Whether cell is burning

Bits: 49..50

Source

pub const fn cvs_a(&self) -> bool

Whether C and S ADCs read too different

Bits: 50..51

Source

pub const fn with_cvs_a_checked(self, value: bool) -> Result<Self, ()>

Whether C and S ADCs read too different

Bits: 50..51

Source

pub const fn with_cvs_a(self, value: bool) -> Self

Whether C and S ADCs read too different

Bits: 50..51

Source

pub const fn set_cvs_a(&mut self, value: bool)

Whether C and S ADCs read too different

Bits: 50..51

Source

pub const fn set_cvs_a_checked(&mut self, value: bool) -> Result<(), ()>

Whether C and S ADCs read too different

Bits: 50..51

Source

pub const fn cvs_b(&self) -> bool

Whether C and S ADCs read too different

Bits: 51..52

Source

pub const fn with_cvs_b_checked(self, value: bool) -> Result<Self, ()>

Whether C and S ADCs read too different

Bits: 51..52

Source

pub const fn with_cvs_b(self, value: bool) -> Self

Whether C and S ADCs read too different

Bits: 51..52

Source

pub const fn set_cvs_b(&mut self, value: bool)

Whether C and S ADCs read too different

Bits: 51..52

Source

pub const fn set_cvs_b_checked(&mut self, value: bool) -> Result<(), ()>

Whether C and S ADCs read too different

Bits: 51..52

Source

pub const fn ow_a(&self) -> bool

Whether an open wire is detected on the cell

Bits: 52..53

Source

pub const fn with_ow_a_checked(self, value: bool) -> Result<Self, ()>

Whether an open wire is detected on the cell

Bits: 52..53

Source

pub const fn with_ow_a(self, value: bool) -> Self

Whether an open wire is detected on the cell

Bits: 52..53

Source

pub const fn set_ow_a(&mut self, value: bool)

Whether an open wire is detected on the cell

Bits: 52..53

Source

pub const fn set_ow_a_checked(&mut self, value: bool) -> Result<(), ()>

Whether an open wire is detected on the cell

Bits: 52..53

Source

pub const fn ow_b(&self) -> bool

Whether an open wire is detected on the cell

Bits: 53..54

Source

pub const fn with_ow_b_checked(self, value: bool) -> Result<Self, ()>

Whether an open wire is detected on the cell

Bits: 53..54

Source

pub const fn with_ow_b(self, value: bool) -> Self

Whether an open wire is detected on the cell

Bits: 53..54

Source

pub const fn set_ow_b(&mut self, value: bool)

Whether an open wire is detected on the cell

Bits: 53..54

Source

pub const fn set_ow_b_checked(&mut self, value: bool) -> Result<(), ()>

Whether an open wire is detected on the cell

Bits: 53..54

Source§

impl BetaCellDataDebug

Source

pub fn try_with_therm(self, v: f32) -> Result<Self, OutOfRange>

Like Self::with_therm but returns OutOfRange instead of saturating an unrepresentable value.

Source

pub fn try_set_therm(&mut self, v: f32) -> Result<(), OutOfRange>

Like Self::set_therm but returns OutOfRange instead of saturating an unrepresentable value.

Source

pub fn try_with_voltage_a(self, v: f32) -> Result<Self, OutOfRange>

Like Self::with_voltage_a but returns OutOfRange instead of saturating an unrepresentable value.

Source

pub fn try_set_voltage_a(&mut self, v: f32) -> Result<(), OutOfRange>

Like Self::set_voltage_a but returns OutOfRange instead of saturating an unrepresentable value.

Source

pub fn try_with_voltage_b(self, v: f32) -> Result<Self, OutOfRange>

Like Self::with_voltage_b but returns OutOfRange instead of saturating an unrepresentable value.

Source

pub fn try_set_voltage_b(&mut self, v: f32) -> Result<(), OutOfRange>

Like Self::set_voltage_b but returns OutOfRange instead of saturating an unrepresentable value.

Trait Implementations§

Source§

impl Clone for BetaCellDataDebug

Source§

fn clone(&self) -> BetaCellDataDebug

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BetaCellDataDebug

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BetaCellDataDebug

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<BetaCellDataDebug> for u64

Source§

fn from(v: BetaCellDataDebug) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for BetaCellDataDebug

Source§

fn from(v: u64) -> Self

Converts to this type from the input type.
Source§

impl ToCanFrame for BetaCellDataDebug

Source§

const LEN: usize = 7usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

fn to_can_frame<F: Frame>(self) -> F

Source§

impl Copy for BetaCellDataDebug

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.