QP/C 6.9.2
qpc.h File Reference
QEP | QF | QV | QK | QXK | QS

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

#include "qf_port.h"
#include "qassert.h"
#include "qs_port.h"
Include dependency graph for qpc.h:

Go to the source code of this file.

Macros

#define QP_API_VERSION   0
 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_)   ((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))
 deprecated macro to call in QFsm state-handler when it ignores (does not handle) an event (instead use Q_SUPER()) More...
 
#define QF_onIdle   QV_onIdle
 

Typedefs

typedef QHsm QFsm
 

Detailed Description

QP/C public interface including backwards-compatibility layer.

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.

Description
This header file must be included directly or indirectly in all application modules (*.c files) that use QP/C.
Description
For example, QP_API_VERSION=580 will cause generating the compatibility layer with QP/C version 5.8.0 and newer, but not older than 5.8.0. QP_API_VERSION=0 causes generation of the maximum currently supported 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 78 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 88 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 91 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 94 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 97 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 100 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 103 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 106 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 111 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_(); {
unsigned int uint_fast8_t
fast at-least 8-bit unsigned int
Definition: 16bit/stdint.h:36
QSPrivAttr QS_priv_
Definition: qs.c:49
void const * locFilter_AP
deprecated local QS filter
Definition: qs.h:875
#define QS_CRIT_E_()
This is an internal macro for entering a critical section.
Definition: qs.h:510
uint8_t glbFilter[16]
global on/off QS filter
Definition: qs.h:873
Deprecated:
begin of a user QS record, instead use QS_BEGIN_ID()

Definition at line 114 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 126 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 142 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 148 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 152 of file qpc.h.

◆ QFsm_ctor

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

Definition at line 170 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 175 of file qpc.h.

◆ QF_onIdle

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

Definition at line 179 of file qpc.h.

Typedef Documentation

◆ 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 167 of file qpc.h.