40Q_DEFINE_THIS_MODULE(
"qf_time")
47void QTimeEvt_ctorX(
QTimeEvt * const me,
50 uint_fast8_t const tickRate)
58 QEvt_ctor(&me->super, sig);
64 me->tickRate = (uint8_t)tickRate;
67 me->super.refCtr_ = 0U;
73 uint32_t
const nTicks,
80#if (QF_TIMEEVT_CTR_SIZE == 1U)
82#elif (QF_TIMEEVT_CTR_SIZE == 2U)
89 uint_fast8_t
const qsId = ((
QActive *)(me->
act))->prio;
95 && (me->
act != (
void *)0)
147 bool wasArmed =
false;
181 uint32_t
const nTicks)
187#if (QF_TIMEEVT_CTR_SIZE == 1U)
189#elif (QF_TIMEEVT_CTR_SIZE == 2U)
198 && (me->
act != (
void *)0)
202 uint_fast8_t
const qsId = ((
QActive *)(me->
act))->prio;
208 bool wasArmed =
false;
288 void const *
const sender)
340 else if (
ctr == 1U) {
346 QXThread_timeout_(
act);
380 bool inactive =
false;
#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_MAX_TICK_RATE
Maximum # clock tick rates in the system (0..15)
Internal (package scope) QP/C interface.
#define QACTIVE_CAST_(ptr_)
#define QTE_FLAG_WAS_DISARMED
#define QTE_FLAG_IS_LINKED
QS/C dummy public interface.
#define QS_2U8_PRE(data1_, data2_)
#define QS_BEGIN_PRE(rec_, qsId_)
QP Functional Safety (FuSa) Subsystem.
#define Q_ASSERT_INCRIT(id_, expr_)
General-purpose assertion with user-specified ID number (in critical section)
#define Q_REQUIRE_INCRIT(id_, expr_)
Assertion for checking a precondition (in critical section)
Active object class (based on the QHsm implementation strategy)
QSignal sig
Signal of the event (see Event Signal)
void QTimeEvt_ctorX(QTimeEvt *const me, QActive *const act, enum_t const sig, uint_fast8_t const tickRate)
The "extended" constructor to initialize a Time Event.
struct QTimeEvt *volatile next
Link to the next time event in the list.
QTimeEvtCtr volatile ctr
Down-counter of the time event.
bool QTimeEvt_noActive(uint_fast8_t const tickRate)
Check if any time events are active at a given clock tick rate.
void QTimeEvt_armX(QTimeEvt *const me, uint32_t const nTicks, uint32_t const interval)
Arm a time event (extended version for one shot or periodic time event)
void QTimeEvt_tick_(uint_fast8_t const tickRate, void const *const sender)
Processes all armed time events at every clock tick.
QTimeEvt * QTimeEvt_expire_(QTimeEvt *const me, QTimeEvt *const prev_link, QActive const *const act, uint_fast8_t const tickRate)
QTimeEvtCtr interval
Interval for periodic time event (zero for one-shot time event)
QTimeEvtCtr QTimeEvt_currCtr(QTimeEvt const *const me)
Get the current value of the down-counter of a time event.
QTimeEvt QTimeEvt_timeEvtHead_[QF_MAX_TICK_RATE]
Static array of heads of linked lists of time events (one for every clock tick rate)
bool QTimeEvt_rearm(QTimeEvt *const me, uint32_t const nTicks)
Rearm a time event.
bool QTimeEvt_wasDisarmed(QTimeEvt *const me)
Check the "was disarmed" status of a time event.
bool QTimeEvt_disarm(QTimeEvt *const me)
Disarm a time event.
void * act
Active object that receives the time events.