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::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, 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,
(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,
(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