Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
fsm Class Reference
The FSM class. More...
#include <fsm.h>
Inherits etl::imessage_router, and etl::imessage_router.
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 () |
Starts the FSM. | |
void | receive (const etl::imessage &message) |
Top level message handler for the FSM. | |
void | receive (etl::imessage_router &source, const etl::imessage &message) |
Top level message handler for the FSM. | |
bool | accepts (etl::message_id_t id) const |
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 () |
Reset the FSM to pre-started state. | |
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 () |
Starts the FSM. | |
void | receive (const etl::imessage &message) |
Top level message handler for the FSM. | |
void | receive (etl::imessage_router &source, const etl::imessage &message) |
Top level message handler for the FSM. | |
bool | accepts (etl::message_id_t id) const |
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 () |
Reset the FSM to pre-started state. |
Detailed Description
The FSM class.
Definition at line 201 of file fsm.h.
Constructor & Destructor Documentation
fsm | ( | etl::message_router_id_t | id ) |
Constructor.
Definition at line 220 of file fsm_generator.h.
Member Function Documentation
bool accepts | ( | etl::message_id_t | id ) | const |
bool accepts | ( | etl::message_id_t | id ) | const |
Does this FSM accept the message id? Yes, it accepts everything!
Definition at line 303 of file fsm_generator.h.
ifsm_state& get_state | ( | ) |
Gets a reference to the current state interface.
Definition at line 320 of file fsm_generator.h.
const ifsm_state& get_state | ( | ) | const |
Gets a const reference to the current state interface.
Definition at line 329 of file fsm_generator.h.
const ifsm_state& get_state | ( | ) | const |
ifsm_state& get_state | ( | ) |
etl::fsm_state_id_t get_state_id | ( | ) | const |
Gets the current state id.
Definition at line 311 of file fsm_generator.h.
etl::fsm_state_id_t get_state_id | ( | ) | const |
bool is_started | ( | ) | const |
Checks if the FSM has been started.
Definition at line 338 of file fsm_generator.h.
void receive | ( | etl::imessage_router & | source, |
const etl::imessage & | message | ||
) |
void receive | ( | const etl::imessage & | message ) |
Top level message handler for the FSM.
Definition at line 264 of file fsm_generator.h.
void receive | ( | const etl::imessage & | message ) |
void receive | ( | etl::imessage_router & | source, |
const etl::imessage & | message | ||
) |
Top level message handler for the FSM.
Definition at line 273 of file fsm_generator.h.
void reset | ( | ) |
Reset the FSM to pre-started state.
Definition at line 346 of file fsm_generator.h.
void set_states | ( | etl::ifsm_state ** | p_states, |
TSize | size | ||
) |
void set_states | ( | etl::ifsm_state ** | p_states, |
TSize | size | ||
) |
Set the states for the FSM.
Definition at line 230 of file fsm_generator.h.
void start | ( | ) |
void start | ( | ) |
Starts the FSM.
Can only be called once. Subsequent calls will do nothing.
Definition at line 249 of file fsm_generator.h.
Generated on Tue Jul 12 2022 14:05:50 by
