Skip to content
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 11 commits into from May 10, 2022
Merged

JSON serialization #99

merged 11 commits into from May 10, 2022

Conversation

CloverCho
Copy link
Collaborator

@CloverCho CloverCho commented Apr 27, 2022

LF PR to be merged together with this PR: lf-lang/lingua-franca#1125

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);
Copy link
Member

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");

Copy link
Member

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.
Copy link
Member

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.

src/core/reactor.ts Show resolved Hide resolved
Copy link
Member

@hokeun hokeun left a 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?

src/core/federation.ts Outdated Show resolved Hide resolved
@lhstrh lhstrh merged commit 039f04a into master May 10, 2022
goekberk added a commit to goekberk/reactor-ts that referenced this pull request May 11, 2022
This reverts commit 039f04a, reversing
changes made to b4ab066.
goekberk added a commit to goekberk/reactor-ts that referenced this pull request May 11, 2022
@lhstrh lhstrh added the feature label Jul 20, 2022
@axmmisaka axmmisaka deleted the serialization branch May 28, 2023 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants