pub enum BatterySimulatorRequest {
Show 13 variants
GetBatteryInfo {
responder: BatterySimulatorGetBatteryInfoResponder,
},
SetBatteryStatus {
battery_status: BatteryStatus,
control_handle: BatterySimulatorControlHandle,
},
SetChargeStatus {
charge_status: ChargeStatus,
control_handle: BatterySimulatorControlHandle,
},
SetChargeSource {
charge_source: ChargeSource,
control_handle: BatterySimulatorControlHandle,
},
SetBatteryPercentage {
percent: f32,
control_handle: BatterySimulatorControlHandle,
},
SetLevelStatus {
level_status: LevelStatus,
control_handle: BatterySimulatorControlHandle,
},
SetTimeRemaining {
duration: i64,
control_handle: BatterySimulatorControlHandle,
},
DisconnectRealBattery {
control_handle: BatterySimulatorControlHandle,
},
IsSimulating {
responder: BatterySimulatorIsSimulatingResponder,
},
ReconnectRealBattery {
control_handle: BatterySimulatorControlHandle,
},
SetPresentVoltageMv {
voltage: u32,
control_handle: BatterySimulatorControlHandle,
},
SetRemainingCapacityUah {
capacity: u32,
control_handle: BatterySimulatorControlHandle,
},
SetBatterySpec {
spec: BatterySpec,
control_handle: BatterySimulatorControlHandle,
},
}
Expand description
Simulator interface for battery simulation
Variants§
GetBatteryInfo
Gets battery info. This should be called after DisconnectRealBattery
Fields
responder: BatterySimulatorGetBatteryInfoResponder
SetBatteryStatus
Sets Battery Status. This should be called after DisconnectRealBattery
SetChargeStatus
Sets Charge Status. This should be called after DisconnectRealBattery
SetChargeSource
Sets Charge Source. This should be called after DisconnectRealBattery
SetBatteryPercentage
Sets Battery Percentage. This should be called after DisconnectRealBattery
SetLevelStatus
Sets Level Status. This should be called after DisconnectRealBattery
SetTimeRemaining
Sets Time Remaining to full charge / depletion This should be called after DisconnectRealBattery
DisconnectRealBattery
Disconnect the real battery connection
Fields
control_handle: BatterySimulatorControlHandle
IsSimulating
Gets Simulation State
Fields
responder: BatterySimulatorIsSimulatingResponder
ReconnectRealBattery
Reconnect to the real battery This should be called after DisconnectRealBattery
Fields
control_handle: BatterySimulatorControlHandle
SetPresentVoltageMv
Sets Present Voltage in mV. This should be called after DisconnectRealBattery
SetRemainingCapacityUah
Sets Remaining Capacity Uah. This should be called after DisconnectRealBattery
SetBatterySpec
Sets the BatterySpec
Implementations§
Source§impl BatterySimulatorRequest
impl BatterySimulatorRequest
pub fn into_get_battery_info( self, ) -> Option<BatterySimulatorGetBatteryInfoResponder>
pub fn into_set_battery_status( self, ) -> Option<(BatteryStatus, BatterySimulatorControlHandle)>
pub fn into_set_charge_status( self, ) -> Option<(ChargeStatus, BatterySimulatorControlHandle)>
pub fn into_set_charge_source( self, ) -> Option<(ChargeSource, BatterySimulatorControlHandle)>
pub fn into_set_battery_percentage( self, ) -> Option<(f32, BatterySimulatorControlHandle)>
pub fn into_set_level_status( self, ) -> Option<(LevelStatus, BatterySimulatorControlHandle)>
pub fn into_set_time_remaining( self, ) -> Option<(i64, BatterySimulatorControlHandle)>
pub fn into_disconnect_real_battery( self, ) -> Option<BatterySimulatorControlHandle>
pub fn into_is_simulating(self) -> Option<BatterySimulatorIsSimulatingResponder>
pub fn into_reconnect_real_battery( self, ) -> Option<BatterySimulatorControlHandle>
pub fn into_set_present_voltage_mv( self, ) -> Option<(u32, BatterySimulatorControlHandle)>
pub fn into_set_remaining_capacity_uah( self, ) -> Option<(u32, BatterySimulatorControlHandle)>
pub fn into_set_battery_spec( self, ) -> Option<(BatterySpec, BatterySimulatorControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL