/* **********************************************************************
 * *	                                                                *
 * *            Legacy Structures From Past Versions of IRIS            *
 * *                                                                    *
 * ********************************************************************** 
 * File: include/legacy.h
 *
 *                    COPYRIGHT (c) 2000, 2002 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_LEGACY_H
#define SIGMET_LEGACY_H 1

#ifdef __cplusplus
extern "C" {
#endif

/* *****************************
 * *                           *
 * * Old Structure Definitions *
 * *                           *
 * *****************************
 */

/* This section contains old structure definitions that were used up
 * until the final days of storing SETUP information in binary form
 * rather than ASCII form.
 */

/* --------------------------------------------------
 * Antenna/RCP Structures
 */
struct rcp_bit_def722
{
  UINT1 lenabled;
  UINT1 lhigh;
  UINT1 linitial_high;
  UINT1 spare; 
};
struct rcp_status_def722
{
  UINT1 lenabled;
  UINT1 lhigh;
  UINT1 lCritical;
  UINT1 spare; 
};

#define ANT_MANUAL_SIZE722  (1000)
struct ant_manual_setup722
{
  SINT2 ielmin;
  BIN2  ielmax;
  FLT4 fazvelmax, felvelmax;
  UINT4 ilat, ilon;
  SINT2 ignd_hgt;
  SINT2 irad_hgt;
  UINT2 icontrol_format;
  UINT2 istatus_format;
  UINT4 itoggle_time;
  SINT4 inu_height_offset;
  SINT4 iplatform_offset[3];
  SINT2 iaz_offset, iel_offset;
  FLT4 fnoise_toggle_time;
  FLT4 fmax_ext_time;
  FLT4 fdes_update;
  SINT4 isiggen_max;
  SINT4 isiggen_min;
  FLT4 fsiggen_warmup;
  FLT4 fsiggen_settle;
  UINT4 iazmode_initial;
  UINT4 ielmode_initial;
  UINT2 iazpos_initial;
  UINT2 ielpos_initial;
  FLT4 fazv_initial;
  FLT4 felv_initial;
  SINT4 ipw_initial;
  SINT4 isiggen_value_initial;
  SINT2 ipri_antrcv, ipri_antxmt ;
  UINT2 icontrol2_format;
  UINT2 istatus2_format;
  char schannel1[32];
  char schannel2[32];
  UINT1 lStartSimulator;
  char ipad_misc[19];
  struct rcp_bit_def722 cont_servo_power;
  struct rcp_bit_def722 cont_tr_power;
  struct rcp_bit_def722 cont_radiate;
  struct rcp_bit_def722 cont_reset;
  struct rcp_bit_def722 cont_noise;
  struct rcp_bit_def722 cont_siggen;
  struct rcp_bit_def722 cont_sigcw;
  struct rcp_bit_def722 cont_pwbw;
  struct rcp_bit_def722 cont_nst;
  char ipad_cont[72];
  struct rcp_status_def722 status_low_airflow;
  struct rcp_status_def722 status_low_wgp;
  struct rcp_status_def722 status_interlock_open;
  struct rcp_status_def722 status_standby;
  struct rcp_status_def722 status_radiate;
  struct rcp_status_def722 status_mag_current;
  struct rcp_status_def722 status_local;
  struct rcp_status_def722 status_trlocal;
  struct rcp_status_def722 status_shutdown;
  struct rcp_status_def722 status_tr_power;
  struct rcp_status_def722 status_servo_power;
  struct rcp_status_def722 status_siggen;
  struct rcp_status_def722 status_sigcw;
  struct rcp_status_def722 status_pwbw;
  struct rcp_status_def722 status_sigfault;
  char ipad_status[132];
  char sreport_mode[8][16];
  char sreport_sites[4][4];
  FLT4 freport_mode_delay;
  UINT2 iDeadModeReq ;
  char ipad_end[350];
};

/* --------------------------------------------------
 * Signal Processor / DSP Structures
 */
struct dsp_manual_setup713
{
  char ipad0x84[84];
  UINT2 igas_atten;
  char ipad86x314[314];
};

/* --------------------------------------------------
 * IRIS / OUTPUT Setup Structures
 */
struct tape_device722
{
  char  ipad0x24[24];
  char  sdevice[24];
  char  ipad48x44[44];
} ;
struct mo_device722
{
  char  sMountPoint[24];
  char  sdevice[24];
  char  sdevice_raw[24];
  UINT1 iFsType;
  char  ipad73x19[19] ;
} ;
struct lda_device722
{
  char  sDirectory[48];
  char  ipad48x44[44];
} ;

union archive_specific_info722 {
  struct tape_device722 Tape;
  struct mo_device722   Mo;
  struct lda_device722  Lda;
} ;

struct archive_device722
{
  UINT1 isub_type ;
  char ipad1x3[3] ;
  union archive_specific_info722 asi;
} ;

struct link_device722 {
  SINT2 iwidth ;
  SINT2 iheight ;
  UINT1 isub_type;
  char ipad5x3[3];
  char sdevice[24];
  char ipad32x64[64] ;
} ;

struct printer_device722 {
  SINT2 iwidth ;
  SINT2 iheight ;
  char  ipad4x1[1];
  UINT1 iPaperSize;
  char  ipad6x2[2];
  char  squeue[24];
  char  ipad32x64[64] ;
} ;

struct window_device722 {
  SINT2 iwidth ;
  SINT2 iheight ;
  SINT2 ixpos;
  SINT2 iypos;
  SINT2 imoviecnt ;
  char  ipad10x6[6];
  char  sdisplay[24] ;
  char  ipad40x56[56] ;
} ;

struct network_device722
{	
  SINT2 iwidth ;      
  SINT2 iheight ;
  UINT1 ifile_format;
  UINT1 iname_format;
  UINT1 iCompress;
  UINT1 inotify_scheme;
  UINT4 itcpip_port;
  char  snode_name[16];
  UINT1 icopy_scheme;
  char  ipad_29x3[3];
  char  sdirectory[48];
  char  sPipeName[16];
} ;

union device_specific_info722 {
  struct    link_device722 link   ;
  struct  window_device722 window ;
  struct network_device722 network;
  struct archive_device722 archive;
  struct printer_device722 printer;
} ;

#define DEVICE_DEF_SIZE722 (120)
#define IDEVTYPE_PRINTER722   (2)
#define IDEVTYPE_WINDOW722    (3)
#define IDEVTYPE_ARCHIVE722   (6)
#define IDEVTYPE_NETWORK722   (7)
#define IDEVTYPE_LINK722      (9)
struct device_def722
{
  UINT1 idev_type;
  SINT1 iunit_num;
  char  ipad_2x2[2];
  char  salias[16];
  char  ipad_20x4[4];
  union device_specific_info722 dsi ;
};

#define DEVICE_SETUP_SIZE722 (2024)
#define MAX_OUT_DEVICES722 (16)
struct device_setup722
{
  struct device_def722 def[MAX_OUT_DEVICES722];
  char ipad_1920x104[104];
};

/* --------------------------------------------------
 * IRIS / Input Device Structures
 */
#define ONE_INPUT_SETUP_SIZE722 (128)
struct one_input_setup722
{	
  char  sName[16];
  char  sDirectory[48];
  char  sPipeName[16];
  char  iPad80x48[48];
} ;

#define INPUT_SETUP_SIZE722 (4096)
#define MAX_INPUT_DEVICES722 (16)
struct input_setup722
{
  char sVersion[8];
  UINT4 iInputCount;
  struct one_input_setup722 Def[MAX_INPUT_DEVICES722];
  char ipad2060x2036[2036];
};

/* --------------------------------------------------
 * IRIS / RTDISP Setup Structure
 */
#define RTDISP_SETUP_SIZE722 (400)
struct rtdisp_setup722
{
  SINT2 irtd_max_bins;
  UINT1 lrtd_send_refl;
  UINT1 lrtd_send_velocity;
  UINT1 lrtd_send_width;
  UINT1 iRtdId;
  char ipad6x2[2];
  UINT4 irtd_port;
  char sBroadcastAddress1[20];
  char ipad32x6[6];
  char ipad38x64[64];
  char sBroadcastAddress2[20];
  char sBroadcastAddress3[20];
  char ipad142x16[16];
  char ipad_end[242];
};

/* --------------------------------------------------
 * IRIS / Misc Setup Structure
 */
#define MISC_SETUP_SIZE722 (600)
struct misc_setup722
{
  SINT4 ikbytes_ingest;
  SINT2 ikept_ingest_percent;
  SINT2 ikept_product_percent;
  SINT4 ifkbytes_product;
  SINT4 itrunc;
  SINT2 inoise_time;
  SINT2 irad_off_time;
  SINT2 ingest_data_mode;
  SINT2 iext_header;
  FLT4  relspeedup;
  SINT2 inoise_az, inoise_el;
  FLT4  fzr_const;
  FLT4  fzr_exp;
  SINT4 imax_bins_per_sweep;
  UINT4 iprod_cache_size ;
  UINT1 lStatusEachTask;
  UINT1 ipad49x1;
  SINT2 iant_coast_secs;
  SINT4 iMaxWarnDiff;
  SINT4 iMaxTrackDiff;
  SINT4 iMaxDefaultDiff;
  UINT2 imax_send_queue;
  SINT2 irad_warm_time;
  FLT4  raz_scan_speed_fudge;
  FLT4  rel_scan_speed_fudge;
  UINT1 lsay_text_product;
  UINT1 lsay_mode_change;
  UINT1 lsay_fatal_errors;
  UINT1 lsay_bite_faults;
  FLT4  faz_ok_vel;
  FLT4  fel_ok_vel;
  FLT4  faz_morbid_speed;
  FLT4  fel_morbid_speed;
  UINT4 istatus_product_gen;
  UINT4 istatus_product_timeout;
  UINT4 ifkbytes_product_raw ;
  UINT2 ikept_product_raw_percent ;
  UINT2 lraw_shares_partition ;
  UINT2 lsocket_mode_control;
  UINT1 iCentroidFill;
  UINT1 lnoise_at_pw_change;
  SINT2 iMinVerticalGradient;
  UINT2 icentroid_label;
  SINT2 iaz_sweep_wait ;
  SINT2 iel_sweep_wait ;
  UINT2 istatus_product_quota ;
  SINT2 iaz_ok_err;
  SINT2 iel_ok_err;
  UINT2 lcon_clockwise;
  SINT2 isyn_mode;
  UINT2 lsyn_bcd;
  UINT2 lauto_time_set;
  SINT2 ipri_ingest, ipri_ingfio ;
  SINT2 ipri_product  ;
  SINT2 ipri_reingest ;
  SINT2 ipri_network  ;
  SINT2 ipri_output   ;
  SINT2 ipri_archive  ;
  SINT2 ipri_server   ;
  SINT2 ipri_watchdog ;
  SINT2 ipri_rtdisp   ;
  UINT2 lrcp_mode_control;
  UINT1 iprod_priorities[32] ;
  UINT2 lrestart_fatal ;
  UINT2 luse_partial_ingest ;
  UINT2 lr2_processing ;
  SINT2 ircv_beep_time ;
  FLT4 fkr_const ;
  FLT4 fkr_exp ;
  UINT1 lprod_alt_pol ;
  UINT1 iIngestActPsv ;
  SINT2 ipri_input;
  UINT4 imax_archive_products ;
  UINT4 imax_disk_products ;
  FLT4  fcmap_dbzover ;
  BIN2  icmap_eltol ;
  UINT1 lcmap_usevel ;
  char ipad227x5[5] ;
  UINT1 lnoise_enabled ;
  UINT1 lpw_advance_change ;
  SINT2 ingsim_lat ;
  SINT2 ingsim_lon ;
  SINT2 ingsim_timeoffset ;
  UINT1 ingsim_flags ;
  SINT1 ingsim_u0 ;
  SINT1 ingsim_v0 ;
  UINT1 ingsim_wamp ;
  UINT1 ingsim_whgt ;
  UINT1 ingsim_def ;
  UINT2 iNetworkWait;
  FLT4  fvvpunf_maxsep_km ;
  UINT2 ivvpunf_maxage_sec ;
  UINT1 lvvpunf_reingest ;
  char ipad255x1[1] ;
  FLT4  ffallspd_vtz_coef[2] ;
  FLT4  ffallspd_vtz_exp[2] ;
  UINT1 ifallspd_melts[12] ;
  UINT1 lfallspd_reingest ;
  UINT1 lApplyGradient;
  UINT1 lIngestResetsDsp ;
  UINT1 lIngestResetsRcp ;
  SINT4 iMaxFcastDiff;
  SINT2 iReferenceHeight;
  UINT2 iRainGageWait;
  UINT1 iWindowAlertStyle;
  UINT1 lWindowAlertOnFault;
  UINT1 iWindowFaultScheme;
  UINT1 lWindowAlertOnStale;
  UINT2 iWindowStaleTime;
  SINT2 iNumKeptLogs ;
  UINT1 lActPsvTrigrate ;
  UINT1 lActPsvStatprod ;
  char  sActPsvSiteCode[4] ;
  char  ipad310x1[1] ;
  UINT1 lStatusModeChange;
  char  sStatusSiteCode[4];
  UINT1 lLabelBottomSline;
  UINT1 lLabelBottomTdwr;
  UINT1 lLabelBottomTrack;
  UINT1 lLabelBottomWarn;
  FLT4  fAzVelocityTolerance;
  char  ipad324x276[276] ;
} ;

