doc/applications/seedlink

SeedLink? is a real-time data acquisition protocol and a client-server software that implements this protocol. The SeedLink? protocol is based on TCP. All connections are initiated by the client. During handshaking phase the client can subscribe to specific stations and streams using simple commands in ASCII coding. When handshaking is completed, a stream of SeedLink? “packets” consisting of a 8-byte SeedLink? header (containing the sequence number) followed by a 512-byte Mini-SEED record, is sent to the client. The packets of each individual station are always transferred in timely (FIFO) order. The SeedLink? implementation used in SeisComP is the oldest and most widely used, however, other implementations exist. Another well-known implementation is deployed in IRIS DMC and some manufacturers have implemented SeedLink? in their digitizer firmware. All implementations are generally compatible, but not all of them support the full SeedLink? protocol. On the other hand IRIS DMC implements some extensions which are not supported by other servers. In the following we use ”SeedLink?” to denote the SeedLink? implementation used in SeisComP. The data source of a SeedLink? server can be anything which is supported by a SeedLink? plug-in - a small program that sends data to the SeedLink? server. Plug-ins are controlled by the SeedLink? server, e.g., a plug-in is automatically restarted if it crashes or a timeout occurs. Data supplied by a plug-in can be a form of Mini-SEED packets or just raw integer samples with accompanying timing information. In the latter case, the SeedLink? server uses an integrated “Stream Processor” to create the desired data streams and assemble Mini-SEED packets.

Digitizer/DAS Plugin Implementer
SeedLink? GFZ
LISS Chad Trabant (IRIS)
Quanterra Q330 Jet Spring, Inc.; ISTI, Inc.; Chad Trabant (IRIS); GFZ
Quanterra Q380/Q680, Q4120, Q720 (not supported by SeisComp? 3.0) GFZ (based on Comserv by Quanterra, Inc.)
Earth Data PS2400/PS6-24 GFZ
Lennartz M24 Lennartz Electronic GmbH
Geotech DR24 GFZ
Nanometrics HRD24 GFZ; Recai Yalgin
Guralp DM24 GFZ (based on libgcf2 from Guralp)
SARA SADC10/18/20/30 GFZ
RefTek? RTPD GFZ (based on software library provided by RefTek?, Inc.)
NRTS GFZ (based on ISI toolkit from David E. Chavez)
NAQS Chad Trabant (IRIS; based on sample code from Nanometrics, Inc.); Matteo Quintiliani (INGV; nmxptool)
SCREAM Reinoud Sleeman (KNMI)
Earthworm Chad Trabant (IRIS)
Antelope Chad Trabant (IRIS)
WIN GFZ (based on source code of WIN system)
Lacrosse 2300 Weather Station GFZ (based on open2300 library from Kenneth Lavrsen)
Reinhardt MWS5/MWS9 Weather Station GFZ
Generic MODBUS/TCP devices GFZ

Supported data sources

Table 5-1 lists digitizers and data acquisition systems that are supported by SeedLink? plug-ins. More plug-ins (Kinemetrics K2, Lennartz MARS-88, Lennartz PCM 5800, etc.) have been implemented by various users, but are not (yet) included in the package. The included C language plug-in interface is described in section 5.1.1.5. Antelope, Earthworm and NAQS can also import data from SeisComP. In SeisComP the class RecordStream is implemented that supports both SeedLink? and ArcLink sources; this class is used by all SeisComP modules that work with waveform data. On a lower level, SeedLink? clients can be implemented using the libslink software library or its Java counterpart, JSeedLink. Libslink supports Linux/UNIX, Windows and !MacOS X platforms, and comes with an exhaustive documentation in form of UNIX manual pages.

Protocol description

A SeedLink? session starts with opening the TCP/IP connection and ends with closing the TCP/IP connection. During the session the following steps are performed in order:

  • opening the connection
  • handshaking
  • transferring SeedLink? packets

We will take a closer look at the protocol. Note, the details are normally hidden from the clients by the libslink software library; therefore it is not necessary to be familiar with the protocol in order to implement clients.

Handshaking

