pub enum StateRequest {
Set {
payload: SystemActivityGovernorState,
responder: StateSetResponder,
},
Get {
responder: StateGetResponder,
},
Watch {
responder: StateWatchResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: StateControlHandle,
method_type: MethodType,
},
}
Variants§
Set
Sets the power elements to specific states supported by SAG.
The initial state of SAG is (2, 0, 0, 0). SAG maintains execution_state_level == 2 until a “boot complete” logic is triggered. “boot complete” logic is triggered by setting SAG states to (2, 1, any, any).
Supported states before “boot complete”:
- (2, any, any, any) Supported states after “boot complete”:
- (2, 1, any, any)
- (1, 0, 1, any)
- (1, 0, any, 1)
- (0, 0, 0, 0)
In SystemActivityGovernorState, omitting specifying a power element’s state will preserve its existing state.
Get
Return immediately with the current state of SAG.
Fields
responder: StateGetResponder
Watch
On a given connection, the first call will return immediately with SAG’s
current state. Subsequent Watch
requests will only
return if and only if a test.sagcontrol.State.Set
call sends a request and SAG’s
state has changed to the requested supported state.
For example, if the current state of SAG is (1, 0, 1, 0), the first
Watch
will return (1, 0, 1, 0). If a test.sagcontrol.State.Set
call sends a request to change state to (2, 1, 0, 1), the next Watch
will return when the SAG’s state has fully transitioned to (2, 1, 0, 1),
any intermediate transient state (in this example, (2, 0, 1, 0),
(2, 1, 1, 0) and (2, 1, 1, 1)) will not be returned.
Clients should use this to synchronize SAG states.
Fields
responder: StateWatchResponder
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: StateControlHandle
method_type: MethodType
Implementations§
source§impl StateRequest
impl StateRequest
pub fn into_set( self, ) -> Option<(SystemActivityGovernorState, StateSetResponder)>
pub fn into_get(self) -> Option<StateGetResponder>
pub fn into_watch(self) -> Option<StateWatchResponder>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL