2021-11-30 16:38:06 -05:00
|
|
|
![QP Framework](doxygen/images/qp_banner.jpg)
|
2017-07-17 17:08:59 -04:00
|
|
|
|
2017-08-04 16:27:55 -04:00
|
|
|
> **NOTE:** If your company has a policy forbidding open source in your
|
|
|
|
product, all QP frameworks can be
|
2019-03-06 20:06:45 -05:00
|
|
|
[licensed commercially](https://www.state-machine.com/licensing),
|
2017-08-04 16:27:55 -04:00
|
|
|
in which case you don't use any open source license and you do not violate
|
|
|
|
your policy.
|
2017-07-28 22:53:23 -04:00
|
|
|
|
2019-12-31 15:55:08 -05:00
|
|
|
---------------------------------------------------------------------------
|
2017-07-18 12:59:03 -04:00
|
|
|
# What's New?
|
2019-03-06 20:06:45 -05:00
|
|
|
View QP/C Revision History at: https://www.state-machine.com/qpc/history.html
|
2017-07-17 17:08:59 -04:00
|
|
|
|
2019-12-31 15:55:08 -05:00
|
|
|
|
|
|
|
---------------------------------------------------------------------------
|
|
|
|
# Documentation
|
|
|
|
The offline HTML documentation for **this** particular version of QP/C
|
|
|
|
is located in the folder html/. To view the offline documentation, open
|
|
|
|
the file html/index.html in your web browser.
|
|
|
|
|
|
|
|
The online HTML documention for the **latest** version of QP/C is located
|
|
|
|
at: https://www.state-machine.com/qpc/
|
|
|
|
|
|
|
|
|
2017-07-20 13:05:08 -04:00
|
|
|
---------------------------------------------------------------------------
|
2017-07-18 12:59:03 -04:00
|
|
|
# About QP/C
|
2019-03-06 20:06:45 -05:00
|
|
|
QP/C (Quantum Platform in C) is a lightweight, open source
|
|
|
|
[Real-Time Embedded Framework (RTEF)][RTEF] for building modern embedded
|
|
|
|
software as systems of asynchronous, event-driven [active objects][Active]
|
|
|
|
(actors). The [QP/C] framework is a member of a larger [QP] family
|
|
|
|
consisting of [QP/C], [QP/C++], and [QP-nano] frameworks, which are all
|
|
|
|
strictly quality controlled, thoroughly documented, and [commercially
|
|
|
|
licensable][Lic].
|
2017-07-20 13:05:08 -04:00
|
|
|
|
|
|
|
## Safer Model of Concurrency
|
2019-03-06 20:06:45 -05:00
|
|
|
The [QP] framework family is based on the [Active Object][Active] (**actor**)
|
2017-07-20 13:05:08 -04:00
|
|
|
design pattern, which inherently supports and automatically enforces the
|
|
|
|
following best practices of concurrent programming:
|
|
|
|
|
|
|
|
- Keep data isolated and bound to active objects' threads. Threads should
|
|
|
|
hide (**encapsulate**) their private data and other resources, and not
|
|
|
|
share them with the rest of the system.
|
|
|
|
|
|
|
|
- Communicate among active object threads **asynchronously** via event
|
|
|
|
objects. Using asynchronous events keeps the threads running truly
|
|
|
|
independently, **without blocking** on each other.
|
|
|
|
|
|
|
|
- Active object threads should spend their lifetime responding to incoming
|
|
|
|
events, so their mainline should consist of an **event-loop** that handles
|
|
|
|
events one at a time (to completion), thus avoiding any concurrency hazards
|
|
|
|
within an active object thread itself.
|
|
|
|
|
|
|
|
This architecture is generally **safer**, more responsive and easier to
|
|
|
|
understand and maintain than the shared-state concurrency of a conventional
|
2019-10-27 11:57:33 -04:00
|
|
|
RTOS. It also provides higher level of abstraction and the *correct*
|
2017-07-20 13:05:08 -04:00
|
|
|
abstractions to effectively apply **modeling** and **code generation** to
|
|
|
|
deeply embedded real-time systems.
|
|
|
|
|
2017-07-18 12:59:03 -04:00
|
|
|
## Hierarchical State Machines
|
|
|
|
The behavior of active objects is specified in QP/C by means of
|
2019-03-06 20:06:45 -05:00
|
|
|
[Hierarchical State Machines][HSM] (UML statecharts). The framework
|
2017-07-20 13:05:08 -04:00
|
|
|
supports manual coding of UML state machines in C as well as automatic
|
2019-03-06 20:06:45 -05:00
|
|
|
**code generation** by means of the free [QM modeling tool][QM].
|
2017-07-20 13:05:08 -04:00
|
|
|
|
2017-07-18 12:59:03 -04:00
|
|
|
## Built-in Real-Time Kernels
|
2017-07-20 13:05:08 -04:00
|
|
|
The QP/C framework can run on 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 QV kernel, the
|
|
|
|
preemptive non-blocking QK kernel, and the preemptive, blocking QXK kernel
|
|
|
|
that provides all the features you might expect from a traditional RTOS.
|
|
|
|
Native QP ports and ready-to-use examples are provided for major CPUs, such
|
|
|
|
as ARM Cortex-M (M0/M0+/M3/M4/M7).
|
|
|
|
|
|
|
|
## Traditional RTOS/OS
|
2019-03-06 20:06:45 -05:00
|
|
|
QP/C can also work with a traditional RTOS, such as ThreadX, FreeRTOS, embOS,
|
2017-07-20 13:05:08 -04:00
|
|
|
uC/OS-II and TI-RTOS, as well as with (embedded) Linux (POSIX) and Windows.
|
|
|
|
|
2017-07-18 12:59:03 -04:00
|
|
|
## Maturity
|
2017-07-20 13:05:08 -04:00
|
|
|
With 60,000 downloads a year, the [QP] family is the most popular such
|
|
|
|
solution on the embedded software market. It provides a modern, reusable
|
|
|
|
architecture for embedded applications, which combines the active-object
|
2017-07-18 12:59:03 -04:00
|
|
|
model of concurrency with hierarchical state machines.
|
|
|
|
|
2017-07-20 13:05:08 -04:00
|
|
|
---------------------------------------------------------------------------
|
2017-07-18 12:59:03 -04:00
|
|
|
# Getting Started with QP/C
|
2020-01-06 19:30:11 -05:00
|
|
|
The [QP/C Reference Manual](https://www.state-machine.com/qpc/) provides
|
|
|
|
instructions on how to download, install, and get started with QP/C quickly.
|
|
|
|
|
|
|
|
The [AppNote: "Getting Started with QP/C"][AN] contains also a tutorial,
|
|
|
|
in which you build a simple "Blinky" application.
|
2017-07-18 12:59:03 -04:00
|
|
|
|
|
|
|
|
2017-07-28 22:53:23 -04:00
|
|
|
---------------------------------------------------------------------------
|
|
|
|
# QP/C Licensing
|
2019-03-06 20:06:45 -05:00
|
|
|
QP/C is licensed under the increasingly popular [dual licensing model][Lic],
|
|
|
|
in which both the open source software distribution mechanism and
|
|
|
|
traditional closed source software distribution models are combined.
|
2017-08-04 16:27:55 -04:00
|
|
|
|
|
|
|
> **NOTE:** If your company has a policy forbidding open source in your
|
2019-03-06 20:06:45 -05:00
|
|
|
product, all QP frameworks can be [licensed commercially][Lic], in which case
|
2017-08-04 16:27:55 -04:00
|
|
|
you don't use any open source license and you do not violate your policy.
|
2017-07-28 22:53:23 -04:00
|
|
|
|
2017-07-20 13:05:08 -04:00
|
|
|
---------------------------------------------------------------------------
|
2017-07-18 12:59:03 -04:00
|
|
|
# QP/C Documentation
|
2019-03-06 20:06:45 -05:00
|
|
|
The **QP/C Manual** is located online at: https://www.state-machine.com/qpc
|
2017-07-18 12:59:03 -04:00
|
|
|
|
2017-07-20 13:05:08 -04:00
|
|
|
---------------------------------------------------------------------------
|
|
|
|
# How to get help?
|
|
|
|
- [Free Support Forum](https://sourceforge.net/p/qpc/discussion/668726)
|
|
|
|
- [Bug Reports](https://sourceforge.net/p/qpc/bugs/)
|
|
|
|
- [Feature Requests](https://sourceforge.net/p/qpc/feature-requests/)
|
2019-03-06 20:06:45 -05:00
|
|
|
- [Quantum Leaps website](https://www.state-machine.com)
|
|
|
|
- [Quantum Leaps licensing](https://www.state-machine.com/licensing)
|
2017-07-18 12:59:03 -04:00
|
|
|
- [info@state-machine.com](mailto:info@state-machine.com)
|
|
|
|
|
2021-11-30 16:38:06 -05:00
|
|
|
[RTEF]: <https://www.state-machine.com/rtef>
|
|
|
|
[QP]: <https://www.state-machine.com/products/qp>
|
2019-03-06 20:06:45 -05:00
|
|
|
[QP/C]: <https://www.state-machine.com/qpc>
|
|
|
|
[QP/C++]: <https://www.state-machine.com/qpcpp>
|
2021-11-30 16:38:06 -05:00
|
|
|
[QM]: <https://www.state-machine.com/products/qm>
|
|
|
|
[Active]: <https://www.state-machine.com/active-object>
|
|
|
|
[HSM]: <https://www.state-machine.com/fsm#HSM>
|
2019-03-06 20:06:45 -05:00
|
|
|
[Lic]: <https://www.state-machine.com/licensing>
|
2020-01-06 19:30:11 -05:00
|
|
|
[AN]: <https://www.state-machine.com/doc/AN_Getting_Started_with_QPC.pdf>
|