Skip to main content

ConcentratorError

Enum ConcentratorError 

Source
pub enum ConcentratorError<E> {
Show 15 variants Spi(E), Pin(ErrorKind), NotAnswering { version: u8, }, UnknownModel { byte: u8, }, Firmware(LoadError), Overrun { waiting: u16, }, FrontEndMode { wanted: u8, read: u8, }, ImageCalibration, UnsupportedBand { hertz: u32, }, ChannelOutOfReach { offset_hz: i32, }, ServiceRate { spreading_factor: u8, bandwidth_hz: u32, }, FskChannel { bitrate: u32, sync_word_len: u8, }, Transmit(TransmitError), Stalled { wanted: u8, reading: u8, }, WrongFirmware { wanted: u8, running: u8, },
}
Expand description

Why the concentrator could not be driven.

Variants§

§

Spi(E)

The SPI device failed.

§

Pin(ErrorKind)

The reset line could not be driven.

§

NotAnswering

The version register answered with something else, so nothing is on the bus, or the board is unpowered, or it is wired to the wrong device.

Fields

§version: u8

What the version register read.

§

UnknownModel

The part number is one this crate does not drive.

Fields

§byte: u8

What the one-time programmable memory answered with.

§

Firmware(LoadError)

The firmware did not load.

§

Overrun

The receive buffer holds more than the caller left room for.

Fields

§waiting: u16

How many bytes are waiting.

§

FrontEndMode

A front end did not settle into the mode it was put in.

Fields

§wanted: u8

The mode it was asked for.

§read: u8

The mode its status reported.

§

ImageCalibration

A front end refused its own image calibration.

§

UnsupportedBand

A carrier outside every band a front end calibrates over.

Fields

§hertz: u32

The carrier asked for, in hertz.

§

ChannelOutOfReach

A channel too far from the carrier for the radio to hear, however the register that carries the offset holds it.

Fields

§offset_hz: i32

The offset asked for, in hertz.

§

ServiceRate

A rate the fixed-rate receiver cannot be set to.

Fields

§spreading_factor: u8

The spreading factor asked for.

§bandwidth_hz: u32

The bandwidth asked for, in hertz.

§

FskChannel

A channel the frequency shift keying receiver cannot be set to.

Fields

§bitrate: u32

The bit rate asked for, in bits per second.

§sync_word_len: u8

How many sync word bytes were asked for.

§

Transmit(TransmitError)

A packet the transmit chain cannot be told to send.

§

Stalled

A microcontroller never reached the state it was waited for.

Fields

§wanted: u8

The state it was waited for.

§reading: u8

The state it was last reporting.

§

WrongFirmware

A microcontroller is running firmware this crate does not drive.

Fields

§wanted: u8

The version expected.

§running: u8

The version it reported.

Trait Implementations§

Source§

impl<E: Debug> Debug for ConcentratorError<E>

Source§

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

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

impl<E: Debug> Display for ConcentratorError<E>

Source§

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

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

impl<E: Debug> Error for ConcentratorError<E>

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

§

impl<E> Freeze for ConcentratorError<E>
where E: Freeze,

§

impl<E> RefUnwindSafe for ConcentratorError<E>
where E: RefUnwindSafe,

§

impl<E> Send for ConcentratorError<E>
where E: Send,

§

impl<E> Sync for ConcentratorError<E>
where E: Sync,

§

impl<E> Unpin for ConcentratorError<E>
where E: Unpin,

§

impl<E> UnsafeUnpin for ConcentratorError<E>
where E: UnsafeUnpin,

§

impl<E> UnwindSafe for ConcentratorError<E>
where E: UnwindSafe,

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> 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> 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.