new DataSynchronizerRealtime(properties, timeSync)
Creates The dataSynchronizer.
Parameters:
Name | Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
properties |
Object | the property of the object
Properties
|
|||||||||||||||||||||||||
timeSync |
DataSynchronizer | dataSynchronizer |
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 |
(async) connect()
Connects all dataSources
(async) disconnect()
Disconnects all dataSources
(async) isConnected()
Connect the dataSource then the protocol will be opened as well.
(async) push(dataSourceId, data)
Parameters:
Name | Type | Description |
---|---|---|
dataSourceId |
String | the dataSource id |
data |
Object | the data to push into the data synchronizer |
(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 |
(async) reset()
Resets reference time
terminate()
Terminate the corresponding running WebWorker by calling terminate() on it.