Boost logo

Boost Users :

Subject: Re: [Boost-users] [MSM] a timer/timeout for the whole state machine (including submachines)
From: Albert Gil Moreno (albert.gil_at_[hidden])
Date: 2012-04-09 08:13:01


Thanks a lot Christophe!

I've tried the pseudo-exit solution you've proposed and it worked as
you explain, thanks!
But, I'm still a bit confused...

In your first answer you said:

> If the submachine doesn't handle the event, the upper one could, so it gets a chance to do it, etc. until the top-level fsm. If no fsm including the top-level fsm brings a no_transition, then it's a bug.

If I'm not wrong, now the no_transition is executed by the submachine
(the 77840 fix), but the upper state machine still doesn't have the
change to handle the event.
Is that right?

I'm not sure if this is the expected behaviour or not...

In your first answer I've understood that the "upper-forwarding of
events" was the correct behaviour (UML-conforming?), but after your
fix I understand that events are not upper-forwarded:

> If you want to move to ErrorMode in the outer you will need either the ugly pointer
> solution, or UML-conform, a pseudo exit.

I've tried the pseudo-exit scheme in my Timer/TimeOut, but just to
"emulate" the upper-forwarding of my TimerReset event.
(I do not want to exit from my submachine, just an event to be
upper-forwarded to the parent state machine)
But I get an unexpected exception...
I've returned to te ugly-pointer solution because in fact it seems to
me a closer implementation to the upper-forwarding idea...

But, in fact, I don't really need "access" to the parent state-machine
(nor the ugly-pointer ;-), but just that the events generated in the
submachine's actions (but not present the submachine's table) to be
sent/upper-forwarding to the outer state machine.
Is this the expected behaviour or not?

Thanks a lot for your (fast and great) work!

Albert


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