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

END_COMMAND

src/seedlink4.ts
END_COMMAND

Type: string

ENDFETCH_COMMAND

src/seedlink4.ts
ENDFETCH_COMMAND

Type: string

AUTH_COMMAND

src/seedlink4.ts
AUTH_COMMAND

Type: string

BYE_COMMAND

src/seedlink4.ts
BYE_COMMAND

Type: string

DATA_COMMAND

src/seedlink4.ts
DATA_COMMAND

Type: string

HELLO_COMMAND

src/seedlink4.ts
HELLO_COMMAND

Type: string

INFO_COMMAND

src/seedlink4.ts
INFO_COMMAND

Type: string

SELECT_COMMAND

src/seedlink4.ts
SELECT_COMMAND

Type: string

SLPROTO_COMMAND

src/seedlink4.ts
SLPROTO_COMMAND

Type: string

STATION_COMMAND

src/seedlink4.ts
STATION_COMMAND

Type: string

USERAGENT_COMMAND

src/seedlink4.ts
USERAGENT_COMMAND

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.

The spec is available via the FDSN, https://www.fdsn.org/publications/

Note as of 2023, this is largely untested as there are now servers available to test against.

new SeedlinkConnection(url: string, requestConfig: Array<string>, receivePacketFn: function (packet: SEPacket): void, errorHandler: function (error: Error): void, closeFn: any, webSocket: any, endCommand: any, agent: any, agentVersion: any)
Parameters
url (string) websocket URL to connect to
requestConfig (Array<string>) an array of seedlink commands like: [ 'STATION CO_JSC', 'SELECT 00_B_H_Z' ]
receivePacketFn (function (packet: SEPacket): void) the callback function that will be invoked for each seedlink packet received.
errorHandler (function (error: Error): void) callback function for errors
closeFn (any) callback function for closing connection
webSocket (any) optional web socket connection
endCommand (any) handshake ending command, either END or ENDFETCH
agent (any) agent identifier
agentVersion (any) agent version
Instance Members
requestConfig
receivePacketFn
errorHandler
closeFn
webSocket
endCommand
agent
agentVersion
setAgent(agent)
createDataTimeCommand(startTime, endTime)
setOnError(errorHandler)
setOnClose(closeFn)
connect()
interactiveConnect()
checkProto(lines)
close()
handle(event)
handleSEPacket(event)
isConnected()
sendHello()
sendCmdArray(cmd)
createCmdPromise(mycmd)