QP/C++  7.4.0-rc.3
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 Q_onAssert(module_, id_)
 
#define Q_ALLEGE_ID(id_, expr_)
 
#define Q_ALLEGE(expr_)
 
#define Q_ASSERT_COMPILE(expr_)
 
#define QF_NO_MARGIN   QP::QF::NO_MARGIN
 
#define QS_FILTER_ON(rec_)
 
#define QS_FILTER_OFF(rec_)
 
#define QS_FILTER_SM_OBJ(obj_)
 
#define QS_FILTER_AO_OBJ(obj_)
 
#define QS_FILTER_MP_OBJ(obj_)
 
#define QS_FILTER_EQ_OBJ(obj_)
 
#define QS_FILTER_TE_OBJ(obj_)
 
#define QS_FILTER_AP_OBJ(obj_)
 
#define QS_BEGIN(rec_, obj_)
 
#define QS_U32_HEX(width_, data_)
 
#define Q_TRAN(target_)
 
#define Q_TRAN_HIST(hist_)
 
#define Q_SUPER(state_)
 
#define QM_ENTRY(state_)
 
#define QM_EXIT(state_)
 
#define QM_SM_EXIT(state_)
 
#define QM_TRAN(tatbl_)
 
#define QM_TRAN_INIT(tatbl_)
 
#define QM_TRAN_HIST(history_, tatbl_)
 
#define QM_TRAN_EP(tatbl_)
 
#define QM_TRAN_XP(xp_, tatbl_)
 
#define QM_SUPER_SUB(state_)
 

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 58 of file qpcpp.hpp.

◆ Q_onAssert

#define Q_onAssert ( module_,
id_ )
Value:
Q_onError(module_, id_)
Q_NORETURN Q_onError(char const *const module, int_t const id)
Deprecated
assertion failure handler Use Q_onError() instead.

Definition at line 77 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 95 of file qpcpp.hpp.

◆ Q_ALLEGE

#define Q_ALLEGE ( expr_)
Value:
Q_ALLEGE_ID(__LINE__, (expr_))
#define Q_ALLEGE_ID(id_, expr_)
Definition qpcpp.hpp:95
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 110 of file qpcpp.hpp.

◆ Q_ASSERT_COMPILE

#define Q_ASSERT_COMPILE ( expr_)
Value:
#define Q_ASSERT_STATIC(expr_)
Definition qsafe.h:157

Static (compile-time) assertion.

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

Definition at line 117 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 120 of file qpcpp.hpp.

◆ QS_FILTER_ON

#define QS_FILTER_ON ( rec_)
Value:
#define QS_GLB_FILTER(rec_)
Definition qs.hpp:339
Deprecated
enable the QS global filter

Definition at line 126 of file qpcpp.hpp.

◆ QS_FILTER_OFF

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

Definition at line 129 of file qpcpp.hpp.

◆ QS_FILTER_SM_OBJ

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

Definition at line 132 of file qpcpp.hpp.

◆ QS_FILTER_AO_OBJ

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

Definition at line 135 of file qpcpp.hpp.

◆ QS_FILTER_MP_OBJ

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

Definition at line 138 of file qpcpp.hpp.

◆ QS_FILTER_EQ_OBJ

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

Definition at line 141 of file qpcpp.hpp.

◆ QS_FILTER_TE_OBJ

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

Definition at line 144 of file qpcpp.hpp.

◆ QS_FILTER_AP_OBJ

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

Definition at line 149 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_();
@ AP_OBJ
generic Application-specific object
Definition qs.hpp:996
Deprecated
begin of a user QS record, instead use QS_BEGIN_ID()

Definition at line 153 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_)))
#define QS_HEX_FMT
Definition qs.hpp:586
Deprecated
output hex-formatted std::uint32_t to the QS record

Definition at line 164 of file qpcpp.hpp.

◆ Q_TRAN

#define Q_TRAN ( target_)
Value:
(me->tran(Q_STATE_CAST(target_)))
#define Q_STATE_CAST(handler_)
Definition qp.hpp:488
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 183 of file qpcpp.hpp.

◆ Q_TRAN_HIST

#define Q_TRAN_HIST ( hist_)
Value:
(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 189 of file qpcpp.hpp.

◆ Q_SUPER

#define Q_SUPER ( state_)
Value:
(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 195 of file qpcpp.hpp.

◆ QM_ENTRY

#define QM_ENTRY ( state_)
Value:
(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 201 of file qpcpp.hpp.

◆ QM_EXIT

#define QM_EXIT ( state_)
Value:
(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 207 of file qpcpp.hpp.

◆ QM_SM_EXIT

#define QM_SM_EXIT ( state_)
Value:
(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 213 of file qpcpp.hpp.

◆ QM_TRAN

#define QM_TRAN ( tatbl_)
Value:
(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 219 of file qpcpp.hpp.

◆ QM_TRAN_INIT

#define QM_TRAN_INIT ( tatbl_)
Value:
(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 225 of file qpcpp.hpp.

◆ QM_TRAN_HIST

#define QM_TRAN_HIST ( history_,
tatbl_ )
Value:
(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 231 of file qpcpp.hpp.

◆ QM_TRAN_EP

#define QM_TRAN_EP ( tatbl_)
Value:
(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 238 of file qpcpp.hpp.

◆ QM_TRAN_XP

#define QM_TRAN_XP ( xp_,
tatbl_ )
Value:
(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 244 of file qpcpp.hpp.

◆ QM_SUPER_SUB

#define QM_SUPER_SUB ( state_)
Value:
(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_)).

Macro to call in a QM submachine-handler when it designates the host state to handle an event. Applicable only to subclasses of QP::QMsm.

Backward Traceability

Definition at line 250 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 73 of file qpcpp.hpp.