/* --------------------------------------------------
 * IRIS / Link Setup Structure
 */
struct special_link722
{
  UINT1 background;
  UINT1 overlay1;
  UINT1 underlay1;
  UINT1 underlay2;
  UINT1 legend;
  UINT1 centroid;
  UINT1 ipad_6x18[18];
};

#define LINK_SETUP_SIZE722 (500)
struct link_setup722
{
  char sVersion[8];
  char ipad8x452[452];
  UINT1 ilink_map[16];
  struct special_link722 link;
};

/* --------------------------------------------------
 * IRIS / Protected Region Setups
 */
#define ONE_PROT_REGION_SIZE722 (32)
struct one_protected_region722
{
  SINT4 ixcenter;
  SINT4 iycenter;
  SINT4 ixsize;
  SINT4 iysize;
  UINT2 iangle;
  char  ipad18x2[2];
  char  sname[12];
};

#define IMAX_PROT_REGIONS722 (32)
#define PROTECT_SETUP_SIZE722 (1024)
struct protect_setup722
{
  struct one_protected_region722 protected_regions[IMAX_PROT_REGIONS722];
};

/* --------------------------------------------------
 * IRIS / Site Setup Structures
 */
#define SITE_SETUP_SIZE722 (2000)
#define MAX_SITES722 (31)
struct site_list722
{
  char site_name16[20];
  char site_name3[4];
  UINT1 lChecked;
  UINT1 ipad_25x7[7];
};

struct site_setup722
{
  char ipad0x16[16];
  char pad16x2[2];
  UINT1 lmmap_okay ;
  char ipad19x1[1] ;
  SINT4 isite_number;
  SINT2 idevcount;
  char pad26x2[2];
  SINT4 imax_clients;
  char pad32x68[68];
  struct site_list722 sites[MAX_SITES722];
  char pad1092x908[908];
};

/* --------------------------------------------------
 * IRIS / License Setup Structures
 */
#define LICENSE_SETUP_SIZE722 (1000)
struct license_setup722
{
  char sVersion[8];
  char slicense_feats[32];
  char slicense_prods[32];
  char sSitename[16];
  char sPassword[16];
  UINT2 iris_style;
  char ipad106x2[2];
  char sHardwareName[16];
  char ipad124x892[876];
};

/* --------------------------------------------------
 * IRIS / Overall containing structures
 */
struct iris_setup722		/* Used internally */
{
  struct link_setup722    link;
  struct misc_setup722    misc;
  struct rtdisp_setup722  rtdisp;
  struct protect_setup722 protect;
  struct device_setup722  device;
  struct site_setup722    Site;
  struct license_setup722 License;
  struct input_setup722   Input;
};

struct iris_setup_file722	/* Setup file contents */
{
  struct link_setup722    link;
  struct misc_setup722    misc;
  struct rtdisp_setup722  rtdisp;
  struct protect_setup722 protect;
  struct device_setup722  device;
};

/* --------------------------------------------------
 * Color Definition Structures
 */
struct color_def722
{
  UINT1 ired;
  UINT1 igreen;
  UINT1 iblue;
  UINT1 ipad3x1[1] ;
};

struct special_colors722
{
  struct color_def722 background;
  struct color_def722 legend;
  struct color_def722 overlay1;
  struct color_def722 underlay1;
  struct color_def722 underlay2;
  struct color_def722 underlay3;
  struct color_def722 drop_shadow;

  struct color_def722 overlay2;
  struct color_def722 overlay3;
  struct color_def722 overlay_txt_back;
  struct color_def722 underlay1_noscan;
  struct color_def722 underlay2_noscan;
  struct color_def722 underlay3_noscan;
  struct color_def722 centroid;
  struct color_def722 background_print;
  struct color_def722 legend_print;
  struct color_def722 blink;
  struct color_def722 track;
  struct color_def722 track_highlight;
  struct color_def722 Shearline;
};

struct colorset_setup722
{
  char sname[20];
  UINT2 icolors[16];
  char  ipad52x12[12];
};

#define COLOR_SET_COUNT722 (8)
#define COLORMAP_SETUP_SIZE722 (1024)
#define COLOR_MAP_MAX722 (32)
#define COLOR_MAP_ZOOM722 (2)
#define COLOR_CELL_MAX722 \
  ( COLOR_MAP_BASE722 + (COLOR_MAP_ZOOM722 * COLOR_MAP_MAX722 ) )

struct colormap_setup722 {
  struct special_colors722 special;
  char ipad80x168[168];
  char sVersion[8];
  struct color_def722 colormap[COLOR_MAP_ZOOM722][COLOR_MAP_MAX722];
  struct colorset_setup722 set[COLOR_SET_COUNT722];
};

#define SETUP_SCALE_DEF_SIZE722 (64)
struct setup_scale_def722
{
  char sname[20];
  UINT2 ilevel_seams[16];
  UINT4 iflags;
  UINT1 iset_number;
  UINT1 inum_levels;
  char ipad58x6[6];
};

#define COLOR_SCALE_COUNT722 (8)
#define ONE_DTYPE_SCALES_SIZE722 (COLOR_SCALE_COUNT722 * SETUP_SCALE_DEF_SIZE722)
struct one_dtype_scales722
{
  struct setup_scale_def722 scales[COLOR_SCALE_COUNT722];
};

#define SETUP_DTYPE_COUNT722 (13)
#define COLOR_SETUP_SIZE722 ( COLORMAP_SETUP_SIZE722 + 20*ONE_DTYPE_SCALES_SIZE722 )
struct color_setup722
{
  struct colormap_setup722 colormap;
  struct one_dtype_scales722 dtype[SETUP_DTYPE_COUNT722];
  struct one_dtype_scales722 pad[20-SETUP_DTYPE_COUNT722];
};

