QP/C++ 6.9.3
qpcpp.hpp File Reference
QEP | QF | QV | QK | QXK | QS

QP/C++ public interface including backwards-compatibility layer. More...

#include "qf_port.hpp"
#include "qassert.h"
#include "qs_port.hpp"
Include dependency graph for qpcpp.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define QP_API_VERSION   0
 Macro that specifies the backwards compatibility with the QP/C++ API version. More...
 
#define QS_FILTER_ON(rec_)   QS_GLB_FILTER((rec_))
 
#define QS_FILTER_OFF(rec_)   QS_GLB_FILTER(-(rec_))
 
#define QS_FILTER_SM_OBJ(obj_)   (static_cast<void>(0))
 
#define QS_FILTER_AO_OBJ(obj_)   (static_cast<void>(0))
 
#define QS_FILTER_MP_OBJ(obj_)   (static_cast<void>(0))
 
#define QS_FILTER_EQ_OBJ(obj_)   (static_cast<void>(0))
 
#define QS_FILTER_TE_OBJ(obj_)   (static_cast<void>(0))
 
#define QS_FILTER_AP_OBJ(obj_)    (QP::QS::priv_.locFilter_AP = (obj_))
 
#define QS_BEGIN(rec_, obj_)
 
#define QS_U32_HEX(width_, data_)
 
#define Q_TRAN(target_)   (me->tran(Q_STATE_CAST(target_)))
 
#define Q_TRAN_HIST(hist_)   (me->tran_hist((hist_)))
 
#define Q_SUPER(state_)   (me->super((state_)))
 
#define QM_ENTRY(state_)   (me->qm_entry((state_)))
 
#define QM_EXIT(state_)   (me->qm_exit((state_)))
 
#define QM_SM_EXIT(state_)   (me->qm_sm_exit((state_)))
 
#define QM_TRAN(tatbl_)   (me->qm_tran((tatbl_)))
 
#define QM_TRAN_INIT(tatbl_)   (me->qm_tran_init((tatbl_)))
 
#define QM_TRAN_HIST(history_, tatbl_)    (me->qm_tran_hist((history_), (tatbl_)))
 
#define QM_TRAN_EP(tatbl_)   (me->qm_tran_ep((tatbl_)))
 
#define QM_TRAN_XP(xp_, tatbl_)   (me->qm_tran_xp((xp_), (tatbl_)))
 
#define QM_SUPER_SUB(state_)   (me->qm_super_sub((state_)))
 

Detailed Description

QP/C++ public interface including backwards-compatibility layer.

Definition in file qpcpp.hpp.

Macro Definition Documentation

◆ QP_API_VERSION

#define QP_API_VERSION   0

Macro that specifies the backwards compatibility with the QP/C++ API version.

Description
This header file must be included directly or indirectly in all application modules (*.cpp files) that use QP/C++.
Description
For example, QP_API_VERSION=540 will cause generating the compatibility layer with QP/C++ version 5.4.0 and newer, but not older than 5.4.0. QP_API_VERSION=0 causes generation of the compatibility layer "from the begining of time", which is the maximum backwards compatibilty. This is the default.

Conversely, QP_API_VERSION=9999 means that no compatibility layer should be generated. This setting is useful for checking if an application complies with the latest QP/C++ API.

Definition at line 70 of file qpcpp.hpp.

◆ QS_FILTER_ON

#define QS_FILTER_ON (   rec_)    QS_GLB_FILTER((rec_))
Deprecated:
enable the QS global filter

Definition at line 80 of file qpcpp.hpp.

◆ QS_FILTER_OFF

#define QS_FILTER_OFF (   rec_)    QS_GLB_FILTER(-(rec_))
Deprecated:
disable the QS global filter

Definition at line 83 of file qpcpp.hpp.

◆ QS_FILTER_SM_OBJ

#define QS_FILTER_SM_OBJ (   obj_)    (static_cast<void>(0))
Deprecated:
enable the QS local filter for SM (state machine) object

