How can I implement non-blocking transition delays in Boost Statechart?
-
Do you mean async. state machine? – Igor R. Jul 07 '13 at 17:12
1 Answers
I see two ways of interpreting your question. If you want to implement an asynchronous state machine use http://www.boost.org/doc/libs/1_55_0/libs/statechart/doc/tutorial.html#AsynchronousStateMachines
Otherwise if you want to delay a transition you could implement a custom transition that always discards the event but sets a timer with an async callback which posts a different event which causes the transition to occur at a later time. Chances are you do not want to handle events during this time though. Therefore rather than discarding the event you could also transition to a WaitingToTransition state which deferrs all events except the one from the timer callback. If you do not want to call OnExit actions before the delayed transition you could add the WaitingToTransition state as a substate along with a do nothing initial sub state.
If neither of these answers meet your needs please provide more information on what you would like to do.

- 5,422
- 1
- 32
- 61