This QP/C++ Tutorial is adapted from Chapter 1 of Practical UML Statecharts in C/C++, Second Edition
by Miro Samek, the founder and president of Quantum Leaps, LLC.
This Tutorial presents an example project implemented entirely with the QP/C event-driven platform using UML state machines and the event-driven paradigm. The example application is an interactive "Fly 'n' Shoot"-type game. My aim in this section is to show the essential elements of the method in a real, nontrivial program, but without getting bogged down in details, rules, and exceptions. At this point, I am not trying to be complete or even precise, although this example is meant to show a good design and the recommended coding style. I don't assume that you know much about UML state machines, the UML notation, or the event-driven programming. I will either briefly introduce the concepts, as needed, or refer you to the the Practical UML Statecharts in C/C++, Second Edition book for more details. The example "Fly 'n' Shoot" game is based on the "Quickstart" application provided in source code with the ARM Cortex-M3 LM3S811 evaluation kit (see Figure 2-2) from Luminary Micro (http://www.luminarymicro.com). I was trying to make the "Fly 'n' Shoot" example behave quite similarly to the original Luminary Micro "Quickstart" application, so that you can directly compare the event-driven approach with the traditional solution to essentially the same problem specification.
Next: 1. Installing QP/C++ and Building QP Libraries and Applications
Copyright © 2002-2010 Quantum Leaps, LLC. All Rights Reserved.
http://www.state-machine.com
1.6.3