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

    a.  PROJECT NAME:       GRIFO_S7  P2813
    b.  ITEM TYPE               HEADER
    c.  ITEM NAME:              antenna_types.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.antenna_types.h
    h.  'C' RELEASE:            2.11
    i.  ITEM DESCRIPTION:
    j.  DOCUMENTATION REFERENCES: SDD Tracker Computer SR2
    k.  PROGRAMMER NAME(S):     S.R. Curtis
    l.  COPYRIGHT:              FIAR
    m.  REVISION HISTORY:       07-11-01 - Baseline copied from 3B.86 R3K Metis radar version

  *************************************************************************/

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

//## dependency base_types
#include "base_types.h"
namespace legacy
{
    // **** Common Antenna datatypes. ****
    //#[ type scan_width_t
    typedef enum {
    	_60deg,
    	_30deg,
    	_25deg,
    	_5deg
    }  scan_width_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.SCAN_WIDTH_T_MIN
const RhpString SCAN_WIDTH_T_MIN(_60deg);

//## attribute ::types_reverse::TopLevel.SCAN_WIDTH_T_MAX
const RhpString SCAN_WIDTH_T_MAX(_5deg);

namespace legacy
{
    //#[ type number_of_bars_t
    typedef enum {
    	_1bar,
    	_2bars,
    	_3bars,
    	_4bars,
    	_5bars
    }  number_of_bars_t;
    //#]
}

//## attribute ::types_reverse::TopLevel.NUMBER_OF_BARS_T_MIN
const RhpString NUMBER_OF_BARS_T_MIN(_1bar);

//## attribute ::types_reverse::TopLevel.NUMBER_OF_BARS_T_MAX
const RhpString NUMBER_OF_BARS_T_MAX(_5bars);

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

//## attribute ::types_reverse::TopLevel.BAR_NUMBER_T_MAX
const RhpString BAR_NUMBER_T_MAX(5);

namespace legacy
{
    //## type bar_number_t
    typedef unsigned int bar_number_t;
    
    //#[ type antenna_event_t
    typedef enum {
    	ant_evnt_not_valid,
    	search_scan_ready,
    	position_reached
    }  antenna_event_t;
    //#]
    
    //## type _antenna_rec_t_
    struct _antenna_rec_t_
    {
        timetag_t timetag;		//## attribute timetag
        antenna_vector_t nav_az_el;		//## attribute nav_az_el
        antenna_vector_t body_az_el;		//## attribute body_az_el
        antenna_vector_t ant_az_el;		//## attribute ant_az_el
        bar_number_t current_bar_no;		//## attribute current_bar_no
        boolean frame_in_progress;		//## attribute frame_in_progress
        boolean bar_in_progress;		//## attribute bar_in_progress
        antenna_event_t antenna_event;		//## attribute antenna_event
        boolean off_limits;		//## attribute off_limits
        boolean filtered_frame_in_progress;		//## attribute filtered_frame_in_progress
        // Grifo-e 
        radians_t frame_center;		//## attribute frame_center
        boolean acq_in_progr;		//## attribute acq_in_progr
        boolean sam_track;		//## attribute sam_track
        boolean reached_pos;		//## attribute reached_pos
        /* Grifo-e */
    };
    
    //## type antenna_rec_t
    typedef _antenna_rec_t_ antenna_rec_t;
    
    //## type _antenna_status_t_
    struct _antenna_status_t_
    {
        radians_t scan_width;		//## attribute scan_width
        number_of_bars_t number_of_bars;		//## attribute number_of_bars
        radians_t elevation_scan_centre;		//## attribute elevation_scan_centre
        radians_t bar_el_displacement[NUMBER_OF_BARS_T_MAX];		//## attribute bar_el_displacement
    };
    
    //## type antenna_status_t
    typedef _antenna_status_t_ antenna_status_t;
    
    //#[ type antenna_demand_tag_t
    typedef enum {
    	search_phase1,
    	search_phase2,
    	pointing,
    	pointing2,
    	acm_search_ant,
    	acm_conf_ant,
    	not_valid_antenna_demand
    }  antenna_demand_tag_t;
    //#]
    
    //## type _antenna_demand_t_
    struct _antenna_demand_t_
    {
        antenna_demand_tag_t tag;		//## attribute tag
        antenna_vector_t antenna_pointing_demand;		//## attribute antenna_pointing_demand
    };
    
    //## type antenna_demand_t
    typedef _antenna_demand_t_ antenna_demand_t;
    
    //#[ type antenna_mode_t
    typedef enum {
    	ant_mode_not_valid,
    	scanning_mode,
    	pointing_mode
    }  antenna_mode_t;
    //#]
    
    //## type _scan_events_t_
    struct _scan_events_t_
    {
        timetag_t timetag;		//## attribute timetag
        boolean mode_change;		//## attribute mode_change
        antenna_mode_t mode;		//## attribute mode
        boolean start_of_bar;		//## attribute start_of_bar
        boolean end_of_bar;		//## attribute end_of_bar
        boolean start_of_frame;		//## attribute start_of_frame
        boolean end_of_frame;		//## attribute end_of_frame
        boolean filtered_start_of_frame;		//## attribute filtered_start_of_frame
        boolean filtered_end_of_frame;		//## attribute filtered_end_of_frame
        boolean outside_limits;		//## attribute outside_limits
        boolean in_limits;		//## attribute in_limits
        boolean bar_number_change;		//## attribute bar_number_change
        bar_number_t bar_number;		//## attribute bar_number
    };
    
    //## type scan_events_t
    typedef _scan_events_t_ scan_events_t;
    
    //#[ type pos_type_t
    typedef enum { antenna, body, nav }  pos_type_t;
    //#]
    
    //## type _antenna_filter_data_t_
    struct _antenna_filter_data_t_
    {
        validity_t validity;		//## attribute validity
        timetag_t timetag;		//## attribute timetag
        pos_type_t stabilisation_flag;		//## attribute stabilisation_flag
        filter_vector_t azimuth_state;		//## attribute azimuth_state
        filter_vector_t elevation_state;		//## attribute elevation_state
    };
    
    //## type antenna_filter_data_t
    typedef _antenna_filter_data_t_ antenna_filter_data_t;
}

#endif