When the TCP/IP connection has been established the server will wait for the client to start handshaking without initially sending any data to the client. During handshaking the client sends SeedLink? commands to the server. The commands are used to set the connection into a particular mode, setup stream selectors, request a packet sequence number to start with and eventually start data transmission. SeedLink? commands consist of an ASCII string followed by zero or several arguments separated by spaces and terminated with carriage return (<cr>, ASCII code 13) followed by an optional linefeed (<lf>, ASCII code 10). The commands can be divided into two categories: “action commands” and “modifier commands”. Action commands perform a function such as starting data transfer. Modifier commands are used to specialize or modify the function performed by the action commands that follow. When a server receives a modifier command it responds with the ASCII string “OK” followed by a carriage return and a line feed to acknowledge that the command has been accepted. If the command was not recognized by the server or has invalid parameters, then the ASCII string “ERROR” is sent as a response to the client followed by a carriage return and a line feed. The client should not send any further commands before it has received a response to the previous modifier command. If a network error or timeout occurs the client should close the connection and start a new session. Data transmission is started when the server receives the commands DATA, FETCH, TIME or END as described in section 5.1.1.3. Once the data transfer has been started no more commands, except INFO, should be sent to the server. The flow diagram of handshaking in uni-station vs. multi-station mode is shown in figure 5-1.


Figure 5-1: Handshaking in uni-station vs. multi-station mode

Data Transfer

When handshaking has been completed the server starts sending data packets, each consisting of an 8-byte SeedLink? header followed by a 512-byte Mini-SEED record. The SeedLink? header is an ASCII string consisting of the letters “SL” followed by a six-digit hexadecimal packet sequence number. Each station has its own sequence numbers. If multiple stations are requested using a single TCP channel the client should look at the contents of the Mini-SEED header to determine the station name (or to maintain the current sequence numbers for each station). A sequence number in the same format is used as an argument to the commands “DATA” or “FETCH” to start the data transfer from a particular packet. Each SeedLink? node re-assigns sequence numbers for technical reasons. It is not possible to use the same sequence numbers when communicating with alternative servers. Within a particular node the sequence numbers of a single station are consecutive and wrap around at FFFFFF. This can be used by the client to detect “sequence gaps” (e.g., some data has been missed by the client due to long network outage or a software bug). However, if stream selectors are used the sequence numbers are only guaranteed to be in increasing order (with wrap) because some packets might be filtered out by the server. In this case the first packet is not necessarily the one requested, but the nearest packet (not older than requested) that matches installed selectors. The data is transferred as a continuous stream without any error detections or flow control because these functions are performed by the TCP protocol. This guarantees the highest data transfer rate that is possible with the particular hardware and TCP/IP implementation. Obviously, the average data transfer rate must be greater than the rate at which new data becomes ready to send at the server. If this is the case, sooner or later the server has sent all data available to the client. When this happens, depending on the SeedLink? mode, the server sends new data as soon as it arrives or appends ASCII string “END” to the last packet and waits for the client to close connection. The latter mode is called “dial-up mode” because it is normally used in conjunction with dial-up lines to open the connection periodically for a short time and download all data available. A SeedLink? packet can never start with “END” thus no ambiguity arises.

Commands

HELLO
responds with a two-line message (both lines terminated with <cr><lf>). The first line contains the version number of the SeedLink? daemon, the second line contains station or data center description specified in the configuration. HELLO is used mainly for testing a SeedLink? server with “telnet”. It is also used by libslink to determine the server version.
CAT
shows the station list. Used mainly for testing a SeedLink? server with “telnet”.
BYE
closes the connection. Used mainly for testing a SeedLink? server with “telnet”.
STATION station code [network code]
turns on multi-station mode, used to transfer data of multiple stations over a single TCP channel. The STATION command, followed by SELECT (optional) and FETCH, DATA or TIME commands is repeated for each station and the handshaking is finished with END. STATION is a modifier command (it modifies the function of subsequent SELECT, and DATA, FETCH or TIME commands) so it responds with “OK” on success, “ERROR” otherwise.
END
end of handshaking in multi-station mode. This is an action command, because it starts data transfer. No explicit response is sent.
SELECT [pattern]
when used without pattern, all selectors are canceled. Otherwise, the pattern is a positive selector to enable matching Mini-SEED stream transfer. The pattern can be used as well as a negative selector with a leading “!” to prevent the transfer of some Mini-SEED streams. Only one selector can be used in a single SELECT request. A SeedLink? packet is sent to the client if it matches any positive selector and doesn’t match any negative selectors.
General format of selectors is LLCCC.T where LL is location, CCC is channel, and T is type (one of DECOTL for data, event, calibration, blockette, timing, and log records). “LL”, “.T”, and “LLCCC.” can be omitted, meaning “any”. It is also possible to use “?” in place of L and C. Some examples can be found in table 3-1 in section 3.3.3.2.

SELECT is a modifier command (it modifies the function of subsequent DATA, FETCH or TIME commands) so a response follows with “OK” on success, “ERROR” otherwise.

DATA [n [begin time]]
in multi-station mode this sets the current station into real-time mode and (optionally) the current sequence number to n; in uni-station mode this starts data transfer in real-time mode from packet n or from the next packet available if used without arguments. If begin time is used, any older packets are filtered out. begin time should be in the form of 6 decimal numbers separated by commas in the form: year,month,day,hour,minute,second, e.g. ’2002,08,05,14,00’. DATA is a modifier command in multi-station mode (responds with “OK” or “ERROR”); in uni-station mode it is an action command (no explicit response is sent).
FETCH [n [begin time]]
works like DATA but sets the station to dial-up mode instead of real-time mode.
TIME [begin time [end time]]
extracts the time window from begin time to end time. The times are specified in the form of 6 decimal numbers separated by commas in the form: year,month,day,hour,minute,second, e.g. ’2002,08,05,14,00’.
INFO level
requests an INFO packet containing XML data embedded in a Mini-SEED log record. level should be one of the following: ID, CAPABILITIES, STATIONS, STREAMS, GAPS, CONNECTIONS, ALL. The XML document conforms to the Document Type Definition (DTD) shown in section ???. The amount of info available depends on the configuration of the SeedLink? server.

Plug-in Interface

In order to implement a SeedLink? plug-in a developer needs two files included in the SeisComP distribution: plugin.h and plugin.c. In these files the following public functions are defined:

int send raw3(const char *station, const char *channel, const struct ptime *pt, 
              int usec_correction, int timing_quality, const int32_t *dataptr, 
              intnumber_of_samples)

is used to send a raw packet (array of 32-bit integer samples) to SeedLink?. The parameters are:

station
station ID, must match one of the defined stations in seedlink.ini. (Up to 10 characters.)

channel
channel ID, referenced by the “input” element in streams.xml. (Up to 10 characters.)
pt
time of the first sample in the array. If NULL then time is calculated relative to the previous send_raw3() call. struct ptime is defined in plugin.h.
usec_correction
time correction in microseconds to be written in the SEED data header. Can be useful if the digitizer is not phase locked to GPS.
timing_quality
timing quality in percent (0-100). The number is directly written into Mini-SEED header (blockette 1001). Semantics is implementation-defined. Usually 100 means that GPS is in lock and 0 means there never was a GPS lock, so the timing is completely unreliable. When GPS goes out of lock, the value can slowly decrease reflecting a possible timedrift.
dataptr
Array of signed 32-bit samples.
Number_of_samples
Length of the sample array.

Special cases:

  • if timing_quality = −1, blockette 1001 is omitted.
  • if number_of_samples = 0 & pt = NULL set new time without sending any data.
  • if dataptr = NULL send a gap (advance time as if number of samples was sent without sending any actual data).


int send_raw_depoch(const char *station, const char *channel, double depoch, 
                    int usec_correction, int timing_quality, const int32_t dataptr, 
                    int number_of_samples)

same as send_raw3() except time is measured in seconds since 1/1/1970 (depoch). Leap seconds are ignored.


int send flush3(const char *station, const char *channel)

flushes all Mini-SEED data streams associated with a channel. All buffered data is sent out creating “unfilled” Mini-SEED records if necessary. The parameters are:

station
station ID.

Channel
channel ID.


int send_mseed(const char *station, const void *dataptr, int packet size);

is used to send a Mini-SEED packet to SeedLink?. Such packets are not further processed. The parameters are:

station
station ID.

dataptr
pointer to 512-byte Mini-SEED packet.
packet size
must be 512.


int send_log3(const char *station, const struct ptime *pt, const char *fmt, ...)

is used to send a log message to SeedLink? (LOG stream). It must be noted that encapsulating log messages in Mini-SEED records is relatively inefficient because each message takes at least one record (512 bytes), regardless of message size. Due to 64-byte Mini-SEED header, up to 448 bytes per record can be used * The parameters are:

station
station ID.

pt
the timestamp of the message.
fmt
format string, as used by printf(), followed by a variable number of arguments.

Compatibility with Earlier Versions

