BMStatus

Enum BMStatus 

Source
#[repr(u32)]
pub enum BMStatus {
Show 27 variants Ok = 0, XmtFull = 1, Overrun = 2, BusLight = 4, BusWarning = 8, BusPassive = 262_144, BusTimeout = 524_288, BusOff = 16, AnyBusError = 262_172, ReceiveBufferEmpty = 32, QueueOverrun = 64, TransmitQueueFull = 128, RegTest = 256, NoDriver = 512, HardwareInUse = 1_024, NetInUse = 2_048, HardwareError = 5_120, InvalidBus = 6_144, InvalidClient = 7_168, OutOfResources = 8_192, InvalidParameterType = 16_384, InvalidParameterValue = 32_768, Unknown = 65_536, InvalidData = 131_072, Caution = 33_554_432, NotInitialized = 67_108_864, InvalidOperation = 134_217_728,
}
Expand description

Busmust device & operation status, most APIs would return a status code to indicate the result of an operation

Variants§

§

Ok = 0

SUCCESS: No error occurred

§

XmtFull = 1

Low level Transmit buffer is full

§

Overrun = 2

Bus overrun (the device cannot keep up with the high bus throughput)

§

BusLight = 4

CAN Bus communication is light, see ISO11898 for details

§

BusWarning = 8

CAN Bus communication is in warning state, see ISO11898 for details

§

BusPassive = 262_144

CAN node is in passive state, see ISO11898 for details

§

BusTimeout = 524_288

CAN node failed to transmit message within specified time, the node might be in PASSIVE or BUS-OFF state

§

BusOff = 16

CAN bus is in BUS-OFF state, see ISO11898 for details

§

AnyBusError = 262_172

CAN bus error occurred

§

ReceiveBufferEmpty = 32

Receive buffer is empty, this might NOT be an error if you use BM API in polling mode

§

QueueOverrun = 64

BM API internal queue overrun

§

TransmitQueueFull = 128

High level Transmit queue is full

§

RegTest = 256

Reserved

§

NoDriver = 512

Reserved

§

HardwareInUse = 1_024

Hardware is in use (opened by another application)

§

NetInUse = 2_048

Reserved

§

HardwareError = 5_120

Hardware error or invalid hardware handle

§

InvalidBus = 6_144

Invalid bus

§

InvalidClient = 7_168

Invalid client

§

OutOfResources = 8_192

Out of resources

§

InvalidParameterType = 16_384

Invalid parameter type in API call

§

InvalidParameterValue = 32_768

Invalid parameter value in API call

§

Unknown = 65_536

Unknown error

§

InvalidData = 131_072

Invalid data received/transmitted

§

Caution = 33_554_432

Reserved

§

NotInitialized = 67_108_864

The device/library is not initialized

§

InvalidOperation = 134_217_728

Invalid operation

Trait Implementations§

Source§

impl Clone for BMStatus

Source§

fn clone(&self) -> BMStatus

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 BMStatus

Source§

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

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

impl Display for BMStatus

Source§

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

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

impl Copy for BMStatus

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.