caps_plugin

Transfers data from CAPS to SeedLink server

Description

CAPS! server plugin that receives raw data via the CAPS! protocol and sends raw or compressed data to Seedlink or to standard out.

Configuration

The caps_plugin can be configured as any other Seedlink plugins, e.g. via scconfig. The configuration is shown using the SC250 station of the SW network as an example. To start scconfig run:

> seiscomp exec scconfig

Select ‘Bindings’ from the panel switch. The bindings panel shown in figure Bindings panel configures a station for a module. It is separated into three main areas:

  • the station tree (red + orange)

  • the binding content (green)

  • the module tree (blue)

../_images/scconfig_bindings_panel.png

Bindings panel

Open the context menu of the view below the station tree and select ‘Add network’ to add a new network. Fill in the network name ‘SW’ into the input form and press ‘OK’. A double click on the network ‘SW’ shows the associated stations. Add a new Station ‘SC250’ in the same way as done before for the network. Figure Figure Station tree of the SW network shows the current station tree.

../_images/scconfig_add_station.png

Station tree of the SW network

To complete the configuration open the station ‘SC250’ in the station tree and use the context menu to add a new binding for Seedlink. Go to the sources section of the binding content, select ‘CAPS’ and press the button on left side of the selection box. Leave the upcoming input form blank and press ‘OK’. Subsequently click on the triangle besides the CAPS label and set up the caps_plugin. Supported encodings are ‘STEIM1’ and ‘STEIM2’. Use an empty encoding string to create raw miniSEED packets. Figure CAPS Binding configuration shows an example configuration.

../_images/scconfig_binding_conf.png

CAPS Binding configuration

Press ‘CTRL+S’ to save all changes. Afterwards switch to the ‘System panel’, select Seedlink in the module list and press ‘Update configuration’.

Examples

The caps plugin can also be used as a command-line tool to request data. The data will be sent to standard out.

Command-line help

> seiscomp exec bash
> $SEISCOMP_ROOT/share/plugins/seedlink/caps_plugin -h

Data file request

Submit the request to the CAPS server to download miniSEED data to a file, e.g. data.mseed:

seiscomp exec bash
> $SEISCOMP_ROOT/share/plugins/seedlink/caps_plugin -I localhost:18002 -A SW.SC250..HH? \
--encoding STEIM2 caps2sl.localhost.18002.state \
--begin "2013-08-01 00:00:00" --end "2013-08-01 01:00:00" \
--dump > data.mseed

Submit the request based on the request file to the CAPS server to ownload miniSEED data to a file, e.g. data.mseed:

seiscomp exec bash
> $SEISCOMP_ROOT/share/plugins/seedlink/caps_plugin -I localhost:18002 -f streams_list \
--encoding STEIM2 caps2sl.localhost.18002.state \
--begin "2013-08-01 00:00:00" --end "2013-08-01 01:00:00" \
--dump > data.mseed

Request file, e.g. streams_list:

SW.SC254..*
SW.SC250..HH?
SW.*..HHZ

Module Configuration

etc/defaults/global.cfg
etc/defaults/caps_plugin.cfg
etc/global.cfg
etc/caps_plugin.cfg
~/.seiscomp/global.cfg
~/.seiscomp/caps_plugin.cfg

caps_plugin inherits global options.

Note

Modules/plugins may require a license file. The default path to license files is @DATADIR@/licenses/ which can be overridden by global configuration of the parameter gempa.licensePath. Example:

gempa.licensePath = @CONFIGDIR@/licenses
journal

Type: string

File to store stream states. Use an empty string to log to standard out.

archive

Default: false

Type: boolean

Disables realtime mode. Only archived data is fetched.

input.address

Default: localhost:18002

Type: string

CAPS URL to fetch data from, format: [[caps|capss]://][user:pass@]host[:port]

Command-Line Options

Generic

-h, --help

Show help message.

-V, --version

Show version information.

--config-file arg

Use alternative configuration file. When this option is used the loading of all stages is disabled. Only the given configuration file is parsed and used. To use another name for the configuration create a symbolic link of the application or copy it. Example: scautopick -> scautopick2.

--plugins arg

Load given plugins.

-D, --daemon

Run as daemon. This means the application will fork itself and doesn’t need to be started with &.

Verbosity

--verbosity arg

Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug.

-v, --v

Increase verbosity level (may be repeated, eg. -vv).

-q, --quiet

Quiet mode: no logging output.

--print-component arg

For each log entry print the component right after the log level. By default the component output is enabled for file output but disabled for console output.

--component arg

Limit the logging to a certain component. This option can be given more than once.

-s, --syslog

Use syslog logging backend. The output usually goes to /var/lib/messages.

-l, --lockfile arg

Path to lock file.

--console arg

Send log output to stdout.

--debug

Execute in debug mode. Equivalent to --verbosity=4 --console=1 .

--trace

Execute in trace mode. Equivalent to --verbosity=4 --console=1 --print-component=1 --print-context=1 .

--log-file arg

Use alternative log file.

Plugin

-I, --input arg

Overrides configuration parameter input.address.

Streams

-A, --add-stream arg

List of stream IDs [net.sta.loc.cha] to add, wildcards are supported

-f, --stream-file arg

Path to stream-file. The stream file may contain a list of streams IDs [net.sta.loc.cha]

--begin arg

Request start time

--end arg

Request end time

Mode

--archive

Overrides configuration parameter archive.

Output

--dump arg

Dump all received data to stdout and don’t push the data to SeedLink

--encoding arg

Preferred data output encoding

-I, --input arg

Data input host

-j, --journal arg

Overrides configuration parameter journal.