1 #!/usr/bin/expect -f |
1 #!/usr/bin/expect -f |
2 #====================================================================== |
2 #====================================================================== |
3 # A B O R T 2 |
3 # A B O R T 2 |
4 # doc: Wed Mar 10 22:23:52 2004 |
4 # doc: Wed Mar 10 22:23:52 2004 |
5 # dlm: Thu Aug 26 00:25:52 2010 |
5 # dlm: Fri Jul 3 10:11:27 2020 |
6 # (c) 2004 A.M. Thurnherr |
6 # (c) 2004 A.M. Thurnherr |
7 # uE-Info: 22 39 NIL 0 0 72 2 2 8 NIL ofnI |
7 # uE-Info: 57 20 NIL 0 0 72 2 2 8 NIL ofnI |
8 #====================================================================== |
8 #====================================================================== |
9 |
9 |
10 # HISTORY: |
10 # HISTORY: |
11 # Jun 19, 2004: - adapted from [endladcp2] |
11 # Jun 19, 2004: - adapted from [endladcp2] |
12 # Nov 19, 2008: - added version |
12 # Nov 19, 2008: - added version |
13 # Aug 25, 2010: - DEFAULTS.expect -> CRUISE_SETUP.expect |
13 # Aug 25, 2010: - DEFAULTS.expect -> CRUISE_SETUP.expect |
14 # - libBB.expect -> libRDI.expect |
14 # - libBB.expect -> libRDI.expect |
|
15 # Jul 3, 2020: - expunged master/slave terminology |
15 |
16 |
16 #---------------------------------------------------------------------- |
17 #---------------------------------------------------------------------- |
17 # Setup |
18 # Setup |
18 #---------------------------------------------------------------------- |
19 #---------------------------------------------------------------------- |
19 |
20 |
38 send_user "Connecting to instruments..."; |
39 send_user "Connecting to instruments..."; |
39 wait_for_startup; |
40 wait_for_startup; |
40 reset_two_instruments; |
41 reset_two_instruments; |
41 |
42 |
42 send_user "\nGetting station number..."; |
43 send_user "\nGetting station number..."; |
43 select_master 0; |
44 select_DL 0; |
44 set master_deployment_name [get_deployment_name]; |
45 set DL_deployment_name [get_deployment_name]; |
45 if {[scan $master_deployment_name $master_deployment_name_fmt master_stn] != 1} { |
46 if {[scan $DL_deployment_name $DL_deployment_name_fmt DL_stn] != 1} { |
46 send_error "$master_deployment_name $master_deployment_name_fmt"; |
47 send_error "$DL_deployment_name $DL_deployment_name_fmt"; |
47 error "Can't get station number of master"; |
48 error "Can't get station number of DL"; |
48 } |
49 } |
49 select_slave; set slave_deployment_name [get_deployment_name]; |
50 select_UL; set UL_deployment_name [get_deployment_name]; |
50 set slave_deployment_name [get_deployment_name]; |
51 set UL_deployment_name [get_deployment_name]; |
51 if {[scan $slave_deployment_name $slave_deployment_name_fmt slave_stn] != 1} { |
52 if {[scan $UL_deployment_name $UL_deployment_name_fmt UL_stn] != 1} { |
52 error "Can't get station number of slave"; |
53 error "Can't get station number of UL"; |
53 } |
54 } |
54 if {$master_stn != $slave_stn} { |
55 if {$DL_stn != $UL_stn} { |
55 select_master; put_to_sleep; select_slave; put_to_sleep; |
56 select_DL; put_to_sleep; select_UL; put_to_sleep; |
56 error "Master/slave stations disagree"; |
57 error "DL/UL stations disagree"; |
57 } |
58 } |
58 set stn [format $stn_format $master_stn]; |
59 set stn [format $stn_format $DL_stn]; |
59 send_user "\[$stn\]"; |
60 send_user "\[$stn\]"; |
60 |
61 |
61 send_user "\nPutting instruments to sleep..." |
62 send_user "\nPutting instruments to sleep..." |
62 select_master; put_to_sleep; select_slave; put_to_sleep; |
63 select_DL; put_to_sleep; select_UL; put_to_sleep; |
63 |
64 |
64 set cast_dir [format %s/%s $raw_dir $stn]; |
65 set cast_dir [format %s/%s $raw_dir $stn]; |
65 if {![file isdirectory $cast_dir]} { |
66 if {![file isdirectory $cast_dir]} { |
66 error "\ncast directory $cast_dir does not exist!"; |
67 error "\ncast directory $cast_dir does not exist!"; |
67 } |
68 } |