vulp
2.3.0
|
#include <StateMachine.h>
Public Member Functions | |
StateMachine (AgentInterface &interface) noexcept | |
Initialize state machine. More... | |
void | process_event (const Event &event) noexcept |
Process a new event. More... | |
const State & | state () const noexcept |
Get current state. More... | |
bool | is_over_after_this_cycle () const noexcept |
Whether we transition to the terminal state at the next end-cycle event. More... | |
Spine state machine.
The overall specification of the state machine is summarized in the following diagram:
States have the following purposes:
There are three possible events:
begin
: beginning of a control cycle,end
: end of a control cycle.SIGINT
: the process received an interrupt signal.Guards, indicated between brackets, may involve two variables:
req
: the current request from the agent.stop_cycles
: the number of stop commands cycled in the current state (only available in "stop" and "shutdown" states). Definition at line 88 of file StateMachine.h.
|
explicitnoexcept |
Initialize state machine.
[in] | interface | Interface to communicate with the agent. |
Definition at line 12 of file StateMachine.cpp.
|
inlinenoexcept |
Whether we transition to the terminal state at the next end-cycle event.
Definition at line 106 of file StateMachine.h.
|
noexcept |
|
inlinenoexcept |
Get current state.
Definition at line 103 of file StateMachine.h.