Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionHandler ¶
ActionHandler - function pointer for this action's handler
type FSM ¶
type FSM struct { Transitions *TransitionTable // all transitions States map[string]*State // all states State *State // current state }
FSM - finite state machine struct
func New ¶
func New(table *TransitionTable) *FSM
New - makes a new finite state machine from the given config
type State ¶
type State struct { Name string Classes []Class Classifier *bayesian.Classifier // contains filtered or unexported fields }
State - single state
type Transition ¶
type Transition struct { Source string `yaml:"src"` Dest string `yaml:"dst"` Auto bool `yaml:"auto"` On []string `yaml:"on"` Do []Call `yaml:"do"` Once []Call `yaml:"once"` }
Transition - single entry in the transition table
type TransitionTable ¶
type TransitionTable struct { Imports []string `yaml:"imports"` Transitions []Transition `yaml:"transitions"` }
TransitionTable - main structure of FSM
Click to show internal directories.
Click to hide internal directories.