pub enum ActivityGovernorRequest {
GetPowerElements {
responder: ActivityGovernorGetPowerElementsResponder,
},
TakeWakeLease {
name: String,
responder: ActivityGovernorTakeWakeLeaseResponder,
},
AcquireWakeLease {
name: String,
responder: ActivityGovernorAcquireWakeLeaseResponder,
},
TakeApplicationActivityLease {
name: String,
responder: ActivityGovernorTakeApplicationActivityLeaseResponder,
},
RegisterListener {
payload: ActivityGovernorRegisterListenerRequest,
responder: ActivityGovernorRegisterListenerResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: ActivityGovernorControlHandle,
method_type: MethodType,
},
}
Expand description
A service for exposing events and power elements managed by the system activity governor (SAG).
SAG is responsible for managing the execution state of the hardware platform. The hardware platform consists of the components required to execute code on the device. This typically includes the CPU, memory, operating system, and other components required for these components to function (clock trees, power domains, etc.).
Variants§
GetPowerElements
Gets the power elements owned by the activity governor.
If an error occurs while the server is registering a power element with
the power broker or an error occurs while creating a token for a power
element, then the channel to ActivityGovernor
will be closed by the
server and no response will be returned.
Fields
responder: ActivityGovernorGetPowerElementsResponder
TakeWakeLease
Creates a lease that blocks suspension of the hardware platform.
The hardware platform will not suspend as long as a valid
LeaseToken
exists.
If an error occurs while creating a token for the wake lease, then the
channel to ActivityGovernor
will be closed by the server and no
response will be returned.
AcquireWakeLease
Creates a lease that blocks suspension of the hardware platform.
The hardware platform will not suspend as long as a valid
LeaseToken
exists.
TakeApplicationActivityLease
Creates a lease that blocks the system from dropping below the Application Activity ‘Active’ state. In particular, this blocks suspension of the hardware platform.
If an error occurs while creating a token for the activity lease, then the
channel to ActivityGovernor
will be closed by the server and no
response will be returned.
RegisterListener
Registers a listener for activity governor events.
If there is an error in registering the listener, then the given
ActivityGovernorListener
channel will be closed before the response
is sent.
To unregister, close the ActivityGovernorListener
channel.
Fields
responder: ActivityGovernorRegisterListenerResponder
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ActivityGovernorControlHandle
method_type: MethodType
Implementations§
Source§impl ActivityGovernorRequest
impl ActivityGovernorRequest
pub fn into_get_power_elements( self, ) -> Option<ActivityGovernorGetPowerElementsResponder>
pub fn into_take_wake_lease( self, ) -> Option<(String, ActivityGovernorTakeWakeLeaseResponder)>
pub fn into_acquire_wake_lease( self, ) -> Option<(String, ActivityGovernorAcquireWakeLeaseResponder)>
pub fn into_take_application_activity_lease( self, ) -> Option<(String, ActivityGovernorTakeApplicationActivityLeaseResponder)>
pub fn into_register_listener( self, ) -> Option<(ActivityGovernorRegisterListenerRequest, ActivityGovernorRegisterListenerResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL