!-------------------------------------------------------------------------------
!
!      PIMAIN RESOURCE FILE
!
!
!      This file is used to construct the trigger, error, and success status
!      fields in the observation status file for pi_main.
!
!
!-------------------------------------------------------------------------------
!                          REVISION HISTORY
!-------------------------------------------------------------------------------
!            PR
!   DATE   NUMBER  Developer Description
! -------- ------- --------- -------------------------------------------------
! 12/17/97 35798   WMiller   Unix version
! 05/28/98 36899   WMiller   Trigger modifications
! 05/28/98 36921   WMiller   Add CLI_MODE_RATE & CLI_FAIL_RESET
! 07/08/98 37055   WMiller   Add OSF_LONG_DDN
! 05/05/99 38292   MSwam     Add PASSWORD_PROMPT
! 07/12/00 42044   WMiller   Prepare for UNIX Ops
! 12/01/00 42229   WMiller   Add REMOTE_SYSTEM
! 09/10/02 46357   Sherbert  Changed DESCRIPTION, REMOTE_SYSTEM, DELTA_TIME, 
!                            OUTPATH to remove need for Ops overrides
! 06/24/04 51412   Sherbert  For PR 50437 Remove DISPLAY_ORDER
! 01/18/12 70216   MSwam     Add PASSWORD_KEY, remove PROMPT,REQUIRED
! 09/18/12 72255   Sherbert  get rid of DSQUERY
!
!-------------------------------------------------------------------------------

PROCESS_NAME = PIMAIN           ! Short name for process id
TASK = <pi_main -p $PATH_FILE -r pimain>
CLASS = pac
DESCRIPTION = 'PACOR-A interface'
SYSTEM = PACOR

USERNAME           = MAIN_USERNAME  ! Username for loging into PACOR
PASSWORD_KEY       = MAIN_PROMPT    ! used to locate password
PORT_NUMBER        = MAIN_PORT      ! 4070 for testing, 4080 for OPS
REMOTE_HOST        = REMOTE_HOST    ! remote host machine name
REMOTE_SYSTEM      = REMOTE_SYSTEM  ! Use DDF_MSE with DDF; use Pacor-A with Pacor_A
CLI_MODE_RATE      = CLI_MODE_RATE  ! minutes idle before client mode attempt
CLI_FAIL_RESET     = CLI_MODE_RESET ! minutes until CLI_FAIL mode reset

OSF_RANK = 1
OSF_TRIGGER1.DN = w             ! Waiting for a DDN to be sent

TIME_RANK = 2
DELTA_TIME = 000:00:00:30       ! time trigger to check for commands/input
 
OSF_PROCESSING.AN  = p          ! Set the processing flag to 'Processing'
OSF_DAN_COMPLETE.AN = c         ! Done when DAN received successfully

OSF_DAN_COMPLETE.AA = w         ! ""
OSF_DAN_ERROR.AN = f            ! Set when error receiving DAN
OSF_DAA_COMPLETE.AA = c         ! Set when DAA sent successfully
OSF_DAA_COMPLETE.FT = w         ! ""
OSF_DAA_FAILURE.AA = f          ! Set when software problem encountered
OSF_DAA_ERROR.AA = e            ! Set when bad DAN sent by PACOR (DDF) (disp != 0)

OSF_DDN_PROC.DN = p             ! Sending DDN
OSF_DDN_PROC.AN = c                  ! Set back from P set by polling routines
OSF_DUPLICATE.DN = c            ! Found PODDANS record matching file_id
OSF_DUPLICATE.DA = w            ! Waiting on the DDA
OSF_DUPLICATE.SW = d            ! ""
OSF_LONG_DDN.DN = c             ! LONG DDN sent; mark complete and
OSF_LONG_DDN.DA = w             ! wait for DDA but
OSF_LONG_DDN.SW = n             ! skip the swapper and
OSF_LONG_DDN.CL = w             ! trigger cleaning once DDA is received
OSF_DDN_ERROR.DN = f            ! Error sending DDN
OSF_DDN_DONE.DN = c             ! DDN sent
OSF_DDN_DONE.DA = w             ! Waiting on the DDA
OSF_DDN_DONE.SW = w             ! Go ahead and swap
OSF_CLIENT_FAIL.DN = w          ! Failed to make PACOR (DDF) client connection

OSF_GOT_DDA.DA = c              ! Received DDA
OSF_DDA_ERROR.DA = f            ! Problem encountered processing DDA

POLLING_TIME  = 10              ! Polling time
OUTPATH       = OPUS_DDF_DIR    ! Output directory for the STIS
MINBLOCKS     = 50000           ! blocks required on output disk

ENV.OPUS_SERVER  = OPUS_SERVER
ENV.OPUS_DB      = OPUS_DB
ENV.OPUS_DDF_DIR = OPUS_DDF_DIR
ENV.OPUS_RT_DIR  = OPUS_RT_DIR
