pub enum DeviceRequest {
GetFanLevel {
responder: DeviceGetFanLevelResponder,
},
SetFanLevel {
fan_level: u32,
responder: DeviceSetFanLevelResponder,
},
GetTemperatureCelsius {
responder: DeviceGetTemperatureCelsiusResponder,
},
GetSensorName {
responder: DeviceGetSensorNameResponder,
},
GetInfo {
responder: DeviceGetInfoResponder,
},
GetDeviceInfo {
responder: DeviceGetDeviceInfoResponder,
},
GetDvfsInfo {
power_domain: PowerDomain,
responder: DeviceGetDvfsInfoResponder,
},
GetStateChangeEvent {
responder: DeviceGetStateChangeEventResponder,
},
GetStateChangePort {
responder: DeviceGetStateChangePortResponder,
},
SetTripCelsius {
id: u32,
temp: f32,
responder: DeviceSetTripCelsiusResponder,
},
GetDvfsOperatingPoint {
power_domain: PowerDomain,
responder: DeviceGetDvfsOperatingPointResponder,
},
SetDvfsOperatingPoint {
op_idx: u16,
power_domain: PowerDomain,
responder: DeviceSetDvfsOperatingPointResponder,
},
}Variants§
GetFanLevel
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.
Fields
responder: DeviceGetFanLevelResponderSetFanLevel
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.
GetTemperatureCelsius
Get the current temperature in degrees Celsius.
Fields
responder: DeviceGetTemperatureCelsiusResponderGetSensorName
Fields
responder: DeviceGetSensorNameResponderGetInfo
Get information about the device’s current state.
Fields
responder: DeviceGetInfoResponderGetDeviceInfo
Get information about the device’s thermal capabilities and trip points.
Fields
responder: DeviceGetDeviceInfoResponderGetDvfsInfo
Get the device’s operating points. TODO(bradenkell): Can this be removed? GetDeviceInfo() provides the same information.
GetStateChangeEvent
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.
Fields
responder: DeviceGetStateChangeEventResponderGetStateChangePort
Get a port to get trip point notification packets.
Fields
responder: DeviceGetStateChangePortResponderSetTripCelsius
Sets a trip point in degrees Celsius. When the sensor reaches the trip point temperature the device will notify on an event.
GetDvfsOperatingPoint
Get the current operating point index.
SetDvfsOperatingPoint
Set the operating point index.
Implementations§
Source§impl DeviceRequest
impl DeviceRequest
pub fn into_get_fan_level(self) -> Option<DeviceGetFanLevelResponder>
pub fn into_set_fan_level(self) -> Option<(u32, DeviceSetFanLevelResponder)>
pub fn into_get_temperature_celsius( self, ) -> Option<DeviceGetTemperatureCelsiusResponder>
pub fn into_get_sensor_name(self) -> Option<DeviceGetSensorNameResponder>
pub fn into_get_info(self) -> Option<DeviceGetInfoResponder>
pub fn into_get_device_info(self) -> Option<DeviceGetDeviceInfoResponder>
pub fn into_get_dvfs_info( self, ) -> Option<(PowerDomain, DeviceGetDvfsInfoResponder)>
pub fn into_get_state_change_event( self, ) -> Option<DeviceGetStateChangeEventResponder>
pub fn into_get_state_change_port( self, ) -> Option<DeviceGetStateChangePortResponder>
pub fn into_set_trip_celsius( self, ) -> Option<(u32, f32, DeviceSetTripCelsiusResponder)>
pub fn into_get_dvfs_operating_point( self, ) -> Option<(PowerDomain, DeviceGetDvfsOperatingPointResponder)>
pub fn into_set_dvfs_operating_point( self, ) -> Option<(u16, PowerDomain, DeviceSetDvfsOperatingPointResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL