|
| void | FSMBase () |
| | fsm transition table
|
| |
| FSMStateBase | GetCurrentState () |
| | returns currently active state
|
| |
| void | SetInitialState (FSMStateBase initial_state) |
| | sets the initial_state for starting the machine
|
| |
| void | Start (FSMEventBase initial_event=NULL) |
| | starts the state machine by entering the initial_state (using intial_event as argument to initial state's onEntry)
|
| |
| bool | IsRunning () |
| | returns true if machine is in running state
|
| |
| void | Terminate (FSMEventBase terminal_event=NULL) |
| | terminates the state machine
|
| |
| void | Update (float dt) |
| | if machine running, call OnUpdate() on current state
|
| |
| void | AddTransition (FSMTransition< FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase > t) |
| | adds transition into transition table
|
| |
| ProcessEventResult | ProcessEvent (FSMEventBase e) |
| | instructs the state machine to process the event e
|
| |
| protected ProcessEventResult | ProcessLocalTransition (FSMTransition< FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase > t, FSMEventBase e) |
| | instructs the state machine to process the event locally - no hierarchy is crossed
|
| |
|
| protected ref FSMStateBase | m_state |
| |
| protected ref FSMStateBase | m_initialState |
| | current fsm state
|
| |
| protected ref FSMEventBase | m_initialEvent |
| | configurable initial state of the machine
|
| |
| protected ref array< ref FSMTransition< FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase > > | m_transitions |
| | configurable initial event to start the machine (null by default)
|
| |
◆ FSMBase()
◆ AddTransition()
| AddTransition |
( |
FSMTransition< FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase > |
t | ) |
|
|
inlineprivate |
adds transition into transition table
◆ GetCurrentState()
returns currently active state
- Returns
- current state the FSM is in (or NULL)
◆ IsRunning()
returns true if machine is in running state
◆ ProcessEvent()
| ProcessEvent |
( |
FSMEventBase |
e | ) |
|
|
inlineprivate |
instructs the state machine to process the event e
- Parameters
-
| [in] | e | event that will be used to find suitable transition from current state |
- Returns
- FSM_OK if transition found and allowed by guard (if any)
◆ ProcessLocalTransition()
| ProcessLocalTransition |
( |
FSMTransition< FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase > |
t, |
|
|
FSMEventBase |
e |
|
) |
| |
|
inlineprivate |
instructs the state machine to process the event locally - no hierarchy is crossed
- Parameters
-
| [in] | t | the transition in m_transitions |
| [in] | e | event that will be used to process transition from current state |
- Returns
- FSM_OK or FSM_TERMINATED
References fsmbDebugPrint(), and LogManager::IsInventoryHFSMLogEnable().
◆ SetInitialState()
| SetInitialState |
( |
FSMStateBase |
initial_state | ) |
|
|
inlineprivate |
sets the initial_state for starting the machine
◆ Start()
| Start |
( |
FSMEventBase |
initial_event = NULL | ) |
|
|
inlineprivate |
◆ Terminate()
| Terminate |
( |
FSMEventBase |
terminal_event = NULL | ) |
|
|
inlineprivate |
◆ Update()
◆ m_initialEvent
| protected ref FSMEventBase m_initialEvent |
|
private |
configurable initial state of the machine
◆ m_initialState
| protected ref FSMStateBase m_initialState |
|
private |
◆ m_state
| protected ref FSMStateBase m_state |
|
private |
◆ m_transitions
| protected ref array<ref FSMTransition<FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase> > m_transitions |
|
private |
configurable initial event to start the machine (null by default)
The documentation for this class was generated from the following file: