Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6145203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:45:39+00:00 2026-05-23T18:45:39+00:00

I have made several menus using FSM’s but with a VERY clunky interface. I

  • 0

I have made several menus using FSM’s but with a VERY clunky interface. I took a year long break from programming to facilitate a relocation and just tonight re-wrote my old FSM code.

It can be seen HERE

The problem with my code is it requires heavy rework of the StateMachine class and the event processor whenever you change the implementation. As this is on an embedded device I can not use the BOOST::FSM so I want to write my own class that is robust enough to handle things like menus and programming antilogarithms (ICSP for a PIC for example is a simple FSM)

How would you guys recommend I make my state machine more useable?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:45:40+00:00Added an answer on May 23, 2026 at 6:45 pm

    If you’re writing your own class – consider implementing a generic FSM, and then fill it with states and events.

    Basically it would be a simple interface with something like this as methods:

    create();
    addState(someState, stateFunction);
    addEdge(someStateOrig, someStateDest, event);
    processEvent(event);
    start(startFromState);
    

    That should cover it. Then, when you create the FSM – feed it with your states, and functions to execute when you reach the state, and the events that make the FSM move from one state to another.

    Then you just start the FSM at some state which will be the start state, and feed the events.

    If you need to change the events, functions, or states – the FSM implementation remains the same, you change the code that uses it, as it should be.

    That is more or less what Boost.FSM gives you, but you said you can’t use it – so do it on your own:-)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a very simple page using google maps API with several fields
so i have made several attempts at this, but decided i needed some advice
I've tried several things... using Variables and Templates, and have made some slow progress.
I've come across an intriguing problem. I have an application made of several assemblies.
I have several libraries made by myself (a geometry library, a linked list library,
I have a class made up of several fields, and I have several constructors.
I have just ported several of our home-made Outlook COM-addins from Delphi 2007 to
For several applications I made for my current client I have shared user accounts.
I have some* experience using the flex framework for building web apps. But I
I have made several changes to both debug and release settings and now I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.