mirror of
https://github.com/QuantumLeaps/qpcpp.git
synced 2025-01-14 05:42:57 +08:00
7.1.2
firs commit after fixing the history
This commit is contained in:
parent
56e1f84791
commit
fd0f76334c
@ -1 +0,0 @@
|
||||
Subproject commit cc0333938b9618b5a25394ebd81c8f235f5ff192
|
15
README.md
15
README.md
@ -3,12 +3,15 @@
|
||||
# What's New?
|
||||
View QP/C++ Revision History at: https://www.state-machine.com/qpcpp/history.html
|
||||
|
||||
>**NOTE:** If you're interested in the latest QP/C++ version from Git,
|
||||
it is highly recommened that you download the latest
|
||||
[QP/C++ Release](https://github.com/QuantumLeaps/qpcpp/releases)
|
||||
as opposed to cloning the repo directy. This is because the `3rd_party`
|
||||
directory needed to build the examples is no longer provided in the
|
||||
`qpcpp` repository (and is provided in the QP/C++ release).
|
||||
> **NOTE:** If you're interested in the latest QP/C++ version from GitHub,
|
||||
it is highly recommened that you clone this repo like that:
|
||||
|
||||
```
|
||||
git clone https://github.com/QuantumLeaps/qpcpp --recurse-submodules --depth 1
|
||||
```
|
||||
|
||||
Alternatively, you can also download the latest
|
||||
[QP/C++ Release](https://github.com/QuantumLeaps/qpcpp/releases).
|
||||
|
||||
|
||||
# Getting Started with QP/C++
|
||||
|
1
doxygen/.gitignore
vendored
Normal file
1
doxygen/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
metrics.dox
|
131
doxygen/Doxyfile
131
doxygen/Doxyfile
@ -1,5 +1,7 @@
|
||||
# Doxyfile 1.9.5
|
||||
|
||||
@INCLUDE = ../../ql-doxygen/ql-doxyfile
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
@ -40,17 +42,6 @@ PYTHON_DOCSTRING = YES
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 4
|
||||
ALIASES = "nav{2}=<span class=\"prev_button\">@ref \1</span><span class=\"next_button\">@ref \2</span>" \
|
||||
"nav_prev{1}=<span class=\"prev_button\">@ref \1</span>" \
|
||||
"nav_next{1}=<span class=\"next_button\">@ref \1</span>" \
|
||||
"next{1}=<span class=\"next_button\">@ref \1</span>" \
|
||||
"description=@par Description" \
|
||||
"usage=@par Usage" \
|
||||
"hint=@par Hint" \
|
||||
"label{1}=<div class=\"label\">\1</div>" \
|
||||
"caption{1}=<div class=\"caption\" align=\"center\">\1</div>" \
|
||||
"webref{2}=<a class=\"extern\" target=\"_blank\" href=\"https://www.state-machine.com/\1\">\2</a>" \
|
||||
"tr{1}=@xrefitem tr \"Traceability\" \"\" traces to: @ref \1"
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
@ -150,13 +141,17 @@ INPUT = main.dox \
|
||||
../../cert-pack/srs.dox \
|
||||
../../cert-pack/sas.dox \
|
||||
../../cert-pack/sds.dox \
|
||||
../../cert-pack/sds_sm-cpp.dox \
|
||||
../../cert-pack/autosar.dox \
|
||||
../../cert-pack/tr.dox \
|
||||
metrics.dox \
|
||||
dir.dox \
|
||||
config.hpp \
|
||||
../include \
|
||||
../src
|
||||
../src \
|
||||
../ports/lint-plus/std.lnt \
|
||||
../ports/lint-plus/qpcpp.lnt \
|
||||
../ports/lint-plus/options.lnt
|
||||
INPUT_ENCODING = UTF-8
|
||||
INPUT_FILE_ENCODING =
|
||||
FILE_PATTERNS = *.dox \
|
||||
@ -195,7 +190,7 @@ FORTRAN_COMMENT_AFTER = 72
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = YES
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
STRIP_CODE_COMMENTS = NO
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = NO
|
||||
REFERENCES_LINK_SOURCE = YES
|
||||
@ -283,68 +278,6 @@ SEARCHDATA_FILE = searchdata.xml
|
||||
EXTERNAL_SEARCH_ID = QPCPP
|
||||
EXTRA_SEARCH_MAPPINGS =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
LATEX_MAKEINDEX_CMD = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = letter
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
LATEX_FOOTER =
|
||||
LATEX_EXTRA_STYLESHEET =
|
||||
LATEX_EXTRA_FILES =
|
||||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = YES
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
LATEX_BIB_STYLE = plain
|
||||
LATEX_TIMESTAMP = NO
|
||||
LATEX_EMOJI_DIRECTORY =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_SUBDIR =
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_PROGRAMLISTING = YES
|
||||
XML_NS_MEMB_FILE_SCOPE = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the DOCBOOK output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_DOCBOOK = NO
|
||||
DOCBOOK_OUTPUT = docbook
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
@ -373,51 +306,3 @@ PREDEFINED = Q_SPY \
|
||||
QXK_ON_CONTEXT_SW
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
EXTERNAL_PAGES = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
DIA_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
DOT_NUM_THREADS = 0
|
||||
DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10"
|
||||
DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10"
|
||||
DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4"
|
||||
DOT_FONTPATH =
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = NO
|
||||
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
|
||||
CALL_GRAPH = NO
|
||||
CALLER_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DIR_GRAPH_MAX_DEPTH = 1
|
||||
DOT_IMAGE_FORMAT = png
|
||||
INTERACTIVE_SVG = NO
|
||||
DOT_PATH = C:/tools/graphviz/bin
|
||||
DOTFILE_DIRS =
|
||||
MSCFILE_DIRS =
|
||||
DIAFILE_DIRS =
|
||||
PLANTUML_JAR_PATH =
|
||||
PLANTUML_CFG_FILE =
|
||||
PLANTUML_INCLUDE_PATH =
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
|
@ -1,11 +1,8 @@
|
||||
# Doxyfile 1.9.3
|
||||
# Doxyfile 1.9.5
|
||||
|
||||
@INCLUDE = Doxyfile
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
ENABLED_SECTIONS += CERT
|
||||
ENABLED_SECTIONS += CERT LATEX
|
||||
GENERATE_LATEX = YES
|
||||
HTML_OUTPUT = ../cert-pack
|
||||
|
||||
LATEX_OUTPUT = ../cert-latex
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Doxyfile 1.9.3
|
||||
# Doxyfile 1.9.4
|
||||
|
||||
@INCLUDE = Doxyfile
|
||||
|
||||
|
7
doxygen/Doxyfile-LATEX
Normal file
7
doxygen/Doxyfile-LATEX
Normal file
@ -0,0 +1,7 @@
|
||||
# Doxyfile 1.9.5
|
||||
|
||||
@INCLUDE = Doxyfile
|
||||
|
||||
GENERATE_HTML = NO
|
||||
GENERATE_LATEX = YES
|
||||
ENABLED_SECTIONS += LATEX
|
@ -343,47 +343,76 @@ The QP/C++ examples for Zephyr are as follows:
|
||||
/*##########################################################################*/
|
||||
/*! @page zephyr_blinky Blinky
|
||||
|
||||
Blinks an on-board LED once per second.
|
||||
The "Blinky" example blinks an on-board LED once per second. The blinking is done by an Active Object (Blinky) with a state machine. The example directory contains the following files:
|
||||
|
||||
@verbatim
|
||||
<qpcpp>/examples/zephyr/blinky
|
||||
|
|
||||
+-src/ - project sources
|
||||
| |
|
||||
| +-bsp.hpp
|
||||
| +-bsp.cpp
|
||||
| +-blinky.hpp
|
||||
| +-blinky.cpp
|
||||
| +-main.cpp
|
||||
|
|
||||
+-CMakeLists.txt - project files
|
||||
+-prj.conf - project config
|
||||
+-README.md
|
||||
@endverbatim
|
||||
|
||||
The blinking is done by an Active Object (Blinky) with a state machine.
|
||||
|
||||
@section zephyr_blinky-build Building and Running
|
||||
|
||||
- Linux:
|
||||
Open a terminal in the blinky directory.
|
||||
|
||||
@verbatim
|
||||
source ~/zephyrproject/zephyr/zephyr-env.sh
|
||||
[1] cd <qpcpp>/examples/zephyr/blinky
|
||||
|
||||
west build -b <board>
|
||||
[2] source ~/zephyrproject/zephyr/zephyr-env.sh
|
||||
|
||||
west flush
|
||||
[3] west build -b <board>
|
||||
[3a] west build -b nucleo_h743zi
|
||||
[3b] west build -b nucleo_l053r8
|
||||
...
|
||||
|
||||
[4] west flush
|
||||
@endverbatim
|
||||
|
||||
`[1]` Open a terminal in the Blinky example directory.<br>
|
||||
`[2]` If Zephyr project is not in your path, you might need to source the `zephyr-env.sh` shell script.<br>
|
||||
`[3]` build the example project, where `<board>` is any of the boards supported by Zepyr. The example has been tested with the following boards:<br>
|
||||
`[3a]` nucleo_h743zi (ARM Cortex-M7)<br>
|
||||
`[3b]` nucleo_l053r8 (ARM Cortex-M0+)<br>
|
||||
`[4]` flash the board
|
||||
|
||||
@remark
|
||||
The example has been tested with the following boards:
|
||||
|
||||
![STM32-NUCLEO-L053R8 board](bd_NUCLEO-L053R8.jpg)
|
||||
|
||||
<br>
|
||||
|
||||
![STM32-NUCLEO-H743ZI board](bd_NUCLEO-H743ZI.jpg)
|
||||
|
||||
|
||||
@note
|
||||
The example should also work with most boards supported by Zephyr.
|
||||
|
||||
|
||||
@section zephyr_blinky-output Sample Output
|
||||
Once flashed to the board, the application also produces ASCII output to the serial terminal (if supported by the board):
|
||||
|
||||
@verbatim
|
||||
*** Booting Zephyr OS build v2.6.0-rc2-88-g3d39f72a88b3 ***
|
||||
BSP_ledOff
|
||||
QF_onStartup
|
||||
BSP_ledOn
|
||||
BSP_ledOff
|
||||
BSP_ledOn
|
||||
BSP_ledOff
|
||||
BSP::ledOff
|
||||
QF::onStartup
|
||||
BSP::ledOn
|
||||
BSP::ledOff
|
||||
BSP::ledOn
|
||||
BSP::ledOff
|
||||
@endverbatim
|
||||
|
||||
@note
|
||||
The example has been tested with the following boards:
|
||||
|
||||
![STM32-NUCLEO-L053R8 board](bd_NUCLEO-L053R8.jpg)
|
||||
<br>
|
||||
|
||||
![STM32-NUCLEO-H743ZI board](bd_NUCLEO-H743ZI.jpg)
|
||||
|
||||
@note
|
||||
The example should also work with most boards supported by Zephyr.
|
||||
|
||||
@section zephyr_blinky-limits Limitations
|
||||
The simple Blinky example does not support the QS software tracing.
|
||||
|
||||
@ -394,19 +423,61 @@ The simple Blinky example does not support the QS software tracing.
|
||||
|
||||
DPP example with multiple active objects.
|
||||
|
||||
@verbatim
|
||||
<qpcpp>/examples/zephyr/dpp
|
||||
|
|
||||
+-src/ - project sources
|
||||
| |
|
||||
| +-bsp.hpp
|
||||
| +-bsp.cpp
|
||||
| +-dpp.hpp
|
||||
| +-philo.cpp
|
||||
| +-table.cpp
|
||||
| +-main.cpp
|
||||
|
|
||||
+-CMakeLists.txt - project files
|
||||
+-prj.conf - project config
|
||||
+-README.md
|
||||
@endverbatim
|
||||
|
||||
@section zephyr_dpp-build Building and Running
|
||||
|
||||
- Linux:
|
||||
Open a terminal in the dpp directory.
|
||||
|
||||
@verbatim
|
||||
source ~/zephyrproject/zephyr/zephyr-env.sh
|
||||
[1] cd <qpcpp>/examples/zephyr/dpp
|
||||
|
||||
west build -b <board>
|
||||
[2] source ~/zephyrproject/zephyr/zephyr-env.sh
|
||||
|
||||
west flush
|
||||
[3] west build -b <board>
|
||||
[3a] west build -b nucleo_h743zi
|
||||
[3b] west build -b nucleo_l053r8
|
||||
...
|
||||
|
||||
[4] west flush
|
||||
@endverbatim
|
||||
|
||||
`[1]` Open a terminal in the DPP example directory.<br>
|
||||
`[2]` If Zephyr project is not in your path, you might need to source the `zephyr-env.sh` shell script.<br>
|
||||
`[3]` build the example project, where `<board>` is any of the boards supported by Zepyr. The example has been tested with the following boards:<br>
|
||||
`[3a]` nucleo_h743zi (ARM Cortex-M7)<br>
|
||||
`[3b]` nucleo_l053r8 (ARM Cortex-M0+)<br>
|
||||
`[4]` flash the board
|
||||
|
||||
@remark
|
||||
The example has been tested with the following boards:
|
||||
|
||||
![STM32-NUCLEO-L053R8 board](bd_NUCLEO-L053R8.jpg)
|
||||
|
||||
<br>
|
||||
|
||||
![STM32-NUCLEO-H743ZI board](bd_NUCLEO-H743ZI.jpg)
|
||||
|
||||
|
||||
@note
|
||||
The example should also work with most boards supported by Zephyr.
|
||||
|
||||
|
||||
@section zephyr_dpp-output Sample Output
|
||||
Once flashed to the board, the application also produces ASCII output to the serial terminal (if supported by the board):
|
||||
|
||||
@ -435,20 +506,118 @@ Philo[2]->eating
|
||||
Philo[0]->thinking
|
||||
@endverbatim
|
||||
|
||||
@note
|
||||
The example has been tested with the following boards:
|
||||
|
||||
![STM32-NUCLEO-L053R8 board](bd_NUCLEO-L053R8.jpg)
|
||||
<br>
|
||||
@section zephyr_dpp-qpspy Using the QP/SPY Software Tracing
|
||||
The @ref zephyr "QP/C Zephyr port" supports the
|
||||
[QSPY Software Tracing](https://www.state-machine.com/qtools/qpspy.html)
|
||||
option and will add the appropriate macros and files to build the "QSPY"
|
||||
configuration.
|
||||
|
||||
![STM32-NUCLEO-H743ZI board](bd_NUCLEO-H743ZI.jpg)
|
||||
If you wish to enable "QSPY" you can provide the option "QSPY"
|
||||
in the command-line for the build. For example:
|
||||
|
||||
@verbatim
|
||||
west build -b nucleo_h743zi -- -DQSPY=ON
|
||||
@endverbatim
|
||||
|
||||
@note
|
||||
The example should also work with most boards supported by Zephyr.
|
||||
The QP/Spy software tracing uses the Zephyr's console UART. This means that the Zephyr `printk()` facility cannot be used while QP/Spy is configured.
|
||||
|
||||
@section zephyr_dpp-limits Limitations
|
||||
The DPP example currently does not support the QS software tracing,
|
||||
because implementation of the QS output over UART is board dependent. However, for a specific board, re-implementing the QS callbacks should be straightforward.
|
||||
|
||||
If yo have built the example with QP/Spy, you might want to watch the QP/Spy output.
|
||||
|
||||
|
||||
@section zephyr_dpp-qspy The QSPY Host Utility
|
||||
To receive the QP/Spy software tracing output you need to run a special [qspy host application](https://www.state-machine.com/qtools/qspy.html).
|
||||
|
||||
@note
|
||||
You might need to build the `qspy` host utility on your Linux machine. The QSPY utility is available in
|
||||
[QTools collection](https://github.com/QuantumLeaps/qtools/tree/master/qspy).
|
||||
|
||||
|
||||
To launch the `qspy` host utility, open a separate terminal and run
|
||||
@verbatim
|
||||
qspy -c <serial-port>
|
||||
```
|
||||
specific example:
|
||||
```
|
||||
qspy -c /dev/ttyACM0
|
||||
@endverbatim
|
||||
|
||||
|
||||
@subsection @section zephyr_dpp-qs-output QSPY Output Example
|
||||
After resetting the board, you should see output similar to the following:
|
||||
@verbatim
|
||||
########## Trg-RST QP-Ver=701,Build=220810_150847
|
||||
Obj-Dict 0x20003154->QS_RX
|
||||
Obj-Dict 0x20000680->AO_Table
|
||||
Obj-Dict 0x20000180->AO_Philo[0]
|
||||
Obj-Dict 0x20000280->AO_Philo[1]
|
||||
Obj-Dict 0x20000380->AO_Philo[2]
|
||||
Obj-Dict 0x20000480->AO_Philo[3]
|
||||
Obj-Dict 0x20000580->AO_Philo[4]
|
||||
Obj-Dict 0x0000A52C->timerID
|
||||
Usr-Dict 00000100->PHILO_STAT
|
||||
Usr-Dict 00000101->PAUSED_STAT
|
||||
Usr-Dict 00000102->COMMAND_STAT
|
||||
Usr-Dict 00000103->CONTEXT_SW
|
||||
Obj-Dict 0x20003054->EvtPool1
|
||||
Obj-Dict 0x20000180->Philo::inst[0]
|
||||
Obj-Dict 0x2000026C->Philo::inst[0].m_timeEvt
|
||||
Obj-Dict 0x20000280->Philo::inst[1]
|
||||
Obj-Dict 0x2000036C->Philo::inst[1].m_timeEvt
|
||||
Obj-Dict 0x20000380->Philo::inst[2]
|
||||
Obj-Dict 0x2000046C->Philo::inst[2].m_timeEvt
|
||||
Obj-Dict 0x20000480->Philo::inst[3]
|
||||
Obj-Dict 0x2000056C->Philo::inst[3].m_timeEvt
|
||||
Obj-Dict 0x20000580->Philo::inst[4]
|
||||
Obj-Dict 0x2000066C->Philo::inst[4].m_timeEvt
|
||||
Fun-Dict 0x00008929->Philo::initial
|
||||
Fun-Dict 0x0000890F->Philo::thinking
|
||||
Fun-Dict 0x00008917->Philo::hungry
|
||||
Fun-Dict 0x0000891F->Philo::eating
|
||||
Sig-Dict 00000004,Obj=0x00000000->TIMEOUT_SIG
|
||||
0000000327 AO-Subsc Obj=Philo::inst[0],Sig=00000005,Obj=0x20000180
|
||||
0000000327 AO-Subsc Obj=Philo::inst[0],Sig=00000009,Obj=0x20000180
|
||||
===RTC===> St-Init Obj=Philo::inst[0],State=0x00009B1B->Philo::thinking
|
||||
===RTC===> St-Entry Obj=Philo::inst[0],State=Philo::thinking
|
||||
0000000328 Init===> Obj=Philo::inst[0],State=Philo::thinking
|
||||
0000000334 AO-Subsc Obj=Philo::inst[1],Sig=00000005,Obj=0x20000280
|
||||
0000000334 AO-Subsc Obj=Philo::inst[1],Sig=00000009,Obj=0x20000280
|
||||
===RTC===> St-Init Obj=Philo::inst[1],State=0x00009B1B->Philo::thinking
|
||||
===RTC===> St-Entry Obj=Philo::inst[1],State=Philo::thinking
|
||||
0000000334 Init===> Obj=Philo::inst[1],State=Philo::thinking
|
||||
0000000340 AO-Subsc Obj=Philo::inst[2],Sig=00000005,Obj=0x20000380
|
||||
0000000340 AO-Subsc Obj=Philo::inst[2],Sig=00000009,Obj=0x20000380
|
||||
===RTC===> St-Init Obj=Philo::inst[2],State=0x00009B1B->Philo::thinking
|
||||
===RTC===> St-Entry Obj=Philo::inst[2],State=Philo::thinking
|
||||
0000000340 Init===> Obj=Philo::inst[2],State=Philo::thinking
|
||||
0000000346 AO-Subsc Obj=Philo::inst[3],Sig=00000005,Obj=0x20000480
|
||||
0000000346 AO-Subsc Obj=Philo::inst[3],Sig=00000009,Obj=0x20000480
|
||||
===RTC===> St-Init Obj=Philo::inst[3],State=0x00009B1B->Philo::thinking
|
||||
===RTC===> St-Entry Obj=Philo::inst[3],State=Philo::thinking
|
||||
0000000346 Init===> Obj=Philo::inst[3],State=Philo::thinking
|
||||
0000000352 AO-Subsc Obj=Philo::inst[4],Sig=00000005,Obj=0x20000580
|
||||
0000000352 AO-Subsc Obj=Philo::inst[4],Sig=00000009,Obj=0x20000580
|
||||
===RTC===> St-Init Obj=Philo::inst[4],State=0x00009B1B->Philo::thinking
|
||||
===RTC===> St-Entry Obj=Philo::inst[4],State=Philo::thinking
|
||||
0000000352 Init===> Obj=Philo::inst[4],State=Philo::thinking
|
||||
Obj-Dict 0x20000680->Table::inst
|
||||
Sig-Dict 00000006,Obj=0x00000000->DONE_SIG
|
||||
Sig-Dict 00000005,Obj=0x00000000->EAT_SIG
|
||||
Sig-Dict 00000007,Obj=0x00000000->PAUSE_SIG
|
||||
Sig-Dict 00000008,Obj=0x00000000->SERVE_SIG
|
||||
Sig-Dict 00000009,Obj=0x00000000->TEST_SIG
|
||||
Sig-Dict 00000011,Obj=0x20000680->HUNGRY_SIG
|
||||
0000000370 AO-Subsc Obj=Table::inst,Sig=DONE_SIG
|
||||
0000000370 AO-Subsc Obj=Table::inst,Sig=PAUSE_SIG
|
||||
0000000370 AO-Subsc Obj=Table::inst,Sig=SERVE_SIG
|
||||
0000000371 AO-Subsc Obj=Table::inst,Sig=TEST_SIG
|
||||
0000000371 PHILO_STAT 0 thinking
|
||||
0000000371 PHILO_STAT 1 thinking
|
||||
0000000371 PHILO_STAT 2 thinking
|
||||
0000000371 PHILO_STAT 3 thinking
|
||||
@endverbatim
|
||||
|
||||
@next{exa_os}
|
||||
*/
|
||||
|
@ -8,20 +8,15 @@ To check what's new in QP™/C++, please see @ref history "QP/C++ Revision H
|
||||
|
||||
|
||||
@section over_about What is it?
|
||||
<b>QP™/C++ Real-Time Embedded Framework (RTEF)</b> is a lightweight implementation of the @webref{active-object, Active Object model of computation} specifically tailored for real-time embedded (RTE) systems. QP is both a software infrastructure for building applications consisting of Active Objects (actors) and a runtime environment for executing the Active Objects in a deterministic fashion. Additionally, QP Framework supports @webref{fsm#HSM, Hierarchical State Machines} with which to specify the behavior of Active Objects @ref srs_ref "[ROOM:94], [UML 2.5],[Sutter:10]".
|
||||
|
||||
@note
|
||||
<a href="https://www.state-machine.com/products/qp#CERT" title="QP Cert-Pack"><img src="cert-pack.png" style="float:right; margin:0 20px 0 20px;"></img></a>
|
||||
The @webref{products/qp#CERT,QP Certification Pack} provides:
|
||||
- @ref srs_over "Software Requirements Specification" with a good overview of the QP/C++ Framework
|
||||
- @ref sas_core "Software Architecture Specification" with concise description of QP/C++ architecture
|
||||
- @ref sds "Software Design Specification" with detailed description of the QP/C++ design.
|
||||
<b>QP™/C++ Real-Time Embedded Framework (RTEF)</b> is a lightweight implementation of the @webref{active-object, Active Object model of computation} specifically tailored for real-time embedded (RTE) systems. QP is both a *software infrastructure* for building applications consisting of active objects (actors) and a *runtime environment* for executing the active objects in a deterministic fashion. Additionally, QP Framework supports @webref{fsm#HSM, Hierarchical State Machines} with which to specify the behavior of Active Objects @ref srs_ref "[ROOM:94], [UML 2.5],[Sutter:10]". You can think of the QP/C RTEF as a modern, truly *event-driven* real-time operating system (RTOS).
|
||||
|
||||
|
||||
@section over_goals What does it do?
|
||||
The main objectives of the QP/C++ RTEF are:
|
||||
|
||||
- to provide a modern, event-driven model of concurrency based on the best practices of concurrent programming @ref srs_ref "[ROOM:94], [Cummings:10], [Sutter:10]", collectively known as the @webref{active-object, Active Object (Actor) model of computation}, which is inherently *safer* than the traditional "shared-state concurrency, mutual-exclusion, and blocking" approach based on a conventional Real-Time Operating System (RTOS);
|
||||
- to provide a modern, event-driven model of concurrency based on the best practices of concurrent programming collectively known as the @webref{active-object, Active Object (Actor) model of computation}, which is inherently *safer* than the traditional "shared-state concurrency, mutual-exclusion, and blocking" approach based on a conventional Real-Time Operating System (RTOS);
|
||||
|
||||
- to provide an efficient, @ref tr "bidirectionally traceable" implementation of @webref{fsm#HSM, Hierarchical State Machines} for specifying the internal behavior of Active Objects;
|
||||
|
||||
- to provide a *higher-level of abstraction* closer to the problem domain than the "naked" RTOS threads;
|
||||
|
||||
@ -31,7 +26,10 @@ The main objectives of the QP/C++ RTEF are:
|
||||
|
||||
|
||||
@section over_special What's special about it?
|
||||
The QP™/C++ Real-Time Embedded Framework (RTEF) is a unique offering on the embedded software market. It provides a modern, reusable **architecture** of embedded applications, which combines object-orientation with the particular model of concurrency, known as @webref{active-object, <strong>active objects</strong>} (actors). This architecture is generally **safer**, more responsive and easier to understand than "free threading" with a traditional Real-Time Operating System (RTOS). It also provides sufficiently high level of abstraction and the right abstractions to effectively apply modeling and code generation to deeply embedded systems.
|
||||
The QP™/C++ Real-Time Embedded Framework (RTEF) provides a modern, reusable **architecture** of embedded applications, which combines the model of concurrency, known as @webref{active-object, <strong>active objects</strong>} (actors) with @webref{fsm#HSM, Hierarchical State Machines}. This architecture is generally **safer**, more responsive and easier to understand than "free threading" with a traditional Real-Time Operating System (RTOS). It also provides sufficiently high level of abstraction and the *right* abstractions to effectively apply modeling and code generation to deeply embedded systems.
|
||||
|
||||
@note
|
||||
The most unique aspect of the QP™/C++ RTEF is its @ref over_eff "tiny size and efficiency" suitable for embedded microcontrollers, such as MCUs based on ARM Cortex-M.
|
||||
|
||||
|
||||
@subsection over_oop Object Orientation
|
||||
@ -46,7 +44,7 @@ The behavior of active objects is specified in QP™/C++ by means of @webref
|
||||
The QP™/C++ framework can run on @ref exa_native "bare-metal single-chip microcontrollers", completely replacing a traditional RTOS. The framework contains a selection of built-in real-time kernels, such as the cooperative @ref srs_qv "QV kernel", the preemptive non-blocking @ref srs_qk "QK kernel", and the preemptive, dual-mode, blocking @ref srs_qxk "QXK kernel". The QXK kernel <span class="highlight">provides all the features you might expect from a traditional <strong>RTOS kernel</strong></span> and has been specifically designed for mixing event-driven active objects with traditional blocking code, such as commercial middleware (TCP/IP stacks, UDP stacks, embedded file systems, etc.) or legacy software. @ref ports_native "Native QP ports" and ready-to-use @ref exa_native "examples" are provided for major @ref exa_ref_mcu "CPU families".
|
||||
|
||||
|
||||
@subsection over_eff Efficiency
|
||||
@subsection over_eff Size and Efficiency
|
||||
Even though QP™/C++ offers much higher level of abstraction than a traditional RTOS, it typically outperforms equivalent traditional RTOS offerings both in RAM/ROM footprint and in CPU efficiency. The specific measurements and results are reported in the following @webref{doc/AN_QP_Performance.pdf, Application Note: "QP Performance Tests and Results"}:
|
||||
|
||||
[![Application Note: "QP Performance Tests and Results"](an-qp_performance.png)](https://www.state-machine.com/doc/AN_QP_Performance.pdf)
|
||||
@ -57,7 +55,7 @@ The QP Framework is simple to get started, simple to use and simple to build. Th
|
||||
|
||||
|
||||
@subsection over_inter Interoperability
|
||||
QP™/C++ can also work with many traditional @ref exa_rtos "RTOSes" and @ref exa_os "general-purpose OSes" (such as Linux and Windows).
|
||||
QP™/C++ can also work with many traditional @ref exa_rtos "RTOSes" and @ref exa_os "general-purpose operating systems (GPOSes)" (such as Linux and Windows).
|
||||
|
||||
|
||||
@subsection over_trace Traceability
|
||||
|
@ -28,42 +28,46 @@
|
||||
@echo usage:
|
||||
@echo make
|
||||
@echo make -CHM
|
||||
@echo make ...
|
||||
@echo make -CERT
|
||||
@echo make -LATEX
|
||||
|
||||
:: Doxygen tool (adjust to your system) ......................................
|
||||
:: tools (adjust to your system)---------------------------------------------
|
||||
:: Doxygen tool
|
||||
@set DOXYGEN=doxygen
|
||||
|
||||
:: HTML Help tool (needed only with the -CHM option, (adjust to your system) .
|
||||
:: Simple complexity metrics tool (adjust to your system)
|
||||
@set METRICS=lizard -m -L500 -a10 -C20 -V
|
||||
|
||||
:: HTML Help tool (needed only with the -CHM option) .
|
||||
@set HHC="C:\tools\HTML Help Workshop\hhc.exe"
|
||||
|
||||
:: Simple complexity metrics tool (adjust to your system) ...................
|
||||
@set LIZARD=lizard
|
||||
:: QP directory .............................................................
|
||||
@set QP=..
|
||||
|
||||
:: QP/C++ directory ..........................................................
|
||||
@set QPCPP=..
|
||||
|
||||
:: HTML outut directory ......................................................
|
||||
@set HTML_OUT=%QPCPP%\html
|
||||
if "%1"=="-CERT" (
|
||||
@set HTML_OUT=%QPCPP%\cert-pack
|
||||
:: Outut directories ........................................................
|
||||
@set HTML_OUT=%QP%\html
|
||||
IF "%1"=="-CERT" (
|
||||
@set HTML_OUT=%QP%\cert-pack
|
||||
)
|
||||
@set LATEX_OUT=%QP%\latex
|
||||
|
||||
:: Generate metrics.dox file...
|
||||
@set METRICS_INP=%QPCPP%\include %QPCPP%\src -x %QPCPP%\src\qs\*
|
||||
:: Generate metrics.dox file-------------------------------------------------
|
||||
@set METRICS_INP=%QP%\include %QP%\src -x %QP%\src\qs\*
|
||||
@set METRICS_OUT=metrics.dox
|
||||
|
||||
@echo /** @defgroup metrics Code Metrics> %METRICS_OUT%
|
||||
@echo.>> %METRICS_OUT%
|
||||
@echo @code{.cpp}>> %METRICS_OUT%
|
||||
@echo QP/C++ Code Metrics >> %METRICS_OUT%
|
||||
@echo Code Metrics >> %METRICS_OUT%
|
||||
|
||||
%LIZARD% -m -L500 -a10 -C20 -V %METRICS_INP% >> %METRICS_OUT%
|
||||
%METRICS% %METRICS_INP% >> %METRICS_OUT%
|
||||
|
||||
@echo @endcode>> %METRICS_OUT%
|
||||
@echo */>> %METRICS_OUT%
|
||||
|
||||
:: Generate Doxygen Documentation...
|
||||
:: Generate Doxygen Documentation -------------------------------------------
|
||||
if "%1"=="-CHM" (
|
||||
|
||||
@echo Generating HTML...
|
||||
%DOXYGEN% Doxyfile-CHM
|
||||
|
||||
@ -79,7 +83,24 @@ if "%1"=="-CHM" (
|
||||
@rmdir /S /Q tmp
|
||||
@echo CHM file generated
|
||||
|
||||
) else if "%1"=="-LATEX" (
|
||||
|
||||
@echo.
|
||||
@echo Cleanup...
|
||||
rmdir /S /Q %LATEX_OUT%
|
||||
|
||||
@echo Generating LATEX...
|
||||
%DOXYGEN% Doxyfile-LATEX
|
||||
|
||||
@echo Adding custom files...
|
||||
xcopy img %LATEX_OUT%\img\
|
||||
|
||||
@echo TODO...
|
||||
@echo cd ..\latex
|
||||
@echo make.bat
|
||||
|
||||
) else (
|
||||
|
||||
@echo.
|
||||
@echo Cleanup...
|
||||
rmdir /S /Q %HTML_OUT%
|
||||
@ -87,7 +108,7 @@ if "%1"=="-CHM" (
|
||||
@echo Generating HTML...
|
||||
%DOXYGEN% Doxyfile%1
|
||||
|
||||
@echo Adding custom images...
|
||||
@echo Adding custom files...
|
||||
xcopy img %HTML_OUT%\img\
|
||||
xcopy /Y ..\..\ql-doxygen\jquery.js %HTML_OUT%
|
||||
rem @qclean %HTML_OUT%
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @defgroup metrics Code Metrics
|
||||
|
||||
@code{.cpp}
|
||||
QP/C++ Code Metrics
|
||||
Code Metrics
|
||||
================================================
|
||||
NLOC CCN token PARAM length location
|
||||
------------------------------------------------
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,19 +1,5 @@
|
||||
//$file${include::qstamp.cpp} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
//
|
||||
// Model: qpcpp.qm
|
||||
// File: ${include::qstamp.cpp}
|
||||
//
|
||||
// This code has been generated by QM 5.2.2 <www.state-machine.com/qm>.
|
||||
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
|
||||
//
|
||||
// This code is covered by the following QP license:
|
||||
// License # : LicenseRef-QL-dual
|
||||
// Issued to : Any user of the QP/C++ real-time embedded framework
|
||||
// Framework(s) : qpcpp
|
||||
// Support ends : 2023-12-31
|
||||
// License scope:
|
||||
//
|
||||
// Copyright (C) 2005 Quantum Leaps, LLC <state-machine.com>.
|
||||
// QP/C++ Real-Time Embedded Framework (RTEF)
|
||||
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
|
||||
//
|
||||
@ -32,25 +18,17 @@
|
||||
// Plagiarizing this software to sidestep the license obligations is illegal.
|
||||
//
|
||||
// Contact information:
|
||||
// <www.state-machine.com/licensing>
|
||||
// <www.state-machine.com>
|
||||
// <info@state-machine.com>
|
||||
//
|
||||
//$endhead${include::qstamp.cpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
//! @file
|
||||
//! @brief Application build time-stamp
|
||||
//! @note
|
||||
//! This module needs to be re-compiled in every new software build. To achive
|
||||
//! this, it is recommended to delete the object file (qstamp.o or qstamp.obj)
|
||||
//! in the build directory before each build. (Most development tools allow
|
||||
//! you to specify a pre-build action, which is the ideal place to delete
|
||||
//! the qstamp object file.)
|
||||
//! @deprecated
|
||||
//! File `include/qstamp.cpp` is kept only for backwards compatibility.
|
||||
//! Instead, please use file `src/qs/qstamp.cpp`.
|
||||
|
||||
#include "qstamp.hpp"
|
||||
|
||||
namespace QP {
|
||||
//! the calendar date of the last translation of the form: "Mmm dd yyyy"
|
||||
char const BUILD_DATE[12] = __DATE__;
|
||||
|
||||
//! the time of the last translation of the form: "hh:mm:ss"
|
||||
char const BUILD_TIME[9] = __TIME__;
|
||||
} // namespace QP
|
||||
|
42
qpcpp.qm
42
qpcpp.qm
@ -13388,27 +13388,6 @@ extern char const BUILD_TIME[9];
|
||||
|
||||
#endif // QP_INC_QSTAMP_HPP_</text>
|
||||
</file>
|
||||
<!--${include::qstamp.cpp}-->
|
||||
<file name="qstamp.cpp">
|
||||
<text>//! @file
|
||||
//! @brief Application build time-stamp
|
||||
//! @note
|
||||
//! This module needs to be re-compiled in every new software build. To achive
|
||||
//! this, it is recommended to delete the object file (qstamp.o or qstamp.obj)
|
||||
//! in the build directory before each build. (Most development tools allow
|
||||
//! you to specify a pre-build action, which is the ideal place to delete
|
||||
//! the qstamp object file.)
|
||||
|
||||
#include "qstamp.hpp"
|
||||
|
||||
namespace QP {
|
||||
//! the calendar date of the last translation of the form: "Mmm dd yyyy"
|
||||
char const BUILD_DATE[12] = __DATE__;
|
||||
|
||||
//! the time of the last translation of the form: "hh:mm:ss"
|
||||
char const BUILD_TIME[9] = __TIME__;
|
||||
} // namespace QP</text>
|
||||
</file>
|
||||
</directory>
|
||||
<!--${src}-->
|
||||
<directory name="src">
|
||||
@ -14819,6 +14798,27 @@ $define ${QUTest-stub}
|
||||
|
||||
#endif // def Q_UTEST</text>
|
||||
</file>
|
||||
<!--${src::qs::qstamp.cpp}-->
|
||||
<file name="qstamp.cpp">
|
||||
<text>//! @file
|
||||
//! @brief Application build time-stamp
|
||||
//! @note
|
||||
//! This module needs to be re-compiled in every new software build. To achive
|
||||
//! this, it is recommended to delete the object file (qstamp.o or qstamp.obj)
|
||||
//! in the build directory before each build. (Most development tools allow
|
||||
//! you to specify a pre-build action, which is the ideal place to delete
|
||||
//! the qstamp object file.)
|
||||
|
||||
#include "qstamp.hpp"
|
||||
|
||||
namespace QP {
|
||||
//! the calendar date of the last translation of the form: "Mmm dd yyyy"
|
||||
char const BUILD_DATE[12] = __DATE__;
|
||||
|
||||
//! the time of the last translation of the form: "hh:mm:ss"
|
||||
char const BUILD_TIME[9] = __TIME__;
|
||||
} // namespace QP</text>
|
||||
</file>
|
||||
</directory>
|
||||
</directory>
|
||||
</model>
|
||||
|
56
src/qs/qstamp.cpp
Normal file
56
src/qs/qstamp.cpp
Normal file
@ -0,0 +1,56 @@
|
||||
//$file${src::qs::qstamp.cpp} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
//
|
||||
// Model: qpcpp.qm
|
||||
// File: ${src::qs::qstamp.cpp}
|
||||
//
|
||||
// This code has been generated by QM 5.2.2 <www.state-machine.com/qm>.
|
||||
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
|
||||
//
|
||||
// This code is covered by the following QP license:
|
||||
// License # : LicenseRef-QL-dual
|
||||
// Issued to : Any user of the QP/C++ real-time embedded framework
|
||||
// Framework(s) : qpcpp
|
||||
// Support ends : 2023-12-31
|
||||
// License scope:
|
||||
//
|
||||
// Copyright (C) 2005 Quantum Leaps, LLC <state-machine.com>.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
|
||||
//
|
||||
// This software is dual-licensed under the terms of the open source GNU
|
||||
// General Public License version 3 (or any later version), or alternatively,
|
||||
// under the terms of one of the closed source Quantum Leaps commercial
|
||||
// licenses.
|
||||
//
|
||||
// The terms of the open source GNU General Public License version 3
|
||||
// can be found at: <www.gnu.org/licenses/gpl-3.0>
|
||||
//
|
||||
// The terms of the closed source Quantum Leaps commercial licenses
|
||||
// can be found at: <www.state-machine.com/licensing>
|
||||
//
|
||||
// Redistributions in source code must retain this top-level comment block.
|
||||
// Plagiarizing this software to sidestep the license obligations is illegal.
|
||||
//
|
||||
// Contact information:
|
||||
// <www.state-machine.com/licensing>
|
||||
// <info@state-machine.com>
|
||||
//
|
||||
//$endhead${src::qs::qstamp.cpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
//! @file
|
||||
//! @brief Application build time-stamp
|
||||
//! @note
|
||||
//! This module needs to be re-compiled in every new software build. To achive
|
||||
//! this, it is recommended to delete the object file (qstamp.o or qstamp.obj)
|
||||
//! in the build directory before each build. (Most development tools allow
|
||||
//! you to specify a pre-build action, which is the ideal place to delete
|
||||
//! the qstamp object file.)
|
||||
|
||||
#include "qstamp.hpp"
|
||||
|
||||
namespace QP {
|
||||
//! the calendar date of the last translation of the form: "Mmm dd yyyy"
|
||||
char const BUILD_DATE[12] = __DATE__;
|
||||
|
||||
//! the time of the last translation of the form: "hh:mm:ss"
|
||||
char const BUILD_TIME[9] = __TIME__;
|
||||
} // namespace QP
|
Loading…
x
Reference in New Issue
Block a user