Skip to main content

JoinPlan

Struct JoinPlan 

Source
pub struct JoinPlan<'a> {
    pub channels: ChannelBlock,
    pub accept_start_hz: u32,
    pub accept_step_hz: u32,
    pub rx2_start_hz: u32,
    pub rx2_step_hz: u32,
    pub plan: &'a ChannelPlan<'a>,
}
Expand description

A run of join channels that puts a device on one plan, for a region that picks the plan by the channel a device joined on.

RP002-1.0.5 section 3.9.2 has CN470-510 devices scan twenty common join channels, each tied to one of four plans. The channel a join accept answers decides the plan, where the accept arrives, and where the second receive window listens afterward.

Fields§

§channels: ChannelBlock

The join channels this run covers, with the data rates a request may use on them.

§accept_start_hz: u32

Where the join accept answering the first channel of the run arrives, in hertz.

§accept_step_hz: u32

How far the accept frequency moves for each next channel, in hertz.

§rx2_start_hz: u32

The second receive window’s frequency after joining on the first channel, in hertz.

§rx2_step_hz: u32

How far that frequency moves for each next channel, in hertz.

§plan: &'a ChannelPlan<'a>

The plan a device joined on these channels follows.

Implementations§

Source§

impl<'a> JoinPlan<'a>

Source

pub const fn new( channels: ChannelBlock, accept: (u32, u32), rx2: (u32, u32), plan: &'a ChannelPlan<'a>, ) -> JoinPlan<'a>

Builds a run of join channels.

§Arguments
  • channels - the join channels and their data rates.
  • accept - the accept frequency for the first channel and its step, in hertz.
  • rx2 - the second window’s frequency for the first channel and its step, in hertz.
  • plan - the plan a join on these channels puts a device on.
§Returns

The run.

Source

pub const fn accept_hz(&self, offset: u16) -> Option<u32>

Returns where the join accept answering one channel of the run arrives.

§Arguments
  • offset - the channel’s position in the run.
§Returns

The frequency in hertz, or None past the end of the run.

Source

pub const fn rx2_hz(&self, offset: u16) -> Option<u32>

Returns where the second receive window listens after joining on one channel of the run.

§Arguments
  • offset - the channel’s position in the run.
§Returns

The frequency in hertz, or None past the end of the run.

Trait Implementations§

Source§

impl<'a> Clone for JoinPlan<'a>

Source§

fn clone(&self) -> JoinPlan<'a>

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<'a> Copy for JoinPlan<'a>

Source§

impl<'a> Debug for JoinPlan<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for JoinPlan<'a>

§

impl<'a> RefUnwindSafe for JoinPlan<'a>

§

impl<'a> Send for JoinPlan<'a>

§

impl<'a> Sync for JoinPlan<'a>

§

impl<'a> Unpin for JoinPlan<'a>

§

impl<'a> UnsafeUnpin for JoinPlan<'a>

§

impl<'a> UnwindSafe for JoinPlan<'a>

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.