Class: DataSynchronizerReplay

DataSynchronizerReplay(properties, timeSync)

new DataSynchronizerReplay(properties, timeSync)

Creates The dataSynchronizer.
Parameters:
Name Type Description
properties Object the property of the object
Properties
Name Type Attributes Default Description
id String <optional>
randomUUID id of the dataSynchronizer or random if not provided
replaySpeed Number <optional>
1 replaySpeed value
timerResolution Number <optional>
5 interval in which data is played (in milliseconds)
masterTimeRefreshRate Number <optional>
250 interval in which time value is send through broadcast channel (in milliseconds)
mode Number <optional>
Mode.REPLAY mode of the data synchronizer
minTime String min range time as ISO date
maxTime String max range time as ISO date
dataSources Array.<Datasource> the dataSource array
timeSync DataSynchronizer dataSynchronizer
Source:

Methods

(async) 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 TimeSeriesDataSource the new datasource to add
Source:

(async) connect()

Connects all dataSources
Source:

(async) disconnect()

Disconnects all dataSources
Source:

getEndTimeAsIsoDate() → {String}

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

getMaxTimeAsIsoDate() → {String}

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

getMaxTimeAsTimestamp() → {String}

Gets the maxTime of the first DataSource objet
Source:
Returns:
- endTime as unix timestamp
Type
String

getMinTimeAsIsoDate() → {String}

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

getMinTimeAsTimestamp() → {String}

Gets the minTime of the first DataSource objet
Source:
Returns:
- startTime as unix timestamp
Type
String

getReplaySpeed() → {Number}

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

getStartTimeAsIsoDate() → {String}

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

getStartTimeAsTimestamp() → {String}

Gets the startTime of the first DataSource objet
Source:
Returns:
- startTime as unix timestamp
Type
String

(async) isConnected()

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

(async) push(dataSourceId, data)

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

(async) removeDataSource(dataSource)

Removes a DataSource object from the list of datasources of the synchronizer.
Parameters:
Name Type Description
dataSource TimeSeriesDatasource the new datasource to add
Source:

(async) reset()

Resets reference time
Source:

(async) setReplaySpeed()

Sets the replaySpeed
Source:

(async) setTimeRange(startTime, endTime, replaySpeed, reconnect, mode)

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
mode Mode default dataSource mode
Source:

terminate()

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