pub struct DeviceMockController { /* private fields */ }Expand description
Controller allowing programmatic mutation of simulated device telemetry.
Implementations§
Source§impl DeviceMockController
impl DeviceMockController
Sourcepub fn new() -> Self
pub fn new() -> Self
Obtains a controller handle connected to the global hardware telemetry simulation.
Sourcepub fn reset_to_defaults(&self)
pub fn reset_to_defaults(&self)
Resets all simulated device telemetry to standard factory defaults.
Sourcepub fn battery(&self) -> BatteryInfo
pub fn battery(&self) -> BatteryInfo
Gets a copy of current battery info.
Sourcepub fn set_battery(&self, info: BatteryInfo)
pub fn set_battery(&self, info: BatteryInfo)
Updates battery info and notifies reactive signals.
Sourcepub fn set_battery_level(&self, level: f32)
pub fn set_battery_level(&self, level: f32)
Updates battery level in range [0.0, 1.0].
Sourcepub fn thermal(&self) -> ThermalState
pub fn thermal(&self) -> ThermalState
Gets current thermal state.
Sourcepub fn set_thermal(&self, state: ThermalState)
pub fn set_thermal(&self, state: ThermalState)
Updates thermal state and notifies reactive signals.
Sourcepub fn network(&self) -> NetworkStatus
pub fn network(&self) -> NetworkStatus
Gets current network status.
Sourcepub fn set_network(&self, status: NetworkStatus)
pub fn set_network(&self, status: NetworkStatus)
Updates network status and notifies reactive signals.
Sourcepub fn set_online(&self, is_online: bool)
pub fn set_online(&self, is_online: bool)
Sets online status.
Sourcepub fn screen(&self) -> ScreenGeometry
pub fn screen(&self) -> ScreenGeometry
Gets current screen geometry.
Sourcepub fn set_screen(&self, screen: ScreenGeometry)
pub fn set_screen(&self, screen: ScreenGeometry)
Updates screen geometry and notifies reactive signals.
Sourcepub fn set_safe_area(&self, insets: SafeAreaInsets)
pub fn set_safe_area(&self, insets: SafeAreaInsets)
Sets screen safe area insets (notches, dynamic island).
Sourcepub fn display_refresh(&self) -> DisplayRefreshInfo
pub fn display_refresh(&self) -> DisplayRefreshInfo
Gets current display refresh info.
Sourcepub fn set_display_refresh(&self, info: DisplayRefreshInfo)
pub fn set_display_refresh(&self, info: DisplayRefreshInfo)
Updates display refresh characteristics and capabilities.
Sourcepub fn trigger_memory_pressure(&self, level: MemoryPressure)
pub fn trigger_memory_pressure(&self, level: MemoryPressure)
Triggers a system memory pressure notification across all registered callbacks.