-
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
Conversation
src/core/federation.ts
Outdated
public registerFederatePortAction<T extends Present>(federatePortID: number, federatePortAction: Action<Buffer>) { | ||
Object.setPrototypeOf(federatePortAction, FederatePortAction.prototype); | ||
public registerFederatePortAction<T extends Present>(federatePortID: number, federatePortAction: Action<T>) { | ||
//Object.setPrototypeOf(federatePortAction, Action<T>.prototype); |
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 commented line.
let msg = Buffer.alloc(data.length + 21); | ||
public sendRTITimedMessage<T extends Present>(data: T, destFederateID: number, destPortID: number, time: Buffer) { | ||
const value = Buffer.from(JSON.stringify(data), "utf-8"); | ||
|
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.
@@ -1784,7 +1784,7 @@ export class App extends Reactor { | |||
* @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 comment
The 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.
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 looks good to me. @lhstrh Could you please take another look?
…ion"" This reverts commit e055dca.
LF PR to be merged together with this PR: lf-lang/lingua-franca#1125