Skip to content

Commit

Permalink
6.9.3
Browse files Browse the repository at this point in the history
QP-Arduino 6.9.3

Release date: 2021-07-16
QP/C++  6.9.3
QP-nano 6.8.2
QM      5.1.2
  • Loading branch information
quantum-leaps committed Jun 16, 2021
1 parent bcb5244 commit 9492de4
Show file tree
Hide file tree
Showing 37 changed files with 104 additions and 141 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![QP-Arduino](https://www.state-machine.com/img/logo_qp-arduino.png)

This README provides a quick overview of QP for Arduino.
Please refer to the companion webiste to this project at:

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

----
# Provided Libraries and Tools
# Provided Libraries and Examples

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

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

----
# Provided Tools

The archive also contains the QM modeling tool for Windows

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

----
# Directories and Files

After the installation, your Arduino `<Sketchbook>` folder should look
as follows:

Expand All @@ -45,6 +52,12 @@ as follows:
| | | +-blinky/ - Blinky example
| | | | +-blinky.ino - Blinky code (generated)
| | | | +-blinky.qm - Blinky model (for QM tool)
| | | +-blinky_bsp/ - Blinky example with Board Support Package
| | | | +-blinky_bsp.ino - Blinky code (generated)
| | | | +-blinky_bsp.qm - Blinky model (for QM tool)
| | | +-dpp_bsp/ - Dining Philosopher example with BSP
| | | | +-dpp_bsp.ino - DPP code (generated)
| | | | +-dpp_bsp.qm - DPP model (for QM tool)
| | +-src/ - QP/C++ library source code
| | | +-qpcpp.h - QP/C++ library header file
| | | +-... - QP/C++ library sources
Expand Down
6 changes: 3 additions & 3 deletions libraries/qpcpp_sam/examples/blinky/blinky.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Model: blinky.qm
// File: ${.::blinky.ino}
//
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// This program is open source software: you can redistribute it and/or
Expand Down Expand Up @@ -144,8 +144,8 @@ protected:
//.$enddecl${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//. Check for the minimum required QP version
#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.8.0 or higher required
#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.9.0 or higher required
#endif
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//.$define${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Expand Down
2 changes: 1 addition & 1 deletion libraries/qpcpp_sam/examples/blinky/blinky.qm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<model version="5.1.0" links="0">
<model version="5.1.2" links="0">
<documentation>This is the simple Blinky example for the Arduino DUE board. The example demonstrates:

1. One active object class &quot;Blinky&quot; (inside the package &quot;AOs&quot;)
Expand Down
2 changes: 1 addition & 1 deletion libraries/qpcpp_sam/examples/blinky_bsp/blinky.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Model: blinky_bsp.qm
// File: ${.::blinky.hpp}
//
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// This program is open source software: you can redistribute it and/or
Expand Down
6 changes: 3 additions & 3 deletions libraries/qpcpp_sam/examples/blinky_bsp/blinky_bsp.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Model: blinky_bsp.qm
// File: ${.::blinky_bsp.ino}
//
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// This program is open source software: you can redistribute it and/or
Expand Down Expand Up @@ -62,8 +62,8 @@ protected:
//.$enddecl${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//. Check for the minimum required QP version
#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.8.0 or higher required
#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.9.0 or higher required
#endif
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//.$define${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Expand Down
2 changes: 1 addition & 1 deletion libraries/qpcpp_sam/examples/blinky_bsp/blinky_bsp.qm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<model version="5.1.0" links="0">
<model version="5.1.2" links="0">
<documentation>This is a little more advanced Blinky example for the Arduino DUE board. The example demonstrates:

1. One active object class &quot;Blinky&quot; (inside the package &quot;AOs&quot;)
Expand Down
2 changes: 1 addition & 1 deletion libraries/qpcpp_sam/examples/blinky_bsp/bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Model: blinky_bsp.qm
// File: ${.::bsp.cpp}
//
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// This program is open source software: you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion libraries/qpcpp_sam/examples/blinky_bsp/bsp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Model: blinky_bsp.qm
// File: ${.::bsp.hpp}
//
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// This program is open source software: you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion libraries/qpcpp_sam/examples/dpp_bsp/bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Model: dpp_bsp.qm
// File: ${.::bsp.cpp}
//
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// This program is open source software: you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion libraries/qpcpp_sam/examples/dpp_bsp/bsp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Model: dpp_bsp.qm
// File: ${.::bsp.hpp}
//
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// This program is open source software: you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion libraries/qpcpp_sam/examples/dpp_bsp/dpp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Model: dpp_bsp.qm
// File: ${.::dpp.hpp}
//
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// This program is open source software: you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion libraries/qpcpp_sam/examples/dpp_bsp/dpp_bsp.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Model: dpp_bsp.qm
// File: ${.::dpp_bsp.ino}
//
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// This program is open source software: you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion libraries/qpcpp_sam/examples/dpp_bsp/dpp_bsp.qm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<model version="5.1.0" links="1">
<model version="5.1.2" links="1">
<documentation>This is the Dining Philosopher Problem (DPP) example for the Arduino-DUE board. The example demonstrates:

1. Multiple active objects (5 Philosophers and 1 Table AO)
Expand Down
6 changes: 3 additions & 3 deletions libraries/qpcpp_sam/examples/dpp_bsp/philo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Model: dpp_bsp.qm
// File: ${.::philo.cpp}
//
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// This program is open source software: you can redistribute it and/or
Expand Down Expand Up @@ -46,8 +46,8 @@ class Philo : public QP::QActive {
// generate definition of the opaque pointer to the AO -----------------------
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//. Check for the minimum required QP version
#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.8.0 or higher required
#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.9.0 or higher required
#endif
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Expand Down
6 changes: 3 additions & 3 deletions libraries/qpcpp_sam/examples/dpp_bsp/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Model: dpp_bsp.qm
// File: ${.::table.cpp}
//
// This code has been generated by QM 5.1.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.1.2 <www.state-machine.com/qm/>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// This program is open source software: you can redistribute it and/or
Expand Down Expand Up @@ -47,8 +47,8 @@ class Table : public QP::QActive {
// generate definition of the opaque pointer to the AO -----------------------
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//. Check for the minimum required QP version
#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.8.0 or higher required
#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.9.0 or higher required
#endif
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Expand Down
2 changes: 1 addition & 1 deletion libraries/qpcpp_sam/library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=QP-C++
version=6.9.2
version=6.9.3
author=Quantum Leaps
maintainer=Quantum Leaps <info@state-machine.com>
sentence=QP/C++ Real-Time Embedded Framework for Arduino.
Expand Down
14 changes: 7 additions & 7 deletions libraries/qpcpp_sam/src/qep.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
/// @ingroup qep
/// @cond
///***************************************************************************
/// Last updated for version 6.9.2
/// Last updated on 2020-12-17
/// Last updated for version 6.9.3
/// Last updated on 2021-02-26
///
/// Q u a n t u m L e a P s
/// ------------------------
/// Modern Embedded Software
///
/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
/// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved.
///
/// This program is open source software: you can redistribute it and/or
/// modify it under the terms of the GNU General Public License as published
Expand Down Expand Up @@ -43,15 +43,15 @@
//! The current QP version as a decimal constant XXYZ, where XX is a 2-digit
// major version number, Y is a 1-digit minor version number, and Z is
// a 1-digit release number.
#define QP_VERSION 692U
#define QP_VERSION 693U

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

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


//****************************************************************************
Expand Down
12 changes: 7 additions & 5 deletions libraries/qpcpp_sam/src/qf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
/// @ingroup qf
/// @cond
///***************************************************************************
/// Last updated for version 6.9.2
/// Last updated on 2020-12-17
/// Last updated for version 6.9.3
/// Last updated on 2021-02-26
///
/// Q u a n t u m L e a P s
/// ------------------------
/// Modern Embedded Software
///
/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
/// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved.
///
/// This program is open source software: you can redistribute it and/or
/// modify it under the terms of the GNU General Public License as published
Expand Down Expand Up @@ -536,7 +536,8 @@ class QF {
#else
//! Publish event to the framework.
static void publish_(QEvt const * const e,
void const * const sender) noexcept;
void const * const sender,
std::uint_fast8_t const qs_id) noexcept;

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

//! Invoke the direct event posting facility QP::QActive::post_().
/// @description
Expand Down
12 changes: 7 additions & 5 deletions libraries/qpcpp_sam/src/qf_dyn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
/// @brief QF/C++ dynamic event management
/// @cond
///***************************************************************************
/// Last updated for version 6.9.1
/// Last updated on 2020-09-17
/// Last updated for version 6.9.3
/// Last updated on 2021-04-09
///
/// Q u a n t u m L e a P s
/// ------------------------
/// Modern Embedded Software
///
/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
/// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved.
///
/// This program is open source software: you can redistribute it and/or
/// modify it under the terms of the GNU General Public License as published
Expand Down Expand Up @@ -90,7 +90,7 @@ void QF::poolInit(void * const poolSto,
< static_cast<std::uint_fast8_t>(Q_DIM(QF_pool_)));

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

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

QS_BEGIN_PRE_(QS_QF_NEW_ATTEMPT,
Expand Down
13 changes: 8 additions & 5 deletions libraries/qpcpp_sam/src/qf_ps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
/// @ingroup qf
/// @cond
///***************************************************************************
/// Last updated for version 6.9.1
/// Last updated on 2020-09-17
/// Last updated for version 6.9.3
/// Last updated on 2021-02-26
///
/// Q u a n t u m L e a P s
/// ------------------------
/// Modern Embedded Software
///
/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
/// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved.
///
/// This program is open source software: you can redistribute it and/or
/// modify it under the terms of the GNU General Public License as published
Expand Down Expand Up @@ -118,15 +118,18 @@ void QF::psInit(QSubscrList * const subscrSto,
#ifndef Q_SPY
void QF::publish_(QEvt const * const e) noexcept {
#else
void QF::publish_(QEvt const * const e, void const * const sender) noexcept {
void QF::publish_(QEvt const * const e,
void const * const sender,
std::uint_fast8_t const qs_id) noexcept
{
#endif
/// @pre the published signal must be within the configured range
Q_REQUIRE_ID(100, static_cast<enum_t>(e->sig) < QF_maxPubSignal_);

QF_CRIT_STAT_
QF_CRIT_E_();

QS_BEGIN_NOCRIT_PRE_(QS_QF_PUBLISH, 0U)
QS_BEGIN_NOCRIT_PRE_(QS_QF_PUBLISH, qs_id)
QS_TIME_PRE_(); // the timestamp
QS_OBJ_PRE_(sender); // the sender object
QS_SIG_PRE_(e->sig); // the signal of the event
Expand Down
11 changes: 9 additions & 2 deletions libraries/qpcpp_sam/src/qs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/// @ingroup qs
/// @cond
///***************************************************************************
/// Last updated for version 6.9.2
/// Last updated on 2021-01-14
/// Last updated for version 6.9.3
/// Last updated on 2021-02-26
///
/// Q u a n t u m L e a P s
/// ------------------------
Expand Down Expand Up @@ -240,6 +240,13 @@ enum QSpyIdGroups : std::int16_t {
QS_AP_IDS = 0x80 + QS_AP_ID, //!< Application-specific IDs
};

//! QS ID type for applying local filtering
struct QSpyId {
std::uint8_t m_prio;
std::uint_fast8_t getPrio(void) const noexcept {
return static_cast<std::uint_fast8_t>(m_prio);
}
};

} // namespace QP ************************************************************

Expand Down
Loading

0 comments on commit 9492de4

Please sign in to comment.