State transition design

This post describes state transition design.

State transition design is often performed as part of architectural design with the design defining the elements in the table below.

Elementsummary
StateDefinition of functions to be performed = Definition of execution components.
Transition condition (event)Define state transition conditions.
State-to-State interfaceDefinition of state-to-state interface variables.

State transition design is a concrete process that involves the following steps.

Step-1 Create a State transition diagram
State transition diagrams define the relationship between states and events. Visualization as a diagram makes it easier to think and to grasp the overall picture and flow of states at a glance. In addition, complex states can be more easily understood by organizing them in a hierarchical manner.

Step-2 Create a State transition table
State transition tables organize the contents of state transition diagrams in a tabular format, clarifying the relationship between states and events and facilitating verification of completeness. In addition, compared to state transition diagrams, state transition tables have the advantage of being written in a format closer to code, making them easier to use as software specifications as is.

Step 3 Create a static variables table for each state ! Points often overlooked in design !
Static Variables Table for each state organizes the static variables used in each state in a tabular format. If there are variables that are shared between states, it must be clearly defined whether the variable inherits values from the previous state or resets to initial values upon state transition.

FYI: About Static Variables
I classify static variables as follows
Static variables used for interfaces between components: global variables
Static variables used only within components: static variables

If there are any changes in hardware (microcontroller, circuits, ICs, etc.) settings or communication during state transitions, it is recommended to design a table as shown in Step 3.

OSS-ECAL English
error: Content is protected !!