This commit is contained in:
QL 2020-04-02 21:21:53 -04:00
parent d1b7c05520
commit db2a7c8de9
251 changed files with 1710 additions and 1051 deletions

View File

@ -61,6 +61,6 @@ LOSSES.
Contact Information:
====================
Quantum Leaps, LLC
Web: www.state-machine.com
Email: info@state-machine.com
https://www.state-machine.com
info@state-machine.com

View File

@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);
/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */
/*----------------------------------------------------------------------------
@ -281,7 +283,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (

View File

@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);
/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */
/*----------------------------------------------------------------------------
@ -314,7 +316,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (

View File

@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);
/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */
/*----------------------------------------------------------------------------
@ -471,7 +473,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (

View File

@ -53,12 +53,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);
/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */
/*----------------------------------------------------------------------------
@ -294,7 +296,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (

View File

@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);
/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */
/*----------------------------------------------------------------------------
@ -512,7 +514,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (

View File

@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);
/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */
/*----------------------------------------------------------------------------
@ -284,7 +286,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (

View File

@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);
/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */
/*----------------------------------------------------------------------------
@ -284,7 +286,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (

View File

@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);
/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */
/*----------------------------------------------------------------------------
@ -339,7 +341,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (

View File

@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);
/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */
/*----------------------------------------------------------------------------
@ -389,7 +391,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (

View File

@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);
/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */
/*----------------------------------------------------------------------------
@ -420,7 +422,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (

View File

@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "QP/C++"
PROJECT_NUMBER = "6.8.0"
PROJECT_NUMBER = "6.8.1"
PROJECT_BRIEF =
PROJECT_LOGO = images/header_logo_ql.png
OUTPUT_DIRECTORY =

View File

@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "QP/C++"
PROJECT_NUMBER = "6.8.0"
PROJECT_NUMBER = "6.8.1"
PROJECT_BRIEF =
PROJECT_LOGO = images/header_logo_ql.png
OUTPUT_DIRECTORY =

View File

@ -2,7 +2,33 @@ namespace QP {
/** @page history Revision History
@section qpcpp_6_8_0 Version 6.8.0, 2020-03-31
@section qpcpp_6_8_1 Version 6.8.1, 2020-04-04
Fixed the following bugs:
- [bug#261 QTime::disarm() clears the wrong flag](https://sourceforge.net/p/qpc/bugs/261/)
Also, this release updates the QP/C++ ports and examples for workstations (Windows and POSIX) by consistently applying the "safe" versions of services from `<stdio.h>` and `<string.h>`. The "portable" versions of these services are defined as macros in the `safe_std.h` header file and include the following services:
- `MEMMOVE_S()` -> `memmove_s()`
- `STRCPY_S()` -> `strcpy_s()`
- `STRCPY_S()` -> `strcpy_s()`
- `STRCAT_S()` -> `strcat_s()`
- `SNPRINTF_S()` -> `_snprintf_s()`
- `PRINTF_S()` -> `printf_s()`
- `FPRINTF_S()` ->`fprintf_s()`
- `FREAD_S()` -> `fread_s()`
- `FOPEN_S()` -> `fopen_s()`
- `LOCALTIME_S()` -> `localtime_s()`
These "safe" functions are mapped to the best approximation of these services available on a given platform. For example, `STRCPY_S()` is mapped to `strcpy_s()` on Windows and `strcpy()` on POSIX (Linux/MacOS/etc.).
Finally, this release improves the comments in the QF::stop() function. The comments now make it very clear that after calling QF_stop() the application must terminate and cannot continue. In particular, QF::stop() is **not** intended to be followed by a call to QF::init() to "resurrect" the application. The previous comments apparently were confusing and some developers attempted to "restart" a running application, which led to system crashes.
------------------------------------------------------------------------------
@section qpcpp_6_8_0 Version 6.8.0, 2020-03-21
This release updates the QP/C++ source code from C++98/03 to the **C++11 Standard**. Specifically, the following C++11 features are now used:

View File

@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QP built-in images</title>
<img src="logo_ql.gif">
<img src="logo_ql.png">
<img src="AN.jpg">
<img src="AN_Coding_Standard.jpg">
<img src="AN_Getting_Started_with_QPC.jpg">

BIN
doxygen/img/logo_ql.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -47,7 +47,7 @@ int main() {
// instantiate and start the active objects...
AO_Blinky->start(1U, // priority
blinkyQSto, Q_DIM(blinkyQSto), // event queue
(void *)0, 0U); // stack (unused)
nullptr, 0U); // stack (unused)
return QF::run(); // run the QF application
}

View File

@ -63,7 +63,7 @@ extern "C" {
void SysTick_Handler(void); // prototype
void SysTick_Handler(void) {
QK_ISR_ENTRY(); // inform QK about entering an ISR
QF::TICK_X(0U, (void *)0); // process time events for rate 0
QF::TICK_X(0U, nullptr); // process time events for rate 0
QK_ISR_EXIT(); // inform QK about exiting an ISR
}

View File

@ -62,7 +62,7 @@ extern "C" {
//............................................................................
void SysTick_Handler(void); // prototype
void SysTick_Handler(void) {
QF::TICK_X(0U, (void *)0); // process time events for rate 0
QF::TICK_X(0U, nullptr); // process time events for rate 0
}
} // extern "C"

View File

@ -47,7 +47,7 @@ int main() {
// instantiate and start the active objects...
AO_Blinky->start(1U, // priority
blinkyQSto, Q_DIM(blinkyQSto), // event queue
(void *)0, 0U); // stack (unused)
nullptr, 0U); // stack (unused)
return QF::run(); // run the QF application
}

View File

@ -81,7 +81,7 @@ extern "C" {
void SysTick_Handler(void); // prototype
void SysTick_Handler(void) {
QK_ISR_ENTRY(); // inform QK about entering an ISR
QF::TICK_X(0U, (void *)0); // process time events for rate 0
QF::TICK_X(0U, nullptr); // process time events for rate 0
QK_ISR_EXIT(); // inform QK about exiting an ISR
}

View File

@ -80,7 +80,7 @@ extern "C" {
//............................................................................
void SysTick_Handler(void); // prototype
void SysTick_Handler(void) {
QF::TICK_X(0U, (void *)0); // process time events for rate 0
QF::TICK_X(0U, nullptr); // process time events for rate 0
}
} // extern "C"

View File

@ -174,11 +174,11 @@ for (uint8_t n = 0U; n &lt; N_PHILO; ++n) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);</action>

View File

@ -227,7 +227,7 @@ void BSP::init(void) {
//...
BSP::randomSeed(1234U);
if (!QS_INIT((void *)0)) { // initialize the QS software tracing
if (!QS_INIT(nullptr)) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -67,7 +67,7 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U), // priority
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
// example of prioritizing the Ticker0 active object
@ -77,7 +77,7 @@ int main() {
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 2U), // priority
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -203,7 +203,7 @@ void BSP::init(void) {
//...
BSP::randomSeed(1234U);
if (!QS_INIT((void *)0)) { // initialize the QS software tracing
if (!QS_INIT(nullptr)) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -67,7 +67,7 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U), // priority
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
// example of prioritizing the Ticker0 active object
@ -77,7 +77,7 @@ int main() {
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 2U), // priority
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -212,7 +212,7 @@ void BSP::init(void) {
//...
BSP::randomSeed(1234U);
if (!QS_INIT((void *)0)) { // initialize the QS software tracing
if (!QS_INIT(nullptr)) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);
@ -243,13 +243,13 @@ void BSP::displayPaused(uint8_t paused) {
// for testing the extended threads...
static QP::QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U};
XT_Test2->delayCancel(); // make sure Test2 is not delayed
XT_Test2->POST_X(&pauseEvt, 1U, (void *)0); // post to Test2's queue
XT_Test2->POST_X(&pauseEvt, 1U, nullptr); // post to Test2's queue
}
else {
GPIO->P[LED_PORT].DOUT &= ~(1U << LED0_PIN);
}
QS_BEGIN(PAUSED_STAT, (void *)0) // application-specific record begin
QS_BEGIN(PAUSED_STAT, nullptr) // application-specific record begin
QS_U8(1, paused); // Paused status
QS_END()
}

View File

@ -110,11 +110,11 @@ Q_STATE_DEF(Table, initial) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);

View File

@ -59,12 +59,12 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U),
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
// leave the priority level (N_PHILO + 1) free for the mutex in BSP
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 2U),
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -174,11 +174,11 @@ for (uint8_t n = 0U; n &lt; N_PHILO; ++n) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);</action>

View File

@ -228,7 +228,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
if (!QS_INIT((void *)0)) { // initialize the QS software tracing
if (!QS_INIT(nullptr)) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -228,7 +228,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
if (!QS_INIT((void *)0)) { // initialize the QS software tracing
if (!QS_INIT(nullptr)) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -67,7 +67,7 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U), // priority
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
// example of prioritizing the Ticker0 active object
@ -77,7 +77,7 @@ int main() {
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 2U), // priority
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -205,7 +205,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
if (!QS_INIT((void *)0)) { // initialize the QS software tracing
if (!QS_INIT(nullptr)) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -67,7 +67,7 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U), // priority
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
// example of prioritizing the Ticker0 active object
@ -77,7 +77,7 @@ int main() {
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 2U), // priority
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -210,7 +210,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
if (!QS_INIT((void *)0)) { // initialize the QS software tracing
if (!QS_INIT(nullptr)) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);
@ -236,7 +236,7 @@ void BSP::displayPaused(uint8_t const paused) {
//GPIOF->DATA_Bits[LED_RED] = ((paused != 0U) ? 0xFFU : 0U);
static QP::QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U};
XT_Test2->POST_X(&pauseEvt, 1U, (void *)0);
XT_Test2->POST_X(&pauseEvt, 1U, nullptr);
// application-specific trace record
QS_BEGIN(PAUSED_STAT, AO_Table)

View File

@ -110,11 +110,11 @@ Q_STATE_DEF(Table, initial) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);

View File

@ -174,11 +174,11 @@ for (uint8_t n = 0U; n &lt; N_PHILO; ++n) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);</action>

View File

@ -63,13 +63,13 @@ int main() {
// start the active objects...
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint8_t)(n + 1U),
DPP::AO_Philo[n]->start(n + 1U,
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
DPP::AO_Table->start((uint8_t)(N_PHILO + 1U),
DPP::AO_Table->start(N_PHILO + 1U,
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -184,7 +184,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0U) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -176,7 +176,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0U) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -110,11 +110,11 @@ Q_STATE_DEF(Table, initial) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);

View File

@ -174,11 +174,11 @@ for (uint8_t n = 0U; n &lt; N_PHILO; ++n) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);</action>

View File

@ -209,7 +209,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
// initialize the QS software tracing...
if (!QS_INIT((void *)0)) {
if (!QS_INIT(nullptr)) {
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -74,12 +74,12 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U), // priority
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 1U), // priority
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -203,7 +203,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
// initialize the QS software tracing...
if (!QS_INIT((void *)0)) {
if (!QS_INIT(nullptr)) {
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -74,12 +74,12 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U), // priority
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 1U), // priority
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -209,7 +209,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
// initialize the QS software tracing...
if (!QS_INIT((void *)0)) {
if (!QS_INIT(nullptr)) {
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -110,11 +110,11 @@ Q_STATE_DEF(Table, initial) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);

View File

@ -174,11 +174,11 @@ for (uint8_t n = 0U; n &lt; N_PHILO; ++n) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);</action>

View File

@ -179,7 +179,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0U) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -178,7 +178,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0U) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -65,12 +65,12 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint8_t)(n + 1U),
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
// leave the priority level (N_PHILO + 1) free for the mutex in BSP
DPP::AO_Table->start((uint8_t)(N_PHILO + 2U),
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -171,7 +171,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0U) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -65,11 +65,11 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint8_t)(n + 1U),
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
DPP::AO_Table->start((uint8_t)(N_PHILO + 1U),
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -183,7 +183,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0U) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -110,11 +110,11 @@ Q_STATE_DEF(Table, initial) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);

View File

@ -174,11 +174,11 @@ for (uint8_t n = 0U; n &lt; N_PHILO; ++n) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);</action>

View File

@ -66,11 +66,11 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint8_t)(n + 1U),
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
DPP::AO_Table->start((uint8_t)(N_PHILO + 1U),
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -178,7 +178,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0U) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -170,7 +170,7 @@ void BSP::init(void) {
BSP::randomSeed(1234U);
if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0U) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -110,11 +110,11 @@ Q_STATE_DEF(Table, initial) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);

View File

@ -174,11 +174,11 @@ for (uint8_t n = 0U; n &lt; N_PHILO; ++n) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);</action>

View File

@ -219,7 +219,7 @@ void BSP::init(void) {
// seed the random number generator
randomSeed(1234U);
if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0U) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick);

View File

@ -66,17 +66,17 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U), // priority
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
// example of prioritizing the Ticker0 active object
DPP::the_Ticker0->start((uint_fast8_t)(N_PHILO + 1U), // priority
(QP::QEvt const **)0, 0U,
(void *)0, 0U);
nullptr, 0U);
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 2U), // priority
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -215,7 +215,7 @@ void BSP::init(void) {
// seed the random number generator
randomSeed(1234U);
if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0U) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick);

View File

@ -66,17 +66,17 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U), // priority
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
// example of prioritizing the Ticker0 active object
DPP::the_Ticker0->start((uint_fast8_t)(N_PHILO + 1U), // priority
(QP::QEvt const **)0, 0U,
(void *)0, 0U);
nullptr, 0U);
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 2U), // priority
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -219,7 +219,7 @@ void BSP::init(void) {
// seed the random number generator
randomSeed(1234U);
if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0U) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick);

View File

@ -110,11 +110,11 @@ Q_STATE_DEF(Table, initial) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);

View File

@ -174,11 +174,11 @@ for (uint8_t n = 0U; n &lt; N_PHILO; ++n) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);</action>

View File

@ -1,4 +1,4 @@
SET PATH=C:\tools\Keil_v5\ARM\ARMCLANG\Bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\ProgramData\Oracle\Java\javapath;C:\utils;C:\tools\Git\cmd;C:\qp\qtools\bin;C:\qp\qtools\mingw32\bin
SET PATH=C:\tools\Keil_v5\ARM\ARMCLANG\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\ProgramData\Oracle\Java\javapath;C:\tools\Git\cmd;C:\utils;C:\qp\qtools\bin;C:\qp\qtools\mingw32\bin;C:\Users\miro\AppData\Local\GitHubDesktop\bin
SET CPU_TYPE=STM32F746NGHx
SET CPU_VENDOR=STMicroelectronics
SET UV2_TARGET=dpp-spy

View File

@ -212,7 +212,7 @@ void BSP::init(void) {
//...
BSP::randomSeed(1234U);
if (!QS_INIT((void *)0)) { // initialize the QS software tracing
if (!QS_INIT(nullptr)) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -66,12 +66,12 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U), // priority
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 1U), // priority
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -190,7 +190,7 @@ void BSP::init(void) {
//...
BSP::randomSeed(1234U);
if (!QS_INIT((void *)0)) { // initialize the QS software tracing
if (!QS_INIT(nullptr)) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -66,12 +66,12 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U), // priority
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 1U), // priority
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -212,7 +212,7 @@ void BSP::init(void) {
//...
BSP::randomSeed(1234U);
if (!QS_INIT((void *)0)) { // initialize the QS software tracing
if (!QS_INIT(nullptr)) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -110,11 +110,11 @@ Q_STATE_DEF(Table, initial) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);

View File

@ -3,7 +3,7 @@
// Model: game.qm
// File: ${.::game.hpp}
//
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.0.0 <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

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<model version="4.6.0" links="1">
<model version="5.0.0" links="1">
<documentation>&quot;Fly 'n' Shoot&quot; game model from Chapters 1 &amp; 9 of PSiCC2
NOTE: Requries QP6.</documentation>

View File

@ -3,7 +3,7 @@
// Model: game.qm
// File: ${.::mine1.cpp}
//
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.0.0 <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
@ -70,8 +70,8 @@ static inline uint8_t MINE_ID(Mine1 const * const me) {
// Mine1 class definition ----------------------------------------------------
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//. Check for the minimum required QP version
#if (QP_VERSION < 650U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.5.0 or higher required
#if (QP_VERSION < 670U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.7.0 or higher required
#endif
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//.$define${AOs::Mine1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -3,7 +3,7 @@
// Model: game.qm
// File: ${.::mine2.cpp}
//
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.0.0 <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
@ -70,8 +70,8 @@ static inline uint8_t MINE_ID(Mine2 const * const me) {
// Mine1 class definition ----------------------------------------------------
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//. Check for the minimum required QP version
#if (QP_VERSION < 650U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.5.0 or higher required
#if (QP_VERSION < 670U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.7.0 or higher required
#endif
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//.$define${AOs::Mine2} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -3,7 +3,7 @@
// Model: game.qm
// File: ${.::missile.cpp}
//
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.0.0 <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
@ -55,8 +55,8 @@ static Missile l_missile; // the sole instance of the Missile active object
// Public-scope objects ------------------------------------------------------
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//. Check for the minimum required QP version
#if (QP_VERSION < 650U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.5.0 or higher required
#if (QP_VERSION < 670U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.7.0 or higher required
#endif
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//.$define${AOs::AO_Missile} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -239,7 +239,7 @@ void BSP_init(void) {
}
// initialize the QS software tracing
if (!QS_INIT((void *)0)) {
if (!QS_INIT(nullptr)) {
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -216,7 +216,7 @@ void BSP_init(void) {
}
// initialize the QS software tracing
if (!QS_INIT((void *)0)) {
if (!QS_INIT(nullptr)) {
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_SysTick_Handler);

View File

@ -3,7 +3,7 @@
// Model: game.qm
// File: ${.::ship.cpp}
//
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.0.0 <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
@ -61,8 +61,8 @@ static Ship l_ship; // the sole instance of the Ship active object
// Public-scope objects ------------------------------------------------------
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//. Check for the minimum required QP version
#if (QP_VERSION < 650U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.5.0 or higher required
#if (QP_VERSION < 670U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.7.0 or higher required
#endif
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//.$define${AOs::AO_Ship} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -3,7 +3,7 @@
// Model: game.qm
// File: ${.::tunnel.cpp}
//
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
// This code has been generated by QM 5.0.0 <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
@ -76,8 +76,8 @@ static Tunnel l_tunnel; // the sole instance of the Tunnel active object
// Public-scope objects ------------------------------------------------------
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//. Check for the minimum required QP version
#if (QP_VERSION < 650U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.5.0 or higher required
#if (QP_VERSION < 670U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
#error qpcpp version 6.7.0 or higher required
#endif
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//.$define${AOs::AO_Tunnel} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -74,14 +74,14 @@ enum {
// ISRs used in this project =================================================
void SysTick_Handler(void) {
QK_ISR_ENTRY(); // inform QK about entering an ISR
QP::QF::TICK_X(0U, (void *)0); // process time events for rate 0
QP::QF::TICK_X(0U, nullptr); // process time events for rate 0
QK_ISR_EXIT(); // inform QK about exiting an ISR
}
//............................................................................
void Timer0A_IRQHandler(void) {
QK_ISR_ENTRY(); // inform QK about entering an ISR
TIMER0->ICR |= (1U << 0); // clear the Timer0 interrupt source
QP::QF::TICK_X(1U, (void *)0); // process time events for rate 1
QP::QF::TICK_X(1U, nullptr); // process time events for rate 1
QK_ISR_EXIT(); // inform QK about exiting an ISR
}
//............................................................................

View File

@ -73,12 +73,12 @@ enum {
// ISRs used in this project =================================================
void SysTick_Handler(void) {
QP::QF::TICK_X(0U, (void *)0); // process time events for rate 0
QP::QF::TICK_X(0U, nullptr); // process time events for rate 0
}
//............................................................................
void Timer0A_IRQHandler(void) {
TIMER0->ICR |= (1U << 0); // clear the Timer0 interrupt source
QP::QF::TICK_X(1U, (void *)0); // process time events for rate 1
QP::QF::TICK_X(1U, nullptr); // process time events for rate 1
}
//............................................................................
void GPIOPortF_IRQHandler(void) {

View File

@ -74,14 +74,14 @@ enum {
// ISRs used in this project =================================================
void SysTick_Handler(void) {
QXK_ISR_ENTRY(); // inform QXK about entering an ISR
QP::QF::TICK_X(0U, (void *)0); // process time events for rate 0
QP::QF::TICK_X(0U, nullptr); // process time events for rate 0
QXK_ISR_EXIT(); // inform QXK about exiting an ISR
}
//............................................................................
void Timer0A_IRQHandler(void) {
QXK_ISR_ENTRY(); // inform QXK about entering an ISR
TIMER0->ICR |= (1U << 0); // clear the Timer0 interrupt source
QP::QF::TICK_X(1U, (void *)0); // process time events for rate 1
QP::QF::TICK_X(1U, nullptr); // process time events for rate 1
QXK_ISR_EXIT(); // inform QXK about exiting an ISR
}
//............................................................................

View File

@ -47,7 +47,7 @@ int main() {
// instantiate and start the active objects...
AO_Blinky->start(1U, // priority
blinkyQSto, Q_DIM(blinkyQSto), // event queue
(void *)0, 0U); // stack (unused)
nullptr, 0U); // stack (unused)
return QF::run(); // run the QF application
}

View File

@ -74,7 +74,7 @@ extern "C" {
//............................................................................
QK_IRQ_BEGIN(rtiCompare0)
rtiREG1->INTFLAG = 1U; // clear the interrutp source
QP::QF::TICK_X(0U, (void *)0); // process time events for rate 0
QP::QF::TICK_X(0U, nullptr); // process time events for rate 0
QK_IRQ_END()
} // extern "C"

View File

@ -79,7 +79,7 @@ extern "C" {
//
void rtiNotification(uint32 notification) {
if (notification == rtiNOTIFICATION_COMPARE0) {
QP::QF::TICK_X(0U, (void *)0); // process time events for rate 0
QP::QF::TICK_X(0U, nullptr); // process time events for rate 0
}
}

View File

@ -174,11 +174,11 @@ for (uint8_t n = 0U; n &lt; N_PHILO; ++n) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);</action>

View File

@ -171,7 +171,7 @@ void BSP::init(void) {
// initialize the random seed
BSP::randomSeed(1234U);
if (QS_INIT((void *)0) == 0) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_rtiCompare0);

View File

@ -58,11 +58,11 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U),
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 1U),
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -173,7 +173,7 @@ void BSP::init(void) {
// initialize the random seed
BSP::randomSeed(1234U);
if (QS_INIT((void *)0) == 0) { // initialize the QS software tracing
if (QS_INIT(nullptr) == 0) { // initialize the QS software tracing
Q_ERROR();
}
QS_OBJ_DICTIONARY(&l_rtiCompare0);

View File

@ -58,12 +58,12 @@ int main() {
for (uint8_t n = 0U; n < N_PHILO; ++n) {
DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U),
philoQueueSto[n], Q_DIM(philoQueueSto[n]),
(void *)0, 0U);
nullptr, 0U);
}
// leave the priority level (N_PHILO + 1) free for the mutex in BSP
DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 2U),
tableQueueSto, Q_DIM(tableQueueSto),
(void *)0, 0U);
nullptr, 0U);
return QP::QF::run(); // run the QF application
}

View File

@ -110,11 +110,11 @@ Q_STATE_DEF(Table, initial) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);

View File

@ -174,11 +174,11 @@ for (uint8_t n = 0U; n &lt; N_PHILO; ++n) {
}
// global signals...
QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
QS_SIG_DICTIONARY(TEST_SIG, (void *)0);
QS_SIG_DICTIONARY(DONE_SIG, nullptr);
QS_SIG_DICTIONARY(EAT_SIG, nullptr);
QS_SIG_DICTIONARY(PAUSE_SIG, nullptr);
QS_SIG_DICTIONARY(SERVE_SIG, nullptr);
QS_SIG_DICTIONARY(TEST_SIG, nullptr);
// signals just for this AO...
QS_SIG_DICTIONARY(HUNGRY_SIG, this);</action>

Some files were not shown because too many files have changed in this diff Show More