pub enum MaskControl {
Group(u8),
Banks,
PairedBanks,
All {
on: bool,
then_group: Option<u8>,
},
Reserved,
}Expand description
What one value of a LinkADRReq command’s ChMaskCntl field does to a device’s channels.
TS001-1.0.4 section 5.3 leaves the meaning to the regional parameters, and RP002-1.0.5
gives each region a table of eight. A plan carries its table as
ChannelPlan::mask_controls, indexed by the field’s value.
§Examples
use pamoja_lora::region::{MaskControl, Region};
// RP002-1.0.5 table 23: in US902-928, 7 turns every 125 kHz channel off and sets the
// 500 kHz channels from the mask.
assert_eq!(
Region::Us915.plan().mask_controls[7],
MaskControl::All { on: false, then_group: Some(4) }
);Variants§
Group(u8)
The mask sets the sixteen channels of one group, channels 16 * group to
16 * group + 15.
Banks
Each of the mask’s ten low bits switches a bank of eight channels, bank b being
channels 8 * b to 8 * b + 7. Channels a bank names but the device has not defined
stay off.
PairedBanks
Each of the mask’s eight low bits switches a bank of eight channels together with the channel numbered 64 plus the bit, and bit 9 switches channels 72 to 79 where they are defined. This is the 900 MHz plans’ pairing of eight 125 kHz channels with one 500 kHz channel.
All
Every defined channel on, or every channel off, and then, where a group is named, the mask sets that group.
Fields
Reserved
A value the region reserves, which a device refuses.
Implementations§
Source§impl MaskControl
impl MaskControl
Sourcepub const DYNAMIC: [MaskControl; 8]
pub const DYNAMIC: [MaskControl; 8]
The table every dynamic plan shares, RP002-1.0.5 table 14 for EU863-870 and its counterparts: groups 0 to 4, banks of eight, every defined channel on, and a reserved 7.
Trait Implementations§
Source§impl Clone for MaskControl
impl Clone for MaskControl
Source§fn clone(&self) -> MaskControl
fn clone(&self) -> MaskControl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more