Menu

#100 QM 3.1.3 multiple sigs on one transition no longer generates compileable code

QM3
closed
nobody
None
1
2018-05-04
2014-06-03
catonyx
No

We are evaluating 3.1.3 of the QM tool for CPP. The code generated is not working anymore for transitions with multiple signals on them. For the case in hand, it has about 10 signals with 15 to 20 character in each name. These are separated by space and commas [LONGISH_NAME, NEXT_LONGISH_NAME, etc.]
The generated code is now wrong with the comments getting in the way of the switch cases. Hopefully, you can recreate this the same as us.

We noticed two things: In short lists of two signals, this works fine. And if you remove all the spaces in the long list (and leave the commas), this also works but this is really ugly on the screen in the state machine.

So, we will not be using this version and wait for a hopeful fix in the next version.

This is not a problem in QM 3.0.1.

Discussion

  • Quantum Leaps

    Quantum Leaps - 2014-06-03

    I can't reproduce the problem. The comma-separated lists of triggers generate correct code that compiles. The difference from QM 3.0.1 is that the model-reference-comments now are longer, because the whole list of triggers is included in the comment. This will be corrected in the next QM release to abbreviate the longer lists, but the code is correct.

    Perhaps you could attach an example of a model that generates incorrect code. This would be very helpful.

    --MMS

     
  • catonyx

    catonyx - 2014-06-10

    Yes, that is it. So what happens is that the "new" generated comments are not correctly commented out and cause compile issues. The defines in red below should be in comments.

    //${package1::Class1} ........................................................
    //${package1::Class1::SM} ....................................................
    //${package1::Class1::SM::state1} ............................................
    QP::QState Class1::state1(Class1 * const me, QP::QEvt const * const e) {
        QP::QState status_;
        switch (e->sig) {
            // ${package1::Class1::SM::state1::ABCDEFGH_NT_JFKFJAJF,ABCDEFGH_NT_OXXX_IJKAFJDKE_DXXYYZ,ABCDEFGH_NT_OXXX_IMSADFATE,
    ABCDEFGH_NT_OXXX_LPP_DXXYYZ,
    ABCDEFGH_NT_OXXX_LPP,
    ABCDEFGH_NT_OXXX_CPP_DXXYYZ, ABCDEFGH_NT_OXXX_CPP_DXXYYZ_GI,
    ABCDEFGH_NT_OXXX_CPP}
            case ABCDEFGH_NT_JFKFJAJF_SIG: /* intentionally fall through */
            case ABCDEFGH_NT_OXXX_IJKAFJDKE_DXXYYZ_SIG: /* intentionally fall through */
            case ABCDEFGH_NT_OXXX_IMSADFATE_SIG: /* intentionally fall through */
            case ABCDEFGH_NT_OXXX_LPP_DXXYYZ_SIG: /* intentionally fall through */
            case ABCDEFGH_NT_OXXX_LPP_SIG: /* intentionally fall through */
            case ABCDEFGH_NT_OXXX_CPP_DXXYYZ_SIG: /* intentionally fall through */
            case ABCDEFGH_NT_OXXX_CPP_DXXYYZ_GI_SIG: /* intentionally fall through */
            case ABCDEFGH_NT_OXXX_CPP_SIG: {
    

    I attached the model.

     
  • Quantum Leaps

    Quantum Leaps - 2014-10-20
    • status: open --> closed
     
  • Quantum Leaps

    Quantum Leaps - 2014-10-20

    Fixed in QM 3.2.2.
    --MMS

     

Anonymous
Anonymous

Add attachments
Cancel