Define RCPPSW_FSM_DECLARE_STATE_MAP

Define Documentation

RCPPSW_FSM_DECLARE_STATE_MAP(type, name, n_entries)

Declare a state map for an FSM. Note that even for simple_fsm state machines with identical state maps across all class instances, you CANNOT use static state maps, because state maps contain states, and states use MEMBER function pointers, which are necessarily tied to the enclosing object. Using static state maps leads to all instances of a class sharing the member function pointers of the first instance of the class constructed, and if that object is ever destructed, segfaults will (probably) ensue.

type must be either “state_map” or “state_map_ex”, corresponding to which type of states the state machine is comprised of. name can be anything.