Struct lorawan_device::Device

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

Implementations§

source§

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

source

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

source

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

source

pub fn get_credentials(&mut self) -> &mut Option<Credentials>

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::PhyError>>

source

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

source

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

source

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.