pub enum PhyStrategy {
Fixed(BlePhy),
Adaptive {
rssi_threshold_high: i8,
rssi_threshold_low: i8,
hysteresis_db: u8,
coded_phy: BlePhy,
},
MaxRange,
MaxThroughput,
PowerOptimized {
rssi_threshold: i8,
},
}Expand description
Strategy for automatic PHY selection
Variants§
Fixed(BlePhy)
Use a fixed PHY regardless of conditions
Adaptive
Adaptively select PHY based on RSSI
Fields
MaxRange
Always use maximum range PHY
MaxThroughput
Always use maximum throughput PHY
PowerOptimized
Power-optimized: prefer faster PHYs when signal is strong
Implementations§
Source§impl PhyStrategy
impl PhyStrategy
Sourcepub fn adaptive(high_threshold: i8, low_threshold: i8, hysteresis: u8) -> Self
pub fn adaptive(high_threshold: i8, low_threshold: i8, hysteresis: u8) -> Self
Create adaptive strategy with custom thresholds
Sourcepub fn adaptive_max_range() -> Self
pub fn adaptive_max_range() -> Self
Create adaptive strategy for maximum range fallback
Sourcepub fn select_phy(
&self,
current_phy: BlePhy,
rssi: i8,
capabilities: &PhyCapabilities,
) -> BlePhy
pub fn select_phy( &self, current_phy: BlePhy, rssi: i8, capabilities: &PhyCapabilities, ) -> BlePhy
Select appropriate PHY based on current conditions
Sourcepub fn requires_capability_check(&self) -> bool
pub fn requires_capability_check(&self) -> bool
Check if strategy requires capability negotiation
Trait Implementations§
Source§impl Clone for PhyStrategy
impl Clone for PhyStrategy
Source§fn clone(&self) -> PhyStrategy
fn clone(&self) -> PhyStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PhyStrategy
impl Debug for PhyStrategy
Source§impl Default for PhyStrategy
impl Default for PhyStrategy
Source§impl PartialEq for PhyStrategy
impl PartialEq for PhyStrategy
impl StructuralPartialEq for PhyStrategy
Auto Trait Implementations§
impl Freeze for PhyStrategy
impl RefUnwindSafe for PhyStrategy
impl Send for PhyStrategy
impl Sync for PhyStrategy
impl Unpin for PhyStrategy
impl UnwindSafe for PhyStrategy
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