Join Amazon Prime and ship Two-Day for free and Overnight for $3.99. Already a member? Sign in.
Practical Statecharts in C/C++ and over 300,000 other books are available for Amazon Kindle – Amazon’s new wireless reading device. Learn more

 

or
Sign in to turn on 1-Click ordering.
 
 
More Buying Choices
11 used & new from $17.99

Have one to sell? Sell yours here
 
   
Practical Statecharts in C/C++: Quantum Programming for Embedded Systems with CDROM
 
 
Start reading Practical Statecharts in C/C++ on your Kindle in under a minute.

Don’t have a Kindle? Get yours here.
 
  

Practical Statecharts in C/C++: Quantum Programming for Embedded Systems with CDROM (Paperback)

by Miro Samek (Author) "The triumph of the graphical user interface has been one of the most impressive developments in software during the past three decades..." (more)
Key Phrases: priority active object, parser state machine, const sig, Quantum Calculator, Ultimate Hook, Quantum Framework (more...)
4.1 out of 5 stars See all reviews (21 customer reviews)

List Price: $50.95
Price: $50.95 & this item ships for FREE with Super Saver Shipping. Details
Temporarily out of stock.
Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your account will only be charged when we ship the item.
Ships from and sold by Amazon.com. Gift-wrap available.

3 new from $50.95 8 used from $17.99
Also Available in: List Price: Our Price: Other Offers:
Kindle Edition (Kindle Book) $37.56

Frequently Bought Together

Practical Statecharts in C/C++: Quantum Programming for Embedded Systems with CDROM + MicroC OS II: The Real Time Kernel (With CD-ROM) + Embedded Systems Building Blocks: Complete and Ready-to-Use Modules in C
Price For All Three: $185.29

Some of these items ship sooner than the others. Show details

  • This item: Practical Statecharts in C/C++: Quantum Programming for Embedded Systems with CDROM by Miro Samek

    Temporarily out of stock.
    Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your account will only be charged when we ship the item.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • MicroC OS II: The Real Time Kernel (With CD-ROM) by Jean J. Labrosse

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Embedded Systems Building Blocks: Complete and Ready-to-Use Modules in C by Jean J. Labrosse

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details


Customers Who Bought This Item Also Bought

Practical UML Statecharts in C/C++, Second Edition: Event-Driven Programming for Embedded Systems

Practical UML Statecharts in C/C++, Second Edition: Event-Driven Programming for Embedded Systems

by Miro Samek
5.0 out of 5 stars (6)  $44.95
Modeling Software with Finite State Machines: A Practical Approach

Modeling Software with Finite State Machines: A Practical Approach

by Ferdinand Wagner
3.6 out of 5 stars (7)  $78.36
Embedded Linux Primer: A Practical Real-World Approach (Prentice Hall Open Source Software Development Series)

Embedded Linux Primer: A Practical Real-World Approach (Prentice Hall Open Source Software Development Series)

by Christopher Hallinan
4.9 out of 5 stars (12)  $40.79
Embedded Systems Building Blocks: Complete and Ready-to-Use Modules in C

Embedded Systems Building Blocks: Complete and Ready-to-Use Modules in C

by Jean J. Labrosse
4.4 out of 5 stars (5)  $61.58
Programming Embedded Systems: With C and GNU Development Tools, 2nd Edition

Programming Embedded Systems: With C and GNU Development Tools, 2nd Edition

by Michael Barr
4.3 out of 5 stars (6)  $43.25
Explore similar items

Editorial Reviews

Review
...downright revolutionary... The title is a major understatement... "Quantum Programming" may ultimately change the way embedded software is designed. -- Michael Barr, Editor-in-Chief, Embedded Systems Programming magazine, August 2002

Beyond simply talking about concepts, Miro provides complete source code and code walkthroughs. -- Brian Schmidt, Sr. Design Engineer, Plexus Technology Group

Product Description
* Model reactive systems with UML statecharts

* Efficiently code statecharts directly in C/C++

* Rapidly build embedded software with statechart-based frameworks

Model your reactive systems without heavyweight, expensive CASE tools. The author's Quantum Programming is a new paradigm that treats statecharts as a way of design rather than the use of a particular tool. It includes a complete software infrastructure for executing statecharts tailored for multithreaded embedded applications. Flexible, efficient, portable, scalable, and maintainable, this lightweight Quantum Framework permits you to quickly hand-code working real-time systems in C or C++ directly from UML statecharts.

