pub struct PhyProfile {
pub id: &'static str,
pub name: &'static str,
pub freq_khz: u32,
pub bw_hz: u32,
pub sf: u8,
pub cr_denom: u8,
pub tx_power_dbm: Option<i8>,
pub duty_limit: u16,
pub sync_word: u16,
pub tx_preamble_symbols: u16,
}Expand description
A vetted PHY profile: the four parameters two nodes must agree on to hear each other, plus the local settings vetted alongside them.
Fields§
§id: &'static strStable identifier. meshcore- plus an ISO 3166-1 alpha-2
country code, or eu where the profile spans the union.
name: &'static strDisplay name, as an operator picking a profile sees it.
freq_khz: u32Center frequency in kHz (PROP_PHY_FREQ).
bw_hz: u32LoRa bandwidth in Hz (PROP_PHY_LORA_BW).
sf: u8LoRa spreading factor (PROP_PHY_LORA_SF).
cr_denom: u8Coding-rate denominator, 5 for 4/5 through 8 for 4/8
(PROP_PHY_LORA_CR).
tx_power_dbm: Option<i8>Transmit power vetted for this profile’s band and occupied
bandwidth. None where no power has been vetted, in which case
adopting the profile leaves a device’s configured power alone.
duty_limit: u16Duty-cycle limit in PROP_PHY_DUTY_LIMIT units.
sync_word: u16SX126x-style 16-bit sync word (PROP_PHY_LORA_SW).
tx_preamble_symbols: u16Preamble symbols to emit on transmit.
Implementations§
Source§impl PhyProfile
impl PhyProfile
Sourcepub const fn interoperates_with(
&self,
freq_khz: u32,
bw_hz: u32,
sf: u8,
cr_denom: u8,
) -> bool
pub const fn interoperates_with( &self, freq_khz: u32, bw_hz: u32, sf: u8, cr_denom: u8, ) -> bool
Whether a node on this profile and one on the given parameters can hear each other.
Transmit power and the duty-cycle limit are excluded. Neither changes what a receiver can decode, and a radio reports power clamped to what it can actually reach — comparing power would call two radios on the same profile different merely because one of them cannot transmit as hard as the other.
Trait Implementations§
Source§impl Clone for PhyProfile
impl Clone for PhyProfile
Source§fn clone(&self) -> PhyProfile
fn clone(&self) -> PhyProfile
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PhyProfile
impl Debug for PhyProfile
Source§impl PartialEq for PhyProfile
impl PartialEq for PhyProfile
impl Copy for PhyProfile
impl Eq for PhyProfile
impl StructuralPartialEq for PhyProfile
Auto Trait Implementations§
impl Freeze for PhyProfile
impl RefUnwindSafe for PhyProfile
impl Send for PhyProfile
impl Sync for PhyProfile
impl Unpin for PhyProfile
impl UnwindSafe for PhyProfile
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)