QP/C  7.0.0
Real-Time Embedded Framework
qpc.h File Reference

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

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

Go to the source code of this file.

Macros

#define QP_API_VERSION   0
 
#define QS_FILTER_ON(rec_)   QS_GLB_FILTER((rec_))
 
#define QS_FILTER_OFF(rec_)   QS_GLB_FILTER(-(rec_))
 
#define QS_FILTER_SM_OBJ(obj_)   ((void)0)
 
#define QS_FILTER_AO_OBJ(obj_)   ((void)0)
 
#define QS_FILTER_MP_OBJ(obj_)   ((void)0)
 
#define QS_FILTER_EQ_OBJ(obj_)   ((void)0)
 
#define QS_FILTER_TE_OBJ(obj_)   ((void)0)
 
#define QS_FILTER_AP_OBJ(obj_)   (QS_priv_.locFilter_AP = (obj_))
 
#define QS_BEGIN(rec_, obj_)
 
#define QS_U32_HEX(width_, data_)    (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)0x0FU, (data_)))
 
#define Q_XTHREAD_CAST(handler_)   ((QXThreadHandler)(handler_))
 
#define QMSM_INIT(me_, e_)   QHSM_INIT((me_), (e_))
 
#define QMSM_DISPATCH(me_, e_)   QHSM_DISPATCH((me_), (e_), 0U)
 
#define QFsm_ctor   QHsm_ctor
 
#define Q_IGNORED()   (Q_SUPER(&QHsm_top))
 
#define QF_onIdle   QV_onIdle
 

Typedefs

typedef char char_t
 
typedef QHsm QFsm
 

Detailed Description

Date
Last updated on: 2021-12-23
Version
Last updated for: Version 7.0.0, 2022-04-30

This header file must be included directly or indirectly in all application modules (*.c files) that use QP/C.

Definition in file qpc.h.

Macro Definition Documentation

◆ QP_API_VERSION

#define QP_API_VERSION   0

Specifies the backwards compatibility with the QP/C API version.

For example, QP_API_VERSION==691 will cause generating the compatibility layer with QP/C version 6.9.1 and newer, but not older than 6.9.1. QP_API_VERSION==0 causes generation of the maximum currently supported backwards compatibility. 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 67 of file qpc.h.

◆ QS_FILTER_ON

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

Definition at line 83 of file qpc.h.

◆ QS_FILTER_OFF

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

Definition at line 86 of file qpc.h.

◆ QS_FILTER_SM_OBJ

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

Definition at line 89 of file qpc.h.

◆ QS_FILTER_AO_OBJ

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

Definition at line 92 of file qpc.h.

◆ QS_FILTER_MP_OBJ

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

Definition at line 95 of file qpc.h.

◆ QS_FILTER_EQ_OBJ

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

Definition at line 98 of file qpc.h.

◆ QS_FILTER_TE_OBJ

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

Definition at line 101 of file qpc.h.

◆ QS_FILTER_AP_OBJ

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

Definition at line 106 of file qpc.h.

◆ QS_BEGIN

#define QS_BEGIN (   rec_,
  obj_ 
)
Value:
if (((QS_priv_.glbFilter[(uint_fast8_t)(rec_) >> 3U] \
& (1U << ((uint_fast8_t)(rec_) & 7U))) != 0U) \
&& ((QS_priv_.locFilter_AP == (void *)0) \
|| (QS_priv_.locFilter_AP == (obj_)))) \
{ \
QS_beginRec_((uint_fast8_t)(rec_)); \
QS_TIME_PRE_(); {
QSPrivAttr QS_priv_
Definition: qs.c:41
void const * locFilter_AP
Definition: qs.h:913
#define QS_CRIT_E_()
Definition: qs.h:520
uint8_t glbFilter[16]
Definition: qs.h:911
Deprecated:
begin of a user QS record, instead use QS_BEGIN_ID()

Definition at line 109 of file qpc.h.

◆ QS_U32_HEX

#define QS_U32_HEX (   width_,
  data_ 
)     (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)0x0FU, (data_)))
Deprecated:
Output formatted uint32_t to the QS record

Definition at line 121 of file qpc.h.

◆ Q_XTHREAD_CAST

#define Q_XTHREAD_CAST (   handler_)    ((QXThreadHandler)(handler_))
Deprecated:
casting to QXThreadHandler instead use: the new signature of QXThreadHandler and don't cast

Definition at line 138 of file qpc.h.

◆ QMSM_INIT

#define QMSM_INIT (   me_,
  e_ 
)    QHSM_INIT((me_), (e_))
Deprecated:
call to the QMSM_INIT() operation; instead use: QHSM_INIT()

Definition at line 144 of file qpc.h.

◆ QMSM_DISPATCH

#define QMSM_DISPATCH (   me_,
  e_ 
)    QHSM_DISPATCH((me_), (e_), 0U)
Deprecated:
call to the QMSM_DISPATCH() operation; instead use: QHSM_DISPATCH()

Definition at line 148 of file qpc.h.

◆ QFsm_ctor

#define QFsm_ctor   QHsm_ctor
Deprecated:
QFsm state machine constructor; instead use: QHsm_ctor()

Definition at line 166 of file qpc.h.

◆ Q_IGNORED

#define Q_IGNORED ( )    (Q_SUPER(&QHsm_top))

deprecated macro to call in QFsm state-handler when it ignores (does not handle) an event (instead use Q_SUPER())

Definition at line 171 of file qpc.h.

◆ QF_onIdle

#define QF_onIdle   QV_onIdle
Deprecated:
macro for cooperativew "Vanilla" kernel; instead use: QV_onIdle()

Definition at line 175 of file qpc.h.

Typedef Documentation

◆ char_t

typedef char char_t
Deprecated:
plain 'char' is no longer forbidden in MISRA-C 2012

Definition at line 77 of file qpc.h.

◆ QFsm

typedef QHsm QFsm
Deprecated:
QFsm state machine; instead use: QHsm. Legacy state machines coded in the "QFsm-style" will continue to work, but will use the QHsm implementation internally. There is no longer any efficiency advantage in using the "QFsm-style" state machines.
Note
For efficiency, the recommended migration path is to use the QMsm state machine and the QM modeling tool.

Definition at line 163 of file qpc.h.