Boost logo

Boost :

Subject: [boost] Boost MSM parallel behavior with delayed self-transitions?
From: Danylo Malyuta (danylo.malyuta_at_[hidden])
Date: 2017-03-21 07:37:01


Hi community,

This is my first post, so I'm sorry for any mistakes in style. I have
also posted this question on StackOverflow:
http://stackoverflow.com/questions/42920777/boost-msm-parallel-behavior-with-delayed-self-transitions.

I am using Boost MSM (basic and functor front-ends) and am trying to
implement the following state machine (https://i.stack.imgur.com/K79qk.png):

enter image description here

I am using Boost MSM (basic and functor front-ends) and am trying to
implement the following state machine: enter image description here

In words:

1. Enter state State1
2. Enter state A and execute action_A. After 2 seconds, print "Trying
again..." and re-execute state A (i.e. call its entry action). This
loops forever...
3. At the same time as 2 (i.e. "in parallel"), enter state B and execute
action_B. After 5 seconds, print "Trying again..." and re-execute state
B (i.e. call its entry action). This loops forever...

I would like to know the way to create this state machine in Boost MSM.
There are two tricks here which I cannot figure out how to do:

  - Execution in parallel (i.e. running action_A does not stop running
action_B at the same time)
  - Delayed transition (i.e. the transitions which happen after 2
seconds for state A and after 5 seconds for state B). Neither delay
should be blocking! The transitions should just "fire" after this time.

Thank you very much for helping,

Danylo.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk