Class: Chart

OSH.DataReceiver. Chart

This datasource provides parsing to chart data.
Data has to be under the format : ISODATE,X,Y,

Example

var chartDataSource = new OSH.DataReceiver.Chart("chart", {
protocol: "ws",
service: "SOS",
endpointUrl: "sensiasoft.net:8181/sensorhub/sos",
offeringID: "urn:mysos:offering03",
observedProperty: "http://sensorml.com/ont/swe/property/Weather",
startTime: "now",
endTime: "2055-01-01Z",
syncMasterTime: false,
bufferingTime: 1000
});

Extends

Methods

Builds the full url.

Name Type Description
properties object
Name Type Description
protocol string

the connector protocol

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 factor

responseFormat number

the response format (e.g video/mp4)

Returns:
Type Description
string the full url

Connect the dataSource then the connector will be opened as well.

Disconnect the dataSource then the connector will be closed as well.

Gets the datasource id.

Returns:
Type Description
string the datasource id

Gets the datasource name.

Returns:
Type Description
*

Inits the datasource with the constructor properties.

Name Type Description
properties
Name Type Description
data Object

the data object

Example

data is represented as
data = {
timeStamp: timeStamp // number
data: data // data to render
};

Extract data from the message. This split over ",".

Name Type Description
$super function

the parseData super method

data Object

the data to parse

Returns:
Type Description
Array the parsed data as an array of tokens

parseTimeStamp($super, data){number}

Extracts timestamp from the data. The timestamp is the first token got from split(',')

Name Type Description
$super function

the parseTimeStamp super method

data string

the data to parse

Returns:
Type Description
number the extracted timestamp

Type Definitions

onMessage

The callback which receives data.