pub struct BatterySimulatorSynchronousProxy { /* private fields */ }
Implementations§
Source§impl BatterySimulatorSynchronousProxy
impl BatterySimulatorSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<BatterySimulatorEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<BatterySimulatorEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_battery_info(
&self,
___deadline: MonotonicInstant,
) -> Result<BatteryInfo, Error>
pub fn get_battery_info( &self, ___deadline: MonotonicInstant, ) -> Result<BatteryInfo, Error>
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,
___deadline: MonotonicInstant,
) -> Result<bool, Error>
pub fn is_simulating( &self, ___deadline: MonotonicInstant, ) -> Result<bool, Error>
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 SynchronousProxy for BatterySimulatorSynchronousProxy
impl SynchronousProxy for BatterySimulatorSynchronousProxy
Source§type Proxy = BatterySimulatorProxy
type Proxy = BatterySimulatorProxy
Source§type Protocol = BatterySimulatorMarker
type Protocol = BatterySimulatorMarker
Proxy
controls.