33#define QP_VERSION_STR "8.0.4"
34#define QP_VERSION 804U
36#define QP_RELEASE 0x6A9FC8ABU
43#define Q_SIGNAL_SIZE 2U
47#define QF_MAX_ACTIVE 32U
50#if (QF_MAX_ACTIVE > 64U)
51#error QF_MAX_ACTIVE exceeds the maximum of 64U;
54#ifndef QF_MAX_TICK_RATE
55#define QF_MAX_TICK_RATE 1U
58#if (QF_MAX_TICK_RATE > 15U)
59#error QF_MAX_TICK_RATE exceeds the maximum of 15U;
63#define QF_MAX_EPOOL 3U
66#if (QF_MAX_EPOOL > 15U)
67#error QF_MAX_EPOOL exceeds the maximum of 15U;
70#ifndef QF_TIMEEVT_CTR_SIZE
71#define QF_TIMEEVT_CTR_SIZE 4U
74#if (QF_TIMEEVT_CTR_SIZE > 4U)
75#error QF_TIMEEVT_CTR_SIZE defined incorrectly, expected 1U, 2U, or 4U;
78#ifndef QF_EVENT_SIZ_SIZE
79#define QF_EVENT_SIZ_SIZE 2U
82#if (QF_EVENT_SIZ_SIZE > 4U)
83#error QF_EVENT_SIZ_SIZE defined incorrectly, expected 1U, 2U, or 4U;
94#define Q_UNUSED_PAR(par_) (static_cast<void>(par_))
95#define Q_DIM(array_) (sizeof(array_) / sizeof((array_)[0U]))
96#define Q_UINT2PTR_CAST(type_, uint_) (reinterpret_cast<type_ *>(uint_))
104#if (Q_SIGNAL_SIZE == 1U)
106#elif (Q_SIGNAL_SIZE == 2U)
108#elif (Q_SIGNAL_SIZE == 4U)
216 void const *
const e,
217 std::uint_fast8_t
const qsId) = 0;
218 virtual void init(std::uint_fast8_t
const qsId) {
219 this->
init(
nullptr, qsId);
222 QEvt const *
const e,
223 std::uint_fast8_t
const qsId) = 0;
243 QEvt const *
const e)
noexcept
245 static_cast<void>(me);
246 static_cast<void>(e);
278 void const *
const tatbl)
noexcept
294 static_cast<void>(s);
306 static_cast<void>(s);
319 void const *
const e,
320 std::uint_fast8_t
const qsId)
override;
321 void init(std::uint_fast8_t
const qsId)
override {
322 this->
init(
nullptr, qsId);
325 QEvt const *
const e,
326 std::uint_fast8_t
const qsId)
override;
339 std::uint_fast8_t
const qsId);
343 std::uint_fast8_t
const qsId);
347 std::int_fast8_t
const depth,
348 std::uint_fast8_t
const qsId);
361 void const *
const e,
362 std::uint_fast8_t
const qsId)
override;
363 void init(std::uint_fast8_t
const qsId)
override {
364 this->
init(
nullptr, qsId);
367 QEvt const *
const e,
368 std::uint_fast8_t
const qsId)
override;
372 return m_state.obj->stateHandler;
383 std::uint_fast8_t const qsId);
385 QMState const * const curr_state,
386 QMState const * const tran_source,
387 std::uint_fast8_t const qsId);
390 std::uint_fast8_t const qsId);
401#define Q_STATE_DECL(state_) \
402 QP::QState state_ ## _h(QP::QEvt const * const e); \
403 static QP::QState state_(void * const me, QP::QEvt const * const e)
405#define Q_STATE_DEF(subclass_, state_) \
406 QP::QState subclass_::state_(void * const me, QP::QEvt const * const e) { \
407 return static_cast<subclass_ *>(me)->state_ ## _h(e); } \
408 QP::QState subclass_::state_ ## _h(QP::QEvt const * const e)
410#define Q_HANDLED() (Q_RET_HANDLED)
411#define Q_UNHANDLED() (Q_RET_UNHANDLED)
413#define Q_EVT_CAST(subclass_) (static_cast<subclass_ const *>(e))
414#define Q_STATE_CAST(handler_) (reinterpret_cast<QP::QStateHandler>(handler_))
416#define QM_STATE_DECL(state_) \
417 QP::QState state_ ## _h(QP::QEvt const * const e); \
418 static QP::QState state_(void * const me, QP::QEvt const * const e); \
419 static QP::QMState const state_ ## _s
421#define QM_ACTION_DECL(action_) \
422 QP::QState action_ ## _h(); \
423 static QP::QState action_(void * const me)
425#define QM_STATE_DEF(subclass_, state_) \
426 QP::QState subclass_::state_(void * const me, QP::QEvt const * const e) {\
427 return static_cast<subclass_ *>(me)->state_ ## _h(e); } \
428 QP::QState subclass_::state_ ## _h(QP::QEvt const * const e)
430#define QM_ACTION_DEF(subclass_, action_) \
431 QP::QState subclass_::action_(void * const me) { \
432 return static_cast<subclass_ *>(me)->action_ ## _h(); } \
433 QP::QState subclass_::action_ ## _h()
435#define QM_HANDLED() (Q_RET_HANDLED)
436#define QM_UNHANDLED() (Q_RET_HANDLED)
437#define QM_SUPER() (Q_RET_SUPER)
438#define QM_STATE_NULL (nullptr)
439#define Q_ACTION_NULL (nullptr)
442 #define INIT(qsId_) init((qsId_))
443 #define DISPATCH(e_, qsId_) dispatch((e_), (qsId_))
445 #define INIT(dummy) init(0U)
446 #define DISPATCH(e_, dummy) dispatch((e_), 0U)
454#if (QF_TIMEEVT_CTR_SIZE == 1U)
456#elif (QF_TIMEEVT_CTR_SIZE == 2U)
458#elif (QF_TIMEEVT_CTR_SIZE == 4U)
462#if (QF_MAX_ACTIVE <= 8U)
464#elif (8U < QF_MAX_ACTIVE) && (QF_MAX_ACTIVE <= 16U)
466#elif (16 < QF_MAX_ACTIVE)
482#if (QF_MAX_ACTIVE > 32)
487#if (QF_MAX_ACTIVE <= 32U)
494#if (QF_MAX_ACTIVE <= 32U)
501#if (QF_MAX_ACTIVE <= 32U)
509 void insert(std::uint_fast8_t
const n)
noexcept {
510#if (QF_MAX_ACTIVE <= 32U)
521 void remove(std::uint_fast8_t
const n)
noexcept {
522#if (QF_MAX_ACTIVE <= 32U)
534#if (QF_MAX_ACTIVE <= 32U)
569 std::uint_fast8_t const pthre_in) noexcept;
597#ifdef QACTIVE_THREAD_TYPE
601#ifdef QACTIVE_OS_OBJ_TYPE
605#ifdef QACTIVE_EQUEUE_TYPE
614 void const *
const e,
615 std::uint_fast8_t
const qsId)
override
619 void init(std::uint_fast8_t
const qsId)
override {
620 this->
init(
nullptr, qsId);
623 QEvt const *
const e,
624 std::uint_fast8_t
const qsId)
override
636 void const * attr2 =
nullptr);
640 std::uint_fast16_t
const qLen,
642 std::uint_fast16_t
const stkSize,
643 void const *
const par);
647 std::uint_fast16_t
const qLen,
649 std::uint_fast16_t
const stkSize)
651 this->
start(prioSpec, qSto, qLen, stkSto, stkSize,
nullptr);
654#ifdef QACTIVE_CAN_STOP
660 QEvt const * const e,
661 std::uint_fast16_t const margin,
662 void const * const sender) noexcept;
666 std::uint_fast8_t const prio) noexcept;
669 enum_t const maxSignal) noexcept;
671 QEvt const * const e,
672 void const * const sender,
673 std::uint_fast8_t const qsId) noexcept;
679 QEvt const * const e) const noexcept;
683 std::uint_fast16_t const num = 0xFFFFU) const noexcept;
690#ifdef QACTIVE_THREAD_TYPE
699#ifdef QACTIVE_OS_OBJ_TYPE
707 QEvt const *
const e,
708 std::uint_fast16_t
const margin,
710 void const *
const sender)
noexcept;
715 void const * sender)
noexcept;
720 QEvt const *
const e,
721 void const *
const sender);
744 friend std::uint_fast8_t
QK_sched_() noexcept;
747 std::uint_fast8_t const pthre_in) noexcept;
765 void const *
const e,
766 std::uint_fast8_t
const qsId)
override
770 void init(std::uint_fast8_t
const qsId)
override {
771 this->
init(
nullptr, qsId);
774 QEvt const *
const e,
775 std::uint_fast8_t
const qsId)
override
789 return reinterpret_cast<QMsm const *
>(
this)
810 std::uint_fast8_t
const tickRate = 0U)
noexcept;
812 std::uint32_t
const nTicks,
813 std::uint32_t
const interval = 0U)
noexcept;
815 bool rearm(std::uint32_t const nTicks) noexcept;
830 std::uint_fast8_t
const tickRate,
831 void const *
const sender)
noexcept;
835 std::uint_fast8_t
const tickRate,
836 void const *
const sender);
841 std::uint_fast8_t
const tickRate,
843 void const * sender)
noexcept;
845 static bool noActive(std::uint_fast8_t
const tickRate)
noexcept;
860 std::uint_fast8_t const tickRate) noexcept;
870 explicit QTicker(std::uint_fast8_t
const tickRate)
noexcept;
872 void const *
const e,
873 std::uint_fast8_t
const qsId)
override;
874 void init(std::uint_fast8_t
const qsId)
override {
875 this->init(
nullptr, qsId);
878 QEvt const *
const e,
879 std::uint_fast8_t
const qsId)
override;
880 void trig_(
void const *
const sender)
noexcept;
889 enum_t const maxSignal)
noexcept
896 QEvt const *
const e,
897 void const *
const sender,
898 std::uint_fast8_t
const qsId)
noexcept
905 std::uint_fast8_t
const tickRate,
906 void const *
const sender)
noexcept
912inline std::uint_fast16_t
getQueueMin(std::uint_fast8_t
const prio)
noexcept {
921 void *
const poolSto,
922 std::uint_fast32_t
const poolSize,
923 std::uint_fast16_t
const evtSize)
noexcept;
925std::uint_fast16_t poolGetMaxBlockSize() noexcept;
926std::uint_fast16_t getPoolMin(std::uint_fast8_t const poolNum) noexcept;
928 std::uint_fast16_t const evtSize,
929 std::uint_fast16_t const margin,
930 enum_t const sig) noexcept;
931void gc(
QEvt const * const e) noexcept;
933 QEvt const * const e,
934 QEvt const * const evtRef) noexcept;
936void deleteRef_(
QEvt const * const evtRef) noexcept;
939 template<
class evtT_>
940 inline evtT_ * q_new(
enum_t const sig) {
941 return static_cast<evtT_*
>(
944 template<
class evtT_>
945 inline evtT_ * q_new_x(
946 std::uint_fast16_t
const margin,
949 return static_cast<evtT_*
>(
QP::QF::newX_(
sizeof(evtT_), margin, sig));
952 template<
class evtT_,
typename... Args>
957 evtT_ *e =
static_cast<evtT_*
>(
962 template<
class evtT_,
typename... Args>
964 std::uint_fast16_t
const margin,
968 evtT_ *e =
static_cast<evtT_*
>(
QP::QF::newX_(
sizeof(evtT_), margin, sig));
979 evtT_
const *& evtRef)
992 std::uint_fast16_t
const evtSize,
993 std::uint_fast16_t
const margin,
994 enum_t const sig)
noexcept;
1005#ifdef QF_ON_CONTEXT_SW
1015#define Q_PRIO(prio_, pthre_) \
1016 (static_cast<QP::QPrioSpec>((prio_) | (pthre_) << 8U))
1018#ifndef QEVT_PAR_INIT
1019 #define Q_NEW(evtT_, sig_) (QP::QF::q_new<evtT_>((sig_)))
1020 #define Q_NEW_X(evtT_, margin_, sig_) (QP::QF::q_new_x<evtT_>((margin_), (sig_)))
1022 #define Q_NEW(evtT_, sig_, ...) (QP::QF::q_new<evtT_>((sig_), __VA_ARGS__))
1023 #define Q_NEW_X(evtT_, margin_, sig_, ...) (QP::QF::q_new_x<evtT_>((margin_), (sig_), __VA_ARGS__))
1026#define Q_NEW_REF(evtRef_, evtT_) (QP::QF::q_new_ref<evtT_>(e, (evtRef_)))
1027#define Q_DELETE_REF(evtRef_) do { \
1028 QP::QF::deleteRef_((evtRef_)); \
1029 (evtRef_) = nullptr; \
1033 #define PUBLISH(e_, sender_) \
1034 publish_((e_), (sender_), (sender_)->getPrio())
1035 #define POST(e_, sender_) post_((e_), QP::QF::NO_MARGIN, (sender_))
1036 #define POST_X(e_, margin_, sender_) \
1037 post_((e_), (margin_), (sender_))
1038 #define TICK_X(tickRate_, sender_) tick((tickRate_), (sender_))
1039 #define TRIG(sender_) trig_((sender_))
1041 #define PUBLISH(e_, dummy) publish_((e_), nullptr, 0U)
1042 #define POST(e_, dummy) post_((e_), QP::QF::NO_MARGIN, nullptr)
1043 #define POST_X(e_, margin_, dummy) post_((e_), (margin_), nullptr)
1044 #define TICK_X(tickRate_, dummy) tick((tickRate_), nullptr)
1045 #define TRIG(sender_) trig_(nullptr)
1048#define TICK(sender_) TICK_X(0U, (sender_))
1050#ifndef QF_CRIT_EXIT_NOP
1051 #define QF_CRIT_EXIT_NOP() (static_cast<void>(0))
1057#ifdef QF_MEM_ISOLATE
1058 #error Memory isolation not supported in this QP edition, need SafeQP
Active object class (based on the QHsm implementation strategy)
friend class QActiveDummy
QACTIVE_OS_OBJ_TYPE const & getOsObject() const noexcept
virtual bool postFromISR(QEvt const *const e, std::uint_fast16_t const margin, void *par, void const *const sender) noexcept
QACTIVE_THREAD_TYPE m_thread
void unregister_() noexcept
void start(QPrioSpec const prioSpec, QEvtPtr *const qSto, std::uint_fast16_t const qLen, void *const stkSto, std::uint_fast16_t const stkSize, void const *const par)
void subscribe(enum_t const sig) const noexcept
void init(void const *const e, std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine.
static QActive * registry_[QF_MAX_ACTIVE+1U]
bool defer(QEQueue *const eq, QEvt const *const e) const noexcept
void setThread(QACTIVE_THREAD_TYPE const &thr)
static QSubscrList * subscrList_
void register_() noexcept
QACTIVE_THREAD_TYPE const & getThread() const noexcept
friend void QXK_threadExit_() noexcept
void unsubscribe(enum_t const sig) const noexcept
void postFIFO_(QEvt const *const e, void const *const sender)
static void publishFromISR(QEvt const *e, void *par, void const *sender) noexcept
static void publish_(QEvt const *const e, void const *const sender, std::uint_fast8_t const qsId) noexcept
static void evtLoop_(QActive *act)
void setAttr(std::uint32_t attr1, void const *attr2=nullptr)
static void psInit(QSubscrList *const subscrSto, enum_t const maxSignal) noexcept
void dispatch(QEvt const *const e, std::uint_fast8_t const qsId) override
Virtual function to dispatch an event to the state machine.
friend QP::QActive * QXK::current() noexcept
friend std::uint_fast8_t QXK_sched_() noexcept
bool post_(QEvt const *const e, std::uint_fast16_t const margin, void const *const sender) noexcept
bool isIn(QStateHandler const stateHndl) noexcept override
Virtual function to check whether the state machine is in a given state.
friend std::uint_fast8_t QK_sched_act_(QP::QActive const *const act, std::uint_fast8_t const pthre_in) noexcept
static QActive * fromRegistry(std::uint_fast8_t const prio)
void init(std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine (overloaded).
QActive(QStateHandler const initial) noexcept
std::uint8_t getPrio() const noexcept
QACTIVE_EQUEUE_TYPE m_eQueue
QEvt const * get_() noexcept
friend void QXK_activate_()
QStateHandler childState(QStateHandler const parentHandler) noexcept
friend void QXK_contextSw_(QP::QActive *const next) noexcept
void postLIFO(QEvt const *const e) noexcept
bool recall(QEQueue *const eq) noexcept
std::uint_fast16_t flushDeferred(QEQueue *const eq, std::uint_fast16_t const num=0xFFFFU) const noexcept
friend void QK_activate_()
QACTIVE_OS_OBJ_TYPE m_osObject
void unsubscribeAll() const noexcept
static QSignal maxPubSignal_
static std::uint_fast16_t getQueueMin(std::uint_fast8_t const prio) noexcept
void start(QPrioSpec const prioSpec, QEvtPtr *const qSto, std::uint_fast16_t const qLen, void *const stkSto, std::uint_fast16_t const stkSize)
Abstract State Machine class (state machine interface)
virtual void init(std::uint_fast8_t const qsId)
Virtual function to take the top-most initial transition in the state machine (overloaded).
QState qm_entry(QMState const *const s) noexcept
Internal helper function to execute state entry actions in QP::QMsm.
QAsm() noexcept
Constructor of the QP::QAsm base class.
QState qm_tran_hist(QMState const *const hist, void const *const tatbl) noexcept
Internal helper function to take a state transition to history in QP::QMsm.
QStateHandler state() const noexcept
static constexpr QState Q_RET_UNHANDLED
QState qm_tran(void const *const tatbl) noexcept
Internal helper function to take a state transition in QP::QMsm.
static constexpr QState Q_RET_TRAN
static constexpr QState Q_RET_ENTRY
QState qm_exit(QMState const *const s) noexcept
Internal helper function to execute state exit actions in QP::QMsm.
QState tran_hist(QStateHandler const hist) noexcept
Internal helper function to take a state transition to history in sublclasses of QP::QAsm.
QState super(QStateHandler const superstate) noexcept
Internal helper function to indicate superstate of a given state in sublclasses of QP::QAsm.
QState qm_tran_init(void const *const tatbl) noexcept
static constexpr QState Q_RET_NULL
QAsmAttr m_temp
Temporary storage for target/act-table etc.
static constexpr QState Q_RET_IGNORED
static constexpr QState Q_RET_SUPER
static QState top(void *const me, QEvt const *const e) noexcept
Top state handler that ignores all events.
static constexpr QState Q_RET_TRAN_INIT
static constexpr QState Q_RET_TRAN_HIST
virtual QStateHandler getStateHandler() noexcept
Virtual method for getting the state handler.
static constexpr QState Q_RET_EXIT
QMState const * stateObj() const noexcept
virtual bool isIn(QStateHandler const stateHndl) noexcept
Virtual function to check whether the state machine is in a given state.
virtual void init(void const *const e, std::uint_fast8_t const qsId)=0
Virtual function to take the top-most initial transition in the state machine.
QState tran(QStateHandler const target) noexcept
Internal helper function to take a state transition in sublclasses of QP::QAsm.
virtual ~QAsm() noexcept
Virtual destructor of the QP::QAsm abstract base class.
static constexpr QSignal Q_INIT_SIG
QAsmAttr m_state
Current state (pointer to the current state-handler function)
virtual void dispatch(QEvt const *const e, std::uint_fast8_t const qsId)=0
Virtual function to dispatch an event to the state machine.
static constexpr QSignal Q_ENTRY_SIG
static constexpr QSignal Q_EXIT_SIG
static constexpr QSignal Q_EMPTY_SIG
static constexpr QState Q_RET_HANDLED
void init(DynEvt const dummy) const noexcept
QSignal sig
Signal of the event (see Event Signal)
std::uint8_t poolNum_
Event pool number of this event.
std::uint8_t volatile refCtr_
Event reference counter.
void init() const noexcept
constexpr QEvt(QSignal const s) noexcept
Event constexpr constructor applicable to immutable and mutable event instances.
Hierarchical State Machine class (QHsm-style state machine implementation strategy)
QStateHandler getStateHandler() noexcept override
std::int_fast8_t tran_complex_(QStateHandler *const path, std::uint_fast8_t const qsId)
void init(std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine (overloaded).
void dispatch(QEvt const *const e, std::uint_fast8_t const qsId) override
Virtual function to dispatch an event to the state machine.
std::int_fast8_t tran_simple_(QStateHandler *const path, std::uint_fast8_t const qsId)
QStateHandler childState(QStateHandler const parentHndl) noexcept
void init(void const *const e, std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine.
QHsm(QStateHandler const initial) noexcept
void enter_target_(QStateHandler *const path, std::int_fast8_t const depth, std::uint_fast8_t const qsId)
bool isIn(QStateHandler const stateHndl) noexcept override
QMActive(QStateHandler const initial) noexcept
Constructor of QP::QMActive class.
bool isIn(QStateHandler const stateHndl) noexcept override
Virtual function to check whether the state machine is in a given state.
QStateHandler getStateHandler() noexcept override
Virtual method for getting the state handler.
void dispatch(QEvt const *const e, std::uint_fast8_t const qsId) override
Virtual function to dispatch an event to the state machine.
void init(void const *const e, std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine.
QMState const * childStateObj(QMState const *const parent) const noexcept
void init(std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine (overloaded).
Hierarchical State Machine class (QMsm-style state machine implementation strategy)
QMState const * childStateObj(QMState const *const parentHndl) const noexcept
void exitToTranSource_(QMState const *const curr_state, QMState const *const tran_source, std::uint_fast8_t const qsId)
QState execTatbl_(QMTranActTable const *const tatbl, std::uint_fast8_t const qsId)
void init(std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine (overloaded).
void dispatch(QEvt const *const e, std::uint_fast8_t const qsId) override
Virtual function to dispatch an event to the state machine.
QState enterHistory_(QMState const *const hist, std::uint_fast8_t const qsId)
void init(void const *const e, std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine.
bool isIn(QStateHandler const stateHndl) noexcept override
QMsm(QStateHandler const initial) noexcept
QMState const * topQMState() const noexcept
QStateHandler getStateHandler() noexcept override
Obtain the current active state from a MSM (read only)
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
bool hasElement(std::uint_fast8_t const n) const noexcept
QPSetBits m_bits[((QF_MAX_ACTIVE+(8U *sizeof(QPSetBits))) - 1U)/(8U *sizeof(QPSetBits))]
bool isEmpty() const noexcept
void insert(std::uint_fast8_t const n) noexcept
Subscriber List (for publish-subscribe)
void init(void const *const e, std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine.
void init(std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine (overloaded).
QTicker(std::uint_fast8_t const tickRate) noexcept
static void tick(std::uint_fast8_t const tickRate, void const *const sender) noexcept
QTimeEvt * toTimeEvt() noexcept
void const * getAct() const noexcept
static QTimeEvt timeEvtHead_[QF_MAX_TICK_RATE]
QTimeEvt(QActive *const act, QSignal const sig, std::uint_fast8_t const tickRate=0U) noexcept
The "extended" constructor to initialize a Time Event.
static void tick1_(std::uint_fast8_t const tickRate, void const *const sender)
QTimeEvtCtr getInterval() const noexcept
static bool noActive(std::uint_fast8_t const tickRate) noexcept
static void tickFromISR(std::uint_fast8_t const tickRate, void *par, void const *sender) noexcept
void * m_act
Active object that receives the time events.
QTimeEvt *volatile m_next
Link to the next time event in the list.
QActive * toActive() noexcept
void armX(std::uint32_t const nTicks, std::uint32_t const interval=0U) noexcept
QTimeEvtCtr getCtr() const noexcept
bool rearm(std::uint32_t const nTicks) noexcept
std::uint8_t getTickRate() const noexcept
QTimeEvtCtr volatile m_ctr
Down-counter of the time event.
QTimeEvt * expire_(QTimeEvt *const prev_link, QActive const *const act, std::uint_fast8_t const tickRate) noexcept
QTimeEvtCtr m_interval
Interval for periodic time event (zero for one-shot time event)
bool wasDisarmed() noexcept
eXtended (blocking) thread of the QXK preemptive kernel
QF Active Object Framework namespace.
void deleteRef_(QEvt const *const evtRef) noexcept
void psInit(QSubscrList *const subscrSto, enum_t const maxSignal) noexcept
QEvt const * newRef_(QEvt const *const e, QEvt const *const evtRef) noexcept
evtT_ * q_new(enum_t const sig, Args... args)
void tick(std::uint_fast8_t const tickRate, void const *const sender) noexcept
evtT_ * q_new_x(std::uint_fast16_t const margin, enum_t const sig, Args... args)
void gcFromISR(QEvt const *e) noexcept
constexpr std::uint_fast16_t NO_MARGIN
void q_new_ref(QP::QEvt const *const e, evtT_ const *&evtRef)
std::uint_fast16_t getQueueMin(std::uint_fast8_t const prio) noexcept
QEvt * newXfromISR_(std::uint_fast16_t const evtSize, std::uint_fast16_t const margin, enum_t const sig) noexcept
void q_delete_ref(evtT_ const *&evtRef)
QEvt * newX_(std::uint_fast16_t const evtSize, std::uint_fast16_t const margin, enum_t const sig) noexcept
void publish_(QEvt const *const e, void const *const sender, std::uint_fast8_t const qsId) noexcept
preemptive, dual-mode (non-blocking / blocking) kernel
QP::QActive * current() noexcept
void QXK_threadExit_() noexcept
constexpr enum_t Q_USER_SIG
std::uint32_t QTimeEvtCtr
Data type to store the block-size defined based on the macro QF_TIMEEVT_CTR_SIZE.
char const versionStr[24]
QState(*)(void *const me) QActionHandler
Pointer to an action-handler function.
std::uint_fast8_t QF_LOG2(QP::QPSetBits const bitmask) noexcept
QEvt const * QEvtPtr
Pointer to const event instances passed around in QP Framework.
void QXK_contextSw_(QP::QActive *const next) noexcept
std::uint_fast8_t QState
Type returned from state-handler functions.
QState(*)(void *const me, QEvt const *const e) QStateHandler
Pointer to a state-handler function.
std::uint_fast8_t QK_sched_act_(QP::QActive const *const act, std::uint_fast8_t const pthre_in) noexcept
std::uint16_t QSignal
The signal of event QP::QEvt.
std::uint_fast8_t QK_sched_() noexcept
std::uint_fast8_t QXK_sched_() noexcept
void(*)(QXThread *const me) QXThreadHandler
Pointer to an extended-thread handler function.
std::uint16_t QPrioSpec
Priority specification for Active Objects in QP.
int int_t
Alias for assertion-ID numbers in QP assertions and return from QP::QF::run()
#define Q_UNUSED_PAR(par_)
Helper macro to clearly mark unused parameters of functions.
void QF_onContextSw(QP::QActive *prev, QP::QActive *next)
#define QF_MAX_TICK_RATE
Maximum # clock tick rates in the system (0..15)
#define QF_MAX_ACTIVE
Maximum # Active Objects in the system (1..64)
#define QACTIVE_OS_OBJ_TYPE
QP::QActive "OS-object" type used in various QP/C++ ports.
#define QACTIVE_EQUEUE_TYPE
QP::QActive event queue type used in various QP/C++ ports.
#define QACTIVE_THREAD_TYPE
QP::QActive "thread" type used in various QP/C++ ports.
State object for the QP::QMsm class (QM State Machine)
QActionHandler const entryAction
QStateHandler const stateHandler
QActionHandler const exitAction
QMState const * superstate
QActionHandler const initAction
Transition-Action Table for the QP::QMsm State Machine.
QActionHandler const act[1]
Attribute of for the QP::QAsm class (Abstract State Machine)
QMTranActTable const * tatbl