/* --------------------------------------------------
 * This structure hold the numbers defining the radar calibration
 */
struct dsp_one_cal725
{
  FLT4 fRvp6Slope;
  FLT4 fRvp7Slope;
  FLT4 foffset[4];
  FLT4 fstd_dev;
  FLT4 fRvp6LogDc;
  FLT4 fNoiseLevel;
  FLT4 fRvp6LinRms;
  FLT4 fi0;
  struct ymds_time time;
  UINT4 iflag;
  struct ymds_time siggen_time;
  char             siggen_id[40];
};

struct dsp_refl_cal725
{
  struct dsp_one_cal725 reference;
  struct dsp_one_cal725 current;
};

/* --------------------------------------------------
 * BITEX Structures
 */
#define BITE_MAX_UNITS727      ( 4)
#define BITE_NUM_FIELD_DEFS727 (96)
struct bitex_status_info727
{
  char low_text[10] ;
  char high_text[10] ;
  char ipad20x2[2] ;
  UINT1 flag_state ;
  UINT1 iFlags;
  UINT1 disable_state;
  char ipad25x1[1] ;
  UINT1 disable_field;
  char ipad27x2[2] ;
} ;
struct bitex_control_info727
{
  char out_text[10] ;
  char in_text[10] ;
  char ipad20x1[1] ;
  UINT1 lbutton_in_high ;
  UINT1 button_flags ;
  UINT1 fcolor_fieldnum ;
  UINT1 fcolor_state ;
  UINT1 fcolor_color ;
  UINT1 button_in_color ;
  UINT1 button_out_color ;
  UINT1 liris_flag ;       
} ;
union bitex_cs_union727
{
  struct bitex_status_info727  sts ;
  struct bitex_control_info727 cnt ;
} ;
struct bitex_field_def727
{
  char ipad0x3[3] ;
  UINT1 ldisabled ;
  UINT1 iunit ;
  UINT1 ibyte ;
  UINT1 ibit ;
  char name_text[20] ;
  union bitex_cs_union727 cs ;
} ;
struct bitex_top_subinfo727
{
  UINT1 lcontrol_unit ;
  UINT1 iunit_length ;
} ;
struct bitex_top_def727
{
  char ipad0x1[1] ;
  UINT1 iunit_cnt ;
  char ipad2x1[1] ;
  UINT1 ifield_max ;
  UINT1 unit_id[BITE_MAX_UNITS727] ;
  struct bitex_top_subinfo727 info[BITE_MAX_UNITS727] ;
} ;

/* --------------------------------------------------
 * BITEX2 Structures
 */
#define MAX_PANEL_DIAGS727 50

struct StatContWgtDef727 {
  UINT4  iPanelNum;
  UINT4  iX;
  UINT4  iY;
  UINT2  lControl;
  UINT2  lJustCut;
  char   disableField[20];
  void  *indicatorLabelWgt;
  void  *dynamicLabelWgt;
  void  *staticLabelWgt;
} ;

struct PanelWgt727 {
  UINT2  lAlloced;
  UINT2  lFault;
  UINT2  lCriticalFault;
  char   ipad6x2[2] ;
  UINT4  iPanelNum;
  UINT4  iX;
  UINT4  iY;
  void  *panelLabelWgt;
  UINT4  iNewPanelNum;
  UINT4  iNewPanelX; 
  UINT4  iNewPanelY; 
  UINT4  iNewPanelWidth; 
  UINT4  iNewPanelHeight; 
  char   sNewPanelTitle[30]; 
  char   sNewPanelGIFFile[20]; 
  char   ipad94x2[2] ;
};

struct bitexWgt_setup727 {
  struct StatContWgtDef727 statCont[BITE_NUM_FIELD_DEFS727] ;
  struct PanelWgt727       panels  [MAX_PANEL_DIAGS727] ;
} ;

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