pub enum ClientRequest {
GetPowercapTree {
responder: ClientGetPowercapTreeResponder,
},
GetPowerLimit {
node_id: u64,
responder: ClientGetPowerLimitResponder,
},
SetPowerLimit {
node_id: u64,
power_limit_uw: u64,
responder: ClientSetPowerLimitResponder,
},
GetPowerLimitBypass {
node_id: u64,
responder: ClientGetPowerLimitBypassResponder,
},
SetPowerLimitBypass {
node_id: u64,
bypass_time_ms: u64,
responder: ClientSetPowerLimitBypassResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: ClientControlHandle,
method_type: MethodType,
},
}Expand description
Protocol used by Starnix to build and interact with the /sys/class/powercap
hierarchy backed by Power Manager’s PowercapController.
Variants§
GetPowercapTree
Retrieves the static powercap zone topology at container initialization.
Fields
responder: ClientGetPowercapTreeResponderGetPowerLimit
Reads the current constraint_0_power_limit_uw for node_id.
Before SetPowerLimit is called, returns the zone’s initial unthrottled
limit (max_power_uw, or the highest entry in power_levels_uw if
max_power_uw is omitted, or 0 if neither is configured).
Returns PowercapError.INVALID_ARGUMENTS if node_id is unknown or
refers to an unconstrained container zone.
SetPowerLimit
Writes constraint_0_power_limit_uw for node_id (in microwatts).
Returns PowercapError.INVALID_ARGUMENTS if node_id is unknown or
refers to an unconstrained container zone.
GetPowerLimitBypass
Reads the remaining bypass duration in milliseconds (power_limit_bypass_msec).
Returns 0 if no bypass is currently active.
Returns PowercapError.INVALID_ARGUMENTS if node_id is unknown or if
supports_bypass is not enabled on the target zone.
SetPowerLimitBypass
Sets or clears the power limit bypass timer (power_limit_bypass_msec).
A value of 0 immediately cancels any active bypass and restores the
cached thermal power limit. Setting a non-zero bypass_time_ms while a
bypass is already active replaces the active timer deadline with a new
deadline bypass_time_ms from now.
Returns PowercapError.INVALID_ARGUMENTS if node_id is unknown or if
supports_bypass is not enabled on the target zone.
#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ClientControlHandlemethod_type: MethodTypeImplementations§
Source§impl ClientRequest
impl ClientRequest
pub fn into_get_powercap_tree(self) -> Option<ClientGetPowercapTreeResponder>
pub fn into_get_power_limit(self) -> Option<(u64, ClientGetPowerLimitResponder)>
pub fn into_set_power_limit( self, ) -> Option<(u64, u64, ClientSetPowerLimitResponder)>
pub fn into_get_power_limit_bypass( self, ) -> Option<(u64, ClientGetPowerLimitBypassResponder)>
pub fn into_set_power_limit_bypass( self, ) -> Option<(u64, u64, ClientSetPowerLimitBypassResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL