Skip to content

Commit 9492de4

Browse files
committed
6.9.3
QP-Arduino 6.9.3 Release date: 2021-07-16 QP/C++ 6.9.3 QP-nano 6.8.2 QM 5.1.2
1 parent bcb5244 commit 9492de4

37 files changed

+104
-141
lines changed

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
![QP-Arduino](https://www.state-machine.com/img/logo_qp-arduino.png)
2+
13
This README provides a quick overview of QP for Arduino.
24
Please refer to the companion webiste to this project at:
35

@@ -19,7 +21,7 @@ dialog box. Once you identify the `<Sketchbook>` folder, you simply unzip
1921
the whole `qp-<ver>_arduino-1.8.x.zip` archive to this folder.
2022

2123
----
22-
# Provided Libraries and Tools
24+
# Provided Libraries and Examples
2325

2426
The archive `qp-<ver>_arduino-1.8.x.zip` contains two external libraries
2527
for SAM-based Arduinos:
@@ -29,11 +31,16 @@ for SAM-based Arduinos:
2931

3032
NOTE: qpn_avr is now obsolete. It is provided for backgwards compatibility only!
3133

34+
----
35+
# Provided Tools
3236

3337
The archive also contains the QM modeling tool for Windows
3438

3539
- `qm` -- QM modeling tool for Windows 32/64-bit
3640

41+
----
42+
# Directories and Files
43+
3744
After the installation, your Arduino `<Sketchbook>` folder should look
3845
as follows:
3946

@@ -45,6 +52,12 @@ as follows:
4552
| | | +-blinky/ - Blinky example
4653
| | | | +-blinky.ino - Blinky code (generated)
4754
| | | | +-blinky.qm - Blinky model (for QM tool)
55+
| | | +-blinky_bsp/ - Blinky example with Board Support Package
56+
| | | | +-blinky_bsp.ino - Blinky code (generated)
57+
| | | | +-blinky_bsp.qm - Blinky model (for QM tool)
58+
| | | +-dpp_bsp/ - Dining Philosopher example with BSP
59+
| | | | +-dpp_bsp.ino - DPP code (generated)
60+
| | | | +-dpp_bsp.qm - DPP model (for QM tool)
4861
| | +-src/ - QP/C++ library source code
4962
| | | +-qpcpp.h - QP/C++ library header file
5063
| | | +-... - QP/C++ library sources

libraries/qpcpp_sam/examples/blinky/blinky.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: blinky.qm
44
// File: ${.::blinky.ino}
55
//
6-
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or
@@ -144,8 +144,8 @@ protected:
144144
//.$enddecl${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
145145
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
146146
//. Check for the minimum required QP version
147-
#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
148-
#error qpcpp version 6.8.0 or higher required
147+
#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
148+
#error qpcpp version 6.9.0 or higher required
149149
#endif
150150
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
151151
//.$define${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

libraries/qpcpp_sam/examples/blinky/blinky.qm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<model version="5.1.0" links="0">
2+
<model version="5.1.2" links="0">
33
<documentation>This is the simple Blinky example for the Arduino DUE board. The example demonstrates:
44

55
1. One active object class &quot;Blinky&quot; (inside the package &quot;AOs&quot;)

libraries/qpcpp_sam/examples/blinky_bsp/blinky.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: blinky_bsp.qm
44
// File: ${.::blinky.hpp}
55
//
6-
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or

libraries/qpcpp_sam/examples/blinky_bsp/blinky_bsp.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: blinky_bsp.qm
44
// File: ${.::blinky_bsp.ino}
55
//
6-
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or
@@ -62,8 +62,8 @@ protected:
6262
//.$enddecl${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6363
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
6464
//. Check for the minimum required QP version
65-
#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
66-
#error qpcpp version 6.8.0 or higher required
65+
#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
66+
#error qpcpp version 6.9.0 or higher required
6767
#endif
6868
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6969
//.$define${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

libraries/qpcpp_sam/examples/blinky_bsp/blinky_bsp.qm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<model version="5.1.0" links="0">
2+
<model version="5.1.2" links="0">
33
<documentation>This is a little more advanced Blinky example for the Arduino DUE board. The example demonstrates:
44

55
1. One active object class &quot;Blinky&quot; (inside the package &quot;AOs&quot;)

libraries/qpcpp_sam/examples/blinky_bsp/bsp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: blinky_bsp.qm
44
// File: ${.::bsp.cpp}
55
//
6-
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or

libraries/qpcpp_sam/examples/blinky_bsp/bsp.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: blinky_bsp.qm
44
// File: ${.::bsp.hpp}
55
//
6-
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or

libraries/qpcpp_sam/examples/dpp_bsp/bsp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp_bsp.qm
44
// File: ${.::bsp.cpp}
55
//
6-
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or

libraries/qpcpp_sam/examples/dpp_bsp/bsp.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp_bsp.qm
44
// File: ${.::bsp.hpp}
55
//
6-
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or

libraries/qpcpp_sam/examples/dpp_bsp/dpp.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp_bsp.qm
44
// File: ${.::dpp.hpp}
55
//
6-
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or

libraries/qpcpp_sam/examples/dpp_bsp/dpp_bsp.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp_bsp.qm
44
// File: ${.::dpp_bsp.ino}
55
//
6-
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or

libraries/qpcpp_sam/examples/dpp_bsp/dpp_bsp.qm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<model version="5.1.0" links="1">
2+
<model version="5.1.2" links="1">
33
<documentation>This is the Dining Philosopher Problem (DPP) example for the Arduino-DUE board. The example demonstrates:
44

55
1. Multiple active objects (5 Philosophers and 1 Table AO)

libraries/qpcpp_sam/examples/dpp_bsp/philo.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp_bsp.qm
44
// File: ${.::philo.cpp}
55
//
6-
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or
@@ -46,8 +46,8 @@ class Philo : public QP::QActive {
4646
// generate definition of the opaque pointer to the AO -----------------------
4747
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
4848
//. Check for the minimum required QP version
49-
#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
50-
#error qpcpp version 6.8.0 or higher required
49+
#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
50+
#error qpcpp version 6.9.0 or higher required
5151
#endif
5252
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5353
//.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

libraries/qpcpp_sam/examples/dpp_bsp/table.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp_bsp.qm
44
// File: ${.::table.cpp}
55
//
6-
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or
@@ -47,8 +47,8 @@ class Table : public QP::QActive {
4747
// generate definition of the opaque pointer to the AO -----------------------
4848
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
4949
//. Check for the minimum required QP version
50-
#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
51-
#error qpcpp version 6.8.0 or higher required
50+
#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
51+
#error qpcpp version 6.9.0 or higher required
5252
#endif
5353
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5454
//.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

libraries/qpcpp_sam/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=QP-C++
2-
version=6.9.2
2+
version=6.9.3
33
author=Quantum Leaps
44
maintainer=Quantum Leaps <info@state-machine.com>
55
sentence=QP/C++ Real-Time Embedded Framework for Arduino.

libraries/qpcpp_sam/src/qep.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
/// @ingroup qep
44
/// @cond
55
///***************************************************************************
6-
/// Last updated for version 6.9.2
7-
/// Last updated on 2020-12-17
6+
/// Last updated for version 6.9.3
7+
/// Last updated on 2021-02-26
88
///
99
/// Q u a n t u m L e a P s
1010
/// ------------------------
1111
/// Modern Embedded Software
1212
///
13-
/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
13+
/// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved.
1414
///
1515
/// This program is open source software: you can redistribute it and/or
1616
/// modify it under the terms of the GNU General Public License as published
@@ -43,15 +43,15 @@
4343
//! The current QP version as a decimal constant XXYZ, where XX is a 2-digit
4444
// major version number, Y is a 1-digit minor version number, and Z is
4545
// a 1-digit release number.
46-
#define QP_VERSION 692U
46+
#define QP_VERSION 693U
4747

4848
//! The current QP version number string of the form XX.Y.Z, where XX is
4949
// a 2-digit major version number, Y is a 1-digit minor version number,
5050
// and Z is a 1-digit release number.
51-
#define QP_VERSION_STR "6.9.2"
51+
#define QP_VERSION_STR "6.9.3"
5252

53-
//! Encrypted current QP release (6.9.2) and date (2021-01-18)
54-
#define QP_RELEASE 0x82C286EBU
53+
//! Encrypted current QP release (6.9.3) and date (2021-04-12)
54+
#define QP_RELEASE 0x8295AA8AU
5555

5656

5757
//****************************************************************************

libraries/qpcpp_sam/src/qf.hpp

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
/// @ingroup qf
44
/// @cond
55
///***************************************************************************
6-
/// Last updated for version 6.9.2
7-
/// Last updated on 2020-12-17
6+
/// Last updated for version 6.9.3
7+
/// Last updated on 2021-02-26
88
///
99
/// Q u a n t u m L e a P s
1010
/// ------------------------
1111
/// Modern Embedded Software
1212
///
13-
/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
13+
/// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved.
1414
///
1515
/// This program is open source software: you can redistribute it and/or
1616
/// modify it under the terms of the GNU General Public License as published
@@ -536,7 +536,8 @@ class QF {
536536
#else
537537
//! Publish event to the framework.
538538
static void publish_(QEvt const * const e,
539-
void const * const sender) noexcept;
539+
void const * const sender,
540+
std::uint_fast8_t const qs_id) noexcept;
540541

541542
//! Processes all armed time events at every clock tick.
542543
static void tickX_(std::uint_fast8_t const tickRate,
@@ -835,7 +836,8 @@ class QTicker : public QActive {
835836
/// unambiguously identify the publisher of the event.
836837
///
837838
/// @sa QP::QF::publish_()
838-
#define PUBLISH(e_, sender_) publish_((e_), (sender_))
839+
#define PUBLISH(e_, sender_) \
840+
publish_((e_), (sender_), (sender_)->getPrio())
839841

840842
//! Invoke the direct event posting facility QP::QActive::post_().
841843
/// @description

libraries/qpcpp_sam/src/qf_dyn.cpp

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
/// @brief QF/C++ dynamic event management
33
/// @cond
44
///***************************************************************************
5-
/// Last updated for version 6.9.1
6-
/// Last updated on 2020-09-17
5+
/// Last updated for version 6.9.3
6+
/// Last updated on 2021-04-09
77
///
88
/// Q u a n t u m L e a P s
99
/// ------------------------
1010
/// Modern Embedded Software
1111
///
12-
/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
12+
/// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved.
1313
///
1414
/// This program is open source software: you can redistribute it and/or
1515
/// modify it under the terms of the GNU General Public License as published
@@ -90,7 +90,7 @@ void QF::poolInit(void * const poolSto,
9090
< static_cast<std::uint_fast8_t>(Q_DIM(QF_pool_)));
9191

9292
// last initialized event size
93-
std::uint_fast16_t const lastEvtSize = ((QF_maxPool_ ==0U)
93+
std::uint_fast16_t const lastEvtSize = ((QF_maxPool_ == 0U)
9494
? 0U
9595
: QF_EPOOL_EVENT_SIZE_(QF_pool_[QF_maxPool_ - 1U]));
9696

@@ -178,7 +178,9 @@ QEvt *QF::newX_(std::uint_fast16_t const evtSize,
178178
QS_END_PRE_()
179179
}
180180
else {
181-
// must tolerate bad alloc.
181+
// This assertion means that the event allocation failed,
182+
// and this failure cannot be tolerated. The most frequent
183+
// reason is an event leak in the application.
182184
Q_ASSERT_ID(320, margin != QF_NO_MARGIN);
183185

184186
QS_BEGIN_PRE_(QS_QF_NEW_ATTEMPT,

libraries/qpcpp_sam/src/qf_ps.cpp

+8-5
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
/// @ingroup qf
55
/// @cond
66
///***************************************************************************
7-
/// Last updated for version 6.9.1
8-
/// Last updated on 2020-09-17
7+
/// Last updated for version 6.9.3
8+
/// Last updated on 2021-02-26
99
///
1010
/// Q u a n t u m L e a P s
1111
/// ------------------------
1212
/// Modern Embedded Software
1313
///
14-
/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
14+
/// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved.
1515
///
1616
/// This program is open source software: you can redistribute it and/or
1717
/// modify it under the terms of the GNU General Public License as published
@@ -118,15 +118,18 @@ void QF::psInit(QSubscrList * const subscrSto,
118118
#ifndef Q_SPY
119119
void QF::publish_(QEvt const * const e) noexcept {
120120
#else
121-
void QF::publish_(QEvt const * const e, void const * const sender) noexcept {
121+
void QF::publish_(QEvt const * const e,
122+
void const * const sender,
123+
std::uint_fast8_t const qs_id) noexcept
124+
{
122125
#endif
123126
/// @pre the published signal must be within the configured range
124127
Q_REQUIRE_ID(100, static_cast<enum_t>(e->sig) < QF_maxPubSignal_);
125128

126129
QF_CRIT_STAT_
127130
QF_CRIT_E_();
128131

129-
QS_BEGIN_NOCRIT_PRE_(QS_QF_PUBLISH, 0U)
132+
QS_BEGIN_NOCRIT_PRE_(QS_QF_PUBLISH, qs_id)
130133
QS_TIME_PRE_(); // the timestamp
131134
QS_OBJ_PRE_(sender); // the sender object
132135
QS_SIG_PRE_(e->sig); // the signal of the event

libraries/qpcpp_sam/src/qs.hpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/// @ingroup qs
44
/// @cond
55
///***************************************************************************
6-
/// Last updated for version 6.9.2
7-
/// Last updated on 2021-01-14
6+
/// Last updated for version 6.9.3
7+
/// Last updated on 2021-02-26
88
///
99
/// Q u a n t u m L e a P s
1010
/// ------------------------
@@ -240,6 +240,13 @@ enum QSpyIdGroups : std::int16_t {
240240
QS_AP_IDS = 0x80 + QS_AP_ID, //!< Application-specific IDs
241241
};
242242

243+
//! QS ID type for applying local filtering
244+
struct QSpyId {
245+
std::uint8_t m_prio;
246+
std::uint_fast8_t getPrio(void) const noexcept {
247+
return static_cast<std::uint_fast8_t>(m_prio);
248+
}
249+
};
243250

244251
} // namespace QP ************************************************************
245252

0 commit comments

Comments
 (0)