To check what's new in QP™/C++, please see @ref history "QP/C++ Revision History". You can also get the latest **QP™/C code**, with the recent enhancements and bug fixes, from the <a class="extern" target="_blank" href="https://github.com/QuantumLeaps/qpcpp"><strong>GitHub QP/C++ repository</strong></a>.
@webref{products/qp, <strong>QP™/C++ (Quantum Platform in C)</strong>} is a lightweight @webref{rtef, Real-Time Embedded Framework (RTEF)} for building modern, responsive and modular real-time embedded applications as systems of asynchronous event-driven @webref{active-object, active objects} (<a href="https://en.wikipedia.org/wiki/Actor_model">actors</a>). The QP™/C++ RTEF is a member of a @webref{products/qp, larger family of real-time embedded frameworks (RTEFs)} consisting of QP™/C and QP™/C++ frameworks, which are strictly quality controlled, thoroughly documented, and available under @ref licensing "dual licensing model".
The behavior of active objects is specified in QP™/C++ by means of @webref{fsm/#HSM, <strong>hierarchical state machines</strong>} (UML statecharts). The framework supports @ref sm "manual coding of UML state machines in C" as well as automatic code generation by means of the free @webref{products/qm, <strong>QM™ model-based design tool</strong>}.
To use QP™/C++ effectively, you need to understand the @webref{category/concepts, <strong>key concepts</strong>} that underline the architecture of the framework and your applications based on the framework.
The main goals of the QP™/C++ framework are:
- to provide a reusable event-driven **architecture** based on @webref{active-object, active objects (actors)}, which is inherently **safer**, more extensible, and easier to understand than the usual *shared-state concurrency* based on a traditional Real-Time Operating System (RTOS).
- to provide a simple-to-use coding techniques for @webref{fsm/#HSM, hierarchical state machines}, with which to implement the behavior of active objects.
- to provide efficient and thread-safe asynchronous mechanisms for active objects to communicate, such as direct event passing and publish-subscribe.
- to provide event-driven timing services (time events).
- to provide a selection of built-in real-time kernels to run the QP applications, such as the cooperative @ref qv "QV kernel", the preemptive non-blocking @ref qk "QK kernel", and the preemptive blocking @ref qxk "QXK kernel".
- to provide testing support for applications based on software tracing (@ref qs "Q-Spy").
- to provide portability layer and ready-to-use ports to @ref ports_rtos "3rd-party RTOSes" and general purpose operating systems such as @ref posix "Linux" and @ref win32 "Windows".
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.
QP™/C++ is fundamentally an **object-oriented** framework, which means that the framework itself and your applications derived from the framework are fundamentally composed of <a href="https://en.wikipedia.org/wiki/Class_(computer_programming)" target="_blank" class="extern">classes</a> and only classes can have @ref sm "state machines" associated with them.
The most unique characteristic of the QP™/C++ framework is its very small footprint, especially in RAM. In this respect, QP™/C++ requires less resources than even the smallest conventional Real-Time Operating System (RTOS) kernel. At the same time, QP gives you a much higher level of abstraction than a conventional RTOS. With QP, you work at the level of active objects, state machines and events, as opposed to "naked" threads of an RTOS.
The behavior of active objects is specified in QP™/C++ by means of @webref{fsm/#HSM, hierarchical state machines (UML statecharts)}. The framework supports @ref sm "manual coding of UML state machines in C+++" (or C++ in case of QP™/C++) as well as fully **automatic code generation** by means of the free graphical @webref{products/qm, QM™ model-based design (MBD) tool}.
State machines can be an incredibly powerful technique, but they require an event-driven **infrastructure** (framework) that provides, at a minimum: a run-to-completion (RTC) execution context for each state machine, queuing of events, and event-based timing services. This is really the pivotal point. Without an event-driven framework (like QP™/C++), state machines are like @webref{rtef, cars without an infrastructure of roads}.
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 qv "QV kernel", the preemptive non-blocking @ref qk "QK kernel", and the preemptive, dual-mode, blocking @ref 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".
With 20 years of continuous development, over @webref{customers#Customers, 350 commercial licensees}, and many times more open source users worldwide, the QP™ frameworks are the most popular such offering on the market. They power countless electronic products ranging from implantable medical devices to complex weapon systems.
@subsection use Widespread Use
The QP™ real-time embedded frameworks address high-reliability applications across a @webref{customers#Markets, wide variety of markets}, such as medical, consumer, IoT, defense, robotics, industrial, communication, transportation, semiconductor IP, and many others. In each of these application areas, the elegant software architecture and modern design philosophy of QP™ have distinct advantages.
The two editions of the book, @webref{psicc2, <strong>Practical Statecharts in C/C++</strong>} provide a detailed design study of the QP™ frameworks and explain the related concepts.
QP™/C++ is licensed under the sustainable @webref{licensing, dual licensing model}, in which both the open source software distribution mechanism and traditional closed source software distribution models are combined.
If your company has a policy forbidding open source in your product, all QP frameworks can be @webref{licensing#Commercial, licensed commercially}, in which case you don't use any open source license and you do not violate your policy.
If you are developing and distributing **open source** applications under the GNU General Public License (GPL), as published by the Free Software Foundation, then you are free to use the Quantum Leaps software under the <a class="extern" target="_blank" href="https://www.gnu.org/copyleft/gpl.html">GPL version 3</a> of the License, or (at your option) any later version. Please note that GPL requires that all modifications to the original code as well as your application code (Derivative Works as defined in the Copyright Law) must also be released under the terms of the GPL open source license.
If you are developing and distributing traditional **closed source** applications, you can purchase one of @webref{licensing/#Commercial, Quantum Leaps commercial licenses}, which are specifically designed for users interested in retaining the proprietary status of their code. All Quantum Leaps commercial licenses expressly supersede the GPL open source license. This means that when you license Quantum Leaps software under a commercial license, you specifically do not use the software under the open source license and therefore you are not subject to any of its terms.
Please post any **technical questions** to the <a class="extern" target="_blank" href="https://sourceforge.net/p/qpc/discussion/668726"><strong>Free Support Forum</strong></a> hosted on SourceForge.net. Posts to this forum benefit the whole community and are typically answered the same day.
Direct **Commercial Support** is available to the commercial licensees. Every commercial license includes one year of Technical Support for the licensed software. The support term can be extended annually.