Struct Device

Source
pub struct Device<R, C, RNG, const N: usize, const D: usize = 1>
where R: PhyRxTx + Timings, C: CryptoFactory + Default, RNG: RngCore,
{ /* private fields */ }

Implementations§

Source§

impl<R, C, RNG, const N: usize, const D: usize> Device<R, C, RNG, N, D>
where R: PhyRxTx + Timings, C: CryptoFactory + Default, RNG: RngCore,

Source

pub fn new(region: Configuration, radio: R, rng: RNG) -> Device<R, C, RNG, N, D>

Source

pub fn join(&mut self, join_mode: JoinMode) -> Result<Response, Error<R>>

Source

pub fn get_radio(&mut self) -> &mut R

Source

pub fn get_datarate(&mut self) -> DR

Source

pub fn set_datarate(&mut self, datarate: DR)

Source

pub fn ready_to_send_data(&self) -> bool

Source

pub fn send( &mut self, data: &[u8], fport: u8, confirmed: bool, ) -> Result<Response, Error<R>>

Source

pub fn get_fcnt_up(&self) -> Option<u32>

Source

pub fn get_session(&self) -> Option<&Session>

Source

pub fn set_session(&mut self, s: Session)

Source

pub fn get_session_keys(&self) -> Option<SessionKeys>

Source

pub fn handle_event( &mut self, event: Event<'_, R>, ) -> Result<Response, Error<R>>

Auto Trait Implementations§

§

impl<R, C, RNG, const N: usize, const D: usize> Freeze for Device<R, C, RNG, N, D>
where R: Freeze, RNG: Freeze,

§

impl<R, C, RNG, const N: usize, const D: usize> RefUnwindSafe for Device<R, C, RNG, N, D>

§

impl<R, C, RNG, const N: usize, const D: usize> Send for Device<R, C, RNG, N, D>
where R: Send, RNG: Send, C: Send,

§

impl<R, C, RNG, const N: usize, const D: usize> Sync for Device<R, C, RNG, N, D>
where R: Sync, RNG: Sync, C: Sync,

§

impl<R, C, RNG, const N: usize, const D: usize> Unpin for Device<R, C, RNG, N, D>
where R: Unpin, RNG: Unpin, C: Unpin,

§

impl<R, C, RNG, const N: usize, const D: usize> UnwindSafe for Device<R, C, RNG, N, D>
where R: UnwindSafe, RNG: UnwindSafe, C: 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> Same for T

Source§

type Output = T

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