Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/02/10 15:57
Read: times


 
#177069 - asked and answered
Responding to: ???'s previous message
1> Is there any value in breaking up a state machine even though it spans multiple pages? It might be a little more "presentable" but adds more overhead in additional state variables and return value checks.

2> Is a state machine the a good way to code multi-level user menus? It was my first inclination, and does work, but if there is a more industry standard way to do such things, I'd like to know.


you answer "Is there any value in breaking up a state machine" yourself. Make every level a separate function.

you can also; while having the state storage local make the state names global and make subfunctions like this

U8 next_state subfunc (U8 current_state)

and call

state subfunc(state);

Erik


List of 29 messages in thread
TopicAuthorDate
Uart user menu via switch/case state machine            01/01/70 00:00      
   State machine can be small.            01/01/70 00:00      
   My take....            01/01/70 00:00      
   asked and answered            01/01/70 00:00      
      Broken and Fixed            01/01/70 00:00      
         excellent            01/01/70 00:00      
            My experience as well....            01/01/70 00:00      
               My experience as well....            01/01/70 00:00      
               But you're the writer...            01/01/70 00:00      
                  out of context            01/01/70 00:00      
                     Yes, Chances are no one else will see your code            01/01/70 00:00      
                        male cow manure            01/01/70 00:00      
                           Don't be too over confident            01/01/70 00:00      
                  Just Concepts            01/01/70 00:00      
                     Don't think own code is the best            01/01/70 00:00      
                     exactly            01/01/70 00:00      
                        what I have done a lot of lately is            01/01/70 00:00      
   Protothreads???            01/01/70 00:00      
   A case for a CASE tool?            01/01/70 00:00      
      Using a tool like that........            01/01/70 00:00      
         Thanks Michael...            01/01/70 00:00      
            Pencil and paper            01/01/70 00:00      
      Pros and Cons            01/01/70 00:00      
         Analysis/Design            01/01/70 00:00      
            Enterprise Architect            01/01/70 00:00      
               RE: Enterprise Architect            01/01/70 00:00      
                  Reverse State Tables            01/01/70 00:00      
                     RE: "Reverse-engineering"            01/01/70 00:00      
                        php and html when documenting            01/01/70 00:00      

Back to Subject List