QP/C 8.1.1
Real-Time Event Framework
Loading...
Searching...
No Matches
qp_pkg.h
Go to the documentation of this file.
1//============================================================================
2// QP/C Real-Time Event Framework (RTEF)
3//
4// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
5//
6// Q u a n t u m L e a P s
7// ------------------------
8// Modern Embedded Software
9//
10// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
11//
12// This software is dual-licensed under the terms of the open-source GNU
13// General Public License (GPL) or under the terms of one of the closed-
14// source Quantum Leaps commercial licenses.
15//
16// Redistributions in source code must retain this top-level comment block.
17// Plagiarizing this software to sidestep the license obligations is illegal.
18//
19// NOTE:
20// The GPL does NOT permit the incorporation of this code into proprietary
21// programs. Please contact Quantum Leaps for commercial licensing options,
22// which expressly supersede the GPL and are designed explicitly for
23// closed-source distribution.
24//
25// Quantum Leaps contact information:
26// <www.state-machine.com/licensing>
27// <info@state-machine.com>
28//============================================================================
29#ifndef QP_PKG_H_
30#define QP_PKG_H_
31
32#ifdef QP_IMPL
33
34// helper macros...
35#define QACTIVE_CAST_(ptr_) ((QActive *)(ptr_))
36
37//! @static @private @memberof QActive
39
40//! @static @private @memberof QActive
42
43//! @static @private @memberof QActive
45
46#if (QF_MAX_TICK_RATE > 0U)
47//! @static @private @memberof QTimeEvt
49
50
51// Bitmasks are for the QTimeEvt::flags attribute
52#define QTE_FLAG_IS_LINKED (1U << 7U)
53#define QTE_FLAG_WAS_DISARMED (1U << 6U)
54
55#endif // (QF_MAX_TICK_RATE > 0U)
56
57//----------------------------------------------------------------------------
58typedef struct {
59#if (QF_MAX_EPOOL > 0U)
60 QF_EPOOL_TYPE_ ePool_[QF_MAX_EPOOL]; //!< @private @memberof QF_Attr
61 uint8_t maxPool_; //!< @private @memberof QF_Attr
62#else
63 uint8_t dummy; //!< @private @memberof QF_Attr
64#endif // (QF_MAX_EPOOL == 0U)
65} QF_Attr;
66
67extern QF_Attr QF_priv_; //!< @static @private @memberof QF
68
69//----------------------------------------------------------------------------
70// Duplicate Inverse Storage (DIS) facilities
71
72#ifndef Q_UNSAFE
73
74#define QP_DIS_UPDATE(T_, org_) ((T_)(~(org_)))
75#define QP_DIS_VERIFY(T_, org_, dis_) ((org_) == (T_)(~(dis_)))
76
77#endif
78
79#endif // QP_IMPL
80
81#endif // QP_PKG_H_
QF_Attr QF_priv_
Definition qp_pkg.h:67
uint16_t QSignal
The signal of event QEvt.
Definition qp.h:97
#define QF_MAX_TICK_RATE
Maximum # clock tick rates in the system (0..15).
Definition qp_config.h:119
#define QF_MAX_ACTIVE
Maximum # Active Objects in the system (1..64).
Definition qp_config.h:99
#define QF_MAX_EPOOL
Maximum # event pools in the system (0..15).
Definition qp_config.h:109
#define QF_EPOOL_TYPE_
Definition qp_port.h:180
Active object class (based on the QHsm implementation strategy).
Definition qp.h:428
QSubscrList * QActive_subscrList_
Static (one per-class) pointer to all subscriber AOs for a given event signal.
Definition qp_pkg.h:41
QSignal QActive_maxPubSignal_
Static (one per-class) maximum published signal (the size of the subscrList_ array).
Definition qp_pkg.h:44
QActive * QActive_registry_[QF_MAX_ACTIVE+1U]
Static (one per-class) array of registered active objects.
Definition qp_pkg.h:38
Private attributes of the QF framework.
Definition qp_pkg.h:58
uint8_t maxPool_
Definition qp_pkg.h:61
QF_EPOOL_TYPE_ ePool_[QF_MAX_EPOOL]
Array of event pools sized for the maximum allowed number of pools.
Definition qp_pkg.h:60
Subscriber List (for publish-subscribe).
Definition qp.h:419
Time Event class.
Definition qp.h:554
QTimeEvt QTimeEvt_timeEvtHead_[QF_MAX_TICK_RATE]
Static array of heads of linked lists of time events (one for every clock tick rate).
Definition qp_pkg.h:48