PDA

View Full Version : Parallel states question



zephod
25th November 2014, 17:11
I created a state machine that has an initial state that transitions into a group state. Inside the group state, I have 2 parallel states. One of these parallel states has a transition to itself. The other has no transitions other than the entry.

When I send a signal to make the 1st paralllel state transition to itself, I notice that the second parallel state also transitions to itself even though no transition is defined.

How do I stop this? Is it possible?

I have attached my test code: main.cpp, stateMachine.h, statemachine.cpp and here is the output:

$ ./stateMachineTest
enteringInit
emitting evUSBConnection
leavingInit
entering the waiting state
entering the waitingForMsg state.
enteringWaitingForCmd
timer fired: generating evMsg
leavingWaitingForCmd
leaving the waitingForMsg state
enteringWaitingForCmd
entering the waitingForMsg state.
count = 2 - quitting
leavingWaitingForCmd
leaving the waitingForMsg state
leaving the waiting state
entering the finished state

zephod
2nd December 2014, 14:08
Anybody? .