-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix federated TS behavior mismatch with federated C, using intended tag from RTI for scheduling federate port action (LF issue #647) #71
Conversation
…se Tag class instead of TimeValue for precise handling of Tags.
…to indicate port-related actions.
…hedule a FederatedPortAction (networkMessage actions).
…catedTag <= currentTag).
This fix will work for centralized coordination (where it is a hard error), but not for decentralized coordination, where it should lead to the invocation of a user-defined fault handler. We can create an issue for this and leave it out of this PR. |
src/core/reactor.ts
Outdated
|
||
if (this.action.origin == Origin.logical && !(this.action instanceof Startup)) { | ||
|
||
if (this.action.origin == Origin.logical && !(this.action instanceof Startup) |
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 would suggest to put this in the else
clause of the if (this.action instanceof FederatePortAction) {
below (and remove the last condition from the branch predicate).
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.
Good point. Done in 61498a6.
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.
These changes look good. As a general comment, federation.ts
could use some refactoring as some of the existing functions in there are pretty huge.
Sounds good. I created a new issue here: #75 |
I don't mean to nitpick, but the name of the tag field carried on timed messages is |
lol not sure what happened in the beginning. Fixed the terms. Thanks for catching this. |
Issue: https://github.com/lf-lang/lingua-franca/issues/648
Fix federated TS behavior mismatch with federated C and add the first step for PTAG handling.
Right now, the PTAG handling only does reading the PTAG message correctly.
Actual semantic handling of PTAG will be implemented in the next PR to keep each PR as short as possible.
Also, please let me know if you have any suggestions for a better way not to add extra microstep for network messages.