# Earthworm Modules:
Liss2ew Configuration File

(last revised 4 March, 2000)
Page Index:
1. Functional command listing
2. Alphabetic command listing & description
3. Sample Configuration File

On startup, liss2ew reads the configuration file named on the command line. Commands in this file set all the parameters used for configuring the Earthworm LISS client module. (LISS is the Live Internet Seismic Server.) In the control file, lines may begin with a valid liss2ew command (listed below) or with one of 2 special characters:

>     #  marks the line as a comment (example: # This is a comment).

>     @  allows control files to be nested; one control file can be
>        accessed from another with the command "@" followed by
>        a string representing the path name of the next control file
>        (example: @model.d).

Command names must be typed in the control file exactly as shown in this document (upper/lower case matters!). Blank lines are also permitted in the control file.

## 1. FUNCTIONAL COMMAND LISTING

Below are the commands recognized by liss2ew, grouped by the function they influence. Most of the commands are required; they may be specified in any order in the control file.

       Earthworm system setup:
                    MyModuleId            required
                    OutRing                 required
                    HeartBeatInterval      required
                    Debug

            LISS server and input parameters:
                    LISSaddr                required
                    LISSport                required
                    lenSEED                 optional
                    SocketTimeout           optional

            Data output parameters:
                    TraceLength             required
                    MaxSCNs                 required
                    AcceptSCNL              required

## 2. ALPHABETIC COMMAND LISTING & DESCRIPTION

In the following section, all configuration file commands are listed in alphabetical order. Listed along with the command (bold-type) are its arguments (in red), the name of the subroutine that processes the command, and the function within the module that the command influences. A detailed description of the command and is also given. Default values and example commands are listed after each command description.

    command arg1                                 processed by             in function

    AcceptSCNL station component net location pinno     ReadConfig              Data selection

> Specifies one stream of data to be read from the LISS and output as trace data. The station, component, and network are used to set the earthworm SCN of this data stream. These three parameters must be given explicitly (no wildcards). Many LISS channels are also identified by a location code. If you are getting data from the ASL LISS, see their table of available data streams. If you don't know the location code, you can try running dumpseed to see what is being served. The location code may be *, the wildcard. If you use the wildcard and more than one location code is available for this SCN, liss2ew will report errors such as samplerate changing as it reads first one location code and then the other. To enter the empty location code (seen on some ASL channels, use the empty string "".

> You must give one AcceptSCNL command for each SCN that you want to receive from the LISS. However, you should not specify more than one AcceptSCNL for the same SCN and different location codes. The rest of earthworm does not know about location codes, so the two data streams would get mixed together with bad results.

> The pin number pinno is used for internal earthworm use.

>     Default:  none
>     Example:  AcceptSCNL ANMO BHZ IU 00   1234

    Debug                                            ReadConfig              Earthworm setup

> Turns on debug logging for liss2ew.

>     Default:  no debug logging
>     Example:  Debug

    HeartBeatInterval nsec                         ReadConfig              Earthworm Setup

> Defines the number of seconds, nsec between TYPE_HEARTBEAT messages issued by liss2ew.

>     Default:  none
>     Example:  HeartBeatInterval 30

    lenSEED bytes                           ReadConfig              LISS parameters

> Defines the number of bytes in the miniSEED records to be read from the LISS. For the ASL LISS, this is 512 bytes.

>     Default:  512
>     Example:  lenSEED 4096

    LISSaddr address                         ReadConfig              LISS parameters

> Specify the address of the LISS. This can be either on IP address (four period-separated numbers) or the domain name of the server.

>     Default:  none
>     Example:  LISSaddr      anmo.iu.liss.org

    LISSport port                            ReadConfig              LISS parameters

> Specifies the IP port number for the LISS. Normally this is 4000.

>     Default:  none
>     Example:  LISSport  4000

    LogFile switch                           ReadConfig              Earthworm Setup

