Methods
getGraph() → {Graph}
This method returns the finite state machine's graph.
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. |
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). |
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). |
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). |
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). |
run()
This method runs the FSM.