/***************************************************************************
                     FILE INFORMATION HEADER
                     -----------------------

    a.  PROJECT NAME:       GRIFO_S7  P2813
    b.  ITEM TYPE:              Include
    c.  ITEM NAME:              dsp_base_types.h
    d.  ITEM REFERENCE:
    e.  CURRENT VERSION:        1.4
    f.  DATE:                   1/8/99
    g.  SOURCE FILE LOCATION:   /sparc-2/library/sr3b_end/dati/common/cmn_dt/s.dsp_base_types.h
    h.  'C' RELEASE:            2.11
    i.  ITEM DESCRIPTION:       It contains commonly used dsp data types.
    j.  DOCUMENTATION REFERENCES:
    k.  PROGRAMMER NAME(S):     B.Bontempi
				S.R.Curtis
    l.  COPYRIGHT:              FIAR
    m.  REVISION HISTORY:       07-11-01 - Baseline copied from 3B.86 R3K Metis radar version
                                01-31-02 - Modified for SR1 - see DSRM/781/AR
                                12-20-02 - Added lprf_ass1a for TA mode requirements upgrade
                                12jun07 - Added new weighting value and new processing status for HR mode in S7-2.00
 ***************************************************************************/

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

//## dependency base_types
#include "base_types.h"
/***** Common DSP types. *****/

//## attribute ::types_reverse::TopLevel.MAX_NUM_OF_MEASURES
const RhpString MAX_NUM_OF_MEASURES(10);

//## attribute ::types_reverse::TopLevel.MAX_NUM_OF_DETECTIONS
const RhpString MAX_NUM_OF_DETECTIONS(16);

namespace legacy
{
    //## type pure_number_t
    typedef float pure_number_t;
}

//## attribute ::types_reverse::TopLevel.FILTER_INDEX_T_MIN
const RhpString FILTER_INDEX_T_MIN(0);

//## attribute ::types_reverse::TopLevel.FILTER_INDEX_T_MAX
const RhpString FILTER_INDEX_T_MAX(1023);

namespace legacy
{
    //## type filter_index_t
    typedef unsigned int filter_index_t;
}

//## attribute ::types_reverse::TopLevel.GAIN_T_MIN
const RhpString GAIN_T_MIN(0);

//## attribute ::types_reverse::TopLevel.GAIN_T_MAX
const RhpString GAIN_T_MAX(127);

namespace legacy
{
    //## type gain_t
    typedef unsigned int gain_t;
}

//## attribute ::types_reverse::TopLevel.RANGE_BIN_T_MIN
const RhpString RANGE_BIN_T_MIN(0);

//## attribute ::types_reverse::TopLevel.RANGE_BIN_T_MAX
const RhpString RANGE_BIN_T_MAX(10000);

namespace legacy
{
    //## type range_bin_t
    typedef unsigned int range_bin_t;
}

//## attribute ::types_reverse::TopLevel.SHORT_RANGE_BIN_T_MIN
const RhpString SHORT_RANGE_BIN_T_MIN(0);

//## attribute ::types_reverse::TopLevel.SHORT_RANGE_BIN_T_MAX
const RhpString SHORT_RANGE_BIN_T_MAX(10000);

namespace legacy
{
    //## type short_range_bin_t
    typedef unsigned short short_range_bin_t;
}

//## attribute ::types_reverse::TopLevel.NO_OF_PULSES_T_MIN
const RhpString NO_OF_PULSES_T_MIN(0);

//## attribute ::types_reverse::TopLevel.NO_OF_PULSES_T_MAX
const RhpString NO_OF_PULSES_T_MAX(63);

//## attribute ::types_reverse::TopLevel.no_of_pulses_not_valid
const RhpString no_of_pulses_not_valid(99);

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

//## attribute ::types_reverse::TopLevel.N_REG_CLUTTER_T_MIN
const RhpString N_REG_CLUTTER_T_MIN(NO_OF_PULSES_T_MIN);

//## attribute ::types_reverse::TopLevel.N_REG_CLUTTER_T_MAX
const RhpString N_REG_CLUTTER_T_MAX(NO_OF_PULSES_T_MAX);

//## attribute ::types_reverse::TopLevel.n_reg_clutter_not_valid
const RhpString n_reg_clutter_not_valid(99);

namespace legacy
{
    //## type n_reg_clutter_t
    typedef no_of_pulses_t n_reg_clutter_t;
    
    //#[ type processing_status_t
    typedef enum {
      proc_status_idle,
      range_search,
      velocity_search,
      acm,
      acm_confirmation,
      tws,
      gmti_sea_high,
      gm,
      sea_low,
      dbs1,
      dbs2,
      pvu_for_dbs,
      beacon,
      aa_stt,
      acq_for_hprf,
      gmtt_smtt,
      acq_for_sea_low,
      sstt,
      agr_search,
      agr_acq,
      agr_track,
      aa_aoj,
      as_aoj,
      aa_stt_spt,
      ta,                 /* added for TA-SR1 */
      wa,                 /* added for WA-SR1 */
      ftt,                /* added for FTT-SR1 */
      hr,                 /* added for HR in S7-2.00 */
      int_bit = 32,
      run_time_cal,
      spare_proc_status,
      is6,
      is7,
      is8,
      is9,
      is10,
      is11,
      is12,
      is13,
      is14,
      is15,
      pu_cal,
      change_in_progress = 99
      }  processing_status_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.PROCESSING_STATUS_T_MIN
const RhpString PROCESSING_STATUS_T_MIN(proc_status_idle);

//## attribute ::types_reverse::TopLevel.PROCESSING_STATUS_T_MAX
const RhpString PROCESSING_STATUS_T_MAX(pu_cal);

namespace legacy
{
    //#[ type waveform_t
    typedef enum {
      wvf_idle,
      lprf,
      mprf,
      hprf,
      lprf_nc,
      mprf_short,
      agr_short,
      agr_long,
      mprf_look_up,
      mprf_adaptive,
      auto_without_lprf_nc
      }  waveform_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.WAVEFORM_T_MIN
const RhpString WAVEFORM_T_MIN(wvf_idle);

//## attribute ::types_reverse::TopLevel.WAVEFORM_T_MAX
const RhpString WAVEFORM_T_MAX(agr_long);

namespace legacy
{
    //#[ type range_scale_t
    typedef enum {
      range_s_idle,
      _10NM,
      _20NM,
      _40NM,
      _80NM,
      _60NM,
      _160NM
      }  range_scale_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.RANGE_SCALE_T_MIN
const RhpString RANGE_SCALE_T_MIN(range_s_idle);

//## attribute ::types_reverse::TopLevel.RANGE_SCALE_T_MAX
const RhpString RANGE_SCALE_T_MAX(_160NM);

namespace legacy
{
    //#[ type scan_rate_t
    typedef enum {
      scan_r_idle,
      normal,
      slow
      }  scan_rate_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.SCAN_RATE_T_MIN
const RhpString SCAN_RATE_T_MIN(scan_r_idle);

//## attribute ::types_reverse::TopLevel.SCAN_RATE_T_MAX
const RhpString SCAN_RATE_T_MAX(slow);

namespace legacy
{
    //## type _dsp_mode_t_
    struct _dsp_mode_t_
    {
        processing_status_t proc_status;		//## attribute proc_status
        waveform_t waveform;		//## attribute waveform
        range_scale_t range_scale;		//## attribute range_scale
        scan_rate_t scan_rate;		//## attribute scan_rate
    };
    
    //## type dsp_mode_t
    typedef _dsp_mode_t_ dsp_mode_t;
    
    //#[ type close_plot_flag_t
    typedef enum {
      continue_plot,
      close_plot
      }  close_plot_flag_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.CLOSE_PLOT_FLAG_T_MIN
const RhpString CLOSE_PLOT_FLAG_T_MIN(continue_plot);

//## attribute ::types_reverse::TopLevel.CLOSE_PLOT_FLAG_T_MAX
const RhpString CLOSE_PLOT_FLAG_T_MAX(close_plot);

namespace legacy
{
    //#[ type fm_slope_t
    typedef enum {
      no_fm,
      up_slope_1,
      up_slope_2,
      up_slope_3,
      down_slope_1,
      down_slope_2,
      down_slope_3,
      fm_slope_not_valid = 99
      }  fm_slope_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.FM_SLOPE_T_MIN
const RhpString FM_SLOPE_T_MIN(no_fm);

//## attribute ::types_reverse::TopLevel.FM_SLOPE_T_MAX
const RhpString FM_SLOPE_T_MAX(down_slope_3);

namespace legacy
{
    //#[ type doppler_window_params_t
    typedef struct {
      filter_index_t  fil_start;
      filter_index_t  fil_stop;
      } doppler_window_params_t;
    //#]
    
