![]() |
Embedded Template Library
1.0
|
The FSM class. More...
#include <fsm.h>
Public Member Functions | |
fsm (etl::message_router_id_t id) | |
Constructor. | |
template<typename TSize > | |
void | set_states (etl::ifsm_state **p_states, TSize size) |
Set the states for the FSM. | |
void | start (bool call_on_enter_state=true) |
void | receive (const etl::imessage &message) ETL_OVERRIDE |
Top level message handler for the FSM. | |
void | receive (imessage_router &source, etl::message_router_id_t destination_router_id, const etl::imessage &message) ETL_OVERRIDE |
Top level message handler for the FSM. | |
void | receive (etl::imessage_router &source, const etl::imessage &message) ETL_OVERRIDE |
Top level message handler for the FSM. | |
bool | accepts (etl::message_id_t) const ETL_OVERRIDE |
etl::fsm_state_id_t | get_state_id () const |
Gets the current state id. | |
ifsm_state & | get_state () |
Gets a reference to the current state interface. | |
const ifsm_state & | get_state () const |
Gets a const reference to the current state interface. | |
bool | is_started () const |
Checks if the FSM has been started. | |
void | reset (bool call_on_exit_state=false) |
ETL_DEPRECATED bool | is_null_router () const ETL_OVERRIDE |
bool | is_producer () const ETL_OVERRIDE |
bool | is_consumer () const ETL_OVERRIDE |
fsm (etl::message_router_id_t id) | |
Constructor. | |
template<typename TSize > | |
void | set_states (etl::ifsm_state **p_states, TSize size) |
Set the states for the FSM. | |
void | start (bool call_on_enter_state=true) |
Starts the FSM. Can only be called once. Subsequent calls will do nothing. More... | |
void | receive (const etl::imessage &message) ETL_OVERRIDE |
Top level message handler for the FSM. | |
void | receive (imessage_router &source, etl::message_router_id_t destination_router_id, const etl::imessage &message) ETL_OVERRIDE |
Top level message handler for the FSM. | |
void | receive (etl::imessage_router &source, const etl::imessage &message) ETL_OVERRIDE |
Top level message handler for the FSM. | |
bool | accepts (etl::message_id_t) const ETL_OVERRIDE |
Does this FSM accept the message id? Yes, it accepts everything! | |
etl::fsm_state_id_t | get_state_id () const |
Gets the current state id. | |
ifsm_state & | get_state () |
Gets a reference to the current state interface. | |
const ifsm_state & | get_state () const |
Gets a const reference to the current state interface. | |
bool | is_started () const |
Checks if the FSM has been started. | |
void | reset (bool call_on_exit_state=false) |
Reset the FSM to pre-started state. More... | |
ETL_DEPRECATED bool | is_null_router () const ETL_OVERRIDE |
bool | is_producer () const ETL_OVERRIDE |
bool | is_consumer () const ETL_OVERRIDE |
virtual bool | accepts (etl::message_id_t id) const=0 |
bool | accepts (const etl::imessage &msg) const |
virtual bool | accepts (etl::message_id_t id) const=0 |
bool | accepts (const etl::imessage &msg) const |
virtual bool | accepts (etl::message_id_t id) const=0 |
bool | accepts (const etl::imessage &msg) const |
virtual bool | accepts (etl::message_id_t id) const=0 |
bool | accepts (const etl::imessage &msg) const |
Additional Inherited Members |
The FSM class.
|
inlinevirtual |
Does this FSM accept the message id? Yes, it accepts everything!
Implements etl::imessage_router.
|
inline |
Reset the FSM to pre-started state.
call_on_exit_state | If true will call on_exit_state() for the current state. Default = false. |
|
inline |
Reset the FSM to pre-started state.
call_on_exit_state | If true will call on_exit_state() for the current state. Default = false. |
|
inline |
Starts the FSM. Can only be called once. Subsequent calls will do nothing.
call_on_enter_state | If true will call on_enter_state() for the first state. Default = true. |
|
inline |
Starts the FSM. Can only be called once. Subsequent calls will do nothing.
call_on_enter_state | If true will call on_enter_state() for the first state. Default = true. |