Introduction to state machines in Embedded Software Design
- Swift Act LLC is an engineering consultancy established in 2017 with legal representation in Egypt and Germany and experience in industries like automotive, IoT, and consumer electronics. - A state machine is a model used to describe the behavior of systems that can be in one of a finite number of states, triggered by external events to transition between the states. - State machines have elements like states, transitions, events, and actions and can be represented graphically, tabularly, or textually. They are commonly used in software design and coding.
An introductory overview of the concept of State Machines.
Overview of Swift Act LLC, established in 2017, with expertise in various fields including automotive, emphasizing partnerships, values, and compliance.
Basic explanation and definition of a State Machine.
Rationale behind using State Machines in various applications.
Explanation of the hierarchical nature of State Machines.
Discussion on the concurrent handling capabilities of State Machines.
Key components of a State Machine including States, Transitions, Events, and Actions.
Detailed attributes of States in a State Machine, including definitions of initial and end states.
Visual illustration of State Machine processes such as playing, pausing, and stopping a song.
Tabulated overview of state relationships and events with corresponding actions.
Describes how State Machines can be represented in a textual format.
Considerations related to events in designing State Machines, including input and timing events.
Discussion on coding mechanisms for State Machines, including function structures.
Example of a Data-Indexed State Machine and its implementation.
Further insights into the Data-Indexed State Machine example.
Introduction to an Execution-Indexed State Machine with examples.
Continuation of examples related to Execution-Indexed State Machines.
Emphasis on the hierarchical aspect of State Machines.
Testing methods for State Machines focusing on States, Events, Actions, and Paths.
Continued discussion on various coverage testing methods for State Machines.
Additional testing methods examining States, Events, Actions, and Paths.
Continued content reviewing concepts of coverage in State Machine testing.
Introduction to transition coverage testing methods, including n-switch positive testing.
Differentiating between 0-switch and 1-switch transition coverage techniques.
Methodology for implementing a systemic strategy in 0-switch testing.
Guidelines for a systematic approach to n-switch testing models.
Exploration of negative testing, including testing invalid transitions in State Machines.
Practical example of a digital clock implemented as a State Machine.
Block diagram illustrating the digital clock system components.
Overview of software elements related to the Digital Clock case study.
Discussing the role of Solid State Devices in the Digital Clock case study.
Outlining the timing settings (hours, minutes) in the digital clock implementation.
Describes blink management for time display (hours, minutes, seconds) in the digital clock.
Final remarks on the importance and implementation of State Machines at Swift Act LLC.
About Swift ActLLC Introduction to State Machine @ Swift Act LLC ❑ Established @ end of 2017 ❑ Legal representation in Egypt and Germany ❑ Experience in Automotive, Industrial Automation, IoT, consumer electronics … ❑ Safety critical experience: IEC 61508, ISO 26262 ... ❑ Process compliance: A-SPICE and CMMI ❑ Mission: Long-term partnership with stakeholders ❑ Vision: Maximizing value for stakeholders ❑ Values: Ethics, Empowerment, Professionalism, Team Work and Trust ❑ www.swift-act.com
3.
What is aState Machine? Introduction to State Machine @ Swift Act LLC
4.
Why a StateMachine? Introduction to State Machine @ Swift Act LLC
5.
State Machines areHierarchical Introduction to State Machine @ Swift Act LLC
6.
State Machines areConcurrent Introduction to State Machine @ Swift Act LLC
States are ... Introductionto State Machine @ Swift Act LLC States Finite Distinct 1 or more initial states 0 or more end states 0 or more intermediate states
9.
State Machine GraphicalRepresentation Introduction to State Machine @ Swift Act LLC Stopped Playing Paused Play/Song is Playing from beginning Stop or Song Finished/Song is Stopped Pause/Song is Paused Play/Song is Resumed Stop/Song is Stopped
10.
State Machine TabularRepresentation Introduction to State Machine @ Swift Act LLC Current State Event Action Next State Stopped Play Play song from beginning Playing Stopped Pause Stopped Stopped Stop Stopped Stopped Song finished Stopped Playing Play Playing Playing Pause Song is paused Paused Playing Stop Song is stopped Stopped Playing Song finished Song is stopped Stopped Paused Play Song is resumed Playing Paused Pause Paused Paused Stop Song is stopped Stopped Paused Song finished Paused
State Machine fromDesign PoV Introduction to State Machine @ Swift Act LLC Events Timing events only? Input events only? Timing and input events
13.
State Machine fromCoding PoV Introduction to State Machine @ Swift Act LLC Function for every state? Similar? 1 function + Data Different? State type + State variable + function (switch-case) + function for every state (optional)
Case Study: DigitalClock Introduction to State Machine @ Swift Act LLC Digital ClockSet Button + Button - Button Hours Units SSD Minutes Tens SSD Hours Tens SSD Minutes Units SSD
29.
Case Study: BlockDiagram Introduction to State Machine @ Swift Act LLC Digital Clock SW Time SSD Display
Case Study: Time Introductionto State Machine @ Swift Act LLC Set Hours Set Minutes Normal Set is pressed Set is pressed Set is pressed
33.
Case Study: Display Introductionto State Machine @ Swift Act LLC Blink Hours Blink Minutes Blink Seconds Time mode = Set Hours Time mode = Set Minutes Time mode = Normal