QP/C++  8.0.0
Real-Time Embedded Framework
Loading...
Searching...
No Matches
qpcpp.hpp File Reference

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

#include "qp_port.hpp"
#include "qsafe.h"
#include "qs_port.hpp"

Go to the source code of this file.

Macros

#define QP_API_VERSION   0
 
#define QM_SM_STATE_DECL(subm_, state_)   error "submachines no longer supported"
 
#define qm_super_sub(sm_state_)   error "submachines no longer supported"
 
#define qm_tran_ep(tatbl_)   error "submachines no longer supported"
 
#define qm_tran_xp(xp_, tatbl_)   error "submachines no longer supported"
 
#define qm_sm_exit(sm_state_)   error "submachines no longer supported"
 
#define Q_onAssert(module_, id_)   Q_onError(module_, id_)
 
#define Q_ALLEGE_ID(id_, expr_)
 
#define Q_ALLEGE(expr_)   Q_ALLEGE_ID(__LINE__, (expr_))
 
#define Q_ASSERT_COMPILE(expr_)   Q_ASSERT_STATIC(expr_)
 
#define QF_NO_MARGIN   QP::QF::NO_MARGIN
 
#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::filt_.loc_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_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_)))
 

Typedefs

using char_t = char
 

Detailed Description

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

Definition in file qpcpp.hpp.

Macro Definition Documentation

◆ QP_API_VERSION

#define QP_API_VERSION   0

Definition at line 49 of file qpcpp.hpp.

◆ QM_SM_STATE_DECL

#define QM_SM_STATE_DECL ( subm_,
state_ )   error "submachines no longer supported"

Definition at line 56 of file qpcpp.hpp.

◆ qm_super_sub

#define qm_super_sub ( sm_state_)    error "submachines no longer supported"

Definition at line 57 of file qpcpp.hpp.

◆ qm_tran_ep

#define qm_tran_ep ( tatbl_)    error "submachines no longer supported"

Definition at line 58 of file qpcpp.hpp.

◆ qm_tran_xp

#define qm_tran_xp ( xp_,
tatbl_ )   error "submachines no longer supported"

Definition at line 59 of file qpcpp.hpp.

◆ qm_sm_exit

#define qm_sm_exit ( sm_state_)    error "submachines no longer supported"

Definition at line 60 of file qpcpp.hpp.

◆ Q_onAssert

#define Q_onAssert ( module_,
id_ )   Q_onError(module_, id_)
Deprecated
assertion failure handler Use Q_onError() instead.

Definition at line 72 of file qpcpp.hpp.

◆ Q_ALLEGE_ID

#define Q_ALLEGE_ID ( id_,
expr_ )
Value:
if (!(expr_)) { \
QF_CRIT_STAT \
QF_CRIT_ENTRY(); \
Q_onError(&Q_this_module_[0], (id_)); \
QF_CRIT_EXIT(); \
} else ((void)0)
Deprecated
#Q_NASSERT preprocessor switch to disable QP assertions
Deprecated
general purpose assertion with user-specified ID number that always evaluates the expr_ expression.
Note
The use of this macro is no longer recommended.

Definition at line 96 of file qpcpp.hpp.

◆ Q_ALLEGE

#define Q_ALLEGE ( expr_)    Q_ALLEGE_ID(__LINE__, (expr_))
Deprecated
general purpose assertion without ID number that always evaluates the expr_ expression. Instead of ID number, this macro is based on the standard __LINE__ macro.
Note
The use of this macro is no longer recommended.

Definition at line 111 of file qpcpp.hpp.

◆ Q_ASSERT_COMPILE

#define Q_ASSERT_COMPILE ( expr_)    Q_ASSERT_STATIC(expr_)

Static (compile-time) assertion.

Deprecated
Use Q_ASSERT_STATIC() or better yet static_assert() instead.

Definition at line 118 of file qpcpp.hpp.

◆ QF_NO_MARGIN

#define QF_NO_MARGIN   QP::QF::NO_MARGIN
Deprecated
use QP::QF::NO_MARGIN instead

Definition at line 121 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 127 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 130 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 133 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 136 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 139 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 142 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 145 of file qpcpp.hpp.

◆ QS_FILTER_AP_OBJ

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

Definition at line 150 of file qpcpp.hpp.

◆ QS_BEGIN

#define QS_BEGIN ( rec_,
obj_ )
Value:
if (QS_GLB_FILTER_(rec_) && \
((QP::QS::filt_.loc[QP::QS::AP_OBJ] == nullptr) \
|| (QP::QS::filt_.loc_AP == (obj_)))) \
{ \
QS_CRIT_STAT \
QS_CRIT_ENTRY(); \
QP::QS::beginRec_(static_cast<std::uint_fast8_t>(rec_)); \
QS_TIME_PRE();
Deprecated
begin of a user QS record, instead use QS_BEGIN_ID()

Definition at line 154 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)) | QS_HEX_FMT), (data_)))
Deprecated
output hex-formatted std::uint32_t to the QS record

Definition at line 165 of file qpcpp.hpp.

◆ Q_TRAN

#define Q_TRAN ( target_)    (me->tran(Q_STATE_CAST(target_)))
Deprecated
Macro to specify a tran. 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 184 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 190 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 196 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 202 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 208 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 tran. Instead use the new impl-strategy without the "me->" pointer, where the QM-generated code calls qm_tran((tatbl_)).

Definition at line 214 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 220 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 226 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 68 of file qpcpp.hpp.