pub struct DorsConfig {Show 18 fields
pub switch_hysteresis: f32,
pub switch_cooldown_secs: u64,
pub ble_to_wifi_retry_threshold: u32,
pub min_success_rate_before_escalation: f32,
pub min_ble_samples_before_success_rate_escalation: usize,
pub rssi_switch_threshold: i16,
pub congestion_queue_threshold: usize,
pub stability_window_secs: u64,
pub poor_signal_duration_secs: u64,
pub ttl_escalation_threshold: u8,
pub prefer_online: bool,
pub congestion_duration_secs: u64,
pub ttl_escalation_hold_secs: u64,
pub history_window_size: usize,
pub queue_recovery_ratio: f32,
pub low_battery_threshold: u8,
pub relay_min_battery_level: u8,
pub relay_optimal_connection_count: u8,
}Expand description
Configuration for DORS transport selection.
Fields§
§switch_hysteresis: f32Minimum score improvement required to switch transports (hysteresis).
switch_cooldown_secs: u64Cooldown period after switching (seconds).
ble_to_wifi_retry_threshold: u32Number of retry failures before escalating from BLE to Wi-Fi Direct.
min_success_rate_before_escalation: f32Minimum BLE success rate (0.0–1.0) below which we escalate to WiFi (quality degradation).
min_ble_samples_before_success_rate_escalation: usizeMinimum BLE success-ratio samples (observation volume) before evaluating low-success-rate escalation. Prevents a single early failure from triggering escalation on sparse data.
rssi_switch_threshold: i16RSSI threshold for switching from BLE to Wi-Fi Direct (dBm).
congestion_queue_threshold: usizeQueue depth threshold for detecting congestion.
stability_window_secs: u64Duration for checking stability before switching (seconds).
poor_signal_duration_secs: u64Duration that RSSI must remain below the threshold before escalating (seconds).
ttl_escalation_threshold: u8TTL threshold that indicates messages are nearing exhaustion.
prefer_online: boolWhether to prefer online/Internet transport first.
congestion_duration_secs: u64Duration that queue congestion must persist before escalating (seconds).
ttl_escalation_hold_secs: u64Duration to keep TTL escalation signal active after detection (seconds).
history_window_size: usizeNumber of historical samples to retain per transport for smoothing metrics.
queue_recovery_ratio: f32Ratio of congestion_queue_threshold that indicates recovery (0.0-1.0).
low_battery_threshold: u8Battery percentage considered low for energy-aware decisions.
relay_min_battery_level: u8Minimum battery percentage required to escalate to high-power transports when not charging.
relay_optimal_connection_count: u8Target number of relay connections before considering the relay saturated.
Trait Implementations§
Source§impl Clone for DorsConfig
impl Clone for DorsConfig
Source§fn clone(&self) -> DorsConfig
fn clone(&self) -> DorsConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more