Submachine with substates nested deeper than 2 levels generates code that...
Real-Time Event Frameworks based on active objects & state machines
Brought to you by:
quantum-leaps
The C/C++ code generated by the QM 4.0.1 does not compile if the sub-state machine contains sub-states nested deeper than 2 levels. Specifically, the sub-machine scope is not properly added to those sub-machine states. Example of generated code:
QP::QMState const MyAO::SM_PreReusable::sub_C2_c = {
&MyAO::sub_A2_s, // superstate <============== compilation error
Q_STATE_CAST(&MyAO::SM_PreReusable::sub_C2),
~ ~ ~
};
The correct code should look like that:
QP::QMState const MyAO::SM_PreReusable::sub_C2_c = {
&MyAO::SM_PreReusable::sub_A2_s, // superstate
Q_STATE_CAST(&MyAO::SM_PreReusable::sub_C2),
~ ~ ~
};
Anonymous
This bug has been fixed in QM 4.0.3.
--MMS