Class: DataSynchronizer

DataSynchronizer(properties)

new DataSynchronizer(properties)

Creates The dataSynchronizer.
Parameters:
Name Type Description
properties Object the property of the object
Properties
Name Type Attributes Default Description
replaySpeed Number <optional>
1 replaySpeed value
timerResolution Number <optional>
5 interval in which data is played (in milliseconds)
dataSources Array.<DataSource> the dataSource array
Source:

Methods

addDataSource(dataSource)

Adds a new DataSource object to the list of datasources to synchronize. note: don't forget to call reset() to be sure to re-init the synchronizer internal properties.
Parameters:
Name Type Description
dataSource DataSource the new datasource to add
Source:

connect()

Connects all dataSources
Source:

disconnect()

Disconnects all dataSources
Source:

getEndTime() → {String}

Gets the endTime of the first DataSource objet
Source:
Returns:
- endTime as ISO date
Type
String

getMaxTime() → {String}

Gets the maxTime of the first DataSource objet
Source:
Returns:
- endTime as ISO date
Type
String

getMinTime() → {String}

Gets the minTime of the first DataSource objet
Source:
Returns:
- startTime as ISO date
Type
String

getReplaySpeed() → {Number}

Gets the replaySpeed
Source:
Returns:
- the replay speed
Type
Number

getStartTime() → {String}

Gets the startTime of the first DataSource objet
Source:
Returns:
- startTime as ISO date
Type
String

(async) isConnected()

Connect the dataSource then the protocol will be opened as well.
Source:

push(dataSourceId, data)

Parameters:
Name Type Description
dataSourceId String the dataSource id
data Object the data to push into the data synchronizer
Source:

reset()

Resets reference time
Source:

setReplaySpeed()

Sets the replaySpeed
Source:

setTimeRange(startTime, endTime, replaySpeed, reconnect)

Sets the data source time range
Parameters:
Name Type Default Description
startTime String the startTime (in date ISO)
endTime String the startTime (in date ISO)
replaySpeed Number the replay speed
reconnect boolean false reconnect if was connected
Source:

terminate()

Terminate the corresponding running WebWorker by calling terminate() on it.
Source: