#42 State Machines Part-8: Semantics of Hierarchical State Machines
19.6K views on YouTube
This lesson continues the subject of STATE MACHINES. Today you will dive deeper into the semantics of hierarchical state machines. Specifically, in this lesson, you will examine a hierarchical state machine with multiple levels of state nesting. You will then see how this more advanced state machine handles various transitions and exactly which actions are executed in which order.
Contents with Timestamps:
————————-
1:40 The QHsmTst example in the QP/C framework directory
2:15 Download for the book “Practical UML Statecharts in C/C++”
2:30 Explanation of the QHsmTst example
3:52 Concept of “Software Tracing”
4:38 Code generated from QHsmTst model
4:55 Personal story and a case for code generation
6:10 Building the QHsmTst example from the command prompt
7:25 Explanation of the semantics
7:35 Semantics of the top-most initial transition
9:19 Semantics of regular state transitions
10:05 Least Common Ancestor (LCA) state
10:49 Semantics of internal transitions
11:28 Semantics of self transitions
13:04 Semantics of guard conditions (on regular transitions)
14:20 Guaranteed cleanup and initialization
15:17 High-Level Transitions
15:42 Guard conditions (on internal transitions)
16:45 Copying and modifying the QHsmTst example
18:00 Defining the QPC environment variable
18:52 Adjusting the Makefile
19:48 The explicit [else] guard condition
20:40 Cleanly terminating a state machine
22:05 Summary
——-
Resources:
Companion web page for this video course:
https://www.state-machine.com/quickstart
GitHub repository for projects for this video course:
https://github.com/QuantumLeaps/modern-embedded-programming-course
Transcript of this lesson:
https://www.state-machine.com/course/lesson42.txt
Recommended Reading:
“Practical UML Statecharts in C/C++, 2nd Edition: Event-Driven Programming for Embedded Systems” by Miro Samek
(https://www.state-machine.com/psicc2)
Music credits:
The background music comes from:
https://www.bensound.com/royalty-free-music/track/straight