Boost logo

Boost Users :

Subject: [Boost-users] [statechart] Broadcasting events to orthogonal states
From: Vladimír Tøebický (vladimir.trebicky_at_[hidden])
Date: 2009-09-08 08:12:09


Hi all,

first of all: thanks for the great library!

I just dug into the boost::statechart tutorial trying to figure out
how to deal with the following simple scenario: Let's say I have a
complex application server represented by a single boost::state_chart
with multiple modules (eg. network, database, etc.) represented by
orthogonal spaces. I have a couple of system-wide events like "system
shutdown". Handling these eventa is generally non-trivial and I'd like
all the modules to process it independently. As I understand,
statechart tries to deliver an event across al of the orthogonal
spaces discarding it once it's processed by any of them (ie. by
"return transit", "return discard_event", etc.). But I'd like these
events to be delivered to _all_ orthogonal spaces no matter what they
do with it.

I could create a state for each of the orthogonal spaces. These
wrappers would accept the system-wide events, translate them to
local-events, post them locally and forward the system-wide event. But
that's basically like having multiple statecharts for each of the
modules and dispatching system-wide events manually.

Thanks,
Vladimir.


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