-
Notifications
You must be signed in to change notification settings - Fork 63
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
Simplify conditional fed codegen #970
Conversation
…ame class and add getParent(int) method
…some code into private methods
…to actions so that we can disallow top-level ports
…p-level reactor and the other on the contained reactors.
It looks like a few validation tests have ports in the main reactor. |
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.
This PR makes the CGenerater code a lot cleaner!
I think we should perhaps wait for @housengw to see if these changes would interfere with his work in #958.
One note: It looks like I had missed the addition of currentFederate
as a class variable in a previous PR. I think relying on currentFederate
could make it harder to break the CGenerator into multiple, smaller generators (like the CppGenerator).
the code changes that overlap with #958 are minor. Is there a reason behind using |
Every function needs it. We could pass it as a parameter, but it gets pretty tedious. |
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.
this PR looks good. We just need to keep track of where currentFederate
can be modified..
This PR is a small step towards improving the C codegen structure. It includes the following: