Boost statechart, communication between separate FSMs

444 Views Asked by At

let's say I have created several separate FSM classes inheriting from statechart. Then, I instantiate those objects, and I would like them to be able to trigger events in each other; for example the first FSM would enter a "ON" state and would trigger an event in the second FSM (like process_event(EvSomething()) ).

What would be the best method to do that?

Thank you very much,

Fabrizio

1

There are 1 best solutions below

2
On

The main motivation for Asynchronous State Machines is exactly the scenario you describe. So, I would suggest you convert your machines into asynchronous ones. See here for an example.