    //#[ type sniff_channel_group_t
    typedef enum {
      sniff_ch_idle,
      sniff_group_1,
      sniff_group_2,
      sniff_group_3,
      sniff_group_4,
      sniff_group_5
      }  sniff_channel_group_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.SNIFF_CHANNEL_GROUP_T_MIN
const RhpString SNIFF_CHANNEL_GROUP_T_MIN(sniff_group_1);

//## attribute ::types_reverse::TopLevel.SNIFF_CHANNEL_GROUP_T_MAX
const RhpString SNIFF_CHANNEL_GROUP_T_MAX(sniff_group_5);

/*** DSP settings  datatypes ***/

namespace legacy
{
    // * TX settings datatypes. *
    //#[ type tx_duty_t
    typedef enum {
      duty_1,
      duty_2,
      duty_3,
      duty_4,
      duty_not_valid = 99
      }  tx_duty_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.TX_DUTY_T_MIN
const RhpString TX_DUTY_T_MIN(duty_1);

//## attribute ::types_reverse::TopLevel.TX_DUTY_T_MAX
const RhpString TX_DUTY_T_MAX(duty_4);

namespace legacy
{
    // * SP settings datatypes. *
    //#[ type switch_channel_t
    typedef enum {
      delta_el,
      delta_az,
      guard,
      dummy,
      sw_channel_cmd_not_valid
      }  switch_channel_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.SWITCH_CHANNEL_T_MIN
const RhpString SWITCH_CHANNEL_T_MIN(delta_el);

//## attribute ::types_reverse::TopLevel.SWITCH_CHANNEL_T_MAX
const RhpString SWITCH_CHANNEL_T_MAX(sw_channel_cmd_not_valid);

namespace legacy
{
    //#[ type agility_t
    typedef enum {
      not_agile,
      agile
      }  agility_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.AGILITY_T_MIN
const RhpString AGILITY_T_MIN(not_agile);

//## attribute ::types_reverse::TopLevel.AGILITY_T_MAX
const RhpString AGILITY_T_MAX(agile);

namespace legacy
{
    //#[ type pulse_width_name_t
    typedef enum {
       pw_1,
       pw_2,
       pw_3,
       pw_4,
       pw_5,
       pw_6,
       pw_7,
       pw_8,
       pw_9,
       pw_10,
       pw_not_valid = 99
      }  pulse_width_name_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.PULSE_WIDTH_NAME_T_MIN
const RhpString PULSE_WIDTH_NAME_T_MIN(pw_1);

//## attribute ::types_reverse::TopLevel.PULSE_WIDTH_NAME_T_MAX
const RhpString PULSE_WIDTH_NAME_T_MAX(pw_10);

namespace legacy
{
    //## type tx_pulse_t
    typedef pulse_width_name_t tx_pulse_t;
}

//## attribute ::types_reverse::TopLevel.TX_PULSE_T_MIN
const RhpString TX_PULSE_T_MIN(pw_1);

//## attribute ::types_reverse::TopLevel.TX_PULSE_T_MAX
const RhpString TX_PULSE_T_MAX(pw_10);

namespace legacy
{
    //#[ type mti_code_t
    typedef enum {
      mti_c0,
      mti_c1,
      mti_c2,
      mti_c3,
      mti_c4,
      mti_c5,
      mti_c6,
      mti_c7,
      mti_c8,
      mti_c9,
      mti_c10,
      mti_c11,
      mti_c12,
      mti_c13,
      mti_c14,
      mti_c15,
      mti_c16,
      mti_c17,
      mti_c18,
      mti_c19,
      mti_c20,
      mti_c21,
      mti_c22,
      mti_c23,
      mti_c24,
      mti_c25,
      mti_c26,
      mti_c27,
      mti_c28,
      mti_c29,
      mti_c30,
      mti_c31,
      mti_c32,
      mti_c33,
      mti_c34,
      mti_c35,
      mti_c36,
      mti_c37,
      mti_c38,
      mti_c39,
      mti_c40,
      mti_c41,
      mti_c42,
      mti_c43,
      mti_c44,
      mti_c45,
      mti_c46,
      mti_c47,
      mti_c48,
      mti_c49,
      mti_c50,
      mti_c51,
      mti_c52,
      mti_c53,
      mti_c54,
      mti_c55,
      mti_c56,
      mti_c57,
      mti_c58,
      mti_c59,
      mti_c60,
      mti_c61,
      mti_c62,
      mti_c63,
      mti_c64,
      mti_c65,
      mti_c66,
      mti_c67,
      mti_c68,
      mti_c69,
      mti_c70,
      mti_c71,
      mti_c72,
      mti_c73,
      mti_c74,
      mti_c75,
      mti_c76,
      mti_c77,
      mti_c78,
      mti_c79,
      mti_c80,
      mti_c81,
      mti_c82,
      mti_c83,
      mti_c84,
      mti_c85,
      mti_c86,
      mti_c87,
      mti_c88,
      mti_c89,
      mti_c90,
      mti_c91,
      mti_c92,
      mti_c93,
      mti_c94,
      mti_c95,
      mti_c96,
      mti_c97,
      mti_c98,
      mti_c99,
      mti_c100,
      mti_c101,
      mti_c102,
      mti_c103,
      mti_c104,
      mti_c105,
      mti_c106,
      mti_c107,
      mti_c108,
      mti_c109,
      mti_c110,
      mti_c111,
      mti_c112,
      mti_c113,
      mti_c114,
      mti_c115,
      mti_c116,
      mti_c117,
      mti_c118,
      mti_c119,
      mti_c120,
      mti_c121,
      mti_c122,
      mti_c123,
      mti_c124,
      mti_c125,
      mti_c126,
      mti_c127,
      mti_c128,
      mti_c129,
      mti_c130,
      mti_c131,
      mti_c132,
      mti_c133,
      mti_c134,
      mti_c135,
      mti_c136,
      mti_c137,
      mti_c138,
      mti_c139,
      mti_c140,
      mti_c141,
      mti_c142,
      mti_c143,
      mti_c144,
      mti_c145,
      mti_c146,
      mti_c147,
      mti_c148,
      mti_c149,
      mti_c150,
      mti_c151,
      mti_c152,
      mti_c153,
      mti_code_not_valid = 199
      }  mti_code_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.MTI_CODE_T_MIN
const RhpString MTI_CODE_T_MIN(mti_c0);

//## attribute ::types_reverse::TopLevel.MTI_CODE_T_MAX
const RhpString MTI_CODE_T_MAX(mti_c153);

namespace legacy
{
    //## type mti_length_t
    typedef unsigned int mti_length_t;
}

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

//## attribute ::types_reverse::TopLevel.MTI_LENGTH_T_MAX
const RhpString MTI_LENGTH_T_MAX(32);

namespace legacy
{
    //## type n_int_t
    typedef unsigned int n_int_t;
}

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

//## attribute ::types_reverse::TopLevel.N_INT_T_MAX
const RhpString N_INT_T_MAX(1024);

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

//## attribute ::types_reverse::TopLevel.FREQ_CHANNEL_T_MIN
const RhpString FREQ_CHANNEL_T_MIN(11);

//## attribute ::types_reverse::TopLevel.FREQ_CHANNEL_T_MAX
const RhpString FREQ_CHANNEL_T_MAX(60);

namespace legacy
{
    //## type freq_channel_t
    typedef unsigned int freq_channel_t;
}

//#[ type freq_channels_t
#define freq_channels_t( num_chan ) \
struct { \
  unsigned int    num_channels; \
  freq_channel_t  channels[ num_chan ]; \
}
//#]

namespace legacy
{
    //## type _selected_channel_t_
    struct _selected_channel_t_
    {
        agility_t pulse_agility_scheme;		//## attribute pulse_agility_scheme
        freq_channel_t freq_channel;		//## attribute freq_channel
    };
    
