Module description
- ftr -- FSM Transition
-
The ftr module implements a transition in a Finite State Machine. See
fsm for more info about using this module.
ftr structure
- ftr% ( -- n )
- Get the required space for a transition variable
Transition creation, initialisation and destruction
- ftr-init ( x xt c-addr u fst +n ftr -- )
- Initialise the transition to the state fst, with label c-addr u, number events n, action xt and data x
- ftr-(free) ( ftr -- )
- Free the internal, private variables from the heap
- ftr-new ( x xt c-addr u fst +n -- ftr )
- Create a new transition on the heap to the state fst, with label c-addr u, number events n, action xt and data x
- ftr-free ( ftr -- )
- Free the transition from the heap
Member words
- ftr-condition@ ( ftr -- bar )
- Get the condition of the transition as reference to a bit array
- ftr-label@ ( ftr -- c-addr u )
- Get the label of the transition
- ftr-label? ( c-addr u ftr -- ftr true | c-addr u false )
- Check the label c-addr u with the transition ftr
- ftr-data@ ( ftr -- x )
- Get the data of the transition
- ftr-data! ( x ftr -- )
- Set the data for the transition
- ftr-action@ ( ftr -- xt )
- Get the action of the transition
- ftr-attributes! ( c-addr u ftr -- )
- Set the extra graphviz attributes for the transition
- ftr-attributes@ ( ftr -- c-addr u )
- Get the extra graphviz attributes of the transition
Event words
- ftr-fire ( n ftr -- fst )
- Fire the transition for event n, without checking the condition
- ftr-feed ( n ftr -- n false | fst true )
- Feed the event to this transition, return the next state or the event if the event did not match the condition
- ftr-try ( n ftr -- n false | fst true )
- Try the event for this transition, return the result
Inspection
- ftr-dump ( ftr -- )
- Dump the transition
Generated by fsdocgen 0.1.0