We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, all This topic is a little different from C51. I still hope that someone can help me. Thanks! A lot of signals will come into my firmware, and the firmware do approprate action based on its state and receiveing event. So there are several concurrent state machine. My possible solution is use several global variables to store states. Is there any other better solution? Second, as there is a large number of incoming events, how can i identify those events quickly? Any suggestion? Thanks!
"there are several concurrent state machine. My possible solution is use several global variables to store states. Is there any other better solution?" Unless all your state machines need access to each other's states, don't make them global. Try 'static' instead. "how can i identify those events quickly?" Without knowing the nature of the events, and how they get into your system, it's hard to say!