I am having trouble envisioning how to plan out this application. I originally was going to use an Event Driven Architecture with a Queued State Machine to parse Front Panel UI changes and respond accordingly. (Something like the solution found here).
My problem is that in my consumer loop, one of my states involves an hour long datalogging loop. If I implement the button to start dataloging into my State Machine, it will get held up while the datalogging takes place. Naturally, this would prevent any more events from being de-queued and handled by the State Machine. Is there a way to handle this without holding up my consumer from processing the other controls that get queued by my Event Structure?
I figured I could crudely solve the problem by having two producers/consumers with one for the hour loop button, and another for the more instantaneous events. But I figured there is probably a much more elegant way to handle this. Any suggestions?
**TL;DR - Basically, how do you encorporate a state machine which should have a state with a REALLY long and time-consuming loop without holding up events being queued.