/* **********************************************************************
 * *                                                                    *
 * *  RST Header File                                                   *
 * *                                                                    *
 * **********************************************************************
 * File: iris/xuif/rst.h
 *
 *                        COPYRIGHT (c) 2005  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 RST_H
#define RST_H

#ifdef RST_ALLOCATE
#define EXTERN
#else
#define EXTERN extern
#endif


/* Variables */

EXTERN SINT2 rst_updateDisp;
EXTERN SINT2 irst_defl_width_c;   
EXTERN SINT2 irst_defl_height_c;
EXTERN char srstnam_c[16];
EXTERN char stscnam_c[16];
EXTERN char spscnam_c[16];
EXTERN char soscnam_c[16];

EXTERN SDEV_STAT rst_dstat_c;
EXTERN SPINFO    rst_pinfo_c;
EXTERN SAINFO    rst_ainfo_c;


/* Widgets and callbacks */

EXTERN Widget rst_mainbar;

EXTERN Widget rst_menubtn, rst_menupdw;
void rst_menu_cbf( Widget wgt, int idx_a, XmPushButtonCallbackStruct* cbd );

EXTERN Widget rst_filebtn, rst_filepdw ;
void rst_file_cbf( Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a );

EXTERN Widget rst_printpdw;

EXTERN XsFLB* rst_open;
EXTERN Widget rst_svaspop;
EXTERN Widget rsthelp_fnampop;
EXTERN XsFLB* rst_dele;

EXTERN Widget rst_cmdsbtn, rst_cmdspdw;
void rst_cmds_cbf( Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a );


EXTERN Widget rst_modebtn, rst_modepdw;
void rst_mode_cbf( Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a );

EXTERN Widget rst_helpbtn, rst_helppdw;

/* Control Section */
EXTERN Widget rstc_frm,     rstc_lab;

EXTERN Widget rstc_tsclab, rstc_tscbtn, rstc_tsctxt;
EXTERN XsFLB* rstc_tsche; 
void rstc_tscbtn_cbf (Widget wgt, void* tag, void* cbd);

EXTERN Widget rstc_psclab, rstc_pscbtn, rstc_psctxt;
EXTERN XsFLB* rstc_psche; 
void rstc_pscbtn_cbf(Widget wgt, void* tag, void* cbd);

EXTERN Widget rstc_osclab, rstc_oscbtn, rstc_osctxt;
EXTERN XsFLB* rstc_osche;
void rstc_oscbtn_cbf (Widget wgt, void* tag, void* cbd);

EXTERN Widget rstc_radarlab,rstc_radartgl, rstc_radartxt;
void rstc_radartgl_cbf(Widget wgt,char* tag,XmToggleButtonCallbackStruct* cbd);

EXTERN XsPDW_TXT rstc_radia;
void rstc_radiapdw_cbf(Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a);

EXTERN Widget rstc_powerlab,rstc_powertgl, rstc_powertxt;
void rstc_powertgl_cbf(Widget wgt,char* tag,XmToggleButtonCallbackStruct* cbd);

EXTERN Widget rstc_servrlab,rstc_servrtgl, rstc_servrtxt;
void rstc_servotgl_cbf(Widget wgt,char* tag,XmToggleButtonCallbackStruct* cbd);

EXTERN Widget rstc_inputslab,rstc_inputstgl;
void rstc_inputstgl_cbf(Widget wgt,char* tag,XmToggleButtonCallbackStruct* cbd);

EXTERN Widget rstc_reinglab, rstc_reingtgl, rstc_reingtxt;
void rstc_reingtgl_cbf(Widget wgt,char* tag,XmToggleButtonCallbackStruct* cbd);

EXTERN Widget rstc_pgenlab,  rstc_pgentgl,  rstc_pgentxt;
void rstc_pgentgl_cbf(Widget wgt,char* tag,XmToggleButtonCallbackStruct* cbd);

EXTERN Widget rstc_poutlab,  rstc_pouttgl,  rstc_pouttxt;
void rstc_pouttgl_cbf(Widget wgt,char* tag,XmToggleButtonCallbackStruct* cbd);

EXTERN Widget rstc_nordradlab, rstc_nordradtgl, rstc_nordradtxt;
void rstc_nordradtgl_cbf(Widget wgt,char* tag,XmToggleButtonCallbackStruct* cbd);

EXTERN Widget rstc_netlab,   rstc_nettgl,   rstc_nettxt;
void rstc_nettgl_cbf(Widget wgt,char* tag,XmToggleButtonCallbackStruct* cbd);

EXTERN Widget rstc_weblab,   rstc_webtgl,   rstc_webtxt;
void rstc_webtgl_cbf(Widget wgt,char* tag,XmToggleButtonCallbackStruct* cbd);

EXTERN Widget rstc_messlab,  rstc_messbtn, 
       rstc_messpop,  rstc_messlst,  rstc_messtxt;
void rstc_messbtn_cbf(Widget wgt, void* tag, void* cbd);

EXTERN Widget rstc_amslab,   rstc_amstgl;
void rstc_amstgl_cbf(Widget wgt,char* tag,XmToggleButtonCallbackStruct* cbd);

EXTERN Widget rstc_nstlab,  rstc_nstbtn,  rstc_nsttxt;
void rstc_nstbtn_cbf(Widget wgt, void* tag, void* cbd);

EXTERN Widget rstc_riblab,  rstc_ribtgl,  rstc_ribtxt;
void rstc_ribtgl_cbf(Widget wgt,char* tag,XmToggleButtonCallbackStruct* cbd);


/* Device Section */
EXTERN Widget 
  rstd_frm, rstd_lab, rstd_dsptxt, rstd_rcptxt, rstd_devslst;

/* Antenna Section */
EXTERN Widget 
  rsta_frm,      rsta_lab, 

  rsta_bitelab,  rsta_bitebtn, rsta_bitetxt, 
  rsta_tranlab,  rsta_trantxt, 
  rsta_maglab,   rsta_magtxt, 

  rsta_wavelab,  rsta_wavetxt,
  rsta_locklab,  rsta_locktxt,    
  rsta_airlab,   rsta_airtxt,    

  rsta_azposlab, rsta_azpostxt,  
  rsta_azvellab, rsta_azveltxt,
  rsta_elposlab, rsta_elpostxt,  
  rsta_elvellab, rsta_elveltxt;


void rsta_bitebtn_cbf(Widget wgt, void* tag, void* cbd);

void rst_antinfo( char *data, UINT4 idata_length );
void rst_delelist( char *data, UINT4 idata_length );
void rst_devsinfo( char *data, UINT4 idata_length );
void rst_openlist( char *data, UINT4 idata_length );
void rstc_oschelist( char *data, UINT4 idata_length );
void rst_procinfo( char *data, UINT4 idata_length );
void rstc_pschelist( char *data, UINT4 idata_length );
void rstc_tschelist( char *data, UINT4 idata_length );
void rst_dualupdate( char *data, UINT4 idata_length );

void rst_upall(void);
void rst_upall_ant(void);
void rst_upall_dsp(void);
void rst_upall_thr(void);
void rst_upall_thrscrit(void);
void rst_upall_angs(void);
void rst_request( char* );
void rst_new( char* snam_a, char *srst_a, UINT4 ilen_a );

#undef EXTERN
#endif
