Skip to content

Practical UML Statecharts in C/C++ Event-Driven Programming for Embedded Systems

Best in textbook rentals since 2012!

ISBN-10: 0750687061

ISBN-13: 9780750687065

Edition: 2nd 2009 (Revised)

Authors: Miro Samek

List price: $71.95
Shipping box This item qualifies for FREE shipping.
Blue ribbon 30 day, 100% satisfaction guarantee!
Rent eBooks
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Description:

The shear volume of embedded code produced by programmers demands a unified language and framework to create efficient and maintainable systems. UML(unified modeling language) statecharts are a practical way in which to create this framework. The software framework of from the first edition is now open source and has been significantly improved and expanded. It is now compatible with the very popular ARM7 architecture and Cortex-M3. This book is presented in two parts, the first introduces statecharts, how to design with them and how to code them directly into C/C++ without the use of expensive tools. Part two introduces the author's event-driven framework for executing the material…    
Customers also bought

Book details

List price: $71.95
Edition: 2nd
Copyright year: 2009
Publisher: CRC Press LLC
Publication date: 10/3/2008
Binding: Paperback
Pages: 728
Size: 7.52" wide x 9.72" long x 1.57" tall
Weight: 2.684
Language: English

Samek is the lead software architect at IntegriNautics Corporation with over ten years of experience in developing embedded real-time software.

Preface
Statecharts
Whirlwind Tour of Programming with Statecharts
Why Bother?
The Traditional Event-Action Paradigm
State Machines ? A Better Way of Programming
The Time Bomb Example
The Calculator Example
Object-Oriented Analogy
The Event-driven Framework
Summary
A Crash Course in Statecharts
The Essence of Finite State Machines
The Essence of UML Statecharts
Examples of State Models
Summary
Standard State Machine Implementations
State Machine Interface
Nested switch Statement
State Table
State Design Pattern
Optimal FSM Implementation
State Machines and C++ Exception Handling
Role of Pointer-to-Member Functions
Implementing Guards, Junctions, and Choice Points
Implementing Entry and Exit Actions
Dealing with State Hierarchy
Summary
QEP: A Minimal Hierarchical Event Processor
General Structure of the QEP Event Processor
An Annotated Example (QHsm)
QEP Structure
QEP Source Code Structure
Internal Representation of a State Machine
Initialization of a State Machine
Dispatching Events to a FSM
Executing a Transition in a FSM
Dispatching Events to a HSM
Executing a Transition in a HSM
Static Transition Optimization in a HSM
Porting and Configuring QEP
Caveats
Summary
Implementing State Machines with QEP
Implementing a HSM with QEP
Step 1: Enumerating Signals
Step 2: Defining Events
Step 3: Defining the QCalc State Machine
Step 4: Declaring the QCalc States
Step 5: Initializing the HSM
Step 6: Implementing the State Handler Functions
Implementing a FSM with QEP
Pitfalls to Avoid While Coding State Machines with QEP
Incomplete State Handlers 2-37
Confusing Statecharts with Flowcharts 2-38
Ill-Formed State Handlers 2-39
Suboptimal Signal Granularity 2-42
Violating the Run To Completion Semantics 2-42
Summary
State Patterns
Ultimate Hook
Reminder
Deferred Event
Orthogonal Component
Transition to History
Summary
Event-Driven Framework
QF: A Minimal Event-Driven Embedded Framework
Conventional Approach to Multithreading
Computing Model of QF
Annotated Example
The ?Airplane in the Tunnel? Game
The Active Object Design
The Implementation
The Port for ARM Cortex-M3
Testing
Summary
Design of QF
Handling Errors and Exceptional Conditions
Memory Management
Mutual Exclusion and Blocking
Active Objects
Event Management in QF
Event Delivery Mechanisms in QF
Deferring and Recalling Events in QF
Time Events
Summary
Implementation of QF
Code Organization
Critical Section in QF
General QF Policies Enforced by Assertions
Active Object class
Native QF Event Queue
Native QF Memory Pool
Native QF Priority Set
Native QF Scheduler
Porting QF
QF Porting Guide
QF on Bare-Metal Targets (the Vanilla Port)
Using QF with a preemptive Real-Time Kernel (�C/OS-II)
QF port to a POSIX-Compliant OS (Linux)
Summary
Conclusion
Rules for Developing Event-Driven Embedded Applications
Heuristics
Sizing Event Queues and Event Pools
System Integration
Summary of Key Elements
An Invitation
Appendix A QK: A Single-Stack Preemptive Kernel
Run-to-Completion Processing
Synchronous and Asynchronous Preemptions
Sta