Changes between Initial Version and Version 1 of ew2file


Ignore:
Timestamp:
02/29/12 16:09:54 (10 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ew2file

    v1 v1  
     1[[PageOutline]] 
     2 
     3= [wiki:Earthworm Earthworm] Module: ew2file = 
     4'''Contributed by: ''' 
     5 
     6== Function == 
     7Converts EARTHWORM messages into files (in binary form). 
     8 
     9== Details == 
     10The ew2file program  will take any message from a ring and write it to a file in a specified directory. The Earthworm message is written verbatim (in binary form) and is thus not generally readable. It writes timestamps on the files if the packet type is one of  TYPE_PICK2K, TYPE_PICK_SCNL, or TYPE_HYP2000ARC and the TimeBasedFilename flag is set in the .d file. This module can be used in conjunction with sendfile/getfile to send messages as files. Its counterpart is [wiki:file2ew file2ew]. 
     11 
     12=== Example Configuration File === 
     13 
     14{{{ 
     15#   ew2file_generic configuration file 
     16# 
     17# 
     18 MyModuleId     MOD_EW2FILE         # module id for this program 
     19 InRing         SM_RING             # transport ring to use for input 
     20 HeartBeatInt   30                  # EW internal heartbeat interval (sec) 
     21 LogFile        1                   # If 0, don't write logfile 
     22                                    # if 2, write to module log but not to 
     23                                    # stderr/stdout . 
     24# 
     25# Logos of messages to export to client systems 
     26# Each message of a given logo will be written to a file with the specified 
     27# File Suffix at the end of the file name folloing `.'. 
     28# Do NOT include a `.' in the suffix. 
     29# Use as many GetMsgLogo commands as you want. 
     30#              Installation       Module       Message Type        File Suffix 
     31 GetMsgLogo    INST_UCB        MOD_REDI2EW   TYPE_STRONGMOTIONII     smUCB 
     32 
     33 MaxMsgSize        512         # maximum size (bytes) for input msgs 
     34 QueueSize         1000        # number of msgs to buffer 
     35 
     36 TimeBasedFilename 1           # set non-zero if you want a time string in the 
     37                               # form of "yyyymmdd-hhmmss." at the beginning of 
     38                               # each output file. The timestring is generated from 
     39                               # msg contents, currently possible for only msgtypes: 
     40                               # TYPE_PICK2K, TYPE_PICK_SCNL, TYPE_HYP2000ARC 
     41 
     42# OneFilePerMessage 1           # an optional mode of ew2file to store all messages to a single file instead of 
     43                                # the normal one file per message. This is useful for debugging purposes, or for gathering picks 
     44 
     45# Optional heartbeat file commands. 
     46#---------------------------------- 
     47# Default HeartFileInt is 0 => send no heartbeat files. 
     48# Default HeartFileMsg is "Alive". 
     49# Default HeartFileSuffix is "hrt" 
     50 HeartFileInt     30           # heartbeat file interval; optional 
     51 HeartFileMsg     Alive        # string for heartbeat file; optional 
     52 HeartFileSuffix  hrtUCB       # suffix for heartbeat files; do not include `.' 
     53 
     54# SerialKeeper: File name where the serial number of the output files is 
     55# stored. This should be a unique file name, in the params directory. 
     56# If the file does not exist, ew2file will attempt to create it. 
     57SerialKeeper  ew2file_keeper 
     58 
     59# TempDir: Directory in which files are created. This directory must be in the 
     60# same filesystem as all the SendDir directories. Exactly one TempDir is required. 
     61TempDir      /home/earthworm/run/ew2file/temp 
     62 
     63# SendDir: Directory to which output files will be moved after they have 
     64# been created. 
     65#  Use as many SendDir commands as you need. 
     66# Be sure the final line is terminated with a newline. 
     67SendDir      /home/earthworm/run/ew2file/Menlo 
     68SendDir      /home/earthworm/run/ew2file/CGS 
     69SendDir      /home/earthworm/run/ew2file/Pas 
     70}}} 
     71 
     72== Helpful Hints ==