> Sets the on-off switch for writing a log file to disk. If switch is 0, no log file will be written. If switch is non-zero, liss2ew will write daily log file(s) called nnnnnxx.log_yyyymmdd where nnnnn is the name of the configuration file (with the suffix `.d' removed), xx is liss2ew's module id (set with MyModuleId command) and yyyymmdd is the current UTC date (ex: 19960123) on the system clock. The file(s) will be written in the EW_LOG directory (environment variable).

>     Default:  none
>     Example:  LogFile   1

    MaxSCNs n                                ReadConfig              Data Selection

> Specifies the number of AcceptSCNL commands to be found in this configuration file.

>     Default:  none
>     Example:  MaxSCNs   3

    MyModuleId mod_id                        ReadConfig              Earthworm setup

> Sets the module id for labeling all outgoing trigger, heartbeat, and error messages. mod_id is a character string (valid strings are listed in earthworm.d) that relates to a unique single-byte number.

>     Default:  none
>     Example:  MyModuleId MOD_L2E_ANMO

    OutRing ring                             ReadConfig              Earthworm setup

> Tells liss2ew which shared memory region to use for output. ring is a character string (valid strings are listed in earthworm.d) that relates (in earthworm.d) to a unique number for the key to the shared memory region.

>     Default:  none
>     Example:  OutRing WAVE_RING

    SocketTimeout seconds                  ReadConfig              LISS parameters

> Defines the number of seconds to wait for response from the LISS. This time interval must not be large than the HeartBeatInterval. Unlike in certain other Earthworm modules, you cannot turn off the timeout by using a value of -1.

>     Default:  same as HeartBeatInterval
>     Example:  SocketTimeout   20

    TraceLength samples                         ReadConfig              Data parameters

> Specify the number of samples to put in each TRACE_BUF message. Liss2ew always trace data in `long integer' (four byte) format. The total length of the output TRACE_BUF messages will be 64 + 4 * samples. Values are restricted to the range of 10 - 1000.

>     Default:  none
>     Example:  TraceLength  100

##
3. Sample Configuration File

    #
    #                     Configuration File for liss2ew
    #
    MyModId          MOD_LISS2EW
    OutRing          WAVE_RING       # Transport ring to write output to,
    HeartBeatInterval     30         # Heartbeat interval, in seconds,
    LogFile               1          # 1 -> Keep log, 0 -> no log file
    #Debug                           # Write out debug messages (optional)

    LISSaddr   anmo.iu.liss.org      # IP address of the LISS (server)
                                     # If you have DNS configured, you may also
                                     # give the domain name of the LISS.
    LISSport    4000                 # Port number for LISS; often this is 4000

    lenSEED      512                 # The size of SEED records to read from LISS
                                     # OPTIONAL; defaults to 512 bytes.

    SocketTimeout  30                # Socket timeout in seconds; not more than
                                     # HeartBeatInterval

    TraceLength    100               # Number of trace data samples to put in one
                                     # TRACE_BUF packet. Range is 10 - 1000

    MaxSCNs        3                 # Number of SCNs to accept; must be at least
                                     # the number of AcceptSCNL commands.
    # List each sta/comp/net/location that you expect from LISS in an
    # "AcceptSCNL" command. Location code (LC) is a 2-digit code to further
    # identify a seismological data path. LC (and ONLY LC) may be given as `*' to
    # specify a wildcard. If the LISS has more than one LC for a give SCN,
    # using the wildcard will generate errors in log.
    # Do NOT specify the same SCN with two different LC values, as this will
    # cause great confusion within earthworm!!!!
    # If liss2ew sees an SCNL which is not listed here, it will be ignored.
    # On each line after the SCNL, list a pinnumber to use for this SCNL.

    #          site comp net LC pinno
    #          ---- ---- --- -- -----
    AcceptSCNL  ANMO BHZ  IU 00 1234
    AcceptSCNL  ANMO BH1  IU 00 1235
    AcceptSCNL  ANMO BH2  IU 00 1236

Module Index | Liss2ew Overview