QP Framework is a lightweight implementation of the Active Object model of computation specifically tailored for real-time embedded (RTE) systems. QP is both an event-driven software infrastructure for building applications consisting of Active Objects (Actors) and a runtime environment for executing the Active Objects in a safe and 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].
The main goals of the QP Framework are:
The following block diagram shows the context of use and the high-level functional decomposition of a system built with the QP Framework.
[1]
QP Application consists of event-driven Active Objects that collectively deliver the intended functionality.
[2]
QP Framework:
[3a]
Real-Time Kernel provides scheduling and execution context for the Active Objects. This could be one of the kernels built-into QP Frameworks (QV, QK, or QXK); or
[3b]
Alternatively, QP Framework can run on top of a 3-rd party RTOS kernel; or
[3c]
Alternatively, QP Framework can run on top of a General-Purpose OS (e.g., Linux/POSIX or Windows).
[4]
Target System consists of the hardware and basic software (Board Support Package).
Like most event-driven systems, QP Framework is based on inversion of control, which means that the control of code execution resides in the QP Framework rather than the QP Application based on QP. Specifically, to handle events, QP Framework calls the QP Application, and not the other way around. Of course, QP Applications can also call services provided in QP Framework, but the main flow of control always begins with the QP Framework.
That inversion of control gives the event-driven infrastructure (QP) all the defining characteristics of a framework rather than a library.
The main difference between a framework and a library is that when you use a library, such as a conventional RTOS, you write the main body of each thread, and you call the library code that you want to reuse (e.g., a semaphore). When you use a framework, such as QP, you reuse the main body and write the code it calls (inversion of control).
The mechanism for deriving an application from a software framework, such as QP, is by inheriting the base classes provided by the framework and specializing them for the application at hand. (See also the extensibility characteristics of a framework enumerated above.)
The use case diagram depicted in Figure SRS-USE shows the main users and typical use cases they engage in.
A reusable architecture for embedded systems, like QP, needs to be adaptable to a wide range of application areas and target hardware selections. For that, QP needs to be highly configurable. Whenever this requirements specification mentions "configurability", it explicitly specifies which of the following types of configurability is required:
Compile-time configurability means that the specific configuration option (out of a given range of possibilities) is chosen at compile-time and cannot be changed later (e.g., at run-time). Compile-time configurability is typically used for:
Run-time configurability means that the specific configuration option is chosen at run-time. Unlike compile-time configurability, run-time configurability is finer granularity, usually on an object-by-object basis. It is typically used for: