Can someone post a block diagram for a queued event handler/state machine using channel wires? I'm looking for the channel equivalent of this. In particular, I'm trying to figure out how a state machine transitions itself, i.e. can it send a channel message to itself? I want to use a shift register to store the current state, but then how to choose between the state in the shift register and the state in the incoming message from the event handler?
This is as far as I've gotten.