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
0
votes
1 answer

Boost::msm How to initialize state_machine_def and msm::front::state with non-default constructor

I have a state machine look like this: class FsmDef : public boost::msm::front::state_machine_def { private: Args args; using State = boost::msm::front::state<>; public: FsmDef(Args args) : args{args} {} struct…
Phạm Văn Thông
  • 743
  • 2
  • 7
  • 21
0
votes
1 answer

BOOST::MSM Checking for state transitions in a guard condition

I have a generic guard condition which I would like to conditionally prevent transitions under certain circumstances. Below is a somewhat C++/Pseudocode of what I would like to do. bool operator()(Event const& evt, FSM & fsm, SourceState& src,…
Edwin
  • 797
  • 2
  • 14
  • 23
0
votes
1 answer

boost msm submachine current_state for accessing sub state

any idea how, using boost msm 1_60, I can get the current_state(s) of a submachine? Consider the following code, describing an outer state machine that allows for chosing between two different traffic lights (standard red, yellow, green one and…
gilgamash
  • 862
  • 10
  • 31
0
votes
1 answer

How do I get boost.msm to properly change state when using a signal handler to trigger events?

My (boost.msm) state machine appears to 'roll-back' when using signal handlers to trigger events. However, when I use direct calls to trigger events the state machine behaves correctly. I looked in the boost documentation and searched the web, but…
mikero
  • 134
  • 8
0
votes
1 answer

How to Pass data to the current boost meta state machine(MSM) substate

In the following example, while the current execution is still in substate1, I want to pass data to substate1 continuously and then send Event3 or Event1 based on the data. Looks like MSM supports only sending events using (process_event()), but I…
0
votes
1 answer

Coupling multiple MSM Statemachines together

My question is more an architectural question. I have multiple statemachines of the same type. Say controller_type1_sm controller1; controller_type2_sm controller2; std::array workers1; std::array workers2; Now when…
schorsch_76
  • 794
  • 5
  • 19
0
votes
1 answer

looking for examples of polymorphism in boost::msm basic state machine

I am new to c++, boost and using state machines. Does anyone know of an example of polymorphic boost::msm state machine? I tried to change a transition action to virtual in the basic example provided, but the linker says : undefined reference to…
xor007
  • 976
  • 2
  • 12
  • 21
0
votes
1 answer

periodic state machine with boost statechart

I want to implement a state machine that will periodically monitor some status data (the status of my system) and react to it. This seems to be something quite basic for a state machine (I've had this problem many times before), but I could not find…
brice rebsamen
  • 664
  • 6
  • 11
0
votes
1 answer

With boost::msm eUML, if I give attributes_ << to the state machine or state, how do I (re)set them?

If I add attributes to an event, I know I can then use the event name like a function... BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(*someEvent*, *someAttributeList*) someStateMachine.process_event( someEvent ( valueOfSomeAttribute1, // sets the…
cwm9
  • 763
  • 5
  • 15
-1
votes
1 answer

boost MSM how to define transition between two sub-states?

I'm using the Boost 1.64.0 MSM library to produce a hierarchical state machine. For test the transition mechanism, I implement a state machine like this +------------------------------------------------+ | S …
szh
  • 41
  • 2
1 2 3 4
5