40Q_DEFINE_THIS_MODULE(
"qf_qact")
56 QHsm_ctor((
QHsm *)(me), initial);
65 &QHsm_getStateHandler_
67 me->super.vptr = &vtable;
76 if (me->
pthre == 0U) {
90 uint8_t prev_thre = me->
pthre;
91 uint8_t next_thre = me->
pthre;
93 for (uint8_t p = me->
prio - 1U; p > 0U; --p) {
109 (prev_thre <= me->
pthre) && (me->
pthre <= next_thre));
125 uint8_t
const p = me->
prio;
143 static uint8_t
const log2LUT[16] = {
144 0U, 1U, 2U, 2U, 3U, 3U, 3U, 3U,
145 4U, 4U, 4U, 4U, 4U, 4U, 4U, 4U
151#if (QF_MAX_ACTIVE > 16U)
158#if (QF_MAX_ACTIVE > 8U)
171 return (uint_fast8_t)(n + log2LUT[x]);
179#if (QF_MAX_ACTIVE > 32)
186#if (QF_MAX_ACTIVE <= 32U)
187 return (me->
bits0 == 0U);
189 return (me->
bits0 == 0U)
197#if (QF_MAX_ACTIVE <= 32U)
198 return (me->
bits0 != 0U);
200 return (me->
bits0 != 0U)
208#if (QF_MAX_ACTIVE <= 32U)
220#if (QF_MAX_ACTIVE <= 32U)
235#if (QF_MAX_ACTIVE <= 32U)
250#if (QF_MAX_ACTIVE <= 32U)
254 return (me->
bits1 != 0U)
#define Q_STATE_CAST(handler_)
Perform cast to QStateHandler.
uint32_t QPSetBits
Bitmask for the internal representation of QPSet elements.
QState(* QStateHandler)(void *const me, QEvt const *const e)
Pointer to a state-handler function.
#define QF_MAX_ACTIVE
Maximum # Active Objects in the system (1..64).
QP/C Framework in C internal (package-scope) interface.
#define QF_LOG2(bitmask_)
Port-specific integer log-base-2 of a 32-bit bitmask.
QS (QP/Spy software tracing) internal (package-scope) interface.
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).
void QActive_unregister_(QActive *const me)
Un-register the active object from the framework.
void QActive_ctor(QActive *const me, QStateHandler const initial)
QActive constructor (abstract base class).
void QActive_register_(QActive *const me)
Register this active object to be managed by the framework.
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.
uint8_t pthre
Preemption-threshold [1..QF_MAX_ACTIVE] of this AO.
union QAsmAttr state
Current state (pointer to the current state-handler function).
Virtual table for the QAsm class.
Private attributes of the QF framework.
Hierarchical State Machine class (QHsm-style state machine implementation strategy).
Set of Active Objects of up to QF_MAX_ACTIVE elements.
void QPSet_remove(QPSet *const me, uint_fast8_t const n)
Remove element n from the priority-set (n = 1..QF_MAX_ACTIVE).
bool QPSet_isEmpty(QPSet const *const me)
Find out whether the priority-set is empty.
bool QPSet_notEmpty(QPSet const *const me)
Find out whether the priority-set is NOT empty.
void QPSet_insert(QPSet *const me, uint_fast8_t const n)
Insert element n into the priority-set (n = 1..QF_MAX_ACTIVE).
void QPSet_setEmpty(QPSet *const me)
Make the priority set empty.
bool QPSet_hasElement(QPSet const *const me, uint_fast8_t const n)
Find out whether the priority-set has element n.
QPSetBits bits0
Bitmask for elements 1..32.
QPSetBits bits1
Bitmask for elements 33..64.
uint_fast8_t QPSet_findMax(QPSet const *const me)
Find the maximum element in the set–returns zero if the set is empty.