Accompanying Code
| LICENSING |
|
The software accompanying the book Practical UML Statecharts in C/C++, second edition (ISBN: 0750687061) may be distributed and modified under the terms of the GNU General Public License version 2 (GPL2) as published by the Free Software Foundation. Please note that GPL2 Section 2(b) requires that all works based on this software must also be made publicly available under the terms of the GPL2 ("Copyleft"). Alternatively, this software may be distributed and modified under the terms of Quantum Leaps commercial licenses, which expressly supersede the GPL2 open source license and are specifically designed for licensees interested in retaining the proprietary status of their code. |
|
Self-extracting Windows executable (19MB)
|
|
Platform-independent ZIP (19MB)
|
Top of pageBuy Online From
|
|
| choose the best online deal... | |
|
|
|
|
![]() |
About the book... |
Practical UML Statecharts in C/C++ Second Edition bridges the gap between high-level abstract concepts of the Unified Modeling Language (UML) and the actual programming aspects of modern hierarchical state machines (UML statecharts). The book describes a lightweight, open source, event-driven infrastructure, called QP that enables direct manual coding UML statecharts and concurrent event-driven applications in C or C++ without big tools.
The book is presented in two parts. In Part I, you get a practical description of the relevant state machine concepts starting from traditional finite state automata to modern UML state machines followed by state machine coding techniques and state-machine design patterns, all illustrated with executable examples. In Part II, you find a detailed design study of a generic real-time framework indispensable for combining concurrent, event-driven state machines into robust applications. Part II begins with a clear explanation of the key event-driven programming concepts such as inversion of control (Hollywood Principle), blocking versus non-blocking code, run-to-completion (RTC) execution semantics, the importance of event queues, dealing with time, and the role of state machines to maintain the context from one event to the next. This background is designed to help software developers in making the transition from the traditional sequential to the modern event-driven programming, which can be one of the trickiest paradigm shifts.
The lightweight QP event-driven infrastructure goes several steps beyond the traditional real-time operating system (RTOS). In the simplest configuration, QP runs on bare-metal microprocessor, microcontroller, or DSP completely replacing the RTOS. QP can also work with almost any OS/RTOS to take advantage of the existing device drivers, communication stacks, and other middleware. The accompanying website to this book contains complete open source code for QP, ports to popular processors and operating systems, including 80x86, ARM Cortex-M3, MSP430, and Linux, as well as all examples described in the book.
![]() |
Focuses on core concepts rather than tools which are always changing allowing the reader to continue to use this information with various projects |
![]() |
Provides a complete, ready-to-use, open source software architecture for small and large embedded systems |
![]() |
Includes an extensive example using the ARM Cortex-M3 throughout the book highlighting issues programmers and architects encounter in everyday life |
Top of page![]() |
From the back cover... |
"This book was a definite eye-opener for me with regard to state machines. I recently rewrote a major piece of code to utilize the QP framework (included with the book) and it has worked wonders. My previous code used a more traditional state machine and had quickly evolved into spaghetti code. The hierarchical state machine approach made the new code smaller, more robust, and much easier to maintain and extend. Excellent book and code."
--Bob Bradley, Apple Computer, Inc., (amazon.com review)
This book is intended for the following software developers interested in event-driven programming and modern state machines:
- Embedded programmers and consultants will find a complete, ready-to-use, event-driven infrastructure, called QP, to develop applications in C or C++. The book describes both coding strategies for implementing UML state machines (statecharts) and, equally importantly, a compatible real-time framework for executing concurrent state machines. These two elements are synergistically complementary, and one cannot reach its full potential without the other.
- Embedded developers looking for a real-time kernel or RTOS will find that the QP event-driven platform can do everything what one might expect from an RTOS and that, in fact, QP actually contains a fully-preemptive real time kernel as well as a simple cooperative scheduler.
- Designers of ultra low-power systems, such as wireless sensor networks, will find how to scale down the event-driven, state machine-based approach to fit the tiniest MCUs. The ultra-light QP-nano version (Chapter 12) combines a hierarchical event processor, a real-time framework, and either cooperative or fully preemptive kernel in just 1-2KB of ROM.
- On the opposite end of the complexity spectrum, designers of very large-scale, massively-parallel server applications will find that the event-driven approach combined with hierarchical state machines scales up easily and is ideal for managing very large numbers of stateful components, such as client sessions, where per-component efficiency is critical.
- Open source community will find that QP complements other open source software, such as Linux.
- System architects might find in QP a lightweight alternative to heavyweight design automation tools.
Due to the code-centric approach, this book will primarily appeal to software developers tasked with creating actual, working code, as opposed to just modeling. This book does not provide yet another CASE tool. Instead, this book is about practical, maintainable coding techniques for UML state machines, and about combining concurrent state machines into robust event-driven systems by means of a real-time framework.
The companion Web site contains complete source code for the author's QP event-driven platform and all executable examples described in the book. The examples run on Windows, Linux, and ARM Cortex-M3.
Top of page![]() |
About the Author... |
|
Dr. Miro Samek is founder and president of Quantum Leaps, an open source company providing lightweight, state machine-based, event-driven application frameworks for embedded systems. He is the author of Practical Statecharts in C/C++ (CMP Books, 2002), has written numerous articles for magazines, including a column for C/C++ Users Journal, is a regular speaker at the Embedded Systems Conferences, and serves on the editorial review board of the Embedded Systems Design magazine. For a number of years, he worked in various Silicon Valley companies as an embedded software architect and before that he worked as an embedded software engineer at GE Medical Systems (now GE Healthcare). Dr. Samek earned his Ph.D. in nuclear physics at GSI (Darmstadt, Germany). |
![]() |
Top of pageLast updated: April 03, 2008




Excerpts in PDF









