-
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
JSON serialization #99
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b808db3
JSON serialization
CloverCho c051709
Serialization
CloverCho db24049
Revive FederatePortAction
CloverCho 4f8fd96
update lf version
CloverCho 82ff65a
Merge branch 'master' into serialization
lhstrh 65c57f6
Fix error of FederatePortAction
CloverCho 0e3db9a
Delete outdated comment
CloverCho 9fdb87e
Remove extra blank
CloverCho 7d6d8e9
Update comments for sendRTIMessage and SendRTITimedMessage
CloverCho 008087b
Update LF version.
hokeun 910b4ab
Update src/core/federation.ts
lhstrh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
774ca3c3bfcfadd490cf878a2b389b6fec7ff1cb | ||
dd9669f7b3ee0d3f1ae906d14c29fe7a71bace78 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1555,8 +1555,8 @@ interface UtilityFunctions { | |
getCurrentPhysicalTime(): TimeValue; | ||
getElapsedLogicalTime(): TimeValue; | ||
getElapsedPhysicalTime(): TimeValue; | ||
sendRTIMessage(data: Buffer, destFederateID: number, destPortID: number): void; | ||
sendRTITimedMessage(data: Buffer, destFederateID: number, destPortID: number): void; | ||
sendRTIMessage<T extends Present>(data: T, destFederateID: number, destPortID: number): void; | ||
sendRTITimedMessage<T extends Present>(data: T, destFederateID: number, destPortID: number): void; | ||
} | ||
|
||
export interface MutationSandbox extends ReactionSandbox { | ||
|
@@ -1663,11 +1663,11 @@ export class App extends Reactor { | |
return getCurrentPhysicalTime().subtract(this.app._startOfExecution); | ||
} | ||
|
||
public sendRTIMessage(data: Buffer, destFederateID: number, destPortID: number) { | ||
public sendRTIMessage<T extends Present>(data: T, destFederateID: number, destPortID: number) { | ||
return this.app.sendRTIMessage(data, destFederateID, destPortID); | ||
}; | ||
|
||
public sendRTITimedMessage(data: Buffer, destFederateID: number, destPortID: number) { | ||
public sendRTITimedMessage<T extends Present>(data: T, destFederateID: number, destPortID: number) { | ||
return this.app.sendRTITimedMessage(data, destFederateID, destPortID); | ||
}; | ||
|
||
|
@@ -1780,22 +1780,22 @@ export class App extends Reactor { | |
/** | ||
* Send an (untimed) message to the designated federate port through the RTI. | ||
* This function throws an error if it isn't called on a FederatedApp. | ||
* @param data A Buffer containing the body of the message. | ||
* @param data The data that contain the body of the message. | ||
* @param destFederateID The federate ID that is the destination of this message. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you update the comment on @param data? It's not a Buffer anymore. |
||
* @param destPortID The port ID that is the destination of this message. | ||
*/ | ||
protected sendRTIMessage(data: Buffer, destFederateID: number, destPortID: number) { | ||
protected sendRTIMessage<T extends Present>(data: T, destFederateID: number, destPortID: number) { | ||
throw new Error("Cannot call sendRTIMessage from an App. sendRTIMessage may be called only from a FederatedApp"); | ||
} | ||
|
||
/** | ||
* Send a (timed) message to the designated federate port through the RTI. | ||
* This function throws an error if it isn't called on a FederatedApp. | ||
* @param data A Buffer containing the body of the message. | ||
* @param data The data that contain the body of the message. | ||
* @param destFederateID The federate ID that is the destination of this message. | ||
lhstrh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* @param destPortID The port ID that is the destination of this message. | ||
*/ | ||
protected sendRTITimedMessage(data: Buffer, destFederateID: number, destPortID: number) { | ||
protected sendRTITimedMessage<T extends Present>(data: T, destFederateID: number, destPortID: number) { | ||
throw new Error("Cannot call sendRTIMessage from an App. sendRTIMessage may be called only from a FederatedApp"); | ||
} | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please remove extra blank lines.