Handle multiple FSMs
I have the need to have, in parallel, several FSM that are exactly the same, but that will be in different states as they respond to a button, but that button is different for all of them.
Considering tinyfsm FSMs are not instances, what is the best way to handle this?
add a context as a container to hold the instance replace the global static pointer
Hello,
I have a need to create a vector of FSMs so that I can maintain individual states. The size of the vector is dynamic and will be defined during runtime. Any idea how I can do this??
I would want something like this std::vector<FSM> vec;
vec[0]::dispatc(event0); vec[1]::dispatch(event1);