    //## type selected_channel_t
    typedef _selected_channel_t_ selected_channel_t;
}

//## attribute ::types_reverse::TopLevel.NO_OF_SELECTED_CHANNELS
const RhpString NO_OF_SELECTED_CHANNELS(10);

namespace legacy
{
    //## type _selected_channels_t_
    struct _selected_channels_t_
    {
        agility_t pulse_agility_scheme;		//## attribute pulse_agility_scheme
        freq_channel_t freq_channels[NO_OF_SELECTED_CHANNELS];		//## attribute freq_channels
    };
    
    //## type selected_channels_t
    typedef _selected_channels_t_ selected_channels_t;
    
    //## type _frequency_selection_t_
    union _frequency_selection_t_
    {
        agility_t pulse_agility_scheme;		//## attribute pulse_agility_scheme
        selected_channel_t selected_channel;		//## attribute selected_channel
        selected_channels_t selected_channels;		//## attribute selected_channels
    };
    
    //## type frequency_selection_t
    typedef _frequency_selection_t_ frequency_selection_t;
    
    //#[ type weighting_t
    typedef enum {
      rectangular,
      hamming,
      hanning,
      blackman_harris,
      triangular,
      windows_cos_0_6,
      taylor5_30,             /* added in S7-2.00 */
      //taylor6_30,              /* added in S7-2.00 */
      taylor6_50,
      blackman_4t
      }  weighting_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.WEIGHTING_T_MIN
const RhpString WEIGHTING_T_MIN(rectangular);

//## attribute ::types_reverse::TopLevel.WEIGHTING_T_MAX
const RhpString WEIGHTING_T_MAX(taylor6_30);

namespace legacy
{
    // * PP settings datatypes. *
    //#[ type range_window_params_t
    typedef struct {
      range_bin_t  rb_start;
      range_bin_t  rb_stop;
      } range_window_params_t;
    //#]
    
    //#[ type delsign_t
    typedef enum {
      delta_negative,
      delta_positive
      }  delsign_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.DELSIGN_T_MIN
const RhpString DELSIGN_T_MIN(delta_negative);

//## attribute ::types_reverse::TopLevel.DELSIGN_T_MAX
const RhpString DELSIGN_T_MAX(delta_positive);

namespace legacy
{
    //#[ type desensitisation_t
    typedef enum {
      des_1,
      des_2,
      des_3,
      des_4,
      des_5,
      des_6,
      des_7,
      des_8,
      des_9,
      des_10,
      des_11,
      des_12,
      des_13,
      des_14,
      des_15,
      des_16,
      des_not_valid = 99
      }  desensitisation_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.DESENSITISATION_T_MIN
const RhpString DESENSITISATION_T_MIN(des_1);

//## attribute ::types_reverse::TopLevel.DESENSITISATION_T_MAX
const RhpString DESENSITISATION_T_MAX(des_16);

namespace legacy
{
    //#[ type target_class_t
    typedef enum {
      helicopter,
      aircraft,
      unknown
      }  target_class_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.TARGET_CLASS_T_MIN
const RhpString TARGET_CLASS_T_MIN(helicopter);

//## attribute ::types_reverse::TopLevel.TARGET_CLASS_T_MAX
const RhpString TARGET_CLASS_T_MAX(unknown);

namespace legacy
{
    //#[ type cfar_sat_t
    typedef enum {
      cfar_sat,
      cfar_not_sat
      }  cfar_sat_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.CFAR_SAT_T_MIN
const RhpString CFAR_SAT_T_MIN(cfar_sat);

//## attribute ::types_reverse::TopLevel.CFAR_SAT_T_MAX
const RhpString CFAR_SAT_T_MAX(cfar_not_sat);

namespace legacy
{
    //#[ type jamming_status_t
    typedef enum{
      no_jam,
      jam
      }  jamming_status_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.JAMMING_STATUS_T_MIN
const RhpString JAMMING_STATUS_T_MIN(no_jam);

//## attribute ::types_reverse::TopLevel.JAMMING_STATUS_T_MAX
const RhpString JAMMING_STATUS_T_MAX(jam);

namespace legacy
{
    //#[ type target_del_flag_t
    typedef enum {
      tgt_not_del,
      cfar_del
      }  target_del_flag_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.TARGET_DEL_FLAG_T_MIN
const RhpString TARGET_DEL_FLAG_T_MIN(tgt_not_del);

//## attribute ::types_reverse::TopLevel.TARGET_DEL_FLAG_T_MAX
const RhpString TARGET_DEL_FLAG_T_MAX(cfar_del);

namespace legacy
{
    //#[ type mtg_t
    typedef enum {
      mtg_rws_search,
      mtg_rws_acq,
      mtg_gmti_1,
      mtg_gmti_2,
      mtg_gmti_3,
      mtg_gmti_4,
      mtg_gmti_5,
      mtg_gmti_6,
      mtg_gmti_7,
      mtg_gmti_8
      }  mtg_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.MTG_T_MIN
const RhpString MTG_T_MIN(mtg_rws_search);

//## attribute ::types_reverse::TopLevel.MTG_T_MAX
const RhpString MTG_T_MAX(mtg_gmti_8);

namespace legacy
{
    //## type set_number_t
    typedef unsigned int set_number_t;
}

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

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

namespace legacy
{
    //## type prf_number_t
    typedef unsigned int prf_number_t;
}

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

//## attribute ::types_reverse::TopLevel.PRF_NUMBER_T_MAX
const RhpString PRF_NUMBER_T_MAX(8);

namespace legacy
{
    //## type pfa_measure_t
    typedef float pfa_measure_t;
}

//## attribute ::types_reverse::TopLevel.PFA_MEASURE_T_MIN
const RhpString PFA_MEASURE_T_MIN(0.0F);

//## attribute ::types_reverse::TopLevel.PFA_MEASURE_T_MAX
const RhpString PFA_MEASURE_T_MAX(0.03125F);

namespace legacy
{
    //## type cfar_sensing_t
    typedef unsigned int cfar_sensing_t;
}

//## attribute ::types_reverse::TopLevel.CFAR_SENSING_T_MIN
const RhpString CFAR_SENSING_T_MIN(0);

//## attribute ::types_reverse::TopLevel.CFAR_SENSING_T_MAX
const RhpString CFAR_SENSING_T_MAX(MAX_SIGNED_INT);

namespace legacy
{
    //## type batch_end_t
    typedef unsigned int batch_end_t;
}

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

//## attribute ::types_reverse::TopLevel.BATCH_END_T_MAX
const RhpString BATCH_END_T_MAX(64);

namespace legacy
{
    //#[ type current_prf_in_mprf_t
    typedef struct {
      set_number_t  prf_set;
      prf_number_t  prf_number;
      } current_prf_in_mprf_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.NO_OF_SPUR_FREQS
const RhpString NO_OF_SPUR_FREQS(7);

namespace legacy
{
    //#[ type spurious_freqs_t
    typedef struct {
      unsigned int  num_spur_freqs;
      hertz_t       spur_freqs[NO_OF_SPUR_FREQS];
      } spurious_freqs_t;
    //#]
    
