views:

77

answers:

1

Basically I have a custom implemented finite state machine that mostly listens for hardware switch state changes for initiating transitions, but some things need communication with the user...

For instance, the user needs to tell it whether to repeat or save and reset.

I have a pretty good idea of how to do it... I can raise events when it gets to that point, and then the UI layer will ask the user and then trigger the transition, but is there some better way or some patterns I should be following?

Just looking for some insight so I don't do this the wrong way.

I'm marking this as community wiki since it's not really a single answer type of question.

A: 

I'd guess that a natural way to organize such communication would be to set up a special state (or states) in your machine.

Start -> Ask user's name -> Say hello

Yacoder
That makes perfect sense. Don't know I wasn't thinking of doing it that way in the first place
Max Schmeling