//!;;Rpy::+
//!;;Rpy::ModelElement: iddtypes::idd_jammer_types
//!;;Rpy::
//!;;Rpy::Component: IDDComponent 
//!;;Rpy::Configuration: IDDConfig
//!;;Rpy::Project: IDD
//!;;Rpy::
//!;;Rpy::FilePath: idd_jammer_types.h
//!;;Rpy::Tag: $Tag
//!;;Rpy::
//!;;Rpy::Copyright: Leonardocompany - COMPANY RESTRICTED
//!;;Rpy::
//!;;Rpy::Generated by Rhapsody: 7.5.3 
//!;;Rpy::-


#ifndef idd_jammer_types_H
#define idd_jammer_types_H

//## auto_generated
#include "iddtypes.h"
//## dependency idd_base_types
#include "idd_base_types.h"
//## dependency idd_frequency_types
#include "idd_frequency_types.h"
//## dependency stdint
#include "stdint.h"
namespace iddtypes
{
    //## package iddtypes::idd_jammer_types
    
    
    //#[ type jammer_level_t
    typedef enum CPP_ENUM_BASE(int) {
      not_jammed,
      jam_1,
      jam_2,
      jam_3
    } jammer_level_t;
    
    #define JAMMER_LEVEL_T_MIN not_jammed
    #define JAMMER_LEVEL_T_MAX jam_3
    //#]
    
    //#[ type jammer_class_t
    typedef enum CPP_ENUM_BASE(int) {
      non_counteractable,
      counteractable
    } jammer_class_t;
    
    #define JAMMER_CLASS_T_MIN non_counteractable
    #define JAMMER_CLASS_T_MAX counteractable
    //#]
    
    //#[ type _power_distribution_t
    struct _power_distribution_t{
      az_el_t start;
      az_el_t end;
    };
    //#]
    
    //## type power_distribuition_t
    typedef _power_distribution_t power_distribuition_t;
    
    //#[ type _jammer_centroid_t
    struct _jammer_centroid_t{
      validity_t validity;
      timetag_t  timetag;
      az_el_t    position;
    };
    //#]
    
    //## type jammer_centroid_t
    typedef _jammer_centroid_t jammer_centroid_t;
    
    //#[ type jammer_position_t
    typedef struct{
      _power_distribution_t power_distribution[JAMMER_LEVEL_T_MAX];
    } jammer_position_t;
    //#]
    
    //#[ type _jammer_bandwidth_t
    struct _jammer_bandwidth_t {
      freq_channel_t low_rf_channel;
      freq_channel_t high_rf_channel;
    };
    //#]
    
    //## type jammer_bandwidth_t
    typedef _jammer_bandwidth_t jammer_bandwidth_t;
    
    //#[ type _jammer_info_t
    struct _jammer_info_t{
      jammer_level_t     power_level;
      jammer_class_t     jammer_class;
      jammer_centroid_t  centroid;
      jammer_position_t  position;
      jammer_bandwidth_t bandwidth;
      decibel_t          power_from_sensor;
    };
    
    #define MAX_NUM_OF_JAMMERS 5
    //#]
    
    //## type jammer_info_t
    typedef _jammer_info_t jammer_info_t;
    
    //#[ type jammer_list_t
    typedef struct {
      unsigned int  num_jammers;
      jammer_info_t jammers[MAX_NUM_OF_JAMMERS];
    } jammer_list_t;
    //#]
    
    //#[ type jammer_source_t
    typedef enum CPP_ENUM_BASE(int) {
      cfar_jammer,
      sniff_jammer,
      pfa_jammer
    } jammer_source_t;
    //#]
    
    //#[ type jamming_status_t
    typedef enum CPP_ENUM_BASE(int) {
      no_jam,
      jam
    } jamming_status_t;
    //#]
    
    //#[ type jammer_detection_t
    typedef struct {
      timetag_t      timetag;
      jammer_level_t power_level;
      union {
        struct
        {
          int null;
        } not_jammed;
        struct
        {
          jammer_source_t  source;
          jamming_status_t jammer_on_beam;
          /* Grifo-e */
          jammer_class_t jam_class;
          //jammer_class_t class;
          /* Grifo-e */
          decibel_t power_from_sensor;
          jammer_bandwidth_t bandwidth;
        } jammed;
      } data;
    } jammer_detection_t;
    //#]
}

#endif
//;;Rpy:: end


