--- a/DEFAULTS.expect Wed Jul 07 13:29:02 2010 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-#======================================================================
-# D E F A U L T S . E X P E C T
-# doc: Wed Mar 10 21:14:18 2004
-# dlm: Sat Nov 4 04:19:14 2006
-# (c) 2004 A.M. Thurnherr
-# uE-Info: 26 46 NIL 0 0 72 2 2 8 NIL ofnI
-#======================================================================
-
-#--------
-# HISTORY
-#--------
-
-# Mar 10, 2004: - created during NBP0402
-# Apr 4, 2004: - final version NBP0402
-# Jun 14, 2004: - copied for CLIVAR P02
-# Jun 15, 2004: - adapted to BB150/Workhorse setup
-# Jun 16, 2004: - ditto
-# Jun 19, 2004: - BUG: could not handle multiple BB150 data files
-# Dec 20, 2004: - adapted for CLIVAR A16S
-# Jan 19, 2006: - updated documentation
-# - allowed for empty-string time_server
-# Oct 3, 2006: - adapted for LADDER cruise
-# Oct 28, 2006: - continued
-# Nov 1, 2006: - change master/slave serial numbers after CTD4
-# (should have been done after CTD3, but I spaced; A.T.)
-# Nov 4, 2006: - changed backup dir structure
-# Nov 11,2006: - slave away as beam1 is broken (but did not work since
-# CTD15 on Nov 16; F.T)
-
-#-----------
-# TWEAKABLES
-#-----------
-
-# At the beginning of each cast, the clock of the acquisition computer should
-# synchronized with the master clock used for timestamping the GPS information.
-# The easiest way to accomplish this is by probing an NTP server on the ship
-# (if there is one), which can be defined by setting the following variable.
-# If there is no such server available, the variable should be set to the
-# empty string (set time_server ""), in which case clock synchronization must
-# be done differently (e.g. manually).
-
-set time_server "199.92.161.2";
-
-# bbabble needs to know the tty device name(s) of the serial connection(s)
-# to the ADCP head(s). If only one head is connected, tty1 is ignored.
-# If two heads are connected, the device names are exchangeable, i.e.
-# either instrument can be connected to either port.
-
-set tty0 "/dev/ttyS0";
-set tty1 "/dev/ttyS1";
-
-# In case of 2 ADCP heads, babble needs to know which is the master and
-# which is the slave. This is accomplished by setting the following variables
-# to the corresponding instrument serial numbers (PS0 output). By convention,
-# the downlooker is the master. If only a single head is connected, both
-# variables are ignored.
-
-set master_sn 7877;
-set slave_sn 1412;
-
-# Before deployment, every ADCP head has to be programmed by sending it
-# a corresponding command file, defined by the following variables. If only
-# a single head is connected, the slave_* variable is ignored.
-
-set master_cmd_file "MASTER.cmd";
-set slave_cmd_file "SLAVE.cmd";
-
-# For convenience, it is best to use the station number to name the ADCP data
-# files, and to indicate whether the data file comes from the master or
-# slave. The following variables variables define the printf(3) format
-# that is used to create the files names from the station number. If only
-# a single head is connected, the slave_* variable is ignored.
-# NOTE: Some implementations of the ymodem protocol (notably lrb running
-# under Mandrake 8) use lowercase for the downloaded file. It is
-# therefore better to use only lowercase characters in the deployment
-# names.
-
-set master_deployment_name_fmt "%03ddn";
-set slave_deployment_name_fmt "%03dup";
-
-# Older RDI instruments (e.g. the BB150) do not allow the data-file name
-# to be defined in the instrument, in which case the files have to be
-# renamed after downloading. The following variables define the shell
-# globbing patterns for the master and slave. For example, the UH BB150
-# used during CLIVAR P02 generated files with extension .612; the coresponding
-# globbing pattern is "*.612". If only a single head is connected, the
-# slave_* variable is ignored.
-
-set master_download_glob "";
-set slave_download_glob "";
-
-# For consistency it is nicest if low station numbers contain leading
-# zeroes. The following variable defines the corresponding printf(3) format.
-
-set stn_format "%03d";
-
-# The following directory is used to store command files, instrument
-# configurations and ADCP data. Separate subdirectories (named according to
-# stn_format) are used for each cast.
-
-set raw_dir "../data/raw";
-
-# After downloading, the data directory is backed up to the following
-# directory. Make sure that it resides on a different disk than raw_dir.
-# Empty string disables backup for testing purposes.
-# NOTE: RELATIVE PATHNAMES MUST START FROM CAST DIR (NOT ACQUISITION DIR)
-
-set backup_dir "../../backup/raw";
-
-# bbabble can be made to abort downloading after a preset amount of time,
-# defined by the following variable.
-
-set download_timeout 999999;
-
-#----------------------------------------------------------------------
-# Semi-Standard Functions
-#----------------------------------------------------------------------
-
-proc set_computer_time {} { # set computer clock
- global time_server;
- if {[string length $time_server] == 0} {return}
- exec sudo rdate -s $time_server;
-}
-
-proc check_data {file} { # check data file
- exec sh -c "scanbb $file";
- exec sh -c "sed -n '/^zmax/,/^zend/s/ at.*/m/p' `basename $file .000`.scn > /dev/tty";
-}
-
-proc backup_master_data {stn} { # copy data to network
- global master_deployment_name_fmt master_cmd_file backup_dir;
- if {[string length $backup_dir] == 0} {return}
-
- if {![file isdirectory $backup_dir]} {
- error "$backup_dir does not exist relative to [pwd]";
- }
-
- set master_dir [format $backup_dir/$master_deployment_name_fmt $stn];
- if {![file isdirectory $master_dir]} {exec mkdir $master_dir};
- exec sh -c "cp [format $master_deployment_name_fmt $stn]* $master_dir";
- exec sh -c "cp $master_cmd_file* $master_dir";
- exec sh -c "cp *log $master_dir";
-}
-
-proc backup_slave_data {stn} { # copy data to network
- global slave_deployment_name_fmt slave_cmd_file backup_dir;
- if {[string length $backup_dir] == 0} {return}
-
- if {![file isdirectory $backup_dir]} {
- error "$backup_dir does not exist relative to [pwd]";
- }
-
- set slave_dir [format $backup_dir/$slave_deployment_name_fmt $stn];
- if {![file isdirectory $slave_dir]} {exec mkdir $slave_dir};
- exec sh -c "cp [format $slave_deployment_name_fmt $stn]* $slave_dir";
- exec sh -c "cp $slave_cmd_file* $slave_dir";
- exec sh -c "cp *log $slave_dir";
-}
-
-proc rename_master_download_file {target} { # BB150
- global master_download_glob;
-
- if {[string length $master_download_glob] == 0} {return}
- set files [glob -nocomplain $master_download_glob];
- set nfiles [llength $files];
- if {$nfiles == 0} {
- if {![file exists $target]} {
- error "can't find downloaded master file";
- }
- return;
- }
- if {$nfiles > 1} {
- send_user "WARNING: Multiple files downloaded from master --- rename, backup, check manually!";
- }
- exec mv [lindex $files end] $target;
-}
-
-proc rename_slave_download_file {target} { # BB150
- global slave_download_glob;
-
- if {[string length $slave_download_glob] == 0} {return}
- set files [glob -nocomplain $slave_download_glob];
- set nfiles [llength $files];
- if {$nfiles == 0} {
- if {![file exists $target]} {
- error "can't find downloaded slave file";
- }
- return;
- }
- if {$nfiles > 1} {
- send_user "WARNING: Multiple files downloaded from slave --- rename, backup, check manually!";
- }
- exec mv [lindex $files end] $target;
-}