Changes between Initial Version and Version 1 of export_scn


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

--

Legend:

Unmodified
Added
Removed
Modified
  • export_scn

    v1 v1  
     1[[PageOutline]] 
     2 
     3= [wiki:Earthworm Earthworm] Module: = 
     4'''Contributed by: ''' 
     5 
     6== Function == 
     7Exports EARTHWORM messages over Internet (partner to import_generic). 
     8 
     9== Details == 
     10[wiki:Import-Export Import-Export Overview] 
     11 
     12=== EXAMPLE CONFIGURATION FILE === 
     13 
     14{{{ 
     15#  export_scn configuration file 
     16# 
     17#  Exports messages from a given list of station/channel/network codes 
     18#  Knows how to decipher TYPE_TRACEBUF, TYPE_PICK2K, TYPE_CODA2K msgs 
     19# 
     20#Background: 
     21# Import/Export are the long-distance message transfer 
     22# modules. They operate as one-on-one pairs. There are two variants of 
     23# export: export_generic, which ships messages with specified logos, and 
     24# export_scn which ships only trace data, but with specified SCN names. 
     25# 
     26# Import/Export send heartbeats to each other, as well as into their 
     27# local earthworm systems. If the heartbeat from the distant partner is 
     28# not received whithin the expected time period (RcvAliveInt) the link is 
     29# terminated, and an attempt to reconnect is initiated. If things go 
     30# seriously wrong, the heartbeat into the local earthworm system in 
     31# stopped. The expectation is that "restartMe" has been set in the .desc 
     32# file, and we'll be killed and restarted. 
     33# 
     34# All socket operations are performed with a timeout. This is noramlly 
     35# defaulted, but can be set in this file (SocketTimeout). 
     36# 
     37# Export maintains a circular FIFO buffer of messages to be shipped. The 
     38# size of this buffer (RingSize) controls the maximum latency of the 
     39# data. 
     40# 
     41# 
     42#Configuration notes: 
     43# 
     44# "restartMe" should be stated in our desc file. 
     45# 
     46# The period of our local heartbeat (HeartBeatInt) must be safely smaller 
     47# (faster) than our advertised period in our .desc file (tsec:). 
     48# Otherwise we'll get continually restarted for no good reason. 
     49# Note that tsec:0 implies no heartbeats expected, and so we'll never get 
     50# restarted. 
     51# 
     52# The rate at which we send heartbeats to our distant partner should be 
     53# considerably faster than the rate at which our partner expects them. 
     54# Otherwise, a heartbeat delayed in transmission will cause our partner to 
     55# conclude that the link is broken, and cause them to break the link and 
     56# reinitialize. Which will cause us to do the same. 
     57# 
     58# For export, the ServerIPAdr is  the address of the port to be used in 
     59# the exporting machine.  This is to specify a network card case the 
     60# exporting machine has several network cards. 
     61# 
     62# If SocketTimeout is specified, it should be at least as large as the 
     63# expected period of heartbeats from our distant partner. 
     64# 
     65 MyModuleId     MOD_EXPORT_SCN      # module id for this program 
     66 RingName       WAVE_RING           # transport ring to use for input/output 
     67 HeartBeatInt   30                  # EW internal heartbeat interval (sec) 
     68                                    #   Should be >= RcvAliveInt 
     69 LogFile        1                   # If 0, don't write logfile; if 1, do. 
     70                                    # if 2, write to module log but not to 
     71                                    # stderr/stdout 
     72 
     73# 
     74# Logos of messages to export to client systems 
     75#              Installation       Module       Message Type 
     76 GetMsgLogo    INST_MENLO      MOD_WILDCARD     TYPE_TRACEBUF 
     77 
     78# ServerIPAdr and ServerPort specify the local IP address and port number 
     79# on which this module will be ready to accept a client connection. 
     80# 
     81 ServerIPAdr  aaa.bbb.cc.ddd   # Export messages via this ethernet card 
     82 ServerPort     16005          # Well-known port number to export msgs on 
     83 
     84 MaxMsgSize       900          # maximum size (bytes) for input/output msgs 
     85 RingSize         100          # max# messages in outgoing circular msg buffer 
     86 
     87 SendAliveText   "alive"       # string sent to client as heartbeat 
     88 SendAliveInt      30          # seconds between alive msgs sent to client. 
     89                               #  0=> no heartbeat 
     90 RcvAliveText    "alive"       # text of client's heartbeat (we get this) 
     91 RcvAliveInt       150         # seconds between client's heartbeats to us. 
     92                               #  0 => no heartbeat 
     93 
     94#MaxLatency        0           # Optional command; Packets with delay time 
     95                               #  (i.e., time between present and packet 
     96                               #  start time) greater than this amount will be 
     97                               #  filtered out.  Time is in minutes.  0 -> time 
     98                               #  is not checked.  System time must be accurate. 
     99                               #  Only works on TYPE_TRACEBUF messages. 
     100 
     101# Socket commands 
     102# The commands below are optional. 
     103# SocketTimeout defaults to RcvAliveInt + 3 
     104#  If set to -1, all socket calls will block (no timeout). 
     105#  SocketTimeout has no effect in export, unless it is set to -1, 
     106#  because there is no code in export to handle socket timeouts. 
     107#  If set to -1, the program may run slightly more efficiently because 
     108#  timeout checking code will not execute. 
     109# 
     110 SocketTimeout 200000  # Timeout length in milliseconds for socket calls 
     111                       # this should be atleast the value of the RcvAliveInt 
     112 SocketDebug   0       # if 1, socket_ew debug statements are logged 
     113                       # if 0, socket_ew debug is turned off 
     114 
     115# List of station/channel/network codes to export. 
     116# Use any combination of Send_scn (to send data as-is) 
     117# and Send_scn_remap (to change the SCN on the fly) commands. 
     118# Use * as a wildcard for any field. A wildcard in the 
     119# "map to" fields of Send_scn_remap means that field will 
     120# not be renamed. 
     121# 
     122#               send SCN     map to SCN 
     123Send_scn        JMP ASZ NC               # send this specific channel 
     124Send_scn        JPS *   NC               # send all components of JPS NC 
     125Send_scn_remap  JGR VHZ NC   *   EHZ *   # change component code only 
     126Send_scn_remap  CAL *   NC   ALM *   *   # send all component of CAL, but 
     127                                         # change the site code to ALM 
     128}}} 
     129 
     130== Helpful Hints ==