Opened 10 years ago

Closed 10 years ago

#6951 closed Patches (fixed)

Entry pseudo state and anonymous transition problem

Reported by: Takatoshi Kondo <redboltz@…> Owned by: Christophe Henry
Milestone: To Be Determined Component: msm
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc:

Description

Problem

See fig1. If the event from Entry1 to State2_1 is none, Action1 is invoked unexpectedly.

See fig2. If the event from Entry1 to State2_1 is Event1, Action1 is not invoked.

My understanding is that Boost.Msm requires the same event for transitions that to entry pseudo state and from entry pseudo state.

Consider fig3, it's impossible to place correct event from Entry1 to State3_1.

Solution

In the transition process, outer event(Event1) preserved, and in the final phase of processing transition preserved event is invoked. When the event from entry pseudo state is none, avoid preserving outer event. (fix_pseudo_entry_and_none_event.patch)

Test

I tested my patch and all existing tests. All of them passed successfully. The new test, PseudoEntry.cpp, is also included in fix_pseudo_entry_and_none_event.patch.

Attachments (4)

fig1and2.png (27.0 KB ) - added by Takatoshi Kondo <redboltz@…> 10 years ago.
multi_from.png (12.8 KB ) - added by Takatoshi Kondo <redboltz@…> 10 years ago.
fix_pseudo_entry_and_none_event.patch (15.4 KB ) - added by Takatoshi Kondo <redboltz@…> 10 years ago.
patch
fig1.cpp (2.4 KB ) - added by Takatoshi Kondo <redboltz@…> 10 years ago.
Source code corresponds to fig1.

Download all attachments as: .zip

Change History (8)

by Takatoshi Kondo <redboltz@…>, 10 years ago

Attachment: fig1and2.png added

by Takatoshi Kondo <redboltz@…>, 10 years ago

Attachment: multi_from.png added

by Takatoshi Kondo <redboltz@…>, 10 years ago

patch

by Takatoshi Kondo <redboltz@…>, 10 years ago

Attachment: fig1.cpp added

Source code corresponds to fig1.

comment:1 by Christophe Henry, 10 years ago

This should be solved by the any event feature. Ok to close?

Last edited 10 years ago by Christophe Henry (previous) (diff)

comment:2 by anonymous, 10 years ago

OK. Thanks.

comment:3 by Takatoshi Kondo <redboltz@…>, 10 years ago

OK. Thanks.

comment:4 by Christophe Henry, 10 years ago

Resolution: fixed
Status: newclosed
Version: Boost 1.49.0Boost 1.51.0

Then closed in 1.51.

Note: See TracTickets for help on using tickets.