Boost logo

Boost Users :

Subject: Re: [Boost-users] [statechart] (custom) state queries for asynchronous state machine
From: Igor R (boost.lists_at_[hidden])
Date: 2011-01-24 10:48:14


> However, for the asynchronous case, access to the state machine is via a
> scheduler only - and I don't see how to get the information from there nor
> is there any documentation on that in the tutorial. Any hints on how to do
> this?

With async. state machine such a direct access wouldn't be thread
safe. So the only way you can retrieve its state is by means of
events. I.e. you can enqueue an event, which contains some facility
for the response - like a ptr to a message queue or a slot for
boost.signals2 and so on. When processing this event, the machine
performs the query you want and returns you the answer through the
facility you provided.


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