48Q_DEFINE_THIS_MODULE(
"qf_ps")
53#if (QP_VERSION < 730U) || (QP_VERSION != ((QP_RELEASE^4294967295U)%0x2710U))
54#error qpcpp version 7.3.0 or higher required
77 enum_t const maxSignal)
noexcept
79 subscrList_ = subscrSto;
80 maxPubSignal_ = maxSignal;
83 for (
enum_t sig = 0; sig < maxSignal; ++sig) {
84 subscrSto[sig].m_set.setEmpty();
86 subscrSto[sig].m_set.update_(&subscrSto[sig].m_set_dis);
100 void const *
const sender,
101 std::uint_fast8_t
const qsId)
noexcept
116 subscrList_[sig].m_set.verify_(&subscrList_[sig].m_set_dis));
126 if (e->getPoolNum_() != 0U) {
137 QPSet subscrSet = subscrList_[sig].m_set;
144 std::uint_fast8_t p = subscrSet.
findMax();
182 }
while ((p != 0U) && (lbound > 0U));
194 #if (QF_MAX_EPOOL > 0U)
207 std::uint_fast8_t
const p =
static_cast<std::uint_fast8_t
>(m_prio);
214 && (sig < maxPubSignal_)
216 && (registry_[p] ==
this));
218 subscrList_[sig].m_set.verify_(&subscrList_[sig].m_set_dis));
227 subscrList_[sig].m_set.insert(p);
229 subscrList_[sig].m_set.update_(&subscrList_[sig].m_set_dis);
244 std::uint_fast8_t
const p =
static_cast<std::uint_fast8_t
>(m_prio);
251 && (sig < maxPubSignal_)
253 && (registry_[p] ==
this));
255 subscrList_[sig].m_set.verify_(&subscrList_[sig].m_set_dis));
264 subscrList_[sig].m_set.remove(p);
266 subscrList_[sig].m_set.update_(&subscrList_[sig].m_set_dis);
285 std::uint_fast8_t
const p =
static_cast<std::uint_fast8_t
>(
m_prio);
Active object class (based on the QHsm implementation strategy)
void subscribe(enum_t const sig) const noexcept
static QActive * registry_[QF_MAX_ACTIVE+1U]
static QSubscrList * subscrList_
void unsubscribe(enum_t const sig) const noexcept
static void publish_(QEvt const *const e, void const *const sender, std::uint_fast8_t const qsId) noexcept
static void psInit(QSubscrList *const subscrSto, enum_t const maxSignal) noexcept
static enum_t maxPubSignal_
void unsubscribeAll() const noexcept
Set of Active Objects of up to QF_MAX_ACTIVE elements.
std::uint_fast8_t findMax() const noexcept
void remove(std::uint_fast8_t const n) noexcept
bool notEmpty() const noexcept
void update_(QPSet *const dis) const noexcept
Subscriber List (for publish-subscribe)
void gc(QEvt const *const e) noexcept
Recycle a mutable (mutable) event.
constexpr enum_t Q_USER_SIG
void QEvt_refCtr_inc_(QEvt const *const e) noexcept
std::uint16_t QSignal
The signal of event QP::QEvt.
#define QF_SCHED_LOCK_(ceil_)
#define QF_SCHED_UNLOCK_()
#define Q_UNUSED_PAR(par_)
Helper macro to clearly mark unused parameters of functions.
#define QF_CRIT_EXIT_NOP()
#define QF_MAX_ACTIVE
Maximum # Active Objects in the system (1..64)
Internal (package scope) QP/C++ interface.
#define QS_2U8_PRE(data1_, data2_)
#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_ENSURE_INCRIT(id_, expr_)
#define Q_REQUIRE_INCRIT(id_, expr_)