ExMachine.Machine (ex_machine v0.1.0)
View SourceSummary
Functions
Dispatch an event to the machine, performing all the necessary activities and returning the machine in the new active configuration.
Returns list of currents active states.
Initialize the machine, performing all the necessary activities and returning the machine in its initial active configuration
Returns last executed macrostep
Returns last executed list of microstep
Returns last executed list of transitions
Types
@type t() :: %ExMachine.Machine{ configuration: [[String.t()]], context: term(), macrosteps: [ %ExMachine.Macrostep{ actions: term(), entered: term(), event: term(), exited: term(), microsteps: term(), timestamp: term(), transitions: term() } ], queue: list(), running?: boolean(), statechart: ExMachine.Statechart.t(), states_histories: map() }
Functions
Dispatch an event to the machine, performing all the necessary activities and returning the machine in the new active configuration.
If during execution some activities raises internal events, the machine continues execution of these events until the internal queue is empty (run to completion)
Returns list of currents active states.
Generally, there is only one active state if the machine is not in a parallel (orthogonal) state, otherwise its the list of active states of each active region
Initialize the machine, performing all the necessary activities and returning the machine in its initial active configuration
The log of the transition to initial state are recorded in the first Macrostep
Returns last executed macrostep
Returns last executed list of microstep
Returns last executed list of transitions