/***************************************************************************
                     FILE INFORMATION HEADER                              
                     -----------------------                                 
                                                                         
    a.  PROJECT NAME:       GRIFO_S7  P2813         
    b.  ITEM TYPE               header
    c.  ITEM NAME:              dbs_types1.h
    d.  ITEM REFERENCE:          
    e.  CURRENT VERSION:        1.1
    f.  DATE:                   3/6/97
    g.  SOURCE FILE LOCATION:   /sparc-2/library/sr3b_end/dati/common/cmn_dt/s.dbs_types1.h
    h.  'C' RELEASE:            2.11
    i.  ITEM DESCRIPTION:       
    j.  DOCUMENTATION REFERENCES: SDD Tracker Computer SR2    
    k.  PROGRAMMER NAME(S):      
    l.  COPYRIGHT:              FIAR    
    m.  REVISION HISTORY:    07-11-01 - Baseline copied from 3B.86 R3K Metis radar version  
                                                                           
                                                                           
 ***************************************************************************/

#ifndef dbs_types1_defined
//## attribute ::types_reverse::TopLevel.dbs_types1_defined
const RhpString dbs_types1_defined;

//## dependency base_types
#include "base_types.h"
//## dependency dsp_base_types
#include "dsp_base_types.h"
//## dependency mcp_types
#include "mcp_types.h"
namespace legacy
{
    // * DBS datatypes *
    //#[ type dbs_op_code_t
    typedef enum { dbs_1, dbs_2 }  dbs_op_code_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.DBS_OP_CODE_T_MIN
const RhpString DBS_OP_CODE_T_MIN(dbs_1);

//## attribute ::types_reverse::TopLevel.DBS_OP_CODE_T_MAX
const RhpString DBS_OP_CODE_T_MAX(dbs_2);

namespace legacy
{
    //## type num_dbs_bars_t
    typedef int num_dbs_bars_t;
}

//## attribute ::types_reverse::TopLevel.NUM_DBS_BARS_T_MIN
const RhpString NUM_DBS_BARS_T_MIN(1);

//## attribute ::types_reverse::TopLevel.NUM_DBS_BARS_T_MAX
const RhpString NUM_DBS_BARS_T_MAX(2);

namespace legacy
{
    //#[ type dbs_tx_data_t
    typedef struct {
      freq_channel_t         tx_chan;
      band_indicator_t       band_indicator;
      freq_ag_type_t freq_ag_type;
    } dbs_tx_data_t;
    //#]
    
    //#[ type dbs_ant_map_init_data_t
    typedef struct {
      dbs_op_code_t   op_code;
      range_scale_t   range_scale;
      num_dbs_bars_t  num_bars;
      dbs_tx_data_t   tx_data;  
      timetag_t       map_ref_time;
      radians_t       map_hd_angle1;
      radians_t       map_hd_angle2;
      radians_t       dbs_start_az1;
      radians_t       dbs_start_az2;
      polar_vector_t  cursor;
    } dbs_ant_map_init_data_t;
    //#]
    
    //#[ type pp_dbs_settings_t
    typedef struct {
      metres_t     map_ref_alt;
      mtg_t        mtg;
      range_bin_t  fil_ref;
      validity_t   baro_alt_validity;
      metres_t     baro_alt;
      range_bin_t  ale_blk_start;
      range_bin_t  ale_blk_stop;
      range_bin_t  rb_start;
      range_bin_t  rb_stop;
    } pp_dbs_settings_t;
    //#]
    
    //#[ type sp_dbs_settings_t
    typedef struct {
      pulse_width_name_t       tx_pulse;
      switch_channel_t         switch_channel_cmd;
      hertz_t                  dem_freq;
      tx_duty_t                duty_cycle;
      n_reg_clutter_t          n_reg_clutter;
      int                      beacon_rx;
      fm_slope_t               fm_slope;
      mti_length_t             mti_length;
      mti_code_t               mti_code;
      range_bin_t              n_rbin;
      n_int_t                  n_int;
      cfar_threshold_t         vts;
      cfar_threshold_t         vtl;
      cfar_threshold_t         vtg;
      doppler_window_params_t  doppler_window_params;
      off_on_t                 slobe_blanking;
    } sp_dbs_settings_t;
    //#]
    
    //#[ type agc_dbs_settings_t
    typedef struct {
      boolean              reset_agc;
      boolean              agc_enable;
      decibel_t            mgc;
      range_bin_t          tgt_rgate;
      range_bin_t          init_rgate;
      range_bin_t          app_win_len;
    } agc_dbs_settings_t;
    //#]
    
    //#[ type dbs_dsp_settings_t
    typedef struct {
      pp_dbs_settings_t  pp;
      sp_dbs_settings_t  sp;
      agc_dbs_settings_t agc;
    } dbs_dsp_settings_t;
    //#]
}

#endif
