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

How to split a large state machine into several small state machines and put them in different files #20

Open
mjt123 opened this issue Feb 9, 2022 · 2 comments

Comments

@mjt123
Copy link

mjt123 commented Feb 9, 2022

A large state machine results in many lines of code,so i want to put some sub states in other files,How can I achieve it
thanks

@amaiorano
Copy link
Owner

Hi @mjt123. Yes, you're right, and not the first to bring this up. I need to add a section to the Wiki/Book about how to do this. In the meantime, here's an answer I gave to a similar question a while back: #9 (comment). See the very last paragraph for one way to split up large HSMs so that you have only the root state declared in header files. Let me know if this helps.

@mjt123
Copy link
Author

mjt123 commented Feb 17, 2022

hi @amaiorano,it works.And as you said, dealing with dependencies between States is cumbersome.
Thank you for your advice,expected seeing this part of the wiki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants