46#if (QF_MAX_EPOOL > 0U)
50Q_DEFINE_THIS_MODULE(
"qf_dyn")
55#if (QP_VERSION < 730U) || (QP_VERSION != ((QP_RELEASE^4294967295U)%0x2710U))
56#error qpcpp version 7.3.0 or higher required
66 std::uint_fast32_t
const poolSize,
67 std::uint_fast16_t
const evtSize)
noexcept
92 std::uint8_t obj_name[9] =
"EvtPool?";
93 obj_name[7] =
static_cast<std::uint8_t
>(
94 static_cast<std::uint8_t
>(
'0')
95 +
static_cast<std::uint8_t
>(poolNum + 1U));
97 reinterpret_cast<char *
>(&obj_name[0]));
107 std::uint_fast16_t
const max_size =
116std::uint_fast16_t
getPoolMin(std::uint_fast8_t
const poolNum)
noexcept {
124 std::uint_fast16_t
const min =
static_cast<std::uint_fast16_t
>(
135 std::uint_fast16_t
const evtSize,
136 std::uint_fast16_t
const margin,
137 enum_t const sig)
noexcept
144 std::uint_fast8_t poolNum = 0U;
165 static_cast<std::uint_fast8_t
>(QS_EP_ID) + poolNum);
168 ((margin !=
NO_MARGIN) ? margin : 0U), 0U);
173 e->
evtTag_ =
static_cast<std::uint8_t
>((poolNum << 4U) | 0x0FU);
179 static_cast<std::uint_fast8_t
>(QS_EP_ID) + poolNum)
197 static_cast<std::uint_fast8_t
>(QS_EP_ID) + poolNum)
219 std::uint_fast8_t
const poolNum = e->getPoolNum_();
224 if (e->refCtr_ > 1U) {
227 static_cast<std::uint_fast8_t
>(QS_EP_ID) + poolNum)
241 static_cast<std::uint_fast8_t
>(QS_EP_ID) + poolNum)
257 static_cast<std::uint_fast8_t
>(QS_EP_ID) + poolNum);
271 QEvt const *
const e,
272 QEvt const *
const evtRef)
noexcept
284 std::uint_fast8_t
const poolNum = e->getPoolNum_();
288 && (evtRef ==
nullptr));
294 static_cast<std::uint_fast8_t
>(QS_EP_ID) + poolNum)
311 QEvt const *
const e = evtRef;
316 std::uint_fast8_t
const poolNum = e->
getPoolNum_();
321 static_cast<std::uint_fast8_t
>(QS_EP_ID) + poolNum)
330 #if (QF_MAX_EPOOL > 0U)
QSignal sig
Signal of the event (see Event Signal)
std::uint8_t volatile refCtr_
Event reference counter.)
bool verify_() const noexcept
Internal function to verify the internal integrity of the event instance (QP FuSa Subsystem)
std::uint8_t evtTag_
Event "tag" contains pool-ID plus the Duplicate Inverted Storage of the QEvt::refCtr_.
std::uint_fast8_t getPoolNum_() const noexcept
Internal function to get the event pool-number of the given event.
QF_EPOOL_TYPE_ ePool_[QF_MAX_EPOOL]
Array of event pools sized for the maximum allowed number of pools.
std::uint_fast8_t maxPool_
Number of event pools managed by the QF Framework.
QF Active Object Framework namespace.
void deleteRef_(QEvt const *const evtRef) noexcept
QEvt const * newRef_(QEvt const *const e, QEvt const *const evtRef) noexcept
void gc(QEvt const *const e) noexcept
Recycle a mutable (mutable) event.
std::uint_fast16_t getPoolMin(std::uint_fast8_t const poolNum) noexcept
std::uint_fast16_t poolGetMaxBlockSize() noexcept
void poolInit(void *const poolSto, std::uint_fast32_t const poolSize, std::uint_fast16_t const evtSize) noexcept
constexpr std::uint_fast16_t NO_MARGIN
QEvt * newX_(std::uint_fast16_t const evtSize, std::uint_fast16_t const margin, enum_t const sig) noexcept
void QEvt_refCtr_inc_(QEvt const *const e) noexcept
void QEvt_refCtr_dec_(QEvt const *const e) noexcept
Decrement the refCtr of a const event (requires casting const away)
std::uint16_t QSignal
The signal of event QP::QEvt.
#define QF_EPOOL_EVENT_SIZE_(p_)
#define QF_EPOOL_PUT_(p_, e_, qsId_)
#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_)
#define QF_EPOOL_GET_(p_, e_, m_, qsId_)
#define Q_UNUSED_PAR(par_)
Helper macro to clearly mark unused parameters of functions.
#define QF_MAX_EPOOL
Maximum # event pools in the system (0..15)
Internal (package scope) QP/C++ interface.
#define QF_CONST_CAST_(type_, ptr_)
#define QS_2U8_PRE(data1_, data2_)
#define QS_EVS_PRE(size_)
#define QS_BEGIN_PRE(rec_, qsId_)
QS/C++ port to a 32-bit CPU, generic C++ compiler.
QP Functional Safety (FuSa) Subsystem.
#define Q_ASSERT_INCRIT(id_, expr_)
#define Q_INVARIANT_INCRIT(id_, expr_)
#define Q_REQUIRE_INCRIT(id_, expr_)