QP/C  8.0.0
Real-Time Embedded Framework
Loading...
Searching...
No Matches
qf_time.c
Go to the documentation of this file.
1//$file${src::qf::qf_time.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2//
3// Model: qpc.qm
4// File: ${src::qf::qf_time.c}
5//
6// This code has been generated by QM 7.0.0 <www.state-machine.com/qm>.
7// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
8//
9// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
10//
11// Q u a n t u m L e a P s
12// ------------------------
13// Modern Embedded Software
14//
15// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
16//
17// The QP/C software is dual-licensed under the terms of the open-source GNU
18// General Public License (GPL) or under the terms of one of the closed-
19// source Quantum Leaps commercial licenses.
20//
21// Redistributions in source code must retain this top-level comment block.
22// Plagiarizing this software to sidestep the license obligations is illegal.
23//
24// NOTE:
25// The GPL does NOT permit the incorporation of this code into proprietary
26// programs. Please contact Quantum Leaps for commercial licensing options,
27// which expressly supersede the GPL and are designed explicitly for
28// closed-source distribution.
29//
30// Quantum Leaps contact information:
31// <www.state-machine.com/licensing>
32// <info@state-machine.com>
33//
34//$endhead${src::qf::qf_time.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35#define QP_IMPL // this is QP implementation
36#include "qp_port.h" // QP port
37#include "qp_pkg.h" // QP package-scope interface
38#include "qsafe.h" // QP Functional Safety (FuSa) Subsystem
39#ifdef Q_SPY // QS software tracing enabled?
40 #include "qs_port.h" // QS port
41 #include "qs_pkg.h" // QS facilities for pre-defined trace records
42#else
43 #include "qs_dummy.h" // disable the QS software tracing
44#endif // Q_SPY
45
46Q_DEFINE_THIS_MODULE("qf_time")
47
48//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
49// Check for the minimum required QP version
50#if (QP_VERSION < 730U) || (QP_VERSION != ((QP_RELEASE^4294967295U)%0x2710U))
51#error qpc version 7.3.0 or higher required
52#endif
53//$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54//$define${QF::QTimeEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
55
56//${QF::QTimeEvt} ............................................................
57QTimeEvt QTimeEvt_timeEvtHead_[QF_MAX_TICK_RATE];
58
59#ifndef Q_UNSAFE
60uintptr_t QTimeEvt_timeEvtHead_dis_[QF_MAX_TICK_RATE];
61#endif // ndef Q_UNSAFE
62
63//${QF::QTimeEvt::ctorX} .....................................................
64//! @public @memberof QTimeEvt
65void QTimeEvt_ctorX(QTimeEvt * const me,
66 QActive * const act,
67 enum_t const sig,
68 uint_fast8_t const tickRate)
69{
72 Q_REQUIRE_INCRIT(300, (sig != 0)
73 && (tickRate < QF_MAX_TICK_RATE));
75
76 QEvt_ctor(&me->super, sig);
77
78 me->next = (QTimeEvt *)0;
79 me->act = act;
80 me->ctr = 0U;
81 me->interval = 0U;
82 me->tickRate = (uint8_t)tickRate;
83 me->flags = 0U;
84
85 #ifndef Q_UNSAFE
86 me->next_dis = (uintptr_t)~Q_PTR2UINT_CAST_(me->next);
87 me->ctr_dis = (QTimeEvtCtr)~me->ctr;
88 #endif // ndef Q_UNSAFE
89}
90
91//${QF::QTimeEvt::armX} ......................................................
92//! @public @memberof QTimeEvt
93void QTimeEvt_armX(QTimeEvt * const me,
94 uint32_t const nTicks,
95 uint32_t const interval)
96{
99 QF_MEM_SYS();
100
101 // dynamic range checks
102 #if (QF_TIMEEVT_CTR_SIZE == 1U)
103 Q_REQUIRE_INCRIT(400, (nTicks < 0xFFU) && (interval < 0xFFU));
104 #elif (QF_TIMEEVT_CTR_SIZE == 2U)
105 Q_REQUIRE_INCRIT(400, (nTicks < 0xFFFFU) && (interval < 0xFFFFU));
106 #endif
107
108 #ifndef Q_UNSAFE
109 Q_INVARIANT_INCRIT(401, QEvt_verify_(&me->super));
110 #endif
111
112 QTimeEvtCtr const ctr = me->ctr;
113 uint8_t const tickRate = me->tickRate;
114 #ifdef Q_SPY
115 uint_fast8_t const qsId = ((QActive *)(me->act))->prio;
116 #endif
117
119 (nTicks != 0U)
120 && (ctr == 0U)
121 && (me->act != (void *)0)
122 && (tickRate < (uint_fast8_t)QF_MAX_TICK_RATE));
123
124 #ifndef Q_UNSAFE
125 QTimeEvtCtr const dis = (QTimeEvtCtr)~me->ctr_dis;
126 Q_INVARIANT_INCRIT(411, ctr == dis);
127 #else
128 Q_UNUSED_PAR(ctr);
129 #endif // ndef Q_UNSAFE
130
131 me->ctr = (QTimeEvtCtr)nTicks;
132 me->interval = (QTimeEvtCtr)interval;
133 #ifndef Q_UNSAFE
134 me->ctr_dis = (QTimeEvtCtr)~nTicks;
135 #endif // ndef Q_UNSAFE
136
137 // is the time event unlinked?
138 // NOTE: For the duration of a single clock tick of the specified tick
139 // rate a time event can be disarmed and yet still linked into the list
140 // because un-linking is performed exclusively in QTimeEvt_tick_().
141 if ((me->flags & QTE_FLAG_IS_LINKED) == 0U) {
142 me->flags |= QTE_FLAG_IS_LINKED; // mark as linked
143
144 // The time event is initially inserted into the separate "freshly
145 // armed" link list based on QTimeEvt_timeEvtHead_[tickRate].act.
146 // Only later, inside the QTimeEvt_tick_() function, the "freshly
147 // armed" list is appended to the main list of armed time events
148 // based on QTimeEvt_timeEvtHead_[tickRate].next. Again, this is
149 // to keep any changes to the main list exclusively inside the
150 // QTimeEvt_tick_().
151 #ifndef Q_UNSAFE
153 Q_PTR2UINT_CAST_(me->next) == (uintptr_t)~me->next_dis);
155 Q_PTR2UINT_CAST_(QTimeEvt_timeEvtHead_[tickRate].act) ==
156 (uintptr_t)(~QTimeEvt_timeEvtHead_dis_[tickRate]));
157 #endif
158 me->next = (QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act;
159 QTimeEvt_timeEvtHead_[tickRate].act = me;
160 #ifndef Q_UNSAFE
161 me->next_dis = (uintptr_t)~Q_PTR2UINT_CAST_(me->next);
162 QTimeEvt_timeEvtHead_dis_[tickRate] = (uintptr_t)~Q_PTR2UINT_CAST_(me);
163 #endif // ndef Q_UNSAFE
164 }
165
166 QS_BEGIN_PRE(QS_QF_TIMEEVT_ARM, qsId)
167 QS_TIME_PRE(); // timestamp
168 QS_OBJ_PRE(me); // this time event object
169 QS_OBJ_PRE(me->act); // the active object
170 QS_TEC_PRE(nTicks); // the # ticks
171 QS_TEC_PRE(interval); // the interval
172 QS_U8_PRE(tickRate); // tick rate
173 QS_END_PRE()
174
175 QF_MEM_APP();
176 QF_CRIT_EXIT();
177}
178
179//${QF::QTimeEvt::disarm} ....................................................
180//! @public @memberof QTimeEvt
181bool QTimeEvt_disarm(QTimeEvt * const me) {
184 QF_MEM_SYS();
185
186 QTimeEvtCtr const ctr = me->ctr;
187
188 #ifndef Q_UNSAFE
189 Q_INVARIANT_INCRIT(500, QEvt_verify_(&me->super));
190 QTimeEvtCtr const dis = (QTimeEvtCtr)~me->ctr_dis;
191 Q_INVARIANT_INCRIT(501, ctr == dis);
192 #endif // ndef Q_UNSAFE
193
194 #ifdef Q_SPY
195 uint_fast8_t const qsId = QACTIVE_CAST_(me->act)->prio;
196 #endif
197
198 // was the time event actually armed?
199 bool wasArmed;
200 if (ctr != 0U) {
201 wasArmed = true;
203 me->ctr = 0U; // schedule removal from the list
204 #ifndef Q_UNSAFE
205 me->ctr_dis = (QTimeEvtCtr)~0U;
206 #endif // ndef Q_UNSAFE
207
208 QS_BEGIN_PRE(QS_QF_TIMEEVT_DISARM, qsId)
209 QS_TIME_PRE(); // timestamp
210 QS_OBJ_PRE(me); // this time event object
211 QS_OBJ_PRE(me->act); // the target AO
212 QS_TEC_PRE(ctr); // the # ticks
213 QS_TEC_PRE(me->interval); // the interval
214 QS_U8_PRE(me->tickRate); // tick rate
215 QS_END_PRE()
216 }
217 else { // the time event was already disarmed automatically
218 wasArmed = false;
219 me->flags &= (uint8_t)(~QTE_FLAG_WAS_DISARMED & 0xFFU);
220
221 QS_BEGIN_PRE(QS_QF_TIMEEVT_DISARM_ATTEMPT, qsId)
222 QS_TIME_PRE(); // timestamp
223 QS_OBJ_PRE(me); // this time event object
224 QS_OBJ_PRE(me->act); // the target AO
225 QS_U8_PRE(me->tickRate); // tick rate
226 QS_END_PRE()
227 }
228
229 QF_MEM_APP();
230 QF_CRIT_EXIT();
231
232 return wasArmed;
233}
234
235//${QF::QTimeEvt::rearm} .....................................................
236//! @public @memberof QTimeEvt
237bool QTimeEvt_rearm(QTimeEvt * const me,
238 uint32_t const nTicks)
239{
242 QF_MEM_SYS();
243
244 // dynamic range checks
245 #if (QF_TIMEEVT_CTR_SIZE == 1U)
246 Q_REQUIRE_INCRIT(600, nTicks < 0xFFU);
247 #elif (QF_TIMEEVT_CTR_SIZE == 2U)
248 Q_REQUIRE_INCRIT(600, nTicks < 0xFFFFU);
249 #endif
250
251 uint8_t const tickRate = me->tickRate;
252 QTimeEvtCtr const ctr = me->ctr;
253
255 (nTicks != 0U)
256 && (me->act != (void *)0)
257 && (tickRate < QF_MAX_TICK_RATE));
258
259 #ifndef Q_UNSAFE
260 Q_INVARIANT_INCRIT(601, QEvt_verify_(&me->super));
261 QTimeEvtCtr const dis = (QTimeEvtCtr)~me->ctr_dis;
262 Q_INVARIANT_INCRIT(602, ctr == dis);
263 #endif // ndef Q_UNSAFE
264
265 #ifdef Q_SPY
266 uint_fast8_t const qsId = ((QActive *)(me->act))->prio;
267 #endif
268
269 me->ctr = (QTimeEvtCtr)nTicks;
270 #ifndef Q_UNSAFE
271 me->ctr_dis = (QTimeEvtCtr)~nTicks;
272 #endif // ndef Q_UNSAFE
273
274 // was the time evt not running?
275 bool wasArmed;
276 if (ctr == 0U) {
277 wasArmed = false;
278
279 // NOTE: For the duration of a single clock tick of the specified
280 // tick rate a time event can be disarmed and yet still linked into
281 // the list, because unlinking is performed exclusively in the
282 // QTimeEvt_tick_() function.
283
284 // is the time event unlinked?
285 if ((me->flags & QTE_FLAG_IS_LINKED) == 0U) {
286 me->flags |= QTE_FLAG_IS_LINKED; // mark as linked
287
288 // The time event is initially inserted into the separate "freshly
289 // armed" link list based on QTimeEvt_timeEvtHead_[tickRate].act.
290 // Only later, inside the QTimeEvt_tick_() function, the "freshly
291 // armed" list is appended to the main list of armed time events
292 // based on QTimeEvt_timeEvtHead_[tickRate].next. Again, this is
293 // to keep any changes to the main list exclusively inside
294 // QTimeEvt_tick_().
295 #ifndef Q_UNSAFE
297 Q_PTR2UINT_CAST_(me->next) == (uintptr_t)~me->next_dis);
299 Q_PTR2UINT_CAST_(QTimeEvt_timeEvtHead_[tickRate].act) ==
300 (uintptr_t)(~QTimeEvt_timeEvtHead_dis_[tickRate]));
301 #endif
302 me->next = (QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act;
303 QTimeEvt_timeEvtHead_[tickRate].act = me;
304 #ifndef Q_UNSAFE
305 me->next_dis = (uintptr_t)~Q_PTR2UINT_CAST_(me->next);
306 QTimeEvt_timeEvtHead_dis_[tickRate] =
307 (uintptr_t)~Q_PTR2UINT_CAST_(me);
308 #endif // ndef Q_UNSAFE
309 }
310 }
311 else { // the time event was armed
312 wasArmed = true;
313 }
314
315 QS_BEGIN_PRE(QS_QF_TIMEEVT_REARM, qsId)
316 QS_TIME_PRE(); // timestamp
317 QS_OBJ_PRE(me); // this time event object
318 QS_OBJ_PRE(me->act); // the target AO
319 QS_TEC_PRE(nTicks); // the # ticks
320 QS_TEC_PRE(me->interval); // the interval
321 QS_2U8_PRE(tickRate, (wasArmed ? 1U : 0U));
322 QS_END_PRE()
323
324 QF_MEM_APP();
325 QF_CRIT_EXIT();
326
327 return wasArmed;
328}
329
330//${QF::QTimeEvt::wasDisarmed} ...............................................
331//! @public @memberof QTimeEvt
332bool QTimeEvt_wasDisarmed(QTimeEvt * const me) {
335 QF_MEM_SYS();
336
337 bool const wasDisarmed = (me->flags & QTE_FLAG_WAS_DISARMED) != 0U;
338 me->flags |= QTE_FLAG_WAS_DISARMED; // mark as disarmed
339
340 QF_MEM_APP();
341 QF_CRIT_EXIT();
342
343 return wasDisarmed;
344}
345
346//${QF::QTimeEvt::currCtr} ...................................................
347//! @public @memberof QTimeEvt
348QTimeEvtCtr QTimeEvt_currCtr(QTimeEvt const * const me) {
351 QTimeEvtCtr const ctr = me->ctr;
352 QF_CRIT_EXIT();
353
354 return ctr;
355}
356
357//${QF::QTimeEvt::init} ......................................................
358//! @static @private @memberof QTimeEvt
359void QTimeEvt_init(void) {
360 for (uint_fast8_t tickRate = 0U;
361 tickRate < Q_DIM(QTimeEvt_timeEvtHead_);
362 ++tickRate)
363 {
364 QTimeEvt_ctorX(&QTimeEvt_timeEvtHead_[tickRate],
365 (QActive *)0, Q_USER_SIG, tickRate);
366 #ifndef Q_UNSAFE
367 QTimeEvt_timeEvtHead_dis_[tickRate] =
368 (uintptr_t)~Q_PTR2UINT_CAST_(QTimeEvt_timeEvtHead_[tickRate].act);
369 #endif
370 }
371}
372
373//${QF::QTimeEvt::tick_} .....................................................
374//! @static @private @memberof QTimeEvt
375void QTimeEvt_tick_(
376 uint_fast8_t const tickRate,
377 void const * const sender)
378{
379 #ifndef Q_SPY
380 Q_UNUSED_PAR(sender);
381 #endif
382
385 QF_MEM_SYS();
386
387 Q_REQUIRE_INCRIT(800, tickRate < Q_DIM(QTimeEvt_timeEvtHead_));
388
389 QTimeEvt *prev = &QTimeEvt_timeEvtHead_[tickRate];
390
391 QS_BEGIN_PRE(QS_QF_TICK, 0U)
392 ++prev->ctr;
393 QS_TEC_PRE(prev->ctr); // tick ctr
394 QS_U8_PRE(tickRate); // tick rate
395 QS_END_PRE()
396
397 // scan the linked-list of time events at this rate...
398 uint_fast8_t lbound = 2U*QF_MAX_ACTIVE; // fixed upper loop bound
399 for (; lbound > 0U; --lbound) {
400 Q_ASSERT_INCRIT(810, prev != (QTimeEvt *)0); // sanity check
401
402 QTimeEvt *te = prev->next; // advance down the time evt. list
403 #ifndef Q_UNSAFE
405 Q_PTR2UINT_CAST_(te) == (uintptr_t)~prev->next_dis);
406 #endif // ndef Q_UNSAFE
407
408 if (te == (QTimeEvt *)0) { // end of the list?
409
410 // any new time events armed since the last QTimeEvt_tick_()?
411 if (QTimeEvt_timeEvtHead_[tickRate].act != (void *)0) {
412 #ifndef Q_UNSAFE
414 Q_PTR2UINT_CAST_(QTimeEvt_timeEvtHead_[tickRate].act)
415 == (uintptr_t)~QTimeEvt_timeEvtHead_dis_[tickRate]);
416 #endif // ndef Q_UNSAFE
417 prev->next = (QTimeEvt*)QTimeEvt_timeEvtHead_[tickRate].act;
418 QTimeEvt_timeEvtHead_[tickRate].act = (void *)0;
419 #ifndef Q_UNSAFE
420 prev->next_dis = (uintptr_t)~Q_PTR2UINT_CAST_(prev->next);
421 QTimeEvt_timeEvtHead_dis_[tickRate] =
422 (uintptr_t)~Q_PTR2UINT_CAST_((void *)0);
423 #endif // ndef Q_UNSAFE
424
425 te = prev->next; // switch to the new list
426 }
427 else { // all currently armed time events are processed
428 break; // terminate the for-loop
429 }
430 }
431
432 // the time event 'te' must be valid
433 Q_ASSERT_INCRIT(820, te != (QTimeEvt *)0);
434
435 QTimeEvtCtr ctr = te->ctr;
436 #ifndef Q_UNSAFE
437 Q_INVARIANT_INCRIT(821, QEvt_verify_(&te->super));
438 QTimeEvtCtr const dis = (QTimeEvtCtr)~te->ctr_dis;
439 Q_INVARIANT_INCRIT(822, ctr == dis);
440 #endif // ndef Q_UNSAFE
441
442 if (ctr == 0U) { // time event scheduled for removal?
443 prev->next = te->next;
444 #ifndef Q_UNSAFE
445 prev->next_dis = (uintptr_t)~Q_PTR2UINT_CAST_(te->next);
446 #endif // ndef Q_UNSAFE
447
448 // mark time event 'te' as NOT linked
449 te->flags &= (uint8_t)(~QTE_FLAG_IS_LINKED & 0xFFU);
450
451 // do NOT advance the prev pointer
452 QF_MEM_APP();
453 QF_CRIT_EXIT(); // exit crit. section to reduce latency
454
455 // NOTE: prevent merging critical sections
456 // In some QF ports the critical section exit takes effect only
457 // on the next machine instruction. If the next instruction is
458 // another entry to a critical section, the critical section
459 // might not be really exited, but rather the two adjacent
460 // critical sections would be MERGED. The QF_CRIT_EXIT_NOP()
461 // macro contains minimal code required to prevent such merging
462 // of critical sections in QF ports, in which it can occur.
464 }
465 else if (ctr == 1U) { // is time event about to expire?
466 QActive * const act = (QActive *)te->act;
467 if (te->interval != 0U) { // periodic time evt?
468 te->ctr = te->interval; // rearm the time event
469 #ifndef Q_UNSAFE
470 te->ctr_dis = (QTimeEvtCtr)~te->interval;
471 #endif // ndef Q_UNSAFE
472 prev = te; // advance to this time event
473 }
474 else { // one-shot time event: automatically disarm
475 te->ctr = 0U;
476 prev->next = te->next;
477 #ifndef Q_UNSAFE
478 te->ctr_dis = (QTimeEvtCtr)~0U;
479 prev->next_dis = (uintptr_t)~Q_PTR2UINT_CAST_(te->next);
480 #endif // ndef Q_UNSAFE
481
482 // mark time event 'te' as NOT linked
483 te->flags &= (uint8_t)(~QTE_FLAG_IS_LINKED & 0xFFU);
484 // do NOT advance the prev pointer
485
486 QS_BEGIN_PRE(QS_QF_TIMEEVT_AUTO_DISARM, act->prio)
487 QS_OBJ_PRE(te); // this time event object
488 QS_OBJ_PRE(act); // the target AO
489 QS_U8_PRE(tickRate); // tick rate
490 QS_END_PRE()
491 }
492
493 QS_BEGIN_PRE(QS_QF_TIMEEVT_POST, act->prio)
494 QS_TIME_PRE(); // timestamp
495 QS_OBJ_PRE(te); // the time event object
496 QS_SIG_PRE(te->super.sig);// signal of this time event
497 QS_OBJ_PRE(act); // the target AO
498 QS_U8_PRE(tickRate); // tick rate
499 QS_END_PRE()
500
501 #ifdef QXK_H_
502 if ((enum_t)te->super.sig < Q_USER_SIG) {
503 QXThread_timeout_(act);
504 QF_MEM_APP();
505 QF_CRIT_EXIT();
506 }
507 else {
508 QF_MEM_APP();
509 QF_CRIT_EXIT(); // exit crit. section before posting
510
511 // QACTIVE_POST() asserts if the queue overflows
512 QACTIVE_POST(act, &te->super, sender);
513 }
514 #else
515 QF_MEM_APP();
516 QF_CRIT_EXIT(); // exit crit. section before posting
517
518 // QACTIVE_POST() asserts if the queue overflows
519 QACTIVE_POST(act, &te->super, sender);
520 #endif
521 }
522 else { // time event keeps timing out
523 --ctr; // decrement the tick counter
524 te->ctr = ctr; // update the original
525 #ifndef Q_UNSAFE
526 te->ctr_dis = (QTimeEvtCtr)~ctr;
527 #endif // ndef Q_UNSAFE
528
529 prev = te; // advance to this time event
530
531 QF_MEM_APP();
532 QF_CRIT_EXIT(); // exit crit. section to reduce latency
533
534 // prevent merging critical sections, see NOTE above
536 }
537 QF_CRIT_ENTRY(); // re-enter crit. section to continue the loop
538 QF_MEM_SYS();
539 }
540
541 Q_ENSURE_INCRIT(890, lbound > 0U);
542 QF_MEM_APP();
543 QF_CRIT_EXIT();
544}
545
546//${QF::QTimeEvt::noActive} ..................................................
547//! @static @public @memberof QTimeEvt
548bool QTimeEvt_noActive(uint_fast8_t const tickRate) {
551 Q_REQUIRE_INCRIT(900, tickRate < QF_MAX_TICK_RATE);
552 QF_CRIT_EXIT();
553
554 bool inactive;
555 if (QTimeEvt_timeEvtHead_[tickRate].next != (QTimeEvt *)0) {
556 inactive = false;
557 }
558 else if ((QTimeEvt_timeEvtHead_[tickRate].act != (void *)0)) {
559 inactive = false;
560 }
561 else {
562 inactive = true;
563 }
564 return inactive;
565}
566//$enddef${QF::QTimeEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#define QF_MEM_APP()
Definition qp.h:1280
#define Q_UNUSED_PAR(par_)
Helper macro to clearly mark unused parameters of functions.
Definition qp.h:525
#define Q_USER_SIG
offset for the user signals (QP Application))
Definition qp.h:489
uint32_t QTimeEvtCtr
Data type to store the block-size defined based on the macro QF_TIMEEVT_CTR_SIZE.
Definition qp.h:609
#define QF_MEM_SYS()
Definition qp.h:1275
#define QACTIVE_POST(me_, e_, sender_)
Invoke the direct event posting facility QActive_post_().
Definition qp.h:1199
int enum_t
Definition qp.h:99
#define Q_DIM(array_)
Definition qp.h:528
#define QF_CRIT_EXIT_NOP()
No-operation for exiting a critical section.
Definition qp.h:1261
#define QF_MAX_TICK_RATE
Maximum # clock tick rates in the system (0..15)
Definition qp_config.h:143
#define QF_MAX_ACTIVE
Maximum # Active Objects in the system (1..64)
Definition qp_config.h:123
Internal (package scope) QP/C interface.
#define Q_PTR2UINT_CAST_(ptr_)
Definition qp_pkg.h:95
#define QACTIVE_CAST_(ptr_)
Definition qp_pkg.h:94
#define QTE_FLAG_WAS_DISARMED
Definition qp_pkg.h:74
#define QTE_FLAG_IS_LINKED
Definition qp_pkg.h:73
Sample QP/C port.
#define QS_OBJ_PRE(obj_)
Definition qs_dummy.h:150
#define QS_TEC_PRE(ctr_)
Definition qs_dummy.h:155
#define QS_SIG_PRE(sig_)
Definition qs_dummy.h:148
#define QS_TIME_PRE()
Definition qs_dummy.h:147
#define QS_2U8_PRE(data1_, data2_)
Definition qs_dummy.h:144
#define QS_U8_PRE(data_)
Definition qs_dummy.h:143
#define QS_END_PRE()
Definition qs_dummy.h:142
#define QS_BEGIN_PRE(rec_, qsId_)
Definition qs_dummy.h:141
Sample QS/C port.
QP Functional Safety (FuSa) Subsystem.
#define QF_CRIT_ENTRY()
Definition qsafe.h:50
#define Q_ASSERT_INCRIT(id_, expr_)
Definition qsafe.h:64
#define Q_INVARIANT_INCRIT(id_, expr_)
Definition qsafe.h:146
#define Q_ENSURE_INCRIT(id_, expr_)
Definition qsafe.h:137
#define QF_CRIT_EXIT()
Definition qsafe.h:54
#define Q_REQUIRE_INCRIT(id_, expr_)
Definition qsafe.h:128
#define QF_CRIT_STAT
Definition qsafe.h:46
Active object class (based on the QHsm implementation strategy)
Definition qp.h:779
uint8_t prio
QF-priority [1..QF_MAX_ACTIVE] of this AO.
Definition qp.h:784
QSignal sig
Signal of the event (see Event Signal)
Definition qp.h:135
Time Event class.
Definition qp.h:946
struct QTimeEvt *volatile next
Link to the next time event in the list.
Definition qp.h:953
QTimeEvtCtr volatile ctr
Down-counter of the time event.
Definition qp.h:964
QTimeEvtCtr ctr_dis
Definition qp.h:968
uintptr_t next_dis
Definition qp.h:957
QTimeEvtCtr interval
Interval for periodic time event (zero for one-shot time event)
Definition qp.h:972
QEvt super
Definition qp.h:948
uint8_t flags
Definition qp.h:978
void * act
Active object that receives the time events.
Definition qp.h:961
uint8_t tickRate
Definition qp.h:975