I am working on C++ code that maintains several enum types. Say 3 to 4 enum types each with at least 4 different values. Plus the code maintains several boolean variables. The code is multi threaded and across different threads, it uses the state indicated by these enum variables and boolean values to drive code flow. This led to foll..
Tag : embedded-systems
I frequently use the concept of Active Objects (https://www.state-machine.com/active-object) combined with state machines when designing code. The key idea behind these is that only “events” are fed into (and out of) an object and state machines “react to” these events. This leads to a very different type of design from a sequential program. Whereas a sequential program is designed in a “do this, then this returning some results, then do something with those results, …” an active object/event-based design is “when event A happens do this and emit eve..