Boost logo

Boost :

Subject: Re: [boost] [msm] orthogonal region and event consume
From: Takatoshi Kondo (redboltz_at_[hidden])
Date: 2012-05-26 02:40:26


I analyzed this problem deeply. It doesn't relate to orthogonal regions.
My understanding is that Boost.Msm requires the same event for
transitions that to entry pseudo state and from entry pseudo state.
So, in simple_entry.png(attached diagram), the transition from Entry1
requires Event1.

But this requirement is sometimes problematic. Because submachines
sometimes shouldn't know the outside information such as Event1. So, I
chose msm::front::none instead of Event1 (entry_pseudo_event.cpp).

msm::front::none event approach has two problems. One is preserving
outer event. And then the event is handled similar as the deferred
event. The other is there is no way to get the outer event in the
submachine.

I believe that the former should be fixed. But I found another solution.
See the entry_pseudo_event_template.cpp.

The event that corresponds to the transition from the entry pseudo
state is injected as a template parameter. So, submachine doesn't need
to know the Event1.
This approach solves the both above problems.

Thanks,
Takatoshi

On Fri, May 25, 2012 at 5:48 PM, Takatoshi Kondo <redboltz_at_[hidden]> wrote:
> Hello Christophe,
>
> I'm using Boost.MSM version 1.49.0. I bumped on a suspicious behavior.
> See the attached diagram and code. When Event1 occurs in State1,
> Action1 is invoked.
>
> I think the event isn't consumed correctly.
>
> If the transition from State1 to State2 connect State2 directly
> instead of Entry1, the event seems to be consumed.
>
> What do you think?
>
> Thanks,
> Takatoshi



simple_entry.png


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk