QP(Quantum Platform)
is a lightweight, open-source, state machine-based, event-driven application framework. This framework consists of four parts:
-
Event Processor (QEP); -
Lightweight Event-Driven Framework (QF); -
Task Scheduling Microkernel (QV, QK, QXK); -
Real-Time Tracing Debugger (QS).
(1) QEP
-
Quantum Event Processor
is a general-purpose, portable, reusable state machine engine. -
QEP allows you to directly map UML-style state diagrams to code. -
QEP provides traditional simple flat state machines and hierarchical state machines. QEP can directly manipulate event queues and event dispatching mechanisms.
(2) QF
-
QF is a general-purpose, event-driven application framework designed for real-time embedded systems. -
QF is designed to work in conjunction with QEP and RTOS. -
QF includes event queues, active objects, event traversals, etc.
(3) QK
-
QK is a lightweight preemptive real-time kernel. -
QK is a very small kernel that executes independent tasks based on RTC conventions. -
QK must match the version of QF.
(4) QS
-
A powerful debugging tool.
QEP (Hierarchical Event Processor)
The event processor can also be understood as a state machine engine. When there is an event to be processed, it calls the state function of the current state to handle this event and processes the return value of the state function, making appropriate state transitions (such as transitioning to the parent state). The state engine also handles the entry (ENTER), exit (EXIT), and initial pseudo state (INIT) of a state.
QF (Active-Object Framework)
QF is a lightweight, event-driven, active objects framework. The main task of this framework is to ensure thread safety for each active object and run-to-completion event handling. It includes direct event delivery, publish-subscribe event forwarding, event queues, and time events (delayed delivery time events).
QV (Cooperative Kernel)
The cooperative kernel (Vanilla kernel) only processes events during time to completion and executes priority-based scheduling for active objects after handling all events. It is implicitly cooperative because active timers do not need to explicitly relinquish the CPU. Instead, after completing event handling, it simply returns to the QV scheduler.
QK (Preemptive Non-Blocking Kernel)
QK is a super-fast preemptive, priority-based, single-stack, real-time kernel designed specifically for executing active objects. It always handles high-priority active objects in the event queue but treats events as one-time function calls (rather than endless loops like traditional kernels). Nevertheless, if a new event has a higher priority than the currently processed event, the QK kernel still provides preemptive one-time event handling functionality (like a preemptive interrupt handler allowing interrupts to preempt one another). This means that QK can use a single stack to save the context of all active objects.
QXK (Preemptive Blocking Kernel)
QXK is a simple preemptive, priority-based, blocking real-time kernel specifically designed for traditional blocking code active objects, such as commercial middleware (TCP/IP protocol stack, UDP protocol stack, embedded file systems, etc.) or legacy code mixed designs.
QS (Software Tracing System)
QS is a software tracing system that allows developers to monitor targets with minimal system resources without stopping or significantly slowing down code live events in the event-driven QP application. QS is an ideal tool for testing, troubleshooting, and optimizing QP applications. QS can even be used to support product manufacturing acceptance testing.
Leave a Comment
Your email address will not be published. Required fields are marked *