Class: FSM

FSM()

Class FSM, finite state machine.

Constructor

new FSM()

Source:

Methods

getGraph() → {Graph}

This method returns the finite state machine's graph.
Source:
Returns:
the finite state machine's graph.
Type
Graph

registerDefaultTransition(idStateStart, idStateEnd)

This method registers the default transition.
Parameters:
Name Type Description
idStateStart any the start state's identifier.
idStateEnd any the end state's identifier.
Source:

registerFirstState(behaviour, id)

This method registers the first state of FSM.
Parameters:
Name Type Description
behaviour Behaviour a desired behaviour (OneShotBehaviour, CyclicBehaviour, FSMBehaviour...).
id any state's identifier (only number or string).
Source:

registerLastState(behaviour, id)

This method registers the last state of FSM.
Parameters:
Name Type Description
behaviour Behaviour a desired behaviour (OneShotBehaviour, CyclicBehaviour, FSMBehaviour...).
id any state's identifier (only number or string).
Source:

registerState(behaviour, id)

This method registers a state of FSM.
Parameters:
Name Type Description
behaviour Behaviour a desired behaviour (OneShotBehaviour, CyclicBehaviour, FSMBehaviour...).
id any state's identifier (only number or string).
Source:

registerTransition(idStateStart, idStateEnd, id)

This method registers the default transition.
Parameters:
Name Type Description
idStateStart any the start state's identifier (only number or string).
idStateEnd any the end state's identifier (only number or string).
id any the transition's identifier (only number or string).
Source:

run()

This method runs the FSM.
Source: