AsyncStateMapInstance

class AsyncStateMapInstance<S, E, C, A, R>(val context: C, val newState: S, val name: String?, val parentFsm: AsyncStateMachineInstance<S, E, C, A, R>, val definition: AsyncStateMapDefinition<S, E, C, A, R>, val coroutineScope: CoroutineScope)

Constructors

Link copied to clipboard
constructor(context: C, newState: S, name: String?, parentFsm: AsyncStateMachineInstance<S, E, C, A, R>, definition: AsyncStateMapDefinition<S, E, C, A, R>, coroutineScope: CoroutineScope)

Properties

Link copied to clipboard
val context: C
Link copied to clipboard
val coroutineScope: CoroutineScope
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val name: String?
Link copied to clipboard
val newState: S
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun allowed(includeDefaults: Boolean = false): Set<E>

This function will provide the list of allowed events given the current state of the machine.

Link copied to clipboard
fun eventAllowed(event: E, includeDefault: Boolean): Boolean

This function will provide an indication whether the given event is allowed in the current state.

Link copied to clipboard
suspend fun sendEvent(event: E, arg: A? = null): R?

This function will process the on and advance the state machine according to the FSM definition.