It is possible to determine the version of the plug-in interface by looking at the C macro PLUGIN_INTERFACE_VERSION. The current version is 3, therefore all functions that have changed since earlier versions end with “3”. It is possible to enable full backward compatibility with earlier versions of the plug-in interface by defining the C macro PLUGIN_COMPATIBILITY. In this case the old functions are also defined.

SeedLink? configuration files

The following configuration files are used by SeedLink? and its plug-ins. Please avoid changing the files directly; change key files and templates instead.

plugins.ini
configuration file for SeedLink? plug-ins. Used by serial_plugin, fs_plugin and comserv_plugin.

seedlink.ini
main configuration file for SeedLink?. For more details see below.
filters.fir
coefficients of SeedLink?’s decimating FIR filters. If a filter’s name ends with “M”, it is a minimum-phase filter – causal filter with minimized (non-constant) phase delay; since the filter is non-symmetric all coefficients must be given. Otherwise the filter is a zero-phase filter, i.e. a non-causal filter with zero phase delay; in this case the filter is symmetric and so only half of the coefficients must be given (it is not possible to use a zero-phase filter with an odd number of coefficients).
Important note: The coefficients for non-symmetric (minimum-phase) FIR filters in the filters.fir file are stored in reverse order. It is important to reverse the order of coefficients if the operator adds a new minimum-phase filter or uses the included minimum-phase filters for another application. The coefficients for symmetric (zero-phase) FIR filters are not stored in reverse order. As a sanity check for symmetric filters the largest coefficient is always in the middle of the symmetry.
streams.xml
SeedLink? stream configuration file for the internal stream processor, referenced from seedlink.ini. For details see below.
chain.xml
configuration file for chain_plug-in. For details see below.
scream2sl.map
SCREAM ID to SeedLink? station/channel translation for scream plug-in.
win2sl.map
WIN ID to SeedLink? station/channel translation for win plug-in.

DTDs corresponding to the XML configuration files are included in the SeisComP package. An XML file can be checked against it’s DTD (“validated”) with the xmllint utility like this:

xmllint --noout --noblanks --dtdvalid streams.dtd streams.xml

xmllint is a part of “libxml2” package that can be downloaded from  http://www.xmlsoft.org/.
*.ini files have a somewhat obscure syntax. They contain zero or more sections, each beginning with a section name in squared brackets which should appear on a line of its own. Section name cannot contain spaces and squared brackets, but it can be optionally surrounded by spaces. Each section consists of zero or more entries – definitions and assignments. A definition consists of a keyword and a name separated by spaces (e.g. “station EDD”). An assignment consists of a parameter and a value separated by the “=” sign and optionally surrounded by spaces (e.g. “network = GE”).
The set of assignments that immediately follow a definition is in the scope of that definition. Assignments in the beginning of a section are “global” – they are used to set some generic parameters and provide default values (e.g. “network = GE” in the beginning of the section sets the default network that can be overridden in the scope of a station definition).
Parameters and keywords are case insensitive and must not contain the symbols “=”, “[”, “]” or spaces. Names must not contain “=” signs or spaces. Values must not contain “=” signs or spaces, unless enclosed in double quotes. Double quotes that are part of the value itself must be preceded by “\”.
Each assignment must be complete on a single line, but several assignments can appear on one line, separated by spaces. Any line beginning with a “#” or “*” character is regarded as a comment and ignored.

seedlink.ini

seedlink.ini may contain several sections, but only one having the same name as the executable to be used. A section in seedlink.ini has the following structure (parameters are shown in courier, default values are shown in squared brackets, but relying on them is not recommended):

organization <string>
organization ID, shown with slinktool -I. (Arbitrary string.)

