39#define QP_VERSION_STR "8.0.0"
40#define QP_VERSION 800U
41#define QP_RELEASE 0x7055936FU
47#define Q_SIGNAL_SIZE 2U
51#define QF_MAX_ACTIVE 32U
54#if (QF_MAX_ACTIVE > 64U)
55#error QF_MAX_ACTIVE exceeds the maximum of 64U;
58#ifndef QF_MAX_TICK_RATE
59#define QF_MAX_TICK_RATE 1U
62#if (QF_MAX_TICK_RATE > 15U)
63#error QF_MAX_TICK_RATE exceeds the maximum of 15U;
67#define QF_MAX_EPOOL 3U
70#if (QF_MAX_EPOOL > 15U)
71#error QF_MAX_EPOOL exceeds the maximum of 15U;
74#ifndef QF_TIMEEVT_CTR_SIZE
75#define QF_TIMEEVT_CTR_SIZE 4U
78#if (QF_TIMEEVT_CTR_SIZE > 4U)
79#error QF_TIMEEVT_CTR_SIZE defined incorrectly, expected 1U, 2U, or 4U;
82#ifndef QF_EVENT_SIZ_SIZE
83#define QF_EVENT_SIZ_SIZE 2U
86#if (QF_EVENT_SIZ_SIZE > 4U)
87#error QF_EVENT_SIZ_SIZE defined incorrectly, expected 1U, 2U, or 4U;
116#if (Q_SIGNAL_SIZE == 1U)
121#if (Q_SIGNAL_SIZE == 2U)
126#if (Q_SIGNAL_SIZE == 4U)
151 static_cast<void>(dummy);
157 && (((
evtTag_ ^ rc) & 0x0FU) == 0x0FU);
160 return static_cast<std::uint8_t
>(
evtTag_ >> 4U);
268 void const *
const e,
269 std::uint_fast8_t
const qsId) = 0;
270 virtual void init(std::uint_fast8_t
const qsId) {
271 this->
init(
nullptr, qsId);
274 QEvt const *
const e,
275 std::uint_fast8_t
const qsId) = 0;
277 static_cast<void>(
state);
294 QEvt const *
const e)
noexcept
296 static_cast<void>(me);
297 static_cast<void>(e);
324 void const *
const tatbl)
noexcept
340 static_cast<void>(s);
354 static_cast<void>(s);
367 void const *
const e,
368 std::uint_fast8_t
const qsId)
override;
369 void init(std::uint_fast8_t
const qsId)
override {
370 this->
init(
nullptr, qsId);
373 QEvt const *
const e,
374 std::uint_fast8_t
const qsId)
override;
387 std::uint_fast8_t
const qsId);
397 void const *
const e,
398 std::uint_fast8_t
const qsId)
override;
399 void init(std::uint_fast8_t
const qsId)
override {
400 this->
init(
nullptr, qsId);
403 QEvt const *
const e,
404 std::uint_fast8_t
const qsId)
override;
417 std::uint_fast8_t
const qsId);
421 std::uint_fast8_t
const qsId);
424 std::uint_fast8_t
const qsId);
436#define Q_STATE_DECL(state_) \
437 QP::QState state_ ## _h(QP::QEvt const * const e); \
438 static QP::QState state_(void * const me, QP::QEvt const * const e)
441#define Q_STATE_DEF(subclass_, state_) \
442 QP::QState subclass_::state_(void * const me, QP::QEvt const * const e) { \
443 return static_cast<subclass_ *>(me)->state_ ## _h(e); } \
444 QP::QState subclass_::state_ ## _h(QP::QEvt const * const e)
447#define Q_HANDLED() (Q_RET_HANDLED)
450#define Q_UNHANDLED() (Q_RET_UNHANDLED)
453#define Q_EVT_CAST(subclass_) (static_cast<subclass_ const *>(e))
456#define Q_STATE_CAST(handler_) \
457 (reinterpret_cast<QP::QStateHandler>(handler_))
460#define QM_STATE_DECL(state_) \
461 QP::QState state_ ## _h(QP::QEvt const * const e); \
462 static QP::QState state_(void * const me, QP::QEvt const * const e); \
463 static QP::QMState const state_ ## _s
466#define QM_ACTION_DECL(action_) \
467 QP::QState action_ ## _h(); \
468 static QP::QState action_(void * const me)
471#define QM_STATE_DEF(subclass_, state_) \
472 QP::QState subclass_::state_(void * const me, QP::QEvt const * const e) {\
473 return static_cast<subclass_ *>(me)->state_ ## _h(e); } \
474 QP::QState subclass_::state_ ## _h(QP::QEvt const * const e)
477#define QM_ACTION_DEF(subclass_, action_) \
478 QP::QState subclass_::action_(void * const me) { \
479 return static_cast<subclass_ *>(me)->action_ ## _h(); } \
480 QP::QState subclass_::action_ ## _h()
483#define QM_HANDLED() (Q_RET_HANDLED)
486#define QM_UNHANDLED() (Q_RET_HANDLED)
489#define QM_SUPER() (Q_RET_SUPER)
492#define QM_STATE_NULL (nullptr)
495#define Q_ACTION_NULL (nullptr)
498#define Q_UNUSED_PAR(par_) (static_cast<void>(par_))
501#define Q_DIM(array_) (sizeof(array_) / sizeof((array_)[0U]))
504#define Q_UINT2PTR_CAST(type_, uint_) (reinterpret_cast<type_ *>(uint_))
508#define INIT(qsId_) init((qsId_))
513#define INIT(dummy) init(0U)
518#define DISPATCH(e_, qsId_) dispatch((e_), (qsId_))
523#define DISPATCH(e_, dummy) dispatch((e_), 0U)
537#if (QF_TIMEEVT_CTR_SIZE == 1U)
542#if (QF_TIMEEVT_CTR_SIZE == 2U)
547#if (QF_TIMEEVT_CTR_SIZE == 4U)
552#if (QF_MAX_ACTIVE <= 8U)
557#if (8U < QF_MAX_ACTIVE) && (QF_MAX_ACTIVE <= 16U)
562#if (16 < QF_MAX_ACTIVE)
579 #if (QF_MAX_ACTIVE > 32)
584 #if (QF_MAX_ACTIVE <= 32U)
591 #if (QF_MAX_ACTIVE <= 32U)
598 #if (QF_MAX_ACTIVE <= 32U)
606 void insert(std::uint_fast8_t
const n)
noexcept {
607 #if (QF_MAX_ACTIVE <= 32U)
618 void remove(std::uint_fast8_t
const n)
noexcept {
619 #if (QF_MAX_ACTIVE <= 32U)
631 #if (QF_MAX_ACTIVE <= 32U)
642 dis->m_bits[0] = ~m_bits[0];
643 #if (QF_MAX_ACTIVE > 32U)
644 dis->m_bits[1] = ~m_bits[1];
651 #if (QF_MAX_ACTIVE <= 32U)
686 QPtrDis(
void const *
const ptr =
nullptr) noexcept;
704#ifdef QACTIVE_THREAD_TYPE
708#ifdef QACTIVE_OS_OBJ_TYPE
712#ifdef QACTIVE_EQUEUE_TYPE
736 friend class GuiQActive;
737 friend class GuiQMActive;
747 m_temp.fun = initial;
750 m_prio_dis =
static_cast<std::uint8_t
>(~m_prio);
751 m_pthre_dis =
static_cast<std::uint8_t
>(~m_pthre);
757 void const *
const e,
758 std::uint_fast8_t
const qsId)
override
760 reinterpret_cast<QHsm *
>(
this)->QHsm::init(e, qsId);
762 void init(std::uint_fast8_t
const qsId)
override {
763 this->init(
nullptr, qsId);
766 QEvt const *
const e,
767 std::uint_fast8_t
const qsId)
override
769 reinterpret_cast<QHsm *
>(
this)->QHsm::dispatch(e, qsId);
772 return reinterpret_cast<QHsm *
>(
this)->QHsm::isIn(state);
775 return reinterpret_cast<QHsm *
>(
this)->QHsm::childState(parent);
779 void const * attr2 =
nullptr);
783 std::uint_fast16_t
const qLen,
785 std::uint_fast16_t
const stkSize,
786 void const *
const par);
790 std::uint_fast16_t
const qLen,
792 std::uint_fast16_t
const stkSize)
794 this->start(prioSpec, qSto, qLen, stkSto, stkSize,
nullptr);
797#ifdef QACTIVE_CAN_STOP
800 void register_() noexcept;
801 void unregister_() noexcept;
803 QEvt const * const e,
804 std::uint_fast16_t const margin,
805 void const * const sender) noexcept;
806 void postLIFO(
QEvt const * const e) noexcept;
807 QEvt const * get_() noexcept;
808 static std::uint_fast16_t getQueueMin(std::uint_fast8_t const prio) noexcept;
811 enum_t const maxSignal) noexcept;
812 static
void publish_(
813 QEvt const * const e,
814 void const * const sender,
815 std::uint_fast8_t const qsId) noexcept;
816 void subscribe(
enum_t const sig) const noexcept;
817 void unsubscribe(
enum_t const sig) const noexcept;
818 void unsubscribeAll() const noexcept;
821 QEvt const * const e) const noexcept;
822 bool recall(
QEQueue * const eq) noexcept;
823 std::uint_fast16_t flushDeferred(
825 std::uint_fast16_t const num = 0xFFFFU) const noexcept;
826 std::uint_fast8_t getPrio() const noexcept {
827 return static_cast<std::uint_fast8_t
>(m_prio);
830 m_prio =
static_cast<std::uint8_t
>(prio & 0xFFU);
831 m_pthre =
static_cast<std::uint8_t
>(prio >> 8U);
834 return static_cast<std::uint_fast8_t
>(m_pthre);
837#ifdef QACTIVE_EQUEUE_TYPE
843#ifdef QACTIVE_OS_OBJ_TYPE
849#ifdef QACTIVE_THREAD_TYPE
855#ifdef QACTIVE_THREAD_TYPE
864 QEvt const *
const e,
865 std::uint_fast16_t
const margin,
867 void const *
const sender)
noexcept;
874 void const * sender)
noexcept;
891 void const *
const e,
892 std::uint_fast8_t
const qsId)
override
896 void init(std::uint_fast8_t
const qsId)
override {
897 this->
init(
nullptr, qsId);
900 QEvt const *
const e,
901 std::uint_fast8_t
const qsId)
override
915 return reinterpret_cast<QMsm const *
>(
this)
958 std::uint_fast8_t
const tickRate = 0U)
noexcept;
960 std::uint32_t
const nTicks,
961 std::uint32_t
const interval = 0U)
noexcept;
962 bool disarm() noexcept;
963 bool rearm(std::uint32_t const nTicks) noexcept;
964 bool wasDisarmed() noexcept;
965 void const * getAct() const noexcept {
978 std::uint_fast8_t
const tickRate,
979 void const *
const sender)
noexcept;
983 std::uint_fast8_t
const tickRate,
984 void const *
const sender);
989 std::uint_fast8_t
const tickRate,
991 void const * sender)
noexcept;
993 static bool noActive(std::uint_fast8_t
const tickRate)
noexcept;
995 return static_cast<QActive *
>(m_act);
998 return static_cast<QTimeEvt *
>(m_act);
1016 explicit QTicker(std::uint_fast8_t
const tickRate)
noexcept;
1018 void const *
const e,
1019 std::uint_fast8_t
const qsId)
override;
1020 void init(std::uint_fast8_t
const qsId)
override {
1021 this->init(
nullptr, qsId);
1024 QEvt const *
const e,
1025 std::uint_fast8_t
const qsId)
override;
1026 void trig_(
void const *
const sender)
noexcept;
1055 enum_t const maxSignal)
noexcept
1057 QActive::psInit(subscrSto, maxSignal);
1063 QEvt const *
const e,
1064 void const *
const sender,
1065 std::uint_fast8_t
const qsId)
noexcept
1067 QActive::publish_(e, sender, qsId);
1073 std::uint_fast8_t
const tickRate,
1074 void const *
const sender)
noexcept
1076 QTimeEvt::tick(tickRate, sender);
1081inline std::uint_fast16_t
getQueueMin(std::uint_fast8_t
const prio)
noexcept {
1082 return QActive::getQueueMin(prio);
1098 void *
const poolSto,
1099 std::uint_fast32_t
const poolSize,
1100 std::uint_fast16_t
const evtSize)
noexcept;
1106std::uint_fast16_t getPoolMin(std::uint_fast8_t const poolNum) noexcept;
1110 std::uint_fast16_t const evtSize,
1111 std::uint_fast16_t const margin,
1112 enum_t const sig) noexcept;
1115void gc(QEvt const * const e) noexcept;
1118QEvt const * newRef_(
1119 QEvt const * const e,
1120 QEvt const * const evtRef) noexcept;
1123void deleteRef_(QEvt const * const evtRef) noexcept;
1126#ifndef QEVT_PAR_INIT
1127template<
class evtT_>
1129 return static_cast<evtT_*
>(
1136template<
class evtT_,
typename... Args>
1141 evtT_ *e =
static_cast<evtT_*
>(
1149#ifndef QEVT_PAR_INIT
1150template<
class evtT_>
1151inline evtT_ * q_new_x(
1152 std::uint_fast16_t
const margin,
1155 return static_cast<evtT_*
>(
QP::QF::newX_(
sizeof(evtT_), margin, sig));
1161template<
class evtT_,
typename... Args>
1163 std::uint_fast16_t
const margin,
1167 evtT_ *e =
static_cast<evtT_*
>(
QP::QF::newX_(
sizeof(evtT_), margin, sig));
1176template<
class evtT_>
1179 evtT_
const *& evtRef)
1185template<
class evtT_>
1194 std::uint_fast16_t
const evtSize,
1195 std::uint_fast16_t
const margin,
1196 enum_t const sig)
noexcept;
1212#ifdef QF_ON_CONTEXT_SW
1223#define Q_PRIO(prio_, pthre_) \
1224 (static_cast<QP::QPrioSpec>((prio_) | (pthre_) << 8U))
1227#ifndef QEVT_PAR_INIT
1228#define Q_NEW(evtT_, sig_) (QP::QF::q_new<evtT_>((sig_)))
1233#define Q_NEW(evtT_, sig_, ...) (QP::QF::q_new<evtT_>((sig_), __VA_ARGS__))
1237#ifndef QEVT_PAR_INIT
1238#define Q_NEW_X(evtT_, margin_, sig_) (QP::QF::q_new_x<evtT_>((margin_), (sig_)))
1243#define Q_NEW_X(evtT_, margin_, sig_, ...) (QP::QF::q_new_x<evtT_>((margin_), (sig_), __VA_ARGS__))
1247#define Q_NEW_REF(evtRef_, evtT_) (QP::QF::q_new_ref<evtT_>(e, (evtRef_)))
1250#define Q_DELETE_REF(evtRef_) do { \
1251 QP::QF::deleteRef_((evtRef_)); \
1252 (evtRef_) = nullptr; \
1257#define PUBLISH(e_, sender_) \
1258 publish_((e_), (sender_), (sender_)->getPrio())
1263#define PUBLISH(e_, dummy) publish_((e_), nullptr, 0U)
1268#define POST(e_, sender_) post_((e_), QP::QF::NO_MARGIN, (sender_))
1273#define POST(e_, dummy) post_((e_), QP::QF::NO_MARGIN, nullptr)
1278#define POST_X(e_, margin_, sender_) \
1279 post_((e_), (margin_), (sender_))
1284#define POST_X(e_, margin_, dummy) post_((e_), (margin_), nullptr)
1289#define TICK_X(tickRate_, sender_) tick((tickRate_), (sender_))
1294#define TICK_X(tickRate_, dummy) tick((tickRate_), nullptr)
1298#define TICK(sender_) TICK_X(0U, (sender_))
1302#define TRIG(sender_) trig_((sender_))
1307#define TRIG(sender_) trig_(nullptr)
1311#ifndef QF_CRIT_EXIT_NOP
1312#define QF_CRIT_EXIT_NOP() (static_cast<void>(0))
1317#define QF_MEM_SYS() (static_cast<void>(0))
1322#define QF_MEM_APP() (static_cast<void>(0))
Dummy Active Object for testing.
Active object class (based on the QHsm implementation strategy)
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 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 setThread(QACTIVE_THREAD_TYPE const &thr)
static QSubscrList * subscrList_
std::uint_fast8_t getPThre() const noexcept
QACTIVE_THREAD_TYPE const & getThread() const noexcept
static void publishFromISR(QEvt const *e, void *par, void const *sender) noexcept
static void evtLoop_(QActive *act)
void setAttr(std::uint32_t attr1, void const *attr2=nullptr)
void dispatch(QEvt const *const e, std::uint_fast8_t const qsId) override
Virtual function to dispatch an event to the state machine.
static enum_t maxPubSignal_
bool isIn(QStateHandler const state) noexcept override
Virtual function to check whether the state machine is in a given state.
void init(std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine (overloaded).
void setPrio(QPrioSpec const prio) noexcept
QActive(QStateHandler const initial) noexcept
QACTIVE_EQUEUE_TYPE m_eQueue
QStateHandler childState(QStateHandler const parent) noexcept
QACTIVE_EQUEUE_TYPE const & getEQueue() const noexcept
QACTIVE_OS_OBJ_TYPE m_osObject
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
virtual bool isIn(QStateHandler const state) noexcept
Virtual function to check whether the state machine is in a given state.
QState qm_tran(void const *const tatbl) noexcept
Internal helper function to take a state transition in QP::QMsm.
@ Q_RET_HANDLED
event handled (internal transition)
@ Q_RET_ENTRY
state entry action executed
@ Q_RET_IGNORED
event silently ignored (bubbled up to top)
@ Q_RET_UNHANDLED
event unhandled due to a guard
@ Q_RET_TRAN
regular transition
@ Q_RET_TRAN_HIST
transition to history of a given state
@ Q_RET_NULL
return value without any effect
@ Q_RET_TRAN_INIT
initial transition in a state
@ Q_RET_EXIT
state exit action executed
@ Q_RET_SUPER
event passed to superstate to handle
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
QAsmAttr m_temp
Temporary storage for target/act-table etc.
static QState top(void *const me, QEvt const *const e) noexcept
Top state handler that ignores all events.
virtual QStateHandler getStateHandler() noexcept
Virtual method for getting the state handler.
QMState const * stateObj() const noexcept
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.
QAsmAttr m_state
Current state (pointer to the current state-handler function)
ReservedSig
Reserved signals by the QP-framework.
@ Q_EXIT_SIG
signal for exit actions
@ Q_INIT_SIG
signal for nested initial transitions
@ Q_ENTRY_SIG
signal for entry actions
@ Q_EMPTY_SIG
signal to execute the default case
virtual void dispatch(QEvt const *const e, std::uint_fast8_t const qsId)=0
Virtual function to dispatch an event to the state machine.
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_.
constexpr QEvt(QSignal const s) noexcept
void init(DynEvt const dummy) noexcept
std::uint_fast8_t getPoolNum_() const noexcept
Internal function to get the event pool-number of the given event.
Hierarchical State Machine class (QHsm-style state machine implementation strategy)
std::int_fast8_t hsm_tran(QStateHandler *const path, std::uint_fast8_t const qsId)
QStateHandler getStateHandler() noexcept override
void init(std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine (overloaded).
QStateHandler childState(QStateHandler const parent) noexcept
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.
QHsm(QStateHandler const initial) noexcept
bool isIn(QStateHandler const state) noexcept override
Active object class (based on QMsm implementation strategy)
bool isIn(QStateHandler const state) noexcept override
Virtual function to check whether the state machine is in a given state.
QMActive(QStateHandler const initial) noexcept
Constructor of QP::QMActive class.
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)
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.
void exitToTranSource_(QMState const *const cs, QMState const *const ts, std::uint_fast8_t const qsId)
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 state) noexcept override
QMsm(QStateHandler const initial) noexcept
QMState const * topQMState() const noexcept
QStateHandler getStateHandler() noexcept override
QMState const * childStateObj(QMState const *const parent) 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 verify_(QPSet const *const dis) const 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))]
void update_(QPSet *const dis) const noexcept
bool isEmpty() const noexcept
void insert(std::uint_fast8_t const n) noexcept
QPtrDis(void const *const ptr=nullptr) noexcept
Subscriber List (for publish-subscribe)
"Ticker" Active Object class
void init(std::uint_fast8_t const qsId) override
Virtual function to take the top-most initial transition in the state machine (overloaded).
QTimeEvt * toTimeEvt() noexcept
std::uintptr_t m_next_dis
static void tick1_(std::uint_fast8_t const tickRate, void const *const sender)
QTimeEvtCtr getInterval() const 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
QTimeEvtCtr getCtr() const noexcept
std::uint8_t getTickRate() const noexcept
QTimeEvtCtr volatile m_ctr
Down-counter of the time event.
QTimeEvtCtr m_interval
Interval for periodic time event (zero for one-shot time event)
Blocking Mutex of the QXK preemptive kernel.
Counting Semaphore of the QXK preemptive kernel.
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
std::uint_fast16_t poolGetMaxBlockSize() noexcept
evtT_ * q_new_x(std::uint_fast16_t const margin, enum_t const sig, Args... args)
void gcFromISR(QEvt const *e) 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
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
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.
QState(*)(void *const me) QActionHandler
Pointer to an action-handler function.
QEvt const * QEvtPtr
Pointer to const event instances passed around in QP Framework.
std::uint_fast8_t QF_LOG2(QP::QPSetBits x) 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.
constexpr char const versionStr[]
the current QP version number string in ROM, based on QP_VERSION_STR
std::uint16_t QSignal
The signal of event QP::QEvt.
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()
float float32_t
Alias for IEEE 754 32-bit floating point number.
#define QP_VERSION_STR
Version string complying with Semantic Versioning
double float64_t
Alias for IEEE 754 64-bit floating point number.
#define Q_STATE_CAST(handler_)
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