Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8594725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:15:53+00:00 2026-06-12T00:15:53+00:00

I am having problems with my transition table and events. Let me explain the

  • 0

I am having problems with my transition table and events.
Let me explain the fake design that illustrates the problem:

I have a state machine (myStateMachine) containing 2 states (s0 and s1) and 1 substatemachine (subm1).

the substatemachine subm1 contains an initial state ‘sub0’ and also s1 (the same state as in myStateMachine).

this is the main transition table:

s0->s1 on event ‘ES1’

s0->s2 on event ‘ES2’

s0->subm1 on event ‘ESUB’

this is the submachine transition table:

sub0->s1 on event ‘ES1’

now, assume that state s1 is using the event that triggered it to extract some information i.e.

struct s1 : public msm::front::state<>
{
   template <class Event,class FSM>
   void on_entry(Event const& evt,FSM& fsm)
   { 
      evt.getEventData();
   }
}

so every event that could transition to s1 needs to implement getEventData() method.

->this is normal!

now my problem is that ESUB does NOT implement getEventData() but apparently it should (compiler gives errors). And I don’t get why.

I am not using ESUB to transition to s1 but I am using ESUB to transition to subm1 and subm1 contains s1 but I don’t access it at that point.

I hope this is clear.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:15:55+00:00Added an answer on June 12, 2026 at 12:15 am

    I HAVE RECEIVED AN ANSWER FROM THE DESIGNER OF BOOST MSM Christophe Henry:

    “Hi,

    this is an unfortunate limitation of msm (for composites), which I have on
    my list of stuff to solve asap. The problem is that though the event esub is
    not used to transition to s1, for the compiler it could. Whatever, it’s my
    fault, plus I forgot it in the doc 🙁

    The solution is to help the compiler a bit by enabling on_entry with
    evt.getEventData() only for events having a special property, like your es1.
    For example:

    BOOST_MPL_HAS_XXX_TRAIT_DEF(get_event_data) 
    
    // this event supports getEventData 
    struct es1 
    { 
       typedef int get_event_data; 
       void getEventData(){...} 
     }; 
    

    Then use this in your state:

     struct s1 : public msm::front::state<> 
     { 
       template <class Event,class FSM> 
       typename boost::enable_if<typename 
       has_get_event_data<Event>::type,void>::type 
       on_entry(Event const& evt,FSM& fsm) 
       { 
          evt.getEventData(); 
       } 
       // for events not supporting getEventData like esub 
       template <class Event,class FSM> 
       typename boost::disable_if<typename 
       has_get_event_data<Event>::type,void>::type 
       on_entry(Event const& ,FSM& ) 
       {    } 
       }; 
    

    “

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im having problems starting a codeigniter project, the problem is that when i do
Let we have a table of payments having 35 columns with a primary key
I'm having problems with the MonoTouch/iOS translation feature. I have English and German translation
Having problems iterating. Problem has to do with const correctness, I think. I assume
Im having problems with classpaths. I have used them before with import but I'm
We are having a serious problem with a query that defies explanation. In SQL-plus
I'm having problems doing the Database example from PhoneGap. http://docs.phonegap.com/phonegap_storage_storage.md.html#openDatabase The Problem is, when
I'm having a problem while trying to dynamically change a table cell's styling class
I am having a querying issue in Hibernate. I have a table, 'test', with
I have to write a script to update a database but im having problems

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.