Thank you for your help!
I see now that it's not that that the sub-machine is a state of the main
machine, but ANY time you have an entry action performed directly from the
machine level the fsm is reported as a state and not as an fsm.
This isn't a problem since I know this is happening, but perhaps it might
be possible to change this so fsm entry actions put the fsm in the fsm
parameter slot? What is fsm equal to when an entry action is performed?
Here's some code that shows exactly what can be set where and when for
anyone else who is trying to figure this out...
#include <vector>
#include <iostream>
#include
#include
using namespace std;
using namespace boost::msm::front::euml;
namespace msm = boost::msm;
namespace MSM_A // Concrete FSM implementation
{
BOOST_MSM_EUML_DECLARE_ATTRIBUTE(int, borrowedBuffer_attribute);
BOOST_MSM_EUML_DECLARE_ATTRIBUTE(int, someother_Attribute);
BOOST_MSM_EUML_ACTION(someAction)
{
template
void operator()(Event const& event,FSM& , STATE& state)
{
std::cout<<"Doing someAction."<
void operator()(Event const& event,FSM& fsm, STATE& state)
{
std::cout<<"Doing someOtherAction."< MSM_A_player;
}
namespace MSM_B // Concrete FSM implementation
{
::MSM_A::MSM_A_player subMachine;
BOOST_MSM_EUML_DECLARE_ATTRIBUTE(int, rootFSM_attribute);
BOOST_MSM_EUML_DECLARE_ATTRIBUTE(int, rootstate_attribute);
BOOST_MSM_EUML_EVENT(someEvent)
BOOST_MSM_EUML_ACTION(rootFSM_action)
{
template
void operator()(Event const& event,FSM& , STATE& state)
{
std::cout<<"Doing rootFSM_action."<
void operator()(Event const& event,FSM& fsm , STATE& state)
{
std::cout<<"Doing another_rootFSM_action."< MSM_B_player;
}
int main()
{
std::cout<<"Making player."<