pub struct DeviceProxy { /* private fields */ }Implementations§
Source§impl DeviceProxy
impl DeviceProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.thermal/Device.
Sourcepub fn take_event_stream(&self) -> DeviceEventStream
pub fn take_event_stream(&self) -> DeviceEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_fan_level(
&self,
) -> QueryResponseFut<(i32, u32), DefaultFuchsiaResourceDialect> ⓘ
pub fn get_fan_level( &self, ) -> QueryResponseFut<(i32, u32), DefaultFuchsiaResourceDialect> ⓘ
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,
) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect> ⓘ
pub fn set_fan_level( &self, fan_level: u32, ) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect> ⓘ
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,
) -> QueryResponseFut<(i32, f32), DefaultFuchsiaResourceDialect> ⓘ
pub fn get_temperature_celsius( &self, ) -> QueryResponseFut<(i32, f32), DefaultFuchsiaResourceDialect> ⓘ
Get the current temperature in degrees Celsius.
pub fn get_sensor_name( &self, ) -> QueryResponseFut<String, DefaultFuchsiaResourceDialect> ⓘ
Sourcepub fn get_info(
&self,
) -> QueryResponseFut<(i32, Option<Box<ThermalInfo>>), DefaultFuchsiaResourceDialect> ⓘ
pub fn get_info( &self, ) -> QueryResponseFut<(i32, Option<Box<ThermalInfo>>), DefaultFuchsiaResourceDialect> ⓘ
Get information about the device’s current state.
Sourcepub fn get_device_info(
&self,
) -> QueryResponseFut<(i32, Option<Box<ThermalDeviceInfo>>), DefaultFuchsiaResourceDialect> ⓘ
pub fn get_device_info( &self, ) -> QueryResponseFut<(i32, Option<Box<ThermalDeviceInfo>>), DefaultFuchsiaResourceDialect> ⓘ
Get information about the device’s thermal capabilities and trip points.
Sourcepub fn get_dvfs_info(
&self,
power_domain: PowerDomain,
) -> QueryResponseFut<(i32, Option<Box<OperatingPoint>>), DefaultFuchsiaResourceDialect> ⓘ
pub fn get_dvfs_info( &self, power_domain: PowerDomain, ) -> QueryResponseFut<(i32, Option<Box<OperatingPoint>>), DefaultFuchsiaResourceDialect> ⓘ
Get the device’s operating points. TODO(bradenkell): Can this be removed? GetDeviceInfo() provides the same information.
Sourcepub fn get_state_change_event(
&self,
) -> QueryResponseFut<(i32, Option<Event>), DefaultFuchsiaResourceDialect> ⓘ
pub fn get_state_change_event( &self, ) -> QueryResponseFut<(i32, Option<Event>), DefaultFuchsiaResourceDialect> ⓘ
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,
) -> QueryResponseFut<(i32, Option<Port>), DefaultFuchsiaResourceDialect> ⓘ
pub fn get_state_change_port( &self, ) -> QueryResponseFut<(i32, Option<Port>), DefaultFuchsiaResourceDialect> ⓘ
Get a port to get trip point notification packets.
Sourcepub fn set_trip_celsius(
&self,
id: u32,
temp: f32,
) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect> ⓘ
pub fn set_trip_celsius( &self, id: u32, temp: f32, ) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect> ⓘ
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,
) -> QueryResponseFut<(i32, u16), DefaultFuchsiaResourceDialect> ⓘ
pub fn get_dvfs_operating_point( &self, power_domain: PowerDomain, ) -> QueryResponseFut<(i32, u16), DefaultFuchsiaResourceDialect> ⓘ
Get the current operating point index.
Sourcepub fn set_dvfs_operating_point(
&self,
op_idx: u16,
power_domain: PowerDomain,
) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect> ⓘ
pub fn set_dvfs_operating_point( &self, op_idx: u16, power_domain: PowerDomain, ) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect> ⓘ
Set the operating point index.
Trait Implementations§
Source§impl Clone for DeviceProxy
impl Clone for DeviceProxy
Source§impl Debug for DeviceProxy
impl Debug for DeviceProxy
Source§impl DeviceProxyInterface for DeviceProxy
impl DeviceProxyInterface for DeviceProxy
type GetFanLevelResponseFut = QueryResponseFut<(i32, u32)>
type SetFanLevelResponseFut = QueryResponseFut<i32>
type GetTemperatureCelsiusResponseFut = QueryResponseFut<(i32, f32)>
type GetSensorNameResponseFut = QueryResponseFut<String>
type GetInfoResponseFut = QueryResponseFut<(i32, Option<Box<ThermalInfo>>)>
type GetDeviceInfoResponseFut = QueryResponseFut<(i32, Option<Box<ThermalDeviceInfo>>)>
type GetDvfsInfoResponseFut = QueryResponseFut<(i32, Option<Box<OperatingPoint>>)>
type GetStateChangeEventResponseFut = QueryResponseFut<(i32, Option<Event>)>
type GetStateChangePortResponseFut = QueryResponseFut<(i32, Option<Port>)>
type SetTripCelsiusResponseFut = QueryResponseFut<i32>
type GetDvfsOperatingPointResponseFut = QueryResponseFut<(i32, u16)>
type SetDvfsOperatingPointResponseFut = QueryResponseFut<i32>
fn get_fan_level(&self) -> Self::GetFanLevelResponseFut
fn set_fan_level(&self, fan_level: u32) -> Self::SetFanLevelResponseFut
fn get_temperature_celsius(&self) -> Self::GetTemperatureCelsiusResponseFut
fn get_sensor_name(&self) -> Self::GetSensorNameResponseFut
fn get_info(&self) -> Self::GetInfoResponseFut
fn get_device_info(&self) -> Self::GetDeviceInfoResponseFut
fn get_dvfs_info( &self, power_domain: PowerDomain, ) -> Self::GetDvfsInfoResponseFut
fn get_state_change_event(&self) -> Self::GetStateChangeEventResponseFut
fn get_state_change_port(&self) -> Self::GetStateChangePortResponseFut
fn set_trip_celsius( &self, id: u32, temp: f32, ) -> Self::SetTripCelsiusResponseFut
fn get_dvfs_operating_point( &self, power_domain: PowerDomain, ) -> Self::GetDvfsOperatingPointResponseFut
fn set_dvfs_operating_point( &self, op_idx: u16, power_domain: PowerDomain, ) -> Self::SetDvfsOperatingPointResponseFut
Source§impl Proxy for DeviceProxy
impl Proxy for DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Proxy controls.