Class: StateMachine

StateMachine(handler)

The class implements a classic statemachine which allow state to change when the transtion guard function is true. Upon the change the transition action function is called

Constructor

new StateMachine(handler)

The construtcor

Parameters:
Name Type Description
handler Object

The object to control.

Source:

Members

state

Get current state

Source:

Methods

add(transition)

Add a single transition

Parameters:
Name Type Description
transition Transition

The transition

Source:

run(event)

Run the statemachine

Parameters:
Name Type Description
event Event

The event.

Source: