pub struct StateSynchronousProxy { /* private fields */ }
Implementations§
Source§impl StateSynchronousProxy
impl StateSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<StateEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<StateEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn set(
&self,
payload: &SystemActivityGovernorState,
___deadline: MonotonicInstant,
) -> Result<StateSetResult, Error>
pub fn set( &self, payload: &SystemActivityGovernorState, ___deadline: MonotonicInstant, ) -> Result<StateSetResult, Error>
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.
Sourcepub fn get(
&self,
___deadline: MonotonicInstant,
) -> Result<SystemActivityGovernorState, Error>
pub fn get( &self, ___deadline: MonotonicInstant, ) -> Result<SystemActivityGovernorState, Error>
Return immediately with the current state of SAG.
Sourcepub fn watch(
&self,
___deadline: MonotonicInstant,
) -> Result<SystemActivityGovernorState, Error>
pub fn watch( &self, ___deadline: MonotonicInstant, ) -> Result<SystemActivityGovernorState, Error>
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.
Trait Implementations§
Source§impl Debug for StateSynchronousProxy
impl Debug for StateSynchronousProxy
Source§impl SynchronousProxy for StateSynchronousProxy
impl SynchronousProxy for StateSynchronousProxy
Source§type Proxy = StateProxy
type Proxy = StateProxy
Source§type Protocol = StateMarker
type Protocol = StateMarker
Proxy
controls.