Changes between Version 1 and Version 2 of samtac2ew

04/08/12 17:48:22 (9 years ago)



  • samtac2ew

    v1 v2  
    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: 
     34#  marks the line as a comment (example: # This is a comment). 
     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). 
     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. 
    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. 
     47    Earthworm system setup: 
     48                ModuleId                required 
     49                RingName                required 
     50                LogFile                 required 
     51                HeartbeatInt            required 
     52                DeviceID                required 
     53                Debug                   optional 
     55    The two commands for any ONE of the two communication modes: 
     56        SAMTAC communication parameters: TCP mode 
     57                TcpAddr                 required 
     58                TcpPort                 required 
     60        SAMTAC communication parameters: Windows COM port 
     61                ComPort                 required 
     62                Speed                   required 
     64        SAMTAC2EW buffer and timing parameters: 
     65                CommTimeout             optional 
     67        SAMTAC configuration, status and alarm parameters: 
     68                InfoSCNL                required 
     69                SOH_int                 optional 
     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. 
    3776The following list is organized by: 
    3978command [argument here] 
     80'''!CommTimeout [n]''' 
     82Sets the communication timeout to n milliseconds. If unable to communicate with SAMTAC for n milliseconds, retry socket or terminate. Default: 5000 (milliseconds) 
     84'''!ComPort [n]''' 
     86Sets the com port number to n. 
     88'''Debug [n]''' 
     90Sets the debug level: 0 or commented out for no debug logging; 1 - 4 for increasing verbosity. Default: no debug output. 
     92'''DeviceID [n]''' 
     94Sets DeviceID(serial) of the SAMTAC. This will be used to identify data coming from the SAMTAC and should match Sys values from SCNL. 
     96'''!HeartbeatInt [beat]''' 
     98Beat the samtac2ew heart every beat seconds. 
     100'''InfoSCNL [System Channel S C N L]''' 
     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). 
     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 
     110'''!LogFile [n]''' 
     112If 0, don't output to logfile; if 1, do if 2, log to module log but not stderr/stdout 
     114'''!ModuleId [mod_id]''' 
     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. 
     118'''!RingName [ring]''' 
     120This is the ring into which the waveforms and messages are sent. 
     122'''SOH_int [seconds]''' 
     124The interval in seconds between State of Health packets. Default in 300 seconds(5 minutes) 
     126'''Speed [rate]''' 
     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. 
     130'''!TcpAddr [IP address]''' 
     132Connect to the SAMTAC-802U at the ip address IP address. Note that the !TcpPort is also required. 
     134'''!TcpPort [number]''' 
     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. 
     139=== Sample Configuration File === 
     142# samtac2ew configuration file 
     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. 
     149TcpAddr     # IP address of SAMTAC interface 
     150TcpPort         5001            # TCP port number of SAMTAC interface 
     152# ComPort       1               # SAMTAC-802U COM port ID, 1=COM1, 2=COM, etc 
     153# Speed         57600           # SAMTAC-802U baud rate 
     155DeviceID        21              # SAMTAC DeviceID(serial), must be defined here for SCNL map 
     157ModuleId        MOD_SAMTAC2EW   # module id for this import 
     158RingName        WAVE_RING       # transport ring to use for input/output 
     160LogFile         1               # If 0, don't output to logfile; if 1, do 
     161                                # if 2, log to module log but not stderr/stdout 
     163HeartbeatInt    30              # Heartbeat interval in seconds 
     165# Optional commands: 
     167SOH_int         300             # State Of Health packet interval in seconds.  
     168                                # Default is 5 minutes 
     170CommTimeout     5000            # If unable to communicate with SAMTAC for X 
     171                                # milliseconds, retry socket or terminate 
     172                                # default: 5000 (milliseconds) 
     174Debug           4               # debug level: 0 or commented out for no debug 
     175                                # logging; 1 - 4 for increasing verbosity 
     176                                # default: no debug output 
     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 
     188== Helpful Hints ==