(advance fsm timeouts* state->timeouts db event)
Given a parsed fsm, a db, and an event, advances the fsm. Else, no-op.
Given a parsed fsm, a db, and an event, advances the fsm. Else, no-op.
(clear-timeouts! timeouts*)
(compile-timeouts fsm)
(dispatch-timeouts! timeouts* timeouts)
(find-transition transitions event)
Try to find a transition that matches some subset of the received event
Try to find a transition that matches some subset of the received event
(foreign-event? fsm-id [event-id _ event-fsm-id])
(next-state fsm db event)
Returns next state if there is a valid transition, nil
otherwise.
Returns next state if there is a valid transition, `nil` otherwise.
(reg-no-op id)
Convenience function for declaring no-op events.
Convenience function for declaring no-op events.
(render fsm-fn & args)
Given an fsm function and arguments, renders a materialized view of
the fsm state. A step
method must exist for each state defined in
the fsm transition map. The args passed to render
must match the
args expected by the fsm's step
methods.
Given an fsm function and arguments, renders a materialized view of the fsm state. A `step` method must exist for each state defined in the fsm transition map. The args passed to `render` must match the args expected by the fsm's `step` methods.
(state-changed? prev next)
Materialized view of the current fsm state. A step
method must
exist for each state defined in the fsm transition map. States are
globally defined, and namespaced keywords are required. It is a good
idea to define the fsm in the same namespace as the steps.
Materialized view of the current fsm state. A `step` method must exist for each state defined in the fsm transition map. States are globally defined, and namespaced keywords are required. It is a good idea to define the fsm in the same namespace as the steps.
(with-fsm binding & body)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close