#!/bin/csh -f #+ #OSIRIS library of scripts # #NAME # wait4ao - sets wait for tip-tilt, deformable mirror, and DAR states # #SYNOPSIS # wait4ao mode # #DESCRIPTION # sets the keywords WFTT, WFDM, and WFDAR to relevant states, telling # whether or not the wfao script should wait for tip-tilt, deformable # mirror, and DAR offloading. # # The save argument is used to save the current state of wait4ao; # stored as NIRC2 keywords to be used by the "restore" option later. # # If no argument is given, the current settings are shown. # #OPTIONS # mode # sets wait4ao mode to one of [on,off,tt,save,restore] # #EXAMPLES # wait4ao on # turns wait4ao on # #ENVIRONMENT VARIABLES # none # #FILES # none # #SERVERS & KEYWORDS # service = osiris # keywords: wftt, wfdm, wfdar, oldwftt, oldwfdm, oldwfdar # #SCRIPTS CALLED # help, syncheck # wait4tt, wait4dm, wait4dar # #EXIT STATUS # 0 - normal exit, no error # 1 - script aborted by an interrupt # 2 - syncheck error # #SEE ALSO # ??? #- # # Modification History: # 20050220 - MB: Adapted from NIRC2 scripts # 20050824 - MB: Changed default state for wfdar # # Boiler plate for "-h" support for command autohelp. if ("$1" == "-h") then help $0 | more exit $status endif # Boilerplate for syncheck. # Note that the boiler plate should be transparent for all usages, # but to make correct use of syncheck you will need to specify the # correct pattern. set noglob set CheckStatus = `syncheck -command $0 $* -pattern {[on,off,tt,save,restore]}` unset noglob if ("$CheckStatus" != "OK") then help $0 | more exit 2 endif # End of help/syncheck boiler plate. if ($#argv == 0) then set wftt = `show -s osiris -terse wftt` set wfdm = `show -s osiris -terse wfdm` set wfdar = `show -s osiris -terse wfdar` cat <