network <1 or 2 character>
default network code; used when a network code is omitted by a client in STATION request. Should be set to the network code of the majority of configured stations. 1 or 2 characters long, uppercase.
lockfile <path>
path to the lock file; used by the seiscomp utility to check if seedlink is running.
filters <path>
path to filters.fir.
streams <path>
path to streams.xml. Setting this parameter activates the stream processor.
Encoding[steim1]
default encoding when converting raw streams to Mini-SEED. The value must be “steim1” or “steim2”.
filebase <path>
path to the base directory of SeedLink? data files (disk buffer).
trusted [0.0.0.0/0]
list of trusted IP addresses or IP/mask pairs (in ipchains/iptables syntax) separated by spaces and/or commas. The parameters with “trusted” suffix are applicable if the client has trusted IP address, otherwise the version without “trusted” suffix applies.
access [0.0.0.0/0]
default for all stations (see below).
stream_check [disabled]
default for all stations (see below).
gap_check
pattern” default for all stations (see below).
gap_treshold [10000]
default for all stations (see below). Note the spelling.
window_extraction [disabled]
can be “enabled” or “disabled”. Required for slinktool option “-tw”.
window_extraction_trusted [disabled]
same as above for trusted IP addresses.
info [capabilities]
maximum info level available for clients (has an effect on “-L”, “-Q”, “-G”, “-C” and “-i” options of slinktool). Possible values are (in increasing order) “id”, “capabilities”, “stations”, “streams”, “gaps”, “connections”, “all”.
info_trusted [capabilities]
same as above for trusted IP addresses.
request log [enabled]
whether or not to show requests in log file. Value can be “enabled” or “disabled”.
proc_gap_warn [2] <int>
default for all stations (see below).
proc_gap_flush” [0] <int>
default for all stations (see below).
proc_gap_reset [0] <int>
default for all stations (see below).
seq gap limit [0] <int>
maximum “sequence gap” allowed. Used by the server to decide what to do if a client requests a packet with sequence number that is not in the buffer. If the difference between the sequence number of the oldest packet in the buffer and the sequence number requested is equal or less than “seq gap limit” then data transfer starts from the oldest packet in the buffer. Otherwise data transfer starts from the next packet coming in.
port [18000] <int>
TCP port used by the server.
buffers [100] <int>
default for all stations (see below).
segments [2] <int>
default for all stations (see below).
segsize [100] <int>
default for all stations (see below).
blanks [10] <int>
default for all stations (see below).
connections [0] <int>
maximum number of connections allowed to the server (0—no limit).
bytespersec [0] <int>
maximum connection speed in bytes per second per TCP/IP connection (0—no limit).
plugin_ timeout [0] <int>
default for all plug-ins (see “timeout” below).
plugin_start_retry [0] <int>
default for all plug-ins (see “start retry” below).
plugin_shutdown_wait [0] <int>
default for all plug-ins (see “shutdown wait” below).
keyword plugin <plugin id>
adds a plug-in instance. Some plug-ins handle multiple stations while others require one instance per station. Keyword “plugin” is followed by a unique identifier of the plug-in instance.
cmd
shell command to start a plug-in instance. Plug-in ID is appended to the string.
timeout <int>
if no data arrives within this time period in seconds, then SeedLink shuts down the plug-in (0=wait for data forever).
start_retry <int>
restart terminated plug-ins after this time period in seconds (0=never restart plug-ins). Plug-ins may terminate themselves because of some internal error or they can be shut down by SeedLink? if timeout occurs or invalid data received.
shutdown_wait <int>
wait this time period in seconds for a plug-in to terminate after sending the TERM signal (0=wait forever). If a plug-in does not terminate on its own within this time period, the KILL signal will be sent.
station (station id)
adds a station. Followed by a unique identifier of the station (used in the plug-in interface).
name <up to 5 characters, uppercase>
SEED station code. Defaults to station id.
Network <1 or 2 characters, uppercase>
SEED network code.
description
station description, shown with slinktool -L (arbitrary string).
buffers
size of memory buffer (number of recent Mini-SEED records kept in RAM).
segments
number of disk buffer segments (files under <dir>/station/segments/ where <dir> is the directory given by the “filebase” parameter).
segsize
size of one disk buffer segment in the records (512-byte units).
blanks
number of blank records to insert after the re-scan of disk buffer if <dir>/station/buffer.xml is not found (assuming the server did not terminate correctly).
Request_log
whether or not to show requests in log file. Value can be “enabled” or “disabled”.
access
list of IP addresses or IP/mask pairs (in ipchains/iptables syntax), separated by spaces and/or commas. Only if a client’s IP address matches one of those the station is shown (slinktool -L, etc.) and accessible. If omitted, the global “access” parameter is used. If the global “access” parameter is not set any client can access the station.
proc
name of the “proc” object (defined in streams.xml); used for processing raw streams (streams submitted by a plug-in as raw samples).
proc_gap_warn <int>
minimum time gap in a raw stream (microseconds) that causes warning in the log file (0=disabled).
proc_gap_flush <int>
minimum time gap in a raw stream (microseconds) that causes a flush of all Mini-SEED streams associated with it (0=never flush streams).
proc_gap_reset <int>
minimum time gap in a raw stream (microseconds) that causes a reset of FIR filters (0=never reset filters).
encoding
encoding of Mini-SEED records created by SeedLink?. The value must be “steim1” or “steim2”. If omitted, the global “encoding” parameter is used.
stream_check
if “enabled” Mini-SEED data (both input and locally generated Mini-SEED streams) will be checked for time spans and (optionally) gaps. Required for “window extraction” and slinktool options “-Q” and “-G”.
gap_check_pattern
regex pattern of streams to be checked for gaps. Default is to check all data streams.
gap threshold
time difference between records (microseconds) above which a gap is declared.

