src/seedlink.ts
SEEDLINK_PROTOCOL

Type: string

SequencedDataRecord

src/seedlink.ts
SequencedDataRecord

Type: {rawsequence: string, sequence: number, miniseed: DataRecord}

Properties
rawsequence (string)
sequence (number)
miniseed (DataRecord)

SeedlinkConnection

src/seedlink.ts

A seedlink websocket connection to the given url. The connection is not made until the connect() method is called. Note this cannot connect directly to a native TCP socket, instead it sends the seedlink protocol over a websocket. Currently only the IRIS ringserver, https://github.com/iris-edu/ringserver, supports websockets, but it may be possible to use thrid party tools to proxy the websocket to a TCP seedlink socket.

new SeedlinkConnection(url: string, requestConfig: Array<string>, receiveMiniseedFn: function (packet: SequencedDataRecord): void, errorHandler: function (error: Error): void)
Parameters
url (string) websocket URL to connect to
requestConfig (Array<string>) an array of seedlink commands like: [ 'STATION JSC CO', 'SELECT 00BHZ.D' ]
receiveMiniseedFn (function (packet: SequencedDataRecord): void) the callback function that will be invoked for each seedlink packet received which contains 'sequence', a sequence number and 'miniseed', a single miniseed record.
errorHandler (function (error: Error): void)
Instance Members
requestConfig
receiveMiniseedFn
errorHandler
closeFn
webSocket
command
setTimeCommand(startTime)
setOnError(errorHandler)
setOnClose(closeFn)
connect()
close()
handle(event)
handleMiniseed(data)
isConnected()
sendHello()
sendCmdArray(cmd)
createCmdPromise(mycmd)