RingserverVersion

src/ringserverweb.js
RingserverVersion

Type: {ringserverVersion: string, serverId: string}

Properties
ringserverVersion (string)
serverId (string)
StreamsResult

Type: {accessTime: moment, streams: Array<StreamStat>}

Properties
accessTime (moment)
streams (Array<StreamStat>)
IRIS_HOST

Type: string

RingserverConnection

src/ringserverweb.js

Web connection to a Ringserver.

new RingserverConnection(host: string?, port: number?)
Parameters
host (string?) optional host to connect to, defaults to IRIS
port (number?) optional host to connect to, defaults to 80
Instance Members
host(value?)
port(value?)
timeout(value?)
pullId()
pullStreamIds(level, matchPattern)
pullStreams(matchPattern)
pullRaw(url)
formBaseURL()
formIdURL()
formStreamsURL(queryParams?)
formStreamIdsURL(queryParams)

stationsFromStreams

src/ringserverweb.js

Extract one StreamStat per station from an array of channel level StreamStats. The start and end times are the min and max times for all the channels within the station. Can be used to get most time of most recent packet from the stations to give an idea of current latency.

stationsFromStreams(streams: Array<StreamStat>): Array<StreamStat>
Parameters
streams (Array<StreamStat>) array of channel level StreamStats
Returns
Array<StreamStat>: array of station level StreamStats
NSLCType

Type: {type: string, networkCode: string, stationCode: string, locationCode: string, channelCode: string}

Properties
type (string)
networkCode (string)
stationCode (string)
locationCode (string)
channelCode (string)

Split type, networkCode, stationCode, locationCode and channelCode from a ringserver id formatted like net_sta_loc_chan/type

nslcSplit(id: string): NSLCType
Parameters
id (string) id string to split
Returns
NSLCType: object with the split fields

Object to hold start and end times for a key, usually channel or station.

new StreamStat(key: string, start: moment, end: moment)
Parameters
key (string) id, usually station or channel
start (moment) start time
end (moment) end time
Instance Members
startRaw
endRaw
start
end
calcLatency(accessTime)