    // * DSP bit request and diag data. *
    //#[ type bit_qualifier_t
    typedef enum {
      fly,
      ground,
      diagnostic
      }  bit_qualifier_t;
    //#]
    
    //#[ type test_code_t
    typedef enum {
      test_code_idle,
      phase_2,
      pp5,
      pp6,
      pp7,
      pp8,
      agc10,
      agc11,
      agc12,
      agc15,
      phase_4,
      fe2,
      reinitialise_test,
      beacon_test
      }  test_code_t;
    //#]
    
    //#[ type bit_request_t
    typedef struct {
    	bit_qualifier_t		qualifier;
    	test_code_t 		test_code;
            } bit_request_t;
    //#]
    
    //#[ type bit_settings_t
    typedef struct {
            bit_request_t           bit_request;
            processing_status_t     proc_status;
            } bit_settings_t;
    //#]
    
    //#[ type bit_status_t
    typedef enum {
      bit_status_idle,
      fpu_in_pro,
      fpu_complete,
      ph2_in_pro,
      ph2_complete,
      run_time_cal_in_pr,
      run_time_cal_complete,
      pp5_in_pro,
      pp5_complete,
      pp6_in_pro,
      pp6_complete,
      pp7_in_pro,
      pp7_complete,
      pp8_in_pro,
      pp8_complete,
      agc10_in_pro,
      agc10_complete,
      agc11_in_pro,
      agc11_complete,
      agc12_in_pro,
      agc12_complete,
      agc15_in_pro,
      agc15_complete,
      fe2_in_pro,
      fe2_complete,
      is6_in_pro,
      is6_complete,
      is7_in_pro,
      is7_complete,
      is8_in_pro,
      is8_complete,
      is9_in_pro,
      is9_complete,
      is10_in_pro,
      is10_complete,
      is11_in_pro,
      is11_complete,
      is12_in_pro,
      is12_complete,
      is13_in_pro,
      is13_complete,
      is14_in_pro,
      is14_complete,
      is15_in_pro,
      is15_complete,
      ph4_in_pro,
      ph4_complete,
      bcn_in_pro,
      bcn_complete
      }  bit_status_t;
    //#]
    
