Class defining the state transition table behavior for the LCIStrategic Strategic Plugin.
void setTransitionCallback(TransitionCallback cb)
Callback setting function. The provided callback will be triggered any time the current state changes...
void logDebugSignal(TransitEvent signal) const
Helper function for logging the provide signal.
TransitState getState() const
Returns the current state.
LCIStrategicStateTransitionTable()=default
Default Constructor.
void setAndLogState(TransitState new_state, TransitEvent source_signal)
Function to change the current state and log the details of the transition.
void signalWhenDEPARTING(TransitEvent signal)
void signalWhenAPPROACHING(TransitEvent signal)
void signalWhenWAITING(TransitEvent signal)
void signalWhenUNAVAILABLE(TransitEvent signal)
void signal(TransitEvent signal)
Trigger signal for the transition table.
TransitionCallback transition_callback_
std::function< void(TransitState prev_state, TransitState new_state, TransitEvent signal)> TransitionCallback
TransitState state_
Current state. This state should only ever be set using the setAndLogState() function.
TransitEvent
Enum describing the possible signals to change the current TransitState.
TransitState
Enum describing the possible states of the LCIStrategic Strategic Plugin.