pub struct SessionStateMachine { /* private fields */ }Implementations§
Source§impl SessionStateMachine
impl SessionStateMachine
pub fn new(init: SessionInit) -> Self
pub fn phase(&self) -> &SessionPhase
pub fn session_id(&self) -> Option<AgentID>
pub fn endpoints( &self, ) -> Option<&HashMap<AgentCapabilities, TransportProtocolEndpoint>>
pub fn last_error(&self) -> Option<&str>
Sourcepub fn start_connect(&mut self, now_ms: NowMs) -> Vec<SessionAction>
pub fn start_connect(&mut self, now_ms: NowMs) -> Vec<SessionAction>
Begin connection orchestration. Returns the initial actions.
Sourcepub fn start_deregister(&mut self, reason: Option<String>) -> Vec<SessionAction>
pub fn start_deregister(&mut self, reason: Option<String>) -> Vec<SessionAction>
Request a graceful deregistration. Returns actions to perform now.
Sourcepub fn step(
&mut self,
now_ms: NowMs,
events: &[SessionEvent],
) -> Vec<SessionAction>
pub fn step( &mut self, now_ms: NowMs, events: &[SessionEvent], ) -> Vec<SessionAction>
Advance the state machine by providing observed events.
Sourcepub fn try_mark_data_channels_active(
&mut self,
sensor_state: &FeagiEndpointState,
motor_state: &FeagiEndpointState,
)
pub fn try_mark_data_channels_active( &mut self, sensor_state: &FeagiEndpointState, motor_state: &FeagiEndpointState, )
Helper for drivers: after polling sensor and motor channels, call this to decide if data channels are fully active and transition to Active.
Trait Implementations§
Source§impl Clone for SessionStateMachine
impl Clone for SessionStateMachine
Source§fn clone(&self) -> SessionStateMachine
fn clone(&self) -> SessionStateMachine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SessionStateMachine
impl RefUnwindSafe for SessionStateMachine
impl Send for SessionStateMachine
impl Sync for SessionStateMachine
impl Unpin for SessionStateMachine
impl UnsafeUnpin for SessionStateMachine
impl UnwindSafe for SessionStateMachine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more