FMLiveSwitchDataChannelStateMachine Class Reference

A state machine for data channel states. More...

Instance Methods

(instancetype) - init
 Initializes a new instance of the FMLiveSwitchDataChannelStateMachine class. More...
 
(int) - stateToValueWithState:
 Converts a state to an integer value. More...
 
(FMLiveSwitchDataChannelState) - valueToState:
 Converts an integer value to a state. More...
 
- Instance Methods inherited from FMLiveSwitchStateMachine
(bool) - canTransitionWithToState:
 Determines whether a transition to the specified state is allowed. More...
 
(FMLiveSwitchPromise< id > *) - getPromiseWithState:returnValue:
 Gets a promise, which may be resolved or rejected depending on the current state of this machine. More...
 
(instancetype) - initWithInitialState:
 Initializes a new instance of the FMLiveSwitchStateMachine`1 class. More...
 
(bool) - isReachableWithState:
 Determines whether a transition to a specified state is possible (even via intermediate hops). More...
 
(long long) - lastStateMillis
 Gets the length of time spent in the last state, in milliseconds. More...
 
(long long) - lastStateTicks
 Gets the length of time spent in the last state, in ticks. More...
 
(T) - state
 Gets the state. More...
 
(int) - stateToValueWithState:
 Converts a state to an integer value. More...
 
(int) - stateValue
 Gets the state value. More...
 
(long long) - systemTimestamp
 Gets the system timestamp of the last state transition. More...
 
(bool) - transitionWithToState:
 Transitions to the specified state. More...
 

Class Methods

(FMLiveSwitchDataChannelStateMachine *) + dataChannelStateMachine
 Initializes a new instance of the FMLiveSwitchDataChannelStateMachine class. More...
 
- Class Methods inherited from FMLiveSwitchStateMachine
(FMLiveSwitchStateMachine *) + stateMachineWithInitialState:
 Initializes a new instance of the FMLiveSwitchStateMachine`1 class. More...
 

Additional Inherited Members

- Protected Attributes inherited from FMLiveSwitchStateMachine
 __pad0__: NSObject- (void) addTransitionWithFromState:(T)fromState toState:(T)toState
 

Detailed Description

A state machine for data channel states.

Method Documentation

◆ dataChannelStateMachine

+ (FMLiveSwitchDataChannelStateMachine*) dataChannelStateMachine

Initializes a new instance of the FMLiveSwitchDataChannelStateMachine class.

◆ init

- (instancetype) init

Initializes a new instance of the FMLiveSwitchDataChannelStateMachine class.

◆ stateToValueWithState:

- (int) stateToValueWithState: (FMLiveSwitchDataChannelState)  state

Converts a state to an integer value.

Parameters
stateThe state.

◆ valueToState:

- (FMLiveSwitchDataChannelState) valueToState: (int)  value

Converts an integer value to a state.

Parameters
valueThe integer value.

Implements FMLiveSwitchStateMachine.