pub struct ChannelBlock {
pub start_hz: u32,
pub step_hz: u32,
pub count: u16,
pub min_data_rate: u8,
pub max_data_rate: u8,
}Expand description
A run of evenly spaced channels, which is how the plans define them.
Every region lays its channels out as a start frequency and a fixed step, so a plan carries the arithmetic rather than 72 literal frequencies.
Fields§
§start_hz: u32The frequency of the first channel in the block, in hertz.
step_hz: u32The spacing between channels, in hertz.
count: u16How many channels the block holds.
min_data_rate: u8The lowest data rate usable on these channels.
max_data_rate: u8The highest data rate usable on these channels.
Implementations§
Source§impl ChannelBlock
impl ChannelBlock
Sourcepub const fn new(
start_hz: u32,
step_hz: u32,
count: u16,
min_data_rate: u8,
max_data_rate: u8,
) -> Self
pub const fn new( start_hz: u32, step_hz: u32, count: u16, min_data_rate: u8, max_data_rate: u8, ) -> Self
Builds a block of evenly spaced channels.
§Arguments
start_hz- the first channel frequency in hertz.step_hz- the spacing between channels in hertz.count- how many channels the block holds.min_data_rate- the lowest data rate usable on them.max_data_rate- the highest data rate usable on them.
§Returns
The block.
Trait Implementations§
Source§impl Clone for ChannelBlock
impl Clone for ChannelBlock
Source§fn clone(&self) -> ChannelBlock
fn clone(&self) -> ChannelBlock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ChannelBlock
Source§impl Debug for ChannelBlock
impl Debug for ChannelBlock
impl Eq for ChannelBlock
Source§impl PartialEq for ChannelBlock
impl PartialEq for ChannelBlock
Source§fn eq(&self, other: &ChannelBlock) -> bool
fn eq(&self, other: &ChannelBlock) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ChannelBlock
Auto Trait Implementations§
impl Freeze for ChannelBlock
impl RefUnwindSafe for ChannelBlock
impl Send for ChannelBlock
impl Sync for ChannelBlock
impl Unpin for ChannelBlock
impl UnsafeUnpin for ChannelBlock
impl UnwindSafe for ChannelBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more