This commit is contained in:
QL 2021-01-13 10:32:39 -05:00
parent 8ec913a86d
commit f1c64ce845
23 changed files with 143 additions and 99 deletions

View File

@ -1,11 +1,11 @@
# Doxyfile 1.8.18
# Doxyfile 1.9.0
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "QP/C++"
PROJECT_NUMBER = "6.9.1"
PROJECT_NUMBER = "6.9.2"
PROJECT_BRIEF =
PROJECT_LOGO = images/header_logo_ql.png
OUTPUT_DIRECTORY =
@ -26,13 +26,15 @@ JAVADOC_AUTOBRIEF = NO
JAVADOC_BANNER = NO
QT_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = YES
PYTHON_DOCSTRING = YES
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES = "next{1}=<hr><b>Next:</b> @ref \1</p>" \
"description=@par <b>Description</b>" \
"hint=@par <b>Hint</b>" \
"usage=@par <b>Usage</b>" \
"description=@par Description" \
"hint=@par Hint" \
"usage=@par Usage" \
"caption{1}=<div class=\"caption\" align=\"center\">\1</div>" \
"reqdef{2}=<div class= vmargin20></div>@anchor \1 <TABLE><TR ALIGN= left><TH NOWRAP>\1</TH><TH WIDTH= 100%>\2</TH></TR></TABLE>" \
"reqref{1}=@ref \1 \"\1\"" \
"termdef{2}=@anchor term_\1 @par \2" \
@ -57,6 +59,7 @@ INLINE_GROUPED_CLASSES = YES
INLINE_SIMPLE_STRUCTS = YES
TYPEDEF_HIDES_STRUCT = YES
LOOKUP_CACHE_SIZE = 0
NUM_PROC_THREADS = 1
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
@ -68,6 +71,7 @@ EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
RESOLVE_UNNAMED_PARAMS = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
@ -185,7 +189,6 @@ CLANG_DATABASE_PATH =
# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@ -326,7 +329,17 @@ PREDEFINED = Q_SPY \
QP_IMPL \
Q_UTEST \
QK_ON_CONTEXT_SW \
QXK_ON_CONTEXT_SW
QXK_ON_CONTEXT_SW \
QF_MAX_ACTIVE \
QF_MAX_TICK_RATE \
QF_MAX_EPOOL \
QF_EVENT_SIZ_SIZE \
QF_EQUEUE_CTR_SIZE \
QF_MPOOL_SIZ_SIZE \
QF_MPOOL_CTR_SIZE \
QF_TIMEEVT_CTR_SIZE \
QF_ACTIVE_STOP \
QS_TIME_SIZE
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
@ -353,6 +366,8 @@ COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = YES
UML_LIMIT_NUM_FIELDS = 10
DOT_UML_DETAILS = NO
DOT_WRAP_THRESHOLD = 17
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES

View File

@ -1,11 +1,11 @@
# Doxyfile 1.8.18
# Doxyfile 1.9.0
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "QP/C++"
PROJECT_NUMBER = "6.9.1"
PROJECT_NUMBER = "6.9.2"
PROJECT_BRIEF =
PROJECT_LOGO = images/header_logo_ql.png
OUTPUT_DIRECTORY =
@ -26,13 +26,15 @@ JAVADOC_AUTOBRIEF = NO
JAVADOC_BANNER = NO
QT_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = YES
PYTHON_DOCSTRING = YES
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES = "next{1}=<hr><b>Next:</b> @ref \1</p>" \
"description=@par <b>Description</b>" \
"hint=@par <b>Hint</b>" \
"usage=@par <b>Usage</b>" \
"description=@par Description" \
"hint=@par Hint" \
"usage=@par Usage" \
"caption{1}=<div class=\"caption\" align=\"center\">\1</div>" \
"reqdef{2}=<div class= vmargin20></div>@anchor \1 <TABLE><TR ALIGN= left><TH NOWRAP>\1</TH><TH WIDTH= 100%>\2</TH></TR></TABLE>" \
"reqref{1}=@ref \1 \"\1\"" \
"termdef{2}=@anchor term_\1 @par \2" \
@ -57,6 +59,7 @@ INLINE_GROUPED_CLASSES = YES
INLINE_SIMPLE_STRUCTS = YES
TYPEDEF_HIDES_STRUCT = YES
LOOKUP_CACHE_SIZE = 0
NUM_PROC_THREADS = 1
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
@ -68,6 +71,7 @@ EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
RESOLVE_UNNAMED_PARAMS = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
@ -185,7 +189,6 @@ CLANG_DATABASE_PATH =
# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@ -326,7 +329,17 @@ PREDEFINED = Q_SPY \
QP_IMPL \
Q_UTEST \
QK_ON_CONTEXT_SW \
QXK_ON_CONTEXT_SW
QXK_ON_CONTEXT_SW \
QF_MAX_ACTIVE \
QF_MAX_TICK_RATE \
QF_MAX_EPOOL \
QF_EVENT_SIZ_SIZE \
QF_EQUEUE_CTR_SIZE \
QF_MPOOL_SIZ_SIZE \
QF_MPOOL_CTR_SIZE \
QF_TIMEEVT_CTR_SIZE \
QF_ACTIVE_STOP \
QS_TIME_SIZE
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
@ -353,6 +366,8 @@ COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = YES
UML_LIMIT_NUM_FIELDS = 10
DOT_UML_DETAILS = NO
DOT_WRAP_THRESHOLD = 17
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES

View File

@ -20,13 +20,13 @@
7 1 40 2 7 QP::QHsm::qm_tran_xp@411-417@..\include\qep.hpp
4 1 20 1 4 QP::QHsm::qm_entry@421-424@..\include\qep.hpp
4 1 20 1 4 QP::QHsm::qm_exit@427-430@..\include\qep.hpp
4 1 19 1 4 QP::QHsm::qm_entry@433-436@..\include\qep.hpp
4 1 19 1 4 QP::QHsm::qm_exit@439-442@..\include\qep.hpp
4 1 20 1 4 QP::QHsm::qm_sm_exit@446-449@..\include\qep.hpp
4 1 20 1 4 QP::QHsm::qm_super_sub@453-456@..\include\qep.hpp
3 1 19 1 3 QP::QMsm::init@504-506@..\include\qep.hpp
3 1 13 1 3 QP::QMsm::stateObj@516-518@..\include\qep.hpp
3 1 10 1 3 QP::QEP::getVersion@596-598@..\include\qep.hpp
4 1 19 1 4 QP::QHsm::qm_entry@436-439@..\include\qep.hpp
4 1 19 1 4 QP::QHsm::qm_exit@442-445@..\include\qep.hpp
4 1 20 1 4 QP::QHsm::qm_sm_exit@449-452@..\include\qep.hpp
4 1 20 1 4 QP::QHsm::qm_super_sub@456-459@..\include\qep.hpp
3 1 19 1 3 QP::QMsm::init@507-509@..\include\qep.hpp
3 1 13 1 3 QP::QMsm::stateObj@519-521@..\include\qep.hpp
3 1 10 1 3 QP::QEP::getVersion@604-606@..\include\qep.hpp
3 1 11 1 3 QP::QEQueue::getNFree@225-227@..\include\qequeue.hpp
3 1 11 1 3 QP::QEQueue::getNMin@240-242@..\include\qequeue.hpp
3 1 13 1 3 QP::QEQueue::isEmpty@254-256@..\include\qequeue.hpp
@ -35,11 +35,11 @@
3 1 22 1 3 QP::QActive::setPrio@256-258@..\include\qf.hpp
1 1 10 1 1 QP::QActive::getOsObject@266-266@..\include\qf.hpp
1 1 10 1 1 QP::QActive::getThread@272-272@..\include\qf.hpp
3 1 13 1 3 QP::QMActive::stateObj@343-345@..\include\qf.hpp
3 1 17 1 3 QP::QTimeEvt::toActive@459-461@..\include\qf.hpp
3 1 17 1 3 QP::QTimeEvt::toTimeEvt@464-466@..\include\qf.hpp
3 1 10 1 3 QP::QF::getVersion@495-497@..\include\qf.hpp
3 1 18 1 3 QP::QTicker::init@640-642@..\include\qf.hpp
3 1 13 1 3 QP::QMActive::stateObj@348-350@..\include\qf.hpp
3 1 17 1 3 QP::QTimeEvt::toActive@464-466@..\include\qf.hpp
3 1 17 1 3 QP::QTimeEvt::toTimeEvt@469-471@..\include\qf.hpp
3 1 10 1 3 QP::QF::getVersion@500-502@..\include\qf.hpp
3 1 18 1 3 QP::QTicker::init@645-647@..\include\qf.hpp
3 1 10 1 3 QP::QK::getVersion@155-157@..\include\qk.hpp
3 1 11 1 3 QP::QMPool::getBlockSize@150-152@..\include\qmpool.hpp
3 1 11 1 3 QP::QPSet::setEmpty@81-83@..\include\qpset.hpp
@ -56,10 +56,10 @@
8 2 70 1 8 QP::QPSet::insert@162-169@..\include\qpset.hpp
8 2 74 1 8 QP::QPSet::rmove@175-182@..\include\qpset.hpp
5 2 40 1 5 QP::QPSet::findMax@185-189@..\include\qpset.hpp
7 1 28 1 7 QP::QS::force_cast@518-524@..\include\qs.hpp
14 4 87 1 14 QP::QS::rxPut@583-596@..\include\qs.hpp
6 1 51 5 6 QP::QActiveDummy::start@617-622@..\include\qs.hpp
3 1 18 1 3 QP::QActiveDummy::init@626-628@..\include\qs.hpp
7 1 28 1 7 QP::QS::force_cast@524-530@..\include\qs.hpp
14 4 87 1 14 QP::QS::rxPut@589-602@..\include\qs.hpp
6 1 51 5 6 QP::QActiveDummy::start@623-628@..\include\qs.hpp
3 1 18 1 3 QP::QActiveDummy::init@632-634@..\include\qs.hpp
3 1 20 1 3 QP::QXThread::init@87-89@..\include\qxthread.hpp
6 1 51 5 6 QP::QXThread::start@103-108@..\include\qxthread.hpp
2 1 15 2 3 QP::QEvt@99-101@..\src\qf\qep_hsm.cpp
@ -69,16 +69,18 @@
5 1 37 2 5 QP::QHsm::top@224-228@..\src\qf\qep_hsm.cpp
102 15 608 2 149 QP::QHsm::dispatch@242-390@..\src\qf\qep_hsm.cpp
97 15 464 2 132 QP::QHsm::hsm_tran@404-535@..\src\qf\qep_hsm.cpp
16 3 85 1 23 QP::QHsm::isIn@550-572@..\src\qf\qep_hsm.cpp
20 4 108 1 29 QP::QHsm::childState@593-621@..\src\qf\qep_hsm.cpp
3 1 13 0 3 QP::QHsm::getStateHandler@539-541@..\src\qf\qep_hsm.cpp
16 3 85 1 23 QP::QHsm::isIn@557-579@..\src\qf\qep_hsm.cpp
20 4 108 1 29 QP::QHsm::childState@600-628@..\src\qf\qep_hsm.cpp
6 1 29 1 6 QP::QMsm::QMsm@83-88@..\src\qf\qep_msm.cpp
22 3 168 2 36 QP::QMsm::init@101-136@..\src\qf\qep_msm.cpp
113 21 661 2 166 QP::QMsm::dispatch@149-314@..\src\qf\qep_msm.cpp
51 9 301 2 64 QP::QMsm::execTatbl_@330-393@..\src\qf\qep_msm.cpp
21 4 116 3 28 QP::QMsm::exitToTranSource_@405-432@..\src\qf\qep_msm.cpp
44 6 247 2 54 QP::QMsm::enterHistory_@446-499@..\src\qf\qep_msm.cpp
13 3 59 1 14 QP::QMsm::isInState@514-527@..\src\qf\qep_msm.cpp
21 4 90 1 28 QP::QMsm::childStateObj@544-571@..\src\qf\qep_msm.cpp
3 1 15 0 3 QP::QMsm::getStateHandler@321-323@..\src\qf\qep_msm.cpp
51 9 301 2 64 QP::QMsm::execTatbl_@340-403@..\src\qf\qep_msm.cpp
21 4 116 3 28 QP::QMsm::exitToTranSource_@415-442@..\src\qf\qep_msm.cpp
44 6 247 2 54 QP::QMsm::enterHistory_@456-509@..\src\qf\qep_msm.cpp
13 3 59 1 14 QP::QMsm::isInState@524-537@..\src\qf\qep_msm.cpp
21 4 90 1 28 QP::QMsm::childStateObj@554-581@..\src\qf\qep_msm.cpp
9 3 69 1 10 QP::QF::add_@79-88@..\src\qf\qf_act.cpp
10 3 80 1 12 QP::QF::remove_@103-114@..\src\qf\qf_act.cpp
7 2 63 2 7 QP::QF::bzero@129-135@..\src\qf\qf_act.cpp
@ -118,8 +120,9 @@
4 1 41 2 4 QP::QMActive::init@68-71@..\src\qf\qf_qmact.cpp
3 1 24 1 3 QP::QMActive::init@73-75@..\src\qf\qf_qmact.cpp
3 1 32 2 3 QP::QMActive::dispatch@77-79@..\src\qf\qf_qmact.cpp
3 1 27 1 3 QP::QMActive::isInState@81-83@..\src\qf\qf_qmact.cpp
5 1 27 1 5 QP::QMActive::childStateObj@85-89@..\src\qf\qf_qmact.cpp
3 1 27 1 3 QP::QMActive::isInState@82-84@..\src\qf\qf_qmact.cpp
5 1 27 1 5 QP::QMActive::childStateObj@86-90@..\src\qf\qf_qmact.cpp
3 1 20 0 3 QP::QMActive::getStateHandler@94-96@..\src\qf\qf_qmact.cpp
67 7 352 1 99 QP::QF::tickX_@81-179@..\src\qf\qf_time.cpp
13 3 61 1 13 QP::QF::noTimeEvtsActiveX@206-218@..\src\qf\qf_time.cpp
16 2 104 3 32 QP::QTimeEvt::QTimeEvt@231-262@..\src\qf\qf_time.cpp
@ -184,23 +187,23 @@
NLOC Avg.NLOC AvgCCN Avg.token function_cnt file
--------------------------------------------------------------
5 0.0 0.0 0.0 0 ..\include\qassert.h
226 3.9 1.0 21.1 22 ..\include\qep.hpp
228 3.9 1.0 21.1 22 ..\include\qep.hpp
40 3.0 1.0 11.7 3 ..\include\qequeue.hpp
194 2.9 1.0 18.7 10 ..\include\qf.hpp
195 2.9 1.0 18.7 10 ..\include\qf.hpp
32 3.0 1.0 10.0 1 ..\include\qk.hpp
37 3.0 1.0 11.0 1 ..\include\qmpool.hpp
1 0.0 0.0 0.0 0 ..\include\qpcpp.h
4 0.0 0.0 0.0 0 ..\include\qpcpp.hpp
72 4.3 1.4 34.8 14 ..\include\qpset.hpp
338 7.5 1.8 46.0 4 ..\include\qs.hpp
340 7.5 1.8 46.0 4 ..\include\qs.hpp
5 0.0 0.0 0.0 0 ..\include\qstamp.cpp
4 0.0 0.0 0.0 0 ..\include\qstamp.hpp
0 0.0 0.0 0.0 0 ..\include\qs_dummy.hpp
12 0.0 0.0 0.0 0 ..\include\qv.hpp
32 0.0 0.0 0.0 0 ..\include\qxk.hpp
66 4.5 1.0 35.5 2 ..\include\qxthread.hpp
315 32.9 5.3 186.7 9 ..\src\qf\qep_hsm.cpp
306 36.4 6.4 208.9 8 ..\src\qf\qep_msm.cpp
318 29.9 4.9 169.3 10 ..\src\qf\qep_hsm.cpp
309 32.7 5.8 187.3 9 ..\src\qf\qep_msm.cpp
62 12.5 3.5 91.8 4 ..\src\qf\qf_act.cpp
242 25.3 3.7 145.0 9 ..\src\qf\qf_actq.cpp
64 18.3 2.0 98.3 3 ..\src\qf\qf_defer.cpp
@ -209,7 +212,7 @@ NLOC Avg.NLOC AvgCCN Avg.token function_cnt file
104 47.0 9.0 315.0 2 ..\src\qf\qf_ps.cpp
11 8.0 3.0 59.0 1 ..\src\qf\qf_qact.cpp
159 30.0 4.0 151.4 5 ..\src\qf\qf_qeq.cpp
27 3.8 1.0 28.8 6 ..\src\qf\qf_qmact.cpp
30 3.7 1.0 27.6 7 ..\src\qf\qf_qmact.cpp
230 24.2 3.8 132.4 9 ..\src\qf\qf_time.cpp
184 18.8 4.1 120.7 9 ..\src\qk\qk.cpp
77 16.2 3.8 98.2 4 ..\src\qv\qv.cpp
@ -230,6 +233,6 @@ NLOC Avg.NLOC AvgCCN Avg.token function_cnt file
==========================================================================================
Total nloc Avg.NLOC AvgCCN Avg.token Fun Cnt Warning cnt Fun Rt nloc Rt
------------------------------------------------------------------------------------------
4021 16.9 3.1 102.9 174 1 0.01 0.04
4035 16.7 3.1 101.5 177 1 0.01 0.04
@endcode
*/

View File

@ -133,6 +133,15 @@ The Quantum Leaps Application Note <a class="extern" target="_blank" href="https
The hallmark of the QP/C++ implementation of UML state machines is **traceability**, which is direct, precise, and unambiguous mapping of every state machine element to human readable, portable, MISRA compliant C++ code. Preserving the traceability from requirements through design to code is essential for mission-critical systems, such as medical devices or avionic systems.
@section DbC Design by Contract
<a href="https://en.wikipedia.org/wiki/Design_by_contract" target="_blank" class="extern">Design by Contract</a> (DbC) is a philosophy that views a software system as a set of components whose collaboration is based on precisely defined specifications of mutual obligations — the <em>contracts</em>. The central idea of this method is to inherently embed the contracts in the code and validate them automatically at runtime.
In C and C++, the most important aspects of DbC (the contracts) can be implemented with <em>assertions</em>. Assertions are increasingly popular among the developers of mission-critical software. For example, <a href="https://jaxenter.com/power-ten-nasas-coding-commandments-114124.html" target="_blank" class="extern">NASA requires certain density of assertions</a> in such software.
In the context of the QP/C++ framework, DbC provides an excellent methodology for implementing a very robust <em>error-handling policy</em>. Due to <a href="https://www.state-machine.com/concepts/event-driven/#Inversion">inversion of control</a> so typical in all event-driven systems, the QP/C++ framework controls many more aspects of the application than a traditional RTOS. A framework is in a much better position to make sure that the <em>application</em> is performing correctly, rather than the application to check error codes or catch exceptions originating from the framework.
@section coding Coding Standard
The QP/C++ framework has been developed in strict adherence to the documented <a class="extern" target="_blank" href="https://www.state-machine.com/doc/AN_QL_Coding_Standard.pdf"><strong>Quantum Leaps Coding Standard</strong></a>.

View File

@ -1,5 +1,5 @@
# test-script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
def on_reset():
expect_pause()

View File

@ -1,5 +1,5 @@
# test script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
# preamble...
def on_reset():

View File

@ -1,5 +1,5 @@
# test-script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
# preamble...
def on_reset():

View File

@ -1,5 +1,5 @@
# test-script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
# preamble...
def on_reset():

View File

@ -1,5 +1,5 @@
# test-script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
# preamble...
def on_reset():

View File

@ -1,5 +1,5 @@
# test-script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
# preamble...
def on_reset():

View File

@ -1,5 +1,5 @@
# test-script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
# preamble...
def on_reset():

View File

@ -1,5 +1,5 @@
# test-script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
# preamble...
def on_reset():

View File

@ -1,5 +1,5 @@
# test-script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
# preamble...
def on_setup():

View File

@ -1,5 +1,5 @@
# test-script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
# preamble...
def on_setup():

View File

@ -1,5 +1,5 @@
# test-script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
# preamble...
def on_setup():

View File

@ -1,5 +1,5 @@
# test-script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
# preamble...
def on_setup():

View File

@ -1,5 +1,5 @@
# test-script for QUTest unit testing harness
# see https://www.state-machine.com/qtools/html
# see https://www.state-machine.com/qtools/qutest.html
# preamble...
def on_setup():

View File

@ -50,6 +50,8 @@ if (!registered) {
QS_FUN_DICTIONARY(&amp;Philo::thinking);
QS_FUN_DICTIONARY(&amp;Philo::hungry);
QS_FUN_DICTIONARY(&amp;Philo::eating);
QS_SIG_DICTIONARY(TIMEOUT_SIG, nullptr); // global signals
}
subscribe(EAT_SIG);

View File

@ -123,6 +123,8 @@ Q_STATE_DEF(Philo, initial) {
QS_FUN_DICTIONARY(&Philo::thinking);
QS_FUN_DICTIONARY(&Philo::hungry);
QS_FUN_DICTIONARY(&Philo::eating);
QS_SIG_DICTIONARY(TIMEOUT_SIG, nullptr); // global signals
}
subscribe(EAT_SIG);

View File

@ -4,13 +4,13 @@
/// @cond
///***************************************************************************
/// Last updated for version 6.9.2
/// Last updated on 2020-12-14
/// Last updated on 2021-01-12
///
/// 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
@ -391,7 +391,7 @@ public:
static std::uint16_t rxGetNfree(void) noexcept;
//! Put one byte into the QS RX lock-free buffer
static void rxPut(std::uint8_t const b) noexcept;
static bool rxPut(std::uint8_t const b) noexcept;
//! Set the "current object" in the Target
static void setCurrObj(std::uint8_t obj_kind, void *obj_ptr) noexcept;
@ -586,18 +586,21 @@ enum QSpyRxRecords : std::uint8_t {
};
//! put one byte into the QS RX lock-free buffer
inline void QS::rxPut(std::uint8_t const b) noexcept {
if (rxPriv_.head != 0U) {
if ((rxPriv_.head - rxPriv_.tail) != 1U) {
rxPriv_.buf[rxPriv_.head] = b;
--rxPriv_.head;
}
inline bool QS::rxPut(std::uint8_t const b) noexcept {
QSCtr head = rxPriv_.head;
if (head != 0U) {
--head;
}
else {
if (rxPriv_.tail != rxPriv_.end) {
rxPriv_.buf[0] = b;
rxPriv_.head = rxPriv_.end;
head = rxPriv_.end;
}
if (head != rxPriv_.tail) { // buffer NOT full?
rxPriv_.buf[rxPriv_.head] = b;
rxPriv_.head = head;
return true; // byte placed in the buffer
}
else {
return false; // byte NOT placed in the buffer
}
}

View File

@ -1,8 +1,8 @@
@echo off
:: ===========================================================================
:: Product: QP/C++ build script for PC-Lint-Plus
:: Last Updated for Version: 6.8.0
:: Date of the Last Update: 2020-01-26
:: Last Updated for Version: 6.9.2
:: Date of the Last Update: 2020-12-19
::
:: Q u a n t u m L e a P s
:: ------------------------
@ -42,7 +42,7 @@
@echo.
:: NOTE: adjust to for your installation directory of PC-Lint-Plus
@set PCLP=C:\tools\lint-plus\pclp32.exe
@set PCLP=C:\tools\lint-plus\windows\pclp32.exe
if NOT exist "%PCLP%" (
@echo The PC-Lint-Plus toolset not found. Please adjust lin.bat

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs></ProjectOutputs>
<ContentFiles></ContentFiles>
<SatelliteDlls></SatelliteDlls>
<NonRecipeFileRefs></NonRecipeFileRefs>
</Project>

View File

@ -4,13 +4,13 @@
/// @cond
///***************************************************************************
/// Last updated for version 6.9.2
/// Last updated on 2020-12-17
/// Last updated on 2021-01-12
///
/// 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
@ -245,8 +245,9 @@ void QS::rxInitBuf(std::uint8_t * const sto,
{
rxPriv_.buf = &sto[0];
rxPriv_.end = static_cast<QSCtr>(static_cast<QSCtr>(stoSize) - 1U);
rxPriv_.head = 0U;
rxPriv_.tail = 0U;
// establish empty condition
rxPriv_.head = rxPriv_.end;
rxPriv_.tail = rxPriv_.end;
rxPriv_.currObj[QS::SM_OBJ] = nullptr;
rxPriv_.currObj[QS::AO_OBJ] = nullptr;
@ -281,18 +282,16 @@ void QS::rxInitBuf(std::uint8_t * const sto,
/// be moving, meaning that bytes can be concurrently removed from the buffer.
///
std::uint16_t QS::rxGetNfree(void) noexcept {
std::uint16_t nFree;
if (rxPriv_.head == rxPriv_.tail) {
nFree = static_cast<std::uint16_t>(rxPriv_.end);
QSCtr head = rxPriv_.head;
if (head == rxPriv_.tail) { // buffer empty?
return static_cast<uint16_t>(rxPriv_.end);
}
else if (rxPriv_.head < rxPriv_.tail) {
nFree = static_cast<std::uint16_t>(rxPriv_.tail - rxPriv_.head);
else if (head < rxPriv_.tail) {
return static_cast<uint16_t>(rxPriv_.end + head - rxPriv_.tail);
}
else {
nFree = static_cast<std::uint16_t>((rxPriv_.tail + rxPriv_.end)
- rxPriv_.head);
return static_cast<uint16_t>(head - rxPriv_.tail - 1U);
}
return nFree;
}
//****************************************************************************
@ -369,14 +368,16 @@ void QS::queryCurrObj(std::uint8_t obj_kind) noexcept {
//****************************************************************************
void QS::rxParse(void) {
while (rxPriv_.head != rxPriv_.tail) { // QS-RX buffer not empty?
std::uint8_t b = rxPriv_.buf[rxPriv_.tail];
QSCtr head = rxPriv_.head;
QSCtr tail = rxPriv_.tail;
while (head != tail) { // QS-RX buffer NOT empty?
std::uint8_t b = rxPriv_.buf[tail];
if (rxPriv_.tail != 0U) {
--rxPriv_.tail;
if (tail != 0U) {
--tail;
}
else {
rxPriv_.tail = rxPriv_.end;
tail = rxPriv_.end;
}
if (l_rx.esc != 0U) { // escaped byte arrived?
@ -410,6 +411,7 @@ void QS::rxParse(void) {
rxParseData_(b);
}
}
rxPriv_.tail = tail;
}
//****************************************************************************