QP/C++ 8.1.1
Real-Time Event Framework
Loading...
Searching...
No Matches
QP Namespace Reference

QP/C++ Framework namespace. More...

Namespaces

namespace  QF
 QF Active Object Framework namespace.

Classes

class  QEQueue
 Native QF Event Queue. More...
class  QK
 QK preemptive non-blocking kernel. More...
class  QMPool
 Native QF Memory Pool. More...
class  QEvt
 Event class. More...
struct  QMState
 State object for the QP::QMsm class (QM State Machine). More...
struct  QMTranActTable
 Transition-Action Table for the QP::QMsm State Machine. More...
union  QAsmAttr
 Attribute of for the QP::QAsm class (Abstract State Machine). More...
class  QAsm
 Abstract State Machine class (state machine interface). More...
class  QHsm
 Hierarchical State Machine class (QHsm-style state machine implementation strategy). More...
class  QMsm
 Hierarchical State Machine class (QMsm-style state machine implementation strategy). More...
class  QPSet
 Set of Active Objects of up to QF_MAX_ACTIVE elements. More...
class  QSubscrList
 Subscriber List (for publish-subscribe). More...
class  QActive
 Active object class (based on the QP::QHsm implementation strategy). More...
class  QMActive
 Active object class (based on QMsm implementation strategy). More...
class  QTimeEvt
 Time Event class. More...
class  QTicker
 "Ticker" Active Object class More...
struct  QSpyId
 QS ID type for applying local filtering. More...
class  QS
 Software tracing instrumentation target-resident component. More...
class  QHsmDummy
 Dummy hierarchical state machine class for testing. More...
class  QActiveDummy
 Dummy Active Object for testing. More...
union  Endiannes
class  QV
 QV non-preemptive kernel. More...
class  QXK
 QXK dual-mode (non-blocking / blocking) kernel. More...
class  QXThread
 eXtended (blocking) thread of the QXK preemptive kernel More...
class  QXSemaphore
 Counting Semaphore of the QXK preemptive kernel. More...
class  QXMutex
 Blocking Mutex of the QXK preemptive kernel. More...

Typedefs

using QEQueueCtr = std::uint16_t
 The data type to store the ring-buffer counters.
using QSchedStatus = std::uint8_t
 The scheduler lock status for QK::schedLock() and QK::schedUnlock().
using QMPoolSize = std::uint16_t
 The data type to store the block-size based on the macro QF_MPOOL_SIZ_SIZE.
using QMPoolCtr = std::uint16_t
 The data type to store the block-counter based on the macro QF_MPOOL_CTR_SIZE.
using QSignal = std::uint16_t
 The signal of event QP::QEvt.
using QEvtPtr = QEvt const *
 Pointer to const event instances passed around in QP/C++ Framework.
using QState = std::uint_fast8_t
 Type returned from state-handler functions.
using QStateHandler = QState (*)(void * const me, QEvt const * const e)
 Pointer to a state-handler function.
using QActionHandler = QState (*)(void * const me)
 Pointer to an action-handler function.
using QXThreadHandler = void (*)(QXThread * const me)
 Pointer to an extended-thread handler function.
using QPrioSpec = std::uint16_t
 Priority specification for Active Objects in QP.
using QTimeEvtCtr = std::uint32_t
 Data type to store the block-size defined based on the macro QF_TIMEEVT_CTR_SIZE.
using QPSetBits = std::uint32_t
 Bitmask for the internal representation of QPSet elements.
using QSObj = std::uint32_t
using QSFun = std::uint32_t
using QSpyFunPtr = void (*)()
using QSTimeCtr = std::uint32_t
 Unsigned integer type for QS timestamps.

Enumerations

enum  QS_Groups_old : std::int16_t {
  QS_ALL_RECORDS = QS_GRP_ALL , QS_SM_RECORDS = QS_GRP_SM , QS_AO_RECORDS = QS_GRP_AO , QS_EQ_RECORDS = QS_GRP_EQ ,
  QS_MP_RECORDS = QS_GRP_MP , QS_TE_RECORDS = QS_GRP_TE , QS_QF_RECORDS = QS_GRP_QF , QS_SC_RECORDS = QS_GRP_SC ,
  QS_SEM_RECORDS = QS_GRP_SEM , QS_MTX_RECORDS = QS_GRP_MTX , QS_U0_RECORDS = QS_GRP_U0 , QS_U1_RECORDS = QS_GRP_U1 ,
  QS_U2_RECORDS = QS_GRP_U2 , QS_U3_RECORDS = QS_GRP_U3 , QS_U4_RECORDS = QS_GRP_U4 , QS_UA_RECORDS = QS_GRP_UA
}
enum  QS_GlbPredef : std::int8_t {
  QS_EMPTY , QS_QEP_STATE_ENTRY , QS_QEP_STATE_EXIT , QS_QEP_STATE_INIT ,
  QS_QEP_INIT_TRAN , QS_QEP_INTERN_TRAN , QS_QEP_TRAN , QS_QEP_IGNORED ,
  QS_QEP_DISPATCH , QS_QEP_UNHANDLED , QS_QF_ACTIVE_DEFER , QS_QF_ACTIVE_RECALL ,
  QS_QF_ACTIVE_SUBSCRIBE , QS_QF_ACTIVE_UNSUBSCRIBE , QS_QF_ACTIVE_POST , QS_QF_ACTIVE_POST_LIFO ,
  QS_QF_ACTIVE_GET , QS_QF_ACTIVE_GET_LAST , QS_QF_ACTIVE_RECALL_ATTEMPT , QS_QF_EQUEUE_POST ,
  QS_QF_EQUEUE_POST_LIFO , QS_QF_EQUEUE_GET , QS_QF_EQUEUE_GET_LAST , QS_QF_NEW_ATTEMPT ,
  QS_QF_MPOOL_GET , QS_QF_MPOOL_PUT , QS_QF_PUBLISH , QS_QF_NEW_REF ,
  QS_QF_NEW , QS_QF_GC_ATTEMPT , QS_QF_GC , QS_QF_TICK ,
  QS_QF_TIMEEVT_ARM , QS_QF_TIMEEVT_AUTO_DISARM , QS_QF_TIMEEVT_DISARM_ATTEMPT , QS_QF_TIMEEVT_DISARM ,
  QS_QF_TIMEEVT_REARM , QS_QF_TIMEEVT_POST , QS_QF_DELETE_REF , QS_QF_CRIT_ENTRY ,
  QS_QF_CRIT_EXIT , QS_QF_ISR_ENTRY , QS_QF_ISR_EXIT , QS_QF_INT_DISABLE ,
  QS_QF_INT_ENABLE , QS_QF_ACTIVE_POST_ATTEMPT , QS_QF_EQUEUE_POST_ATTEMPT , QS_QF_MPOOL_GET_ATTEMPT ,
  QS_SCHED_PREEMPT , QS_SCHED_RESTORE , QS_SCHED_LOCK , QS_SCHED_UNLOCK ,
  QS_SCHED_NEXT , QS_SCHED_IDLE , QS_ENUM_DICT , QS_QEP_TRAN_HIST ,
  QS_RESERVED_56 , QS_RESERVED_57 , QS_TEST_PAUSED , QS_TEST_PROBE_GET ,
  QS_SIG_DICT , QS_OBJ_DICT , QS_FUN_DICT , QS_USR_DICT ,
  QS_TARGET_INFO , QS_TARGET_DONE , QS_RX_STATUS , QS_QUERY_DATA ,
  QS_PEEK_DATA , QS_ASSERT_FAIL , QS_QF_RUN , QS_SEM_TAKE ,
  QS_SEM_BLOCK , QS_SEM_SIGNAL , QS_SEM_BLOCK_ATTEMPT , QS_MTX_LOCK ,
  QS_MTX_BLOCK , QS_MTX_UNLOCK , QS_MTX_LOCK_ATTEMPT , QS_MTX_BLOCK_ATTEMPT ,
  QS_MTX_UNLOCK_ATTEMPT , QS_QF_ACTIVE_DEFER_ATTEMPT , QS_PRE_MAX
}
 Pre-defined QS record IDs (for QS_GLB_FILTER()). More...
enum  QS_ObjKind : std::uint8_t {
  QS_OBJ_SM , QS_OBJ_AO , QS_OBJ_MP , QS_OBJ_EQ ,
  QS_OBJ_TE , QS_OBJ_AP , QS_OBJ_SM_AO , QS_OBJ_EP
}
 Object kinds used in QS-RX (NOTE: watch out for backwards compatibility!). More...
enum  QS_RxRecords : std::uint8_t {
  QS_RX_INFO , QS_RX_COMMAND , QS_RX_RESET , QS_RX_TICK ,
  QS_RX_PEEK , QS_RX_POKE , QS_RX_FILL , QS_RX_TEST_SETUP ,
  QS_RX_TEST_TEARDOWN , QS_RX_TEST_PROBE , QS_RX_GLB_FILTER , QS_RX_LOC_FILTER ,
  QS_RX_AO_FILTER , QS_RX_CURR_OBJ , QS_RX_TEST_CONTINUE , QS_RX_QUERY_CURR ,
  QS_RX_EVENT
}
 QS received record types (RX channel). More...

Functions

char const * version () noexcept
std::uint_fast8_t QF_LOG2 (QP::QPSetBits const bitmask) noexcept
void QEvt_refCtr_inc_ (QEvt const *const me) noexcept
 Internal function to increment the refCtr of a const event.
void QEvt_refCtr_dec_ (QEvt const *const me) noexcept
 Internal function to decrement the refCtr of a const event.
template<typename T_>
static T_ dis_update (T_ const org)
 Internal function template to calculate the Duplicate Inverse Storage (DIS).
template<typename T_>
static bool dis_verify (T_ const org, T_ const dis)
 Internal function template to verify the Duplicate Inverse Storage (DIS).
void QXK_contextSw_ (QActive *const next) noexcept
 QXK context switch management.
std::int_fast8_t tran_simple_ (QStateHandler *const path, std::uint_fast8_t const qsId)
std::int_fast8_t tran_complex_ (QStateHandler *const path, std::uint_fast8_t const qsId)
void enter_target_ (QStateHandler *const path, std::int_fast8_t const depth, std::uint_fast8_t const qsId)

Variables

constexpr QSignal Q_USER_SIG {4U}
std::array< QActive *, QF_MAX_ACTIVE+1U > QActive_registry_
 Internal array of pointers to the registered Active Objects.
