Skip to main content

Cn470Plan

Enum Cn470Plan 

Source
pub enum Cn470Plan {
    Antenna20MhzA,
    Antenna20MhzB,
    Antenna26MhzA,
    Antenna26MhzB,
    Channels96,
}
Expand description

One of the channel plans the CN470-510 band is divided into.

Region::Cn470 names the first. A device joining over the air can start from any of the four RP002-1.0.5 plans, since they share their join channels and the channel that answers decides the plan; a personalized device, or one on a network still running the 96-channel plan, is set up on the one it belongs to.

§Examples

use pamoja_lora::region::{Cn470Plan, Region};

assert!(core::ptr::eq(Region::Cn470.plan(), Cn470Plan::Antenna20MhzA.plan()));
assert_eq!(Cn470Plan::Channels96.plan().default_channel_count(), 96);
assert_eq!(Cn470Plan::Antenna26MhzB.plan().rx2(), (502_500_000, 1));

Variants§

§

Antenna20MhzA

A 20 MHz antenna, type A: uplink from 470.3 and 503.5 MHz, downlink from 483.9 and 490.3 MHz, RP002-1.0.5 section 3.9.2.1.

§

Antenna20MhzB

A 20 MHz antenna, type B: uplink and downlink from 476.9 and 496.9 MHz.

§

Antenna26MhzA

A 26 MHz antenna, type A: 48 uplink channels from 470.3 MHz and 24 downlink channels from 490.1 MHz, RP002-1.0.5 section 3.9.2.2.

§

Antenna26MhzB

A 26 MHz antenna, type B: 48 uplink channels from 480.3 MHz and 24 downlink channels from 500.1 MHz.

§

Channels96

The 96-channel plan RP002-1.0.5 replaced, from the LoRaWAN 1.0.3 Regional Parameters revision A: 96 uplink channels from 470.3 MHz and 48 downlink channels from 500.3 MHz.

Implementations§

Source§

impl Cn470Plan

Source

pub const fn plan(self) -> &'static ChannelPlan<'static>

Returns the channel plan.

§Returns

The plan.

Source

pub const fn all() -> &'static [Cn470Plan]

Returns every CN470-510 plan.

§Returns

The five plans, the four RP002-1.0.5 ones first.

Trait Implementations§

Source§

impl Clone for Cn470Plan

Source§

fn clone(&self) -> Cn470Plan

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Cn470Plan

Source§

impl Debug for Cn470Plan

Source§

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

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

impl Eq for Cn470Plan

Source§

impl Hash for Cn470Plan

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Cn470Plan

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Cn470Plan

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