Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoped signals, actions and guards #592

Open
zimri-leisher opened this issue Feb 3, 2025 · 0 comments
Open

Scoped signals, actions and guards #592

zimri-leisher opened this issue Feb 3, 2025 · 0 comments
Labels
proposed feature A proposed new feature

Comments

@zimri-leisher
Copy link

I have a suggestion for enhancing the FPP state machines that would allow users to give their SMs more well-defined structure:

  • signals, actions and guards with "state-local scope"
  • if we could define a signal/action/guard inside of a state, and make that signal/action/guard only visible to that state and its substates, this would allow us to define which signals/actions/guards can legally be used inside of each state
  • right now, a common pattern I have is:
    image
  • where stepStatement is expected to raise one of the 5 signals that follow it. It would be a coding error for A) any other function to raise one of these signals and B) for this function NOT to raise one of these signals
  • allowing users to define s./a./guards in a state would prevent A)
  • I imagine it would look like this:
    image

Originally posted by @zimri-leisher in nasa/fprime#2848 (reply in thread)

@bocchino bocchino added the proposed feature A proposed new feature label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposed feature A proposed new feature
Projects
Status: To do
Development

No branches or pull requests

2 participants