pub struct DeviceSynchronousProxy { /* private fields */ }Implementations§
Source§impl DeviceSynchronousProxy
impl DeviceSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<DeviceEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<DeviceEvent, 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_fan_level(
&self,
___deadline: MonotonicInstant,
) -> Result<(i32, u32), Error>
pub fn get_fan_level( &self, ___deadline: MonotonicInstant, ) -> Result<(i32, u32), Error>
Get the current fan level.
- response
statusZX_ERR_INTERNAL iffan_levelis not available. This generally means thatfan_levelhas not been initialized yet or something has gone terribly wrong. - response
fan_levela uint32 field indicating the current fan level. See fan level description above.
Sourcepub fn set_fan_level(
&self,
fan_level: u32,
___deadline: MonotonicInstant,
) -> Result<i32, Error>
pub fn set_fan_level( &self, fan_level: u32, ___deadline: MonotonicInstant, ) -> Result<i32, Error>
Set the fan level.
- request
fan_levela uint32 field indicating the requested fan level. See fan level description above.
- response
statusZX_ERR_OUT_OF_RANGE if the requested fan_level is not valid.
Sourcepub fn get_temperature_celsius(
&self,
___deadline: MonotonicInstant,
) -> Result<(i32, f32), Error>
pub fn get_temperature_celsius( &self, ___deadline: MonotonicInstant, ) -> Result<(i32, f32), Error>
Get the current temperature in degrees Celsius.
pub fn get_sensor_name( &self, ___deadline: MonotonicInstant, ) -> Result<String, Error>
Sourcepub fn get_info(
&self,
___deadline: MonotonicInstant,
) -> Result<(i32, Option<Box<ThermalInfo>>), Error>
pub fn get_info( &self, ___deadline: MonotonicInstant, ) -> Result<(i32, Option<Box<ThermalInfo>>), Error>
Get information about the device’s current state.
Sourcepub fn get_device_info(
&self,
___deadline: MonotonicInstant,
) -> Result<(i32, Option<Box<ThermalDeviceInfo>>), Error>
pub fn get_device_info( &self, ___deadline: MonotonicInstant, ) -> Result<(i32, Option<Box<ThermalDeviceInfo>>), Error>
Get information about the device’s thermal capabilities and trip points.
Sourcepub fn get_dvfs_info(
&self,
power_domain: PowerDomain,
___deadline: MonotonicInstant,
) -> Result<(i32, Option<Box<OperatingPoint>>), Error>
pub fn get_dvfs_info( &self, power_domain: PowerDomain, ___deadline: MonotonicInstant, ) -> Result<(i32, Option<Box<OperatingPoint>>), Error>
Get the device’s operating points. TODO(bradenkell): Can this be removed? GetDeviceInfo() provides the same information.
Sourcepub fn get_state_change_event(
&self,
___deadline: MonotonicInstant,
) -> Result<(i32, Option<Event>), Error>
pub fn get_state_change_event( &self, ___deadline: MonotonicInstant, ) -> Result<(i32, Option<Event>), Error>
Get an event to get trip point notifications on. ZX_USER_SIGNAL_0 is changed when either
trip point is reached. It is deasserted when the state is read via GetInfo.
Sourcepub fn get_state_change_port(
&self,
___deadline: MonotonicInstant,
) -> Result<(i32, Option<Port>), Error>
pub fn get_state_change_port( &self, ___deadline: MonotonicInstant, ) -> Result<(i32, Option<Port>), Error>
Get a port to get trip point notification packets.
Sourcepub fn set_trip_celsius(
&self,
id: u32,
temp: f32,
___deadline: MonotonicInstant,
) -> Result<i32, Error>
pub fn set_trip_celsius( &self, id: u32, temp: f32, ___deadline: MonotonicInstant, ) -> Result<i32, Error>
Sets a trip point in degrees Celsius. When the sensor reaches the trip point temperature the device will notify on an event.
Sourcepub fn get_dvfs_operating_point(
&self,
power_domain: PowerDomain,
___deadline: MonotonicInstant,
) -> Result<(i32, u16), Error>
pub fn get_dvfs_operating_point( &self, power_domain: PowerDomain, ___deadline: MonotonicInstant, ) -> Result<(i32, u16), Error>
Get the current operating point index.
Sourcepub fn set_dvfs_operating_point(
&self,
op_idx: u16,
power_domain: PowerDomain,
___deadline: MonotonicInstant,
) -> Result<i32, Error>
pub fn set_dvfs_operating_point( &self, op_idx: u16, power_domain: PowerDomain, ___deadline: MonotonicInstant, ) -> Result<i32, Error>
Set the operating point index.
Trait Implementations§
Source§impl Debug for DeviceSynchronousProxy
impl Debug for DeviceSynchronousProxy
Source§impl From<Channel> for DeviceSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for DeviceSynchronousProxy
Source§impl From<DeviceSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<DeviceSynchronousProxy> for NullableHandle
Source§fn from(value: DeviceSynchronousProxy) -> Self
fn from(value: DeviceSynchronousProxy) -> Self
Source§impl FromClient for DeviceSynchronousProxy
Available on Fuchsia only.
impl FromClient for DeviceSynchronousProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Source§fn from_client(value: ClientEnd<DeviceMarker>) -> Self
fn from_client(value: ClientEnd<DeviceMarker>) -> Self
Source§impl SynchronousProxy for DeviceSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for DeviceSynchronousProxy
Source§type Proxy = DeviceProxy
type Proxy = DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Proxy controls.