QP/QM Training

At Quantum Leaps we strongly believe that event-driven programming with active objects combined with model-driven engineering based on modern hierarchical state machines (UML statecharts) is the best way to go when it comes to developing real-time embedded software. When done properly, these techniques can give you a tremendous competitive advantage, reduce your development time, and produce an actual architecture that is safer, traceable to code, and easier to understand, test, extend, reuse and maintain than the venerable “superloop” or a traditional RTOS. Also, programming that way can be much more fun than the common approach based on “free threading” and “spaghetti code”.

Nonetheless, embracing these new paradigms can be a difficult process. On top of the event-driven paradigm, you must master the new concepts of active objects, hierarchical state machines, elements of object-oriented programming, modeling and some UML notation. When done improperly, a pseudo-“reactive” approach can fail miserably, at considerable cost to your company.

share on: 

Modern Embedded Systems Programming with QP Frameworks and QM Modeling Tool

QP/QM Training with QP logo with graduation cap
This 3-day training uses hands-on exercises combined with instruction to illustrate the concepts underlying the QP real-time frameworks and how they are applied in embedded systems programming requiring hard real-time performance. Upon completion of the training, participants have good understanding of event-driven systems, skills in designing and implementing UML state machines manually in C or C++ and graphically with the QM modeling tool, and the ability to build their own QP applications. Additionally, participants gain understanding of the real-time kernel options built-into the QP frameworks, learn how to reuse behavior with sub-machines, find out how to apply software tracing to debug and optimize their event-driven code and how to apply unit testing to active objects and state machines.

Training Agenda


Session 1A — Active objects:
This session is designed to help engineers through the paradigm shift from the traditional sequential programming to the modern event-driven programming with active objects. The session covers encapsulation for concurrency, inversion of control, blocking versus non-blocking code, run-to-completion (RTC) execution, asynchronous event passing and the role of state machines.

Session 1B — UML state machines:
This session explains state machine concepts, the UML notation and the semantics, including hierarchical state nesting, entry/exit actions, internal transitions, etc. The session culminates with the design of a hierarchical state machine in QM followed by automatic code generation, building, and executing the code.

PDF download of the book; Practical UML Statecharts in C/C++
Textbook for the course
(PDF included in the training materials)
Board: EFM32-SLSTK3401A Pearl Gecko
Development board for the course
(provided to each attendee)


Session 2A — QP internals:
This session examines the inner workings of the QP framework, which due to the inversion of control can offer benefits that go beyond the traditional RTOS. The session covers direct event passing, publish-subscribe, time events, dynamic event management, and automatic garbage collection for events.

Session 2B — QP application example:
This session uses the fun “Fly ‘n’ Shoot” game to explain all the steps necessary to design and code a real-time QP application.

Session 2C — State design patterns:
This session presents four state machine design patterns. Every pattern is illustrated with executable code, which allows attendees to fully understand the pattern and gives them a good starting point for their own implementations.


Session 3A — QP Real-Time Kernels:
This session explains and compares the real-time kernels built into the QP/C and QP/C++ frameworks. The kernels covered include: the cooperative QV kernel, the preemptive run-to-completion QK kernel, and the preemptive dual-mode (RTC/blocking) QXK kernel.

Session 3B — Sub-machines:
This hands-on session introduces the concepts of sub-machines and sub-machine states. Attendees apply the concepts to the Calculator model introduced earlier, generate code, and build the working application.

Session 3C — Software Tracing:
In this session attendees learn how to apply QP/Spy software tracing to debug, monitor, and optimize their event-driven QP applications without stopping or significantly degrading the real-time performance.

Session 3D — Unit Testing:
This session presents the QUTest unit testing harness. Attendees learn how to write test fixtures, test doubles, and test scripts to unit test active objects and state machines on the desktop and on embedded targets.

Download QP/QM training materials
Training materials
class notes, the PSiCC2 book in PDF, as well as the latest versions of QP™, QM™ and QTools™.

Training Prerequisites


In order to get the best results participants should have a working knowledge of C, as well as basic knowledge of real-time embedded programming. Previous QP or UML experience is not required.

To participate in the lab exercises, each attendee needs to bring a laptop running Windows (Windows 10/8/7 64-bit) with a free USB port.

Training Instructor

Dan Smith is an embedded software consultant specializing in bringing the modern event-driven paradigm to embedded software teams, who want to adopt hierarchical finite state machines (UML statecharts), real-time frameworks, modeling, and automatic code generation. He has been one of the earliest adopters of the QP real-time embedded frameworks and over the years has accumulated many real-life QP projects under his belt. Firmware he developed lies at the heart of many successful products including consumer electronics, telecom/datacom, industrial controls, and medical devices. Dan enjoys teaching and is a frequent speaker at the Embedded Systems Conferences, the Embedded World Conference, and various other venues. He earned his BSEE at Princeton.

Dan Smith

Training Options, Prices and Availability

The training is delivered on site at your location. The price of the 3-day training is $17,995.-. This price includes all training materials for up to 10 attendees (EFM32-SLSTK3401A development kit and the training materials package with the course textbook in PDF) as well as the instructor’s time and travel expenses. Each additional attendee beyond the first 10 can be enrolled for $1,000. Training outside the U.S. can be arranged for additional fee depending on the destination to cover the extra time and travel expenses.