Changes between Initial Version and Version 1 of file2ew


Ignore:
Timestamp:
03/02/12 07:51:53 (10 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • file2ew

    v1 v1  
     1[[PageOutline]] 
     2 
     3= [wiki:Earthworm Earthworm] Module: file2ew = 
     4'''Contributed by: ''' 
     5 
     6== Function == 
     7A utility for reading in messages from a file (in binary form) and injecting them into a ring. The file2ew program  will take any message that is in a file (as written by [wiki:ew2file ew2file]) and push it into a specified ring. 
     8 
     9== Details == 
     10 
     11=== Example Configuration File === 
     12 
     13{{{ 
     14# file2ew.d 
     15# 
     16# Picks up files from a specified directory, converts the contents  
     17# to an Earthworm message and places  it into a message ring. The type 
     18# of message produced is configurable by the suffix of the filename. 
     19# 
     20# Option to save (to subdir ./save) or delete the file afterwards. 
     21# If it has trouble converting a file, it saves it to subdir ./trouble.  
     22# Maintains its own local heartbeat and also monitors the peer's 
     23# heartbeat via a file. Complains if the peer's expected heartbeat 
     24# interval is exceeded; announces resumption of peer's heartbeat. 
     25 
     26# Basic Module information 
     27#------------------------- 
     28MyModuleId        MOD_FILE2EW      # module id  
     29RingName          HYPO_RING        # shared memory ring for output 
     30HeartBeatInterval 30               # seconds between heartbeats to statmgr 
     31 
     32LogFile           1                # 0 log to stderr/stdout only;  
     33                                   # 1 log to stderr/stdout and disk; 
     34                                   # 2 log to disk module log only. 
     35 
     36Debug             0                # 1=> debug output. 0=> no debug output 
     37 
     38# Data file manipulation 
     39#----------------------- 
     40GetFromDir      c:\incoming_files  # look for files in this directory 
     41CheckPeriod     1                  # sleep this many seconds between looks 
     42OpenTries       5                  # How many times we'll try to open a file  
     43OpenWait        200                # Milliseconds to wait between open tries 
     44SaveDataFiles   1                  # 0 = remove files after processing 
     45                                   # non-zero = move files to save subdir 
     46                                   #            after processing   
     47LogOutgoingMsg  0                  # If non-zero, write contents of each  
     48                                   #   outgoing msg to the daily log. 
     49 
     50   
     51 
     52# Peer (remote partner) heartbeat manipulation 
     53#--------------------------------------------- 
     54PeerHeartBeatFile  terra1  HEARTBT.TXT  600  
     55                                   # PeerHeartBeatFile takes 3 arguments: 
     56                                   # 1st: Name of remote system that is  
     57                                   #   sending the heartbeat files. 
     58                                   # 2nd: Name of the heartbeat file.  
     59                                   # 3rd: maximum #seconds between heartbeat  
     60                                   #   files. If no new PeerHeartBeatFile arrives 
     61                                   #   in this many seconds, an error message will 
     62                                   #   be sent.  An "unerror message" will be 
     63                                   #   sent after next heartbeat file arrives 
     64                                   #   If 0, expect no heartbeat files. 
     65                                   # Some remote systems may have multiple  
     66                                   # heartbeat files; list each one in a 
     67                                   # seperate PeerHeartBeatFile command 
     68                                   # (up to 5 allowed). 
     69 
     70PageOnLostPeer technician          # Optional command: Name of group to page  
     71                                   #   if PeerHeartBeatFile is late. This allows 
     72                                   #   pages to be sent to groups other than  
     73                                   #   those listed in statmgr.d. Up to 5  
     74                                   #   PageOnLostPeer commands can be used. 
     75                                   # Must run telafeeder on same system to  
     76                                   #   actually get the pages sent. 
     77 
     78LogHeartBeatFile 1                 # If non-zero, write contents of each 
     79                                   #   heartbeat file to the daily log. 
     80 
     81 
     82# Commands specific to file2ew 
     83#----------------------------- 
     84 
     85MaxSuffixType 5                    # Optional command.  Set the maximum number 
     86                                   #   of file suffix/message type pairs to 
     87                                   #   configure here (default=5) 
     88 
     89# The filename suffix will determine the Earthworm message type 
     90# (and optionally the Earthworm installation id) that file2ew will  
     91# use when placing the contents of the file into the Earthworm ring. 
     92# If the installation is ommitted, file2ew will use the local 
     93# installation id. 
     94 
     95#           suffix   EW MsgType           EW Installation (optional) 
     96#           ------   ----------------     -------------------------- 
     97SuffixType  .arc     TYPE_HYP2000ARC      
     98SuffixType  .sm      TYPE_STRONGMOTIONII 
     99SuffixType  .smUCB   TYPE_STRONGMOTIONII  INST_UCB 
     100}}} 
     101 
     102== Helpful Hints ==