Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
#38 State Machines Part-4: State Tables and Entry/Exit Actions
Play lesson

Modern Embedded Systems Programming Course - #38 State Machines Part-4: State Tables and Entry/Exit Actions

4.0 (6)
56 learners

What you'll learn

This course includes

  • 22.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

This lesson continues on the subject of STATE MACHINES, whereas today's subject is "State Tables and Entry/Exit Actions". You'll learn about state tables and you will see how to implement state tables in C. Later you'll see how to extend this implementation to add state entry and exit actions. The lesson starts with showing types of state tables (a.k.a., state-transition tables). And then you see an example of constructing a state table for the Time-Bomb state machine that you already used and coded in lesson 36. Next, you see how to implement that state machine in C, using two-dimensional arrays of pointers to functions (actions functions in this case). Later the lesson introduces entry and exit actions to states and shows how they can help to avoid repetitions of actions on transitions. You'll also see that entry/exit actions correspond to Moore machines, while actions on transitions to Mealy machines. While software state machines have typically both the Mealy and Moore characteristics, the general recommendation is to strive for Moore-type state machines with most actions executed in entry/exit to states. The project for this lesson is based on the Time Bomb state machine and the uC/AO active object framework used in lesson 36. The project shows a state table with entry/exit actions as well as the QM model of the TimeBomb state machine. ------- 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/lesson38.txt Music credits: The background music comes from: https://www.bensound.com/royalty-free-music/track/straight

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere