wiki:vdl_ew
Last modified 9 years ago Last modified on 03/02/12 10:43:08

Earthworm Module: vdl_ew

Contributed by: Dave Ketchum, USNSN

Function

This is the Earthworm encapsulation of the USNSN code.

Details

This is the Earthworm encapsulation of the USNSN code written by Dave Ketchum. It takes trace data messages from specified channels, buffers them in a circular FIFO, and feeds them to VDL. VLD executes a frequency-domain single-station event detector, and sends triggered, compressed event data to the USNSN. The encapsulating code shows its age by using numeric pin numbers rather than ASCII station-component-network names. Startup sequence: Earthworm is brought up by 'startstop'. Startstop reads its configuration file (startstop.d) containing command lines. The command line for vdl is found there. That command line contains the usual vdl command line, plus an Earthworm "-e" switch specifying the parameter file:

vdl ... -e vdl_params.d ...

where "vdl_params.d" will be read by feedme_init(), and contains all the Earthwormy things, like module id, ring to attach to, station to send, and what to call it. feedme_init() initiates logging, reads the parameter file, initializes the memory FIFO buffer of trace messages, and starts the MsgGet thread. This thread picks messages from the transport ring, sees if they're the pin numbers to be sent, and if so swaps as required, and pushes them into the memory FIFO.

Shutdown:

When the message getting thread gets a termination message from the transport ring, it'll set a status variable to -1, and exit. feedme() will see the negative status the next time it's called, and send the signal SIGQUIT to its own pid. VDL gets the hint, and performs a decent shutdown (we presume). This includes calling feedme_shutdown(), which shuts down the Earthwormy stuff.

Operating System:

This module is system dependent. At this time, VDL runs on Solaris only.

EXAMPLE CONFIGURATION FILE

#
# vdl_ew configuration file
#
# VDL under Earthworm is started by startstop, and given the commandline found in startstop.d
# That's where vdl get's its cusomary command line arguments. The file here is read
# by the "feedme" routines, which determine vdl's identity to earthworm, and what to feed to vdl.
# VDL has been modified (7/2/99) to use SCN names rather than pin numbers.
#
 MyModuleId     MOD_VDL_EW   # module id for this export,
 RingName       WAVE_RING      # transport ring to use for input/output,
 HeartBeatInt   10             # Heartbeat interval in seconds (Earthworm internal)
                # feedme() will consider beating the heart each time it's called, but will
                # not beat faster than the interval above
 LogFile        1              # If 0, don't write logfile at all,
 MaxMsgSize     500     # length of largest message we'll ever handle - in bytes
 MaxMessages    1000    # limit of number of message to buffer

# List the message logos to grab from transport ring for us to choose from
#  - as to which we will forward to VDL
#              Installation       Module       Message Type
 GetMsgLogo    INST_MENLO      MOD_WILDCARD     TYPE_TRACEBUF

# List of SCN names to send to VDL, and the corresponding VDL-USNSN designators
#               SCN name        USNSN designator
SendSCN         JSA VHZ NC              0
SendSCN         PTR VHZ NC              1
SendSCN         MTU VHZ NC              2

Helpful Hints