40Q_DEFINE_THIS_MODULE(
"qf_actq")
43static
void QActive_postFIFO_(
QActive * const me,
45 void const * const sender);
49bool QActive_post_(
QActive * const me,
51 uint_fast16_t const margin,
52 void const * const sender)
57 return QActiveDummy_fakePost_(me, e, margin, sender);
88#if (QF_MAX_EPOOL > 0U)
89 if (e->poolNum_ != 0U) {
96 QActive_postFIFO_(me, e, sender);
111 if (QS_LOC_CHECK_(me->prio)) {
113 QS_onTestPost(sender, me, e, status);
120#if (QF_MAX_EPOOL > 0U)
131 QEvt const *
const e)
136 QActiveDummy_fakePostLIFO_(me, e);
161 if (me->
eQueue.nMin > tmp) {
178 if (QS_LOC_CHECK_(me->
prio)) {
187 QEvt const *
const frontEvt = me->
eQueue.frontEvt;
190 if (frontEvt != (
QEvt *)0) {
193 if (tmp == me->
eQueue.end) {
197 me->
eQueue.ring[tmp] = frontEvt;
226 if (tmp <= me->
eQueue.end) {
238 QEvt const *
const frontEvt = me->
eQueue.ring[tmp];
241 me->
eQueue.frontEvt = frontEvt;
272 QEvt const *
const e,
273 void const *
const sender)
284 if (me->
eQueue.nMin > tmp) {
299 if (QS_LOC_CHECK_(me->
prio)) {
311 QXTHREAD_EQUEUE_SIGNAL_(me);
340 uint_fast16_t
const min =
350 uint_fast8_t
const tickRate)
359 ,&QHsm_getStateHandler_
372 void const *
const par,
373 uint_fast8_t
const qsId)
391 QEvt const *
const e,
392 uint_fast8_t
const qsId)
410 for (; nTicks > 0U; --nTicks) {
411 QTimeEvt_tick_((uint_fast8_t)tickRate, me);
419 void const *
const sender)
437 me->
eQueue.frontEvt = &tickEvt;
#define QACTIVE_EQUEUE_SIGNAL_(me_)
#define QACTIVE_EQUEUE_WAIT_(me_)
#define Q_UNUSED_PAR(par_)
Helper macro to clearly mark unused parameters of functions.
#define QF_NO_MARGIN
Special value of margin that causes asserting failure in case event allocation or event posting fails...
#define Q_STATE_CAST(handler_)
Perform cast to QStateHandler.
#define Q_ACTION_CAST(action_)
Perform cast to QActionHandler.
#define QEVT_INITIALIZER(sig_)
Initializer for immutable (constant) QEvt instances.
#define QF_MAX_ACTIVE
Maximum # Active Objects in the system (1..64)
Internal (package scope) QP/C interface.
#define QACTIVE_CAST_(ptr_)
QS/C dummy public interface.
void QS_onTestPost(void const *sender, QActive *recipient, QEvt const *e, bool status)
#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)
#define Q_ERROR_INCRIT(id_)
Assertion with user-specified ID for a wrong path through the code (in critical section)
Active object class (based on the QHsm implementation strategy)
QEvt const * QActive_get_(QActive *const me)
Get an event from the event queue of an active object.
void QActive_postLIFO_(QActive *const me, QEvt const *const e)
Posts an event e directly to the event queue of the active object using the Last-In-First-Out (LIFO) ...
void QActive_ctor(QActive *const me, QStateHandler const initial)
QActive constructor (abstract base class)
uint_fast16_t QActive_getQueueMin(uint_fast8_t const prio)
This function returns the minimum of free entries of the given event queue.
QACTIVE_EQUEUE_TYPE eQueue
Port-dependent event-queue type (often QEQueue)
static void QActive_postFIFO_(QActive *const me, QEvt const *const e, void const *const sender)
QActive * QActive_registry_[QF_MAX_ACTIVE+1U]
Static (one per-class) array of registered active objects.
uint8_t prio
QF-priority [1..QF_MAX_ACTIVE] of this AO.
Abstract State Machine class (state machine interface)
struct QAsmVtable const * vptr
Virtual pointer inherited by all QAsm subclasses (see also SAS_QP_OO)
union QAsmAttr state
Current state (pointer to the current state-handler function)
union QAsmAttr temp
Temporary storage for target/act-table etc.
Virtual table for the QAsm class.
QSignal sig
Signal of the event (see Event Signal)
uint8_t volatile refCtr_
Event reference counter.
uint8_t poolNum_
Event pool number of this event.
"Ticker" Active Object class
void QTicker_init_(QAsm *const me, void const *const par, uint_fast8_t const qsId)
void QTicker_trig_(QActive *const me, void const *const sender)
Asynchronously trigger the QTicker active object to perform tick processing.
void QTicker_dispatch_(QAsm *const me, QEvt const *const e, uint_fast8_t const qsId)
void QTicker_ctor(QTicker *const me, uint_fast8_t const tickRate)
Constructor of the QTicker Active Object class.