From c2347e81c96000ab30140dfb6236898765aa0797 Mon Sep 17 00:00:00 2001 From: MMS Date: Mon, 11 Dec 2023 20:31:00 -0500 Subject: [PATCH] 7.3.1 --- examples/qutest/qhsmtst/src/qhsmtst.c | 34 ++++++++++++++ examples/qutest/qhsmtst/src/qhsmtst.h | 9 ++-- examples/qutest/qhsmtst/src/qhsmtst.qm | 43 +++++++++++++++-- .../qutest/qhsmtst/test/test_qhsm-funct.py | 11 +++++ examples/qutest/qhsmtst/test/test_qhsm.c | 20 ++++++-- examples/qutest/qmsmtst/src/qmsmtst.c | 34 ++++++++++++++ examples/qutest/qmsmtst/src/qmsmtst.h | 9 ++-- examples/qutest/qmsmtst/src/qmsmtst.qm | 43 +++++++++++++++-- .../qutest/qmsmtst/test/test_qmsm-funct.py | 11 +++++ examples/qutest/qmsmtst/test/test_qmsm.c | 20 ++++++-- .../qutest/self_test/test/test_command.py | 2 +- qpc.qm | 46 ++++++++++++------- src/qf/qep_hsm.c | 22 +++++---- src/qf/qep_msm.c | 22 ++++++--- src/qf/qf_time.c | 2 +- 15 files changed, 271 insertions(+), 57 deletions(-) diff --git a/examples/qutest/qhsmtst/src/qhsmtst.c b/examples/qutest/qhsmtst/src/qhsmtst.c index f4c513ce..071f6937 100644 --- a/examples/qutest/qhsmtst/src/qhsmtst.c +++ b/examples/qutest/qhsmtst/src/qhsmtst.c @@ -31,6 +31,8 @@ #include "qpc.h" // QP/C framework #include "qhsmtst.h" // this application +Q_DEFINE_THIS_FILE + //$declare${SMs::QHsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv //${SMs::QHsmTst} ............................................................ @@ -43,6 +45,7 @@ typedef struct QHsmTst { // public: } QHsmTst; + extern QHsmTst QHsmTst_inst; // protected: @@ -74,6 +77,37 @@ void QHsmTst_ctor(void) { QHsm_ctor(&me->super, Q_STATE_CAST(&QHsmTst_initial)); } //$enddef${Shared::QHsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +//$define${Shared::QHsmTst_isIn} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv + +//${Shared::QHsmTst_isIn} .................................................... +bool QHsmTst_isIn(uint32_t const state_num) { + QHsm * const me = &QHsmTst_inst.super; + bool stat = false; + switch (state_num) { + case 0: + stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s)); + break; + case 1: + stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s1)); + break; + case 11: + stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s11)); + break; + case 2: + stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s2)); + break; + case 21: + stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s21)); + break; + case 211: + stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s211)); + break; + default: + Q_ERROR(); + } + return stat; +} +//$enddef${Shared::QHsmTst_isIn} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //$define${SMs::QHsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv //${SMs::QHsmTst} ............................................................ diff --git a/examples/qutest/qhsmtst/src/qhsmtst.h b/examples/qutest/qhsmtst/src/qhsmtst.h index 68f96e40..f10c7642 100644 --- a/examples/qutest/qhsmtst/src/qhsmtst.h +++ b/examples/qutest/qhsmtst/src/qhsmtst.h @@ -52,14 +52,17 @@ enum QHsmTstSignals { //${Shared::the_sm} .......................................................... extern QAsm * const the_sm; -//${Shared::QHsmTst_ctor} .................................................... -void QHsmTst_ctor(void); - //${Shared::BSP_display} ..................................................... void BSP_display(char const * msg); //${Shared::BSP_terminate} ................................................... void BSP_terminate(int16_t const result); + +//${Shared::QHsmTst_ctor} .................................................... +void QHsmTst_ctor(void); + +//${Shared::QHsmTst_isIn} .................................................... +bool QHsmTst_isIn(uint32_t const state_num); //$enddecl${Shared} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ #endif // QHSMTST_H_ diff --git a/examples/qutest/qhsmtst/src/qhsmtst.qm b/examples/qutest/qhsmtst/src/qhsmtst.qm index 3b6dee0d..944c2fc2 100644 --- a/examples/qutest/qhsmtst/src/qhsmtst.qm +++ b/examples/qutest/qhsmtst/src/qhsmtst.qm @@ -27,11 +27,6 @@ opaque pointer to the test SM = &QHsmTst_inst.super.super; - - - QHsmTst *me = &QHsmTst_inst; -QHsm_ctor(&me->super, Q_STATE_CAST(&QHsmTst_initial)); - @@ -42,6 +37,41 @@ QHsm_ctor(&me->super, Q_STATE_CAST(&QHsmTst_initial)); + + + QHsmTst *me = &QHsmTst_inst; +QHsm_ctor(&me->super, Q_STATE_CAST(&QHsmTst_initial)); + + + + + + QHsm * const me = &QHsmTst_inst.super; +bool stat = false; +switch (state_num) { +case 0: + stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s)); + break; +case 1: + stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s1)); + break; +case 11: + stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s11)); + break; +case 2: + stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s2)); + break; +case 21: + stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s21)); + break; +case 211: + stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s211)); + break; +default: + Q_ERROR(); +} +return stat; + @@ -349,9 +379,12 @@ $declare ${Shared} #include "qpc.h" // QP/C framework #include "qhsmtst.h" // this application +Q_DEFINE_THIS_FILE + $declare ${SMs::QHsmTst} $define ${Shared::the_sm} $define ${Shared::QHsmTst_ctor} +$define ${Shared::QHsmTst_isIn} $define ${SMs::QHsmTst} diff --git a/examples/qutest/qhsmtst/test/test_qhsm-funct.py b/examples/qutest/qhsmtst/test/test_qhsm-funct.py index c36dddfc..63338fd9 100644 --- a/examples/qutest/qhsmtst/test/test_qhsm-funct.py +++ b/examples/qutest/qhsmtst/test/test_qhsm-funct.py @@ -18,6 +18,17 @@ expect("@timestamp BSP_DISPLAY s21-ENTRY;") expect("@timestamp BSP_DISPLAY s211-ENTRY;") expect("@timestamp Trg-Done QS_RX_EVENT") +test("QHsmTst isIn", NORESET) +command(1, 1) +expect("@timestamp CMD 0 1"); +expect("@timestamp Trg-Done QS_RX_COMMAND") +command(1, 21) +expect("@timestamp CMD 1 21"); +expect("@timestamp Trg-Done QS_RX_COMMAND") +command(1, 211) +expect("@timestamp CMD 1 211"); +expect("@timestamp Trg-Done QS_RX_COMMAND") + test("QHsmTst dispatch", NORESET) dispatch("A_SIG") expect("@timestamp BSP_DISPLAY s21-A;") diff --git a/examples/qutest/qhsmtst/test/test_qhsm.c b/examples/qutest/qhsmtst/test/test_qhsm.c index 290bb011..f83b2135 100644 --- a/examples/qutest/qhsmtst/test/test_qhsm.c +++ b/examples/qutest/qhsmtst/test/test_qhsm.c @@ -1,7 +1,7 @@ //============================================================================ // Purpose: Fixture for QUTEST -// Last Updated for Version: 7.3.0 -// Date of the Last Update: 2023-08-25 +// Last Updated for Version: 7.3.1 +// Date of the Last Update: 2023-12-11 // // Q u a n t u m L e a P s // ------------------------ @@ -38,6 +38,7 @@ Q_DEFINE_THIS_FILE enum { BSP_DISPLAY = QS_USER, + CMD, }; //---------------------------------------------------------------------------- @@ -56,6 +57,7 @@ int main(int argc, char *argv[]) { // dictionaries... QS_OBJ_DICTIONARY(the_sm); QS_USR_DICTIONARY(BSP_DISPLAY); + QS_USR_DICTIONARY(CMD); QHsmTst_ctor(); // instantiate the QHsmTst object @@ -89,8 +91,18 @@ void QS_onCommand(uint8_t cmdId, //PRINTF_S(" Command id=%d param=%d\n", (int)cmdId, (int)param); switch (cmdId) { - case 0U: { - break; + case 0U: { + QS_BEGIN_ID(CMD, 0U) // app-specific record + QS_END() + break; + } + case 1U: { + bool ret = QHsmTst_isIn(param1); + QS_BEGIN_ID(CMD, 0U) // app-specific record + QS_U8(0U, ret ? 1 : 0); + QS_U8(0U, (uint8_t)param1); + QS_END() + break; } default: break; diff --git a/examples/qutest/qmsmtst/src/qmsmtst.c b/examples/qutest/qmsmtst/src/qmsmtst.c index e9daa9b5..1b4a13c3 100644 --- a/examples/qutest/qmsmtst/src/qmsmtst.c +++ b/examples/qutest/qmsmtst/src/qmsmtst.c @@ -31,6 +31,8 @@ #include "qpc.h" // QP/C framework #include "qmsmtst.h" // this application +Q_DEFINE_THIS_FILE + //$declare${SMs::QMsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv //${SMs::QMsmTst} ............................................................ @@ -43,6 +45,7 @@ typedef struct QMsmTst { // public: } QMsmTst; + extern QMsmTst QMsmTst_inst; // protected: @@ -132,6 +135,37 @@ void QMsmTst_ctor(void) { QMsm_ctor(&me->super, Q_STATE_CAST(&QMsmTst_initial)); } //$enddef${Shared::QMsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +//$define${Shared::QMsmTst_isInState} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv + +//${Shared::QMsmTst_isInState} ............................................... +bool QMsmTst_isInState(uint32_t const state_num) { + QMsm * const me = &QMsmTst_inst.super; + bool stat = false; + switch (state_num) { + case 0: + stat = QMsm_isInState(me, &QMsmTst_s_s); + break; + case 1: + stat = QMsm_isInState(me, &QMsmTst_s1_s); + break; + case 11: + stat = QMsm_isInState(me, &QMsmTst_s11_s); + break; + case 2: + stat = QMsm_isInState(me, &QMsmTst_s2_s); + break; + case 21: + stat = QMsm_isInState(me, &QMsmTst_s21_s); + break; + case 211: + stat = QMsm_isInState(me, &QMsmTst_s211_s); + break; + default: + Q_ERROR(); + } + return stat; +} +//$enddef${Shared::QMsmTst_isInState} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //$define${SMs::QMsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv //${SMs::QMsmTst} ............................................................ diff --git a/examples/qutest/qmsmtst/src/qmsmtst.h b/examples/qutest/qmsmtst/src/qmsmtst.h index 74f6b27b..7a2c6378 100644 --- a/examples/qutest/qmsmtst/src/qmsmtst.h +++ b/examples/qutest/qmsmtst/src/qmsmtst.h @@ -52,14 +52,17 @@ enum QMsmTstSignals { //${Shared::the_sm} .......................................................... extern QAsm * const the_sm; -//${Shared::QMsmTst_ctor} .................................................... -void QMsmTst_ctor(void); - //${Shared::BSP_display} ..................................................... void BSP_display(char const * msg); //${Shared::BSP_terminate} ................................................... void BSP_terminate(int16_t const result); + +//${Shared::QMsmTst_ctor} .................................................... +void QMsmTst_ctor(void); + +//${Shared::QMsmTst_isInState} ............................................... +bool QMsmTst_isInState(uint32_t const state_num); //$enddecl${Shared} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ #endif // QMSMTST_H_ diff --git a/examples/qutest/qmsmtst/src/qmsmtst.qm b/examples/qutest/qmsmtst/src/qmsmtst.qm index 8a4eb465..966d901e 100644 --- a/examples/qutest/qmsmtst/src/qmsmtst.qm +++ b/examples/qutest/qmsmtst/src/qmsmtst.qm @@ -27,11 +27,6 @@ opaque pointer to the test SM = &QMsmTst_inst.super.super; - - - QMsmTst *me = &QMsmTst_inst; -QMsm_ctor(&me->super, Q_STATE_CAST(&QMsmTst_initial)); - @@ -42,6 +37,41 @@ QMsm_ctor(&me->super, Q_STATE_CAST(&QMsmTst_initial)); + + + QMsmTst *me = &QMsmTst_inst; +QMsm_ctor(&me->super, Q_STATE_CAST(&QMsmTst_initial)); + + + + + + QMsm * const me = &QMsmTst_inst.super; +bool stat = false; +switch (state_num) { +case 0: + stat = QMsm_isInState(me, &QMsmTst_s_s); + break; +case 1: + stat = QMsm_isInState(me, &QMsmTst_s1_s); + break; +case 11: + stat = QMsm_isInState(me, &QMsmTst_s11_s); + break; +case 2: + stat = QMsm_isInState(me, &QMsmTst_s2_s); + break; +case 21: + stat = QMsm_isInState(me, &QMsmTst_s21_s); + break; +case 211: + stat = QMsm_isInState(me, &QMsmTst_s211_s); + break; +default: + Q_ERROR(); +} +return stat; + @@ -349,9 +379,12 @@ $declare ${Shared} #include "qpc.h" // QP/C framework #include "qmsmtst.h" // this application +Q_DEFINE_THIS_FILE + $declare ${SMs::QMsmTst} $define ${Shared::the_sm} $define ${Shared::QMsmTst_ctor} +$define ${Shared::QMsmTst_isInState} $define ${SMs::QMsmTst} diff --git a/examples/qutest/qmsmtst/test/test_qmsm-funct.py b/examples/qutest/qmsmtst/test/test_qmsm-funct.py index 0d682436..f5311ae0 100644 --- a/examples/qutest/qmsmtst/test/test_qmsm-funct.py +++ b/examples/qutest/qmsmtst/test/test_qmsm-funct.py @@ -18,6 +18,17 @@ expect("@timestamp BSP_DISPLAY s21-ENTRY;") expect("@timestamp BSP_DISPLAY s211-ENTRY;") expect("@timestamp Trg-Done QS_RX_EVENT") +test("QMsmTst isInState", NORESET) +command(1, 1) +expect("@timestamp CMD 0 1"); +expect("@timestamp Trg-Done QS_RX_COMMAND") +command(1, 21) +expect("@timestamp CMD 1 21"); +expect("@timestamp Trg-Done QS_RX_COMMAND") +command(1, 211) +expect("@timestamp CMD 1 211"); +expect("@timestamp Trg-Done QS_RX_COMMAND") + test("QMsmTst dispatch", NORESET) dispatch("A_SIG") expect("@timestamp BSP_DISPLAY s21-A;") diff --git a/examples/qutest/qmsmtst/test/test_qmsm.c b/examples/qutest/qmsmtst/test/test_qmsm.c index 48126093..ed07feb0 100644 --- a/examples/qutest/qmsmtst/test/test_qmsm.c +++ b/examples/qutest/qmsmtst/test/test_qmsm.c @@ -1,7 +1,7 @@ //============================================================================ // Purpose: Fixture for QUTEST -// Last Updated for Version: 7.3.0 -// Date of the Last Update: 2023-08-25 +// Last Updated for Version: 7.3.1 +// Date of the Last Update: 2023-12-11 // // Q u a n t u m L e a P s // ------------------------ @@ -38,6 +38,7 @@ Q_DEFINE_THIS_FILE enum { BSP_DISPLAY = QS_USER, + CMD, }; //---------------------------------------------------------------------------- @@ -56,6 +57,7 @@ int main(int argc, char *argv[]) { // dictionaries... QS_OBJ_DICTIONARY(the_sm); QS_USR_DICTIONARY(BSP_DISPLAY); + QS_USR_DICTIONARY(CMD); QMsmTst_ctor(); // instantiate the QMsmTst object @@ -89,8 +91,18 @@ void QS_onCommand(uint8_t cmdId, //PRINTF_S(" Command id=%d param=%d\n", (int)cmdId, (int)param); switch (cmdId) { - case 0U: { - break; + case 0U: { + QS_BEGIN_ID(CMD, 0U) // app-specific record + QS_END() + break; + } + case 1U: { + bool ret = QMsmTst_isInState(param1); + QS_BEGIN_ID(CMD, 0U) // app-specific record + QS_U8(0U, ret ? 1 : 0); + QS_U8(0U, (uint8_t)param1); + QS_END() + break; } default: break; diff --git a/examples/qutest/self_test/test/test_command.py b/examples/qutest/self_test/test/test_command.py index cc5ad89b..875335cb 100644 --- a/examples/qutest/self_test/test/test_command.py +++ b/examples/qutest/self_test/test/test_command.py @@ -15,7 +15,7 @@ def on_teardown(): # tests... test("Command") note(''' -this test invokes command(1,1,1) +this test invokes command(,,) ''') command("CMD_X", 1, 2, 3) expect("@timestamp COMMAND CMD_X 0") diff --git a/qpc.qm b/qpc.qm index 6f851022..c88d2fa7 100644 --- a/qpc.qm +++ b/qpc.qm @@ -790,17 +790,23 @@ QF_CRIT_EXIT(); bool inState = false; // assume that this HSM is not in 'state' // scan the state hierarchy bottom-up -QState r; -do { - // do the states match? - if (me->super.temp.fun == state) { - inState = true; // 'true' means that match found - r = Q_RET_IGNORED; // cause breaking out of the loop +QStateHandler s = me->super.state.fun; +int_fast8_t limit = QHSM_MAX_NEST_DEPTH_ + 1; // loop hard limit +QState r = Q_RET_SUPER; +for (; (r != Q_RET_IGNORED) && (limit > 0); --limit) { + if (s == state) { // do the states match? + inState = true; // 'true' means that match found + break; // break out of the for-loop } else { - r = QHSM_RESERVED_EVT_(me->super.temp.fun, Q_EMPTY_SIG); + r = QHSM_RESERVED_EVT_(s, Q_EMPTY_SIG); + s = me->super.temp.fun; } -} while (r != Q_RET_IGNORED); // QHsm_top() state not reached +} + +QF_CRIT_ENTRY(); +Q_ENSURE_INCRIT(690, limit > 0); +QF_CRIT_EXIT(); #ifndef Q_UNSAFE me->super.temp.uint = ~me->super.state.uint; @@ -1325,15 +1331,23 @@ me->temp.uint = ~me->state.uint; bool inState = false; // assume that this SM is not in 'state' -for (QMState const *s = me->super.state.obj; - s != (QMState *)0; - s = s->superstate) -{ - if (s == stateObj) { - inState = true; // match found, return 'true' +QMState const *s = me->super.state.obj; +int_fast8_t limit = 6; // loop hard limit +for (; (s != (QMState *)0) && (limit > 0); --limit) { + if (s == stateObj) { // match found? + inState = true; break; } + else { + s = s->superstate; // advance to the superstate + } } + +QF_CRIT_STAT +QF_CRIT_ENTRY(); +Q_ENSURE_INCRIT(690, limit > 0); +QF_CRIT_EXIT(); + return inState; @@ -1378,7 +1392,7 @@ if (!isFound) { // still not found? QF_CRIT_STAT QF_CRIT_ENTRY(); -Q_ASSERT_INCRIT(890, isFound); +Q_ENSURE_INCRIT(890, isFound); QF_CRIT_EXIT(); return child; // return the child @@ -3199,7 +3213,7 @@ QS_BEGIN_PRE_(QS_QF_TICK, 0U) QS_END_PRE_() // scan the linked-list of time events at this rate... -uint_fast8_t limit = 2U*QF_MAX_ACTIVE; // iteration hard limit +uint_fast8_t limit = 2U*QF_MAX_ACTIVE; // loop hard limit for (; limit > 0U; --limit) { QTimeEvt *e = prev->next; // advance down the time evt. list diff --git a/src/qf/qep_hsm.c b/src/qf/qep_hsm.c index af5d4291..c06d5bb4 100644 --- a/src/qf/qep_hsm.c +++ b/src/qf/qep_hsm.c @@ -462,17 +462,23 @@ bool QHsm_isIn(QHsm * const me, bool inState = false; // assume that this HSM is not in 'state' // scan the state hierarchy bottom-up - QState r; - do { - // do the states match? - if (me->super.temp.fun == state) { - inState = true; // 'true' means that match found - r = Q_RET_IGNORED; // cause breaking out of the loop + QStateHandler s = me->super.state.fun; + int_fast8_t limit = QHSM_MAX_NEST_DEPTH_ + 1; // loop hard limit + QState r = Q_RET_SUPER; + for (; (r != Q_RET_IGNORED) && (limit > 0); --limit) { + if (s == state) { // do the states match? + inState = true; // 'true' means that match found + break; // break out of the for-loop } else { - r = QHSM_RESERVED_EVT_(me->super.temp.fun, Q_EMPTY_SIG); + r = QHSM_RESERVED_EVT_(s, Q_EMPTY_SIG); + s = me->super.temp.fun; } - } while (r != Q_RET_IGNORED); // QHsm_top() state not reached + } + + QF_CRIT_ENTRY(); + Q_ENSURE_INCRIT(690, limit > 0); + QF_CRIT_EXIT(); #ifndef Q_UNSAFE me->super.temp.uint = ~me->super.state.uint; diff --git a/src/qf/qep_msm.c b/src/qf/qep_msm.c index 37d2767f..0b8a4073 100644 --- a/src/qf/qep_msm.c +++ b/src/qf/qep_msm.c @@ -366,15 +366,23 @@ bool QMsm_isInState(QMsm const * const me, { bool inState = false; // assume that this SM is not in 'state' - for (QMState const *s = me->super.state.obj; - s != (QMState *)0; - s = s->superstate) - { - if (s == stateObj) { - inState = true; // match found, return 'true' + QMState const *s = me->super.state.obj; + int_fast8_t limit = 6; // loop hard limit + for (; (s != (QMState *)0) && (limit > 0); --limit) { + if (s == stateObj) { // match found? + inState = true; break; } + else { + s = s->superstate; // advance to the superstate + } } + + QF_CRIT_STAT + QF_CRIT_ENTRY(); + Q_ENSURE_INCRIT(690, limit > 0); + QF_CRIT_EXIT(); + return inState; } @@ -410,7 +418,7 @@ QMState const * QMsm_childStateObj(QMsm const * const me, QF_CRIT_STAT QF_CRIT_ENTRY(); - Q_ASSERT_INCRIT(890, isFound); + Q_ENSURE_INCRIT(890, isFound); QF_CRIT_EXIT(); return child; // return the child diff --git a/src/qf/qf_time.c b/src/qf/qf_time.c index 58842b04..959066c5 100644 --- a/src/qf/qf_time.c +++ b/src/qf/qf_time.c @@ -316,7 +316,7 @@ void QTimeEvt_tick_( QS_END_PRE_() // scan the linked-list of time events at this rate... - uint_fast8_t limit = 2U*QF_MAX_ACTIVE; // iteration hard limit + uint_fast8_t limit = 2U*QF_MAX_ACTIVE; // loop hard limit for (; limit > 0U; --limit) { QTimeEvt *e = prev->next; // advance down the time evt. list