QP/C++  7.2.2
Real-Time Embedded Framework
No Matches
To check what's new in QP™/C++, please see QP/C++ Revision History. You can also get the latest QP™/C++ code, with the recent enhancements and bug fixes, from the GitHub QP™/C++ repository.

What is it?

QP™/C++ Real-Time Embedded Framework (RTEF) is a lightweight implementation of the 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 Hierarchical State Machines with which to specify the behavior of Active Objects [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).

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 collectively known as the 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, bidirectionally traceable implementation of 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;
  • to provide the right abstractions for applying modern techniques like visual modeling, hierarchical state machines, and automatic code generation;
  • to bridge the semantic gap between the higher level modeling concepts (such as UML) and the traditional programming languages like C or C++.

What's special about it?

The QP™/C++ Real-Time Embedded Framework (RTEF) provides a modern, reusable architecture of embedded applications, which combines the model of concurrency, known as active objects (actors) with 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.

The most unique aspect of the QP™/C++ RTEF is its tiny size and efficiency suitable for embedded microcontrollers, such as MCUs based on ARM Cortex-M.

Object Orientation

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 classes and only classes can have state machines associated with them.

Hierarchical State Machines

The behavior of active objects is specified in QP™/C++ by means of hierarchical state machines (UML statecharts). The framework supports manual coding of UML state machines in C++ as well as fully automatic code generation by means of the free graphical QM™ model-based design (MBD) tool.

Built-in Kernels

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, dual-mode, blocking QXK kernel. The QXK kernel provides all the features you might expect from a traditional RTOS kernel 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. Native QP ports and ready-to-use examples are provided for major CPU families.

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 Application Note: "QP Performance Tests and Results":


The QP Framework is simple to get started, simple to use and simple to build. The numerous provided examples come with projects for typical embedded toolchains (e.g., GNU, ARM, IAR, etc.). The framework does not impose any proprietary build or configuring procedures or tooling, just simple makefiles and native projects for the demonstrated toolchains. While these are possibly inadequate for really complex projects, experience shows that bigger teams have their own DevOps (e.g., CI/CD) and imposing a particular process is typically counterproductive.


QP™/C++ can also work with many traditional RTOSes and general-purpose operating systems (GPOSes) (such as Linux and Windows).


QP™/C++ offers unprecedented, bidirectional traceability among all work artifacts, which gives teams full visibility from requirements through architecture, design, source code, tests, and back again.

Popularity & Maturity

With 20 years of continuous development, over 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.

Widespread Use

The QP™ real-time embedded frameworks address high-reliability applications across a 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, Practical Statecharts in C/C++ provide a detailed design study of the QP™ frameworks and explain the related concepts.

How is it licensed?

QP™/C++ is licensed under the sustainable 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 licensed commercially, in which case you don't use any open source license and you do not violate your policy.

Open Source Projects

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 GPL version 3 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.

Closed Source Projects

If you are developing and distributing traditional closed source applications, you can purchase one of 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.

How to get help?

Please post any technical questions to the Free Support Forum 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.

Training and consulting services are also available from Quantum Leaps. Please refer to the Contact web-page for more information.

The features of this online help and tips for using it are described in Section Using Online Help.

Contact Information

Getting Started