QP/C++  7.0.1
Real-Time Embedded Framework
qpcpp.hpp File Reference

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

#include "qf_port.hpp"
#include "qassert.h"
#include "qs_port.hpp"

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(Q_STATE_CAST(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_)))
 

Typedefs

using char_t = char
 

Detailed Description

Date
Last updated on: 2021-12-23
Version
Last updated for: Version 7.0.0, 2022-04-30
Description
This header file must be included directly or indirectly in all application modules (*.cpp files) that use QP/C++.

Definition in file qpcpp.hpp.

Macro Definition Documentation

◆ QP_API_VERSION

#define QP_API_VERSION   0
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 61 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 76 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 79 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 82 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 85 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 88 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 91 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 94 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 99 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_();
static QS priv_
Definition: qs.hpp:519
static void beginRec_(std::uint_fast8_t const rec) noexcept
Mark the begin of a QS record rec.
Definition: qs.cpp:407
@ AP_OBJ
generic Application-specific object
Definition: qs.hpp:486
#define QS_CRIT_E_()
This is an internal macro for entering a critical section.
Definition: qs.hpp:756
Deprecated:
begin of a user QS record, instead use QS_BEGIN_ID()

Definition at line 103 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_)))
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:621
Deprecated:
output hex-formatted std::uint32_t to the QS record

Definition at line 114 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 136 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 142 of file qpcpp.hpp.

◆ Q_SUPER

#define Q_SUPER (   state_)    (me->super(Q_STATE_CAST(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 148 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 154 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 160 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 166 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 172 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 178 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 184 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 191 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 197 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 203 of file qpcpp.hpp.

Typedef Documentation

◆ char_t

using char_t = char
Deprecated:
plain 'char' is no longer forbidden in MISRA/AUTOSAR-C++

Definition at line 70 of file qpcpp.hpp.