Questions tagged [boost-msm]

Boost.MetaStateMachine is a C++ library allowing you to easily and quickly define state machines of very high performance.

Boost.MetaStateMachine is a C++ library allowing you to easily and quickly define state machines of very high performance.

70 questions
156
votes
5 answers

Boost Statechart vs. Meta State Machine

Apparently boost contains two separate libraries for state machines: Statechart and Meta State Machine (MSM). The taglines give very similar descriptions: Boost.Statechart - Arbitrarily complex finite state machines can be implemented in easily…
FireAphis
  • 6,650
  • 8
  • 42
  • 63
6
votes
2 answers

boost::msm - A way to get a string representation (ie. getName) of a state?

I'm trying to use boost::msm library to create a state machine in my code. Does anyone know a way to get a string name (not int id) of a state? I am trying to get this for logging/debugging purpose. For example in no_transition function, I get the…
user1950039
  • 61
  • 1
  • 3
5
votes
1 answer

How to spread/split the implementation of a boost::msm state machine into multiple files?

I want to split the implementation of boost::msm statemachine into multiple files. I am looking for sth like: 1) One header per State 2) One header for the main state-machine (the out-most SM) But I don't know how this file should be written 3) the…
5
votes
1 answer

Boost MSM only processing internal transitions

I'm using the new Boost 1.44.0 MSM library to produce a state machine. In this state machine there are two classes of events class1 and class2. class1 events can be processed by either states S1 or S2 while class2 events can only be processed by…
PaulH
  • 7,759
  • 8
  • 66
  • 143
5
votes
1 answer

Boost.MSM: Exit orthogonal regions via a join pseudo state

I intend to use boost.msm with the concept of composite containing orthogonal regions. I want to synchronize all orthogonal regions upon exit. In other words: the state following my composite shall be activated if and only if all regions have…
Finnfalter
  • 732
  • 2
  • 7
  • 22
5
votes
1 answer

How to reduce compilation time with Boost MSM

I have root state machine with about 40 transitions (including four substate machines). All worked well, but when i start raising number of transitions compilation time is significantly increased (development of large state-machine become hell). I…
asaenko
  • 235
  • 1
  • 2
  • 11
4
votes
2 answers

Boost MSM - clearer

I want to use boost msm state machine but i am having a hard time imagining how it works. Let say we only have 2 states (s1, s2) and to go from s1 to s2 you need event e1 to be fired and to bo back you need another one e2. e1 and e2 can only be…
Kam
  • 5,878
  • 10
  • 53
  • 97
4
votes
1 answer

Hierarchical state machine with Boost MSM

Here is a question to those who have experience with Boost MSM. I have a very large state machine implemented with Boost MSM and finally today I ran out of the vector limit of 50 (there are too many events coming in to my state machine which cannot…
wrongElk
  • 91
  • 4
4
votes
0 answers

How to fire events from inside the state machine in boost::msm?

I am new to boost::msm and I cannot figure out how to fire an event from inside a state machine using the basic front end. Let's say I have two orthogonal regions: The first one has states A1 and A2 the second one has states B1 and B2 The…
Pierre Wargnier
  • 397
  • 3
  • 10
3
votes
1 answer

Starting state machine cannot handle internal transition on startup

I have the following state machine (sorry, I couldn't find how to make a smaller MRE): SM, containing MainSM, containing SubSM. SM has an internal transition table which says "ignore event Trigger". On start, the initial state of SM is MainSM, and…
Hugal31
  • 1,610
  • 1
  • 14
  • 27
3
votes
1 answer

Boost MSM compilation speedup

I am trying to reduce the compilation time of my project by using explicit template instantiation of a boost MSM state machine. However whenever I add explicit template instantiation my project wont compile. You can find an example of the problem…
slepasteur
  • 186
  • 1
  • 11
3
votes
1 answer

State ids in boost::msm

In the tutorial to boost::msm there is an example showing how we can check the current state. // Transition table for player struct transition_table : mpl::vector< // Start Event Next Action Guard …
grześ
  • 467
  • 3
  • 21
2
votes
2 answers

How to visit all states in (boost meta) state machine?

Is there a way to visit all states (not only active ones) in boost msm? E.g. all UI controls placed in states should be resized on a resize event regardless of their state is active or not. Update: Let me clarify a bit, I need some kind of iterator…
sad1raf
  • 135
  • 9
2
votes
1 answer

Best way to common behaviour in state transition

This question is about boost::msm. I want to implement some base behaviour, for all state transition. What is the best way to execute some function on any state transition? There is some default mechanism in this state machine?
Tomasz
  • 21
  • 2
2
votes
2 answers

Using boost msm state machine with more than 50 transitions

MSMs transition table uses a mpl::vector. The default maximum size is 20. You can change the size with #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #define BOOST_MPL_LIMIT_VECTOR_SIZE 50 #define BOOST_MPL_LIMIT_MAP_SIZE 50 to…
Darragh
  • 109
  • 2
  • 5
1
2 3 4 5