Boost logo

Boost Users :

Subject: [Boost-users] How do you handle state-independent events efficiently in MSM?
From: Peter Gissel (pgissel_at_[hidden])
Date: 2011-08-29 21:18:31


I have a state machine that has a large number of event types but only a few
different states. Some of the events can be received regardless of the state
and the same action is taken regardless of which state the machine is in, so
the event is really unrelated to the state. I there an efficient way of
handling the events that are state independent rather than defining a
transition from every possible state for each state independent event?

 

A number of the events do transition the state machine and depend on the
current state, so a transition is necessary. But if no state change is
required for the event and the current state is not important, I'm not sure
how to define event handling without defining a transition from all possible
states. This winds up creating a much larger number of transitions than I
really need, and a much longer compile time than I would like. I am looking
for some way to handle these states that would still give me good run time
speed, put not pay the penalty that defining a large number of transitions
would impose.

 

Thanks!

 

Peter Gissel

 



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net