# Tankplayer Configuration File Commands

(last revised 19 May 2006)
Page Index:
1. Example configuration file
2. Functional command listing
3. Alphabetic command listing & description

Tankplayer reads file(s) containing waveform messages (of either TYPE_ADBUF, TYPE_TRACEBUF, or TYPE_TRACEBUF2) from a single data source. It places the waveform messages into shared memory in simulated real time, using the delta-t between time-stamps in successive message headers to determine its timing. On startup, tankplayer reads the configuration file named on the command line. Commands in this file set up all parameters used in playing back waveform messages from a file to a shared memory ring. In the control file, lines may begin with a valid tankplayer command (listed below) or with one of 2 special characters:

>     #  marks the line as a comment (example: # This is a comment).

>     @  allows control files to be nested; one control file can be
>        accessed from another with the command "@" followed by
>        a string representing the path name of the next control file
>        (example: @model.d).

Command names must be typed in the control file exactly as shown in this document (upper/lower case matters!).

## 1. EXAMPLE CONFIGURATION FILE

    # tankplayer config file for playing TYPE_TRACEBUF2 waveforms
    # tankplayer config file for playing waveform files

    RingName      WAVE_RING        # play waveforms into this ring
    MyModuleId    MOD_ADSEND_A     # as this module id
    PlayMsgType   TYPE_TRACEBUF2   # msg type to read from file
    LogFile       1                # 0=no log; 1=keep log file
    HeartBeatInt  30               # seconds between heartbeats
    Pause         10               # seconds to pause between wavefiles
    StartUpDelay  10               # seconds to wait before playing 1st file
    ScreenMsg     1                # (optional) if non-zero, informational messages will be
                                   #   written to the screen as data is played
    # SendLate      10.0           # (optional) if present, packets will be
                                   #   timestamped this many seconds before
                                   #   current time;
                                   # if absent, packets will have original time
                                   #   stamps
                                   #
    Debug         1                # for verbosity

    # List of files to play (up to 50 allowed):
    WaveFile      e:\QAnew\900819a.ew1.tbuf

    # IgnoreTBVersionNumbers -
    # Prevents tankplayer from objecting to tracebuf2 packets that don't have
    # the correct version field.  Not recommended.
    #IgnoreTBVersionNumbers 0

## 2. FUNCTIONAL COMMAND LISTING

Below are the commands recognized by tankplayer, grouped by the function they influence. All of the commands are required; they must be specified in the control file in order for tankplayer to operate.

    	Earthworm system setup:
    		HeartBeatInt 	 	required
     		MyModuleId	   	required
    		RingName	   	required

    	Waveform Playback:
    		Pause			required
    		PlayMsgType		required
    		StartUpDelay		required
    		WaveFile		required
    		IgnoreTBVersionNumbers	optional

    	Output Control:
    		LogFile		   	required

## 3. ALPHABETIC COMMAND LISTING & DESCRIPTION

In 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 the values used by Calnet are listed after each command description.

    command arg1				processed by		function

    HeartBeatInt nsec 			tankplayer_config	Earthworm setup

> Defines the number of seconds nsec between TYPE_HEARTBEAT messages issued by tankplayer.

>     Default:  none				Calnet:  HeartBeatInt 15

    IgnoreTBVersionNumbers switch		tankplayer_config	Playback

> Prevents tankplayer from objecting to tracebuf2 packets that don't have the correct version field. Not recommended.

>     Default: 0	False

    LogFile switch				tankplayer_config	output

> Sets the on-off switch for writing a log file to disk. If switch is 0, no log file will be written. If switch is 1, tankplayer will write a daily log file(s) called tankplayerxx.log_yymmdd where xx is tankplayer's module id (set with "MyModuleId" command) and yymmdd is the current UTC date (ex: 960123) on the system clock. The file(s) will be written in the EW_LOG directory (environment variable).

>     Default:  none

    MyModuleId mod_id			tankplayer_config	Earthworm setup

> Sets 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. Tankplayer also places this module id in the module id field of each waveform message header before it puts the message into shared memory.

>     Default:  none
>     Example:  MyModuleId MOD_ADSEND_A

    Pause nsec				tankplayer_config	Playback

> Defines the integer number of seconds nsec to pause after completing the playback of one waveform file before starting the playback of the next. Tankplayer will continue to issue its heartbeat while it is in pause-mode.

>     Default:  none
>     Example:  Pause 15

    PlayMsgType type			tankplayer_config	Playback

> Tells tankplayer what type of message the waveform file(s) contain. type is a character string (valid strings are listed in earthworm.d) that relates (in earthworm.d) to a unique single-byte number. By the message-type, tankplayer knows the format of the waveform message; currently tankplayer only knows how to read and manipulate TYPE_ADBUF TYPE_TRACEBUF, and TYPE_TRACEBUF2 waveform messages.

>     Default:  none
>     Example:  PlayMsgType TYPE_TRACEBUF2

    RingName ring				tankplayer_config	Earthworm setup

> Tells tankplayer which shared memory region to use for output. ring is a character string (valid strings are listed in earthworm.d) that relates (in earthworm.d) to a unique number for the key to the shared memory region.

>     Default:  none				Calnet:  RingName WAVE_RING

    StartUpDelay xsec			tankplayer_config	Playback

> Defines the integer number of seconds xsec to wait on startup before beginning the playback of the first waveform file. Tankplayer will continue to issue its heartbeat while it is in startup-delay mode.

>     Default:  none
>     Example:  StartUpDelay 45

    WaveFile path-file			tankplayer_config	Playback

> Gives the name path-file of one waveform file that tankplayer should play back. path-file is a character string up to 45 characters long. Up to 50 "WaveFile" commands may be issued. Tankplayer will play the files in the order that they were listed in the configuration file, pausing between files by amount of time set in the "Pause" command. All files must contain the same type of waveform message (specified in the "PlayMsgType" command).

>     Default:  none
>     Example:  WaveFile  event1.waves

Module Index | Tankplayer Overview