visit QP web site
reload this pagego to Installation pagego to Exercises pageread about this and other CMP booksgo to Resources page
CD-ROM index

Licensing
Source Code
Tools
QP Web Site
Disclaimer

Contact



This CD-ROM accompanies the book Practical Statecharts in C/C++ by Miro Samek, CMP Books, 2002, ISBN 1-57820-110-1. The disc contains:

  • All source code, executable images, and Visual C++ projects mentioned in the book.
  • Answers to all exercises scattered throughout the book.
  • The Evaluation Version of On Time RTOS-32 v4.0.
  • Visio™ stencils used to create the diagrams in this book.
  • Information about the book and promotion of other related CMP publications.
  • Several references in Adobe Portable Document Format (PDF).

The CD-ROM has been designed to be maximally useful even without installing anything to your hard disc. In particular, you can browse the source code, execute examples, and read PDF documents directly from the CD. However, you will need to install the source code if you want to modify the code or use it in your own projects. Please click on the Installation button near the top of the screen to obtain installation instructions.

Back to Top

Software Licensing

The source code available on the CD-ROM accompanying the book Practical Statecharts in C/C++ by Miro Samek, CMP Books, 2002, ISBN 1-57820-110-1, is available under the dual licensing model, in which both the open source software distribution mechanism and traditional commercial software distribution models are combined.

Open Source Projects: Closed Source Projects:
  • Closed SourceIf you are developing and distributing traditional closed source applications, you might purchase one of commercial licenses, which are specifically designed for users interested in retaining the proprietary status of their code. All commercial licenses expressly supersede the GPL2 open source license. This means that when you license the QP software under a commercial license, you specifically do not use the software under the open source license and therefore you are not subject to any of its terms. More about commercial licensing...
Back to Top

Source Code

The structure of the source code included on the disc does not strictly reflect the chapter structure of the book to avoid repetition of the central Quantum Framework (QF) implementation. The following table summarizes the contents of the source code directories:

Directory Contents
Cpp C++ source code
QF Quantum Framework (QF) C++ source code
Include QF interface (.H files)
Source QF platform-independent implementation (.CPP files)
DOS DOS version of QF (foreground/background for 16-bit x86); Visual C++ 1.52 compiler.
Borland DOS version of QF (foreground/background for 16-bit x86); Borland 3.1 compiler.
RTT32 RTT-32 version of QF (foreground/background for 32-bit x86).
RTK32 RTK-32 version of QF (QF library with full RTOS support).
RTK32A RTK-32 version of QF with portable event-queue (QEQueue) and event-pool (QEPool).
Win32 Win32 version of QF.
Cparser C-Comment Parser illustrating standard state-machine implementations (several projects corresponding to examples and exercises from Chapter 3)
Qcalc Quantum Calculator application from Chapter 1
Qcalc0 Simplified Quantum Calculator application from Chapter 2
Qcalc2 Enhanced Quantum Calculator ("polymorphic" Win32 application). The directory contains two projects: Calc1 and Calc2 (see Chapter 6)
Qdpp Quantum Dining Philosopher Problem (QDPP) in C++. An example of a multi-platform QF application.
Include Platform-independent QDPP interface (qdpp.h).
Source Platform-independent QDPP implementation (qdpp.cpp).
DOS DOS version of QDPP (foreground/background for 16-bit x86); Visual C++ 1.52 compiler.
Borland DOS version of QDPP (foreground/background for 16-bit x86); Borland 3.1 compiler.
RTT32 RTT-32 version of QDPP (foreground/background for 32-bit x86).
RTK32 RTK-32 version of QDPP (QF application with full RTOS support).
RTK32A RTK-32A version of QDPP.
Win32 Win32 version of QDPP.
Qdpp1 QDPP with C++ exception handling.
Qdpp2 QDPP with fine-granularity EAT_SIG event.
QHsmTst Test statechart for the QHsm class (Chapter 4).
QPattern State patterns from Chapter 5.
Ptm_test Pointer-to-member function test from Chapter 5.
C C source code
QF Quantum Framework (QF) C source code
Include QF interface (.H files)
Source QF platform-independent implementation (.C files)
DOS DOS version of QF (foreground/background for 16-bit x86); Visual C++ 1.52 compiler.
Borland DOS version of QF (foreground/background for 16-bit x86); Borland 3.1 compiler.
RTT32 RTT-32 version of QF (foreground/background for 32-bit x86).
RTK32 RTK-32 version of QF (QF library with full RTOS support).
Win32 Win32 version of QF.
Cparser C-Comment Parser illustrating standard state-machine implementations (several projects corresponding to examples and exercises from Chapter 3)
Qcalc Quantum Calculator application from Chapter 1
Qcalc2 Enhanced Quantum Calculator ("polymorphic" Win32 application). The directory contains two projects: Calc1 and Calc2 (see Chapter 6)
Qdpp Quantum Dining Philosopher Problem (QDPP) in C. An example of a multi-platform QF application.
Include Platform-independent QDPP interface (qdpp.h).
Source Platform-independent QDPP implementation (qdpp.cpp).
DOS DOS version of QDPP (foreground/background for 16-bit x86); Visual C++ 1.52 compiler.
Borland DOS version of QDPP (foreground/background for 16-bit x86); Borland 3.1 compiler.
RTT32 RTT-32 version of QDPP (foreground/background for 32-bit x86).
RTK32 RTK-32 version of QDPP (QF application with full RTOS support).
Win32 Win32 version of QDPP.
QHsmTst Test statechart for the QHsm class (Chapter 4).
QPattern State patterns from Chapter 5.
CppMI C++ with multiple inheritance (MI) source code
QF Quantum Framework (QF) C++ MI source code
Include QF interface (.H files)
Source QF implementation (.CPP files)
Win32 Win32 version of QF
Qcalc2 Enhanced Quantum Calculator with multiple inheritance

You can browse the code directly on the CD, or simply copy selected files to your hard-disk for modifications. For your convenience, the disc contains also an installation program, which will install the source code, the projects and libraries for you.

Back to Top

Tools

Most source code examples (although written in portable C++ or C) have been compiled with Microsoft Visual C++ v6.0 compiler and are ready to run from Microsoft Windows (9x/NT/2000). You will need Microsoft Visual C++ v6.0 to build the examples without redoing project files (makefiles), libraries and so on.

Some examples from Part II of the book require a true real-time operating system. These examples are intended to run under RTOS-32 from On Time Software. The disc contains an Evaluation Version of this product, which you need to install before you can download your code for execution. RTOS-32 seamlessly integrates with Microsoft Visual C++ v6.0 (as well as other 32-bit compilers for x86 microprocessor), so you can conveniently develop and remotely debug your code on the target machine from the Developer Studio IDE.

For the 16-bit DOS projects you will need either the 16-bit Microsoft Visual C++ v1.52, or the Borland v3.1 compiler.

Back to Top

QP Web Site

I intend to continue advancing Quantum Programming (QP) and am interested in any constructive feedback you may have. I have opened a Web site devoted to QP:

http://www.quantum-leaps.com

I intend this site to contain application notes, ports of QF to different platforms, state patterns, useful links, bug fixes, frequently asked questions, resources, and much more. Please feel free to contact me via e-mail at miro@quantum-leaps.com.

Back to Top

Disclaimer

The programs available on this CD-ROM have been carefully tested, but are not guaranteed for any particular purpose. The publisher does not offer any warranties and does not guarantee the accuracy, adequacy or completeness of any information herein and is not responsible for any errors or omissions. The publisher assumes no liability for damages resulting from the use of the information in this book or for any infringement of the intellectual property rights of third parties that would result from the use of this information.

Back to Top