QP/C++  8.0.2
Real-Time Embedded Framework
Loading...
Searching...
No Matches
QP Namespace Reference

QP/C++ framework. More...

Namespaces

namespace  QF
 QF Active Object Framework.
 
namespace  QK
 preemptive, non-blocking kernel
 
namespace  QS
 QP/Spy software tracing (target-resident components)
 
namespace  QV
 non-preemptive kernel
 
namespace  QXK
 preemptive, dual-mode (non-blocking / blocking) kernel
 

Classes

class  QActive
 Active object class (based on the QHsm implementation strategy) More...
 
class  QAsm
 Abstract State Machine class (state machine interface) More...
 
union  QAsmAttr
 Attribute of for the QP::QAsm class (Abstract State Machine) More...
 
class  QEQueue
 Native QP event queue. More...
 
class  QEvt
 Event class. More...
 
class  QHsm
 Hierarchical State Machine class (QHsm-style state machine implementation strategy) More...
 
class  QMActive
 Active object class (based on QMsm implementation strategy) More...
 
class  QMPool
 Native QF Memory Pool. More...
 
class  QMsm
 Hierarchical State Machine class (QMsm-style state machine implementation strategy) 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...
 
class  QPSet
 Set of Active Objects of up to QF_MAX_ACTIVE elements. More...
 
class  QPtrDis
 
class  QSubscrList
 Subscriber List (for publish-subscribe) More...
 
class  QTicker
 "Ticker" Active Object class More...
 
class  QTimeEvt
 Time Event class. More...
 

Typedefs

using QEQueueCtr = std::uint16_t
 
using QSchedStatus = std::uint_fast8_t
 
using QMPoolSize = std::uint16_t
 
using QMPoolCtr = std::uint16_t
 
using QSignal = std::uint16_t
 The signal of event QP::QEvt.
 
using QEvtPtr = QEvt const *
 Pointer to const event instances passed around in QP 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
 

Functions

std::uint_fast8_t QF_LOG2 (QP::QPSetBits const bitmask) 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::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

char const versionStr [24] = "QP/C++ " QP_VERSION_STR
 
constexpr enum_t Q_USER_SIG {4}
 
constexpr std::uint8_t QTE_FLAG_IS_LINKED {1U << 7U}
 
constexpr std::uint8_t QTE_FLAG_WAS_DISARMED {1U << 6U}
 
char const BUILD_DATE [12] = __DATE__
 
char const BUILD_TIME [9] = __TIME__
 

Detailed Description

QP/C++ framework.

Typedef Documentation

◆ QEQueueCtr

using QP::QEQueueCtr = std::uint16_t

The data type to store the ring-buffer counters 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 42 of file qequeue.hpp.

◆ QSchedStatus

using QP::QSchedStatus = std::uint_fast8_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.

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 51 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.

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

Definition at line 61 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 form of event parameters.

Definition at line 112 of file qp.hpp.

◆ QEvtPtr

using QP::QEvtPtr = QEvt const *

Pointer to const event instances passed around in QP Framework.

Definition at line 145 of file qp.hpp.

◆ QState

using QP::QState = std::uint_fast8_t

Type returned from state-handler functions.

Definition at line 150 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 154 of file qp.hpp.

◆ QActionHandler

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

Pointer to an action-handler function.

Definition at line 155 of file qp.hpp.

◆ QXThreadHandler

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

Pointer to an extended-thread handler function.

Definition at line 156 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 465 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 472 of file qp.hpp.

◆ QPSetBits

using QP::QPSetBits = std::uint32_t

Bitmask for the internal representation of QPSet elements

Definition at line 480 of file qp.hpp.

Function Documentation

◆ QF_LOG2()

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

Definition at line 72 of file qf_act.cpp.

◆ QEvt_refCtr_inc_()

void QP::QEvt_refCtr_inc_ ( QEvt const *const e)
inlinenoexcept

Increment the refCtr of a const event (requires casting const away)

Backward Traceability

Definition at line 67 of file qp_pkg.hpp.

◆ QEvt_refCtr_dec_()

void QP::QEvt_refCtr_dec_ ( QEvt const *const e)
inlinenoexcept

Decrement the refCtr of a const event (requires casting const away)

Backward Traceability

  • DVR_QP_MC4_R11_08

Definition at line 73 of file qp_pkg.hpp.

Variable Documentation

◆ versionStr

char const QP::versionStr = "QP/C++ " QP_VERSION_STR

Definition at line 49 of file qf_act.cpp.

◆ Q_USER_SIG

enum_t QP::Q_USER_SIG {4}
constexpr

Definition at line 179 of file qp.hpp.

◆ QTE_FLAG_IS_LINKED

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

Definition at line 63 of file qp_pkg.hpp.

◆ QTE_FLAG_WAS_DISARMED

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

Definition at line 64 of file qp_pkg.hpp.

◆ BUILD_DATE

char const QP::BUILD_DATE = __DATE__

Definition at line 32 of file qstamp.cpp.

◆ BUILD_TIME

char const QP::BUILD_TIME = __TIME__

Definition at line 33 of file qstamp.cpp.