pub struct SensorManagerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl SensorManagerSynchronousProxy
impl SensorManagerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<SensorManagerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<SensorManagerEvent, 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 list_sensors(
&self,
___deadline: MonotonicInstant,
) -> Result<Vec<SensorInfo>, Error>
pub fn list_sensors( &self, ___deadline: MonotonicInstant, ) -> Result<Vec<SensorInfo>, Error>
Lists sensors that may be controlled and connected to by clients.
Sourcepub fn set_temperature_override(
&self,
name: &str,
override_temperature: f32,
___deadline: MonotonicInstant,
) -> Result<SensorManagerSetTemperatureOverrideResult, Error>
pub fn set_temperature_override( &self, name: &str, override_temperature: f32, ___deadline: MonotonicInstant, ) -> Result<SensorManagerSetTemperatureOverrideResult, Error>
Sets an override temperature for the sensor with name
.
When an override temperature is set, internal thermal policies will
use the override temperature. Temperature values retrieved from
sensor connections vended by Connect
will also receive the override
temperature.
This interaction does not affect the thermal sensor itself.
Clients who connect directly to the sensor without Connect
will
receive the real sensor value.
If a sensor with the given name
is not found,
SetTemperatureOverrideError.SENSOR_NOT_FOUND
is returned.
Sourcepub fn clear_temperature_override(
&self,
name: &str,
___deadline: MonotonicInstant,
) -> Result<SensorManagerClearTemperatureOverrideResult, Error>
pub fn clear_temperature_override( &self, name: &str, ___deadline: MonotonicInstant, ) -> Result<SensorManagerClearTemperatureOverrideResult, Error>
Clears the temperature override set by SetTemperatureOverride
.
If no temperature override has been set, this interaction does nothing.
If a sensor with the given name
is not found,
ClearTemperatureOverrideError.SENSOR_NOT_FOUND
is returned.
Sourcepub fn connect(
&self,
payload: SensorManagerConnectRequest,
___deadline: MonotonicInstant,
) -> Result<SensorManagerConnectResult, Error>
pub fn connect( &self, payload: SensorManagerConnectRequest, ___deadline: MonotonicInstant, ) -> Result<SensorManagerConnectResult, Error>
Connects to the thermal sensor with the given name
.
If any required arguments are not provided,
ConnectError.INVALID_ARGUMENTS
is returned.
If a sensor with the given name
is not found,
ConnectError.SENSOR_NOT_FOUND
is returned.
Trait Implementations§
Source§impl From<Channel> for SensorManagerSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for SensorManagerSynchronousProxy
Source§impl From<SensorManagerSynchronousProxy> for Handle
Available on Fuchsia only.
impl From<SensorManagerSynchronousProxy> for Handle
Source§fn from(value: SensorManagerSynchronousProxy) -> Self
fn from(value: SensorManagerSynchronousProxy) -> Self
Source§impl FromClient for SensorManagerSynchronousProxy
Available on Fuchsia only.
impl FromClient for SensorManagerSynchronousProxy
Source§type Protocol = SensorManagerMarker
type Protocol = SensorManagerMarker
Source§fn from_client(value: ClientEnd<SensorManagerMarker>) -> Self
fn from_client(value: ClientEnd<SensorManagerMarker>) -> Self
Source§impl SynchronousProxy for SensorManagerSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for SensorManagerSynchronousProxy
Source§type Proxy = SensorManagerProxy
type Proxy = SensorManagerProxy
Source§type Protocol = SensorManagerMarker
type Protocol = SensorManagerMarker
Proxy
controls.