If stream_check, gap_check_pattern or gap_treshold is changed it is necessary to remove the files <dir>/*/buffer.xml, where <dir> is the directory given by the filebase parameter. In this case the disk buffer is re-scanned when SeedLink? is started (which will take some time).

streams.xml

This file, like all XML documents, has a tree-like structure. The root element is called “stream” and it in turn contains “proc” elements which are referenced by name in seedlink.ini. A “proc” element contains one or more “tree” elements, which in turn contain “input” and “node” elements. There should be one “input” element per plug-in channel; if an “input” element is missing, the channel is ignored and you will see a message like:

Jun 24 12:56:28 st55 seedlink: EDD channel X ignored

Here is the description of all elements and attributes:

element streams
root element, has no attributes.

element proc
defines a “proc” object (set of “stream trees”), referenced from seedlink.ini.
attribute name
name of “proc” object, for reference.
element using
used to include all “stream trees” defined by one “proc” object in another “proc” object.
attribute name
the name of referenced “proc” object.
element tree
defines a “stream tree” – a downsampling scheme of an input channel.
element input
associates an input channel with the stream tree.
attribute name
name of the input channel; depends on the configuration of the particular plug-in (usual channel names are “Z”, “N” and “E”).
attribute channel
name of the output channel (last letter of a Mini-SEED stream name).
attribute location
Mini-SEED location code of the output channel (up to two characters).
attribute rate
sampling rate of the input channel (must match the actual sampling rate, which is dependent on the configuration of the plug-in and digitizer).
element node
defines a node of a stream tree; this element is recursive, meaning that it may contain one or more “node” elements itself.
attribute filter
use the named filter for decimation; filters are defined in file filters.fir.
attribute stream
create Mini-SEED output stream at this node. The value of the attribute should be a Mini-SEED stream name without the last character (which is taken from the attribute “channel” of element “input”).
chain.xml

This is the configuration file of chain_plugin which is used to connect two SeedLink? servers together. Here is the description of all elements and attributes:

element chain
root element.
attribute verbosity
Overrides verbosity level given on the command line. Set this to “1” if you want to see more messages. Higher values are probably only useful for debugging.
attribute timetable_loader
path to the program used to load the initial end times of streams. Used for initial overlap detection.
attribute overlap removal [none]
should be set to “full”, “initial” or “none”. Default for enclosed elements (see below).
attribute multistation [yes]
default for enclosed elements (see below).
attribute netto [0]
default for enclosed elements (see below).
attribute netdly [0]
default for enclosed elements (see below).
attribute keepalive [0]
default for enclosed elements (see below).
attribute standby [0]
default for enclosed elements (see below).
attribute seqsave [0]
default for enclosed elements (see below).
element extension
adds an extension module instance. Extension module is an external program that runs as a child process and communicates with chain plugin using the “chain plugin extension interface”. The latter is compatible, but an extended version of the SeedLink plug-in interface (in principle, any SeedLink? plug-in can be used as chain plug-in extension module).
attribute name
name of the extension module instance. The name of each instance must be unique.
attribute filter
regular expression that determines which streams are sent to the particular extension module instance. The regular expression is matched against string “n s l c t”, where n is network code, “s” is station code, “l” is location code, “c” is SEED channel code and “t” is stream type. For example, “GE APE BHZ D” means that BHZ.D stream of station APE with network code GE is sent to this extension module, while “.* BH. D” means that streams BHZ.D, BHN.D and BHE.D of all stations are sent.
attribute cmd
shell command to start the executable. The name of the extension module instance is appended to the string.

parameter description
recv_timeout [0] if no data arrives within this time period in seconds, then chain plugin shuts down the extension module (0—wait for data forever).
send_timeout [60] maximum number of seconds to wait when sending a data record to the extension module. If the record is not accepted during this time period, then chain plugin shuts down the extension module (0—wait forever, risking a hangup of chain plugin).
start_retry restart terminated extension modules after this time period in seconds (0—never re-start extension modules). Extension modules may terminate themselves because of some internal error or they can be shut down by chain plugin if timeout occurs or invalid data received.
shutdown_wait wait this time period in seconds for an extension module to terminate after sending the TERM signal (0—wait forever). If an extension module plug-in does not terminate on its own within this time period, the KILL signal will be sent.
element group
defines a station group corresponding to a single SeedLink? connection. One child process per group is created.
attribute address
address of the remote server in hostname:port format.
attribute overlap_removal
default for enclosed elements (see below).
attribute multistation
should be “yes” if the version of remote SeedLink? server is ≥ 2.5, otherwise “no” (in this case only one station per group can be defined).
attribute netto
“network timeout” in seconds. If no data (and heartbeat responses) are received during this period the connection is reopened (0—disabled).
attribute netdly
“network reconnect delay” in seconds. After closing the connection due to timeout wait this amount of seconds before trying to open the connection again.
attribute keepalive
if no data is received during this period a keepalive packet will be requested (0=disabled).
attribute uptime [0]
setting this to any value other than 0 activates dial-up mode. In dail-up mode the value is the maximum connection time in seconds.
attribute standby
when dial-up connection cycle is finished wait this amount of seconds until starting a new cycle (overridden by “schedule”, see below).
attribute seqsave
interval of saving the connection state (SeedLink? sequence numbers) in seconds.
attribute seqfile
path to file where the connection state is saved.
attribute ifup
path to a program or script that is called at the beginning of a dialup cycle. If you are not using “demand dialing” this script can be used to initiate PPP connection.
attribute ifdown
path to a program or script that is called at the end of a dialup cycle. Can be used, for example, to terminate PPP a connection.
attribute schedule
dialup schedule in crontab format. Overrides “standby”.
attribute lockfile
connection lock file. Useful to prevent several dialup connections using the same modem at the same time.
elemente station
defines station within a group. attribute “id” station ID known to SeedLink?, defaults to network station.
attribute name
station code at the remote server.
attribute network
network code at the remote server.
attribute out_name
local station code (used to change the station code). Defaults to name.
attribute out_network
local network code (used to change the network code). Defaults to network.
attribute selectors
list of stream selectors separated by spaces. If left empty all available streams will be requested. See slinktool manpage for more information.
attribute overlap_removal
if “full” all overlapping records will be filtered out. If “initial” only initial overlaps will be removed (initial overlaps may happen if the saved connection state was not updated due to a power failure). Removal of initial overlaps is based on the input from an external program referenced by the attribute “timetable loader”. If the value is “none” no overlaps will be removed.
attribute default_timing_quality
timing quality put into the Mini-SEED header if not defined in source data (used only in case of unpacking; see below).
element rename
used to rename streams.
attribute from
source stream in format “LLCCC”, where LL is location code and CCC is SEED channel code. Wildcard “?” is allowed. If LL is omitted, ?? is implicitly used.
attribute to
target stream in format “LLCCC”, where LL is location code and CCC is SEED channel code. Wildcard “?” is allowed. If LL is omitted, ?? is implicitly used.
element trigger
defines a “triggered” stream which can be switched on and off based on detections, etc.
attribute src
source stream in format “LLCCC”, where LL is location code and CCC is SEED channel code. LL should be omitted if the location code is empty. Wildcards are not allowed.).
attribute buffer_length [60]
amount of buffered data in seconds.
attribute pre_seconds [20]
the amount of seconds the stream is turned on before trigger on time (provided that the data is still in the buffer).
attribute post seconds [20]
the amount of seconds the stream is turned off after trigger off time.
element unpack
creates raw streams from Mini-SEED streams. Raw streams can be downsampled by SeedLink?.
attribute src
source stream in format “LLCCC”, where LL is location code and CCC is SEED channel code. LL should be omitted if the location code is empty. Wildcards are not allowed.
attribute dest
target channel name (must have matching “input” element in streams.xml).
attribute double_rate [no]
doubles the sampling rate by adding zeros to the data stream. Only spectrum above Nyquist frequency is affected (eg. 25Hz in case of 50Hz sampling rate). This option enables downsampling from 50Hz to 20Hz.

Attachments