Developing embedded applications using Finite State Machines, Extended Finite State Machines, Hierarchical Finite State Machines and Statecharts using Visual State
Course
Inhouse
Description
-
Type
Course
-
Methodology
Inhouse
-
Duration
5 Days
Students completing this course will considerably improve the discipline and rigour with which they design and write embedded systems applications in C by applying sound state machine and statechart approaches. You will understand how state machine and statechart diagrams can be converted into working C code. In the case of more complex statecharts this will include an. Suitable for: Attendees should have some experience of embedded systems programming and a sound basic knowledge of the C language. Course IAR101, "Introduction to C for Embedded Systems Developers" provides suitable background. They should also have some understanding of basic state machine concepts.
Reviews
Course programme
Analysis , Design and Implementation of systems based on state machines and their extensions is rarely taught in any depth. This course aims to, at least in part, redress the balance. The course explores the strengths and limitations of approaches based on Finite State Machines and their various extensions up to and including Statecharts. Unlike traditional UML courses the emphasis here is primarily on state machine and statechart approaches to the design and implementation of specialised embedded systems applications. As well as converting designs into code by hand the course also provides an in depth introduction to working with IAR's Visual State Case Tool. Topics covered include:
- Simple Finite State Machines
- Event driven programming patterns and "Active objects"
- Mapping of Ladder Logic PLC diagrams into state machine diagrams
- Hierarchical and Extended Finite State Machines
- Statecharts
- Converting state machine designs into working C code
The course uses ARM / AVR processors as embedded target platforms for hands-on work and IAR's Visual State CASE tool. Some of the labs will run on PC workstations and be developed using either Visual Studio or GNU C compilers.
Course Benefits
Students completing this course will considerably improve the discipline and rigour with which they design and write embedded systems applications in C by applying sound state machine and statechart approaches.
You will understand how state machine and statechart diagrams can be converted into working C code. In the case of more complex statecharts this will include an appreciation of the underlying multi-tasking and inter-process communications principles involved in realising the designs.
You'll learn how to use Visual State to its greatest effect both when designing and when implementing complex embedded systems applications.
Course Contents
Introduction to Simple Finite State Machines (FSMs)
- Events, States, Actions and Transitions
- Mealy machines and Moore machines and how they are related
- Parsing and the implementation of simple parsers using Finite State Machine approaches
- switch statement approach to FSM implementation
- table driven programming approach to FSM implementation
- Limitations of simple Finite State Machines
- Pushdown automata
- Extending FSMs by adding variables and conditional transitions
- Communicating extended FSMs and the principles underlying SDL
- Basic SDL approaches to the design and implementation of communications protocols
- Designing and deploying micro-messaging protocols in distributed embedded systems applications
- Communication Protocol Case study using the HART Protocol
- Managing complexity and "combinatorial explosions" when designing with state machines
- Abstraction
- Orthogonality
- Entry processing
- Exit processing
- In state processing
- History mechanisms
- Transition guards
- Statecharts and muli-tasking
- Orthogonal statecharts and concurrency
- Active objects - linking multi-tasking, message passing and event driven programming
- Creating Visual State projects
- Generating code from a Visual State Design
- Adapting the generated code to work with an embedded operating system
- Refactoring state machine and Statechart designs for maintainability and code reuse
- Refactoring state machine and Statechart designs for performance
- Testing, verification and validation of Statechart designs
- Errors and exceptions and how they fit into state machine and statechart design
- user interfaces as event driven systems
- patterns and strategies for handling complexity in user interfaces
- widgets as higher level abstractions in user interfaces
- Statechart approaches to the analysis, design, realisation and testing of user interfaces
- common sense "cognitive psychology" and the design of "gesture driven" interactive systems
Developing embedded applications using Finite State Machines, Extended Finite State Machines, Hierarchical Finite State Machines and Statecharts using Visual State