QP/C++  7.0.1
Real-Time Embedded Framework
qutest.cpp
Go to the documentation of this file.
1//============================================================================
2// QP/C++ Real-Time Embedded Framework (RTEF)
3// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
4//
5// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
6//
7// This software is dual-licensed under the terms of the open source GNU
8// General Public License version 3 (or any later version), or alternatively,
9// under the terms of one of the closed source Quantum Leaps commercial
10// licenses.
11//
12// The terms of the open source GNU General Public License version 3
13// can be found at: <www.gnu.org/licenses/gpl-3.0>
14//
15// The terms of the closed source Quantum Leaps commercial licenses
16// can be found at: <www.state-machine.com/licensing>
17//
18// Redistributions in source code must retain this top-level comment block.
19// Plagiarizing this software to sidestep the license obligations is illegal.
20//
21// Contact information:
22// <www.state-machine.com>
23// <info@state-machine.com>
24//============================================================================
30
31// only build when Q_UTEST is defined
32#ifdef Q_UTEST
33
34#define QP_IMPL // this is QP implementation
35#include "qf_port.hpp" // QF port
36#include "qf_pkg.hpp" // QF package-scope internal interface
37#include "qassert.h" // QP embedded systems-friendly assertions
38#include "qs_port.hpp" // QS port
39#include "qs_pkg.hpp" // QS package-scope internal interface
40
41// unnamed namespace for local definitions with internal linkage
42namespace {
43
45
46} // unnamed namespace
47
48//============================================================================
49namespace QP {
50
51// Global objects ............................................................
52std::uint8_t volatile QF_intNest;
53
54//............................................................................
55void QF::init(void) {
59 QF_maxPool_ = 0U;
60 QF_subscrList_ = nullptr;
62 QF_intNest = 0U;
63
64 bzero(&active_[0], sizeof(active_));
65 bzero(&QS::rxPriv_.readySet, sizeof(QS::rxPriv_.readySet));
66}
67//............................................................................
68void QF::stop(void) {
70}
71//............................................................................
72int_t QF::run(void) {
73 // function dictionaries for the standard API
77
78 // produce the QS_QF_RUN trace record
82
83 QS::onTestLoop(); // run the unit test
84 QS::onCleanup(); // application cleanup
85 return 0; // return no error
86}
87
88//............................................................................
89void QActive::start(std::uint_fast8_t const prio,
90 QEvt const * * const qSto, std::uint_fast16_t const qLen,
91 void * const stkSto, std::uint_fast16_t const stkSize,
92 void const * const par)
93{
94 static_cast<void>(stkSto); // unused parameter
95 static_cast<void>(stkSize); // unused parameter
96
97 // priority must be in range
98 Q_REQUIRE_ID(200, (0U < prio) && (prio <= QF_MAX_ACTIVE));
99
100 m_eQueue.init(qSto, qLen); // initialize QEQueue of this AO
101 m_prio = static_cast<std::uint8_t>(prio); // set the QF prio of this AO
102
103 QF::add_(this); // make QF aware of this AO
104
105 this->init(par, m_prio); // take the top-most initial tran. (virtual)
106 //QS_FLUSH(); // flush the trace buffer to the host
107}
108//............................................................................
109#ifdef QF_ACTIVE_STOP
110void QActive::stop(void) {
111 unsubscribeAll(); // unsubscribe from all events
112 QF::remove_(this); // remove this object from QF
113}
114#endif
115
116//============================================================================
118 : QHsm(nullptr)
119{}
120//............................................................................
121void QHsmDummy::init(void const * const e,
122 std::uint_fast8_t const qs_id) noexcept
123{
124 static_cast<void>(e); // unused paramter
125
128 QS_OBJ_PRE_(this); // this state machine object
129 QS_FUN_PRE_(m_state.fun); // the source state
130 QS_FUN_PRE_(m_temp.fun); // the target of the initial transition
132}
133//............................................................................
134void QHsmDummy::init(std::uint_fast8_t const qs_id) noexcept {
135 QHsmDummy::init(nullptr, qs_id);
136}
137//............................................................................
138void QHsmDummy::dispatch(QEvt const * const e,
139 std::uint_fast8_t const qs_id) noexcept
140{
143 QS_TIME_PRE_(); // time stamp
144 QS_SIG_PRE_(e->sig); // the signal of the event
145 QS_OBJ_PRE_(this); // this state machine object
146 QS_FUN_PRE_(m_state.fun); // the current state
148}
149
150//============================================================================
152 : QActive(nullptr)
153{}
154//............................................................................
155void QActiveDummy::start(std::uint_fast8_t const prio,
156 QEvt const * * const qSto, std::uint_fast16_t const qLen,
157 void * const stkSto, std::uint_fast16_t const stkSize,
158 void const * const par)
159{
160 // No special preconditions for checking parameters to allow starting
161 // dummy AOs the exact same way as the real counterparts.
162 static_cast<void>(qSto); // unusuded parameter
163 static_cast<void>(qLen); // unusuded parameter
164 static_cast<void>(stkSto); // unusuded parameter
165 static_cast<void>(stkSize); // unusuded parameter
166
167 m_prio = static_cast<std::uint8_t>(prio); // set the QF prio of this AO
168
169 QF::add_(this); // make QF aware of this AO
170
171 QActiveDummy::init(par, m_prio); // take the top-most initial tran.
172 //QS_FLUSH();
173}
174//............................................................................
175void QActiveDummy::init(void const * const e,
176 std::uint_fast8_t const qs_id) noexcept
177{
178 static_cast<void>(e); // unused paramter
179 static_cast<void>(qs_id); // unused paramter
180
183 QS_OBJ_PRE_(this); // this state machine object
184 QS_FUN_PRE_(m_state.fun); // the source state
185 QS_FUN_PRE_(m_temp.fun); // the target of the initial transition
187}
188//............................................................................
189void QActiveDummy::init(std::uint_fast8_t const qs_id) noexcept {
190 QActiveDummy::init(nullptr, qs_id);
191}
192//............................................................................
193void QActiveDummy::dispatch(QEvt const * const e,
194 std::uint_fast8_t const qs_id) noexcept
195{
196 static_cast<void>(qs_id); // unused paramter
197
200 QS_TIME_PRE_(); // time stamp
201 QS_SIG_PRE_(e->sig); // the signal of the event
202 QS_OBJ_PRE_(this); // this state machine object
203 QS_FUN_PRE_(m_state.fun); // the current state
205}
206//............................................................................
207bool QActiveDummy::post_(QEvt const * const e,
208 std::uint_fast16_t const margin,
209 void const * const sender) noexcept
210{
212
213 // test-probe#1 for faking queue overflow
214 bool status = true;
216 status = false;
217 if (margin == QF_NO_MARGIN) {
218 // fake assertion Mod=qf_actq,Loc=110
219 Q_onAssert("qf_actq", 110);
220 }
221 )
222
224 QF_CRIT_E_();
225
226 // is it a dynamic event?
227 if (e->poolId_ != 0U) {
228 QF_EVT_REF_CTR_INC_(e); // increment the reference counter
229 }
230
231 std::uint_fast8_t const rec =
232 (status ? static_cast<std::uint8_t>(QS_QF_ACTIVE_POST)
233 : static_cast<std::uint8_t>(QS_QF_ACTIVE_POST_ATTEMPT));
234 QS_BEGIN_NOCRIT_PRE_(rec, m_prio)
235 QS_TIME_PRE_(); // timestamp
236 QS_OBJ_PRE_(sender); // the sender object
237 QS_SIG_PRE_(e->sig); // the signal of the event
238 QS_OBJ_PRE_(this); // this active object
239 QS_2U8_PRE_(e->poolId_, e->refCtr_); // pool Id & refCtr of the evt
240 QS_EQC_PRE_(0U); // number of free entries
241 QS_EQC_PRE_(margin); // margin requested
243
244 // callback to examine the posted event under the same conditions
245 // as producing the #QS_QF_ACTIVE_POST trace record, which are:
246 // the local filter for this AO ('me->prio') is set
247 //
248 if ((QS::priv_.locFilter[m_prio >> 3U]
249 & (1U << (m_prio & 7U))) != 0U)
250 {
251 QS::onTestPost(sender, this, e, status);
252 }
253
254 QF_CRIT_X_();
255
256 // recycle the event immediately, because it was not really posted
257 QF::gc(e);
258
259 return status;
260}
261//............................................................................
262void QActiveDummy::postLIFO(QEvt const * const e) noexcept {
264
265 // test-probe#1 for faking queue overflow
267 // fake assertion Mod=qf_actq,Loc=210
268 Q_onAssert("qf_actq", 210);
269 )
270
272 QF_CRIT_E_();
273
274 // is it a dynamic event?
275 if (e->poolId_ != 0U) {
276 QF_EVT_REF_CTR_INC_(e); // increment the reference counter
277 }
278
280 QS_TIME_PRE_(); // timestamp
281 QS_SIG_PRE_(e->sig); // the signal of this event
282 QS_OBJ_PRE_(this); // this active object
283 QS_2U8_PRE_(e->poolId_, e->refCtr_); // pool Id & refCtr of the evt
284 QS_EQC_PRE_(0U); // number of free entries
285 QS_EQC_PRE_(0U); // min number of free entries
287
288 // callback to examine the posted event under the same conditions
289 // as producing the #QS_QF_ACTIVE_POST trace record, which are:
290 // the local filter for this AO ('me->prio') is set
291 //
292 if ((QS::priv_.locFilter[m_prio >> 3U]
293 & (1U << (m_prio & 7U))) != 0U)
294 {
295 QS::onTestPost(nullptr, this, e, true);
296 }
297
298 QF_CRIT_X_();
299
300 // recycle the event immediately, because it was not really posted
301 QF::gc(e);
302}
303
304//============================================================================
307
308 // return immediately (do nothing) for Test Probe != 0
309 QS_TEST_PROBE(return;)
310
311 while (rxPriv_.readySet.notEmpty()) {
312 std::uint_fast8_t const p = rxPriv_.readySet.findMax();
313 QActive * const a = QF::active_[p];
314
315 // perform the run-to-completion (RTC) step...
316 // 1. retrieve the event from the AO's event queue, which by this
317 // time must be non-empty and the "Vanialla" kernel asserts it.
318 // 2. dispatch the event to the AO's state machine.
319 // 3. determine if event is garbage and collect it if so
320 //
321 QEvt const * const e = a->get_();
322 a->dispatch(e, a->m_prio);
323 QF::gc(e);
324
325 if (a->m_eQueue.isEmpty()) { // empty queue?
327 }
328 }
329}
330
331//............................................................................
332// The testing version of system tick processing performs as follows:
333// 1. If the Current Time Event (TE) Object is defined and the TE is armed,
334// the TE is disarmed (if one-shot) and then posted to the recipient AO.
335// 2. The linked-list of all armed Time Events is updated.
336//
337void QS::tickX_(std::uint_fast8_t const tickRate,
338 void const * const sender) noexcept
339{
341 QF_CRIT_E_();
342
343 QTimeEvt *prev = &QF::timeEvtHead_[tickRate];
344
346 prev->m_ctr = (prev->m_ctr + 1U);
347 QS_TEC_PRE_(prev->m_ctr); // tick ctr
348 QS_U8_PRE_(tickRate); // tick rate
350
351 // is current Time Event object provided?
352 QTimeEvt *t = static_cast<QTimeEvt *>(QS::rxPriv_.currObj[QS::TE_OBJ]);
353 if (t != nullptr) {
354
355 // the time event must be armed
356 Q_ASSERT_ID(810, t->m_ctr != 0U);
357
358 // temp. for volatile
359 QActive * const act = static_cast<QActive *>(t->m_act);
360
361 // the recipient AO must be provided
362 Q_ASSERT_ID(820, act != nullptr);
363
364 // periodic time evt?
365 if (t->m_interval != 0U) {
366 t->m_ctr = t->m_interval; // rearm the time event
367 }
368 else { // one-shot time event: automatically disarm
369 t->m_ctr = 0U; // auto-disarm
370 // mark time event 't' as NOT linked
371 t->refCtr_ = static_cast<std::uint8_t>(t->refCtr_
372 & static_cast<std::uint8_t>(~TE_IS_LINKED));
373
375 QS_OBJ_PRE_(t); // this time event object
376 QS_OBJ_PRE_(act); // the target AO
377 QS_U8_PRE_(tickRate); // tick rate
379 }
380
382 QS_TIME_PRE_(); // timestamp
383 QS_OBJ_PRE_(t); // the time event object
384 QS_SIG_PRE_(t->sig); // signal of this time event
385 QS_OBJ_PRE_(act); // the target AO
386 QS_U8_PRE_(tickRate); // tick rate
388
389 QF_CRIT_X_(); // exit crit. section before posting
390
391 // asserts if queue overflows
392 static_cast<void>(act->POST(t, sender));
393
394 QF_CRIT_E_();
395 }
396
397 // update the linked list of time events
398 for (;;) {
399 t = prev->m_next; // advance down the time evt. list
400
401 // end of the list?
402 if (t == nullptr) {
403
404 // any new time events armed since the last run of QF::tickX_()?
405 if (QF::timeEvtHead_[tickRate].m_act != nullptr) {
406
407 // sanity check
408 Q_ASSERT_CRIT_(830, prev != nullptr);
409 prev->m_next = QF::timeEvtHead_[tickRate].toTimeEvt();
410 QF::timeEvtHead_[tickRate].m_act = nullptr;
411 t = prev->m_next; // switch to the new list
412 }
413 else {
414 break; // all currently armed time evts. processed
415 }
416 }
417
418 // time event scheduled for removal?
419 if (t->m_ctr == 0U) {
420 prev->m_next = t->m_next;
421 // mark time event 't' as NOT linked
422 t->refCtr_ = static_cast<std::uint8_t>(t->refCtr_
423 & static_cast<std::uint8_t>(~TE_IS_LINKED));
424 // do NOT advance the prev pointer
425 QF_CRIT_X_(); // exit crit. section to reduce latency
426
427 // prevent merging critical sections, see NOTE1 below
429 }
430 else {
431 prev = t; // advance to this time event
432 QF_CRIT_X_(); // exit crit. section to reduce latency
433
434 // prevent merging critical sections, see NOTE1 below
436 }
437 QF_CRIT_E_(); // re-enter crit. section to continue
438 }
439
440 QF_CRIT_X_();
441}
442
443//............................................................................
444// 1. send the QS_TEST_PAUSED trace record
445// 2. Enter the QUTest event loop
446void QS::test_pause_(void) {
447 beginRec_(static_cast<std::uint_fast8_t>(QP::QS_TEST_PAUSED));
448 endRec_();
449 onTestLoop();
450}
451
452} // namespace QP
453
454//============================================================================
455extern "C" {
456
457Q_NORETURN Q_onAssert(char const * const module, int_t const location) {
459 QS_TIME_PRE_();
460 QS_U16_PRE_(location);
461 QS_STR_PRE_((module != nullptr) ? module : "?");
463
464 QP::QS::onFlush(); // flush the assertion record to the host
465 QP::QS::onTestLoop(); // loop to wait for commands (typically reset)
466 QP::QS::onReset(); // in case the QUTEST loop ever returns, reset manually
467 for (;;) { // onReset() should not return, but to ensure no-return...
468 }
469}
470
471} // extern "C"
472
473#endif // Q_UTEST
void start(std::uint_fast8_t const prio, QEvt const **const qSto, std::uint_fast16_t const qLen, void *const stkSto, std::uint_fast16_t const stkSize, void const *const par) override
Starts execution of an active object and registers the object with the framework.
Definition: qutest.cpp:155
QActiveDummy(void)
Definition: qutest.cpp:151
void init(void const *const e, std::uint_fast8_t const qs_id) noexcept override
executes the top-most initial transition in QP::QHsm
Definition: qutest.cpp:175
void postLIFO(QEvt const *const e) noexcept override
Posts an event directly to the event queue of the active object using the Last-In-First-Out (LIFO) po...
Definition: qutest.cpp:262
bool post_(QEvt const *const e, std::uint_fast16_t const margin, void const *const sender) noexcept override
Definition: qutest.cpp:207
void dispatch(QEvt const *const e, std::uint_fast8_t const qs_id) noexcept override
Dispatches an event to QHsm.
Definition: qutest.cpp:193
QActive active object class (based on QP::QHsm implementation strategy)
Definition: qf.hpp:139
std::uint8_t m_prio
QF priority (1..QF_MAX_ACTIVE) of this active object.
Definition: qf.hpp:183
virtual void postLIFO(QEvt const *const e) noexcept
Posts an event directly to the event queue of the active object using the Last-In-First-Out (LIFO) po...
Definition: qf_actq.cpp:181
virtual bool post_(QEvt const *const e, std::uint_fast16_t const margin, void const *const sender) noexcept
Definition: qf_actq.cpp:60
void stop(void)
Stops execution of an active object and removes it from the framework's supervision.
Definition: qutest.cpp:110
QEvt const * get_(void) noexcept
Get an event from the event queue of an active object.
Definition: qf_actq.cpp:245
friend class QActive
Definition: qf.hpp:1201
static void init(void)
QF initialization.
Definition: qk.cpp:69
friend class QS
Definition: qf.hpp:1203
static void onCleanup(void)
Cleanup QF callback.
static int_t run(void)
Transfers control to QF to run the application.
Definition: qk.cpp:93
static QTimeEvt timeEvtHead_[QF_MAX_TICK_RATE]
heads of linked lists of time events, one for every clock tick rate
Definition: qf.hpp:1199
static void gc(QEvt const *const e) noexcept
Recycle a dynamic event.
Definition: qf_dyn.cpp:140
static void bzero(void *const start, std::uint_fast16_t const len) noexcept
Clear a specified region of memory to zero.
Definition: qf_act.cpp:81
static void add_(QActive *const a) noexcept
Register an active object to be managed by the framework.
Definition: qf_act.cpp:56
static void stop(void)
Function invoked by the application layer to stop the QF application and return control to the OS/Ker...
Definition: qk.cpp:87
static QActive * active_[QF_MAX_ACTIVE+1U]
Internal array of registered active objects.
Definition: qf.hpp:1137
static void remove_(QActive *const a) noexcept
Remove the active object from the framework.
Definition: qf_act.cpp:68
void init(void const *const e, std::uint_fast8_t const qs_id) noexcept override
executes the top-most initial transition in QP::QHsm
Definition: qutest.cpp:121
QHsmDummy(void)
Definition: qutest.cpp:117
void dispatch(QEvt const *const e, std::uint_fast8_t const qs_id) noexcept override
Dispatches an event to QHsm.
Definition: qutest.cpp:138
Hierarchical State Machine base class.
Definition: qep.hpp:258
virtual void dispatch(QEvt const *const e, std::uint_fast8_t const qs_id)
Dispatches an event to QHsm.
Definition: qep_hsm.cpp:192
static void test_pause_(void)
internal function to pause test and enter the test event loop
Definition: qutest.cpp:446
static void onTestLoop(void)
callback to run the test loop
static QS priv_
Definition: qs.hpp:552
static void onFlush(void)
Callback to flush the QS trace data to the host.
static QSrx rxPriv_
Definition: qs.hpp:554
static void beginRec_(std::uint_fast8_t const rec) noexcept
Mark the begin of a QS record rec
Definition: qs.cpp:350
@ TE_OBJ
time event object
Definition: qs.hpp:518
static void onReset(void)
callback function to reset the Target (to be implemented in the BSP)
static void endRec_(void) noexcept
Mark the end of a QS record rec
Definition: qs.cpp:370
static void processTestEvts_(void)
internal function to process posted events during test
Definition: qutest.cpp:305
static void onTestPost(void const *sender, QActive *recipient, QEvt const *e, bool status)
static void tickX_(std::uint_fast8_t const tickRate, void const *const sender) noexcept
internal function to process armed time events during test
Definition: qutest.cpp:337
Time Event class (inherits QP:QEvt)
Definition: qf.hpp:609
QTimeEvtCtr volatile m_ctr
the internal down-counter of the time event
Definition: qf.hpp:628
QTimeEvt * toTimeEvt(void) noexcept
encapsulate the cast the m_act attribute to QTimeEvt*
Definition: qf.hpp:763
QTimeEvtCtr m_interval
the interval for the periodic time event (zero for the one-shot time event)
Definition: qf.hpp:637
QTimeEvt *volatile m_next
link to the next time event in the list
Definition: qf.hpp:613
void *volatile m_act
the active object that receives the time events
Definition: qf.hpp:620
namespace associated with the QP/C++ framework
Definition: exa_native.dox:1
std::uint_fast16_t const QF_NO_MARGIN
special value of margin that causes asserting failure in case event allocation or event posting fails
Definition: qf.hpp:1211
@ QS_ASSERT_FAIL
assertion failed in the code
Definition: qs.hpp:670
@ QS_QF_TIMEEVT_AUTO_DISARM
a time event expired and was disarmed
Definition: qs.hpp:620
@ QS_QF_RUN
QF_run() was entered.
Definition: qs.hpp:671
@ QS_QEP_STATE_INIT
an initial transition was taken in a state
Definition: qs.hpp:578
@ QS_QF_ACTIVE_POST_LIFO
an event was posted (LIFO) directly to AO
Definition: qs.hpp:592
@ QS_QF_TIMEEVT_POST
a time event posted itself directly to an AO
Definition: qs.hpp:624
@ QS_QF_ACTIVE_POST_ATTEMPT
attempt to post an evt to AO failed
Definition: qs.hpp:636
@ QS_QF_TICK
QP::QF::tickX() was called.
Definition: qs.hpp:616
@ QS_QEP_DISPATCH
an event was dispatched (begin of RTC step)
Definition: qs.hpp:583
@ QS_TEST_PAUSED
test has been paused
Definition: qs.hpp:659
@ QS_QF_ACTIVE_POST
an event was posted (FIFO) directly to AO
Definition: qs.hpp:591
enum_t QF_maxPubSignal_
the maximum published signal
Definition: qf_ps.cpp:55
std::uint_fast8_t QF_maxPool_
Definition: qf_dyn.cpp:54
void * currObj[8]
current objects
Definition: qs.hpp:58
QP::QPSet readySet
QUTEST ready-set of active objects.
Definition: qs.hpp:64
QSubscrList * QF_subscrList_
the subscriber list array
Definition: qf_ps.cpp:54
void QF_EVT_REF_CTR_INC_(QEvt const *const e) noexcept
increment the refCtr_ of an event e
Definition: qf_pkg.hpp:142
std::uint8_t volatile QF_intNest
Definition: qutest.cpp:52
Customizable and memory-efficient assertions for embedded systems.
#define Q_DEFINE_THIS_MODULE(name_)
Definition: qassert.h:102
#define Q_NORETURN
Definition: qassert.h:199
#define Q_ASSERT_ID(id_, test_)
Definition: qassert.h:135
#define Q_REQUIRE_ID(id_, test_)
Definition: qassert.h:252
int int_t
alias for line numbers in assertions and return from QF::run()
Definition: qep.hpp:64
#define QF_CRIT_EXIT_NOP()
No-operation for exiting a critical section.
Definition: qf.hpp:1265
Internal (package scope) QF/C++ interface.
#define QF_CRIT_STAT_
This is an internal macro for defining the critical section status type.
Definition: qf_pkg.hpp:48
#define Q_ASSERT_CRIT_(id_, test_)
Definition: qf_pkg.hpp:86
#define QF_CRIT_X_()
This is an internal macro for exiting a critical section.
Definition: qf_pkg.hpp:69
#define QF_CRIT_E_()
This is an internal macro for entering a critical section.
Definition: qf_pkg.hpp:58
#define QS_CRIT_STAT_
This is an internal macro for defining the critical section status type.
Definition: qs.hpp:978
#define QS_TIME_PRE_()
Internal macro to output time stamp to a QS record.
Definition: qs.hpp:748
#define QS_FUN_DICTIONARY(fun_)
Output function dictionary record.
Definition: qs.hpp:1226
#define QS_TEST_PROBE_DEF(fun_)
QS macro to define the Test-Probe for a given fun_.
Definition: qs.hpp:1283
#define QS_TEST_PROBE(code_)
QS macro to apply a Test-Probe.
Definition: qs.hpp:1288
#define QS_TEST_PROBE_ID(id_, code_)
QS macro to apply a Test-Probe.
Definition: qs.hpp:1292
Internal (package scope) QS/C++ interface.
#define QS_BEGIN_PRE_(rec_, qs_id_)
Internal QS macro to begin a predefined QS record with critical section.
Definition: qs_pkg.hpp:111
#define QS_U8_PRE_(data_)
Internal QS macro to output an unformatted uint8_t data element.
Definition: qs_pkg.hpp:161
#define QS_BEGIN_NOCRIT_PRE_(rec_, qs_id_)
Internal QS macro to begin a predefined QS record without critical section.
Definition: qs_pkg.hpp:133
#define QS_OBJ_PRE_(obj_)
Internal QS macro to output object pointer data element.
Definition: qs_pkg.hpp:182
#define QS_FUN_PRE_(fun_)
Internal QS macro to output an unformatted function pointer data element.
Definition: qs_pkg.hpp:204
#define QS_TEC_PRE_(ctr_)
Definition: qs_pkg.hpp:285
#define QS_END_NOCRIT_PRE_()
Internal QS macro to end a predefiend QS record without critical section.
Definition: qs_pkg.hpp:142
#define QS_U16_PRE_(data_)
Internal QS macro to output an unformatted uint16_t data element.
Definition: qs_pkg.hpp:170
#define QS_2U8_PRE_(data1_, data2_)
Internal QS macro to output 2 unformatted uint8_t data elements.
Definition: qs_pkg.hpp:165
#define QS_EQC_PRE_(ctr_)
Definition: qs_pkg.hpp:216
#define QS_STR_PRE_(msg_)
Internal QS macro to output a zero-terminated ASCII string data element.
Definition: qs_pkg.hpp:179
#define QS_END_PRE_()
Internal QS macro to end a predefined QS record with critical section.
Definition: qs_pkg.hpp:122
Q_NORETURN Q_onAssert(char const *const module, int_t const location)
Definition: qutest.cpp:457
#define QF_MAX_ACTIVE
QEvt base class.
Definition: qep.hpp:155
QSignal sig
signal of the event instance
Definition: qep.hpp:156
std::uint8_t volatile refCtr_
reference counter
Definition: qep.hpp:158
void rmove(std::uint_fast8_t const n) noexcept
remove element n from the set, n = 1..64
Definition: qpset.hpp:182
bool notEmpty(void) const noexcept
Evaluates to true if the priority set is not empty.
Definition: qpset.hpp:152
std::uint_fast8_t findMax(void) const noexcept
find the maximum element in the set, returns zero if the set is empty
Definition: qpset.hpp:194