Definition at line 86 of file qpcpp.hpp.

◆ QS_FILTER_AO_OBJ

#define QS_FILTER_AO_OBJ (   obj_)    (static_cast<void>(0))
Deprecated:
enable the QS local filter for AO (active objects)

Definition at line 89 of file qpcpp.hpp.

◆ QS_FILTER_MP_OBJ

#define QS_FILTER_MP_OBJ (   obj_)    (static_cast<void>(0))
Deprecated:
enable the QS local filter for MP (memory pool) object

Definition at line 92 of file qpcpp.hpp.

◆ QS_FILTER_EQ_OBJ

#define QS_FILTER_EQ_OBJ (   obj_)    (static_cast<void>(0))
Deprecated:
enable the QS local filter for EQ (event queue) object

Definition at line 95 of file qpcpp.hpp.

◆ QS_FILTER_TE_OBJ

#define QS_FILTER_TE_OBJ (   obj_)    (static_cast<void>(0))
Deprecated:
enable the QS local filter for TE (time event) object

Definition at line 98 of file qpcpp.hpp.

◆ QS_FILTER_AP_OBJ

#define QS_FILTER_AP_OBJ (   obj_)     (QP::QS::priv_.locFilter_AP = (obj_))
Deprecated:
local Filter for a generic application object obj_.

Definition at line 103 of file qpcpp.hpp.

◆ QS_BEGIN

#define QS_BEGIN (   rec_,
  obj_ 
)
Value:
if (QS_GLB_FILTER_(rec_) && \
((QP::QS::priv_.locFilter[QP::QS::AP_OBJ] == nullptr) \
|| (QP::QS::priv_.locFilter_AP == (obj_)))) \
{ \
QP::QS::beginRec_(static_cast<std::uint_fast8_t>(rec_)); \
QS_TIME_PRE_();
unsigned int uint_fast8_t
fast at-least 8-bit unsigned int
Definition: 16bit/stdint.h:36
static QS priv_
Definition: qs.hpp:554
static void beginRec_(std::uint_fast8_t const rec) noexcept
Mark the begin of a QS record rec.
Definition: qs.cpp:410
@ AP_OBJ
generic Application-specific object
Definition: qs.hpp:520
#define QS_CRIT_E_()
This is an internal macro for entering a critical section.
Definition: qs.hpp:793
Deprecated:
begin of a user QS record, instead use QS_BEGIN_ID()

Definition at line 107 of file qpcpp.hpp.

◆ QS_U32_HEX

#define QS_U32_HEX (   width_,
  data_ 
)
Value:
(QP::QS::u32_fmt_(static_cast<std::uint8_t>( \
(static_cast<std::uint8_t>((width_) << 4)) \
| static_cast<std::uint8_t>(0xFU)), (data_)))
unsigned char uint8_t
exact-width 8-bit unsigned int
Definition: 16bit/stdint.h:29
static void u32_fmt_(std::uint8_t format, std::uint32_t d) noexcept
Output std::uint32_t data element with format information.
Definition: qs.cpp:624
Deprecated:
output hex-formatted std::uint32_t to the QS record

Definition at line 118 of file qpcpp.hpp.

◆ Q_TRAN

#define Q_TRAN (   target_)    (me->tran(Q_STATE_CAST(target_)))
Deprecated:
Macro to specify a transition in the "me->" impl-strategy. Instead use the new impl-strategy without the "me->" pointer, where you call tran(Q_STATE_CAST(target_)).

Definition at line 140 of file qpcpp.hpp.

◆ Q_TRAN_HIST

#define Q_TRAN_HIST (   hist_)    (me->tran_hist((hist_)))
Deprecated:
Macro to specify a tran-to-history in the "me->" impl-strategy. Instead use the new impl-strategy without the "me->" pointer, where you call tran_hist(Q_STATE_CAST(hist_)).

