-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Progress Data Progress Path Progress Paramaters onDataSync
- Loading branch information
1 parent
1f9a884
commit db5300c
Showing
8 changed files
with
83 additions
and
61 deletions.
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
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 |
---|---|---|
@@ -1,13 +1,21 @@ | ||
function callOnDataSyncEvent() { | ||
if (this.events.dataSync) { | ||
this.events.dataSync(message.data, message.packetId); | ||
} | ||
export async function callOnDataSyncEvent(message) { | ||
console.log('callOnDataSyncEvent', message.packetId); | ||
this.events.dataSync(message.data, message.packetId); | ||
} | ||
export function onDataSync(message) { | ||
if (message.packetId === this.onDataCurrentId) { | ||
|
||
while (this.) { | ||
|
||
export async function onDataSync(message) { | ||
const source = this; | ||
if (source.events.dataSync) { | ||
const { packetId } = message; | ||
const { incomingDataPackets } = this; | ||
if (packetId === this.onDataCurrentId) { | ||
await source.callOnDataSyncEvent(message); | ||
const nextId = this.onDataCurrentId++; | ||
let currentMessage = source.incomingDataPackets[this.onDataCurrentId]; | ||
while (currentMessage) { | ||
await source.callOnDataSyncEvent(currentMessage); | ||
this.onDataCurrentId++; | ||
currentMessage = source.incomingDataPackets[this.onDataCurrentId]; | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export async function onParameters(message) { | ||
console.log('On Params event'); | ||
if (this.events.params) { | ||
this.events.params(message.params, message.pid); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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