# SPDX-License-Identifier: LicenseRef-CSSL-1.0

############################################################
#  gNB-to-gNB neighbour list + measurement configuration   #
#  for the 2-cell rfsim setup (gNB_ID 0xe00 & 0xb00)       #
############################################################

############################################################
#                           SIB2                           #
############################################################

sib2_config : {
  q_Hyst                   = 0;
  cellReselectionPriority  = 0;
  threshServingLowP        = 0;
  threshServingLowQ        = 0;
  s_NonIntraSearchP        = -1;
  s_NonIntraSearchQ        = -1;
  q_RxLevMin               = -56;
  q_QualMin                = -1;
  s_IntraSearchP           = 22;
  s_IntraSearchQ           = -1;
  t_ReselectionNR          = 1;
  deriveSSB_IndexFromCell  = 1;

  speed_t_Evaluation       = 0;
  speed_t_HystNormal       = 0;
  speed_n_CellChangeMedium = 1;
  speed_n_CellChangeHigh   = 2;
  speed_sf_Medium          = 1;
  speed_sf_High            = 0;
};

############################################################
#      Per-frequency SIB4 inter-frequency configuration    #
############################################################

frequency_list = (
  {
    absoluteFrequencySSB = 621312;
    subcarrierSpacing    = 1; # 30 kHz
    band                 = 78;

    frequency_config = (
      {
        cellReselectionPriority = 5;
        threshX_HighP           = 10;
        threshX_LowP            = 6;
        threshX_HighQ           = -1;
        threshX_LowQ            = -1;
        q_OffsetFreq            = 0;
        q_RxLevMin              = -56;
        t_ReselectionNR         = 1;
      }
    );
  }
);

neighbour_list = (
  ##########################################################
  #      Entry USED BY gNB_ID = 0xe00  (nr_cellid = 1)     #
  ##########################################################
  {
    nr_cellid = 0; #  Serving cell of gNB 0xe00
    neighbour_cell_configuration = (
      {
        gNB_ID              = 0xb00;
        nr_cellid           = 1; # Cell served by gNB 0xb00
        physical_cellId     = 1;
        absoluteFrequencySSB= 621312;
        subcarrierSpacing   = 1;  # 30 kHz
        band                = 78;
        plmn                = { mcc = 208; mnc = 99; mnc_length = 2 };
        tracking_area_code  = 1;
        q_OffsetCell        = 2;
        q_RxLevMinOffsetCell= 2;
        q_QualMinOffsetCell = 1;
      }
    );
  },

  ##########################################################
  #      Entry USED BY gNB_ID = 0xb00  (nr_cellid = 2)     #
  ##########################################################
  {
    nr_cellid = 1; #  Serving cell of gNB 0xb00
    neighbour_cell_configuration = (
      {
        gNB_ID              = 0xe00;
        nr_cellid           = 0;  # Cell served by gNB 0xe00
        physical_cellId     = 0;
        absoluteFrequencySSB= 641280;
        subcarrierSpacing   = 1;  # 30 kHz
        band                = 78;
        plmn                = { mcc = 208; mnc = 99; mnc_length = 2 };
        tracking_area_code  = 1;
        q_OffsetCell        = 2;
        q_RxLevMinOffsetCell= 2;
        q_QualMinOffsetCell = 1;
      }
    );
  }
);

############################################################
#        Common NR measurement-event configuration         #
############################################################

nr_measurement_configuration = {
  Periodical = {
    enable = 1;
    includeBeamMeasurements = 1;
    maxNrofRS_IndexesToReport = 4;
  };

  A2 = {
    enable = 1;
    threshold = 60;
    time_to_trigger = 1;
  };

  A3 = ({
    physCellId = -1; #Default
    offset = 10;
    hysteresis = 0;
    time_to_trigger = 1
  }, {
    physCellId = 2;
    offset = 5;
    hysteresis = 1;
    time_to_trigger = 2
  })
};