Definition at line 146 of file qpcpp.hpp.

◆ Q_SUPER

#define Q_SUPER (   state_)    (me->super((state_)))
Deprecated:
Macro to specify the superstate in the "me->" impl-strategy. Instead use the new impl-strategy without the "me->" pointer, where you call super(state_)).

Definition at line 152 of file qpcpp.hpp.

◆ QM_ENTRY

#define QM_ENTRY (   state_)    (me->qm_entry((state_)))
Deprecated:
Macro to call in a QM state entry-handler. Applicable only to QMSMs. Instead use the new impl-strategy without the "me->" pointer, where the QM-generated code calls qm_entry(Q_STATE_CAST(state_)).

Definition at line 158 of file qpcpp.hpp.

◆ QM_EXIT

#define QM_EXIT (   state_)    (me->qm_exit((state_)))
Deprecated:
Macro to call in a QM state exit-handler. Applicable only to QMSMs. Instead use the new impl-strategy without the "me->" pointer, where the QM-generated code calls qm_exit(Q_STATE_CAST(state_)).

Definition at line 164 of file qpcpp.hpp.

◆ QM_SM_EXIT

#define QM_SM_EXIT (   state_)    (me->qm_sm_exit((state_)))
Deprecated:
Macro to call in a QM submachine exit-handler. Applicable only to QMSMs. Instead use the new impl-strategy without the "me->" pointer, where the QM-generated code calls qm_sm_exit(Q_STATE_CAST(state_)).

Definition at line 170 of file qpcpp.hpp.

◆ QM_TRAN

#define QM_TRAN (   tatbl_)    (me->qm_tran((tatbl_)))
Deprecated:
Macro to call in a QM state-handler when it executes a transition. Instead use the new impl-strategy without the "me->" pointer, where the QM-generated code calls qm_tran((tatbl_)).

Definition at line 176 of file qpcpp.hpp.

◆ QM_TRAN_INIT

#define QM_TRAN_INIT (   tatbl_)    (me->qm_tran_init((tatbl_)))
Deprecated:
Macro to call in a QM state-handler when it executes an initial tran. Instead use the new impl-strategy without the "me->" pointer, where the QM-generated code calls qm_tran_init((tatbl_)).

Definition at line 182 of file qpcpp.hpp.

◆ QM_TRAN_HIST

#define QM_TRAN_HIST (   history_,
  tatbl_ 
)     (me->qm_tran_hist((history_), (tatbl_)))
Deprecated:
Macro to call in a QM state-handler when it executes a tran-to-history. Instead use the new impl-strategy without the "me->" pointer, where the QM-generated code calls qm_tran_hist((history_), (tatbl_)).

Definition at line 188 of file qpcpp.hpp.

◆ QM_TRAN_EP

#define QM_TRAN_EP (   tatbl_)    (me->qm_tran_ep((tatbl_)))
Deprecated:
Macro to call in a QM state-handler when it executes an initial tran. Instead use the new impl-strategy without the "me->" pointer, where the QM-generated code calls qm_tran_ep((tatbl_)).

Definition at line 195 of file qpcpp.hpp.

◆ QM_TRAN_XP

#define QM_TRAN_XP (   xp_,
  tatbl_ 
)    (me->qm_tran_xp((xp_), (tatbl_)))
Deprecated:
Macro to call in a QM state-handler when it executes a tran-to-exit-point. Instead use the new impl-strategy without the "me->" pointer, where the QM-generated code calls qm_tran_xp((xp_), (tatbl_)).

Definition at line 201 of file qpcpp.hpp.

◆ QM_SUPER_SUB

#define QM_SUPER_SUB (   state_)    (me->qm_super_sub((state_)))
Deprecated:
Designates the superstate of a given state in a subclass of QP::QMsm. Instead use the new impl-strategy without the "me->" pointer, where the QM-generated code calls qm_super_sub((state_)).

Definition at line 207 of file qpcpp.hpp.