Faults

Struct Faults 

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

Implementations§

Source§

impl Faults

Source

pub const fn new() -> Self

Creates a new default initialized bitfield.

Source

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

Convert from bits.

Source

pub const fn into_bits(self) -> u16

Convert into bits.

Source

pub const fn CAN_OUTGOING_FAULT(&self) -> bool

Bits: 0..1

Source

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

Bits: 0..1

Source

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

Bits: 0..1

Source

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

Bits: 0..1

Source

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

Bits: 0..1

Source

pub const fn CAN_INCOMING_FAULT(&self) -> bool

Bits: 1..2

Source

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

Bits: 1..2

Source

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

Bits: 1..2

Source

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

Bits: 1..2

Source

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

Bits: 1..2

Source

pub const fn BMS_CAN_MONITOR_FAULT(&self) -> bool

Bits: 2..3

Source

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

Bits: 2..3

Source

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

Bits: 2..3

Source

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

Bits: 2..3

Source

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

Bits: 2..3

Source

pub const fn LIGHTNING_CAN_MONITOR_FAULT(&self) -> bool

Bits: 3..4

Source

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

Bits: 3..4

Source

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

Bits: 3..4

Source

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

Bits: 3..4

Source

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

Bits: 3..4

Source

pub const fn ONBOARD_TEMP_FAULT(&self) -> bool

Bits: 4..5

Source

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

Bits: 4..5

Source

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

Bits: 4..5

Source

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

Bits: 4..5

Source

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

Bits: 4..5

Source

pub const fn IMU_ACCEL_FAULT(&self) -> bool

Bits: 5..6

Source

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

Bits: 5..6

Source

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

Bits: 5..6

Source

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

Bits: 5..6

Source

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

Bits: 5..6

Source

pub const fn IMU_GYRO_FAULT(&self) -> bool

Bits: 6..7

Source

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

Bits: 6..7

Source

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

Bits: 6..7

Source

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

Bits: 6..7

Source

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

Bits: 6..7

Source

pub const fn BSPD_PREFAULT(&self) -> bool

Bits: 7..8

Source

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

Bits: 7..8

Source

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

Bits: 7..8

Source

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

Bits: 7..8

Source

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

Bits: 7..8

Source

pub const fn ONBOARD_BRAKE_OPEN_CIRCUIT_FAULT(&self) -> bool

Bits: 8..9

Source

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

Bits: 8..9

Source

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

Bits: 8..9

Source

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

Bits: 8..9

Source

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

Bits: 8..9

Source

pub const fn ONBOARD_ACCEL_OPEN_CIRCUIT_FAULT(&self) -> bool

Bits: 9..10

Source

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

Bits: 9..10

Source

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

Bits: 9..10

Source

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

Bits: 9..10

Source

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

Bits: 9..10

Source

pub const fn ONBOARD_BRAKE_SHORT_CIRCUIT_FAULT(&self) -> bool

Bits: 10..11

Source

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

Bits: 10..11

Source

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

Bits: 10..11

Source

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

Bits: 10..11

Source

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

Bits: 10..11

Source

pub const fn ONBOARD_ACCEL_SHORT_CIRCUIT_FAULT(&self) -> bool

Bits: 11..12

Source

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

Bits: 11..12

Source

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

Bits: 11..12

Source

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

Bits: 11..12

Source

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

Bits: 11..12

Source

pub const fn ONBOARD_PEDAL_DIFFERENCE_FAULT(&self) -> bool

Bits: 12..13

Source

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

Bits: 12..13

Source

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

Bits: 12..13

Source

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

Bits: 12..13

Source

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

Bits: 12..13

Source

pub const fn RTDS_FAULT(&self) -> bool

Bits: 13..14

Source

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

Bits: 13..14

Source

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

Bits: 13..14

Source

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

Bits: 13..14

Source

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

Bits: 13..14

Source

pub const fn LV_LOW_VOLTAGE_FAULT(&self) -> bool

Bits: 14..15

Source

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

Bits: 14..15

Source

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

Bits: 14..15

Source

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

Bits: 14..15

Source

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

Bits: 14..15

Source

pub const fn PRECHARGE_FLOATING_FAULT(&self) -> bool

If TS Volts is stuck under the Batt Volts Threshold

Bits: 15..16

Source

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

If TS Volts is stuck under the Batt Volts Threshold

Bits: 15..16

Source

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

If TS Volts is stuck under the Batt Volts Threshold

Bits: 15..16

Source

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

If TS Volts is stuck under the Batt Volts Threshold

Bits: 15..16

Source

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

If TS Volts is stuck under the Batt Volts Threshold

Bits: 15..16

Trait Implementations§

Source§

impl Clone for Faults

Source§

fn clone(&self) -> Faults

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 Faults

Source§

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

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

impl Default for Faults

Source§

fn default() -> Self

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

impl From<Faults> for u16

Source§

fn from(v: Faults) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Faults

Source§

fn from(v: u16) -> Self

Converts to this type from the input type.
Source§

impl ToCanFrame for Faults

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

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

Source§

impl Copy for Faults

Auto Trait Implementations§

§

impl Freeze for Faults

§

impl RefUnwindSafe for Faults

§

impl Send for Faults

§

impl Sync for Faults

§

impl Unpin for Faults

§

impl UnwindSafe for Faults

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.