-
Notifications
You must be signed in to change notification settings - Fork 34
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
State Machines Phase 2 #534
Conversation
Make event logging function const when there is no throttling
Make functions const where possible
Notes from Review on 11/19/24User's Guide
|
Add state machine diagrams
Notes from Review on 11/20/24Notes on this PR
Notes on F Prime BranchSee #508 (comment) |
All requested action items from 11/19/24 and 11/20/24 are complete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I skimmed through the generated code and it looks pretty good to me. One minor note is that it may be better in the future to build in the implementation of the state machine into the component class itself (i.e. dump the state machine logic into the owner class)
At the moment we are calling into the state machine from the component which in turns calls out actions back to the component. Another option might be to put the state machine action implementations in the hpp
so that they may be inlined.
Thanks for your comments.
Do you mean replicate the state machine base class in every component where the state machine is instantiated? Wouldn't that cause code duplication if the same state machine is used in more than one component? Or do you mean eliminate the inner class that implements the state machine? We know a way to do that, but it uses multiple inheritance and to me seems less clean than the solution we have adopted. It also has slightly worse type safety.
I think the action implementations can be inlined. There are two levels of action implementation (in the inner class and in the component class) but they are both defined in the same auto-generated cpp file, so the compiler can see them both. |
This pull request integrates Phase 2 state machines from the feature branch to main.
There are a lot of changes here, so I'll schedule one or more meetings to go over them.