|
| const StateMap & | states () const |
| |
| StateId | previous_state () const |
| |
| template<typename StateImpl = StateType> |
| std::shared_ptr< StateImpl > | get_state (StateId id) |
| |
|
StateId | run_state (StateId id, ContextType &ctx) |
| |
|
void | register_state (StateType *s) |
| |
|
void | register_state (std::shared_ptr< StateType > s) |
| |
|
void | register_states (std::initializer_list< StateType * > init) |
| |
| void | push_interrupt (StateId id) |
| |
|
std::optional< StateId > | pop_interrupt () |
| |
| virtual StateId | handle_interrupt (StateId nominal, StateId interrupt, ContextType &ctx)=0 |
| |
| virtual cloe::Logger | logger () const |
| |
◆ get_state()
template<typename StateType , typename ContextType >
template<typename StateImpl = StateType>
Return the class that implements the given state ID.
◆ handle_interrupt()
template<typename StateType , typename ContextType >
| virtual StateId engine::StateMachine< StateType, ContextType >::handle_interrupt |
( |
StateId |
nominal, |
|
|
StateId |
interrupt, |
|
|
ContextType & |
ctx |
|
) |
| |
|
pure virtual |
Handle an interrupt.
This method will be called between states, with the nominal state that would have occurred being passed along.
Implemented in engine::SimulationMachine.
◆ logger()
template<typename StateType , typename ContextType >
Return the logger that should be used for this state.
◆ previous_state()
template<typename StateType , typename ContextType >
Return the previous state that was run.
◆ push_interrupt()
template<typename StateType , typename ContextType >
Interrupt normal state machine traversal with the following StateId.
If one interrupt has already occurred, it is invalid for a further interrupt to occur until the previous one has been processed.
◆ states()
template<typename StateType , typename ContextType >
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/cloe/checkouts/v0.25.1/engine/src/utility/state_machine.hpp