© John T. Taylor, Wayne T. Taylor 2021
J. T. Taylor, W. T. TaylorPatterns in the Machinehttps://doi.org/10.1007/978-1-4842-6440-9_10

10. Finite State Machines

John T. Taylor1   and Wayne T. Taylor2
(1)
Covington, GA, USA
(2)
Golden, CO, USA
 
State machines, or finite state machines (FSM), are handy-dandy tools for providing a deterministic framework for your application to deal with asynchronous behaviors. These are things like
  • Software timers

  • Communication protocols

  • Hardware interrupts

  • User events

  • Polled events

Here is a good, general-purpose definition of what a state machine is:

A finite-state machine (FSM) is a mathematical model of computation . It is an abstract machine that can be in exactly one of a finite number of states at any given time. The FSM ...

Get Patterns in the Machine: A Software Engineering Guide to Embedded Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.