Finite state machines — implementation options

This chapter discusses various alternative transformation techniques to obtain runnable code from a Finite State Diagram (FSD). It also presents an example application for the recommended Finite State Table (FST) implementation technique. There are five alternative transformation techniques: sequential coding, switch-case, goto-label, finite state table, and Object-oriented Programming (OOP). The need to pre-process incoming data and interrupt signals into a single finite state machine (FSM) event number is discussed. This activity is described as the 'laundry'. Several FSMs may readily be run concurrently to fully implement a parallel real-time system. Using C++ or Java to implement an FSM using object-oriented techniques can offer difficulties and new opportunities for dynamic expression.