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

Commitdf7ca08

Browse files
committed
8.1.0
1 parentd9a3850 commitdf7ca08

File tree

85 files changed

+3125
-1509
lines changed

Some content is hidden

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

85 files changed

+3125
-1509
lines changed

‎.gitignore‎

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
*.qms
2+
*.cov
3+
*.gcov
4+
*.log
25
*.obj
36
*.o
47
*.d
@@ -29,17 +32,37 @@
2932
*.chw
3033
*.sfr
3134
*.ewt
35+
*.csv
3236
*.user
3337
*.avrsuo
3438
*.Debug
3539
*.Release
3640
*.bak
3741
version-*
3842
JLink*.*
43+
*.host
44+
*.trg
45+
46+
dbg/
47+
rel/
48+
spy/
49+
build*/
50+
settings/
51+
.settings/
52+
targetConfigs/
53+
Debug/
54+
Release/
55+
Spy/
56+
QSpy/
57+
58+
lib/
59+
obj/
60+
output/
3961

4062
include/qs.hpp
4163
include/qs_pkg.hpp
4264
include/qxk.hpp
65+
4366
src/qs/qs.cpp
4467
src/qs/qs_64bit.cpp
4568
src/qs/qs_fp.cpp
@@ -49,29 +72,14 @@ src/qxk/qxk.cpp
4972
src/qxk/qxk_mutex.cpp
5073
src/qxk/qxk_sema.cpp
5174
src/qxk/qxk_xthr.cpp
52-
zephyr/qutest_port.cpp
5375

5476
ports/arm-cm/qxk/
5577
ports/arm-cm/qutest/
5678
ports/posix-qutest/
5779
ports/win32-qutest/
80+
zephyr/qutest_port.cpp
5881

59-
priv/
60-
html/
61-
latex/
62-
dbg/
63-
rel/
64-
spy/
65-
build*/
66-
settings/
67-
.settings/
68-
targetConfigs/
69-
70-
Debug/
71-
Release/
72-
Spy/
73-
QSpy/
82+
static-analysis/pclp/
7483

75-
lib/
76-
obj/
77-
output/
84+
tests/TIN*/
85+
tests/TUN*/

‎3rd_party‎

Submodule3rd_party updated98 files

‎README.md‎

Lines changed: 61 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ it is recommended that you clone this repo like that:
1313
git clone https://github.com/QuantumLeaps/qpcpp --recurse-submodules --depth 1
1414
```
1515

16-
Alternatively, you can also download one of the stable
17-
[QP/C++ Releases][QP-Rel].
16+
However, the easiest and most recommended way of
17+
[getting started with QP/C++](#getting-started-with-qpcpp) is to download
18+
the QP-bundle, as[described below](#getting-started-with-qpcpp).
19+
1820

1921
#About QP/C++ Real-Time Event Framework
2022
QP/C++ real-time event framework (RTEF) is a lightweight implementation of
@@ -25,7 +27,7 @@ of Active Objects (Actors) and a runtime environment for executing the Active
2527
Objects in a deterministic, real-time fashion. Additionally, QP/C++ Framework
2628
supports Hierarchical State Machines with which to specify the behavior of
2729
Active Objects[UML 2.5],[Sutter:10],[ROOM:94]. The QP/C++ Framework can be
28-
viewed as a modern, asynchronous, and truly eventdriven real-time operating
30+
viewed as a modern, asynchronous, and truly event-driven real-time operating
2931
system (RTOS).
3032

3133
##QP Framework Family
@@ -36,14 +38,14 @@ QP editions:
3638
|:----------|:-----------:|:-----------------|:-------------------|:----------------|:---------
3739
| QP/C | C (C11) |same as SafeQP/C |Selected Assertions |Req/Arch/Design |[dual][Lic]
3840
| QP/C++ | C++ (C++17) |same as SafeQP/C++|Selected Assertions |Req/Arch/Design |[dual][Lic]
39-
| SafeQP/C | C (C11) |same as QP/C |All Safety Functions|Extensive<br>Certification Kit|[commercial][Com]
40-
| SafeQP/C++| C++ (C++17) |same as QP/C++ |All Safety Functions|Extensive<br>Certification Kit|[commercial][Com]
41+
| SafeQP/C | C (C11) |same as QP/C |All Safety Functions|Complete<br>Certification Kit|[commercial][Com]
42+
| SafeQP/C++| C++ (C++17) |same as QP/C++ |All Safety Functions|Complete<br>Certification Kit|[commercial][Com]
4143

4244
The**SafeQP/C** and**SafeQP/C++** frameworks were originally derived from QP/C and QP/C++,
4345
respectively, but were extensively reengineered for the safety market using compliant
4446
Software Safety Lifecycle (SSL). In this process, the QP framework functional model has been
4547
subjected to a full Hazard and Risk Analysis, which identified all areas of weakness within
46-
the functional model and API. These findings led to creation of Safety Requirements and risk
48+
the functional model and API. These findings led tothecreation of Safety Requirements and risk
4749
mitigation by Safety Functions, which were subsequently implemented, verified, and validated.
4850
The SafeQP frameworks are accompanied by the "SafeQP Certification Kits", which provide
4951
developers with ready-to-use artifacts, enabling them to save time, mitigate risk, and reduce
@@ -54,27 +56,64 @@ for more information about the SafeQP frameworks and the "Certification Kits".
5456
>**NOTE:** The SafeQP/C++ edition remain fully API- and functionally compatible with the
5557
corresponding standard QP/C++ framework. This ensures existing QP/C Applications can transition
5658
seamlessly to SafeQP/C++ without requiring any modifications. SafeQP/C edition retain QP/C++
57-
Frameworks' hallmark features, includinga small memory footprint, excellent efficiency,
58-
and hardreal-timefunctionality.
59+
Frameworks' hallmark features:a small memory footprint, excellent efficiency, and hard
60+
real-timeperformance.
5961

6062

6163
#Getting Started with QP/C++
62-
The most recommended way of obtaining QP/C++ is by downloading the
63-
[QP-bundle](https://www.state-machine.com/#Downloads), which includes QP/C++
64-
as well as the[QM modeling tool][QM] and the[QTools collection][QTools].
65-
The main advantage of obtaining QP/C++ bundled together like that is
66-
that you get all components, tools and examples ready to go.
67-
68-
###Getting Started Resources
69-
-["QP/C++ Tutorial"][Tut]
70-
describes a series of progressively advanced QP/C++ example applications.
71-
64+
The most recommended way to get started with QP/C++ is by
65+
[__downloading the QP-bundle__](https://www.state-machine.com/#Downloads),
66+
which includes QP/C as well as the[QM modeling tool][QM] and the
67+
[QTools collection][QTools]. The main advantage of obtaining QP/C bundled
68+
together is that you get all components, tools, and_examples_ all ready to go.
69+
70+
>**NOTE:**
71+
Perhaps the most important fact to remember is that in embedded systems,
72+
nothing works until everything works. This means that you should always start
73+
with a_working system_ and gradually evolve it, changing one thing at a time
74+
and making sure that it keeps working every step of the way.
75+
76+
The provided[__QP/C++ example projects__](examples), such as the super-simple
77+
[Blinky](examples/arm-cm/blinky_nucleo-u545re/), or a bit more advanced
78+
[Dining Philosophers Problem (DPP)](examples/arm-cm/dpp_nucleo-u545re/),
79+
allow you to get started with a__working project__ rather than starting from
80+
scratch. You should also always try one of the unmodified examples on one
81+
of the very inexpensive evaluation boards (such as
82+
[STM32 NUCLEO-U545RE](examples/arm-cm/dpp_nucleo-u545re/stm32-nucleo-u545re.webp))
83+
that it was designed for,_before_ attempting to immediately adapt the projects
84+
to your specific hardware. Only once an example project is built and runs on
85+
the evaluation board, can you use it as a starting point for your specific hardware
86+
and software development.
87+
88+
89+
##Getting Started Resources
7290
-[Video: "Getting Started with QP Real-Time Event Frameworks"][Video]
7391
provides instructions on how to download, install, and get started with QP.
7492

7593
-[AppNote: "Getting Started with QP Real-Time Event Frameworks"][AN]
7694
contains also a tutorial, in which you build a simple "Blinky" application.
7795

96+
-["QP/C++ Tutorial"][Tut]
97+
describes a series of progressively advanced QP/C++ example applications.
98+
99+
##QP/C++ Extras
100+
The open source GPL distribution of QP/C++ can be augmented by the
101+
["QP/C++ Extras"][QPX/C++], which provide more advanced QP/C++ features, such as:
102+
-[QS software tracing][QS] component (QP Spy)
103+
-[QXK real-time kernel][QXK] component
104+
- Static-analysis configuration and automation scripts for PC-Lint-Plus
105+
- Test suite (based on the[QUTest trace-based test harness][QUTest])
106+
that demonstrates 100% lines of code and 100% MC/DC code coverage for QP/C++.
107+
108+
>**NOTE:** The["QP/C++ Extras"][QPX/C++] are[licensed commercially][Lic] only
109+
and available to the commercial licensees with the active Support Term. Please contact
110+
[Quantum Leaps technical support][Sup] to get the matching["QP/C++ Extras"][QPX/C++]
111+
for the public QP/C++ version.
112+
113+
>**NOTE:** The["QP/C++ Extras"][QPX/C++] are also__available for evaluation__
114+
([upon request][ReqForm]).
115+
116+
78117
#Licensing
79118
The QP/C++ real-time event framework is licensed under the
80119
[dual licensing model](https://www.state-machine.com/licensing), with
@@ -101,21 +140,6 @@ any open source license and you do not violate your policy.
101140
are licensed commercially only.
102141

103142

104-
##Files Removed from the QP/C++ Open Source GPL Distribution
105-
Due to the widespread non-compliance with the GPL, as well as infringement on the
106-
[dual-licensing model of QP frameworks][Lic], the following QP/C++ components
107-
have been**removed from the open-source GPL distribution**:
108-
- QS target-resident software tracing component
109-
- QXK dual-mode kernel
110-
111-
>NOTE: These components are available to the[commercial licensees][Cust] with
112-
the active Support Term. Please contact[Quantum Leaps technical support][Sup]
113-
to get the complete QP/C++ framework distribution.
114-
115-
>**NOTE:** To request**evaluation** of the complete QP/C++ framework, please contact
116-
Quantum Leaps at:https://www.state-machine.com/contact
117-
118-
119143
#Documentation
120144
The online HTML documentation for the**latest** version of QP/C++ is located
121145
at:https://www.state-machine.com/qpcpp
@@ -146,11 +170,15 @@ If you like this project, please give it a star (in the upper-right corner of yo
146170
[QP]:<https://www.state-machine.com/products/qp>
147171
[QP/C]:<https://github.com/QuantumLeaps/qpc>
148172
[QP/C++]:<https://github.com/QuantumLeaps/qpcpp>
173+
[QPX/C]:https://www.state-machine.com/qpc/gs_extras.html>
174+
[QPX/C++]:https://www.state-machine.com/qpcpp/gs_extras.html>
149175
[Cert]:<https://www.state-machine.com/products/qp#CERT>
150176
[QM]:<https://github.com/QuantumLeaps/qm>
151177
[QTools]:<https://github.com/QuantumLeaps/qtools>
178+
[QUTest]:<https://www.state-machine.com/qtools/qutest.html>
152179
[Lic]:<https://www.state-machine.com/licensing>
153180
[Com]:<https://www.state-machine.com/licensing#Commercial>
181+
[ReqForm]:<https://www.state-machine.com/licensing#RequestForm>
154182
[Cust]:<https://www.state-machine.com/customers>
155183
[Sup]:<mailto:support@state-machine.com>
156184
[AN]:<https://www.state-machine.com/doc/AN_Getting_Started_with_QP.pdf>

‎examples‎

Submoduleexamples updated214 files

‎include/README.md‎

Lines changed: 0 additions & 45 deletions
This file was deleted.

‎include/qequeue.hpp‎

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,30 +64,24 @@ class QEQueue {
6464
QEvtconst *const e,
6565
std::uint_fast8_tconst qsId)noexcept;
6666
QEvtconst *get(std::uint_fast8_tconst qsId)noexcept;
67-
QEQueueCtrgetNFree()constnoexcept {
68-
return m_nFree;
69-
}
70-
QEQueueCtrgetNMin()constnoexcept {
71-
return m_nMin;
72-
}
73-
boolisEmpty()constnoexcept {
74-
return m_frontEvt ==nullptr;
75-
}
76-
QEvtconst *peekFront()constnoexcept {
77-
return m_frontEvt;
78-
}
67+
std::uint16_tgetFree()constnoexcept;
68+
std::uint16_tgetUse()constnoexcept;
69+
std::uint16_tgetMin()constnoexcept;
70+
boolisEmpty()constnoexcept;
71+
QEvtconst *peekFront()const &;
72+
QEvtconst *peekFront() &&
73+
// ref-qualified reference (MISRA-C++:2023 Rule 6.8.4)
74+
= delete;
7975

8076
private:
81-
QEvtconst *volatilem_frontEvt;
77+
QEvtconst * m_frontEvt;
8278
QEvtconst * * m_ring;
8379
QEQueueCtr m_end;
84-
QEQueueCtrvolatilem_head;
85-
QEQueueCtrvolatilem_tail;
86-
QEQueueCtrvolatilem_nFree;
80+
QEQueueCtr m_head;
81+
QEQueueCtr m_tail;
82+
QEQueueCtr m_nFree;
8783
QEQueueCtr m_nMin;
8884

89-
QEQueue(QEQueueconst & other) =delete;
90-
QEQueue &operator=(QEQueueconst & other) =delete;
9185
voidpostFIFO_(
9286
QEvtconst *const e,
9387
voidconst *const sender);

‎include/qk.hpp‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
namespaceQP {
3333

34-
using QSchedStatus = std::uint_fast8_t;
34+
using QSchedStatus = std::uint8_t;
3535

3636
}// namespace QP
3737

@@ -58,7 +58,7 @@ extern QK_Attr QK_priv_;
5858
namespaceQP {
5959
namespaceQK {
6060

61-
QSchedStatusschedLock(std::uint_fast8_tconst ceiling)noexcept;
61+
QSchedStatusschedLock(std::uint8_tconst ceiling)noexcept;
6262
voidschedUnlock(QSchedStatusconst prevCeil)noexcept;
6363
voidonIdle();
6464

@@ -97,14 +97,17 @@ void onIdle();
9797
} \
9898
}while (false)
9999

100-
//QF event pool customization for QK...
101-
#defineQF_EPOOL_TYPE_ QMPool
100+
//QMPool operations
101+
#defineQF_EPOOL_TYPE_QMPool
102102
#defineQF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \
103103
(p_).init((poolSto_), (poolSize_), (evtSize_))
104-
#defineQF_EPOOL_EVENT_SIZE_(p_) ((p_).getBlockSize())
104+
#defineQF_EPOOL_EVENT_SIZE_(p_)((p_).getBlockSize())
105105
#defineQF_EPOOL_GET_(p_, e_, m_, qsId_) \
106106
((e_) =static_cast<QEvt *>((p_).get((m_), (qsId_))))
107107
#defineQF_EPOOL_PUT_(p_, e_, qsId_) ((p_).put((e_), (qsId_)))
108+
#defineQF_EPOOL_USE_(ePool_) ((ePool_)->getUse())
109+
#defineQF_EPOOL_FREE_(ePool_) ((ePool_)->getFree())
110+
#defineQF_EPOOL_MIN_(ePool_) ((ePool_)->getMin())
108111

109112
#endif// QP_IMPL
110113

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp