OpenEnroth 73e68f7
|
#include <Fsm.h>
Public Member Functions | |
Fsm (FsmStateEntries states, std::string_view startStateName) | |
void | update () |
Updates the current state of the Fsm and executes any transition. More... | |
bool | hasReachedExitState () const |
Public Member Functions inherited from FsmEventHandler | |
FsmEventHandler () | |
Public Member Functions inherited from PlatformEventFilter | |
PlatformEventFilter (std::initializer_list< PlatformEventType > eventTypes) | |
PlatformEventFilter (PlatformEventWildcard eventTypes) | |
virtual bool | event (const PlatformEvent *event) |
const std::vector< PlatformEventType > | eventTypes () const |
Static Public Attributes | |
static const std::string_view | exitState = "_Exit" |
static const LogCategory | fsmLogCategory |
Private Member Functions | |
virtual bool | event (const PlatformEvent *event) override |
void | _goToState (std::string_view stateName) |
void | _performAction (FsmAction &action) |
void | _executeTransition (std::string_view transition) |
FsmStateEntry * | _getStateByName (std::string_view stateName) |
Private Attributes | |
FsmStateEntries | _states |
FsmStateEntry * | _currentState {} |
bool | _hasReachedExitState {} |
Fsm::Fsm | ( | FsmStateEntries | states, |
std::string_view | startStateName | ||
) |
|
private |
|
private |
|
private |
|
private |
|
overrideprivatevirtual |
Reimplemented from PlatformEventFilter.
bool Fsm::hasReachedExitState | ( | ) | const |
void Fsm::update | ( | ) |
Updates the current state of the Fsm and executes any transition.
|
private |
|
private |
|
private |
|
static |
Global string used to specify the state used to exit from the Fsm. When the Fsm jumps to this state, Fsm::hasReachedExitState() will return true.
|
static |