Synopsis

datalinkclient [-vV] [--help] [-h=<host>] [-m=<match>] [--max=<maxRecords>] [-o=<outputFile>] [-p=<port>] [--timeout=<timeoutSec>]

Description

Datalinkclient is an example client that can connect to a datalink service and stream miniseed to a file. View source code here.

The datalink protocol is specified here:

Options

-h, --host=<host>

host to connect to, defaults to IRIS, rtserve.iris.washington.edu

--help

display a help message

-m, --match=<match>

match pattern, as a regular expression. For miniseed the conventions is NN_SSS_LL_CCC/MSEED

--max=<maxRecords>

number of packets to receive before ending the connection, defaults to 10

-o, --out=<outputFile>

Output file (default: print to console)

-p, --port=<port>

port to connect to, defaults to IRIS, 18000

--timeout=<timeoutSec>

timeout seconds, defaults to 120

-v, --verbose

Verbose

-V, --version

Print version and exit

Examples

Ask for a few packets of HH. data from station CO.BIRD, and output to a file.

> datalinkclient -m CO_BIRD_00_HH./MSEED --max 3 -o bird.mseed -v
initConnection to rtserve.iris.washington.edu:18000
Connection made
sendId
send 'ID seisFile:unknown:42:java | '
not bytes available 0
readPacket
readPacket(): blocking read for 3 bytes, available=53
Server ID: ID DataLink 2020.075 :: DLPROTO:1.0 PACKETSIZE:512
send 'MATCH | CO_BIRD_00_HH./MSEED'
send 'STREAM | '
readPacket(): blocking read for 3 bytes, available=0
Response: OK
readPacket(): blocking read for 3 bytes, available=0
D CO.BIRD.00.HHN 2021,161,18:56:35.6600  3.26 326
readPacket(): blocking read for 3 bytes, available=5454
D CO.BIRD.00.HHN 2021,161,18:56:38.9200  3.39 339
send 'ENDSTREAM | '
readPacket(): blocking read for 3 bytes, available=4848
D CO.BIRD.00.HHN 2021,161,18:56:42.3100  3.28 328
readPacket(): blocking read for 3 bytes, available=4242
D CO.BIRD.00.HHN 2021,161,18:56:45.5900  3.27 327
readPacket(): blocking read for 3 bytes, available=3636
D CO.BIRD.00.HHN 2021,161,18:56:48.8600  3.31 331
readPacket(): blocking read for 3 bytes, available=3030
D CO.BIRD.00.HHN 2021,161,18:56:52.1700  3.04 304
readPacket(): blocking read for 3 bytes, available=2424
D CO.BIRD.00.HHN 2021,161,18:56:55.2100  3.25 325
readPacket(): blocking read for 3 bytes, available=1818
D CO.BIRD.00.HHN 2021,161,18:56:58.4600  3.28 328
readPacket(): blocking read for 3 bytes, available=1212
D CO.BIRD.00.HHN 2021,161,18:57:01.7400  3.32 332
readPacket(): blocking read for 3 bytes, available=606
D CO.BIRD.00.HHN 2021,161,18:57:05.0600  3.31 331
readPacket(): blocking read for 3 bytes, available=0