Class mt_fsm
Defined in File mt_fsm.hpp
Inheritance Relationships
Base Type
public rcppsw::patterns::fsm::base_fsm
(Class base_fsm)
Class Documentation
-
class mt_fsm : public rcppsw::patterns::fsm::base_fsm
Extends patterns::fsm::base_fsm to be threadsafe.
Public Functions
-
inline explicit mt_fsm(uint8_t max_states, uint8_t initial_state = 0)
-
~mt_fsm(void) override = default
-
virtual void init(void) override
Initialize/reset the state machine.
Protected Functions
-
virtual void external_event(uint8_t new_state, std::unique_ptr<sm::event_data> data) override
Generates an external event. The data is passed through the event chain without modification. The FSM owns the event data—states should not try to delete it.
- Parameters:
new_state – The state machine state to transition to.
data – The event data sent to the state.
-
inline explicit mt_fsm(uint8_t max_states, uint8_t initial_state = 0)