Class mt_fsm

Inheritance Relationships

Base Type

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&#8212;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.