Class: TimeSeriesDataSource

TimeSeriesDataSource(name, properties, worker)

The DataSource is the abstract class used to create different datasources.

Constructor

new TimeSeriesDataSource(name, properties, worker)

Parameters:
Name Type Description
name String the datasource name
properties Object the datasource properties
Properties
Name Type Attributes Default Description
timeShift Boolean <optional>
false fix some problem with some android devices with some timestamp shift to 16 sec
bufferingTime Number 0 defines the time during the data has to be buffered. Useful only when used with DataSynchronizer
timeOut Number <optional>
0 defines the limit time before data has to be skipped. Useful only when used with DataSynchronizer
protocol String defines the protocol of the datasource. @see DataConnector
endpointUrl String the endpoint url
service String the service
offeringID String the offeringID
observedProperty String the observed property
startTime String the start time (ISO format)
endTime String the end time (ISO format)
minTime String <optional>
properties.startTime the min range time (ISO format)
maxTime String <optional>
properties.endTime the max range time (ISO format)
replaySpeed Number <optional>
1 the replay factor
responseFormat Number <optional>
the response format (e.g video/mp4)
reconnectTimeout Number <optional>
10000 the time before reconnecting (in milliseconds)
batchSize Number <optional>
1 the number of data to fetch
customUrlParams Object <optional>
{} custom parameters appended to the URL as they are
worker Object DataSource worker
Source:

Methods

getEndTime() → {String}

Gets the endTime
Source:
Returns:
- endTime as ISO date
Type
String

getMaxTime() → {String}

Gets the endTime
Source:
Returns:
- endTime as ISO date
Type
String

getMinTime() → {String}

Gets the startTime
Source:
Returns:
- startTime as ISO date
Type
String

getReplaySpeed() → {String}

Gets the endTime
Source:
Returns:
- endTime as ISO date
Type
String

getStartTime() → {String}

Gets the startTime
Source:
Returns:
- startTime as ISO date
Type
String

(protected) initDataSource(properties)

Inits the datasource with the constructor properties.
Parameters:
Name Type Description
properties
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:

updateProperties(name, properties)

Update properties
Parameters:
Name Type Description
name String the datasource name
properties Object the datasource properties
Properties
Name Type Description
timeShift Boolean fix some problem with some android devices with some timestamp shift to 16 sec
bufferingTime Number defines the time during the data has to be buffered
timeOut Number defines the limit time before data has to be skipped
protocol String defines the protocol of the datasource. @see DataConnector
endpointUrl String the endpoint url
service String the service
offeringID String the offeringID
observedProperty String the observed property
startTime String the start time (ISO format)
endTime String the end time (ISO format)
replaySpeed Number the replay speed
responseFormat Number the response format (e.g video/mp4)
reconnectTimeout Number the timeout before reconnecting
Source: