pub struct US915(/* private fields */);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
impl US915
Sourcepub fn new() -> Self
Available on crate features region-us915 or region-au915 only.
pub fn new() -> Self
region-us915 or region-au915 only.Create this struct directly if you want to specify a subband on which to bias the join process.
Sourcepub fn set_join_bias(&mut self, subband: Subband)
Available on crate features region-us915 or region-au915 only.
pub fn set_join_bias(&mut self, subband: Subband)
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.
Sourcepub fn set_join_bias_and_noncompliant_retries(
&mut self,
subband: Subband,
max_retries: usize,
)
Available on crate features region-us915 or region-au915 only.
pub fn set_join_bias_and_noncompliant_retries( &mut self, subband: Subband, max_retries: usize, )
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.
pub fn clear_join_bias(&mut self)
region-us915 or region-au915 only.