How do I interact with a user in a state machine implementation?

Basically, I have a configurable state machine that basically listens for hardware switch state changes to trigger transitions, but some things need to be communicated with the user ...

For example, the user needs to be told whether to repeat or save and reset.

I have a pretty good idea how to do this ... I can raise events when it comes to this point, and then the user interface layer will ask the user and then trigger the transition, but is there any better way or some templates I should follow?

Just look for some information, so I am not doing it wrong.

I mark this as a wiki community, as this is not the only type of answer to the question.

+3
source share
1 answer

I would suggest that the natural way to organize such communication would be to create a special state (or states) on your computer.

Start → Request username → Say hello

0
source

Source: https://habr.com/ru/post/1730774/


All Articles