Buch, Englisch, 744 Seiten, Format (B × H): 189 mm x 246 mm, Gewicht: 1416 g
Event-Driven Programming for Embedded Systems
Buch, Englisch, 744 Seiten, Format (B × H): 189 mm x 246 mm, Gewicht: 1416 g
ISBN: 978-0-7506-8706-5
Verlag: CRC Press
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.
This 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
Zielgruppe
Professional Practice & Development
Autoren/Hrsg.
Fachgebiete
- Mathematik | Informatik EDV | Informatik Technische Informatik Eingebettete Systeme
- Mathematik | Informatik EDV | Informatik Programmierung | Softwareentwicklung Objektorientierte Programmierung
- Mathematik | Informatik EDV | Informatik Programmierung | Softwareentwicklung Software Engineering Modellierung, UML, SysML
Weitere Infos & Material
Preface PART I STATECHARTS Chapter 1 Whirlwind Tour of Programming with Statecharts1.1 Why Bother?1.2 The Traditional Event-Action Paradigm1.3 State Machines ? A Better Way of Programming1.3.1 The Time Bomb Example1.3.2 The Calculator Example1.5 Object-Oriented Analogy1.6 The Event-driven Framework1.6 SummaryChapter 2 A Crash Course in Statecharts 2.1 The Essence of Finite State Machines2.2 The Essence of UML Statecharts2.3 Examples of State Models2.4 SummaryChapter 3 Standard State Machine Implementations3.1 State Machine Interface3.2 Nested switch Statement3.3 State Table3.4 State Design Pattern3.5 Optimal FSM Implementation3.6 State Machines and C++ Exception Handling 3.7 Role of Pointer-to-Member Functions3.8 Implementing Guards, Junctions, and Choice Points3.9 Implementing Entry and Exit Actions3.10 Dealing with State Hierarchy3.11 SummaryChapter 4 QEP: A Minimal Hierarchical Event Processor4.1 General Structure of the QEP Event Processor4.2 An Annotated Example (QHsm)4.3 QEP Structure4.3.1 QEP Source Code Structure4.3.2 Internal Representation of a State Machine4.3.3 Initialization of a State Machine4.3.4 Dispatching Events to a FSM4.3.5 Executing a Transition in a FSM4.3.6 Dispatching Events to a HSM4.3.7 Executing a Transition in a HSM4.3.8 Static Transition Optimization in a HSM4.4 Porting and Configuring QEP4.5 Caveats4.6 Su