|
Boost Users : |
Subject: [Boost-users] [statechart] Is it possible to have nested (sub)states in an asynchronous state machine?
From: Gurcan Gulesir (gurcan.gulesir_at_[hidden])
Date: 2011-06-08 10:28:19
Hi,
I am trying to implement an asynchronous state machine whose states contain
substates. Since my compilation errors seem to be related to the statechart
library (instead of directly to the code I wrote myself), I started to
suspect that the statechart library does not support the nesting of states
in an asynchronous state machine. Am I right or am I missing something?
Upon trying any combination of boost::statechart::state and
boost::statechart::simple_state as the super class of the top-level states
and sub states, the typical compilation errors I received are like the
following:
'deep_construct' is not a member of
'boost::statechart::simple_state<MostDerived, Context, InnerInitial,
historyMode>::deep_construct_inner_impl_non_empty::deep_construct_inner_impl
(const boost::intrusive_ptr<T>&, typename
Context::inner_context_type::outermost_context_base_type&) [with InnerList =
boost::mpl::list<robot::RobotSM::SCOUTING, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na>, MostDerived = robot::RobotSM::CONNECTED_WITH_OPERATOR,
Context = robot::RobotSM::RobotSM, InnerInitial = robot::RobotSM::SCOUTING,
boost::statechart::history_mode historyMode =
(boost::statechart::history_mode)0u]::current_inner' RobotBehavior
line 894, external location: /usr/include/boost/statechart/simple_state.hpp
C/C++ Problem
'class boost::statechart::simple_state<robot::RobotSM::SAFE_TO_MOVE,
robot::RobotSM::CONNECTED_WITH_OPERATOR, boost::mpl::list<mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
(boost::statechart::history_mode)0u>' has no member named 'deferred_events'
RobotBehavior line 360, external location:
/usr/include/boost/statechart/simple_state.hpp C/C++ Problem
'class boost::statechart::state<robot::RobotSM::SAFE_TO_MOVE,
robot::RobotSM::CONNECTED_WITH_OPERATOR, boost::mpl::list<mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
(boost::statechart::history_mode)0u>' has no member named 'set_context'
RobotBehavior line 50, external location:
/usr/include/boost/statechart/state.hpp C/C++ Problem
If nested states are intentionally not supported in current
Boost.Statechart, is there a fundamental reason for this restriction? Or is
it just not yet implemented as a feature of asynchronous state machines?
Many thanks for your response, in advance.
Best regards,
Gurcan
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