QP/C++  8.0.2
Real-Time Embedded Framework
Loading...
Searching...
No Matches
Overview

Remarks
To check what's new in QP/C++, please see QP/C++ Revision History. The recommended way of obtaining QP/C++ is by downloading the official QP-bundle. The latest QP/C++ code, with the most recent enhancements and bug fixes, is available in the GitHub QP/C++ repository.

What is it?

QP/C++ real-time embedded framework (RTEF) is a lightweight implementation of the Active Object (a.k.a. Actor) model of computation specifically tailored for deeply embedded real-time systems, such as microcontrollers (MCUs). QP/C++ 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, real-time fashion. Additionally, QP/C++ Framework supports Hierarchical State Machines with which to specify the behavior of Active Objects [UML 2.5], [Sutter:10], [ROOM:94]. The QP/C++ Framework can be viewed as a modern, asynchronous, and truly event driven real-time operating system.

What does it do?

The QP/C++ RTEF provides a modern, reusable, embedded software architecture, which combines the model of concurrency, known as Active Objects (Actors) with Hierarchical State Machines. The QP/C++ RTEF provides the following benefits:

  • Modern, event-driven, asynchronous, and non-blocking architecture based on the best practices of concurrent programming collectively known as the Active Object (a.k.a. Actor) model of computation;
  • Extensible and responsive architecture (easier to analyze for real-time) by avoiding hard-coded blocking calls;
  • Inherently safer concurrency architecture than the traditional "shared-state concurrency" approach of a traditional RTOS by replacing direct resource sharing with event exchanges.
  • Higher-level of abstraction closer to the problem domain than the "naked" RTOS threads
  • The right abstractions for applying modern techniques like hierarchical state machines, visual modeling, and automatic code generation (see QM Graphical Modeling Tool↑);
  • Efficient, readable implementation of Hierarchical State Machines↑ for specifying the internal behavior of Active Objects;
  • Built-in, configurable and flexible Software Tracing for troubleshooting (debugging), testing, monitoring, and optimizing embedded applications with minimal impact on the real-time performance.

What's special about it?

QP/C++ offers numerous advantages over the traditional "shared state concurrency" based on a conventional RTOS.

Functional Safety

QP frameworks are a natural fit for safety-related applications because they implement a number of best practices highly recommended by the functional safety standards, such as IEC 61508 for electrical systems, as well as related standards IEC 62304/FDA510(k) for medical devices, IEC 60335 for household appliances, ISO 26262 for road vehicles, DO-178B/C for airborne systems, etc.

  • Structured methods (IEC 61508-7-C.2.1)
  • Semi-formal methods, such as Hierarchical State Machines (IEC 61508-7-Table.B.7)
  • Defensive programming, including Failure Assertion Programming (IEC 61508-7-C.2.5)
  • Modular approach (IEC 61508-7-Table.B.9)
  • Design and coding standards, including safe subsets of C or C++ (IEC 61508-7-C.2.6)
  • Structured programming (IEC 61508-7-C.2.7)
  • Traceability between requirements and software design (IEC 61508-7-C2.11)
  • Computer-aided design tools (IEC 61508-7-B.3.5)

QP Framework Editions

QP real-time embedded frameworks form a family consisting of the following QP editions:

QP Edition Programming Language API Compatibility Safety Functions Certification Artifacts Licensing
QP/C C (C11) Same API for QP/C and SafeQP/C Selected assertions Requirements, Architecture & Design Specifications Dual (GPL and Commercial)↑
SafeQP/C C (C11) Same API for QP/C and SafeQP/C Comprehensive Complete Certification Kit Commercial only↑
QP/C++ C++ (C++17) Same API for QP/C++ and SafeQP/C++ Selected assertions Requirements, Architecture & Design Specifications Dual (GPL and Commercial)↑
SafeQP/C++ C++ (C++17) Same API for QP/C++ and SafeQP/C++ Comprehensive Complete Certification Kit Commercial only↑
Note
All QP editions are accompanied by the Requirements Specification, Architecture Specification, and Design Specification, which are the best source of information about the underlying concepts, functionality, architecture, and design of the QP Frameworks and the QP Applications based on the framework. The SafeQP frameworks additionally contain safety features required to achieve the higher safety integrity levels and come with much more extensive Certification Kits.

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 non-preemptive 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/C++ ports and ready-to-use examples are provided for major embedded CPU families, such as ARM Cortex-M, ARM Cortex-R, and MSP430.

3rd-Party Kernels

QP/C++ can also work with many traditional Real-Time Operating Systems (RTOSes) and General-Purpose OSes (GPOSes) (such as Linux (POSIX) and Windows).

Size and Efficiency

Even though QP/C++ offers higher level of abstraction than a traditional RTOS, when combined with the native built-in kernels it typically outperforms equivalent traditional RTOS applications both in RAM/ROM footprint and in CPU efficiency. The specific measurements and results are reported in the Application Note: "QP/C++ Performance Tests and Results"↑:

Software Tracing

Software tracing is a method of capturing and recording information about the execution of a software program. Software tracing is particularly effective and powerful in combination with the event-driven Active Object model of computation. Due to the inversion of control, a running application built of Active Objects is a highly structured affair where all important system interactions funnel through the underlying event-driven framework. This arrangement offers a unique opportunity for applying Software Tracing in a framework like QP.

Documentation Traceability

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 400 commercial licensees↑, and many times more open source users worldwide, QP Frameworks are the most popular such offering on the market. They power countless electronic products across a wide variety of markets↑, such as medical, consumer, IoT, defense, robotics, industrial, communication, transportation, semiconductor IP, and many others.

Books

The two editions of the book, Practical Statecharts in C/C++ provide a detailed design study of the QP/C and QP/C++ frameworks and explain the related concepts.

Practical UML Statecharts in C/C++, 2nd Edition

Practical Statecharts in C/C++, 1st Edition

How is it licensed?

The QP/C and QP/C++ frameworks are licensed under the dual licensing model↑, in which both the open source software distribution mechanism and traditional closed source software distribution models are combined.

Note
If your company has a policy forbidding open source in your product, the QP/C and QP/C++ 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.

Note
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.

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

Contact Information