- Paperback: 389 pages
- Publisher: CRC Press (July 2002)
- Language: English
- ISBN-10: 1578201101
- ISBN-13: 978-1578201105
- Product Dimensions: 7.2 x 1 x 9 inches
- Shipping Weight: 1.9 pounds (View shipping rates and policies)
- Average Customer Review: 22 customer reviews
- Amazon Best Sellers Rank: #631,535 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Practical Statecharts in C/C++: Quantum Programming for Embedded Systems with CDROM
Use the Amazon App to scan ISBNs and compare prices.
Fulfillment by Amazon (FBA) is a service we offer sellers that lets them store their products in Amazon's fulfillment centers, and we directly pack, ship, and provide customer service for these products. Something we hope you'll especially enjoy: FBA items qualify for FREE Shipping and Amazon Prime.
If you're a seller, Fulfillment by Amazon can help you increase your sales. We invite you to learn more about Fulfillment by Amazon .
There is a newer edition of this item:
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Frequently bought together
Customers who viewed this item also viewed
Customers who bought this item also bought
...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
About the Author
Dr. Miro Samek is the 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 customer reviews
There was a problem filtering reviews right now. Please try again later.
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.
Author's implementation of state machines is innovative and remarkable. It supports state nesting, automatic execution of entry/exit actions and default event handling by superstates. This allows you to implement UML statecharts in C++/C conveniently.
In general this book is very clearly written and comprehensive. Its reference list is also valuable, pointing to some classics in OOD and good articles in Embedded Systems Programing. This book will definitely become a classic in embedded software itself.
On the downside, I find the repeated analogy of the software model to quantum physics overwhelming. Besides the author chose to show you examples and implications before showing you the details and internal. This kind of abstraction may pose some question marks in your mind when you read the first few chapters. But do read on and you will appreciate the great ideas.
In addition the book gives good examples and instructions to use the framework in embedded systems software projects.
If you think you should re-think your architectural design in your embedded project read the article in ESP magazine ...
I used to put a lot of flag in my program to indicate the state. This will eventually become confusing as program grow larger. The knowledge on statechart that I learn from this book greatly tidy up my code, even I have only finished reading a few chapters. The concept is well-explained with the aid of chart diagram and codes. Furthermore, this books is platform independent, you can use it on any microcontroller. I highly recommend this book to intermediate and advanced embedded programmer!
All the debugging, banging and refitting I did to my classes gave me an appreciation for how much easier it would be to code and maintain statecharts using the author's pre-selected ideas and coherant, maintainable, elegant framework. My legacy design is about 180 degrees from the authors, using state objects (e.g.: I used nouns, and the author uses verbs) and all my functionality is set in externally through event and transition functions. Even using the book from that divergent viewpoint, the book's information and method of presentation was very useful.
On the logic side, I'm reimplementing some standalone FSM algorithms using my new statechart capabilities and I appreciate the grounding in practical statechart design I received from this book. This includes a basic set of the most useful and powerful features and an understanding of how to implement more complicated special purpose features if I should ever decide I need them, and also an understanding of why I may never choose to do so.
Most recent customer reviews
This book shows you the power of state machines.
He takes the reader way beyond if/else and switch statements.Read more
I think that this book is really useful and very interesting for each interesting in C++/C.Read more
But the technique described in this book which is developed by Samek is very sophisticated - the library code...Read more