US915

Struct US915 

Source
pub struct US915(/* private fields */);
Available on crate feature region-us915 only.
Expand description

State struct for the US915 region. This struct may be created directly if you wish to fine-tune some parameters. At this time specifying a bias for the subband used during the join process is supported using set_join_bias and set_join_bias_and_noncompliant_retries is suppored. This struct can then be turned into a Configuration as it implements Into<Configuration>.

§Note:

Only US915 and AU915 can be created using this method, because they are the only ones which have parameters that may be fine-tuned at the region level. To create a Configuration for other regions, use Configuration::new and specify the region using the Region enum.

§Example: Setting up join bias

use lorawan_device::region::{Configuration, US915, Subband};

let mut us915 = US915::new();
// Subband 2 is commonly used for The Things Network.
us915.set_join_bias(Subband::_2);
let configuration: Configuration = us915.into();

Implementations§

Source§

impl US915

Source

pub fn new() -> Self

Available on crate features region-us915 or region-au915 only.

Create this struct directly if you want to specify a subband on which to bias the join process.

Source

pub fn set_join_bias(&mut self, subband: Subband)

Available on crate features region-us915 or region-au915 only.

Specify a preferred subband when joining the network. Only the first join attempt will occur on this subband. After that, each bank will be attempted sequentially as described in the US915/AU915 regional specifications.

Source

pub fn set_join_bias_and_noncompliant_retries( &mut self, subband: Subband, max_retries: usize, )

Available on crate features region-us915 or region-au915 only.
§⚠️Warning⚠️

This method is explicitly not compliant with the LoRaWAN spec when more than one try is attempted.

This method is similar to set_join_bias, but allows you to specify a potentially non-compliant amount of times your preferred join subband should be attempted.

It is recommended to set a low number (ie, < 10) of join retries using the preferred subband. The reason for this is if you only try to join with a channel bias, and the network is configured to use a strictly different set of channels than the ones you provide, the network will NEVER be joined.

Source

pub fn clear_join_bias(&mut self)

Available on crate features region-us915 or region-au915 only.
Source§

impl US915

Source

pub fn get_max_payload_length( datarate: DR, repeater_compatible: bool, dwell_time: bool, ) -> u8

Available on crate features region-us915 or region-au915 only.

Trait Implementations§

Source§

impl Clone for US915

Available on crate features region-us915 or region-au915 only.
Source§

fn clone(&self) -> US915

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 Default for US915

Available on crate features region-us915 or region-au915 only.
Source§

fn default() -> US915

Returns the “default value” for a type. Read more
Source§

impl From<US915> for Configuration

Source§

fn from(region: US915) -> Configuration

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for US915

§

impl RefUnwindSafe for US915

§

impl Send for US915

§

impl Sync for US915

§

impl Unpin for US915

§

impl UnwindSafe for US915

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