apiVersion: v1
kind: ConfigMap
metadata:
  name: du-template
  labels:
    "template": "du"
data:
  template: |
    Active_eNBs = ( "eNB-Eurecom-DU");
    # Asn1_verbosity, choice in: none, info, annoying
    Asn1_verbosity = "none";

    eNBs =
    (
      {
        ////////// Identification parameters:
        eNB_CU_ID = 0xe00;
        cell_type =  "CELL_MACRO_ENB";

        eNB_name  = "eNB-Eurecom-DU";

        // Tracking area code, 0x0000 and 0xfffe are reserved values
        tracking_area_code = 1;
        plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } )

        nr_cellid = 12345678L

        tr_s_preference     = "local_mac"

        ////////// Physical parameters:

        component_carriers = (
          {
          node_function                               = "3GPP_eNODEB";
            node_timing                               = "synch_to_ext_device";
            node_synch_ref                            = 0;
            frame_type                                = "FDD";
            tdd_config                                = 3;
            tdd_config_s                              = 0;
            prefix_type                               = "NORMAL";
            eutra_band                                = 7;
            downlink_frequency                        = 2645000000L;
            uplink_frequency_offset                   = -120000000;
            Nid_cell                                  = 0;
            N_RB_DL                                   = 25;
            Nid_cell_mbsfn                            = 0;
            nb_antenna_ports                          = 1;
            nb_antennas_tx                            = 1;
            nb_antennas_rx                            = 1;
            tx_gain                                   = 90;
            rx_gain                                   = 125;
          pbch_repetition                             = "FALSE";
          prach_root              	                  = 0;
          prach_config_index      	                  = 0;
          prach_high_speed        	                  = "DISABLE";
          prach_zero_correlation  	                  = 1;
          prach_freq_offset       	                  = 2;
          pucch_delta_shift       	                  = 1;
          pucch_nRB_CQI           	                  = 0;
          pucch_nCS_AN            	                  = 0;
          pucch_n1_AN             	                  = 0;
          pdsch_referenceSignalPower 			      = -27;
          pdsch_p_b                  			      = 0;
          pusch_n_SB                 			      = 1;
          pusch_enable64QAM          			      = "DISABLE";
          pusch_hoppingMode                           = "interSubFrame";
          pusch_hoppingOffset                         = 0;
          pusch_groupHoppingEnabled  			      = "ENABLE";
          pusch_groupAssignment      			      = 0;
          pusch_sequenceHoppingEnabled		   	      = "DISABLE";
          pusch_nDMRS1                                = 1;
          phich_duration                              = "NORMAL";
          phich_resource                              = "ONESIXTH";
          srs_enable                                  = "DISABLE";
          /*  srs_BandwidthConfig                     =;
          srs_SubframeConfig                          =;
          srs_ackNackST                               =;
          srs_MaxUpPts                                =;*/

          pusch_p0_Nominal                            = -96;
          pusch_alpha                                 = "AL1";
          pucch_p0_Nominal                            = -104;
          msg3_delta_Preamble                         = 6;

            pucch_deltaF_Format1                      = "deltaF2";
            pucch_deltaF_Format1b                     = "deltaF3";
            pucch_deltaF_Format2                      = "deltaF0";
            pucch_deltaF_Format2a                     = "deltaF0";
            pucch_deltaF_Format2b                     = "deltaF0";
          }
        );


        # ------- SCTP definitions
        SCTP :
        {
          # Number of streams to use in input/output
          SCTP_INSTREAMS  = 2;
          SCTP_OUTSTREAMS = 2;
        };
      }
    );

    MACRLCs = (
    	{
        num_cc           = 1;
        local_s_if_name  = "eth0"; #alterado de eth0
        remote_s_address = "{{ .SouthAddress }}";
        local_s_address  = "{{ .LocalAddress }}";
        local_s_portc    = 50001;
        remote_s_portc   = 50000;
        local_s_portd    = 50011;
        remote_s_portd   = 50010;
        tr_s_preference  = "nfapi";
        tr_n_preference  = "f1";
        local_n_if_name  = "eth0";
        remote_n_address = "{{ .NorthAddress }}";
        local_n_address  = "{{ .LocalAddress }}";
        local_n_portc    = 500;
        remote_n_portc   = 501;
        local_n_portd    = 600;
        remote_n_portd   = 601;
        }
    );

    RUs = (
        {
           local_rf                        = "yes"
             nb_tx                         = 1
             nb_rx                         = 1
             att_tx                        = 20
             att_rx                        = 0;
             bands                         = [38];
             max_pdschReferenceSignalPower = -23;
             max_rxgain                    = 116;
             eNB_instances                 = [0];
        }
    );

    THREAD_STRUCT = (
      {
        #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
        parallel_config    = "PARALLEL_RU_L1_TRX_SPLIT";
        #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
        worker_config      = "WORKER_ENABLE";
      }
    );

    log_config = {
      global_log_level            = "info";
      global_log_verbosity        = "medium";
      hw_log_level                = "info";
      hw_log_verbosity            = "medium";
      phy_log_level               = "info";
      phy_log_verbosity           = "medium";
      mac_log_level               = "info";
      mac_log_verbosity           = "high";
      rlc_log_level               = "info";
      rlc_log_verbosity           = "medium";
      flexran_agent_log_level     = "info";
      flexran_agent_log_verbosity = "medium";
    };

    NETWORK_CONTROLLER : {
      FLEXRAN_ENABLED        = "no";
      FLEXRAN_INTERFACE_NAME = "lo";
      FLEXRAN_IPV4_ADDRESS   = "127.0.0.1";
      FLEXRAN_PORT           = 2210;
      FLEXRAN_CACHE          = "/mnt/oai_agent_cache";
      FLEXRAN_AWAIT_RECONF   = "no";
    };