    //#[ type pp_agc_diag_data_t
    typedef struct	{
    	bit_status_t		status;
    	unsigned short 		int_fail_occ;
    	unsigned short 		failure_mode_wd1;
    	unsigned short 		failure_mode_wd2;
    	unsigned short 		test_report_wd1;
    	unsigned short 		test_report_wd2;
    	unsigned short 		sru_fault_loc;
    	} pp_agc_diag_data_t;
    //#]
    
    //#[ type sp_diag_data_t
    typedef struct	{
    	bit_status_t		status;
    	unsigned short 		int_fail_occ;
    	unsigned short 		failure_mode_wd1;
    	unsigned short 		failure_mode_wd2;
    	unsigned short 		test_report_wd1;
    	unsigned short 		test_report_wd2;
    	unsigned short 		test_report_wd3;
    	unsigned short 		test_report_wd4;
    	unsigned short 		sru_fault_loc_wd1;
    	unsigned short 		sru_fault_loc_wd2;
    	unsigned short 		sru_fault_loc_wd3;
    	unsigned short 		sru_fault_loc_wd4;
    	} sp_diag_data_t;
    //#]
    
    // * DSP settings lookup tables datatypes. *
    //#[ type n_fft_name_t
    typedef enum {
       nfft_1,
       nfft_2,
       nfft_3,
       nfft_4,
       nfft_5,
       nfft_6,
       nfft_7,
       nfft_8,
       nfft_9,
       nfft_10,
       nfft_11,
       nfft_12,
       nfft_13,
       nfft_14,
       nfft_15,
       nfft_16,
       nfft_not_valid = 99
      }  n_fft_name_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.N_FFT_NAME_T_MIN
const RhpString N_FFT_NAME_T_MIN(nfft_1);

//## attribute ::types_reverse::TopLevel.N_FFT_NAME_T_MAX
const RhpString N_FFT_NAME_T_MAX(nfft_16);

namespace legacy
{
    //#[ type prf_name_t
    typedef enum {
       lprf_b1,
       lprf_s1,
       lprf_s2,
       lprf_s3,
       lprf_a1,
       lprf_a2,
       lprf_a3,
       lprf_a4,
       lprf_a5,
       mprf_11,
       mprf_12,
       mprf_13,
       mprf_14,
       mprf_15,
       mprf_16,
       mprf_17,
       mprf_18,
       mprf_19,
       mprf_20,
       mprf_21,
       mprf_22,
       mprf_23,
       mprf_24,
       mprf_25,
       mprf_26,
       mprf_27,
       mprf_28,
       hprf_1,
       hprf_2,
       hprf_3,
       hprf_4,
     idle_bcn,
     lprf_ass1,
     lprf_ass1a,
     lprf_ass2,
     lprf_ass3,
     lprf_ass4,
     lprf_ass5a,
     lprf_ass5b,
     lprf_ass6a,
     lprf_ass6b,
     lprf_ass7a,
     lprf_ass7b,
     lprf_ass8a,
     lprf_ass8b,
     lprf_ass9a,
     lprf_ass9b,
     lprf_ass10a,
     lprf_ass10b,
     lprf_ass11a,
     lprf_ass11b,
     lprf_asa1,
     lprf_asa2,
     lprf_asa3,
     lprf_asa4,
     lprf_asa5,
     lprf_asa6,
     lprf_asa7,
     lprf_asa8,
     lprf_asa9,
     lprf_asa10,
     lprf_asa11,
     lprf_ass1a20nm,
     lprf_ass12a,
     prf_not_valid = 99
     }  prf_name_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.PRF_NAME_T_MIN
const RhpString PRF_NAME_T_MIN(lprf_b1);

// #define PRF_NAME_T_MAX lprf_asa11
//## attribute ::types_reverse::TopLevel.PRF_NAME_T_MAX
const RhpString PRF_NAME_T_MAX(lprf_ass12a /*G346 Modified*/);

#endif
