GRF2EW is a simple GRF client application that converts GRF data packets to Earthworm TraceBuf or TraceBuf2 messages and writes them to an Earthworm transport ring. The program also generates heartbeat messages at a user specified interval. The program is controlled primarily through an ASCII configuration file but it also accepts various command line options.
GRF2EW requires Earthworm version 6.1 or later and is currently available on Solaris, Linux, and Win32 platforms.
GRF2EW has been developed as a component of the GRF Tools Suite, a collection of tools for the routine processing of GRF data. More information about the GRF and the GRF Tools Suite is available at the GRF Home Page. Acquisition systems that employ the GRF are available from DAQ Systems.
GRF2EW is invoked from the command line by typing grf2ew and pressing return. However, most Earthworm users will likely use the startstop program to control operation of the program along with other Earthworm modules. We will cover the configuration of the startstop program below.
A simple help screen is available by specifying the -h option:
Usage: grf2ew [-hdc] [-s ip_addr[:port] | -f input_file] [-t seconds] [-r output_ring] [-H seconds] [configuration file] -h Help display. -d Debug logging. -c Apply sampling rate corrections (No). -s IP address and port number to connect to for input data. port number defaults to 3757 if not otherwise specified. -f File to read for input data. -t Socket read timeout in seconds. (30) -r Output ring for TRACE_BUF messages. (WAVE_RING) -H Heartbeat interval in seconds. (10). The configuration file argument defaults to './grf2ew.d' if not otherwise specified. [] = optional, () = default, | = mutually exclusive.
All of these command line options are equivalent to their corresponding entries in the configuration file.
In order to use the startstop program to drive GRF2EW you will need to create a configuration file (see below) in your Earthworm parameters directory and ensure that the grf2ew.exe executable to the Earthworm bin directory. Typically, the configuration file will be named:
%EW_HOME%\params\grf2ew.d
and the executable:
%EW_HOME%\bin\grf2ew.exe
Edit the startstop_nt.d file and add the grf2ew module. Below is an example fragment of this file that runs the grf2ew, wave_serverV, and: heli_ewII modules:
# startstop.d nRing 1 Ring WAVE_RING 1024 MyModuleId MOD_STARTSTOP HeartbeatInt 15 MyPriorityClass Normal LogFile 1 KillDelay 10 Process "grf2ew grf2ew.d" PriorityClass Normal ThreadPriority Normal Display NoNewConsole Process "wave_serverV wave_serverV.d" PriorityClass Normal ThreadPriority Normal Display NoNewConsole Process "heli_ewII heli_ewII.d" PriorityClass Normal ThreadPriority Normal Display NoNewConsole
Once things are properly configured, startstop will drive grf2ew along with all other Earthworm modules.