46Q_DEFINE_THIS_MODULE(
"qf_time")
50#if (QP_VERSION < 730U) || (QP_VERSION != ((QP_RELEASE^4294967295U)%0x2710U))
51#error qpc version 7.3.0 or higher required
65void QTimeEvt_ctorX(
QTimeEvt *
const me,
68 uint_fast8_t
const tickRate)
76 QEvt_ctor(&me->
super, sig);
94 uint32_t
const nTicks,
95 uint32_t
const interval)
102 #if (QF_TIMEEVT_CTR_SIZE == 1U)
104 #elif (QF_TIMEEVT_CTR_SIZE == 2U)
113 uint8_t
const tickRate = me->
tickRate;
115 uint_fast8_t
const qsId = ((
QActive *)(me->
act))->prio;
121 && (me->
act != (
void *)0)
156 (uintptr_t)(~QTimeEvt_timeEvtHead_dis_[tickRate]));
158 me->
next = (
QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act;
159 QTimeEvt_timeEvtHead_[tickRate].
act = me;
238 uint32_t
const nTicks)
245 #if (QF_TIMEEVT_CTR_SIZE == 1U)
247 #elif (QF_TIMEEVT_CTR_SIZE == 2U)
251 uint8_t
const tickRate = me->
tickRate;
256 && (me->
act != (
void *)0)
266 uint_fast8_t
const qsId = ((
QActive *)(me->
act))->prio;
300 (uintptr_t)(~QTimeEvt_timeEvtHead_dis_[tickRate]));
302 me->
next = (
QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act;
303 QTimeEvt_timeEvtHead_[tickRate].
act = me;
306 QTimeEvt_timeEvtHead_dis_[tickRate] =
359void QTimeEvt_init(
void) {
360 for (uint_fast8_t tickRate = 0U;
361 tickRate <
Q_DIM(QTimeEvt_timeEvtHead_);
364 QTimeEvt_ctorX(&QTimeEvt_timeEvtHead_[tickRate],
367 QTimeEvt_timeEvtHead_dis_[tickRate] =
376 uint_fast8_t
const tickRate,
377 void const *
const sender)
389 QTimeEvt *prev = &QTimeEvt_timeEvtHead_[tickRate];
399 for (; lbound > 0U; --lbound) {
411 if (QTimeEvt_timeEvtHead_[tickRate].act != (
void *)0) {
415 == (uintptr_t)~QTimeEvt_timeEvtHead_dis_[tickRate]);
417 prev->
next = (
QTimeEvt*)QTimeEvt_timeEvtHead_[tickRate].act;
418 QTimeEvt_timeEvtHead_[tickRate].
act = (
void *)0;
421 QTimeEvt_timeEvtHead_dis_[tickRate] =
465 else if (ctr == 1U) {
503 QXThread_timeout_(act);
548bool QTimeEvt_noActive(uint_fast8_t
const tickRate) {
555 if (QTimeEvt_timeEvtHead_[tickRate].next != (
QTimeEvt *)0) {
558 else if ((QTimeEvt_timeEvtHead_[tickRate].act != (
void *)0)) {
#define Q_UNUSED_PAR(par_)
Helper macro to clearly mark unused parameters of functions.
#define Q_USER_SIG
offset for the user signals (QP Application))
uint32_t QTimeEvtCtr
Data type to store the block-size defined based on the macro QF_TIMEEVT_CTR_SIZE.
#define QACTIVE_POST(me_, e_, sender_)
Invoke the direct event posting facility QActive_post_().
#define QF_CRIT_EXIT_NOP()
No-operation for exiting a critical section.
#define QF_MAX_TICK_RATE
Maximum # clock tick rates in the system (0..15)
#define QF_MAX_ACTIVE
Maximum # Active Objects in the system (1..64)
Internal (package scope) QP/C interface.
#define Q_PTR2UINT_CAST_(ptr_)
#define QACTIVE_CAST_(ptr_)
#define QTE_FLAG_WAS_DISARMED
#define QTE_FLAG_IS_LINKED
#define QS_2U8_PRE(data1_, data2_)
#define QS_BEGIN_PRE(rec_, qsId_)
QP Functional Safety (FuSa) Subsystem.
#define Q_ASSERT_INCRIT(id_, expr_)
#define Q_INVARIANT_INCRIT(id_, expr_)
#define Q_ENSURE_INCRIT(id_, expr_)
#define Q_REQUIRE_INCRIT(id_, expr_)
Active object class (based on the QHsm implementation strategy)
uint8_t prio
QF-priority [1..QF_MAX_ACTIVE] of this AO.
QSignal sig
Signal of the event (see Event Signal)
struct QTimeEvt *volatile next
Link to the next time event in the list.
QTimeEvtCtr volatile ctr
Down-counter of the time event.
QTimeEvtCtr interval
Interval for periodic time event (zero for one-shot time event)
void * act
Active object that receives the time events.