/* **********************************************************************
 * *                                                                    *
 * *    Share library header file                                       *
 * *                                                                    *
 * **********************************************************************
 * File: include/share_lib.h
 *
 *                        COPYRIGHT (c) 2003  BY
 *          SIGMET INCORPORATED, WESTFORD MASSACHUSETTS, U.S.A.
 * 
 * THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
 * ONLY  IN  ACCORDANCE WITH  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE
 * INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE  OR  ANY OTHER
 * COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
 * OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
 * TRANSFERED.
 */
#ifndef SIGMET_SHARE_LIB_H
#define SIGMET_SHARE_LIB_H 1

#ifdef __cplusplus
extern "C" {
#endif
  
  /* Message values used in this library
   */

#define       BAD_GLOBAL       1
#define SHARE_BAD_GLOBAL      (IRIS_SHR_FACILITY + BAD_GLOBAL )
#define       BAD_PINDEX       2
#define SHARE_BAD_PINDEX      (IRIS_SHR_FACILITY + BAD_PINDEX )
#define       BAD_PTYPE        3
#define SHARE_BAD_PTYPE       (IRIS_SHR_FACILITY + BAD_PTYPE )
#define       BAD_TIME         4
#define SHARE_BAD_TIME        (IRIS_SHR_FACILITY + BAD_TIME )
#define       DELETE_FILE      8
#define SHARE_DELETE_FILE     (IRIS_SHR_FACILITY + DELETE_FILE )
#define       EXT_GLOBAL       9
#define SHARE_EXT_GLOBAL      (IRIS_SHR_FACILITY + EXT_GLOBAL )
#define       MENU_ERROR       10
#define SHARE_MENU_ERROR      (IRIS_SHR_FACILITY + MENU_ERROR )
#define       MENU_OPEN        11
#define SHARE_MENU_OPEN       (IRIS_SHR_FACILITY + MENU_OPEN )
#define       MISS_GLOBAL      12
#define SHARE_MISS_GLOBAL     (IRIS_SHR_FACILITY + MISS_GLOBAL )
#define       FALLSPD_MELT     13
#define SHARE_FALLSPD_MELT    (IRIS_SHR_FACILITY + FALLSPD_MELT )
#define       NOT_FILE         17
#define SHARE_NOT_FILE        (IRIS_SHR_FACILITY + NOT_FILE )
#define       NOT_HEADER       18
#define SHARE_NOT_HEADER      (IRIS_SHR_FACILITY + NOT_HEADER )
#define       PCF_FULL         20
#define SHARE_PCF_FULL        (IRIS_SHR_FACILITY + PCF_FULL )
#define       PCF_UNLICENSED   21
#define SHARE_PCF_UNLICENSED  (IRIS_SHR_FACILITY + PCF_UNLICENSED )
#define       PROD_DUP         22
#define SHARE_PROD_DUP        (IRIS_SHR_FACILITY + PROD_DUP )
#define       PROD_FULL        23
#define SHARE_PROD_FULL       (IRIS_SHR_FACILITY + PROD_FULL )
#define       PROD_NAME        24
#define SHARE_PROD_NAME       (IRIS_SHR_FACILITY + PROD_NAME )
#define       PROD_SIZE        25
#define SHARE_PROD_SIZE       (IRIS_SHR_FACILITY + PROD_SIZE )
#define       PSC_LOAD         26
#define SHARE_PSC_LOAD        (IRIS_SHR_FACILITY + PSC_LOAD )
#define       RCV_WARN_BEEP    27
#define SHARE_RCV_WARN_BEEP   (IRIS_SHR_FACILITY + RCV_WARN_BEEP )
#define       RULE_ERROR       28
#define SHARE_RULE_ERROR      (IRIS_SHR_FACILITY + RULE_ERROR )
#define       RULE_SKIPPED     29
#define SHARE_RULE_SKIPPED    (IRIS_SHR_FACILITY + RULE_SKIPPED )
#define       RULE_SUCCESS     30
#define SHARE_RULE_SUCCESS    (IRIS_SHR_FACILITY + RULE_SUCCESS )
#define       SCALE_FAILED     31
#define SHARE_SCALE_FAILED    (IRIS_SHR_FACILITY + SCALE_FAILED )
#define       SETCLR_TUG       32
#define SHARE_SETCLR_TUG      (IRIS_SHR_FACILITY + SETCLR_TUG )
#define       SETCLR_FLAG      33
#define SHARE_SETCLR_FLAG     (IRIS_SHR_FACILITY + SETCLR_FLAG )
#define       SETCLR_IFLAG     34
#define SHARE_SETCLR_IFLAG    (IRIS_SHR_FACILITY + SETCLR_FLAG )
#define       SETCLR_ITUG      35
#define SHARE_SETCLR_ITUG     (IRIS_SHR_FACILITY + SETCLR_TUG )
#define       TASK_DEL         36
#define SHARE_TASK_DEL        (IRIS_SHR_FACILITY + TASK_DEL )
#define       TEST_PAIR        37
#define SHARE_TEST_PAIR       (IRIS_SHR_FACILITY + TEST_PAIR )
#define       TCF_THRESHOLD    38
#define SHARE_TCF_THRESHOLD   (IRIS_SHR_FACILITY + TCF_THRESHOLD )
#define       TCF_ZDR_ERROR    39
#define SHARE_TCF_ZDR_ERROR   (IRIS_SHR_FACILITY + TCF_ZDR_ERROR )
#define       TSC_LOAD         40
#define SHARE_TSC_LOAD        (IRIS_SHR_FACILITY + TSC_LOAD )
#define       UNK_DEVICE       41
#define SHARE_UNK_DEVICE      (IRIS_SHR_FACILITY + UNK_DEVICE )
#define       UNK_INPUT        42
#define SHARE_UNK_INPUT       (IRIS_SHR_FACILITY + UNK_INPUT )
#define       UNK_NETWORK      43
#define SHARE_UNK_NETWORK     (IRIS_SHR_FACILITY + UNK_NETWORK )
#define       STATUS_CRITICAL  44
#define SHARE_STATUS_CRITICAL (IRIS_SHR_FACILITY + STATUS_CRITICAL )
#define       STATUS_OK        45
#define SHARE_STATUS_OK       (IRIS_SHR_FACILITY + STATUS_OK )
#define       PROCESS_STATE    46
#define SHARE_PROCESS_STATE   (IRIS_SHR_FACILITY + PROCESS_STATE )
#define       ZC_NO_TABLE      47
#define SHARE_ZC_NO_TABLE     (IRIS_SHR_FACILITY + ZC_NO_TABLE )
#define       ZC_NO_SITE       48
#define SHARE_ZC_NO_SITE      (IRIS_SHR_FACILITY + ZC_NO_SITE )
#define       KEEP_FULL        49
#define SHARE_KEEP_FULL       (IRIS_SHR_FACILITY + KEEP_FULL )
#define       POM_FULL         50
#define SHARE_POM_FULL        (IRIS_SHR_FACILITY + POM_FULL )

#ifndef MESSAGE_ONLY

  /* Structure shells */

/* Function prototypes for iris_share library
 */
#ifdef SIGMET_OUTPUT_H
  SINT4 archive_file_lookup       /* File: archive_dir.c */
  (volatile struct archive_inventory *ptinv_a,
   SINT4 index_a,
   UINT2 iptype_a, 
   volatile const char sprod_a[12],
   volatile const struct ymds_time* time_a,
   UINT4 isite_num_a
   ) ;
#endif  /* #ifdef SIGMET_OUTPUT_H */

void auto_mode_switch		/* File: mode_change.c */
(const char *spname_a,
 UINT2 lwarning_a,
 UINT2 lprod_gen_a		/* Indicates called from product generator */
 ) ;

#ifdef SIGMET_HEADERS_H
  void ErrorTextFromEntry         /* File: errors.c */
  (char sText_a[2*ERROR_TEXT_SIZE],
   const struct error_entry *pError_a );
#endif  /* #ifdef SIGMET_HEADERS_H */

void ForwardSkipTime              /* File: product_subs.c */
(volatile struct ymds_time *pTime_a,
 SINT4 iSkipTime_a );

void ForwardSkipTimeRain          /* File: product_subs.c */
(volatile struct ymds_time *pTime_a,
 SINT4 iSkipTime_a );

  UINT2 iCheckSystemForFault      /* File: CheckFault.c */
  (void);

#ifdef SIGMET_PRODUCT_H
  UINT2 iCheckProductForFault       /* File: CheckFault.c */
(const struct status_results *pStatus );
#endif  /* #ifdef SIGMET_PRODUCT_H */

#ifdef SIGMET_INGEST_HEADER_DEFINED
MESSAGE icreate_phantom_file    /* File: ingest_dir.c */
  (const struct ingest_header *ihd_a,
   const struct ingest_data_header *dfile_a,
   SINT4 *isize_a );
#endif /* #ifdef SIGMET_INGEST_HEADER_DEFINED */

UINT4 idevice_ef		/* File: event_flags_c.c */
(SINT4 idevice_a ) ;

UINT4 iEfFromInput              /* File: event_flags_c.c */
(SINT4 iInput_a );   /* Origin 0 input number */

UINT4 iEfFromNetchild           /* File: event_flags_c.c */
(SINT4 iChild_a );   /* Origin 0 child number */

UINT4 iEfFromOutput             /* File: event_flags_c.c */
(SINT4 iOutput_a );  /* Origin 0 output number */


SINT4 iget_process_slot		/* File: errors.c */
(void) ;

/* Get the maximum APO time difference in seconds based on the overlayed
 * product type.  Zero means no limit.
 */
  UINT4 iMaxApoTime               /* File: product_subs.c */
(UINT2 iApoPtype_a );

UINT4 imenu_mod			/* File: event_flags_c.c */
(const UINT4 imods_a ) ;

UINT4 inetchild_ef		/* File: EventFlags.C */
(SINT4 ichild_a ) ;

#ifdef SIGMET_INGEST_H
void ingest_dir_clear_inuse	/* File: ingest_dir.C */
(SINT4 islot_a) ;

void ingest_dir_delset		/* File: ingest_dir.C */
(SINT4 indx_a,
 SINT4 imenu_a) ;
  
#ifdef SIGMET_INGEST_HEADER_DEFINED
  MESSAGE ingest_dir_insert	/* File: ingest_dir.C */
  (struct ingest_header *sum_a,
   const struct ymds_time *pFileYmds_a,  /* Last modified time of the ingest file */
   SINT4 *iIndex1_a );                   /* Index of file found, if any */
#endif  /* #ifdef SIGMET_INGEST_HEADER_DEFINED */

  volatile struct one_ingest_file *pIngestFromIndex  /* File: ingest_dir.C */
  ( SINT4 iIndex_a ); /* Origin 1 index */

  void  ingest_dir_setclr_flag	/* File: ingest_dir.C */
(volatile struct one_ingest_file *pihd_sum_a,
 UINT2 iset_a, UINT2 iclr_a ) ;

SINT4 ingest_dir_lookup		/* File: ingest_dir.C */
(volatile const struct ymds_time* time_a,
 UINT4 isitenum_a ) ;

  SINT4 ingest_task_lookup        /* File: ingest_dir.C */
(const char sTask12_a[12],  /* Task name, space padded */
 UINT4 isite_num_a );          /* Site number, set to SITE_WILD for don't care */

SINT2 ingest_dir_lookup_sweep	/* File: ingest_dir.C */
(volatile const struct ymds_time* looktime_a, /* Time to look for */
 UINT4 isite_num_a,                     /* Site number to look for */
 struct ymds_time* voltime_a,
 struct ymds_time* swptime_a,
 SINT4 *index_a ) ;

SINT4 iIngestTimeList
( const struct product_timelist_filter *pFilter_a,
  struct one_ingest_file *pFileList_a[] );

void ingest_dir_update		/* File: ingest_dir.C */
  (SINT4 index_a,		         /* Location in directory of INGEST item */
   SINT4 ibytes_a,		         /* Size of ordinary files added */
   SINT4 ibytes_phantom_a,	         /* Size of phantom files added */
   SINT4 idfnum_a,		         /* Number of ordinary files added */
   SINT4 idfnum_phantom_a) ;	         /* Number of phantom files added */

void  ingest_files_delete	/* File: ingest_dir.C */
(UINT4 sitenum_a,
 volatile const struct ymds_time* time_a) ;

#endif /* #ifdef SIGMET_INGEST_H */

MESSAGE init_signal_rules	/* File: errors.C */
( char *errtxt_a ) ;

#ifdef SIGMET_PRODUCT_H
UINT4 ipcf_insert		/* File: pcf.C */
(const struct product_configuration* pcf_a,
 UINT4 isite_num_a		/* Site number to insert as */
 ) ;
#endif /* #ifdef SIGMET_PRODUCT_H */

SINT4 ipll_ph_f			/* File: product_dir.c */
(UINT2* iptype_a		/* product type returned */
 ) ;

MESSAGE iprod_create		  /* File: iris_file_names.c */
(char* sname_a,			  /* Pointer to character string in which name is placed */
 const char* sitename16_a,	  /* Name of site */
 volatile const struct ymds_time* time_a,  /* Time to use to make the file name */
 UINT2 iptype_a,		  /* Product type */
 SINT4 ides_size_a,		  /* Desired size of file */
 void** iaddr_a,		  /* Address of file */
 SINT4* isize_a,		  /* Size of file */
 SINT4* ichannel_a		  /* Channel number to file */
 ) ;

SINT4 iproduct_dir_outlook	/* File: product_dir.c */
(SINT4 idevice_a,
 UINT2 lfwd_a,
 UINT1 ipmask_a[] ) ;

#ifdef SIGMET_PRODUCT_H
UINT4 iproduct_file_insert	/* File: product_dir.c */
(const struct product_hdr* phd_a,
 const char* sfile_name_a,
 const struct ymds_time *pFileYmds_a,   /* Last modification time of the file */
 SINT4 *iIndex1_a );            /* Index of file found, if any */
#endif /* #ifdef SIGMET_PRODUCT_H */

SINT4 iproduct_file_lookup	/* File: product_dir.c */
(UINT2 iptype_a,
 volatile const char sprod_a[12],
 volatile const struct ymds_time* time_a,
 UINT4 isite_num_a		/* Site number, set to SITE_WILD if don't care */
 ) ;  

#ifdef SIGMET_PRODUCT_H
UINT4 iproduct_head_insert	/* File: product_dir.c */
( const struct product_configuration* pcf_a,
 volatile struct one_product_file **pFile_a );  /* Returns structure inserted, if any */
#endif /* #ifdef SIGMET_PRODUCT_H */

SINT4 iproduct_head_lookup	/* File: product_dir.c */
(UINT2 iptype_a,
 const char sprod_a[12] ) ;

struct product_timelist_filter
{
  UINT4 iptype;
  UINT4 isite_num;
  SINT4 iSendMax;
  SINT4 iMaxTime;
  SINT4 iSkipTime;
  char  sPNameSpace[12];  /* Space padded */
  struct ymds_time EndTime;
};
#ifdef SIGMET_PRODUCT_H
  SINT4 iProductTimeList          /* File: product_dir.C */
( const struct product_timelist_filter *pFilter_a,
  struct one_product_file *pFileList_a[]
  );
#endif  /* #ifdef SIGMET_PRODUCT_H */

  /* Determine the location of a the first product of the specified type in the
   * product inventory.
   */
  SINT4 iProductTypeLookup        /* File: product_dir.c */
(UINT2 iprod_a            /* Product type to find */
 );

void iris_exit_handler		/* File: errors.c */
(void) ;

/* All the following are in iris_global_init.c
 */
volatile struct archive_inventory    *iris_get_ainv_pointer( UINT4 iunit_a ) ;     
volatile struct one_tape_product     *iris_get_ainv_files
  (volatile const struct archive_inventory *parchive_a ) ;
volatile struct mode_switching_table *iris_get_ams_pointer( void ) ;
volatile const struct color_setup    *iris_get_csetup_pointer( void ) ;
volatile struct device_status        *iris_get_devst_pointer( void ) ;
volatile struct ingfio_control       *iris_get_ingfio_pointer(void) ;
volatile struct ingest_inventory     *iris_get_iinv_pointer( void ) ;
volatile struct iris_setup           *iris_get_isetup_pointer( void ) ;
volatile struct license_setup        *iris_get_lsetup_pointer( void ) ;
volatile struct error_list           *iris_get_msg_pointer( void ) ;
volatile struct process_info         *iris_get_pinfo_pointer( void ) ;
volatile struct product_inventory  *iris_get_pinv_pointer( void ) ;
volatile struct one_product_file   *iris_get_pinv_files( void );
volatile struct product_schedule   *iris_get_psc_pointer( void ) ;
volatile struct qlm_control        *iris_get_qlm_pointer( void ) ;
volatile struct site_setup         *iris_get_site_pointer( void ) ;
volatile struct system_status      *iris_get_status_pointer( void ) ;
volatile struct task_schedule      *iris_get_tsc_pointer( void ) ;
volatile struct signal_rule_info   *iris_get_sigrules_pointer( void ) ;


#ifdef SIGMET_SETUP_H
MESSAGE iris_global_init	/* File: iris_global_init.c */
  ( const struct iris_setup *pisetup_a );
#endif  /* #ifdef SIGMET_SETUP_H */

MESSAGE iris_global_unmap	/* File: iris_global_init.c */
(void) ;

MESSAGE iris_signal_handler	/* File: errors.c */
( MESSAGE istatus, UINT4 icount, const UINT4 arg1[] ) ;

UINT4 itask_to_run              /* File: task_to_run.c */
( UINT4 isec_a, UINT4 iday_a, SINT4 *idly_a );

SINT4 list_prod_head		/* File: product_dir.c */
(UINT2 iptype_a ) ;

UINT2 lpcf_scheduled            /* File: pcf.c */
( UINT4 itype_a,
 char spname_a[12]   /* Space padded name */
) ;

  UINT2 lProductLicensed        /* File: product_subs.c */
  ( UINT4 iPType_a);

MESSAGE menu_ams_load		/* File: menu_simple.c */
( void ) ;

MESSAGE menu_ams_save		/* File: menu_simple.c */
( void ) ;

MESSAGE menu_file_load		/* File: menu_simple.c */
(const char* snam_a,		/* File name */
 void* data_a,			/* Data itself */
 SINT4 isize_a,                 /* Number of bytes to read */
 UINT2 lSignalErrors_a );

MESSAGE menu_file_save		/* File: menu_simple.c */
(const char* snam_a,		/* File name */
 const void* const data_a,	/* Data itself */
 const SINT4 isize_a		/* Number of bytes to write */
 ) ;

MESSAGE MenuHomeLoad(void);     /* File: menu_simple.c */

MESSAGE MenuHomeSave(void);     /* File: menu_simple.c */

void menu_one_pcf		/* File: menu_io.c */
(const char* sprod_file_a,
 UINT4 iprod_type_a,
 const struct ymds_time* time_a,
 UINT4 isch_a,
 SINT4 isch_skip_a,
 UINT4 isite_num_a ) ;

MESSAGE menu_ovr_load		/* File: menu_pom.c */
( void ) ;

MESSAGE menu_ovr_save		/* File: menu_pom.c */
( void ) ;

#ifdef SIGMET_PRODUCT_H
void menu_patch_pcf		/* File: menu_simple.c */
(volatile struct product_configuration* pcf_a
 ) ;
#endif /* #ifdef SIGMET_PRODUCT_H */

#ifdef SIGMET_TASK_H
#ifdef SIGMET_DSP_LIB_H
void menu_patch_tcf		/* File: menu_io.c */
(volatile struct task_configuration* tcf_a,
 Dsp *pDsp_a 
 ) ;
#endif /* #ifdef SIGMET_DSP_LIB_H */
#endif /* #ifdef SIGMET_TASK_H */

#ifdef SIGMET_PRODUCT_H
MESSAGE menu_pcf_load		/* File: menu_simple.c */
(const char* sname_a,		/* File name */
 struct product_configuration *pcf_a,
 UINT4 iptype_a,
 UINT2 lSignalErrors_a
 ) ;

MESSAGE menu_pcf_save		/* File: menu_simple.c */
(const char* sname_a,		/* File name */
 struct product_configuration *pcf_a,
 const UINT4 iptype_a
 ) ;
#endif /* #ifdef SIGMET_PRODUCT_H */

MESSAGE menu_pom_load		/* File: menu_pom.c */
(const char* sname_a		/* File name */
 ) ;

MESSAGE menu_pom_load_one       /* File: menu_pom.c */
(SINT4 idevice_a
 ) ;

MESSAGE menu_pom_save_one       /* File: menu_pom.c */
(SINT4 idevice_a
 ) ;

MESSAGE menu_pom_save		/* File: menu_pom.c */
(const char* sname_a		/* File name */
 ) ;

#ifdef SIGMET_PRODUCT_H
MESSAGE menu_prj_load           /* File: menu_simple.c */
(const char* spname_a,		/* Short filename */
 struct projection_configuration* proj_a, /* Data itself */
 UINT4 iptype_a	                /* Projection type */
 ) ;
#endif  /* #ifdef SIGMET_PRODUCT_H */

#ifdef SIGMET_PRODUCT_H
MESSAGE menu_prj_save           /* File: menu_simple.c */
(const char* spname_a,		/* Short filename */
 const struct projection_configuration* proj_a /* Data itself */
 ) ;
#endif  /* #ifdef SIGMET_PRODUCT_H */

MESSAGE menu_psc_load		/* File: menu_io.c */
(const char* sname_a,		/* File name */
 UINT4 ioption_a
 ) ;

MESSAGE menu_psc_save		/* File: menu_io.c */
(const char* sname_a		/* File name */
 ) ;

#define RST_LOAD_STARTUP   (0)  /* Called from SIRIS   */
#define RST_LOAD_MANUAL    (1)  /* Called from SERVER  */
#define RST_LOAD_AUTOMATIC (2)  /* Called from PRODUCT or NETWORK */

#ifdef SIGMET_DSP_LIB_H
MESSAGE menu_rst_load		/* File: menu_io.c */
(const char* sname_a,		/* File name */
 UINT4 option_a,
 Dsp* pDsp_a                    /* dsp lib pointer (NULL if not radar system) */
 );
#endif  /* #ifdef SIGMET_DSP_LIB_H */

MESSAGE menu_rst_save		/* File: menu_io.c */
(const char* sname_a		/* File name */
 ) ;

MESSAGE MenuStringLoad(void);   /* File: menu_simple.c */
MESSAGE MenuStringSave(void);   /* File: menu_simple.c */

#ifdef SIGMET_TASK_H
#ifdef SIGMET_DSP_LIB_H
MESSAGE menu_tcf_load		/* File: menu_io.c */
(const char* sname_a,		/* File name */
 volatile struct task_configuration *tcf_a,
 Dsp *pDsp_a 
 ) ;
#endif  /* #ifdef SIGMET_DSP_LIB_H */

MESSAGE menu_tcf_save		/* File: menu_io.c */
(const char* sname_a,		/* File name */
 struct task_configuration *tcf_a
 ) ;
#endif /* #ifdef SIGMET_TASK_H */

#ifdef SIGMET_DSP_LIB_H
MESSAGE menu_tsc_load		/* File: menu_io.c */
(const char* sname_a,		/* File name */
 UINT4 ioption_a,
 Dsp* pDsp_a                   /* dsp lib pointer */
 ) ;
#endif  /* #ifdef SIGMET_DSP_LIB_H */

MESSAGE menu_tsc_save		/* File: menu_io.c */
(const char* sname_a		/* File name */
 ) ;

void nearest_product            /* File: product_dir.c */
  (SINT4 *index_a,    /* Index found from search, will look at neighbors, and modify */
   UINT4 iptype_a,
   volatile const char spco_a[12],
   volatile const struct ymds_time *time_a,
   UINT4 isite_num_a,
   SINT4 itime_max_a );

void net_receive_file           /* File: net_recieve_file.c */
(const char *sfile_a);

#define BACKWARDS_SEARCH 0
#define FORWARDS_SEARCH  1
/* This subroutine searches from a base point for the next product which matches
 * the spec.  Returns origin 1 index1 if found, else 0.
 */
#ifdef SIGMET_PRODUCT_H
volatile const struct one_product_file * NextProduct               /* File: product_dir.c */
  (SINT4 index1_a,        /* Index found from search, will look at neighbors */
   UINT4 iptype_a,
   volatile const char spco_a[12],
   UINT4 isite_num_a,    /* Desired site number, SITE_WILD if we do not care */
   SINT4 *iIndexFound_a,
   UINT1 lDirection_a ); /* Direction of search, BACKWARDS is forwards in time! */
#endif  /* #ifdef SIGMET_PRODUCT_H */

volatile struct one_product_file *pFileFromIndex1 /* File: product_dir.c */
( SINT4 index_a ); /* Origin 0 index1 */

#ifdef SIGMET_PRODUCT_H
#ifdef SIGMET_MISC_LIB_H
/* Flags are ored into device argument */
#define FORCE_COLORMAP_OVERRIDE    (0x10000)
void prod_colormap		/* File: colormap.c */
( UINT2                  idtype_a,
  struct color_scale_def *colors_a,
  struct product_end     *pend_a,
  union level_control    *plevel_a,
  struct scale_text newscale_a[16],
  SINT4                  idevice_a,
  UINT1 icol_thresh_a,
  UINT1 icol_no_data_a );
#endif  /* #ifdef SIGMET_MISC_LIB_H */
#endif  /* #ifdef SIGMET_PRODUCT_H */

MESSAGE product_head_delete	/* File: product_dir.c */
( SINT4 index_a
 ) ;

#define DONT_UNLOCK  (0xffff)
MESSAGE product_file_delete	/* File: product_dir.c */
( SINT4 index_a,
  UINT2 isem_a ) ;   /* Could be set to DONT_UNLOCK */

#ifdef SIGMET_PRODUCT_H
void product_file_setclr_flag	/* File: product_dir.c */
( volatile struct one_product_file *pPFile_a,
  UINT2 iset_a,
  UINT2 iclr_a
  ) ;
#endif  /* #ifdef SIGMET_PRODUCT_H */

void PscDataRequired	/* File: product_subs.c */
  (const char stask_a[12],
   struct dsp_data_mask *pDataMask_a ) ;

  void PSCDeleteByIndex           /* File: pcf.c */
  (SINT4 iIndex_a );  /* Index origin 1 */

#ifdef SIGMET_PRODUCT_H
void psc_delete_entry           /* File: pcf.c */
( volatile struct psc_entry *pentry_a /* Pointer to entry to delete */
  ) ;
#endif /* #ifdef SIGMET_PRODUCT_H */

void set_device_ef_		/* File: event_flags_c.c */
(SINT4 idevice_a ) ;

void set_menu_dir               /* File: menu_simple.c, for internal use */
( char *where_a ) ;

void set_netchild_ef		/* File: event_flags_c.c */
(SINT4 ichild_a ) ;

MESSAGE set_process_slot	/* File: errors.c */
( SINT4 islot_a,		/*   Declared slot number */
  SINT2 iunit_a) ;		/*   Optional unit number */

UINT4 sitename16_to_num_share		/* File: ingest_dir.c */
( const char* sitename_a ) ;     /* Null terminated */

void sitenum_to_overlay
( UINT4 isite_number_a,
  char soverlay_a[12] ) ;		/* Space terminated */

char* start_name		/* File: iris_file_names.c */
( UINT4 sitenum_a,
  volatile const struct ymds_time* time ) ;

#ifdef SIGMET_INGEST_HEADER_DEFINED
#ifdef SIGMET_SETUP_H
  void VcInitSweep                /* File: cvel_param.c */
( const struct ingest_header *smy_a,
  BIN2 inomel_a,
  UINT2 lvvpunf_a, UINT2 lfallspd_a,
  const struct data_convert *pconvert_a,
  volatile const struct misc_setup *pmisc_a );
#endif /* #ifdef SIGMET_SETUP_H */
#endif  /* #ifdef SIGMET_INGEST_HEADER_DEFINED */

#ifdef SIGMET_INGEST_H
void VcDoRay		/* File: cvel_param.c */
( struct data_ray *velray_a, SINT4 vel_dtype_a,
  struct data_ray *dbzray_a, SINT4 dbz_dtype_a,
  struct data_ray *outray_a, SINT4 ibincount_a ) ;
#endif /* #ifdef SIGMET_INGEST_H */

#ifdef SIGMET_PRODUCT_H
const struct vvp_product *VcLocateVvp /* File: cvel_param.c */
( const struct ymds_time *time_a, /* The goal time */
  BIN4 ilat_a, BIN4 ilon_a,	  /* The goal Earth location */
  SINT4 imaxage_a,		  /* Maximum time difference (seconds) */
  FLT4 fmaxsep_a ) ;		  /* Maximum site separation (km) */
#endif /* #ifdef SIGMET_PRODUCT_H */

#ifdef SIGMET_INGEST_HEADER_DEFINED
#ifdef SIGMET_SETUP_H
MESSAGE VcMakeDatafile	/* File: cvel_param.c */
( const struct ingest_header *sum_a,
  const char *spathname_a,
  UINT2 lvvpunf_a, UINT2 lfallspd_a,
  volatile const struct misc_setup *pmisc_a,
  const struct ingest_data_header *velfile_a,
  const struct ingest_data_header *dbzfile_a ) ;
#endif /* #ifdef SIGMET_SETUP_H */
#endif /* #ifdef SIGMET_INGEST_HEADER_DEFINED */

#ifdef SIGMET_SETUP_H
void VcMakeFallspeedTable
( FLT4 ffallspeed_table_a[2][256],
  volatile const struct misc_setup *pmisc_a ) ;
#endif /* #ifdef SIGMET_SETUP_H */

  void VcReleaseVvp( void ) ; /* File: cvel_param.c */

void wakeup_menus_		/* File: event_flags_c.c */
( UINT4 reasons_a 
  ) ;

#ifdef SIGMET_INGEST_H
  void ZcDoRay                  /* File: zc_param.c */
  ( const struct data_ray *pInRay_a,
    SINT4 dbz_dtype_a,
    struct data_ray *pOutRay_a );
#endif  /* #ifdef SIGMET_INGEST_H */

  void ZcInitSweep                /* File: zc_param.c */
( BIN2 iNomEl_c         /* The nominal elevation angle */
  );

#ifdef SIGMET_INGEST_HEADER_DEFINED
#ifdef SIGMET_SETUP_H
#ifdef SIGMET_PROJECTION_H
  void ZcInitVolume             /* File: zc_param.c */
  ( const struct ingest_header *smy_a,
    volatile const struct misc_setup *pmisc_a,
    const struct block_site_header *pBlock_a
    );
#endif  /* #ifdef SIGMET_PROJECTION_H */
#endif  /* #ifdef SIGMET_SETUP_H */
#endif  /* #ifdef SIGMET_INGEST_HEADER_DEFINED */

/* Make a complete corrected reflectivity (Zc) INGEST parameter data file.
 * This is just for one sweep.
 */
#ifdef SIGMET_INGEST_HEADER_DEFINED
MESSAGE ZcMakeDatafile
( const struct ingest_header *sum_a,
  const char *spathname_a,
  const struct ingest_data_header *pZFile_a );
#endif  /* #ifdef SIGMET_INGEST_HEADER_DEFINED */

void   putCriticalFault( UINT1 lfault_a ) ; /* File: errors.c */
UINT1 lGetCriticalFault( void ) ;           /* File: errors.c */
void    putWarningFault( UINT1 lfault_a ) ; /* File: errors.c */
UINT1  lGetWarningFault( void ) ;           /* File: errors.c */

#endif /* #ifndef MESSAGE_ONLY */

#ifdef __cplusplus
}
#endif
#endif /* #ifndef SIGMET_SHARE_LIB_H */
