O'Reilly logo

Design Patterns for Embedded Systems in C by Bruce Powel Douglass

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5.7 AND-States

The last two patterns in the chapter will deal with the implementation of AND-states. For these patterns, we’ll use the state machine from Figure 5-7 as the example state machine with AND-states and we’ll add a few actions to make it more “real.” Figure 5-20 shows the example state machine we will demonstrate with the pattern.

Image

Figure 5-20 AND-state machine used for example case

The semantics of AND-states is that they are “logically concurrent.” This means that in some sense they execute simultaneously, but what does that mean in a world of run-to-completion semantics? If two AND-states process different events, then AND-states ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required