Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf116c8

Browse files
committed
8.0.2
1 parent2b1661f commitdf116c8

File tree

104 files changed

+2456
-11387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+2456
-11387
lines changed

‎LICENSES/LicenseRef-QL-dual.qlc‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
99

1010
SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
1111

12-
The QP/C++software is dual-licensed under the terms of the open-source
13-
GNUGeneral Public License (GPL) or under the terms of one of the closed-
12+
Thissoftware 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-
1414
source Quantum Leaps commercial licenses.
1515

1616
Redistributions in source code must retain this top-level comment block.
@@ -25,4 +25,4 @@ closed-source distribution.
2525
Quantum Leaps contact information:
2626
<www.state-machine.com/licensing>
2727
<info@state-machine.com>
28-
#48B37CF39D4FD9DE279250B31FD388AFD0BE9B40
28+
#E73B85325051C864FE0E4C672EF7577CB16A80DA

‎README.md‎

Lines changed: 52 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,39 @@ git clone https://github.com/QuantumLeaps/qpcpp --recurse-submodules --depth 1
1616
Alternatively, you can also download one of the stable
1717
[QP/C++ Releases][QP-Rel].
1818

19+
#About QP/C++ Real-Time Embedded Framework
20+
QP/C++ real-time embedded framework (RTEF) is a lightweight implementation of
21+
the[Active Object (a.k.a. Actor) model of computation][AOmod] specifically
22+
tailored for deeply embedded real-time systems, such as microcontrollers (MCUs).
23+
QP/C++ is both a software infrastructure for building applications consisting
24+
of Active Objects (Actors) and a runtime environment for executing the Active
25+
Objects in a deterministic, real-time fashion. Additionally, QP/C++ Framework
26+
supports Hierarchical State Machines with which to specify the behavior of
27+
Active Objects[UML 2.5],[Sutter:10],[ROOM:94]. The QP/C++ Framework can be
28+
viewed as a modern, asynchronous, and truly event driven real-time operating
29+
system (RTOS).
30+
31+
##QP Framework Family
32+
QP/C++ framework is part of the larger QP family consisting of the following
33+
QP editions:
34+
35+
|QP Edition | Language | API | Safety Functions |Certification Artifacts| Licensing
36+
|:----------|:-----------:|:-----------------|:-------------------|:----------------|:---------
37+
| QP/C | C (C11) |same as SafeQP/C |Selected Assertions |Req/Arch/Design |[dual][Lic]
38+
| SafeQP/C | C (C11) |same as QP/C |All Safety Functions|Certification Kit|[commercial][Com]
39+
| QP/C++ | C++ (C++17) |same as SafeQP/C++|Selected Assertions |Req/Arch/Design |[dual][Lic]
40+
| SafeQP/C++| C++ (C++17) |same as QP/C++ |All Safety Functions|Certification Kit|[commercial][Com]
41+
42+
[The documentation](#documentation) of all QP editions includes the
43+
[Requirements][SRS],[Architecture][SAS], and[Design Specifications][SDS],
44+
which are the best source of information about the underlying concepts,
45+
functionality, architecture, and design of the QP Frameworks and the QP
46+
Applications based on the frameworks.
47+
48+
>**NOTE:** The**SafeQP** frameworks additionally contain**Safety Functions**
49+
required to achieve the higher safety integrity levels and come with much more
50+
extensive[Certification Kits][Cert].
51+
1952

2053
#Getting Started with QP/C++
2154
The most recommended way of obtaining QP/C++ is by downloading the
@@ -25,7 +58,7 @@ The main advantage of obtaining QP/C++ bundled together like that is
2558
that you get all components, tools and examples ready to go.
2659

2760
###Getting Started Resources
28-
-["QP/C++ Tutorial"][Tutorial]
61+
-["QP/C++ Tutorial"][Tut]
2962
describes a series of progressively advanced QP/C++ example applications.
3063

3164
-[Video: "Getting Started with QP Real-Time Embedded Frameworks"][Video]
@@ -67,69 +100,11 @@ have been **removed from the open-source GPL distribution**:
67100
the active Support Term. Please contact[Quantum Leaps technical support][Sup]
68101
to get the complete QP/C++ framework distribution.
69102

70-
>NOTE: To request**evaluation** of the complete QP/C++ framework, please contact
103+
>**NOTE:** To request**evaluation** of the complete QP/C++ framework, please contact
71104
Quantum Leaps at:https://www.state-machine.com/contact
72105

73-
#About QP/C++
74-
QP/C++ (Quantum Platform in C++) is a lightweight, open source
75-
[Real-Time Embedded Framework (RTEF)][RTEF] for building modern embedded
76-
software as systems of asynchronous, event-driven[Active Objects][Active]
77-
(actors). The[QP/C++] framework is a member of a[QP] family consisting of
78-
[QP/C++] and[QP/C] frameworks, which are strictly quality controlled,
79-
thoroughly documented, and[commercially licensable][Lic].
80-
81-
##Safer Model of Concurrency
82-
The[QP] framework family implements the
83-
[Active Object model of computation][AO_model], which is**inherently safer**
84-
than the traditional "shared state concurrency" based on explicit mutual
85-
exclusion and managing RTOS threads by blocking. The Active Object model
86-
supports and automatically enforces the following best practices
87-
of concurrent programming:
88-
89-
- Keep data isolated and bound to Active Objects' threads. Threads should
90-
hide (**encapsulate**) their private data and other resources, and not
91-
share them with the rest of the system.
92-
93-
- Communicate among Active Object threads**asynchronously** via[Event
94-
objects][Event]. Using asynchronous events keeps the threads running truly
95-
independently,**without blocking** on each other.
96-
97-
- Active Object threads should spend their lifetime responding to incoming
98-
events, so their mainline should consist of an**event-loop** that handles
99-
events one at a time (to completion), thus avoiding any concurrency hazards
100-
within an Active Object thread itself.
101-
102-
This architecture also provides higher level of abstraction and the*correct*
103-
abstractions to effectively apply[Hierarchical State Machines][HSM],
104-
**modeling** and**code generation** to deeply embedded real-time systems.
105-
106-
##Hierarchical State Machines
107-
The behavior of Active Objects is specified in QP/C++ by means of
108-
[Hierarchical State Machines][HSM] (UML statecharts). The framework
109-
supports manual coding of UML state machines in C as well as automatic
110-
**code generation** by means of the free[QM modeling tool][QM].
111-
112-
##Built-in Real-Time Kernels
113-
The QP/C++ framework can run on standalone on single-chip microcontrollers,
114-
without any traditional RTOS. The framework contains a selection of
115-
**built-in real-time kernels**, such as the[non-preemptive QV kernel][QV],
116-
the[preemptive non-blocking QK kernel][QK], and the preemptive,
117-
[dual-mode QXK kernel][QXK] that provides all the features you might expect
118-
from a traditional RTOS. Native QP ports and ready-to-use examples are provided
119-
for major CPUs, such as ARM Cortex-M (M0/M0+/M3/M4/M7/M23/M33/...).
120-
121-
##Traditional RTOS/OS
122-
QP/C++ can also work with a traditional RTOS, such as ThreadX, embOS, FreeRTOS,
123-
uC/OS-II and Zephyr, as well as with (embedded) Linux (POSIX) and Windows.
124-
125-
##Popularity and Maturity
126-
With 20 years of continuous development,[400+ commercial licensees][Cust],
127-
and many times more open source users worldwide, the QP frameworks are the
128-
most popular such offering on the market. They power countless electronic
129-
products ranging from implantable medical devices to complex weapon systems.
130-
131-
132-
#QP/C++ Documentation
106+
107+
#Documentation
133108
The online HTML documentation for the**latest** version of QP/C++ is located
134109
at:https://www.state-machine.com/qpcpp
135110

@@ -159,20 +134,25 @@ If you like this project, please give it a star (in the upper-right corner of yo
159134
[QP]:<https://www.state-machine.com/products/qp>
160135
[QP/C]:<https://github.com/QuantumLeaps/qpc>
161136
[QP/C++]:<https://github.com/QuantumLeaps/qpcpp>
162-
[QS/C++]:<https://www.state-machine.com/qpcpp/srs-qp_qs.html>
163-
[QV]:<https://www.state-machine.com/qpcpp/srs-qp_qv.html>
164-
[QK]:<https://www.state-machine.com/qpcpp/srs-qp_qk.html>
165-
[QXK]:<https://www.state-machine.com/qpcpp/srs-qp_qxk.html>
137+
[Cert]:<https://www.state-machine.com/products/qp#CERT>
166138
[QM]:<https://github.com/QuantumLeaps/qm>
167139
[QTools]:<https://github.com/QuantumLeaps/qtools>
168-
[QP-Rel]:<https://github.com/QuantumLeaps/qpcpp/releases>
169-
[Active]:<https://www.state-machine.com/qpcpp/srs-qp_ao.html>
170-
[AO_model]:<https://www.state-machine.com/qpcpp/srs-qp_ao.html#srs-qp_ao-model>
171-
[Event]:<https://www.state-machine.com/qpcpp/srs-qp_evt.html>
172-
[HSM]:<https://www.state-machine.com/qpcpp/srs-qp_sm.html>
173140
[Lic]:<https://www.state-machine.com/licensing>
141+
[Com]:<https://www.state-machine.com/licensing#Commercial>
174142
[Cust]:<https://www.state-machine.com/customers>
175143
[Sup]:<mailto:support@state-machine.com>
176144
[AN]:<https://www.state-machine.com/doc/AN_Getting_Started_with_QP.pdf>
177-
[Tutorial]:<https://www.state-machine.com/qpcpp/gs_tut.html>
178145
[Video]:<https://youtu.be/O7ER6_VqIH0>
146+
[QS]:<https://www.state-machine.com/qpcpp/srs-qp_qs.html>
147+
[QV]:<https://www.state-machine.com/qpcpp/srs-qp_qv.html>
148+
[QK]:<https://www.state-machine.com/qpcpp/srs-qp_qk.html>
149+
[QXK]:<https://www.state-machine.com/qpcpp/srs-qp_qxk.html>
150+
[SRS]:<https://www.state-machine.com/qpcpp/srs-qp.html>
151+
[SAS]:<https://www.state-machine.com/qpcpp/sas-qp.html>
152+
[SDS]:<https://www.state-machine.com/qpcpp/sds-qp.html>
153+
[Active]:<https://www.state-machine.com/qpcpp/srs-qp_ao.html>
154+
[AOmod]:<https://www.state-machine.com/qpcpp/srs-qp_ao.html#srs-qp_ao-model>
155+
[Event]:<https://www.state-machine.com/qpcpp/srs-qp_evt.html>
156+
[HSM]:<https://www.state-machine.com/qpcpp/srs-qp_sm.html>
157+
[Tut]:<https://www.state-machine.com/qpcpp/gs_tut.html>
158+
[QP-Rel]:<https://github.com/QuantumLeaps/qpcpp/releases>

‎examples‎

Submoduleexamples updated483 files

‎include/qequeue.hpp‎

Lines changed: 12 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
//$file${include::qequeue.hpp} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2-
//
3-
// Model: qpcpp.qm
4-
// File: ${include::qequeue.hpp}
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.
1+
//============================================================================
2+
// QP/C++ Real-Time Embedded Framework (RTEF)
3+
// Version 8.0.2
84
//
95
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
106
//
@@ -14,8 +10,8 @@
1410
//
1511
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
1612
//
17-
//The QP/C++software is dual-licensed under the terms of the open-source
18-
//GNUGeneral Public License (GPL) or under the terms of one of the closed-
13+
//Thissoftware is dual-licensed under the terms of the open-source GNU
14+
// General Public License (GPL) or under the terms of one of the closed-
1915
// source Quantum Leaps commercial licenses.
2016
//
2117
// Redistributions in source code must retain this top-level comment block.
@@ -30,8 +26,7 @@
3026
// Quantum Leaps contact information:
3127
// <www.state-machine.com/licensing>
3228
// <info@state-machine.com>
33-
//
34-
//$endhead${include::qequeue.hpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29+
//============================================================================
3530
#ifndef QEQUEUE_HPP_
3631
#defineQEQUEUE_HPP_
3732

@@ -46,17 +41,16 @@ namespace QP {
4641
#elif (QF_EQUEUE_CTR_SIZE == 2U)
4742
using QEQueueCtr = std::uint16_t;
4843
#else
49-
#error"QF_EQUEUE_CTR_SIZE defined incorrectly, expected 1U or 2U"
44+
#error QF_EQUEUE_CTR_SIZE defined incorrectly, expected 1U or 2U
5045
#endif
5146

5247
classQEvt;// forward declaration
5348

5449
}// namespace QP
5550

56-
//$declare${QF::QEQueue} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
51+
//============================================================================
5752
namespaceQP {
5853

59-
//${QF::QEQueue} .............................................................
6054
classQEQueue {
6155
private:
6256
QEvtconst *volatile m_frontEvt;
@@ -65,22 +59,6 @@ class QEQueue {
6559
QEQueueCtrvolatile m_head;
6660
QEQueueCtrvolatile m_tail;
6761
QEQueueCtrvolatile m_nFree;
68-
69-
#ifndef Q_UNSAFE
70-
std::uintptr_t m_frontEvt_dis;
71-
#endif// ndef Q_UNSAFE
72-
73-
#ifndef Q_UNSAFE
74-
QEQueueCtr m_head_dis;
75-
#endif// ndef Q_UNSAFE
76-
77-
#ifndef Q_UNSAFE
78-
QEQueueCtr m_tail_dis;
79-
#endif// ndef Q_UNSAFE
80-
81-
#ifndef Q_UNSAFE
82-
QEQueueCtr m_nFree_dis;
83-
#endif// ndef Q_UNSAFE
8462
QEQueueCtr m_nMin;
8563

8664
// friends...
@@ -97,16 +75,10 @@ class QEQueue {
9775
m_head(0U),
9876
m_tail(0U),
9977
m_nFree(0U),
100-
#ifndef Q_UNSAFE
101-
m_frontEvt_dis(static_cast<std::uintptr_t>(~0U)),
102-
m_head_dis(static_cast<QEQueueCtr>(~0U)),
103-
m_tail_dis(static_cast<QEQueueCtr>(~0U)),
104-
m_nFree_dis(static_cast<QEQueueCtr>(~0U)),
105-
#endif
10678
m_nMin(0U)
10779
{}
10880
voidinit(
109-
QEvtconst * qSto[],
81+
QEvtconst **constqSto,
11082
std::uint_fast16_tconst qLen)noexcept;
11183
boolpost(
11284
QEvtconst *const e,
@@ -120,11 +92,7 @@ class QEQueue {
12092
return m_nFree;
12193
}
12294
QEQueueCtrgetNMin()constnoexcept {
123-
#ifndef Q_UNSAFE
12495
return m_nMin;
125-
#else
126-
return0U;
127-
#endif
12896
}
12997
boolisEmpty()constnoexcept {
13098
return m_frontEvt ==nullptr;
@@ -133,9 +101,11 @@ class QEQueue {
133101
private:
134102
QEQueue(QEQueueconst & other) = delete;
135103
QEQueue &operator=(QEQueueconst & other) =delete;
104+
voidpostFIFO_(
105+
QEvtconst *const e,
106+
voidconst *const sender);
136107
};// class QEQueue
137108

138109
}// namespace QP
139-
//$enddecl${QF::QEQueue} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140110

141111
#endif// QEQUEUE_HPP_

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp