Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost msm
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2012-03-05 14:34:10


> Yes Precisely,
> Basically my question is how can I tell what was my active state? and how
> can I go back to it directly without having to go through the initial
> state?
> Thank yoyu

You don't need to go back to it, your state machine does not change state
until you use it (send it an event). This is called "run-to-completion" in
UML terminology. Often, people get confused because some libraries are
actually actively doing something constantly. MSM does not do anything until
you process an event. Then it moves to a next state, possibly executing some
entry/exit/transition actions and stays there until a new event is sent.
This happens entirely inside process_event. At the end of a process_event
call, MSM does nothing at all.

HTH,
Christophe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net