Clearly, states of a machine will be abstracted into tasks, but how are transitions controlled?
The functionality I'm looking for is that only one of the state tasks is active at a time, while the rest block. The task that is running must block itself, and unblock whichever task is next in the state transition model.
The method I thought of is creating an index array of Binary semaphores for each task, and simply giving to the semaphore of whichever task is to be transitioned to.
Alternatively, I could handle all state machine functionality in one task, and regulate which functionality is executed by a switch statement?
Which is more efficient or better practice?