pub enum SensorManagerRequest {
ListSensors {
responder: SensorManagerListSensorsResponder,
},
SetTemperatureOverride {
name: String,
override_temperature: f32,
responder: SensorManagerSetTemperatureOverrideResponder,
},
ClearTemperatureOverride {
name: String,
responder: SensorManagerClearTemperatureOverrideResponder,
},
Connect {
payload: SensorManagerConnectRequest,
responder: SensorManagerConnectResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: SensorManagerControlHandle,
method_type: MethodType,
},
}
Expand description
Interface that manages interactions and the working state of thermal sensors.
Variants§
ListSensors
Lists sensors that may be controlled and connected to by clients.
Fields
responder: SensorManagerListSensorsResponder
SetTemperatureOverride
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.
Fields
ClearTemperatureOverride
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.
Connect
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.
#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: SensorManagerControlHandle
method_type: MethodType
Implementations§
Source§impl SensorManagerRequest
impl SensorManagerRequest
pub fn into_list_sensors(self) -> Option<SensorManagerListSensorsResponder>
pub fn into_set_temperature_override( self, ) -> Option<(String, f32, SensorManagerSetTemperatureOverrideResponder)>
pub fn into_clear_temperature_override( self, ) -> Option<(String, SensorManagerClearTemperatureOverrideResponder)>
pub fn into_connect( self, ) -> Option<(SensorManagerConnectRequest, SensorManagerConnectResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL