You can read this question where I ask about the best architecture for a machine application for a short story, although this is not entirely necessary in order to help me in this matter.
My understanding (especially for implementation) of the Finite State Machine is a little young and maybe a little, but I implement this application as one, and I have a place where I somehow need to have an embedded FSM. Basically, a machine has several high-level states (Cold [aka just started], Homing In, Setup, Ready to Run, Running, Reporting, Reseting), but when the machine is running, it needs to have a small FSM implementation for (Lens loading , edge location, measuring wedge, roundness measurement and completion [may be still there]).
My question is this: should I build the possibility of "nested states" when a state can have a list of sub-states, and the system can enter these sub-states, and these sub-states can return to their parent states? Or should I just turn the FSM implementation into the Running state and save them as two different FSMs? Or do you think I'm doing or think something dumb and should rethink it?
Thoughts, suggestions, criticism and advice are welcome.
source
share