Changes between Version 1 and Version 2 of samtac2ew


Ignore:
Timestamp:
04/08/12 17:48:22 (9 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • samtac2ew

    v1 v2  
    3030 
    3131== Configuration File Commands == 
     32On startup, samtac2ew reads the configuration file named on the command line. Commands in this file set all the parameters used for configuring the Earthworm samtac2ew module. In the control file, lines may begin with a valid samtac2ew command (listed below) or with one of 2 special characters: 
     33{{{ 
     34#  marks the line as a comment (example: # This is a comment). 
     35    
     36@  allows control files to be nested; one control file can be  
     37   accessed from another with the command "@" followed by  
     38   a string representing the path name of the next control file  
     39   (example: @SCNL.d). 
     40}}} 
     41Command 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. 
    3242 
    33 == Helpful Hints == 
     43=== Functional Command Listing === 
     44Below are the commands recognized by samtac2ew, grouped by the function they influence. Some of the commands are required, as noted. They may be specified in any order in the control file, with the exception of the SAMTAC-802U communications mode settings: these must be listed in the order shown here. 
     45 
     46{{{ 
     47    Earthworm system setup: 
     48                ModuleId                required 
     49                RingName                required 
     50                LogFile                 required 
     51                HeartbeatInt            required 
     52                DeviceID                required 
     53                Debug                   optional 
     54 
     55    The two commands for any ONE of the two communication modes: 
     56        SAMTAC communication parameters: TCP mode 
     57                TcpAddr                 required 
     58                TcpPort                 required 
     59 
     60        SAMTAC communication parameters: Windows COM port 
     61                ComPort                 required 
     62                Speed                   required 
     63  
     64        SAMTAC2EW buffer and timing parameters: 
     65                CommTimeout             optional 
     66  
     67        SAMTAC configuration, status and alarm parameters: 
     68                InfoSCNL                required 
     69                SOH_int                 optional 
     70}}} 
    3471 
    3572 
     73=== Alphabetic Command Listing & Description === 
     74In 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. 
    3675 
    3776The following list is organized by: 
    3877 
    3978command [argument here] 
     79 
     80'''!CommTimeout [n]''' 
     81 
     82Sets the communication timeout to n milliseconds. If unable to communicate with SAMTAC for n milliseconds, retry socket or terminate. Default: 5000 (milliseconds) 
     83 
     84'''!ComPort [n]''' 
     85 
     86Sets the com port number to n. 
     87 
     88'''Debug [n]''' 
     89 
     90Sets the debug level: 0 or commented out for no debug logging; 1 - 4 for increasing verbosity. Default: no debug output. 
     91 
     92'''DeviceID [n]''' 
     93 
     94Sets DeviceID(serial) of the SAMTAC. This will be used to identify data coming from the SAMTAC and should match Sys values from SCNL. 
     95 
     96'''!HeartbeatInt [beat]''' 
     97 
     98Beat the samtac2ew heart every beat seconds. 
     99 
     100'''InfoSCNL [System Channel S C N L]''' 
     101 
     102This command is used to define how samtac2ew maps a System and Channel Number to a Station Channel Name. It is also used as a channel selector as only those streams specified get passed on to the Earthworm Wave Ring. This forces the trace buf type to be of type TRACEBUF2. System is for the SAMTAC System ID name, Channel is for the SAMTAC channel number, S is for station name (5 chars), C is for channel identifier (3 chars), N is for network code (2 chars), and L is for location code (2 chars). 
     103{{{ 
     104#                Sys     Channel S       C       N   L 
     105InfoSCNL         21      1       ISTI    HHZ     CI  00 
     106InfoSCNL         21      2       ISTI    HHN     CI  00 
     107InfoSCNL         21      3       ISTI    HHE     CI  00 
     108}}} 
     109 
     110'''!LogFile [n]''' 
     111 
     112If 0, don't output to logfile; if 1, do if 2, log to module log but not stderr/stdout 
     113 
     114'''!ModuleId [mod_id]''' 
     115 
     116Sets the module id for labeling all outgoing messages. mod_id is a character string (valid strings are listed in earthworm.d) that relates (in earthworm.d) to a unique single-byte number. 
     117 
     118'''!RingName [ring]''' 
     119 
     120This is the ring into which the waveforms and messages are sent. 
     121 
     122'''SOH_int [seconds]''' 
     123         
     124The interval in seconds between State of Health packets. Default in 300 seconds(5 minutes) 
     125 
     126'''Speed [rate]''' 
     127 
     128Connect to the SAMTAC-802U at the Speed rate specified. To use this input mode, the !ComPort directive must also be used. The baud rates are the standard allowable rates : 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200. 
     129 
     130'''!TcpAddr [IP address]''' 
     131 
     132Connect to the SAMTAC-802U at the ip address IP address. Note that the !TcpPort is also required. 
     133 
     134'''!TcpPort [number]''' 
     135 
     136Connect to the SAMTAC-802U at the ip address specified and this port number. Note that the !TcpAddr is also required for this directive. !TcpPort defaults to 5001 for the SAMTAC-802U. 
     137 
     138 
     139=== Sample Configuration File === 
     140{{{ 
     141# 
     142# samtac2ew configuration file 
     143# 
     144# This code receives serial data stream (SDS) packets from the SAMTAC via 
     145# a TCP/IP port, converts them into Earthworm trace buf messages, and 
     146# stuffs them into a wave ring. 
     147# 
     148 
     149TcpAddr         192.168.4.5     # IP address of SAMTAC interface 
     150TcpPort         5001            # TCP port number of SAMTAC interface 
     151 
     152# ComPort       1               # SAMTAC-802U COM port ID, 1=COM1, 2=COM, etc 
     153# Speed         57600           # SAMTAC-802U baud rate 
     154 
     155DeviceID        21              # SAMTAC DeviceID(serial), must be defined here for SCNL map 
     156 
     157ModuleId        MOD_SAMTAC2EW   # module id for this import 
     158RingName        WAVE_RING       # transport ring to use for input/output 
     159 
     160LogFile         1               # If 0, don't output to logfile; if 1, do 
     161                                # if 2, log to module log but not stderr/stdout 
     162 
     163HeartbeatInt    30              # Heartbeat interval in seconds 
     164 
     165# Optional commands: 
     166 
     167SOH_int         300             # State Of Health packet interval in seconds.  
     168                                # Default is 5 minutes 
     169 
     170CommTimeout     5000            # If unable to communicate with SAMTAC for X 
     171                                # milliseconds, retry socket or terminate 
     172                                # default: 5000 (milliseconds) 
     173 
     174Debug           4               # debug level: 0 or commented out for no debug 
     175                                # logging; 1 - 4 for increasing verbosity 
     176                                # default: no debug output 
     177 
     178#           Sys     Channel S       C       N   L 
     179InfoSCNL    21      1       ISTI    HHA     ZZ  01 
     180InfoSCNL    21      2       ISTI    HHB     ZZ  01 
     181InfoSCNL    21      3       ISTI    HHC     ZZ  01 
     182InfoSCNL    21      4       ISTI    HHD     ZZ  01 
     183InfoSCNL    21      5       ISTI    HHE     ZZ  01 
     184InfoSCNL    21      6       ISTI    HHF     ZZ  01 
     185}}} 
     186 
     187 
     188== Helpful Hints == 
     189