|
Boost Users : |
Subject: [Boost-users] [MSM] Best place to execute an action with return value
From: Daniele Barzotti (daniele.barzotti_at_[hidden])
Date: 2013-11-27 04:47:14
Hi,
I'm diving into this very useful piece of code which is MSM and I'm
modelling a state machine for a gsm modem.
When I have to perform a call I need to move from the IDLE state to
WAITING_RESPONSE and, in the transaction action I have to call the
MakeCall() method on my GSM object.
This method has a return value and a non 0 value means it is failed.
In this situation the SM don't have to move on to the next state but
remains in the IDLE one, so...
Since the Actions has no return value, I have to use a Guard instead or
I have to add another state called MAKE_CALL?
Thanks in advance,
Daniele.
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