pub struct BatterySimulatorControllerProxy { /* private fields */ }
Implementations§
Source§impl BatterySimulatorControllerProxy
impl BatterySimulatorControllerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.power.battery.test/BatterySimulatorController.
Sourcepub fn take_event_stream(&self) -> BatterySimulatorControllerEventStream
pub fn take_event_stream(&self) -> BatterySimulatorControllerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_battery_info(
&self,
) -> QueryResponseFut<BatteryInfo, DefaultFuchsiaResourceDialect>
pub fn get_battery_info( &self, ) -> QueryResponseFut<BatteryInfo, DefaultFuchsiaResourceDialect>
Gets battery info. This should be called after DisconnectRealBattery
Sourcepub fn set_battery_status(
&self,
battery_status: BatteryStatus,
) -> Result<(), Error>
pub fn set_battery_status( &self, battery_status: BatteryStatus, ) -> Result<(), Error>
Sets Battery Status. This should be called after DisconnectRealBattery
Sourcepub fn set_charge_status(
&self,
charge_status: ChargeStatus,
) -> Result<(), Error>
pub fn set_charge_status( &self, charge_status: ChargeStatus, ) -> Result<(), Error>
Sets Charge Status. This should be called after DisconnectRealBattery
Sourcepub fn set_charge_source(
&self,
charge_source: ChargeSource,
) -> Result<(), Error>
pub fn set_charge_source( &self, charge_source: ChargeSource, ) -> Result<(), Error>
Sets Charge Source. This should be called after DisconnectRealBattery
Sourcepub fn set_battery_percentage(&self, percent: f32) -> Result<(), Error>
pub fn set_battery_percentage(&self, percent: f32) -> Result<(), Error>
Sets Battery Percentage. This should be called after DisconnectRealBattery
Sourcepub fn set_level_status(&self, level_status: LevelStatus) -> Result<(), Error>
pub fn set_level_status(&self, level_status: LevelStatus) -> Result<(), Error>
Sets Level Status. This should be called after DisconnectRealBattery
Sourcepub fn set_time_remaining(&self, duration: i64) -> Result<(), Error>
pub fn set_time_remaining(&self, duration: i64) -> Result<(), Error>
Sets Time Remaining to full charge / depletion This should be called after DisconnectRealBattery
Sourcepub fn disconnect_real_battery(&self) -> Result<(), Error>
pub fn disconnect_real_battery(&self) -> Result<(), Error>
Disconnect the real battery connection
Sourcepub fn is_simulating(
&self,
) -> QueryResponseFut<bool, DefaultFuchsiaResourceDialect>
pub fn is_simulating( &self, ) -> QueryResponseFut<bool, DefaultFuchsiaResourceDialect>
Gets Simulation State
Sourcepub fn reconnect_real_battery(&self) -> Result<(), Error>
pub fn reconnect_real_battery(&self) -> Result<(), Error>
Reconnect to the real battery This should be called after DisconnectRealBattery
Sourcepub fn set_present_voltage_mv(&self, voltage: u32) -> Result<(), Error>
pub fn set_present_voltage_mv(&self, voltage: u32) -> Result<(), Error>
Sets Present Voltage in mV. This should be called after DisconnectRealBattery
Sourcepub fn set_remaining_capacity_uah(&self, capacity: u32) -> Result<(), Error>
pub fn set_remaining_capacity_uah(&self, capacity: u32) -> Result<(), Error>
Sets Remaining Capacity Uah. This should be called after DisconnectRealBattery
Sourcepub fn set_battery_spec(&self, spec: &BatterySpec) -> Result<(), Error>
pub fn set_battery_spec(&self, spec: &BatterySpec) -> Result<(), Error>
Sets the BatterySpec
Trait Implementations§
Source§impl BatterySimulatorControllerProxyInterface for BatterySimulatorControllerProxy
impl BatterySimulatorControllerProxyInterface for BatterySimulatorControllerProxy
type GetBatteryInfoResponseFut = QueryResponseFut<BatteryInfo>
type IsSimulatingResponseFut = QueryResponseFut<bool>
fn get_battery_info(&self) -> Self::GetBatteryInfoResponseFut
fn set_battery_status(&self, battery_status: BatteryStatus) -> Result<(), Error>
fn set_charge_status(&self, charge_status: ChargeStatus) -> Result<(), Error>
fn set_charge_source(&self, charge_source: ChargeSource) -> Result<(), Error>
fn set_battery_percentage(&self, percent: f32) -> Result<(), Error>
fn set_level_status(&self, level_status: LevelStatus) -> Result<(), Error>
fn set_time_remaining(&self, duration: i64) -> Result<(), Error>
fn disconnect_real_battery(&self) -> Result<(), Error>
fn is_simulating(&self) -> Self::IsSimulatingResponseFut
fn reconnect_real_battery(&self) -> Result<(), Error>
fn set_present_voltage_mv(&self, voltage: u32) -> Result<(), Error>
fn set_remaining_capacity_uah(&self, capacity: u32) -> Result<(), Error>
fn set_battery_spec(&self, spec: &BatterySpec) -> Result<(), Error>
Source§impl Clone for BatterySimulatorControllerProxy
impl Clone for BatterySimulatorControllerProxy
Source§fn clone(&self) -> BatterySimulatorControllerProxy
fn clone(&self) -> BatterySimulatorControllerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Proxy for BatterySimulatorControllerProxy
impl Proxy for BatterySimulatorControllerProxy
Source§type Protocol = BatterySimulatorControllerMarker
type Protocol = BatterySimulatorControllerMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for BatterySimulatorControllerProxy
impl !RefUnwindSafe for BatterySimulatorControllerProxy
impl Send for BatterySimulatorControllerProxy
impl Sync for BatterySimulatorControllerProxy
impl Unpin for BatterySimulatorControllerProxy
impl !UnwindSafe for BatterySimulatorControllerProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)