pub enum BatterySimulatorControllerRequest {
Show 13 variants
GetBatteryInfo {
responder: BatterySimulatorControllerGetBatteryInfoResponder,
},
SetBatteryStatus {
battery_status: BatteryStatus,
control_handle: BatterySimulatorControllerControlHandle,
},
SetChargeStatus {
charge_status: ChargeStatus,
control_handle: BatterySimulatorControllerControlHandle,
},
SetChargeSource {
charge_source: ChargeSource,
control_handle: BatterySimulatorControllerControlHandle,
},
SetBatteryPercentage {
percent: f32,
control_handle: BatterySimulatorControllerControlHandle,
},
SetLevelStatus {
level_status: LevelStatus,
control_handle: BatterySimulatorControllerControlHandle,
},
SetTimeRemaining {
duration: i64,
control_handle: BatterySimulatorControllerControlHandle,
},
DisconnectRealBattery {
control_handle: BatterySimulatorControllerControlHandle,
},
IsSimulating {
responder: BatterySimulatorControllerIsSimulatingResponder,
},
ReconnectRealBattery {
control_handle: BatterySimulatorControllerControlHandle,
},
SetPresentVoltageMv {
voltage: u32,
control_handle: BatterySimulatorControllerControlHandle,
},
SetRemainingCapacityUah {
capacity: u32,
control_handle: BatterySimulatorControllerControlHandle,
},
SetBatterySpec {
spec: BatterySpec,
control_handle: BatterySimulatorControllerControlHandle,
},
}
Expand description
Controller interface to allow modification of battery state.
Variants§
GetBatteryInfo
Gets battery info. This should be called after DisconnectRealBattery
Fields
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: BatterySimulatorControllerControlHandle
IsSimulating
Gets Simulation State
Fields
ReconnectRealBattery
Reconnect to the real battery This should be called after DisconnectRealBattery
Fields
control_handle: BatterySimulatorControllerControlHandle
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 BatterySimulatorControllerRequest
impl BatterySimulatorControllerRequest
pub fn into_get_battery_info( self, ) -> Option<BatterySimulatorControllerGetBatteryInfoResponder>
pub fn into_set_battery_status( self, ) -> Option<(BatteryStatus, BatterySimulatorControllerControlHandle)>
pub fn into_set_charge_status( self, ) -> Option<(ChargeStatus, BatterySimulatorControllerControlHandle)>
pub fn into_set_charge_source( self, ) -> Option<(ChargeSource, BatterySimulatorControllerControlHandle)>
pub fn into_set_battery_percentage( self, ) -> Option<(f32, BatterySimulatorControllerControlHandle)>
pub fn into_set_level_status( self, ) -> Option<(LevelStatus, BatterySimulatorControllerControlHandle)>
pub fn into_set_time_remaining( self, ) -> Option<(i64, BatterySimulatorControllerControlHandle)>
pub fn into_disconnect_real_battery( self, ) -> Option<BatterySimulatorControllerControlHandle>
pub fn into_is_simulating( self, ) -> Option<BatterySimulatorControllerIsSimulatingResponder>
pub fn into_reconnect_real_battery( self, ) -> Option<BatterySimulatorControllerControlHandle>
pub fn into_set_present_voltage_mv( self, ) -> Option<(u32, BatterySimulatorControllerControlHandle)>
pub fn into_set_remaining_capacity_uah( self, ) -> Option<(u32, BatterySimulatorControllerControlHandle)>
pub fn into_set_battery_spec( self, ) -> Option<(BatterySpec, BatterySimulatorControllerControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL