fsm

package
v0.0.0-...-857d4a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2013 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const ANY = -1

Variables

This section is empty.

Functions

func Transition

func Transition(stateTable map[int][]State, currentState int, input interface{}, output interface{}, data interface{}) int

Types

type Matcher

type Matcher interface {
	Matches(input interface{}) bool
}

type State

type State struct {
	Input    Matcher
	NewState int
	Action   TransitionFunction
}

type TransitionFunction

type TransitionFunction func(state int, input interface{}, output interface{}, data interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL