Menu

#191 Add QS local filtering to QF_PUBLISH()

QP-C-C++
closed
None
1
2021-04-21
2021-04-08
No

Currently, publishing of events (QF_PUBLISH() in C and QF::PUBLISH() in C++) don't offer any possibility of applying QS local filter.

This feature request is about adding a possibility to selectively suppress specific publish calls by means of applying the QS local filter. See also discussion thread:

https://sourceforge.net/p/qpc/discussion/668726/thread/39140268ac

Discussion

  • Quantum Leaps

    Quantum Leaps - 2021-04-08

    The current design idea for this feature would be to introduce a special type QSpyId for objects used only as "sender" in the QF_PUBLISH(). Here is a use case for this:

    #ifdef Q_SPY
        . . .
        static QSpyId const l_clock_tick = { QS_AP_ID + 5 };
    #endif
    
    void QF_onClockTick(void) {
        . . .
        QF_PUBLISH(Q_NEW(QEvt, PAUSE_SIG), &l_clock_tick);
        . . .
    }
    

    This would allow you to use the QS local filter (QS_AP_ID + 5 in this case) for enabling/disabling the particular QF_PUBLISH(..., &l_clock_tick).

    For publishing events from active objects, such as:

    QF_PUBLISH(..., &me->super);
    this would work as expected, meaning that the QS-filter would be applied to the priority of the active object "me". I hope that this would address your problem.

    --MMS

     
  • Quantum Leaps

    Quantum Leaps - 2021-04-21

    Implemented in QP/C/C++ 6.9.3.
    --MMS

     

Anonymous
Anonymous

Add attachments
Cancel