Dfa.Predefined (dfa v0.1.5)
Dfa.Predefined only predefines a behavior of state machine.
The state machine here consists of machine
and instance
.
Link to this section Summary
Functions
Check if a given machine name exists.
Generate an instance of a state machine.
Defines a state change event.
Removes a state change event.
Load a state.
Triggers an event.
Link to this section Types
Link to this type
option()
Specs
Link to this section Functions
Link to this function
exists?(machine_name, db_index, opts \\ [])
Specs
Check if a given machine name exists.
Link to this function
initialize!(instance_name, machine_name, db_index, initial_state, opts \\ [])
Specs
initialize!(String.t(), String.t(), integer(), String.t(), [option()]) :: Redix.Protocol.redis_value()
Generate an instance of a state machine.
Link to this function
on!(machine_name, db_index, event, current_state, next_state, opts \\ [])
Specs
on!(String.t(), integer(), String.t(), String.t(), String.t(), [option()]) :: Redix.Protocol.redis_value()
Defines a state change event.
Link to this function
rm!(machine_name, db_index, event, opts \\ [])
Specs
rm!(String.t(), integer(), String.t(), [option()]) :: Redix.Protocol.redis_value()
Removes a state change event.
Link to this function
state!(instance_name, db_index, opts \\ [])
Specs
state!(String.t(), integer(), [option()]) :: Redix.Protocol.redis_value()
Load a state.
Link to this function
trigger!(instance_name, db_index, event, opts \\ [])
Specs
Triggers an event.