-
Notifications
You must be signed in to change notification settings - Fork 10
fsm
Each agent is explicitly defined in the form of a finite state machine or a pushdown automata and is driven by events generated externally by event handles or timers. Each agent is fault-isolated. Incorrect agent implementation should not affect the behavior of an agent which doesn't have any errors.
Agents are connected to each other and to external processes via interface processors, converting raw data coming from external interfaces to well-defined messages and messages received from the corresponding agents back to raw data. Each agent specify particular interface processors required to be connected to it.
Interface processors implement role_worker behavior, described in role_worker.
time() = {s, integer() > 0} | {ms, integer() > 0} | {us, integer() > 0}
trans() = [state_trans()]
state_trans() = {State :: atom(), [trans_arrow()]}
trans_arrow() =
{Event :: atom(), State :: atom()} |
{Event :: atom(), Pop :: atom(), Push :: atom(), State :: atom()}
at() anything that can be accepted by role_at:from_term
Types
SM = sm()
Event = atom()
Result = sm()
Types
SM = sm()
Result = sm()
Types
SM = sm()
EventList = [atom()]
Result = sm()
Types
SM = sm()
Time = time()
Event = atom()
Result = sm()
Types
SM = sm()
Event = atom()
Result = true | false
Types
SM = sm()
Event = atom()
Result = sm()
Types
MiddleMan = mm()
SM = sm()
Term = any()
Result = sm()
Types
SM = sm()
AT = at()
Result = sm()
Types
SM = sm()
Target = atom()
Term = any()
Result = sm()
Types
SM = sm()
Target = atom()
Term = any()
Result = sm()
Types
SM = sm()
MiddleMan = mm()
EOpts = any()
Term = any()
Condition = fun((MiddleMan, Role :: atom(), EOpts) -> true | false)
Result = sm()
Types
SM = sm()
Target = atom()
Result = true | false
The following functions must be exported from a fsm callback module.
Types
SM = sm()
Result = {ok,pid()} | ignore | {error,any()}
Types
SM = sm()
Result = sm()
Types
SM = sm()
Types
SM = sm()
MM = mm()
Term = any()
Result = sm()
Types
Result = trans()
Types
Result = [atom()]
Types
Result = atom()