Changes between Initial Version and Version 1 of v7.0


Ignore:
Timestamp:
01/17/12 12:52:37 (10 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • v7.0

    v1 v1  
     1{{{ 
     2Earthworm Release Notes V7.0 
     3 
     4(June 15, 2006) 
     5New Modules 
     6Modifications/ Bug Fixes to Existing Modules  
     7Changes To Configuration Files And Descriptor Files 
     8Known Bugs  
     9Known Deficiencies 
     10 
     11Release Notes:  Earthworm Version "working" 
     12Cleaned out after release of v6.2 on 4/15/2003 
     13Note that v6.3 was a CVS snapshot that was released on 9/21/2005  
     14This release is EW V7.0 and has all of the v6.3 changes and many SCNL upgrades. 
     15 
     16NEW MODULES: 
     17*********** 
     18 
     19cleandir: 
     20A contrib from Hydra for Windows. Here's the description I got 
     21from John Patton: 
     22This program is a rewrite of the old Menlo cleandir. Cleandir  
     23runs as a Windows service (as opposed to running as a Windows  
     24Scheduled Task) and monitors the directories specified in the  
     25configuration file.  The criteria for deletion are as follows:  
     26If any file has a modification date/time older than the age  
     27specified in the configuration file, that file is deleted.   
     28Installed by PAF 6/06/2006 in grab_bag 
     29 
     30liss2ew_scnl: 
     31This is a contribution from HYDRA EW and is an upgrade. This has 
     32only been tested under Windows and thus only has a makefile.nt 
     33This is basically a SNCL'ized version of liss2ew but has been 
     34converted to C++. 
     35Installed by PAF 5/26/2006 
     36 
     37 
     38ringtocoaxII: 
     39This is a contribution from HYDRA EW and is an upgrade. This has 
     40only been tested under Windows and thus only has a makefile.nt 
     41in this release.  From notes that John Patton sent me: 
     42        There are basically 3 differences between ring2coax and ring2coaxII: 
     43        
     44                1. ring2coaxII is multithreaded. 
     45                2. ring2coaxII has an input queue 
     46                3. ring2coaxII has my attempt at an adaptive algorithm that increases  
     47                the outgoing udp data rate as the queue fills up (within configurable  
     48                limits).  It also tries to "smooth" the udp message load so that we're  
     49                at a constant level rather then spikes and troughs (not very good at  
     50                this, but better than nothing). 
     51 
     52        The design idea behind it was that we had problems with ring2coaxII getting cpu  
     53        starved for a few seconds and loosing data, thus the input queue.  The other half  
     54        was how our udp load on our network would change drastically from second to second  
     55        from very high to very low, we wanted some sort of way to "smooth" it out.  I've  
     56        had limited success on that one. 
     57Installed by PAF 5/26/2006 
     58 
     59 
     60pkfilter: 
     61The purpose of pkfilter is to reduce the number of "duplicate" picks 
     62from a given "station". For pkfilter, all components which have 
     63matching station code and network code are considered to be the from the 
     64same "station". The rules for what are considered "duplicate" picks 
     65can be found in the file: 
     66vX.X/src/seismic_processing/pkfilter/pkfilter.designspecs.txt 
     67Pkfilter is location-code friendly and will handle both the TYPE*2K 
     68and TYPE*SCNL versions picks and codas.  LDD 5/5/2004 
     69 
     70statrigfilter: 
     71The purpose of statrigfilter is to eliminate "duplicate" triggers 
     72from a given "station". For statrigfilter, all channels which have 
     73matching station code and network code are considered to be the from the 
     74same "station". The rules for what are considered "duplicate" triggers 
     75can be found in the file: 
     76vX.X/src/seismic_processing/statrigfilter/statrigfilter.designspecs.txt 
     77Statrigfilter is location-code friendly and will handle both  
     78TYPE_CARLSTATRIG_SCNL and TYPE_CARLSTATRIG messages.  LDD 11/23/2005 
     79 
     80putpick: 
     81   Putpick is a command-line testing tool which allows one to replay  
     82a file containing picks and/or codas into an Earthworm ring. 
     83     Usage: putpick    
     84Putpick reads a file containing a series of pick/coda msgs 
     85and write them to shared memory.  The file can contain a mix 
     86of TYPE_PICK2K, TYPE_PICK_SCNL, TYPE_CODA2K, TYPE_CODA_SCNL, 
     87and also comments.  Only valid TYPE_PICK* and TYPE_CODA* msgs 
     88will be written to shared memory; all other lines will be ignored. 
     89   Putpick is useful for replaying picks into binder - binder's  
     90logfile (or a portion of it) can be used as the input file  
     91to putpick, or the picks can be placed in a separate file. 
     92   If pause = y, the relative timing of writing msgs to ring is  
     93based on delta-t in the timestamps in the picks. 
     94   If pause = n, the msgs are written to the ring as fast  
     95as they are read from the file.   LDD 6/25/2004 
     96 
     97ws_clientIIx: 
     98Added a new set of ws_client routines (ws_clientIIx), that are used by 
     99ora_trace_fetch.  The new routines were designed to streamline and 
     100simplify access to the wave_servers while conserving wave_server 
     101resources.  (The routines handle connect/disconnect for the caller, 
     102and if given a list of requests, the routines will sort the request 
     103by wave_server, so that it will connect to one wave_server, retrieve 
     104the appropriate data, disconnect from the first and connect to the 
     105second, retrieve the appropriate data, and so on. 
     106The routines were written in 2001, (derived from ws_clientII) and have  
     107never been as thoroughly tested as ws_clientII. 
     108The routines have not been scheduled for SCNLizing. 
     109DK 072004 
     110 
     111scn2scnl,scnl2scn: 
     112A pair of conversion modules (code resides in data_exchange/scn_convert) 
     113to change trace data, picks and codas from the original Earthworm formats 
     114with site,component,network codes to the new Earthworm formats using 
     115site,component,network,location codes and visa versa.  Written by Will 
     116Kohler, modified by Pete Lombard to do SCN->SCNL lookups. 
     117LDD 10/21/2004 
     118 
     119slink2ew: 
     120A seedlink client for acquiring data from seedlink servers (e.g. IRIS)  
     121and converting to tracebuf2 (or optionally tracebuf). Much more robust  
     122than liss2ew. Written by Chad Trabant of IRIS; modified for tracebuf2  
     123and debugged by Chad Trabant and Jim Luetgert. 
     124JHL 4/19/05 
     125PAF Updated with version 1.3 on 1/30/2006 
     126 
     127export_ack, export_scnl_ack: 
     128  This new version of export expects to receive an acknowledgment packet  
     129for every packet it writes to the socket. Creation of this new version  
     130was desired because we observed during the export of continuous trace  
     131data that during a communication failure, export was able to successfully  
     132write several messages to the (broken?) socket, but import never received  
     133them. When the socket was re-established, those messages were lost forever.  
     134  Acknowledgments are received asynchronously by the socket-reading thread.  
     135A circular buffer, SendQueue, tracks the status of msgs after they been  
     136pulled from the MessageStacker queue. If the socket is broken/reconnected,  
     137export*ack re-sends any msgs in the SendQueue which haven't been  
     138acknowledged. In normal operation, if export*ack laps the SendQueue and  
     139finds a message that has been sent but not ACKed, it will sleep 10ms and  
     140then check status again, looping until an ACK is received before preparing  
     141to send the next message.  
     142  The SendQueue length is configurable, from 1 to 254 messages (default=100).   
     143Using a shorter SendQueue can cause a decrease in the rate at which 
     144export will send messages. A slower rate might be desireable so  
     145that an import system is not flooded by data after a prolonged  
     146communication break. In testing with export and import on the same  
     147machine, these are export's approximate maximum data rates: 
     148  SendQueueLength =   1,   10 messages/second 
     149  SendQueueLength =  10,   90 messages/second 
     150  SendQueueLength = 100,  350 messages/second 
     151Using the default SendQueueLength, export*ack's data rate was not 
     152observably different than export_generic's data rate.   
     153  export*ack requires using the new import_ack to communicate properly. 
     154Since the receipt of ACKs is asynchronous, we may now have the opposite  
     155problem to that we had before (duplicate data instead of lost data). It  
     156is now possible that import_ack actually received a packet, but export_ack 
     157didn't get the ACK before the socket broke. In this is case, export_ack  
     158will re-send the packet and import_ack will see the same packet more than  
     159once. The system running import_ack must be prepared for duplicate data. 
     160LDD 4/29/2005 
     161 
     162import_ack: 
     163  This new version of import is required as the data exchange partner  
     164for the new export*ack modules. However, it can communicate with either  
     165old or new-protocol export modules, and can therefore be used anywhere 
     166in place of import_generic. 
     167  From the first message received per socket connection, import_ack  
     168discovers what flavor of export it's talking to. It will do either  
     169old non-ACK or new ACK protocol as appropriate on the fly. 
     170  Import_ack has been modified to use same configuration commands as  
     171export for setting up the server connection and socket heartbeat  
     172strings and intervals. It still recognizes the original import_generic  
     173commands.   
     174  Since the receipt of ACKs by export_ack is asynchronous, we may now  
     175have the opposite problem to that we had before (duplicate data instead  
     176of lost data). It is now possible that import_ack received a packet,  
     177but the socket broke before export_ack received the ACK. In this is case,  
     178export_ack will re-send the packet and import_ack will see the same packet  
     179more than once. Therefore, the system running import_ack as a partner to  
     180export_ack must be prepared to handle duplicate data.  LDD 4/29/2005 
     181 
     182wftimefilter: 
     183  This new module was created to "sanitize" incoming waveform data  
     184streams to the liking of Earthworm modules. It reads waveform data 
     185(compressed or uncompressed) from one transport ring and writes it  
     186to another ring, filtering out duplicate data, time overlaps and  
     187bogus future timestamped data. Timestamp checks are done for each 
     188channel independently. The check for bogus future timestamps requires  
     189that the system clock is set to network time. 
     190  Wftimefilter can be configured to output the messages using the 
     191original installation/moduleid or its own installation/moduleid. 
     192However, it does not alter the contents of the message in any way. 
     193  Systems which are importing data using import_ack/export*ack should 
     194probably use wftimefilter to remove possible duplicate data after  
     195an import/export reconnect. Systems importing waveform data from  
     196non-Earthworm data sources should also consider running wftimefilter 
     197to ensure that only chronological timeseries enter their own Earthworm 
     198processing.  LDD 5/10/2005 
     199  Modifed to allow additional optional behavior: 
     200   1)rejecting packets that have a sample-rate different than the expected one for the 
     201     channel.   
     202   2)Limiting per-channel logging, to limit logfile size and increase readability. 
     203   3)Adding per-channel daily summaries of errors and warnings. 
     204   4)Adding the ability to issue a STATUS message to a ring as a part of the daily summary. 
     205  Default behavior should be unchanged. 
     206DK 2006/03/27 
     207 
     208startstop_service:  
     209(added to CVS by Paul Friberg 6/29/2005, authored by Mark Morrison) 
     210From the README.txt found in the src/system_control/startstop_sevice: 
     211startstop_service is identical to the old startstop_nt, except that  
     212it runs as a Windows service.  This means that the parameters are all the  
     213same - read from startstop_nt.d - but that startstop isn't just executed  
     214from a command window or via the scheduler.  Note that this version is  
     215taken from startstop_nt, so I haven't compiled or tested any of this under  
     216Solaris or other systems.  I believe it's generally felt, however,  
     217that these modifications don't apply to Solaris. 
     218 
     219srparxchewsend: as a new data source. This is contributed by Symmetric 
     220Research for their digitizers. It was installed in data_sources by 
     221Paul Friberg Jan 5, 2005. 
     222 
     223rayloc_ew: 
     224(last revised 13 July, 2004) Ilya Dricker at www.isti.com 
     225Rayloc_ew is an Earthworm Module to perform global relocation of 
     226earthquakes and travel time computation.  Rayloc_ew is an Earthworm-style  
     227wrapper around a Fortran program RayLoc written by Ray Bulland. 
     228Rayloc_ew attaches itself to the input ring and monitors the ring buffer 
     229for the TYPE_LOC_GLOBAL  
     230 
     231messages.  Rayloc_ew reformats the input and calls FORTRAN RayLoc processing 
     232machinery. The output of rayloc_ew is TYPE_RAYLOC 
     233 message, 
     234which is written to the output ring.  The rayloc_ew program is compiled  
     235and tested out on a Solaris platform (with gcc and g77 compilers). 
     236 
     237startstop_unix: 
     238Added in this Linux'ified version of startstop (uses a startstop_unix.d file) 
     239from Alexandre Nercessian: PAF 9/7/2005 
     240 
     241raypicker: 
     242Added this from the HYDRA package for Mitch Withers. This is the picker 
     243that is used by NEIC to feed glass. Only compile tested under Windows 
     244at this point since that is where NEIC uses it. 
     245PAF 01/30/2006 
     246 
     247glass: 
     248Add this from older NEIC distro. This is a global associator written 
     249by Carl Johnson. This module will only compile/run under Windows. 
     250PAF 01/30/2006 
     251 
     252eqfilterII: 
     253Added in this new module from Mitch WIthers for handling arc, global, 
     254and rayloc message types. 
     255PAF 01/30/2006 
     256 
     257geqproc: 
     258Same tasks as eqproc, but this takes global messages instead of 
     259arc messages. Part of global event processing chain. 
     260PAF 01/30/2006 
     261 
     262globalproc: 
     263Moved globalproc from NEIC v0.1 to v7.0.  Recall that globalproc 
     264listens to the glass chatter, assembles quake, pick, and amp messages 
     265into a global loc message, and sends it to the ring when appropriate. 
     266Combined with geqproc, the two accomplish the same thing as what 
     267eqproc did for binder.  This strays from the original intent of globalproc 
     268allowing a tweaked eqproc and globalproc to "eat" glass output simultaneously 
     269but given that we have rayloc, geqproc only needs to locate local events 
     270so this lashup was easier and does the job. Comments by Mitch Withers: 
     271PAF 01/30/2006 
     272 
     273config_ws: 
     274This module will listen on a wave_ring for scn or scnl type trace_buf[2] 
     275messages and create a waveserverV configuration file for the tanks. It 
     276has a number of configuration options to specify how many tanks and of 
     277what size they should be. 
     278This nifty little module is contributed by John Patton of the Hydra 
     279group and installed by Paul Friberg (only compiles under Windows).  
     280PAF 02/09/2006 
     281 
     282reconfigure: 
     283This command line tool sends a reconfigure request to startstop. Startstop 
     284will then re-read startstop_*.d and start up any new rings or modules it  
     285finds. Duplicate module names and duplicate ring names are not allowed.  
     286Necessary for this to work is the addition of  
     287Message  TYPE_RECONFIG       112 
     288to the earthworm.d file. 
     289s.lisowski 20060405 
     290 
     291 
     292 
     293MODIFICATIONS/BUG FIXES TO EXISTING MODULES: 
     294******************************************** 
     295 
     296hyp2000: update for Intel 9 Fortran compiler (from v6.3) 
     297note there is a makefile.nt_intel9 and a new line 
     298for linking to the intel 9 compiler in the ew_nt.cmd. 
     299For Linux, hyp2000 compiles but is still majorly broken. 
     300PAF 6/6/2006 
     301 
     302ringdup: 
     303Added in a Hydra contribution that allows BLOCKING if particular 
     304SCNL's. This is all encapsulated in the scnfilter_exclude.c code. 
     305This compiled fine under Solaris, but has only been really tested 
     306under Windows. I did not upgrade the makefile.ux to use this yet 
     307until it has been tested. Look in the new .d file to see the 
     308notes about Block_scnl, but here's what I got from John Patton: 
     309blocker is what Hydra calls this version 
     310This module is a tweak to the program ringdup_scn.  It involved adding  
     311functionality to explicitly block channels by SCNL while letting others  
     312not specified to be copied from the input ring to the output ring.   
     313The functionality is not implemented in ringdup.c itself, but in the  
     314library scnfilter.  To avoid confusion, since scnfilter is used by  
     315export, this file was copied to the ringdup directory and renamed  
     316scnfilter_exclude.  This file is identical to the original scnfilter  
     317except for the required changes.  The makefile for ringdup was modified  
     318to link to scnfilter_exclude instead of scnfilter.  The library has also  
     319recently been enhanced so that ringdup_scn understands the message  
     320type TYPE_PICK_GLOBAL.   
     321Modifications made by PAF 6/6/2006 
     322 
     323seisan: 
     324Seisan format export in waveman2disk, trig2disk (and therefore archman, etc.) 
     325Edited seiutils.c to truncate insignificant digits off the end of a  
     326numerical comparison so as to eliminate problems where the Seisan data file 
     327would null out after a certain point in the middle of the file, and render 
     328half the file useless. 
     329 
     330startstop: 
     331Reconfigure or 'recon' command added to startstop module. The command can  
     332either be given by running the command-line 'reconfigure' tool, or by typing 
     333'recon' or 'reconfigure' into the interactive EARTHWORM STATUS interface.  
     334Startstop will then re-read startstop_*.d and start up any new rings or  
     335modules it finds. Duplicate module names and duplicate ring names are not  
     336allowed. Necessary for this to work is the addition of  
     337Message  TYPE_RECONFIG       112 
     338to the earthworm.d file. 
     339Also some startstop commonalities for all four platforms (Windows, Windows  
     340Service, Linux, Solaris) were added to libsrc/util/startstop_lib.c, commonalities  
     341between Solaris and Linux were added to libsrc/util/startstop_unix_generic,  
     342commonalities between Windows and Windows Service were added to  
     343libsrc/winnt/startstop_winlib.c. 
     344s.lisowski 20060405 
     345Incorporated Hydra StartstopConsole into the Windows startstop_service, and  
     346created Hydra-independent makefiles for necessary objects 
     347s.lisowski 20060606 
     348 
     349statmgr: 
     350Modified to allow up to 10 pagegroup commands in statmgr config file. 
     351Modified descriptor files to allow optional module-specific settings for 
     352pagegroup (up to 10) and mail (up to 10) recipients. Any pagegroup or 
     353mail setting in a descriptor file overrides the statmgr config settings. 
     354This will allow the user to fine-tune on a per-module basis the recipients  
     355of various Earthworm notifications. 
     356Modified logfile name to use the name of the statmgr config file (had 
     357been hard-coded to 'statmgr*'. 
     358Modified logging of configuration and descriptor files. 
     359LDD 2006/4/25 
     360Added new command "From" to allow user to set the "From" field of outgoing 
     361email messages. This command is used only in the Windows version of statmgr. 
     362If the "From" command is ommitted, the email "From" field will be filled 
     363using environment variables %USERNAME%@%COMPUTERNAME%. Previous versions 
     364of SendMail() defaulted to root@mailserver. LDD 2006/05/19  
     365 
     366logit: 
     367Made it so that logit now appends a platform-specific slash to EW_LOG if 
     368there isn't one. This allows for a more consistent entry on in the  
     369environment/ew_.{cmd,bash} file. 
     370s.lisowski 20060405 
     371 
     372gmew: 
     373Added in SCNL capability (no longer available for just SCN) and upgraded 
     374to the new version of ShakeMapXML (v3.1). I also patched a minor wave server 
     375warning message to be more explicit (empty menu) and added versioning 
     376to the program itself. 
     377PAF 03/15/2006 
     378 
     379heli_ewII: 
     380Added in SCNL capability (no longer available for just SCN). 
     381PAF 03/15/2006 
     382 
     383libsrc/solaris/sleep_ew.c: 
     384Added: #include    WMK 3/22/04 
     385 
     386libsrc/solaris/transport.c: 
     387Added: #include  
     388Function tport_bufthr() now returns NULL.  WMK 3/22/04 
     389 
     390libsrc/winnt/transport.c: 
     391Added: #include  
     392 
     393libsrc/util/kom.c 
     394Changed: "static struct k_buf" to "struct k_buf"   WMK 3/22/04 
     395 
     396libsrc/util/trheadconv.c 
     397New function to convert TYPE_TRACEBUF headers to 
     398TYPE_TRACEBUF2 headers.  WMK 4/29/04 
     399 
     400libsrc/winnt/sendmail.c 
     401Increased BUFFSIZE from 200 to 250, to accomodate more email recipients. 
     402This is a kludgy fix.  It might better to allocate the buffer on the fly, 
     403to accommodate any number of email messages.  Also, note that I did not 
     404increase BUFFSIZE in libsrc/solaris/sendmail.c  WMK 6/11/03 
     405 
     406libsrc/util/getutil.c 
     407Added new functions: GetKeyName, GetInstName, GetModIdName, GetTypeName. 
     408These functions take a numeric value (shared memory key, installation id, 
     409module id or message type) as their argument and return a pointer to its  
     410corresponding character string name from the earthworm*d tables.  If the  
     411numeric value is not in the earthworm*d tables, the functions return a 
     412NULL pointer. 
     413Added new function, GetLocalInstName, which return a pointer to the  
     414environment variable EW_INSTALLATION. 
     415LDD 7/29/2004 
     416 
     417libsrc/util/rw_strongmotionII.c: 
     418Changed rd_strongmotionII() to interpret both "-" and "?" as NULL strings 
     419when reading the QID: line qid and qauthor fields.  Previously only 
     420accepted "?" as a NULL string.  Change was required by CISN data which 
     421uses "-" as a NULL string in those fields.  LDD 2/13/2004 
     422 
     423adsend: 
     424Modified to produce tracebuf messages with trace2 headers. 
     425These headers contain location code and header version number. 
     426Old-style tracebuf messages (w/o location code) are no longer 
     427made.  WMK 4/22/04 
     428 
     429pick_ew: 
     430  Modified to create picks and codas containing SCNLs. 
     431Input waveform messages may be of either TYPE_TRACEBUF or 
     432TYPE TRACEBUF2.  WMK 4/29/04 
     433  Added new optional config file command so that pick_ew can choose  
     434which messages to process: GetLogo    
     435There's no limit to the number of GetLogo commands that can be used. 
     436If no GetLogo commands are used, then pick_ew will process all 
     437TYPE_TRACEBUF and TYPE_TRACEBUF2 messages in InRing. LDD 4/8/2005 
     438 
     439carlstatrig: 
     440  Modified for location code. Reads TYPE_TRACEBUF2 and produces 
     441TYPE_CARLSTATRIG_SCNL messages. PNL 5/5/2004 
     442  Added new optional config command so that carlstatrig can choose 
     443which messages to process: GetWavesFrom   
     444There's no limit to the nubmer of GetWavesFrom commands that can 
     445be used. If no GetWavesFrom commands are listed, then carlstatrig 
     446defaults to "GetWavesFrom INST_WILDCARD MOD_WILDCARD". LDD 4/12/2005 
     447 
     448binder_ew: 
     449  Modified to use TYPE_PICK_SCNL as input.  Required changes to the 
     450station file reading library, site.c, and to the hypoinverse site file. 
     451LDD 5/17/2004 
     452  Modified to attempt pick association with entire quake list before  
     453attempting a new stack. Previously only attempted association with 
     454the 10 most recent events.  This should allow picks to arrive fairly 
     455late (out-of-real-time) and still be associated with an event. This 
     456will prevent such picks from restacking into a new, duplicate event. 
     457This modification requires that binder keep track of the earliest 
     458pick sequence number associated with each quake so that no hypocenter 
     459updates are attempted if some of the supporting picks are no longer 
     460in the pick FIFO. If a Pick  associates with an event that can't 
     461be updated, a TYPE_LINK message will go out, but no relocation will  
     462be done, and no new TYPE_QUAKE2K message will be issued.  
     463LDD 10/21/2004 
     464  grid.c changes: Added sanity check on mStack value; modified grid_stack  
     465to go thru pick list from newest to oldest pick.  
     466LDD 10/29/2004 
     467  bind.c: Modified to make the pick and quake FIFO lengths configurable. 
     468Added two optional config file commands: 
     469pick_fifo_length xxxx (default = 1000 = previous hardcoded length) 
     470quake_fifo_length yyy (default =  100 = previous hardcoded length) 
     471Only large networks should need to consider using these commands to 
     472increase FIFO sizes. Care must be taken to ensure that eqproc/eqprelim 
     473FIFO lengths are the same length (or larger) than binder_ew's FIFOs. 
     474LDD 3/9/2005 
     475  Modified to shut down cleanly on termination request. LDD 4/15/2005 
     476  binder_ew.c: Added two optional commands: 
     477BufferRing  ringname (default = BINDER_RING = previous hardcoded string) 
     478            This defines which ring binder will use for private storage 
     479            space for incoming picks. ringname must exist in an earthworm.d  
     480            "Ring" line. 
     481EventIdFile filename (default = quake_id.d  = previous hardcoded string) 
     482            This defines the name of the file that will contain the  
     483            next valid eventid for binder to apply to a new association. 
     484Having these two items hardcoded had made it extremely tricky to run 
     485multiple instances of binder on the same host without them competing for 
     486common resources. Now it will be a simple matter of different configuration 
     487files to run multiple instances. This could be useful in testing  
     488different binder configurations.  LDD 8/1/2005 
     489 
     490eqproc: 
     491Modified to use TYPE_PICK_SCNL and TYPE_CODA_SCNL as input. 
     492Modified to produce TYPE_EVENT_SCNL as output.  
     493LDD 5/17/2004 
     494  Modified to make four more operational parameters configurable. 
     495All are set with new optional config file commands and default to 
     496the previous hardcoded values if their commands are ommitted.  
     4971. pick FIFO length ('pick_fifo_length' command, default = 1000) 
     4982. quake FIFO length ('quake_fifo_length' command, default = 100) 
     499For proper event reporting, eqproc's pick and quake FIFO lengths must 
     500greater than or equal in length to binder's FIFOs. 
     5013. heartbeat interval ('HeartbeatInt' command, default = 0.3*tReport) 
     5024. time interval at which quake FIFO is checked for events that are  
     503ready to send downstream ('rpt_check' command, default = 0.3*tReport) 
     504Items 3 & 4 were previously a hardcoded fraction of tReport, which is  
     505configured with the optional 'rpt_dwell' command (default = 30 s). 
     506These changes should allow eqproc to send events downstream in a more 
     507timely fashion.  LDD 3/10/2005 
     508 
     509eqprelim: 
     510Modified to use TYPE_PICK_SCNL and TYPE_CODA_SCNL as input. 
     511Modified to produce TYPE_EVENT_SCNL as output. 
     512LDD 5/17/2004 
     513  Modified to make two more operational parameters configurable. 
     514Both are set with new optional config file commands and default to 
     515the previous hardcoded values if their commands are ommitted.  
     5161. pick FIFO length ('pick_fifo_length' command, default = 1000) 
     5172. quake FIFO length ('quake_fifo_length' command, default = 100) 
     518For proper event reporting, eqprelim's pick and quake FIFO lengths must 
     519greater than or equal in length to binder's FIFOs.  LDD 3/11/2005 
     520 
     521eqcoda: 
     522Modified to use TYPE_EVENT_SCNL as input and to write location codes 
     523in the TYPE_HYP2000ARC message it puts out. Added new optional command 
     524"LogArcMsg" to control whether output TYPE_HYP200ARC msg is written to 
     525eqcoda's log file (0=don't log; non-zero=do log it).  LDD 5/20/2004 
     526 
     527hyp2000: 
     528Grabbed Fred Klein's most recent version of hyp2000 which is location-code 
     529compliant.  LDD 7/01/2004 
     530Grabbed Fred Klein's most recent version of hyp2000 which has a new 
     531command 'DI1' to set a different distance weighting scheme for early 
     532iterations.  Normal distance weighting is still set with the 'DIS' 
     533command. This change was prompted by trouble locating the Parkfield 
     534mainshock of 9/2004.  LDD 12/8/2004 
     535Grabbed Fred Klein's most recent version of hyp2000 which has added 
     536logic to allow location codes "  " and "--" to match (they both 
     537represent a "blank" location code). LDD 10/5/2005 
     538 
     539ew2file: 
     540Added optional command "TimeBasedFilename X" to control whether a  
     541time string derived from the message contents is added to the beginning   
     542of the output file names. If X is zero (default), original file naming 
     543convention is used (SequenceNumber.suffix). If X is non-zero, a time  
     544string is prepended to the filename (YYYYMMDD-HHMMSS.SequenceNumber.suffix). 
     545This option is only applicable for TYPE_PICK2K, TYPE_PICK_SCNL, and 
     546TYPE_HYP2000ARC messages. All other message types will be named  
     547according to the original convention regardless of the TimeBaseFilename 
     548setting.  Other messages types containing timestamps could be added  
     549to the new naming scheme in the future.  LDD 11/11/2005 
     550 
     551evanstrig: 
     552Modified to use TYPE_TRACEBUF2 as input and to write TYPE_LPTRIG_SCNL 
     553as output. Both message types include location codes.  Changed config 
     554file command "MaxSCN" to "MaxSCNL".  Added location code as the fourth 
     555argument to the "TriggerOn" command. LDD 5/21/2004 
     556 
     557evansassoc: 
     558Added location code; modified to use TYPE_LPTRIG_SCNL as input and to 
     559write TYPE_TRIGLIST_SCNL as output.  Added location code as the fourth 
     560argument to the "AddChannel" command. LDD 5/24/2004 
     561 
     562putter: 
     563Modified to read files of TYPE_PICK_SCNL and TYPE_CODA_SCNL. Added  
     564optional second argument, ringname (name of ring to write msgs to). 
     565Previously was hardcoded to write to PICK_RING. Will still work with 
     566TYPE_PICK2K and TYPE_CODA2K msgs as long as the installation id and 
     567moduleid are less than 100.  LDD 5/17/2004 
     568 
     569findwave: 
     5701. Modified to read both TYPE_TRACEBUF2 and TYPE_TRACEBUF msgs.  
     5712. Modified "d" output (debug) to include pin number and message logo as   
     572both character strings from earthworm*.d and numeric values. If a field 
     573of the logo is not in the local earthworm*d files, the debug output will 
     574 
     575show one or more of these strings: inst_unlisted, mod_unlisted, type_unlisted.   
     576If the channel's installation id is different from the local installation id  
     577(set by the EW_INSTALLATION environment variable), the module_id string will  
     578read: mod_not_local. 
     5793. Modified "w" output (wave_serverV) to include the actual installation 
     580and module id strings from earthworm*d files.  If the installation is not 
     581in the earthworm_global.d file, it will be listed as INST_WILDCARD.  If the  
     582moduleid is not in the earthworm.d file, it will be listed as MOD_WILDCARD. 
     583If the channel's installation id is different from the local installation id  
     584(set by the EW_INSTALLATION environment variable), the module will be listed  
     585as MOD_WILDCARD.  
     5864. Modified all output to be space-delimited rather than tab-delimited. 
     587LDD 7/29/2004 
     588 
     589findwave: 
     590  Merged Hydra changes into findwave.  The default findwave behavior is unchanged. 
     591  Hydra changes include: 
     592     Option:  have tanks segmented by HD based on a HardDrive size 
     593     Option:  have findwave truncate tanksizes to 1GB, to comply with 
     594              wave_serverV maximum safe tank size. 
     595     Option:  have findwave massage the record sizes to be a fixed size 
     596              for all tanks. 
     597     Option:  have findwave massage the record sizes for variable-record-length 
     598              channels to be slightly larger than the largest record received for that channel. 
     599   Run findwave with no arguments for more information. 
     600 
     601gaplist: 
     602Added a "Total Gap" column to the output tables.  "Total Gap" is the 
     603total, in seconds, of the length of all gaps for a particular channel. 
     604"Total Gap" gets reset to 0 when the day rolls over.  Also, added a 
     605column named "Dead Time", which is the elapsed time since a channel 
     606died.  If "Dead Time" is blank, the channel is currently alive. 
     607"Dead Time" does NOT reset to 0 when the day rolls over. WMK 1/8/04 
     608 
     609gaplist: Slight table reformat.  WMK 1/20/04 
     610 
     611gaplist: Now accepts TYPE_TRACEBUF and/or TYPE_TRACEBUF2 messages. 
     612The config file (gaplist.d) now contains a list of SCNLs to monitor, 
     613rather than SCNs.  WMK 4/30/04 
     614 
     615gaplist: Added system-clock timestamp to logging of gaps/overlaps. 
     616Made slight formatting changes in logging.  LDD 5/7/2004 
     617 
     618gaplist: Now, the scnl array is allocated using realloc, so any number 
     619of Scnl and Label lines are permitted in the config file. 
     620Fixed two bugs: 
     621Label strings longer than 31 characters weren't null-terminated in the 
     622program.  Now, they are, so long labels are correctly truncated. 
     623Also, the label array, defined in gaplist.h, had a length of 31 
     624characters, which caused some values in the scnl array to get clobbered. 
     625This resulted in continuous dead/alive messages being sent to statmgr. 
     626WMK 5/11/04 
     627  
     628gaplist: Added new optional command: GetLogo    
     629If no GetLogo cmds are given, gaplist will process all TYPE_TRACEBUF 
     630and TYPE_TRACEBUF2 messages (previous default behavior). 
     631Modified to allow processing of TYPE_TRACE_COMP_UA and TYPE_TRACE2_COMP_UA 
     632messages (headers are NOT compressed!). LDD 4/11/2005 
     633 
     634evtK2ora: 
     635Fixed endTime bug in makeEwSnippet(). Thanks Jim L. 
     636Alex 5/9/03 
     637 
     638shakemapfeed: 
     639The last two arguments to ewdb_api_GetSMDataWithChannelInfo were 
     640reversed. That meant that the number of returned SM messages would be 
     641incorrect IF that number exceeded MaxDataPerEvent. The result would be an 
     642out-of-bounds memory access and corrupted SM data. PNL 6/9/03 
     643 
     644shakemapfeed: 
     645Changed the sorting used in Filter_SM_data. Now SM messages are sorted by SCNL 
     646instead of by idchan. That means that the output XML will have components of 
     647one station listed consecutively, a big help for shakemap. PNL 10/30/03 
     648 
     649shakemapfeed: 
     650Changed the length of the long station name in the mapping file from 
     65120 to 50 characters.  LDD 2/5/04 
     652 
     653skakemapfeed:  (EWDB API - Strong Motion) ewdb_internal_GetAllSMMessages() 
     654(Note: This function is called by ewdb_api_GetSMDataWithChannelInfo()) 
     655Fixed a bug in PostGetAllSMMessages().  The idEvent field may be null 
     656for some records, and Oracle  does not appear to be writing a 0 value to 
     657the memory area for the null field, so that record assumes the 
     658idEvent of the previous record located at that point 
     659in the internal buffer.  The result is data corruption, such that you get 
     660messages that are unassociated with an Event, but they appear to be associated 
     661with an event. 
     662DK 02/12/04 
     663 
     664shakemapfeed: Added new optional command, SMQueryMethod, to control how SM data 
     665is requested from the DBMS. Default behavior is original 2-stage query (get 
     666all SM data associated with this eventid, then get all UNassociated SM data 
     667in a space/time box). If SMQueryMethod is non-zero, shakemapfeed will request 
     668all SM data in a space/time box. This will return SM data associated with this 
     669event, SM data associated with other events, and UNassociated SM data. 
     670Regardless of query method, post-query filtering will be performed on eventid, 
     671external eventid, and external author.  SM data associated with a different 
     672eventid but with the same author will be rejected.  Data with a different 
     673author will be allowed - this is most likely data imported from another 
     674network and its eventids are meaningless in our DBMS.  LDD 02/13/2004 
     675 
     676shakemapfeed: Changed the auto-feed scheduling logic to allow for variable 
     677time intervals between feeds to shakemap.  Feeds are scheduled at 
     678fixed times after the arrival of the archive message by using the new 
     679command, ScheduleFeed (one time per ScheduleFeed command, up to 20 allowed). 
     680Auto-feeds will continue at the last ScheduleFeed interval until UpdateDuration 
     681minutes after the event origin time.  ScheduleFeed replaces the original 
     682DelayFirstFeed and UpdateInterval commands. These original commands are still 
     683accepted and will set up the auto-feed schedule in the original manner in the 
     684absence of ScheduleFeed commands.  LDD 3/4/2004 
     685 
     686k2ew: 
     687The channel bitmap bug reported below has been fixed. K2ew now reads the 
     688correct bitmap to determine which channels are streaming. PNL 6/9/03 
     689 
     690k2ew: 
     691Version 2.38: K2ew will now, optionally, obtain network code from the K2 
     692headers, rather than from the configuration file.  For this to work, network 
     693codes need to be entered into the K2 using Altus File Assistant. A different 
     694network code may be entered for each stream.  The K2 must be running 
     695application firmware version 3.02 or later.  The "Network" parameter, in the 
     696config file, is now optional.  WMK 3/25/05 
     697 
     698liss2ew, ew2liss, dumpseed: 
     699There was a bug on Microsoft based systems that caused the user defined 
     700types BYTE, WORD, and LONG to be ignored.  This was a problem specifically 
     701with the type WORD, which was changed from a signed 16-bit value to an 
     702unsigned 16-bit value, causing many problems, most noteably with the 
     703signed seed varibles for sample rate and sample rate multiplier.  All 
     704liss based modules have had this problem corrected. JMP 06/17/2003 
     705 
     706getfile_ew: 
     707There was a feature in getfile_ew that could cause more cpu to be 
     708used than necessary by checking time since last heartbeat more 
     709often than necessary.  Added sleep_ew(1000) within heartbeat 
     710loop. MMW 06/29/2003 
     711 
     712getfileII: 
     713Ported getfileII to FreeBSD.  Two new files are in the source directory: 
     714makefile.bsd and socket_bsd.c.  No other changes to files. WMK 11/25/03 
     715 
     716getfileII: 
     717Added more string-length checking to config.c and to the incoming file 
     718names and output paths to avoid overflowing character arrays. Changed 
     719version number to 1.1.  LDD 7/28/2004 
     720 
     721sudsputaway: 
     722Added functions to properly initialize SUDS structures to 
     723Banfill's default values. CJB 10/3/2003 
     724 
     725sudshead.h: 
     726Updated to make more compatible with suds.h in current 
     727release of PCSUDS. CJB 10/3/2003 
     728 
     729file2ew: 
     730Fixed bug in raw2ew.c which caused file2ew to exit when the 
     731SuffixType command contained only 2 arguments.  The third 
     732argument (installation ID) was supposed to be optional, and 
     733now is!  LDD 10/3/2003 
     734 
     735ew2file: 
     736Fixed bug in timing of heartbeat file generation. 
     737Had been using HeartBeatInt instead of HeartFileInt to control 
     738the production loop.  Caused continuous heartbeat file generation 
     739when HeartFileInt==0.  LDD 11/24/2003 
     740 
     741sniffwave: 
     742Changed to sniff headers of both TYPE_TRACEBUF and TYPE_TRACE_COMP_UA msgs. 
     743Will only print data values for TYPE_TRACEBUF messages.  Changed to accept 
     744the any of these strings as wildcards in SCN: "wild", "WILD", "*". 
     745LDD 10/31/2003 
     746 
     747Modified to list both the Quality value and (if TRACE2_HEADER the Version 
     748value) in the header output. 
     749DK 2005/03/27 
     750 
     751sniffwave: 
     752Modified to sniff headers of TYPE_TRACEBUF2 and TYPE_TRACE2_COMP_UA msgs. 
     753Added new command-line argument  to support these new message 
     754types. LDD 4/13/2004 
     755 
     756vX.X/src/data_exchange/Makefile: 
     757Added directives for STANDALONE_MODULES (right now getfileII and sendfileII) 
     758so that their executables, which are created in their source directories, 
     759are also copied to the vX.X/bin directory.  LDD 11/27/2003 
     760 
     761sendfileII: 
     762Ported to BSD Unix.  Added a new makefile, named makefile.bsd. 
     763To compile, type "make -f makefile.bsd".  Otherwise, everything is the 
     764same as on Solaris.  WMK 2/17/04. 
     765 
     766sendfileII: 
     767Added optional config command "-SendPause xxx" where xxx is a time in 
     768milliseconds (default = 0). sendfileII will sleep SendPause millseconds 
     769before trying to open a file for shipping.  This gives file writers of 
     770unknown behavior some time to finish writing and to close the file before 
     771sendfileII wisks it away. Windows fopen_excl() was supposed to keep us 
     772from opening a file that another process was using, but I don't think  
     773it's working the way we expected. Besides, Solaris never had the 
     774fopen_excl() option, so SendPause helps us there.  LDD 3/23/2006 
     775 
     776EWDB - Station Information: 
     777Modified the two stored procedures that handle the processing of SCNL 
     778from station list tools (stalist_XXX2ora) and automatic data (trace feed, 
     779automatic pick feed, strong motion, etc.). 
     780Modified the procedures to properly process the Location Code of the 
     781SCNL.  Prior to this, Location codes weren't properly being handled. 
     782Because this change is to SQL procedures and not C code, you must 
     783refresh the DB stored procedures by updating with the SQL scripts from 
     784"working".  (run ewdb_load_external_utils.sql from schema/sql_scripts). 
     785DK 02/17/04 
     786 
     787naqs2ew: 
     788  Modified to produce TYPE_TRACEBUF2 messages to support location codes. 
     789Can optionally be configured to produce the original TYPE_TRACEBUF msg. 
     790New config file commands: OutputMsgType (optional) and RequestChanSCNL. 
     791See sample configuration file for details. LDD 4/14/2004 
     792  Modified to output all packets (regardless of time-order) to Earthworm 
     793when RequestChanSCNL "delay" is -1.  This will allow out-of-chronological 
     794order data and possibly duplicate data into the EW system. For delay>=0, 
     795out-of-order packets will be ignored (previous behavior). LDD 11/22/2005 
     796  Added new command "RepackageNmx" (optional) to control how Nmx packets 
     797are repackaged into Earthworm messages.  If set to 1, naqs2ew will create 
     798one EW msg from each Nmx packet. If the Nmx packet contains more than 
     799MaxSamplePerMsg samples, multiple EW msgs will be created. The entire Nmx  
     800packet will be converted immediately.  If set to 2 (the default), naqs2ew 
     801will repackage Nmx packets into 1-second EW msgs.  If an Nmx packet  
     802contains more or less than 1-second of data, some samples will be buffered 
     803until the receipt of the next Nmx packet for that channel.  Some shorter 
     804EW messages will be generated if time tears are present.  LDD 11/23/2005 
     805  Fixed bug in how compression bits of raw Nmx compressed data packets  
     806are interpreted in unpack_tsdata_bundle() of nmxp_packet.c. Now, if both  
     807compression bits are 0, it is interpreted as "this data set contains no data"  
     808and the 4-byte data set is ignored. Previously, if both compression bits  
     809were 0, it was (mis)intrepreted to mean that compression was not used and  
     810that the data set contained a single non-differenced data value. This bug  
     811would have added extra bogus samples to the output, but probably only when 
     812a data packet was partially full. Since I can't think of a reason why a  
     813datalogger would not fill each data packet fully, I'm guessing that this  
     814bug was very rarely, if ever, encountered. LDD 1/4/2006 
     815 
     816 
     817reftek2ew: 
     818Modified to produce TYPE_TRACEBUF2 messages to support location codes. 
     819Config command "SCNFile" was replaced by the "SCNLFile" command. 
     820Location code was added to the SCNLFile (which maps between  
     821DAS#,stream,channel and SCNL,pin) as the 7th of 8 fields on each line. 
     822Added a new config file command "SendUnknownChan" to control whether 
     823channels not listed in the SCNLFile are written as TYPE_TRACEBUF2 msgs. 
     824If SendUnknownChan is non-zero, reftek2ew makes up the SCNL as follows: 
     825Station is the DAS serial number, component is "Cxx" where xx is the  
     826channel number from the DAS, network is "Sy" where y is the stream number  
     827from the DAS, and location code is "--" (the NULL location). 
     828If SendUnknownChan is zero, data from channels not listed in SCNLFile 
     829is ignored.  LDD 5/25/2004 
     830 
     831compress_UA: 
     832Modified to produce TYPE_TRACE2_COMP_UA messages when handling 
     833TYPE_TRACEBUF2 messages as input. Compress_UA can still take TYPE_TRACEBUF 
     834packets as input and will produce TYPE_TRACE_COMP_UA messages as output. 
     835Eliminated "GetWavesFrom" command and replaced it with two new commands: 
     836"GetLogo" to supply the logos to process and "CompressSCNL" to supply 
     837the list of channels to process.  If handling TYPE_TRACEBUF messages, 
     838the location code in the CompressSCNL command is ignored, but it still 
     839must be provided.  LDD 4/16/2004 
     840 
     841decompress_UA: 
     842Modified to work on both TYPE_TRACE2_COMP_UA and TYPE_TRACE_COMP_UA msgs. 
     843Produces TYPE_TRACEBUF2 messages if input is TYPE_TRACE2_COMP_UA. 
     844Produces TYPE_TRACEBUF messages is input is TYPE_TRACE_COMP_UA. 
     845Eliminated "GetWavesFrom" command and replaced it with "GetLogo" command. 
     846LDD 4/16/2004 
     847 
     848decimate: 
     849Modified to work on either TYPE_TRACEBUF and/or TYPE_TRACEBUF2 messages 
     850to support the addition of location codes to network processing. 
     851Output message will be of same type as input message.  Changed the 
     852GetWavesFrom command to require a third argument specifying the input 
     853message type (must be either TYPE_TRACEBUF or TYPE_TRACEBUF2). If the  
     854input message type is TYPE_TRACEBUF, location codes are ignored. Replaced  
     855the GetSCN command with GetSCNL to support the addition of location codes.   
     856If the GetSCN command is used, the input and output location codes are  
     857set to "--".  LDD 5/11/2004 
     858 
     859sniffring: 
     860Modified so it does not attempt to print the contents of two new binary 
     861message types: TYPE_TRACEBUF2 and TYPE_TRACE2_COMP_UA.  LDD 4/16/2004 
     862 
     863export_actv, export_scn_actv: 
     864Moved source code from data_exchange/export_actv into data_exchange/export 
     865to avoid duplication of the supporting export filtering code.  The versions 
     866of the filters in export_actv had not had bug fixes in quite a while and 
     867were not location-code compliant.  LDD 4/20/2004 
     868 
     869export_scn, export_scn_pri, export_scn_actv: 
     870Modified the scnfilter code to include location code as well.  Replaced 
     871Send_scn and Send_scn_remap config commands with Send_scnl and Send_scnl_remap. 
     872If old commands are used, the location code will be set to * (wildcard). 
     873Modified to work with all the new location-code friendly Earthworm messages: 
     874TYPE_TRACEBUF2, TYPE_TRACE2_COMP_UA, TYPE_PICK_SCNL and TYPE_CODA_SCNL. 
     875Still works with old format messages.  LDD 4/21/2004 
     876 
     877export_generic,export_scn 
     878Added logging under "Verbose" mode concerning the queue status of each 
     879message to be exported. This will generate VERY LARGE log files, but 
     880could be useful in debugging.  LDD 3/23/2005 
     881 
     882write_cta: 
     883Program now reads TYPE_TRACEBUF and TYPE_TRACEBUF2 messages from the 
     884transport ring.  All TYPE_TRACEBUF messages are converted to TYPE_TRACEBUF2, 
     885before writing to tape.  Tape files now begin with "wu" (instead of "wt"), 
     886to indicate that they contain TYPE_TRACEBUF2 messages.  WMK 5/11/04 
     887 
     888read_cta: 
     889Program now reads tape files whose names begin with "wt" and "wu". 
     890"wu" files contain TYPE_TRACEBUF2 messages.  WMK 5/11/04 
     891 
     892cta2cusp: 
     893Cosmetic changes.  Program will process cta files beginning with wt or wu. 
     894Only old version triglist messages, without location code, will work. 
     895If there are multiple channels with the same SCN, they will be interleaved 
     896in the file sent to CUSP.  This is bad.  WMK 5/12/04 
     897 
     898tankplayer: 
     899Added support for TypeTraceBuf2, which was missing from the get_time function 
     900that is used to determine the time of the packet from the trace header. 
     901Changed the program's behavior when Tracebuf2 packets are encountered with 
     902VERSION fields that don't match those compiled into the program.  Previously 
     903the program always quit at the first sign of a tracebuf with a mismatched version 
     904number.  Now depending on the value of the IgnoreTBVersionNumbers config command, 
     905the program attempts to parse and either play or skip the message based on  
     906the value of the command.  (TRUE = play, FALSE= ignore). 
     907Added a log message when tankplayer comes across a large delay between packets. 
     908Modified the sleep code that executes between packets, so that it sleeps  
     909in small intervals and continues to issue heartbeats even during a large gap. 
     910Added additional debugging info for dealing with problems encountered in tracebuf files. 
     911DK 2006/03/09 
     912 
     913tankplayer: 
     914odified to read TYPE_TRACEBUF2 files in addition to the original file 
     915types (TYPE_TRACEBUF and TYPE_ADBUF).  LDD 5/21/2004 
     916 
     917remux_tbuf: 
     918Added WaveMsg2MakeLocal() call to report and filter out tracebufs 
     919with headers that don't checksum. 
     920Replaced fprintf(stdout) commands with logit(). 
     921Added a progress indicator that prints a ".' to the screen each time 
     922100 tracebufs have been processed. 
     923DK 2006/03/09 
     924 
     925time_ew.c (timegm_ew()) 
     926Fixed bugs in timegm_ew() that appeared on machines not set to UTC timezone. 
     927DK 07/12/2004 
     928 
     929import_generic: 
     930  Moved the generation of Earthworm TYPE_HEARTBEAT messages out of the 
     931Heartbeat thread and into the main() thread. EW heartbeats will be generated 
     932in both the "connect to server" loop and the main working loop. This means 
     933that import will keep beating its EW heart when its export server becomes 
     934inaccessible, avoiding unnecessary restarts by statmgr/startstop. The 
     935former Heartbeat thread was renamed the SocketHeartbeat thread because 
     936its sole job is to write heartbeats (alive strings) to the socket. Also 
     937changed names of variables related to the socket heartbeat thread to  
     938avoid confusion.  LDD 3/15/2005  
     939  Restructured the "connect to server" loop to be easier to follow and  
     940reworded the messages logged during connection attempts. LDD 3/17/2005 
     941 
     942import_gen_pasv: 
     943Incorporated Richard Godbee's bug fixes in the accept_ew loop (fixed  
     944mis-placed end-while bracket, uninitialized variables) and increased 
     945the length of the RingName and MyModName variables. Reformatted the  
     946entire file with proper, readable indenting, changed accept_ew timeout  
     947to HeartBeatInt (had been hard-coded to 9 seconds), added inter-connection  
     948time interval to logging, generally cleaned up comments. LDD 4/13/2006 
     949 
     950Most Modules: 
     951  Linux Makefiles (makefile.ux) have been added to a number of modules and 
     952in some cases _LINUX compile directives have been added into the code. The 
     953list of codes to which this has been done will be provided as a separate 
     954note. 8/11/2005 Paul Friberg 
     955 
     956startstop_nt: 
     957Added in restart command to Interactive() function. This nice modification 
     958was provided by Murray McGowan. Tested and added by Paul Friberg 9/7/2005 
     959 
     960startstop_unix/startstop_solaris: 
     961Added in the same restart command as above. It's a nice feature to have. (9/7/2005) 
     962 
     963 
     964CHANGES TO CONFIGURATION FILES and DESCRIPTOR FILES: 
     965**************************************************** 
     966 
     967earthworm.d: Added this earthworm type to allow sending a reconfigure  
     968command through rings. 
     969Message  TYPE_RECONFIG       112 
     970 
     971statmgr.d: Up to 10 pagegroup commands are now allowed (at least one is 
     972required).  LDD 2006/4/25 
     973 
     974*.desc:  
     975Modified descriptor files to allow optional module-specific settings for 
     976pagegroup (up to 10) and mail (up to 10) recipients. Any "pagegroup" or 
     977"mail" commands in a descriptor file override the statmgr config settings. 
     978This will allow the user to fine-tune on a per-module basis the recipients  
     979of various Earthworm notifications.  LDD 2006/4/25 
     980 
     981shakemapfeed.d: Added new optional command, SMQueryMethod, to control how SM 
     982data is requested from the DBMS. Default behavior (SMQueryMethod 0) is original 
     9832-stage query (get all SM data associated with this eventid, then get all 
     984UNassociated SM data in a space/time box). If SMQueryMethod is non-zero, 
     985shakemapfeed will request all SM data in a space/time box. This will return 
     986SM data associated with this event, SM data associated with other events, 
     987and UNassociated SM data. 
     988  Regardless of query method, post-query filtering will be performed on eventid, 
     989external eventid, and external author.  SM data associated with a different 
     990eventid but with the same author will be rejected.  Data with a different 
     991author will be allowed - this is most likely data imported from another 
     992network and its eventids are meaningless in our DBMS.  LDD 02/13/2004 
     993 
     994shakemapfeed.d: New command "ScheduleFeed <minutes(float) after receiving event>" 
     995sets the shakemap feeding schedule. Up to 20 ScheduleFeed commands are 
     996allowed, setting one time per command.  Auto-feeds will continue at the 
     997last ScheduleFeed interval until UpdateDuration minutes after the event 
     998origin time. ScheduleFeed replaces the original DelayFirstFeed and UpdateInterval 
     999commands. These original commands are still accepted and will set up 
     1000the auto-feed schedule in the original manner in the absence of ScheduleFeed 
     1001commands.  LDD 3/4/2004 
     1002 
     1003naqs2ew.d: Two new commands to support location code addition: 
     1004"OutputMsgType " to choose output format. 
     1005   If the OutputMsgType command is omitted, naqs2ew will produce 
     1006   TYPE_TRACEBUF2 messages by default. 
     1007"RequestChanSCNL" replaces the "RequestChannel" command. It has all the 
     1008   same arguments with the addition of the  argument. 
     1009   LDD 4/14/2004 
     1010 
     1011binder_ew.d: 
     1012Two new optional commands:  
     1013"pick_fifo_length " set the length of the pick FIFO (default=1000) 
     1014"quake_fifo_length " sets the length of the quake FIFO (default=100). 
     1015If a command is omitted, the corresponding fifo will be set to the previous 
     1016hardcoded length.  LDD 2/9/2005 
     1017 
     1018eqproc.d 
     1019Four new optional commands. If any of these commands is omitted, the  
     1020corresponding parameter will be set to its previous hardcoded value. 
     1021"pick_fifo_length " set the length of the pick FIFO (default=1000) 
     1022"quake_fifo_length " sets the length of the quake FIFO (default=100). 
     1023For proper event reporting, eqproc's pick/quake FIFO lengths must be 
     1024greater than or equal to binder's pick/quake FIFO lengths! 
     1025"HeartbeatInt " sets the interval (seconds) between TYPE_HEARTBEAT 
     1026messages (default=0.3*tReport). 
     1027"rpt_check" " sets the interval (seconds) at which the quake FIFO  
     1028will be inspected to see if it's time to send an event to downstream  
     1029modules (default=0.3*tReport). 
     1030The parameter tReport is set with the 'rpt_dwell' command (default=30s). 
     1031LDD 3/11/2005 
     1032 
     1033eqprelim.d 
     1034Added two optional commands. If either of these commands is omitted, the  
     1035corresponding parameter will be set to its previous hardcoded value. 
     1036"pick_fifo_length " set the length of the pick FIFO (default=1000) 
     1037"quake_fifo_length " sets the length of the quake FIFO (default=100). 
     1038For proper event reporting, eqprelim's pick/quake FIFO lengths must be 
     1039greater than or equal to binder's pick/quake FIFO lengths! 
     1040LDD 3/11/2005 
     1041 
     1042compress_UA.d: 
     1043Eliminated "GetWavesFrom" command and replaced it with two new commands: 
     1044"GetLogo   " 
     1045 Inst_id and/or Mod_id fields can be wildcards, but msg_type field must 
     1046 be either TYPE_TRACEBUF or TYPE_TRACEBUF2. Multiple GetLogo commands may 
     1047 be supplied (no limit on number). 
     1048"CompressSCNL    " 
     1049 The wildcard character '*' (without quotes) can be used in any of 
     1050 the fields.  Use as many CompressSCNL commands as needed to define the 
     1051 list of channels to be processed.  If input is TYPE_TRACEBUF, the  
     1052 field will be ignored, but it must still be provided. 
     1053 LDD 4/16/2004 
     1054 
     1055decompress_UA.d: 
     1056Eliminated "GetWavesFrom" command and replaced it with new command: 
     1057"GetLogo   " 
     1058 Inst_id and/or Mod_id fields can be wildcards, but msg_type field must 
     1059 be either TYPE_TRACE_COMP_UA or TYPE_TRACE2_COMP_UA. Multiple GetLogo 
     1060 commands may be supplied (no limit on number). 
     1061LDD 4/16/2004 
     1062 
     1063decimate.d: 
     1064GetWavesFrom: added a third requires argument specifying the input 
     1065message type.  Only valid messages types are TYPE_TRACEBUF and TYPE_TRACEBUF2. 
     1066Replaced the GetSCN command with GetSCNL to support the addition of location  
     1067codes.  GetSCNL requires 8 arguments, input SCNL and output SCNL. No wildcards 
     1068are permitted.  LDD 5/11/2004 
     1069 
     1070export_scn*.d: 
     1071Added two new commands, Send_scnl and Send_scnl_remap, to implement location 
     1072code filtering.  If old commands (Send_scn and Send_scn_remap) are used, 
     1073the location code is set to * (wildcard). LDD 4/21/2004 
     1074 
     1075wave_serverV: 
     1076Modified behavior so that wave_server does not Abort On A Single Tank Failure, 
     1077unless the AbortOnSingleTankFailure flag is set in config file.   
     1078(This was the documented behavior). 
     1079 
     1080wave_serverV: 
     1081Wave server now limits tank sizes to 1GB.  This applies only to NEW tanks, not 
     1082existing tankfiles. 
     1083The default behavior is for wave server to EXIT if it comes across a tank in the 
     1084config file that is >= 1GB. 
     1085If the "TruncateTanksTo1GBAndContinue" command is set in the config file, then 
     1086wave server will trunctate any >= 1GB tank files to just under 1GB, and continue 
     1087normal operation. 
     1088This was done to prevent users from creating unsafe large tanks, after a bug was 
     1089discovered that limits the safe wave server tank size to ~1GB. 
     1090DK 2005/03/17 
     1091 
     1092Added code to check the return value from call to WaveMsg2MakeLocal(), 
     1093and reject packets for which WaveMsg2MakeLocal() reported and error. 
     1094Updated the wave_serverV version and timestamp.  This will cause  
     1095wave_serverV to filter out packets with header issues that weren't previously 
     1096filtered out before. 
     1097Fixed a bug where wave_serverV would filter out packets that contained only 
     1098one sample. 
     1099DK 2006/03/27 
     1100 
     1101wave_serverV / wave_viewer / ws_clientII.c: 
     1102Modified wave_server protocol slightly to better differentiate between SCN vs. SCNL 
     1103clients and servers.  New wave_server clients should be backwards compatible with 
     1104previous SCNL wave_servers, but the new wave_serverV is not backwards compatible  
     1105with any clients. 
     1106The new wave_viewer works with ALL wave_servers (SCN, old SCNL, new SCNL), and  
     1107the new ws_clientII library works with ALL SCNL wave_servers. 
     1108DK 2005/04/22 
     1109 
     1110 
     1111wave_serverV / wave_viewer / ws_clientII.c: 
     1112Fixed bug in wave_server (server_thread.c ParseMsg()) that was incorrectly reading 
     1113the Ascii FILL value from the "endtime" field instead of the "fill" field. 
     1114This fix only affects ascii wave_server clients on gappy channels. 
     1115Fixed more bugs in the ASCII protocol logic between ws_clientII and wave_serverV. 
     1116DK 2005/09/07 
     1117 
     1118ringtocoax: 
     1119Changed tport_getmsg to tport_copyfrom so that it can distinguish missed messages 
     1120(overlapped in ring) from sequence gaps in the ring. This can be useful for 
     1121fine-tuning the BurstCount and BurstInterval configuration settings. 
     1122LDD 2005/4/8 
     1123 
     1124localmag: 
     1125Does not compile under latest release of earthworm (needs to be SCNL'ized). It 
     1126will compile with earlier versions however and 3 new options have been  
     1127added in: useMedian, minStationsMl, require2Horizontals  
     1128which are all explained in the localmag/Doc/localmag_cmd.html file. 
     1129The program now has a version number to distinguish different released versions. 
     1130Upgraded as per requests from Univ of Utah and HVO on 8/10/2005 by Paul Friberg (PAF) 
     1131I upgraded localmag to use SCNL now and tested it at Utah 3/01/2006 PAF 
     1132 
     1133 
     1134 
     1135KNOWN BUGS: 
     1136*********** 
     1137 
     1138liss2ew: 
     1139liss2ew has been observed intermittantly producing malformed 
     1140TRACE_BUF messages.  Currently the conditions for causing this problem 
     1141are unknown.  Due to this, liss2ew should be treated as suspect.  Use at 
     1142your own risk.  JMP 6-18-2003 
     1143 
     1144k2ew: 
     1145k2ew uses the k2hdr.rwParms.misc.channel_bitmap parameter to decide 
     1146which channels it will see as streams from the K2.  This is actually the 
     1147parameter which the K2 uses to decide which channels to record in an event 
     1148file (see K2's  command).  The K2's  is the parameter 
     1149that shows which channels the K2 is streaming out.  This is the parameter 
     1150that k2ew should be using to decide what data it will see.  The big problem 
     1151is that none of the header files from Kinemetrics (nkwhdrs.h) seem to 
     1152show this parameter anywhere. This issue is only a problem for those folks 
     1153who want to record more channels on the K2 than they want to stream continuously. 
     1154Terry Dye (Univ of Utah) discovered this problem when trying to stream only 
     11553 channels of a 12 channel K2.  LDD 4/11/2002    FIXED PNL, 6/9/03 
     1156 
     1157 
     1158wave_serverV: 
     1159it occasionally sends the following error to statmgr: 
     1160   UTC_Thu Sep 06 03:30:14 2001  WSV1/wave_serverV_nano ReadBlockData 
     1161   failed for tank [z:\nano57.tnk], with offset[999908] and record 
     1162   size[64]! errno[0] Mail sent. 
     1163The nominal tank size is 1 megabyte, and the actual tank size is 999908. 
     1164It looks like waveserver is trying to read off the end of the tank. 
     1165WMK 9/6/01 
     1166 
     1167wave_serverV: 
     1168appears not to reply to requests for a single sample of data. I noticed 
     1169when testing wave_viewer, that if the start time and end time of a request were 
     1170equal (in which case there should be one sample of data) then wave_serverV did 
     1171not reply to the request (ASCII request) at all. No Data, No Flags, No Reply, 
     1172No Nothing.  It needs to issue a reply to every request. 
     1173DavidK 09/25/01 
     1174 
     1175wave_serverV: 
     1176Wave server appears to be limited (on 32-bit systems) to 1GB tank sizes. 
     1177A bug (a signed integer overflow of tmpoE at Line 1155 of  
     1178       serve_trace.c  (LocateRoughOffset())) 
     1179prevents data retrieval from the tank under certain conditions when the 
     1180tank size exceeds 1 GB. 
     1181DavidK & PNL 09/27/04 
     1182 
     1183Automatic restarts of adsend (using the "restartMe" line in the descriptor 
     1184file) can cause an NT system to hang. Therefore, you should never 
     1185use the autorestart feature with adsend, but you should bring down 
     1186the entire Earthworm system if adsend needs to be restarted. 
     1187LDD 5/31/2000 Comments added to adsend.desc, but leave this warning here! 
     1188 
     1189libsrc/utils/site.c: The strings used for station, channel and network are 
     1190required to be fixed length with trailing spaces added to short names. If 
     1191the strings given to site_index do not have these trailing blanks, SCN names 
     1192will not match. This is not documented anywhere.  PNL 10/15/00 
     1193 
     1194socket_ew: (libsrc/util/socket_ew_common.c libsrc/solaris/socket_ew.c 
     1195            libsrc/winnt/socket_ew.c include/socket_ew.h) 
     1196Fixed a bug in the connect_ew function(). 
     1197When run in non-blocking mode (clients connecting to 
     1198a server - using a timeout value), there was a bug in 
     1199the connection code(discovered on Solaris) that caused 
     1200the function to return a timeout-error when there was 
     1201any kind of error during connection. 
     1202The bug was discovered when connecting to a non-existent socket. 
     1203When trying to connect to a non-existent wave_server on a machine, 
     1204the underlying socket library was returning a Connection-Refused error, 
     1205but the socket_ew library was passing back a timeout error. 
     1206- 
     1207The change only applies when a socket-error occurs while the function is 
     1208waiting for the connect to happen.  The instance where you will most-likely 
     1209see a difference, is when you try connecting to a non-existent socket. 
     1210Previously the function would return TIMEOUT, now it will return 
     1211connection REFUSED. 
     1212- 
     1213Added a new function: socketSetError_ew(), 
     1214and defined a new socket_ew return code: CONNREFUSED_EW. 
     1215DK 2003/02/04 
     1216 
     1217sm_ew2ora: 
     1218There is a bug in sm_ew2ora that involves having multipe time intervals for 
     1219components and channels.  If a strong motion message containing information 
     1220for a channel that the DB has never seen before is loaded into the DB, and 
     1221then later another message for the same channel with an earlier timestamp 
     1222is loaded, the load of the second message will fail, due to problems with 
     1223overlapping time intervals, and the call that sm_ew2ora uses to create 
     1224those time intervals.  This problem only affects stations that were 
     1225not previously loaded via one of the station loader programs stalist*2ora, 
     1226and only when receiving SM data that is timestamped with a time that is 
     1227prior to the original time for that channel.  The bug lies in the logic 
     1228of ewdb_api_PutSMMessage(), and not in the underlying code. 
     1229Davidk 05/25/01 
     1230 
     1231A change was made to ewdb_api_PutSMMessage() that dramatically affects 
     1232sm_ew2ora.  Please see the note about that function.  Davidk 2001/07/26 
     1233 
     1234ewdb_api_CreateWaveform()  (ewdb_internal_CreateSnippet.c 
     1235                            ewdb_internal_CreateWaveformDesc.c) 
     1236Added a call to release the cursors used by the internal functions, when they 
     1237fail.  Fixes a bug which resulted in a DB cursor leak when a call to stuff 
     1238a snippet into the DB failed. 
     1239DK 2003/02/04 
     1240 
     1241logit.c: 
     12421) Added a new function logit_core() 
     1243int logit_core( char *flag, char *format, va_list ap); 
     1244This function is the same as logit(), except that it takes a va_list argument 
     1245for the variable length parameter instead of '...', and it has an int 
     1246return value. 
     1247This function can be called by other functions that receive a '...' variable 
     1248argument list, where as logit() cannot.  logit_core() is to logit() 
     1249what vsprintf() is to sprintf(). 
     1250- 
     12512) Moved all of the functionality in logit() to logit_core(), and modify 
     1252logit to call logit_core(). 
     1253- 
     12543)  Added a new function get_prog_name2(), as an intended replacement 
     1255of get_prog_name().  get_prog_name2() includes an additional 
     1256parameter (the buffer length of the output buffer). 
     1257- 
     12584)  Modified logit_init() to use get_prog_name2() instead of get_prog_name() 
     1259- 
     1260All four(4) of these changes should be backwards compatible with all existing 
     1261earthworm code, and the modified logit.c has already been tested with several 
     1262earthworm modules. 
     1263- 
     1264 
     1265 
     1266ewdb_api: 
     1267Added new function ewdb_api_GetEventSummaryInfo() to retrieve summary 
     1268information for an event(including the preferred szSource and szSourceEventID 
     1269of the event).   011904 DK 
     1270 
     1271 
     1272 
     1273KNOWN DEFICIENCIES: 
     1274******************* 
     1275 
     1276ringtocoax: 
     1277In Windows NT, the time resolution of sleep_ew() is about 16 msec (one clock 
     1278tick).  On Solaris, the resolution is about 10 msec.  This is a problem for 
     1279ringtocoax, since packet delays need to be set to a few milliseconds. 
     1280 
     1281statmgr: A space is needed between "tsec:" and the value. 
     1282If it isn't there, things fail. Artifcat of the kom routines. (Alex) 
     1283 
     1284threads functions: The KillThread function on WindowsNT and Solaris 
     1285terminate the thread without ensuring that no mutexes are held. If a thread 
     1286holds a mutex when it dies, no other thread can get that mutex. PNL 1/12/2000 
     1287 
     1288carlsubtrig: 
     1289The system time must be set to GMT and ew_nt.cmd must have 
     1290TZ=GMT for carlsubtrig to work.  Comments in ew_nt.cmd done 5/25/00. Barbara 
     1291         
     1292localmag: 
     1293needs GMT set on the system 
     1294 
     1295ew2seisvole: 
     1296on NT, exits with horrible crash when system is stopped. 
     1297 
     1298NUMBER OF RINGS LIMITED ON SOLARIS: 
     1299Under Solaris 2.6 (and probably other versions as well), the maximum number 
     1300of shared memory segments is six. This means that on an out-of-the-box machine 
     1301you can only configure six rings. If you try to configure more than that, you 
     1302will see a cryptic message from tport_create about too many open files.  The 
     1303fix to this problem is to add the following lines to the /etc/system 
     1304file, and then reboot the system. 
     1305 
     1306 set shmsys:shminfo_shmmax = 4294967295 
     1307 set shmsys:shminfo_shmmin = 1 
     1308 set shmsys:shminfo_shmmni = 100 
     1309 set shmsys:shminfo_shmseg = 20 
     1310 set semsys:seminfo_semmns = 200 
     1311 set semsys:seminfo_semmni = 70 
     1312 
     1313This allows for 20 rings. 
     1314 
     1315     Lucky Vidmar (7/6/2000) 
     1316 
     1317startstop_solaris: 
     1318Fixed bug in call to logit_init(). 
     1319The program was printing error messages: 
     1320  Invalid arguments passed in. 
     1321  Call to get_prog_name failed. 
     1322  WARNING: Call logit_init before logit. 
     1323 
     1324startstop_solaris: 
     1325There MAY be a problem with the signal that 
     1326startstop sends to modules during the shutdown sequence. The shutdown 
     1327sequence is started (after typing "quit" to startstop or running "pau") 
     1328by startstop placing a terminate message on all transport rings. Modules 
     1329should see this message and start their own shutdown. After a configurable 
     1330delay, startstop checks to see that all modules have exitted. Any that are 
     1331still running are sent a signal to terminate them. Currently that signal 
     1332is SIG_TERM. But since wave_serverV has a handler for SIG_TERM, wave_serverV 
     1333sees that as essentially the same as a terminate message. So if wave_serverV 
     1334is having problems completing its shutdown, SIG_TERM won't do anything. The 
     1335result is that startstop may give up and exit, leaving wave_serverV running. 
     1336If that happens, the operator will have to terminate wave_serverV by doing 
     1337"kill -9 ". That may leave shared memory and semaphores 
     1338stranded in the kernel: run the command "ipcs -a" to see. If necessary, 
     1339the stranded shared memory and semaphores may be cleaned up with the 
     1340ipcrc command; must be run as root; see the man page. 
     1341This problem only exists on Solaris/Unix, not on WindowsNT. 
     1342PNL, 10/4/2000 
     1343 
     1344libsrc/utils/kom.c:  fix comment in k_open() 
     1345 
     1346The comment above k_open() says that only one file can 
     1347be open at a time. Yet the Kbuf array has slots for MAXBUF (currently 4) open 
     1348files. Does this work, or is the comment to be taken at it's word? 
     1349PNL 10/15/00 
     1350 
     1351libsrc/utils/logit.c: logit_init() requires a module_id number, which it uses 
     1352to construct the log file name. This is not helpful, since the module_id 
     1353number is not meaningful to people. Worse, it requires that the config file be 
     1354read and earthworm.d lookups be completed before logit calls can be made. Thus 
     1355errors in the config file can only be reported to stderr or stdout instead of 
     1356being saved in a file.  PNL 11/29/00 
     1357 
     1358libsrc/util/k2evt2ew.c: This library supports a maximum EVT data size 
     1359of 800000 samples per channel per EVT file.  This value is hardcoded 
     1360as MAXTRACELTH in include/k2evt2ew.h.  k2evt2ew() will return a warning 
     1361if the EVT file exceeds this size, and process as much as the EVT file 
     1362as the hardcoded limit allows. 
     1363DK 2003/01/18 
     1364 
     1365import_ida:  Modified to build under WIN32(#ifdef'd a couple of includes 
     1366and modified the NT makefiles.)  (saved under tag HYDRA_V1-20) 
     1367Modified for SCNL and Tracebuf2. 
     1368DK 2005/04/22 
     1369 
     1370 
     1371TRACEBUF messages. 
     1372The definition of `endtime' of the TRACEBUF message is not documented. 
     1373Some programmers are taking it as the "expected start time of the next 
     1374TRACEBUF packet (if the sample interval is uniform.)" The more accepted 
     1375practice is that `endtime' is the time of the last sample of the current 
     1376TRACEBUF packet; that is, one sample interval less than the expected 
     1377start time of the next TRACEBUF messsage. Using this last definition, if a 
     1378TRACEBUF packet has exactly one sample, then its starttime and endtime are 
     1379the identical. Clearly this distinction needs to be documented. The file 
     1380waveform_format (in the /home/earthworm/DOC directory) gives no specifics 
     1381about start or end times.  PNL 1/24/01 
     1382 
     1383  
     1384}}}