QP/C  8.0.0
Real-Time Embedded Framework
Loading...
Searching...
No Matches
qpc.h
Go to the documentation of this file.
1//$file${include::qpc.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2//
3// Model: qpc.qm
4// File: ${include::qpc.h}
5//
6// This code has been generated by QM 7.0.0 <www.state-machine.com/qm>.
7// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
8//
9// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
10//
11// Q u a n t u m L e a P s
12// ------------------------
13// Modern Embedded Software
14//
15// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
16//
17// The QP/C software is dual-licensed under the terms of the open-source GNU
18// General Public License (GPL) or under the terms of one of the closed-
19// source Quantum Leaps commercial licenses.
20//
21// Redistributions in source code must retain this top-level comment block.
22// Plagiarizing this software to sidestep the license obligations is illegal.
23//
24// NOTE:
25// The GPL does NOT permit the incorporation of this code into proprietary
26// programs. Please contact Quantum Leaps for commercial licensing options,
27// which expressly supersede the GPL and are designed explicitly for
28// closed-source distribution.
29//
30// Quantum Leaps contact information:
31// <www.state-machine.com/licensing>
32// <info@state-machine.com>
33//
34//$endhead${include::qpc.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35#ifndef QPC_H_
36#define QPC_H_
37
38#include "qp_port.h" // QP port from the port directory
39#include "qsafe.h" // QP Functional Safety (FuSa) Subsystem
40#ifdef Q_SPY // software tracing enabled?
41 #include "qs_port.h" // QS/C port from the port directory
42#else
43 #include "qs_dummy.h" // QS/C dummy interface (inactive)
44#endif
45
46#ifndef QP_API_VERSION
47 #define QP_API_VERSION 0
48#endif // #ifndef QP_API_VERSION
49
50// QP API compatibility layer...
51//============================================================================
52#if (QP_API_VERSION < 800)
53
54#define QM_SUPER_SUB(host_) error "submachines no longer supported"
55#define QM_TRAN_EP(tatbl_) error "submachines no longer supported"
56#define QM_TRAN_XP(xp_, tatbl_) error "submachines no longer supported"
57
58#ifdef QEVT_DYN_CTOR
59//! @deprecated #QEVT_DYN_CTOR, please use #QEVT_PAR_INIT
60#define QEVT_PAR_INIT
61#endif
62
63//! @deprecated plain 'char' is no longer forbidden in MISRA-C:2023
64typedef char char_t;
65
66//! @deprecated Macro for starting an Active Object.
67//! Use QActive::QActive_start() instead.
68#define QACTIVE_START(me_, prioSpec_, qSto_, qLen_, stkSto_, stkSize_, par_) \
69 (QActive_start((QActive *)(me_), (prioSpec_), \
70 (qSto_), (qLen_), (stkSto_), (stkSize_), (par_)))
71
72//! @deprecated Macro for starting an eXtended Thread.
73//! Use QXThread::QXThread_start() instead.
74#define QXTHREAD_START(me_, prioSpec_, qSto_, qLen_, stkSto_, stkSize_, par_) \
75 (QXThread_start((QXThread *)(me_), (prioSpec_), \
76 (qSto_), (qLen_), (stkSto_), (stkSize_), (par_)))
77
78//! @deprecated Assertion failure handler.
79//! Use Q_onError() instead.
80#define Q_onAssert(module_, id_) Q_onError(module_, id_)
81
82//! @deprecated #Q_NASSERT preprocessor switch to disable QP assertions
83#ifdef Q_NASSERT
84
85 // #Q_UNSAFE now replaces the functionality of Q_NASSERT
86 #define Q_UNSAFE
87
88 //! @deprecated general purpose assertion with user-specified ID
89 //! number that **always** evaluates the `expr_` expression.
90 #define Q_ALLEGE_ID(id_, expr_) ((void)(expr_))
91
92#elif defined Q_UNSAFE
93
94 //! @deprecated general purpose assertion with user-specified ID
95 //! number that **always** evaluates the `expr_` expression.
96 #define Q_ALLEGE_ID(id_, expr_) ((void)(expr_))
97
98#else // QP FuSa Subsystem enabled
99
100 //! @deprecated general purpose assertion with user-specified ID
101 //! number that **always** evaluates the `expr_` expression.
102 //! @note
103 //! The use of this macro is no longer recommended.
104 #define Q_ALLEGE_ID(id_, expr_) if (!(expr_)) { \
105 QF_CRIT_STAT \
106 QF_CRIT_ENTRY(); \
107 Q_onError(&Q_this_module_[0], (id_)); \
108 QF_CRIT_EXIT(); \
109 } else ((void)0)
110
111#endif
112
113//! @deprecated general purpose assertion without ID number
114//! that **always** evaluates the `expr_` expression.
115//! Instead of ID number, this macro is based on the standard
116//! `__LINE__` macro.
117//!
118//! @note The use of this macro is no longer recommended.
119#define Q_ALLEGE(expr_) Q_ALLEGE_ID(__LINE__, (expr_))
120
121//! Static (compile-time) assertion.
122//! @deprecated
123//! Use Q_ASSERT_STATIC() or better yet `_Static_assert()` instead.
124#define Q_ASSERT_COMPILE(expr_) Q_ASSERT_STATIC(expr_)
125
126//! @static @public @memberof QF
127//! @deprecated
128static inline void QF_psInit(
129 QSubscrList * const subscrSto,
130 enum_t const maxSignal)
131{
132 QActive_psInit(subscrSto, maxSignal);
133}
134
135//! @deprecated instead use: QASM_INIT()
136#define QHSM_INIT(me_, par_, qsId_) QASM_INIT((me_), (par_), (qsId_))
137
138//! @deprecated instead use: QASM_DISPATCH()
139#define QHSM_DISPATCH(me_, e_, qsId_) QASM_DISPATCH((me_), (e_), (qsId_))
140
141//! @deprecated instead use: QASM_IS_IN()
142#define QHsm_isIn(me_, state_) QASM_IS_IN((QAsm *)(me_), (state_))
143
144#endif // QP_API_VERSION < 800
145
146#endif // QPC_H_
static void QF_psInit(QSubscrList *const subscrSto, enum_t const maxSignal)
Definition qpc.h:128
int enum_t
Definition qp.h:99
Sample QP/C port.
char char_t
Definition qpc.h:64
Sample QS/C port.
QP Functional Safety (FuSa) Subsystem.
Subscriber List (for publish-subscribe)
Definition qp.h:755