pub struct LoraModulation {
pub spreading_factor: u8,
pub bandwidth: LoraBandwidth,
pub coding_rate: CodingRate,
pub low_data_rate_optimization: bool,
}Expand description
The LoRa parameters of a SetModulationParams command, from Tables 13-47 to 13-50.
§Examples
use pamoja_lora::LinkSettings;
use pamoja_radios::sx126x::config::LoraModulation;
// SF12 at 125 kHz needs low data rate optimization.
let modulation = LoraModulation::from_link(&LinkSettings::new(12, 125_000)).unwrap();
assert_eq!(modulation.to_params(), [0x0C, 0x04, 0x01, 0x01]);Fields§
§spreading_factor: u8The spreading factor, 5 to 12.
bandwidth: LoraBandwidthThe signal bandwidth.
coding_rate: CodingRateThe coding rate.
low_data_rate_optimization: boolWhether low data rate optimization is on.
Implementations§
Source§impl LoraModulation
impl LoraModulation
Sourcepub fn from_link(link: &LinkSettings) -> Option<LoraModulation>
pub fn from_link(link: &LinkSettings) -> Option<LoraModulation>
Trait Implementations§
Source§impl Clone for LoraModulation
impl Clone for LoraModulation
Source§fn clone(&self) -> LoraModulation
fn clone(&self) -> LoraModulation
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 LoraModulation
Source§impl Debug for LoraModulation
impl Debug for LoraModulation
impl Eq for LoraModulation
Source§impl Hash for LoraModulation
impl Hash for LoraModulation
Source§impl PartialEq for LoraModulation
impl PartialEq for LoraModulation
Source§fn eq(&self, other: &LoraModulation) -> bool
fn eq(&self, other: &LoraModulation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LoraModulation
Auto Trait Implementations§
impl Freeze for LoraModulation
impl RefUnwindSafe for LoraModulation
impl Send for LoraModulation
impl Sync for LoraModulation
impl Unpin for LoraModulation
impl UnsafeUnpin for LoraModulation
impl UnwindSafe for LoraModulation
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