The Quantum Framework is a complete implementation environment - an active-object framework carefully designed to work with nearly any RTOS. It supports rapid prototyping, easy modification of states and transitions at any stage of development, and the choice of implementation language (C or C++) to match the resource constraints of the target system. Best of all, it is compact, with complete QF code typically requiring less than 5KB of code and data.

In Part I of this book, you get a clear, articulate description of the relevant concepts including traditional finite state machines, statecharts, and several statechart-based design patterns in the form of executable code examples. Learn how state nesting leads to behavioral inheritance and how it enables reuse through programming-by-difference. Part II fully describes the implementation of the Quantum Framework and explains how you can use it in your applications and port it to an RTOS of your choice.

The CD-ROM includes complete source code for the author's Quantum Framework, answers to all exercises scattered throughout the book, and an evaluation version of RTOS-32 - a 32-bit real-time operating system for x86 processors

See all Editorial Reviews


Product Details

  • Paperback: 389 pages
  • Publisher: CMP Books (July 2002)
  • Language: English
  • ISBN-10: 1578201101
  • ISBN-13: 978-1578201105
  • Product Dimensions: 9.1 x 7.4 x 1 inches
  • Shipping Weight: 1.9 pounds (View shipping rates and policies)
  • Average Customer Review: 4.1 out of 5 stars See all reviews (21 customer reviews)
  • Amazon.com Sales Rank: #366,909 in Books (See Bestsellers in Books)

    Popular in this category: (What's this?)

    #72 in  Books > Computers & Internet > Hardware > Microprocessors & System Design > Embedded Systems

Inside This Book (learn more)



Books on Related Topics (learn more)
 
 

What Do Customers Ultimately Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
Check the boxes next to the tags you consider relevant or enter your own tags in the field below.
(3)
(1)
(1)

Your tags: Add your first tag
 
Help others find this product — tag it for Amazon search
Miro Samek suggested this product show on searches for "uml". What do you suggest?

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

 

Customer Reviews

21 Reviews
5 star:
 (14)
4 star:
 (1)
3 star:
 (3)
2 star:
 (1)
1 star:
 (2)
 
 
 
 
 
Average Customer Review
4.1 out of 5 stars (21 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
37 of 38 people found the following review helpful:
5.0 out of 5 stars Thank you Miro Samek., June 28, 2003
By Robert O. Alexander (Bellevue, WA United States) - See all my reviews
(REAL NAME)   
I seldom write reviews. This book changed my life, and I've been developing embedded software for twenty-five years. Samek's nested finite state machines, which he calls Hierarchical State Machines (HSMs) give the embedded software architect a framework arguably as fundamental as an RTOS. If you are creating event-driven embedded software where objects have member variables representing their state at any given time, this book is required reading.

For those of you unfamiliar with state machines, the book gets you up to speed in a hurry. For those of you unfamiliar with the advantages of state machines, especially HSMs, permit me to summarize. They allow you to create design diagrams (the book uses UML-plus) that map directly and clearly to code, they let you keep the code and diagrams in sync more easily, they allow you to create better designs because you are thinking in terms of events, states, and transitions as well as in terms of objects, they allow you to have more effective reviews, and they allow you to create more testable code since events serve as inputs and states serve as outputs. To some degree, object-oriented design without HSMs provides those benefits, but state machines let you define the complete set of events and state transitions so you can test more rigorously and more completely - and more automatically.

By the way, the book does read well and read quickly. After your first read, as you begin using HSMs to design software, you will reference sections of the book and begin acquiring a more in-depth understanding of the details. You'll find yourself talking with your peers about the book, and then they'll read it. Soon you'll be enjoying collaborative design based on use cases that spawn statecharts, classes (each HSM is an object), and real-time constraints. Read the book, use the book, and enjoy a new level of software engineering.

Other books I recommend highly: Bloch - Effective Java, Brooks - Mythical Man Month, DeMarco and Lister - Peopleware, Howlett - Visual Interface Design for Windows, Kaner - Lessons Learned in Software Testing, Kaner - Testing Computer Software, McConnell - Rapid Development, McConnell - Code Complete, McGuire - Debugging the Development Process, Meyers - Effective C++, Microsoft, Windows User Experience (reference book), Norman - The Design of Everyday Things, Riel - Object-Oriented Design Heuristics (Want to learn OO? Read this), Strunk and White - Elements of Style, Vermeulen - The Elements of Java Style

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
24 of 25 people found the following review helpful:
5.0 out of 5 stars Excellent, thoughtful and technical treatise on statecharts, April 2, 2003
By "flashsimguy" (Philadelphia, PA USA) - See all my reviews
Since I am not from the embedded system world, I was a bit apprehensive about approaching this book. While I can see that author Miro Samek has a directed target for his audience, I strongly feel that this book is a "must read" for technical developers in all areas who want to improve their program design abilities or developers who want to understand the philosophy, use, and implementation of statecharts intimately.

As the title indicates, this book brings the topic of statecharts from the realm of expensive design tools to the PRACTICAL realm, illustrating its points with full examples and extensive commentary.

Essentially Samek postulates that the slow adoption by developers of best practices by statechart design is due to lack of understanding of the fundamental nature of statecharts and how it is perceived as requiring expensive tools to use well. Samek insightfully discusses how statecharts as a best practice embody "behavioral inheritance" as a fundamental design concept that stands as a peer alongside the conventional pillars of object-oriented programming, namely inheritance, encapsulation, and polymorphism.

The book is very technical and written in an academic style, with ample references to original sources as well as detailed code reviews and many reader exercises. I would caution anyone from approaching this book as a quick or light read. For me, it took a seriousness and good understanding of C and C++ to follow Samek's examples and achieve the "a-ha", which was always worth it in the end.

The two basic parts of the text are (1) an explanation of statecharts and their methodological implications, and (2) a description of how to apply statecharts as a data structure in real applications, namely embedded as control strategies for "active objects." In several places in the text, Samek makes an analogy between statechart (and active object) semantics and quantum mechanics. This parallel was an interesting philosophical argument, but didn't add much for me in terms of accepting his "quantum framework" as a best practice -- I was sold by his methodological arguments he had presented already.

Speaking from experience in writing a book about using statecharts to build simulations, I can say Samek is a visionary who extended my perception of statecharts several steps. I know I will be quoting from it and referring to it in my work to come. This book has earned a prominent place on my bookshelf, and I would heartily recommend it to any other developer who wants to create correct, verifiable, scaleable, and solid designs (which should be ALL developers!).

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
33 of 36 people found the following review helpful:
3.0 out of 5 stars less useful than I initially thought, June 1, 2006
By Frank Schuhardt (Berlin, Germany) - See all my reviews
(REAL NAME)   
A couple of months ago I would have fully agreed with most of the reviewers: yes, statecharts is an important topic, and Samek covers it well. Indeed he does: The book is chock-full of (working!) code and will give you a head-start at tackling difficult behavioral control problems. I do not develop real-time software, but thinking of _every_ software as if it were real-time can increase quality. I feel I gained a lot of insight, and it made me rethink some architecture issues.

You can brush over the quantum-babble, mainly because it's irrelevant and an already overstreched analogy-for-everything. With regards to Statecharts, no harm is done that Samek is evangelizing a little bit too forcefully.

So why 3 stars only? After working with the concepts and coding a number of statemachines the Samek-way, I started to notice that Samek's approach does not quite deliver as promised:
* Be prepared to be disconnected from the community: Samek's statecharts part in a lot of aspects from the UML 2.0 statecharts (although there is a website w/ quite a lot of activity). Looking at UML-compliant statecharts from fellow developers you will realize that you cannot transcribe them easily using Samek's framework. Main reason: UML has functionality (= non-statemachine code) in transition actions and event guards, Samek in state event handlers.
* Samek's statemachines are "run-to-completion", which results excessive self-posting of events and queuing. Although the code is not spaghetti, the execution is - and debugging is _very_ difficult.
* After a while, it is very difficult to infer the statechart semantics from the code. I certainly want to believe Samek that there is no real value in separating semantics (= statechart description) from functionality (= code which uses the statemachine), but this turned out to be a maintainance nightmare.
* Samek's statemachines do not offer orthogonal states, but for bigger projects you will need orthogonality to model concurrent aspects of a system. The lack of orthogonality is salvaged by the publish/subscribe framework also included in the book: You just use a number of statemachines and connect them via a message bus. This might work in the real-time space but it's obviously not something you will be able to include in your software. As a consequence, it is difficult to use statemachines in a "tactical" fashion.

David Harel (the inventor of statecharts, see his paper from '87, e.g. on citeseer) designed statecharts as a visual language to enable thinking (alone and in the team) about the behaviour of systems. Samek disagrees: coding and thinking go hand in hand. This might seem to be very "agile" but there are pitfalls. Actually he seems to be as strict in his assertions than Harel is - not agile at all.

There are approaches which are more balanced in that they mimic statechart semantics "better" (= more UML-compliant) than his. Take a look at SCXML (XML-driven, Java-interpreted) or at CHSM (C++/Java code generation). Also take a look at the roundtrip modelling tools which (most likely) ship w/ your preferred development environment.

Samek is very up-beat and a strong believer in what he says. I bought into his vision and hoped for a productivity / morale boost comparable to using unit tests (like JUnit). It never really turned out that way, and statemachine coding à la Samek remained a trial-and-error business until I decided to use a different approach.

It's an important, very original book, and an interesting read. My advice: Give it a try, but don't get carried away.
Comment Comments (3) | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

5.0 out of 5 stars Very useful discussion of statechart design features for implementors of both code and logic
I read the book over several days then experimented with the knowledge I had gained by upgrading my reusable C++ Finite State Machine classes to add a subset of the most useful... Read more
Published 3 days ago by Matthew Jessick

2.0 out of 5 stars Not what I expected
I bought this book after reading some reviews which hinted that this book would be helpful for software developers of all systems and not just embedded ones. Read more
Published 12 months ago by TheArchitect

5.0 out of 5 stars It`s realy woundeful book.
Firstly: I am sorry about my English.
I think that this book is really useful and very interesting for each interesting in C++/C. Read more
Published 20 months ago by Bliacher Evgeniy

5.0 out of 5 stars This is a sleeping hit book!
First prior to reading this book, I was finding the title unattractive. I did not know what statecharts were and what Quantum programming was. Read more
Published 24 months ago by Olivier Langlois

3.0 out of 5 stars Must read material for anyone using state machines
Book is excellent in covering state machines and has many practical examples. It did not come short in covering different approaches used by real programmers to implement STMs. Read more
Published on January 22, 2007 by Alexei Polkhanov

1.0 out of 5 stars Nice concept but useless in real-time embedded application
Since I saw quite a few excellent reviews on Amazon as well as on some other websites, I decided to purchase the book hoping it would give me some fresh new ideas in implementing... Read more
Published on November 21, 2006 by K. Nguyen

5.0 out of 5 stars A Sophisticated Technique
It's not an easy-to-read book because the topic is complicated.
But the technique described in this book which is developed by Samek is very sophisticated - the library code... Read more
Published on May 31, 2005 by Jingyu Li

5.0 out of 5 stars Simply the best embedded software title available
PSICC is a revolutionary title that will transform the way you design and implement embedded code. Kiss goodbye to spaghetti mess and say hello to efficient, well structured,... Read more
Published on May 17, 2005 by L. Collier

1.0 out of 5 stars Useless Book
As a senior computer engineer who has been in embedded systems programming for 5 years, I found this book very useless. Read more
Published on March 13, 2005 by Frank

5.0 out of 5 stars Excellent book on embedded programming architecture!!
Most of the embedded books I've read mainly focus discussion on basic assembly language (such as interrupt subroutine) and simple hardware interfacing (for instance, keypad,... Read more
Published on February 28, 2005 by Soon Yau Cheong

Only search this product's reviews



Customer Discussions

 Beta (What's this?)
New! See all customer communities, and bookmark your communities to keep track of them.
This product's forum (1 discussion)
  Discussion Replies Latest Post
Practical UML Statecharts in C/C++, Second Edition 1 November 2008
See all discussions...  
Start a new discussion
Topic:
First post:
Prompts for sign-in
  [Cancel]


   


Product Information from the Amapedia Community

Beta (What's this?)



Look for Similar Items by Category


Smooth Operator

Shop for garage door openers

Find garage door products (opener kits, remotes, mini-key-chain controls, and wireless-key entry systems) in the Hardware Store. Opening the garage door shouldn’t be a chore.

Shop all garage door hardware

 

Best Books of 2008

Best of 2008
Find our top 100 editors' picks as well as customers' favorites in dozens of categories in our Best Books of 2008 Store.
 

No X-Ray Vision Needed

Shop for stud finders
Explore our wide variety of stud finders and scanners in the Home Improvement Store.

Shop for stud finders

 

Best Books

Best of the Month
See our editors' picks and more of the best new books on our Best of the Month page.
 

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Where's My Stuff?

Shipping & Returns

Need Help?

Your Recent History

  (What's this?)
You have no recently viewed items or searches.

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.

Look to the right column to find helpful suggestions for your shopping session.

Continue shopping: Top Sellers

Conditions of Use | Privacy Notice © 1996-2009, Amazon.com, Inc. or its affiliates