Book contents
- Frontmatter
- Dedication
- Contents
- Preface
- Annotated Table of Contents
- Acknowledgments
- Part I Overview
- Part II Real-Time Software Design Method
- 4 Overview of Real-Time Software Design Method for Embedded Systems
- 5 Structural Modeling for Real-Time Embedded Systems with SysML and UML
- 6 Use Case Modeling for Real-Time Embedded Systems
- 7 State Machines for Real-Time Embedded Systems
- 8 Object and Class Structuring for Real-Time Embedded Software
- 9 Dynamic Interaction Modeling for Real-Time Embedded Software
- 10 Software Architectures for Real-Time Embedded Systems
- 11 Software Architectural Patterns for Real-Time Embedded Systems
- 12 Component-Based Software Architectures for Real-Time Embedded Systems
- 13 Concurrent Real-Time Software Task Design
- 14 Detailed Real-Time Software Design
- 15 Designing Real-Time Software Product Line Architectures
- Part III Analysis of Real-Time Software Designs
- Part IV Real-Time Software Design Case Studies for Embedded Systems
- Appendix A Conventions Used in This Textbook
- Appendix B Catalog of Software Architectural Patterns
- Appendix C Pseudocode Templates for Concurrent Tasks
- Appendix D Teaching Considerations
- Glossary
- Bibliography
- Index
7 - State Machines for Real-Time Embedded Systems
from Part II - Real-Time Software Design Method
Published online by Cambridge University Press: 05 March 2016
- Frontmatter
- Dedication
- Contents
- Preface
- Annotated Table of Contents
- Acknowledgments
- Part I Overview
- Part II Real-Time Software Design Method
- 4 Overview of Real-Time Software Design Method for Embedded Systems
- 5 Structural Modeling for Real-Time Embedded Systems with SysML and UML
- 6 Use Case Modeling for Real-Time Embedded Systems
- 7 State Machines for Real-Time Embedded Systems
- 8 Object and Class Structuring for Real-Time Embedded Software
- 9 Dynamic Interaction Modeling for Real-Time Embedded Software
- 10 Software Architectures for Real-Time Embedded Systems
- 11 Software Architectural Patterns for Real-Time Embedded Systems
- 12 Component-Based Software Architectures for Real-Time Embedded Systems
- 13 Concurrent Real-Time Software Task Design
- 14 Detailed Real-Time Software Design
- 15 Designing Real-Time Software Product Line Architectures
- Part III Analysis of Real-Time Software Designs
- Part IV Real-Time Software Design Case Studies for Embedded Systems
- Appendix A Conventions Used in This Textbook
- Appendix B Catalog of Software Architectural Patterns
- Appendix C Pseudocode Templates for Concurrent Tasks
- Appendix D Teaching Considerations
- Glossary
- Bibliography
- Index
Summary
State machines (also referred to as finite state machines) are used for modeling control and sequencing in a system. This is particularly important for real-time embedded systems, which are usually highly state dependent. In particular, the actions of a state dependent system depend not only on the inputs to the system but also on what happened previously in the system, which is captured as a state. A state machine can be used to depict the states of a system, subsystem, component, or object. Notations used to define state machines are the state transition diagram, state machine diagram, statechart, and state transition table. In highly state dependent systems, these notations help substantially to understand the complexity of these systems.
A state machine specification is typically more precise and understandable than a textual or use case description. State machines can enhance or even replace use case descriptions of requirements by providing more precise specifications. In particular, state machines are essential for specifying systems with significant state dependent behavior.
In the UML notation, a state transition diagram is referred to as a state machine diagram. The UML state machine diagram notation is based on Harel's statechart notation (Harel and Gery 1996; Harel and Politi 1998). In this book the terms state machine and state machine diagram are used interchangeably. This chapter refers to a traditional state transition diagram, which is not hierarchical, as a flat state machine and uses the term hierarchical state machine to refer to the concept of hierarchical state decomposition, a concept introduced by Harel. A brief overview of the state machine notation is given in Chapter 2 (Section 2.6).
This chapter starts by considering the characteristics of flat state machines and then describes hierarchical state machines. To show the benefits of hierarchical state machines, this chapter starts with the simplest form of flat state machine and gradually shows how it can be improved upon to achieve the full modeling power of hierarchical state machines. The process of developing state machines from use cases is then described. Several examples are given throughout the chapter from two case studies, the Microwave Oven and Train Control state machines.
Section 7.1 describes events and states in state machines. Section 7.2 introduces the Microwave Oven Control state machine example.
- Type
- Chapter
- Information
- Real-Time Software Design for Embedded Systems , pp. 100 - 125Publisher: Cambridge University PressPrint publication year: 2016
- 1
- Cited by