Introduction to the QP/C Project
QP/C, short for Quantum Platform in C, is an open-source real-time embedded framework designed to build modern embedded software using a system of asynchronous, event-driven active objects, also referred to as actors. This framework is part of a family of Quantum Leaps products, which also includes QP/C++ for those preferring to implement their projects in C++.
Getting Started with QP/C
For those new to QP/C, the recommended way to get started is by downloading the QP-bundle. This bundle includes not only QP/C itself but also essential tools like the QM modeling tool and the QTools collection. By obtaining this bundle, users have immediate access to all the components, tools, and examples necessary to dive into their development projects.
To help users get up to speed, a range of resources are available:
- A "QP/C Tutorial" that walks through progressively advanced example applications.
- A helpful video demonstrating how to download, install, and get started with QP.
- An application note containing a tutorial for building a simple "Blinky" application.
Licenses Available
QP/C employs a dual licensing model to accommodate various user needs:
- Open-source Licensing under the GNU General Public License (GPLv3), which mandates that any modifications to the original code must also be open-source.
- Closed-source Licensing which allows for retaining proprietary status. This option is ideal for companies with policies limiting open-source software usage.
The QS/C software tracing component is available solely through closed-source licensing, making it necessary for users interested in this feature to obtain a commercial license.
Unique Features of QP/C
Safer Concurrency Model
The QP framework uses the Active Object model, which offers a safer alternative to traditional shared state concurrency. This model emphasizes:
- Isolated data within Active Objects' threads, encapsulating private data to prevent unintentional sharing.
- Asynchronous communication through events, enabling threads to function independently without blocking.
- Event-loop-based processing for threads, efficiently handling events without concurrency issues.
This architecture lends itself well to the use of Hierarchical State Machines (HSM), allowing for effective modeling and code generation in even the most constrained, deeply embedded systems.
Hierarchical State Machines and Real-Time Kernels
Hierarchical State Machines in QP/C are implemented in two ways: through manual coding or automatic code generation using the QM modeling tool. The QP/C framework supports operation without any traditional RTOS, featuring built-in kernels such as non-preemptive QV, preemptive non-blocking QK, and the dual-mode QXK kernel, which accommodates diverse real-time application needs. Additionally, QP/C can integrate with traditional RTOS environments like ThreadX, FreeRTOS, and others, extending its flexibility.
Popularity and Documentation
QP/C has been in development for over twenty years with a large user base, including over 400 commercial licensees worldwide. This long-standing reputation underpins its extensive documentation, available both online for the latest version and offline for specific releases.
Support and Contribution
Support is available through a free support forum, bug reporting, and feature request avenue. Interested parties can further engage by visiting Quantum Leaps' website or contributing to the project by showing appreciation through GitHub.
With its strong, well-documented foundation and comprehensive community support, QP/C continues to be a valuable framework for developers exploring embedded real-time systems.