QSubscrListQActive_subscrList_
 Internal pointer to the array of subscribers to the event-signals.
QSignal QActive_maxPubSignal_
 Internal maximum published signal (# used entries in the QP::QActive_subscrList_ array).
std::array< QTimeEvt, QF_MAX_TICK_RATEQTimeEvt_head_
 Internal heads of the time-event linked-lists (by clock-tick rate).
constexpr std::uint8_t QTE_FLAG_IS_LINKED {1U << 7U}
constexpr std::uint8_t QTE_FLAG_WAS_DISARMED {1U << 6U}
constexpr std::int_fast16_t QS_GRP_ALL { 0xF0 }
constexpr std::int_fast16_t QS_GRP_SM { 0xF1 }
constexpr std::int_fast16_t QS_GRP_AO { 0xF2 }
constexpr std::int_fast16_t QS_GRP_EQ { 0xF3 }
constexpr std::int_fast16_t QS_GRP_MP { 0xF4 }
constexpr std::int_fast16_t QS_GRP_TE { 0xF5 }
constexpr std::int_fast16_t QS_GRP_QF { 0xF6 }
constexpr std::int_fast16_t QS_GRP_SC { 0xF7 }
constexpr std::int_fast16_t QS_GRP_SEM { 0xF8 }
constexpr std::int_fast16_t QS_GRP_MTX { 0xF9 }
constexpr std::int_fast16_t QS_GRP_U0 { 0xFA }
constexpr std::int_fast16_t QS_GRP_U1 { 0xFB }
constexpr std::int_fast16_t QS_GRP_U2 { 0xFC }
constexpr std::int_fast16_t QS_GRP_U3 { 0xFD }
constexpr std::int_fast16_t QS_GRP_U4 { 0xFE }
constexpr std::int_fast16_t QS_GRP_UA { 0xFF }
constexpr std::int_fast16_t QS_USER { 100 }
constexpr std::int_fast16_t QS_USER0 { QS_USER }
constexpr std::int_fast16_t QS_USER1 { QS_USER + 5 }
constexpr std::int_fast16_t QS_USER2 { QS_USER + 10 }
constexpr std::int_fast16_t QS_USER3 { QS_USER + 15 }
constexpr std::int_fast16_t QS_USER4 { QS_USER + 20 }
constexpr std::int_fast16_t QS_ID_AO { 0 }
constexpr std::int_fast16_t QS_ID_EP { 64 }
constexpr std::int_fast16_t QS_ID_EQ { 80 }
constexpr std::int_fast16_t QS_ID_AP { 96 }
constexpr std::int_fast16_t QS_IDS_ALL { 0xF0 }
constexpr std::int_fast16_t QS_IDS_AO { 0xF1 }
constexpr std::int_fast16_t QS_IDS_EP { 0xF2 }
constexpr std::int_fast16_t QS_IDS_EQ { 0xF3 }
constexpr std::int_fast16_t QS_IDS_AP { 0xF4 }
constexpr std::uint16_t QS_EOD { 0xFFFFU }
constexpr std::uint8_t QS_CMD { 0x07U }
constexpr std::uint8_t QS_HEX_FMT {0xFU}
constexpr std::uint8_t QS_RXATTR_SIZE {128U}
constexpr std::uint8_t QUTEST_ON_POST {124U}
constexpr std::uint8_t QS_FRAME {0x7EU}
constexpr std::uint8_t QS_ESC {0x7DU}
constexpr std::uint8_t QS_ESC_XOR {0x20U}
constexpr std::uint8_t QS_GOOD_CHKSUM {0xFFU}
constexpr union QP::Endiannes QS_ENDIANNES = { static_cast<std::uint16_t>(0x7F00U) }
char const BUILD_DATE [12] = __DATE__
char const BUILD_TIME [9] = __TIME__
constexpr QTimeEvtCtr QXTHREAD_NO_TIMEOUT {0U}
 No-timeout when blocking on semaphores/mutextes/event-queues.
QXK QXK_priv_
static constexpr char versionStr [24] = "QP/C++ " QP_VERSION_STR

Detailed Description

QP/C++ Framework namespace.

Typedef Documentation

◆ QEQueueCtr

using QP::QEQueueCtr = std::uint16_t

The data type to store the ring-buffer counters.

Details
The type is based on the macro QF_EQUEUE_CTR_SIZE. The dynamic range of this data type determines the maximum length of the ring buffer managed by the native QF event queue.

Definition at line 41 of file qequeue.hpp.

◆ QSchedStatus

typedef std::uint_fast16_t QP::QSchedStatus = std::uint8_t

The scheduler lock status for QK::schedLock() and QK::schedUnlock().

The scheduler lock status for QP::QXK::schedLock() and QP::QXK::schedUnlock().

Definition at line 35 of file qk.hpp.

◆ QMPoolSize

using QP::QMPoolSize = std::uint16_t

The data type to store the block-size based on the macro QF_MPOOL_SIZ_SIZE.

Details
The dynamic range of this data type determines the maximum size of blocks that can be managed by the native QF event pool.

Definition at line 49 of file qmpool.hpp.

◆ QMPoolCtr

using QP::QMPoolCtr = std::uint16_t

The data type to store the block-counter based on the macro QF_MPOOL_CTR_SIZE.

Details
The dynamic range of this data type determines the maximum number of blocks that can be stored in the pool.

Definition at line 59 of file qmpool.hpp.

◆ QSignal

using QP::QSignal = std::uint16_t

The signal of event QP::QEvt.

Details
The relationship between an event and a signal is as follows. A signal in UML is the specification of an asynchronous stimulus that triggers reactions, and as such is an essential part of an event. (The signal conveys the type of the occurrence–what happened?) However, an event can also contain additional quantitative information about the occurrence in the form of event parameters.

Definition at line 98 of file qp.hpp.

◆ QEvtPtr

using QP::QEvtPtr = QEvt const *

Pointer to const event instances passed around in QP/C++ Framework.

Definition at line 129 of file qp.hpp.

◆ QState

using QP::QState = std::uint_fast8_t

Type returned from state-handler functions.

Definition at line 134 of file qp.hpp.

◆ QStateHandler

using QP::QStateHandler = QState (*)(void * const me, QEvt const * const e)

Pointer to a state-handler function.

Definition at line 138 of file qp.hpp.

◆ QActionHandler

using QP::QActionHandler = QState (*)(void * const me)

Pointer to an action-handler function.

Definition at line 139 of file qp.hpp.

◆ QXThreadHandler

using QP::QXThreadHandler = void (*)(QXThread * const me)

Pointer to an extended-thread handler function.

Definition at line 140 of file qp.hpp.

◆ QPrioSpec

using QP::QPrioSpec = std::uint16_t

Priority specification for Active Objects in QP.

Details
Active Object priorities in QP are integer numbers in the range [1..QF_MAX_ACTIVE], whereas the special priority number 0 is reserved for the lowest-priority idle thread. The QP Framework uses the direct priority numbering, in which higher numerical values denote higher urgency. For example, an AO with priority 32 has higher urgency than an AO with priority 23.

QP::QPrioSpec allows an application developer to assign two priorities to a given AO (see also Q_PRIO()):

  1. The "QF-priority", which resides in the least-significant byte of the QP::QPrioSpec data type. The "QF-priority" must be unique for each thread in the system and higher numerical values represent higher urgency (direct priority numbering).
  2. The "preemption-threshold" priority, which resides in the most-significant byte of the QP::QPrioSpec data type. The second priority cannot be lower than the "QF-priority", but does NOT need to be unique.

In the QP native preemptive kernels, like QK, the "preemption-threshold" priority is used as to implement the "preemption-threshold scheduling" (PTS). It determines the conditions under which a given thread can be preempted by other threads. Specifically, a given thread can be preempted only by another thread with a higher priority than the "preemption-threshold" of the original thread.

QF-priority and preemption-threshold relations

Note
For backwards-compatibility, QP::QPrioSpec data type might contain only the "QF-priority" component (and the "preemption-threshold" component left at zero). In that case, the "preemption-threshold" will be assumed to be the same as the "QF-priority". This corresponds exactly to the previous semantics of AO priority.
Remarks
When QP runs on top of 3rd-party kernels/RTOSes or general-purpose operating systems, the second priority can have different meaning, depending on the specific RTOS/GPOS used. Priority threshold is supported in QP ports to ThreadX.

Definition at line 417 of file qp.hpp.

◆ QTimeEvtCtr

using QP::QTimeEvtCtr = std::uint32_t

Data type to store the block-size defined based on the macro QF_TIMEEVT_CTR_SIZE.

Details
The dynamic range of this data type determines the maximum block size that can be managed by the pool.

Definition at line 427 of file qp.hpp.

◆ QPSetBits

using QP::QPSetBits = std::uint32_t

Bitmask for the internal representation of QPSet elements.

Definition at line 435 of file qp.hpp.

◆ QSObj

using QP::QSObj = std::uint32_t

Definition at line 233 of file qs.hpp.

◆ QSFun

using QP::QSFun = std::uint32_t

Definition at line 241 of file qs.hpp.

◆ QSpyFunPtr

using QP::QSpyFunPtr = void (*)()

Definition at line 246 of file qs.hpp.

◆ QSTimeCtr

using QP::QSTimeCtr = std::uint32_t

Unsigned integer type for QS timestamps.

Details
The dynamic range of QP::QSTimeCtr is configurable by the macro QS_TIME_SIZE, which can take values 1-byte (256 counts), 2-bytes (64K counts) and 4-bytes (4G counts).

See also

Definition at line 259 of file qs.hpp.

Enumeration Type Documentation

◆ QS_Groups_old

enum QP::QS_Groups_old : std::int16_t
Deprecated
instead use: QS_Groups
Enumerator
QS_ALL_RECORDS 
QS_SM_RECORDS 
QS_AO_RECORDS 
QS_EQ_RECORDS 
QS_MP_RECORDS 
QS_TE_RECORDS 
QS_QF_RECORDS 
QS_SC_RECORDS 
QS_SEM_RECORDS 
QS_MTX_RECORDS 
QS_U0_RECORDS 
QS_U1_RECORDS 
QS_U2_RECORDS 
QS_U3_RECORDS 
QS_U4_RECORDS 
QS_UA_RECORDS 

Definition at line 62 of file qpcpp.hpp.

◆ QS_GlbPredef

enum QP::QS_GlbPredef : std::int8_t

Pre-defined QS record IDs (for QS_GLB_FILTER()).

Enumerator
QS_EMPTY 

QS record for cleanly starting a session.

QS_QEP_STATE_ENTRY 

a state was entered

QS_QEP_STATE_EXIT 

a state was exited

QS_QEP_STATE_INIT 

an initial transition was taken in a state

QS_QEP_INIT_TRAN 

the top-most initial transition was taken

QS_QEP_INTERN_TRAN 

an internal transition was taken

QS_QEP_TRAN 

a regular transition was taken

QS_QEP_IGNORED 

an event was ignored (silently discarded)

QS_QEP_DISPATCH 

an event was dispatched (begin of RTC step)

QS_QEP_UNHANDLED 

an event was un-handled due to a guard

QS_QF_ACTIVE_DEFER 

AO deferred an event.

QS_QF_ACTIVE_RECALL 

AO recalled an event.

QS_QF_ACTIVE_SUBSCRIBE 

an AO subscribed to an event

QS_QF_ACTIVE_UNSUBSCRIBE 

an AO unsubscribed to an event

QS_QF_ACTIVE_POST 

an event was posted (FIFO) directly to AO

QS_QF_ACTIVE_POST_LIFO 

an event was posted (LIFO) directly to AO

QS_QF_ACTIVE_GET 

AO got an event and its queue is not empty.

QS_QF_ACTIVE_GET_LAST 

AO got an event and its queue is empty.

QS_QF_ACTIVE_RECALL_ATTEMPT 

AO attempted to recall an event.

QS_QF_EQUEUE_POST 

an event was posted (FIFO) to a raw queue

QS_QF_EQUEUE_POST_LIFO 

an event was posted (LIFO) to a raw queue

QS_QF_EQUEUE_GET 

get an event and queue still not empty

QS_QF_EQUEUE_GET_LAST 

get the last event from the queue

QS_QF_NEW_ATTEMPT 

an attempt to allocate an event failed

QS_QF_MPOOL_GET 

a memory block was removed from memory pool

QS_QF_MPOOL_PUT 

a memory block was returned to memory pool

QS_QF_PUBLISH 

an event was published to active objects

QS_QF_NEW_REF 

new event reference was created

QS_QF_NEW 

new event was created

QS_QF_GC_ATTEMPT 

garbage collection attempt

QS_QF_GC 

garbage collection

QS_QF_TICK 

QTimeEvt tick was called.

QS_QF_TIMEEVT_ARM 

a time event was armed

QS_QF_TIMEEVT_AUTO_DISARM 

a time event expired and was disarmed

QS_QF_TIMEEVT_DISARM_ATTEMPT 

attempt to disarm a disarmed QTimeEvt

QS_QF_TIMEEVT_DISARM 

true disarming of an armed time event

QS_QF_TIMEEVT_REARM 

rearming of a time event

QS_QF_TIMEEVT_POST 

a time event posted itself directly to an AO

QS_QF_DELETE_REF 

an event reference is about to be deleted

QS_QF_CRIT_ENTRY 

critical section was entered

QS_QF_CRIT_EXIT 

critical section was exited

QS_QF_ISR_ENTRY 

an ISR was entered

QS_QF_ISR_EXIT 

an ISR was exited

QS_QF_INT_DISABLE 

interrupts were disabled

QS_QF_INT_ENABLE 

interrupts were enabled

QS_QF_ACTIVE_POST_ATTEMPT 

attempt to post an evt to AO failed

QS_QF_EQUEUE_POST_ATTEMPT 

attempt to post evt to QEQueue failed

QS_QF_MPOOL_GET_ATTEMPT 

attempt to get a memory block failed

QS_SCHED_PREEMPT 

scheduler asynchronously preempted a task

QS_SCHED_RESTORE 

scheduler restored preempted task

QS_SCHED_LOCK 

scheduler was locked

QS_SCHED_UNLOCK 

scheduler was unlocked

QS_SCHED_NEXT 

scheduler started next task

QS_SCHED_IDLE 

scheduler restored the idle task

QS_ENUM_DICT 

enumeration dictionary entry

QS_QEP_TRAN_HIST 

a tran. to history was taken

QS_RESERVED_56 

reserved (previously QS_QEP_TRAN_EP)

QS_RESERVED_57 

reserved (previously QS_QEP_TRAN_XP)

QS_TEST_PAUSED 

test has been paused

QS_TEST_PROBE_GET 

reports that Test-Probe has been used

QS_SIG_DICT 

signal dictionary entry

QS_OBJ_DICT 

object dictionary entry

QS_FUN_DICT 

function dictionary entry

QS_USR_DICT 

user QS record dictionary entry

QS_TARGET_INFO 

reports the Target information

QS_TARGET_DONE 

reports completion of a user callback

QS_RX_STATUS 

reports QS data receive status

QS_QUERY_DATA 

reports the data from "current object" query

QS_PEEK_DATA 

reports the data from the PEEK query

QS_ASSERT_FAIL 

assertion failed in the code

QS_QF_RUN 

QF_run() was entered.

QS_SEM_TAKE 

a semaphore was taken by a thread

QS_SEM_BLOCK 

a semaphore blocked a thread

QS_SEM_SIGNAL 

a semaphore was signaled

QS_SEM_BLOCK_ATTEMPT 

a semaphore blocked was attempted

QS_MTX_LOCK 

a mutex was locked

QS_MTX_BLOCK 

a mutex blocked a thread

QS_MTX_UNLOCK 

a mutex was unlocked

QS_MTX_LOCK_ATTEMPT 

a mutex lock was attempted

QS_MTX_BLOCK_ATTEMPT 

a mutex blocking was attempted

QS_MTX_UNLOCK_ATTEMPT 

a mutex unlock was attempted

QS_QF_ACTIVE_DEFER_ATTEMPT 

AO attempted to defer an event.

QS_PRE_MAX 

the # predefined signals

Definition at line 52 of file qs.hpp.

◆ QS_ObjKind

enum QP::QS_ObjKind : std::uint8_t

Object kinds used in QS-RX (NOTE: watch out for backwards compatibility!).

Enumerator
QS_OBJ_SM 

State Machine.

QS_OBJ_AO 

Active Object.

QS_OBJ_MP 

Event Pool.

QS_OBJ_EQ 

Event Queue.

QS_OBJ_TE 

Time Event.

QS_OBJ_AP 

generic Application-specific object

QS_OBJ_SM_AO 

state machine AND active object

QS_OBJ_EP 

Event Pool.

Definition at line 452 of file qs.hpp.

◆ QS_RxRecords

enum QP::QS_RxRecords : std::uint8_t

QS received record types (RX channel).

Enumerator
QS_RX_INFO 

query Target info (ver, config, tstamp)

QS_RX_COMMAND 

execute a user-defined command in the Target

QS_RX_RESET 

reset the Target

QS_RX_TICK 

call system clock tick in the Target

QS_RX_PEEK 

peek Target memory

QS_RX_POKE 

poke Target memory

QS_RX_FILL 

fill Target memory

QS_RX_TEST_SETUP 

test setup

QS_RX_TEST_TEARDOWN 

test teardown

QS_RX_TEST_PROBE 

set a Test-Probe in the Target

QS_RX_GLB_FILTER 

set global filters in the Target

QS_RX_LOC_FILTER 

set local filters in the Target

QS_RX_AO_FILTER 

set local AO filter in the Target

QS_RX_CURR_OBJ 

set the "current-object" in the Target

QS_RX_TEST_CONTINUE 

continue a test after QS_TEST_PAUSE()

QS_RX_QUERY_CURR 

query the "current object" in the Target

QS_RX_EVENT 

inject an event to the Target

Definition at line 36 of file qs_pkg.hpp.

Function Documentation

◆ version()

char const * QP::version ( )
noexcept

Definition at line 52 of file qf_act.cpp.

◆ QF_LOG2()

std::uint_fast8_t QP::QF_LOG2 ( QP::QPSetBits const bitmask)
noexcept

Definition at line 172 of file qf_qact.cpp.

◆ QEvt_refCtr_inc_()

void QP::QEvt_refCtr_inc_ ( QEvt const *const me)
noexcept

Internal function to increment the refCtr of a const event.

Details
This function requires "casting `const` away" from the event pointer and also applies reinterpret_cast<>, which violates MISRA-C++:2023 Rules 8.2.3 and 8.2.5. This function encapsulates these deviations.

Forward Traceability

  • DVR_QP_MP2_R8_2_3: Rule 8.2.3(Required): A cast shall not remove any 'const' or 'volatile' qualification from the type pointer to by a pointer or by reference
  • DVR_QP_MP2_R8_2_5: Rule 8.2.5(Required): reinterpret_cast<> shall not be used

Definition at line 57 of file qf_act.cpp.

◆ QEvt_refCtr_dec_()

void QP::QEvt_refCtr_dec_ ( QEvt const *const me)
noexcept

Internal function to decrement the refCtr of a const event.

Details

Note
This function requires "casting `const` away" from the event pointer and also applies reinterpret_cast<>, which violates MISRA-C++:2023 Rules 8.2.3 and 8.2.5. This function encapsulates these deviations.

Forward Traceability

  • DVR_QP_MP2_R8_2_3: Rule 8.2.3(Required): A cast shall not remove any 'const' or 'volatile' qualification from the type pointer to by a pointer or by reference
  • DVR_QP_MP2_R8_2_5: Rule 8.2.5(Required): reinterpret_cast<> shall not be used

Definition at line 68 of file qf_act.cpp.

◆ dis_update()

template<typename T_>
T_ QP::dis_update ( T_ const org)
static

Internal function template to calculate the Duplicate Inverse Storage (DIS).

Template Parameters
T_integer type of the original variable
Parameters
[in]orgvalue of the original variable
Returns
the Duplicate Inverse Storage (DIS) of the provided parameter org
Note
This function requires "casting `const` away" from the event pointer and also applies reinterpret_cast<>, which violates MISRA-C++:2023 Rules 8.2.3 and 8.2.5. This function encapsulates these deviations.

Forward Traceability

  • DVR_QP_PCLP_2702: static symbol declared in header not referenced

Definition at line 61 of file qp_pkg.hpp.

◆ dis_verify()

template<typename T_>
bool QP::dis_verify ( T_ const org,
T_ const dis )
static

Internal function template to verify the Duplicate Inverse Storage (DIS).

Template Parameters
T_integer type of the original variable
Parameters
[in]orgvalue of the original variable
[in]disthe Duplicate Inverse Storage to compare
Returns
true if the the Duplicate Inverse Storage (DIS) matches the original value
Note
This function requires "casting `const` away" from the event pointer and also applies reinterpret_cast<>, which violates MISRA-C++:2023 Rules 8.2.3 and 8.2.5. This function encapsulates these deviations.

Forward Traceability

Definition at line 68 of file qp_pkg.hpp.

◆ QXK_contextSw_()

void QP::QXK_contextSw_ ( QActive *const next)
noexcept

QXK context switch management.

Details
This internal function handles context switch. It calls QF_onContextSw() (if QF_ON_CONTEXT_SW is defined and performs software tracing (if Q_SPY is defined).

Parameters
[in]nextpointer to the next thread (NULL for basic-thread)
Attention
QP::QXK_contextSw_() is invoked with interrupts disabled and must also return with interrupts disabled.

Definition at line 145 of file qxk.cpp.

Variable Documentation

◆ Q_USER_SIG

QSignal QP::Q_USER_SIG {4U}
constexpr

Definition at line 164 of file qp.hpp.

◆ QActive_registry_

std::array< QActive *, QF_MAX_ACTIVE+1U > QP::QActive_registry_

Internal array of pointers to the registered Active Objects.

Forward Traceability

  • DVP_QP_PCLP_1756: PCLP-1756 variable has 'static' storage duration and non-POD type
  • DVR_QP_PCLP_3708: global variable has static storage duration but is not constant-initialized

Definition at line 47 of file qf_qact.cpp.

◆ QActive_subscrList_

QSubscrList * QP::QActive_subscrList_

Internal pointer to the array of subscribers to the event-signals.

Forward Traceability

Definition at line 47 of file qf_ps.cpp.

◆ QActive_maxPubSignal_

QSignal QP::QActive_maxPubSignal_

Internal maximum published signal (# used entries in the QP::QActive_subscrList_ array).

Forward Traceability

Definition at line 48 of file qf_ps.cpp.

◆ QTimeEvt_head_

std::array< QTimeEvt, QF_MAX_TICK_RATE > QP::QTimeEvt_head_

Internal heads of the time-event linked-lists (by clock-tick rate).

Forward Traceability

  • DVP_QP_PCLP_1756: PCLP-1756 variable has 'static' storage duration and non-POD type
  • DVR_QP_PCLP_3708: global variable has static storage duration but is not constant-initialized

Definition at line 51 of file qf_time.cpp.

◆ QTE_FLAG_IS_LINKED

std::uint8_t QP::QTE_FLAG_IS_LINKED {1U << 7U}
constexpr

Definition at line 46 of file qp_pkg.hpp.

◆ QTE_FLAG_WAS_DISARMED

std::uint8_t QP::QTE_FLAG_WAS_DISARMED {1U << 6U}
constexpr

Definition at line 47 of file qp_pkg.hpp.

◆ QS_GRP_ALL

std::int_fast16_t QP::QS_GRP_ALL { 0xF0 }
constexpr

Definition at line 178 of file qs.hpp.

◆ QS_GRP_SM

std::int_fast16_t QP::QS_GRP_SM { 0xF1 }
constexpr

Definition at line 179 of file qs.hpp.

◆ QS_GRP_AO

std::int_fast16_t QP::QS_GRP_AO { 0xF2 }
constexpr

Definition at line 180 of file qs.hpp.

◆ QS_GRP_EQ

std::int_fast16_t QP::QS_GRP_EQ { 0xF3 }
constexpr

Definition at line 181 of file qs.hpp.

◆ QS_GRP_MP

std::int_fast16_t QP::QS_GRP_MP { 0xF4 }
constexpr

Definition at line 182 of file qs.hpp.

◆ QS_GRP_TE

std::int_fast16_t QP::QS_GRP_TE { 0xF5 }
constexpr

Definition at line 183 of file qs.hpp.

◆ QS_GRP_QF

std::int_fast16_t QP::QS_GRP_QF { 0xF6 }
constexpr

Definition at line 184 of file qs.hpp.

◆ QS_GRP_SC

std::int_fast16_t QP::QS_GRP_SC { 0xF7 }
constexpr

Definition at line 185 of file qs.hpp.

◆ QS_GRP_SEM

std::int_fast16_t QP::QS_GRP_SEM { 0xF8 }
constexpr

Definition at line 186 of file qs.hpp.

◆ QS_GRP_MTX

std::int_fast16_t QP::QS_GRP_MTX { 0xF9 }
constexpr

Definition at line 187 of file qs.hpp.

◆ QS_GRP_U0

std::int_fast16_t QP::QS_GRP_U0 { 0xFA }
constexpr

Definition at line 188 of file qs.hpp.

◆ QS_GRP_U1

std::int_fast16_t QP::QS_GRP_U1 { 0xFB }
constexpr

Definition at line 189 of file qs.hpp.

◆ QS_GRP_U2

std::int_fast16_t QP::QS_GRP_U2 { 0xFC }
constexpr

Definition at line 190 of file qs.hpp.

◆ QS_GRP_U3

std::int_fast16_t QP::QS_GRP_U3 { 0xFD }
constexpr

Definition at line 191 of file qs.hpp.

◆ QS_GRP_U4

std::int_fast16_t QP::QS_GRP_U4 { 0xFE }
constexpr

Definition at line 192 of file qs.hpp.

◆ QS_GRP_UA

std::int_fast16_t QP::QS_GRP_UA { 0xFF }
constexpr

Definition at line 193 of file qs.hpp.

◆ QS_USER

std::int_fast16_t QP::QS_USER { 100 }
constexpr

Definition at line 196 of file qs.hpp.

◆ QS_USER0

std::int_fast16_t QP::QS_USER0 { QS_USER }
constexpr

Definition at line 197 of file qs.hpp.

◆ QS_USER1

std::int_fast16_t QP::QS_USER1 { QS_USER + 5 }
constexpr

Definition at line 198 of file qs.hpp.

◆ QS_USER2

std::int_fast16_t QP::QS_USER2 { QS_USER + 10 }
constexpr

Definition at line 199 of file qs.hpp.

◆ QS_USER3

std::int_fast16_t QP::QS_USER3 { QS_USER + 15 }
constexpr

Definition at line 200 of file qs.hpp.

◆ QS_USER4

std::int_fast16_t QP::QS_USER4 { QS_USER + 20 }
constexpr

Definition at line 201 of file qs.hpp.

◆ QS_ID_AO

std::int_fast16_t QP::QS_ID_AO { 0 }
constexpr

Definition at line 204 of file qs.hpp.

◆ QS_ID_EP

std::int_fast16_t QP::QS_ID_EP { 64 }
constexpr

Definition at line 205 of file qs.hpp.

◆ QS_ID_EQ

std::int_fast16_t QP::QS_ID_EQ { 80 }
constexpr

Definition at line 206 of file qs.hpp.

◆ QS_ID_AP

std::int_fast16_t QP::QS_ID_AP { 96 }
constexpr

Definition at line 207 of file qs.hpp.

◆ QS_IDS_ALL

std::int_fast16_t QP::QS_IDS_ALL { 0xF0 }
constexpr

Definition at line 210 of file qs.hpp.

◆ QS_IDS_AO

std::int_fast16_t QP::QS_IDS_AO { 0xF1 }
constexpr

Definition at line 211 of file qs.hpp.

◆ QS_IDS_EP

std::int_fast16_t QP::QS_IDS_EP { 0xF2 }
constexpr

Definition at line 212 of file qs.hpp.

◆ QS_IDS_EQ

std::int_fast16_t QP::QS_IDS_EQ { 0xF3 }
constexpr

Definition at line 213 of file qs.hpp.

◆ QS_IDS_AP

std::int_fast16_t QP::QS_IDS_AP { 0xF4 }
constexpr

Definition at line 214 of file qs.hpp.

◆ QS_EOD

std::uint16_t QP::QS_EOD { 0xFFFFU }
constexpr

Definition at line 216 of file qs.hpp.

◆ QS_CMD

std::uint8_t QP::QS_CMD { 0x07U }
constexpr

Definition at line 217 of file qs.hpp.

◆ QS_HEX_FMT

std::uint8_t QP::QS_HEX_FMT {0xFU}
constexpr

Definition at line 219 of file qs.hpp.

◆ QS_RXATTR_SIZE

std::uint8_t QP::QS_RXATTR_SIZE {128U}
constexpr

Definition at line 449 of file qs.hpp.

◆ QUTEST_ON_POST

std::uint8_t QP::QUTEST_ON_POST {124U}
constexpr

Definition at line 754 of file qs.hpp.

◆ QS_FRAME

std::uint8_t QP::QS_FRAME {0x7EU}
constexpr

Definition at line 57 of file qs_pkg.hpp.

◆ QS_ESC

std::uint8_t QP::QS_ESC {0x7DU}
constexpr

Definition at line 58 of file qs_pkg.hpp.

◆ QS_ESC_XOR

std::uint8_t QP::QS_ESC_XOR {0x20U}
constexpr

Definition at line 59 of file qs_pkg.hpp.

◆ QS_GOOD_CHKSUM

std::uint8_t QP::QS_GOOD_CHKSUM {0xFFU}
constexpr

Definition at line 60 of file qs_pkg.hpp.

◆ QS_ENDIANNES

union QP::Endiannes QP::QS_ENDIANNES = { static_cast<std::uint16_t>(0x7F00U) }

◆ BUILD_DATE

char const QP::BUILD_DATE = __DATE__

Definition at line 31 of file qstamp.cpp.

◆ BUILD_TIME

char const QP::BUILD_TIME = __TIME__

Definition at line 32 of file qstamp.cpp.

◆ QXTHREAD_NO_TIMEOUT

QTimeEvtCtr QP::QXTHREAD_NO_TIMEOUT {0U}
constexpr

No-timeout when blocking on semaphores/mutextes/event-queues.

Definition at line 37 of file qxk.hpp.

◆ QXK_priv_

QXK QP::QXK_priv_

Definition at line 141 of file qxk.cpp.

◆ versionStr

char QP::versionStr[24] = "QP/C++ " QP_VERSION_STR
staticconstexpr

Definition at line 49 of file qf_act.cpp.