Skip to main content

RNodeEvent

Enum RNodeEvent 

Source
pub enum RNodeEvent {
Show 19 variants DataFrame { index: usize, data: Vec<u8>, }, Detected(bool), FirmwareVersion { major: u8, minor: u8, }, Platform(u8), Mcu(u8), InterfaceType { index: u8, type_byte: u8, }, Frequency(u32), Bandwidth(u32), TxPower(i8), SpreadingFactor(u8), CodingRate(u8), RadioState(u8), StatRssi(u8), StatSnr(i8), StAlock(u16), LtAlock(u16), Ready, SelectedInterface(u8), Error(u8),
}
Expand description

Events yielded by the RNode decoder.

Variants§

§

DataFrame

A data frame was received on the given subinterface.

Fields

§index: usize
§data: Vec<u8>
§

Detected(bool)

Device detection response.

§

FirmwareVersion

Firmware version reported.

Fields

§major: u8
§minor: u8
§

Platform(u8)

Platform byte reported.

§

Mcu(u8)

MCU byte reported.

§

InterfaceType

Interface type for a given index.

Fields

§index: u8
§type_byte: u8
§

Frequency(u32)

Reported frequency (Hz).

§

Bandwidth(u32)

Reported bandwidth (Hz).

§

TxPower(i8)

Reported TX power (dBm, signed).

§

SpreadingFactor(u8)

Reported spreading factor.

§

CodingRate(u8)

Reported coding rate.

§

RadioState(u8)

Reported radio state.

§

StatRssi(u8)

Reported RSSI (raw byte, caller subtracts RSSI_OFFSET=157).

§

StatSnr(i8)

Reported SNR (signed, multiply by 0.25 for dB).

§

StAlock(u16)

Reported short-term airtime lock (percent * 100).

§

LtAlock(u16)

Reported long-term airtime lock (percent * 100).

§

Ready

Flow control: device ready for next packet.

§

SelectedInterface(u8)

Selected subinterface changed.

§

Error(u8)

Error code from device.

Trait Implementations§

Source§

impl Clone for RNodeEvent

Source§

fn clone(&self) -> RNodeEvent

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 RNodeEvent

Source§

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

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

impl PartialEq for RNodeEvent

Source§

fn eq(&self, other: &RNodeEvent) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for RNodeEvent

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> Same for T

Source§

type Output = T

Should always be Self
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, 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.