SEEDLINK4_PROTOCOL

src/seedlink4.ts
SEEDLINK4_PROTOCOL

Type: string

MINISEED_2_FORMAT

src/seedlink4.ts
MINISEED_2_FORMAT

Type: string

MINISEED_3_FORMAT

src/seedlink4.ts
MINISEED_3_FORMAT

Type: string

SE_PACKET_SIGNATURE

src/seedlink4.ts
SE_PACKET_SIGNATURE

Type: string

new SEPacket(dataFormat: string, dataSubformat: string, payloadLength: number, sequence: bigint, stationId: string)
Parameters
dataFormat (string)
dataSubformat (string)
payloadLength (number)
sequence (bigint)
stationId (string)
Static Members
parse(data)
Instance Members
dataFormat
dataSubformat
payloadLength
sequence
stationId
_miniseed
_mseed3
_json
_rawPayload
isMiniseed()
asMiniseed()
isMiniseed3()
asMiniseed3()

SeedlinkConnection

src/seedlink4.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>, receivePacketFn: function (packet: SEPacket): 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' ]
receivePacketFn (function (packet: SEPacket): void) the callback function that will be invoked for each seedlink packet received.
errorHandler (function (error: Error): void)
Instance Members
requestConfig
receivePacketFn
errorHandler
closeFn
webSocket
command
agent
agentVersion
setAgent(agent)
setTimeCommand(startTime)
setOnError(errorHandler)
setOnClose(closeFn)
connect()
interactiveConnect()
checkProto(lines)
close()
handle(event)
handleSEPacket(event)
isConnected()
sendHello()
sendCmdArray(cmd)
createCmdPromise(mycmd)