mercredi 1 juillet 2015

State Machine and combination of conditions

I want to implement a finite state machine by using State Pattern but I can't wrap my head around it. In short it's like:

If error -> error state
if A && B && C -> second state
if condition A -> first state

At any state, on error, we go to error state. inputs (events) A, B and C might arrive at any order but if they all pass we go to 2nd state. If only input A applies, then we go to 1st state.

I'm not looking for implementation but more interested in how to draw the state diagram. I'm a bit confused.

Aucun commentaire:

Enregistrer un commentaire