f1ap_du_interface_management.c 51.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this file
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */

/*! \file f1ap_du_interface_management.c
 * \brief f1ap interface management for DU
 * \author EURECOM/NTUST
 * \date 2018
 * \version 0.1
 * \company Eurecom
 * \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
 * \note
 * \warning
 */

#include "f1ap_common.h"
34 35
#include "f1ap_encoder.h"
#include "f1ap_decoder.h"
36
#include "f1ap_itti_messaging.h"
37
#include "f1ap_du_interface_management.h"
38
#include "assertions.h"
39

40
int to_NRNRB(int nrb) {
41
  for (int i=0; i<sizeofArray(nrb_lut); i++)
42 43
    if (nrb_lut[i] == nrb)
      return i;
Laurent Thomas's avatar
Laurent Thomas committed
44

45 46
  if(!RC.nrrrc)
    return 0;
Laurent Thomas's avatar
Laurent Thomas committed
47

48
  AssertFatal(1==0,"nrb %d is not in the list of possible NRNRB\n",nrb);
49 50
}

51
int DU_handle_RESET(instance_t instance,
52 53 54
                    uint32_t assoc_id,
                    uint32_t stream,
                    F1AP_F1AP_PDU_t *pdu) {
55 56 57
  AssertFatal(1==0,"Not implemented yet\n");
}

58
int DU_send_RESET_ACKKNOWLEDGE(instance_t instance, F1AP_ResetAcknowledge_t *ResetAcknowledge) {
59 60 61
  AssertFatal(1==0,"Not implemented yet\n");
}

62
int DU_send_RESET(instance_t instance, F1AP_Reset_t *Reset) {
63 64 65
  AssertFatal(1==0,"Not implemented yet\n");
}

66 67 68 69
int DU_handle_RESET_ACKNOWLEDGE(instance_t instance,
                                uint32_t assoc_id,
                                uint32_t stream,
                                F1AP_F1AP_PDU_t *pdu) {
70 71 72 73 74 75 76 77
  AssertFatal(1==0,"Not implemented yet\n");
}


/*
    Error Indication
*/

78
int DU_send_ERROR_INDICATION(instance_t instance, F1AP_F1AP_PDU_t *pdu_p) {
79 80 81
  AssertFatal(1==0,"Not implemented yet\n");
}

82
int DU_handle_ERROR_INDICATION(instance_t instance,
83 84 85
                               uint32_t assoc_id,
                               uint32_t stream,
                               F1AP_F1AP_PDU_t *pdu) {
86 87 88 89 90 91 92 93 94
  AssertFatal(1==0,"Not implemented yet\n");
}


/*
    F1 Setup
*/

// SETUP REQUEST
95
int DU_send_F1_SETUP_REQUEST(instance_t instance) {
96 97
  instance_t enb_mod_idP=0;
  instance_t du_mod_idP=0;
98
  F1AP_F1AP_PDU_t       pdu= {0};
99 100 101 102 103
  uint8_t  *buffer;
  uint32_t  len;
  /* Create */
  /* 0. pdu Type */
  pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
Laurent THOMAS's avatar
Laurent THOMAS committed
104
  asn1cCalloc(pdu.choice.initiatingMessage, initMsg);
105 106 107 108
  initMsg->procedureCode = F1AP_ProcedureCode_id_F1Setup;
  initMsg->criticality   = F1AP_Criticality_reject;
  initMsg->value.present = F1AP_InitiatingMessage__value_PR_F1SetupRequest;
  F1AP_F1SetupRequest_t *f1Setup = &initMsg->value.choice.F1SetupRequest;
109 110
  /* mandatory */
  /* c1. Transaction ID (integer value) */
111 112 113 114 115
  asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ieC1);
  ieC1->id                        = F1AP_ProtocolIE_ID_id_TransactionID;
  ieC1->criticality               = F1AP_Criticality_reject;
  ieC1->value.present             = F1AP_F1SetupRequestIEs__value_PR_TransactionID;
  ieC1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);
116
  /* mandatory */
117
  /* c2. GNB_DU_ID (integer value) */
118 119 120 121
  asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ieC2);
  ieC2->id                        = F1AP_ProtocolIE_ID_id_gNB_DU_ID;
  ieC2->criticality               = F1AP_Criticality_reject;
  ieC2->value.present             = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_ID;
122
  asn_int642INTEGER(&ieC2->value.choice.GNB_DU_ID, f1ap_req(false, instance)->gNB_DU_id);
123 124 125

  /* optional */
  /* c3. GNB_DU_Name */
126
  if (f1ap_req(false,instance)->gNB_DU_name != NULL) {
127 128 129 130
    asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ieC3);
    ieC3->id                        = F1AP_ProtocolIE_ID_id_gNB_DU_Name;
    ieC3->criticality               = F1AP_Criticality_ignore;
    ieC3->value.present             = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_Name;
131 132
    char *gNB_DU_name=f1ap_req(false, instance)->gNB_DU_name;
    OCTET_STRING_fromBuf(&ieC3->value.choice.GNB_DU_Name, gNB_DU_name, strlen(gNB_DU_name));
133 134 135
  }

  /* mandatory */
136
  /* c4. served cells list */
137 138 139 140
  asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ieCells);
  ieCells->id                        = F1AP_ProtocolIE_ID_id_gNB_DU_Served_Cells_List;
  ieCells->criticality               = F1AP_Criticality_reject;
  ieCells->value.present             = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_Served_Cells_List;
141
  int num_cells_available = f1ap_req(false, instance)->num_cells_available;
142
  LOG_D(F1AP, "num_cells_available = %d \n", num_cells_available);
143

144 145 146
  for (int i=0; i<num_cells_available; i++) {
    /* mandatory */
    /* 4.1 served cells item */
147
    cellIDs_t *cell=&f1ap_req(false, instance)->cell[i];
148 149 150 151 152 153 154 155
    asn1cSequenceAdd(ieCells->value.choice.GNB_DU_Served_Cells_List.list,
                     F1AP_GNB_DU_Served_Cells_ItemIEs_t, duServedCell);
    duServedCell->id = F1AP_ProtocolIE_ID_id_GNB_DU_Served_Cells_Item;
    duServedCell->criticality = F1AP_Criticality_reject;
    duServedCell->value.present = F1AP_GNB_DU_Served_Cells_ItemIEs__value_PR_GNB_DU_Served_Cells_Item;
    F1AP_GNB_DU_Served_Cells_Item_t  *gnb_du_served_cells_item=&duServedCell->value.choice.GNB_DU_Served_Cells_Item;
    /* 4.1.1 served cell Information */
    F1AP_Served_Cell_Information_t *served_cell_information= &gnb_du_served_cells_item->served_Cell_Information;
156
    addnRCGI(served_cell_information->nRCGI,cell);
157
    /* - nRPCI */
158
    served_cell_information->nRPCI = cell->nr_pci;  // int 0..1007
159
    /* - fiveGS_TAC */
160
    uint32_t tac=htonl(cell->tac);
Laurent THOMAS's avatar
Laurent THOMAS committed
161
    asn1cCalloc(served_cell_information->fiveGS_TAC, netOrder);
162 163 164 165 166 167 168 169 170 171
    OCTET_STRING_fromBuf(netOrder, ((char *)&tac)+1, 3);

    /* - Configured_EPS_TAC */
    if(0) {
      served_cell_information->configured_EPS_TAC = (F1AP_Configured_EPS_TAC_t *)calloc(1, sizeof(F1AP_Configured_EPS_TAC_t));
      OCTET_STRING_fromBuf(served_cell_information->configured_EPS_TAC, "2", 2);
    }

    /* servedPLMN information */
    asn1cSequenceAdd(served_cell_information->servedPLMNs.list, F1AP_ServedPLMNs_Item_t,servedPLMN_item);
172
    MCC_MNC_TO_PLMNID(cell->mcc, cell->mnc, cell->mnc_digit_length, &servedPLMN_item->pLMN_Identity);
173 174 175
    // // /* - CHOICE NR-MODE-Info */
    F1AP_NR_Mode_Info_t *nR_Mode_Info= &served_cell_information->nR_Mode_Info;

176
    if (f1ap_req(false, instance)->fdd_flag) { // FDD
177
      nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
Laurent THOMAS's avatar
Laurent THOMAS committed
178
      asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
179 180
      /* FDD.1 UL NRFreqInfo */
      /* FDD.1.1 UL NRFreqInfo ARFCN */
181
      fDD_Info->uL_NRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_arfcn; // Integer
182 183 184

      /* FDD.1.2 F1AP_SUL_Information */
      if(0) { // Optional
Laurent THOMAS's avatar
Laurent THOMAS committed
185
        asn1cCalloc(fDD_Info->uL_NRFreqInfo.sul_Information, fdd_sul_info);
186 187 188 189 190 191
        fdd_sul_info->sUL_NRARFCN = 0;
        fdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0;
        fdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0;
      }

      /* FDD.1.3 freqBandListNr */
192
      int fdd_ul_num_available_freq_Bands = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_num_frequency_bands;
193 194 195 196 197
      LOG_D(F1AP, "fdd_ul_num_available_freq_Bands = %d \n", fdd_ul_num_available_freq_Bands);

      for (int fdd_ul_j=0; fdd_ul_j<fdd_ul_num_available_freq_Bands; fdd_ul_j++) {
        asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
        /* FDD.1.3.1 freqBandIndicatorNr*/
198
        nr_freqBandNrItem->freqBandIndicatorNr = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_band[fdd_ul_j]; //
199
        /* FDD.1.3.2 supportedSULBandList*/
200
        int num_available_supported_SULBands = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_num_sul_frequency_bands;
201 202 203 204 205
        LOG_D(F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands);

        for (int fdd_ul_k=0; fdd_ul_k<num_available_supported_SULBands; fdd_ul_k++) {
          asn1cSequenceAdd(nr_freqBandNrItem->supportedSULBandList.list, F1AP_SupportedSULFreqBandItem_t, nr_supportedSULFreqBandItem);
          /* FDD.1.3.2.1 freqBandIndicatorNr */
206
          nr_supportedSULFreqBandItem->freqBandIndicatorNr = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_sul_band[fdd_ul_k]; //
207 208 209 210 211
        } // for FDD : UL supported_SULBands
      } // for FDD : UL freq_Bands

      /* FDD.2 DL NRFreqInfo */
      /* FDD.2.1 DL NRFreqInfo ARFCN */
212
      fDD_Info->dL_NRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nr_arfcn; // Integer
213 214 215 216 217 218 219 220 221 222

      /* FDD.2.2 F1AP_SUL_Information */
      if(0) { // Optional
        F1AP_SUL_Information_t *fdd_sul_info=fDD_Info->dL_NRFreqInfo.sul_Information;
        fdd_sul_info->sUL_NRARFCN = 0;
        fdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0;
        fdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0;
      }

      /* FDD.2.3 freqBandListNr */
223
      int fdd_dl_num_available_freq_Bands = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_num_frequency_bands;
224 225 226 227 228
      LOG_D(F1AP, "fdd_dl_num_available_freq_Bands = %d \n", fdd_dl_num_available_freq_Bands);

      for (int fdd_dl_j=0; fdd_dl_j<fdd_dl_num_available_freq_Bands; fdd_dl_j++) {
        asn1cSequenceAdd(fDD_Info->dL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
        /* FDD.2.3.1 freqBandIndicatorNr*/
229
        nr_freqBandNrItem->freqBandIndicatorNr = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nr_band[fdd_dl_j]; //
230
        /* FDD.2.3.2 supportedSULBandList*/
231
        int num_available_supported_SULBands = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_num_sul_frequency_bands;
232 233 234 235 236
        LOG_D(F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands);

        for (int fdd_dl_k=0; fdd_dl_k<num_available_supported_SULBands; fdd_dl_k++) {
          asn1cSequenceAdd(nr_freqBandNrItem->supportedSULBandList.list, F1AP_SupportedSULFreqBandItem_t, nr_supportedSULFreqBandItem);
          /* FDD.2.3.2.1 freqBandIndicatorNr */
237
          nr_supportedSULFreqBandItem->freqBandIndicatorNr = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nr_sul_band[fdd_dl_k]; //
238 239 240 241
        } // for FDD : DL supported_SULBands
      } // for FDD : DL freq_Bands

      /* FDD.3 UL Transmission Bandwidth */
242 243
      fDD_Info->uL_Transmission_Bandwidth.nRSCS = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_scs;
      fDD_Info->uL_Transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nrb);
244
      /* FDD.4 DL Transmission Bandwidth */
245 246
      fDD_Info->dL_Transmission_Bandwidth.nRSCS = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_scs;
      fDD_Info->dL_Transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nrb);
247 248
    } else { // TDD
      nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
Laurent THOMAS's avatar
Laurent THOMAS committed
249
      asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info);
250 251
      /* TDD.1 nRFreqInfo */
      /* TDD.1.1 nRFreqInfo ARFCN */
252
      tDD_Info->nRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_arfcn; // Integer
253 254 255 256 257 258 259 260 261 262

      /* TDD.1.2 F1AP_SUL_Information */
      if(0) { // Optional
        F1AP_SUL_Information_t *tdd_sul_info= tDD_Info->nRFreqInfo.sul_Information;
        tdd_sul_info->sUL_NRARFCN = 0;
        tdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0;
        tdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0;
      }

      /* TDD.1.3 freqBandListNr */
263
      int tdd_num_available_freq_Bands = f1ap_req(false,instance)->nr_mode_info[i].tdd.num_frequency_bands;
264 265 266 267 268
      LOG_D(F1AP, "tdd_num_available_freq_Bands = %d \n", tdd_num_available_freq_Bands);

      for (int j=0; j<tdd_num_available_freq_Bands; j++) {
        asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
        /* TDD.1.3.1 freqBandIndicatorNr*/
269
        nr_freqBandNrItem->freqBandIndicatorNr = *f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_band; //
270
        /* TDD.1.3.2 supportedSULBandList*/
271
        int num_available_supported_SULBands = f1ap_req(false,instance)->nr_mode_info[i].tdd.num_sul_frequency_bands;
272 273 274 275 276
        LOG_D(F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands);

        for (int k=0; k<num_available_supported_SULBands; k++) {
          asn1cSequenceAdd(nr_freqBandNrItem->supportedSULBandList.list,F1AP_SupportedSULFreqBandItem_t, nr_supportedSULFreqBandItem);
          /* TDD.1.3.2.1 freqBandIndicatorNr */
277
          nr_supportedSULFreqBandItem->freqBandIndicatorNr = *f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_sul_band; //
278 279 280 281
        } // for TDD : supported_SULBands
      } // for TDD : freq_Bands

      /* TDD.2 transmission_Bandwidth */
282 283
      tDD_Info->transmission_Bandwidth.nRSCS = f1ap_req(false,instance)->nr_mode_info[i].tdd.scs;
      tDD_Info->transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].tdd.nrb);
284 285 286
    } // if nR_Mode_Info

    /* - measurementTimingConfiguration */
287
    char *measurementTimingConfiguration = f1ap_req(false,instance)->measurement_timing_information[i]; // sept. 2018
288 289 290
    OCTET_STRING_fromBuf(&served_cell_information->measurementTimingConfiguration,
                         measurementTimingConfiguration,
                         strlen(measurementTimingConfiguration));
Laurent THOMAS's avatar
Laurent THOMAS committed
291
    asn1cCalloc(gnb_du_served_cells_item->gNB_DU_System_Information, gNB_DU_System_Information);
292 293
    /* 4.1.2 gNB-DU System Information */
    OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message,  // sept. 2018
294 295
                         (const char *)f1ap_req(false,instance)->mib[i], //f1ap_du_data->mib,
                         f1ap_req(false,instance)->mib_length[i]);
296
    OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message,  // sept. 2018
297 298
                         (const char *)f1ap_req(false,instance)->sib1[i],
                         f1ap_req(false,instance)->sib1_length[i]);
299 300
  }

301 302
  /* mandatory */
  /* c5. RRC VERSION */
Laurent THOMAS's avatar
Laurent THOMAS committed
303 304 305 306 307 308 309 310
  asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ie2);
  ie2->id                        = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version;
  ie2->criticality               = F1AP_Criticality_reject;
  ie2->value.present             = F1AP_F1SetupRequestIEs__value_PR_RRC_Version;
  ie2->value.choice.RRC_Version.latest_RRC_Version.buf=calloc(1,sizeof(char));
  ie2->value.choice.RRC_Version.latest_RRC_Version.buf[0] = 0xe0;
  ie2->value.choice.RRC_Version.latest_RRC_Version.size = 1;
  ie2->value.choice.RRC_Version.latest_RRC_Version.bits_unused = 5;
311

312 313
  /* encode */
  if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
314
    LOG_E(F1AP, "Failed to encode F1 setup request\n");
315
    return -1;
316 317
  }

318
  ASN_STRUCT_RESET(asn_DEF_F1AP_F1AP_PDU, &pdu);
319
  f1ap_itti_send_sctp_data_req(false, instance, buffer, len, 0);
320
  return 0;
321 322
}

323
int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
324 325 326
                                uint32_t               assoc_id,
                                uint32_t               stream,
                                F1AP_F1AP_PDU_t       *pdu) {
Xue Song's avatar
Xue Song committed
327 328
  LOG_D(F1AP, "DU_handle_F1_SETUP_RESPONSE\n");
  AssertFatal(pdu->present == F1AP_F1AP_PDU_PR_successfulOutcome,
329
              "pdu->present != F1AP_F1AP_PDU_PR_successfulOutcome\n");
Xue Song's avatar
Xue Song committed
330
  AssertFatal(pdu->choice.successfulOutcome->procedureCode  == F1AP_ProcedureCode_id_F1Setup,
331
              "pdu->choice.successfulOutcome->procedureCode != F1AP_ProcedureCode_id_F1Setup\n");
Xue Song's avatar
Xue Song committed
332
  AssertFatal(pdu->choice.successfulOutcome->criticality  == F1AP_Criticality_reject,
333
              "pdu->choice.successfulOutcome->criticality != F1AP_Criticality_reject\n");
Xue Song's avatar
Xue Song committed
334
  AssertFatal(pdu->choice.successfulOutcome->value.present  == F1AP_SuccessfulOutcome__value_PR_F1SetupResponse,
335
              "pdu->choice.successfulOutcome->value.present != F1AP_SuccessfulOutcome__value_PR_F1SetupResponse\n");
Xue Song's avatar
Xue Song committed
336 337 338 339 340
  F1AP_F1SetupResponse_t    *in = &pdu->choice.successfulOutcome->value.choice.F1SetupResponse;
  F1AP_F1SetupResponseIEs_t *ie;
  int TransactionId = -1;
  int num_cells_to_activate = 0;
  F1AP_Cells_to_be_Activated_List_Item_t *cell;
341
  MessageDef *msg_p = itti_alloc_new_message (TASK_DU_F1, 0, F1AP_SETUP_RESP);
Xue Song's avatar
Xue Song committed
342 343
  LOG_D(F1AP, "F1AP: F1Setup-Resp: protocolIEs.list.count %d\n",
        in->protocolIEs.list.count);
344 345

  for (int i=0; i < in->protocolIEs.list.count; i++) {
Xue Song's avatar
Xue Song committed
346
    ie = in->protocolIEs.list.array[i];
347

Xue Song's avatar
Xue Song committed
348 349 350
    switch (ie->id) {
      case F1AP_ProtocolIE_ID_id_TransactionID:
        AssertFatal(ie->criticality == F1AP_Criticality_reject,
351
                    "ie->criticality != F1AP_Criticality_reject\n");
Xue Song's avatar
Xue Song committed
352
        AssertFatal(ie->value.present == F1AP_F1SetupResponseIEs__value_PR_TransactionID,
353
                    "ie->value.present != F1AP_F1SetupResponseIEs__value_PR_TransactionID\n");
Xue Song's avatar
Xue Song committed
354 355 356 357
        TransactionId=ie->value.choice.TransactionID;
        LOG_D(F1AP, "F1AP: F1Setup-Resp: TransactionId %d\n",
              TransactionId);
        break;
358

Xue Song's avatar
Xue Song committed
359 360
      case F1AP_ProtocolIE_ID_id_gNB_CU_Name:
        AssertFatal(ie->criticality == F1AP_Criticality_ignore,
361
                    "ie->criticality != F1AP_Criticality_ignore\n");
Xue Song's avatar
Xue Song committed
362
        AssertFatal(ie->value.present == F1AP_F1SetupResponseIEs__value_PR_GNB_CU_Name,
363
                    "ie->value.present != F1AP_F1SetupResponseIEs__value_PR_TransactionID\n");
Xue Song's avatar
Xue Song committed
364 365 366 367 368 369
        F1AP_SETUP_RESP (msg_p).gNB_CU_name = malloc(ie->value.choice.GNB_CU_Name.size+1);
        memcpy(F1AP_SETUP_RESP (msg_p).gNB_CU_name,ie->value.choice.GNB_CU_Name.buf,ie->value.choice.GNB_CU_Name.size);
        F1AP_SETUP_RESP (msg_p).gNB_CU_name[ie->value.choice.GNB_CU_Name.size]='\0';
        LOG_D(F1AP, "F1AP: F1Setup-Resp: gNB_CU_name %s\n",
              F1AP_SETUP_RESP (msg_p).gNB_CU_name);
        break;
370

371 372 373
      case F1AP_ProtocolIE_ID_id_GNB_CU_RRC_Version:
        LOG_D(F1AP, "F1AP: Received GNB-CU-RRC-Version, ignoring\n");
        break;
374 375

      case F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List: {
Xue Song's avatar
Xue Song committed
376
        AssertFatal(ie->criticality == F1AP_Criticality_reject,
377
                    "ie->criticality != F1AP_Criticality_reject\n");
Xue Song's avatar
Xue Song committed
378
        AssertFatal(ie->value.present == F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List,
379
                    "ie->value.present != F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List\n");
Xue Song's avatar
Xue Song committed
380 381 382
        num_cells_to_activate = ie->value.choice.Cells_to_be_Activated_List.list.count;
        LOG_D(F1AP, "F1AP: Activating %d cells\n",num_cells_to_activate);

383
        for (int i=0; i<num_cells_to_activate; i++) {
384 385
          F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *) ie->value.choice.Cells_to_be_Activated_List.list.array[i];
          AssertFatal(cells_to_be_activated_list_item_ies->id == F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item,
386
                      "cells_to_be_activated_list_item_ies->id != F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item");
387
          AssertFatal(cells_to_be_activated_list_item_ies->criticality == F1AP_Criticality_reject,
388
                      "cells_to_be_activated_list_item_ies->criticality == F1AP_Criticality_reject");
389
          AssertFatal(cells_to_be_activated_list_item_ies->value.present == F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item,
390
                      "cells_to_be_activated_list_item_ies->value.present == F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item");
391
          cell = &cells_to_be_activated_list_item_ies->value.choice.Cells_to_be_Activated_List_Item;
392 393
          TBCD_TO_MCC_MNC(&cell->nRCGI.pLMN_Identity, F1AP_SETUP_RESP (msg_p).cells_to_activate[i].mcc, F1AP_SETUP_RESP (msg_p).cells_to_activate[i].mnc,
                          F1AP_SETUP_RESP (msg_p).cells_to_activate[i].mnc_digit_length);
394 395 396 397 398 399 400
          LOG_D(F1AP, "nr_cellId : %x %x %x %x %x\n",
                cell->nRCGI.nRCellIdentity.buf[0],
                cell->nRCGI.nRCellIdentity.buf[1],
                cell->nRCGI.nRCellIdentity.buf[2],
                cell->nRCGI.nRCellIdentity.buf[3],
                cell->nRCGI.nRCellIdentity.buf[4]);
          BIT_STRING_TO_NR_CELL_IDENTITY(&cell->nRCGI.nRCellIdentity,
401 402 403 404 405
                                         F1AP_SETUP_RESP (msg_p).cells_to_activate[i].nr_cellid);
          F1AP_ProtocolExtensionContainer_154P112_t *ext = (F1AP_ProtocolExtensionContainer_154P112_t *)cell->iE_Extensions;

          if (ext==NULL)
            continue;
406

407
          for (int cnt=0; cnt<ext->list.count; cnt++) {
408
            F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs=(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)ext->list.array[cnt];
409

410
            switch (cells_to_be_activated_list_itemExtIEs->id) {
411 412 413 414 415 416 417 418 419
              /*
                            case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_NOTHING:
                            case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation,
                            case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_AvailablePLMNList,
                            case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_ExtendedAvailablePLMN_List,
                            case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_IAB_Info_IAB_donor_CU,
                            case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_AvailableSNPN_ID_List
              */
              case F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation: {
420
                F1AP_SETUP_RESP (msg_p).cells_to_activate[i].nrpci = (cell->nRPCI != NULL) ? *cell->nRPCI : 0;
421
                F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)&cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation;
422
                F1AP_SETUP_RESP (msg_p).cells_to_activate[i].num_SI = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;
423
                AssertFatal(ext->list.count==1,"At least one SI message should be there, and only 1 for now!\n");
424
                LOG_D(F1AP, "F1AP: Cell %d MCC %d MNC %d NRCellid %lx num_si %d\n",
425 426
                      i, F1AP_SETUP_RESP (msg_p).cells_to_activate[i].mcc, F1AP_SETUP_RESP (msg_p).cells_to_activate[i].mnc,
                      F1AP_SETUP_RESP (msg_p).cells_to_activate[i].nr_cellid, F1AP_SETUP_RESP (msg_p).cells_to_activate[i].num_SI);
427 428

                for (int si = 0; si < gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count; si++) {
429 430
                  F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si];
                  size_t size = sib_item->sIBmessage.size;
431
                  F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si] = size;
Laurent THOMAS's avatar
Laurent THOMAS committed
432
                  LOG_D(F1AP, "F1AP: SI_container_length[%d][%ld] %ld bytes\n", i, sib_item->sIBtype, size);
433
                  F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si] = malloc(F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si]);
434 435 436
                  memcpy((void *)F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si],
                         (void *)sib_item->sIBmessage.buf,
                         size);
Laurent Thomas's avatar
Laurent Thomas committed
437
                  F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_type[si]=sib_item->sIBtype;
438
                }
439

440
                break;
Xue Song's avatar
Xue Song committed
441
              }
442

443 444 445
              case F1AP_ProtocolIE_ID_id_AvailablePLMNList:
                AssertFatal(1==0,"F1AP_ProtocolIE_ID_id_AvailablePLMNList not supported yet\n");
                break;
446

447 448 449
              case F1AP_ProtocolIE_ID_id_ExtendedAvailablePLMN_List:
                AssertFatal(1==0,"F1AP_ProtocolIE_ID_id_AvailablePLMNList not supported yet\n");
                break;
450

451 452 453
              case F1AP_ProtocolIE_ID_id_IAB_Info_IAB_donor_CU:
                AssertFatal(1==0,"F1AP_ProtocolIE_ID_id_AvailablePLMNList not supported yet\n");
                break;
454

455 456 457
              case F1AP_ProtocolIE_ID_id_AvailableSNPN_ID_List:
                AssertFatal(1==0,"F1AP_ProtocolIE_ID_id_AvailablePLMNList not supported yet\n");
                break;
458

459 460 461
              default:
                AssertFatal(1==0,"F1AP_ProtocolIE_ID_id %d unknown\n",(int)cells_to_be_activated_list_itemExtIEs->id);
                break;
Xue Song's avatar
Xue Song committed
462
            }
463 464
          } // for (cnt=...
        } // for (cells_to_activate...
465

466 467 468 469 470 471
        break;
      } // case F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List

      default:
        AssertFatal(1==0,"F1AP_ProtocolIE_ID_id %d unknown\n", (int)ie->id);
        break;
Xue Song's avatar
Xue Song committed
472 473
    } // switch ie
  } // for IE
474

Xue Song's avatar
Xue Song committed
475
  AssertFatal(TransactionId!=-1,"TransactionId was not sent\n");
Laurent THOMAS's avatar
Laurent THOMAS committed
476
  LOG_D(F1AP,"F1AP: num_cells_to_activate %d\n",num_cells_to_activate);
Xue Song's avatar
Xue Song committed
477
  F1AP_SETUP_RESP (msg_p).num_cells_to_activate = num_cells_to_activate;
478

Xue Song's avatar
Xue Song committed
479
  // tmp
480
  // F1AP_SETUP_RESP (msg_p).num_SI[0] = 1;
481
  for (int i=0; i<num_cells_to_activate; i++)
482
    AssertFatal(F1AP_SETUP_RESP (msg_p).cells_to_activate[i].num_SI > 0, "System Information %d is missing",i);
Xue Song's avatar
Xue Song committed
483

484 485
  LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message\n");
  itti_send_msg_to_task(TASK_F1APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
Xue Song's avatar
Xue Song committed
486
  return 0;
487
}
Laurent THOMAS's avatar
Laurent THOMAS committed
488

489
// SETUP FAILURE
490 491 492
int DU_handle_F1_SETUP_FAILURE(instance_t instance,
                               uint32_t assoc_id,
                               uint32_t stream,
493
                               F1AP_F1AP_PDU_t *pdu) {
494
  LOG_E(F1AP, "DU_handle_F1_SETUP_FAILURE\n");
Xue Song's avatar
Xue Song committed
495 496 497 498 499
  F1AP_F1SetupFailure_t    *out;
  F1AP_F1SetupFailureIEs_t *ie;
  out = &pdu->choice.unsuccessfulOutcome->value.choice.F1SetupFailure;
  /* Transaction ID */
  F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupFailureIEs_t, ie, out,
500
                             F1AP_ProtocolIE_ID_id_TransactionID, true);
Xue Song's avatar
Xue Song committed
501 502
  /* Cause */
  F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupFailureIEs_t, ie, out,
503
                             F1AP_ProtocolIE_ID_id_Cause, true);
Xue Song's avatar
Xue Song committed
504 505 506 507

  if(0) {
    /* TimeToWait */
    F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupFailureIEs_t, ie, out,
508
                               F1AP_ProtocolIE_ID_id_TimeToWait, true);
Xue Song's avatar
Xue Song committed
509 510
  }

511
  return 0;
512
}
Laurent THOMAS's avatar
Laurent THOMAS committed
513 514


515 516 517
/*
    gNB-DU Configuration Update
*/
Laurent THOMAS's avatar
Laurent THOMAS committed
518

519
//void DU_send_gNB_DU_CONFIGURATION_UPDATE(F1AP_GNBDUConfigurationUpdate_t *GNBDUConfigurationUpdate) {
520
int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
521 522
                                        instance_t du_mod_idP,
                                        f1ap_setup_req_t *f1ap_setup_req) {
523 524 525
  F1AP_F1AP_PDU_t                     pdu= {0};
  uint8_t  *buffer=NULL;
  uint32_t  len=0;
526 527 528
  /* Create */
  /* 0. Message Type */
  pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
Laurent THOMAS's avatar
Laurent THOMAS committed
529
  asn1cCalloc(pdu.choice.initiatingMessage, initMsg);
530 531 532 533
  initMsg->procedureCode = F1AP_ProcedureCode_id_gNBDUConfigurationUpdate;
  initMsg->criticality   = F1AP_Criticality_reject;
  initMsg->value.present = F1AP_InitiatingMessage__value_PR_GNBDUConfigurationUpdate;
  F1AP_GNBDUConfigurationUpdate_t      *out = &pdu.choice.initiatingMessage->value.choice.GNBDUConfigurationUpdate;
534 535
  /* mandatory */
  /* c1. Transaction ID (integer value) */
536 537 538 539 540
  asn1cSequenceAdd(out, F1AP_GNBDUConfigurationUpdateIEs_t, ie1);
  ie1->id                        = F1AP_ProtocolIE_ID_id_TransactionID;
  ie1->criticality               = F1AP_Criticality_reject;
  ie1->value.present             = F1AP_GNBDUConfigurationUpdateIEs__value_PR_TransactionID;
  ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(instance, du_mod_idP);
541 542
  /* mandatory */
  /* c2. Served_Cells_To_Add */
543 544 545 546
  asn1cSequenceAdd(out, F1AP_GNBDUConfigurationUpdateIEs_t, ie2);
  ie2->id                        = F1AP_ProtocolIE_ID_id_Served_Cells_To_Add_List;
  ie2->criticality               = F1AP_Criticality_reject;
  ie2->value.present             = F1AP_GNBDUConfigurationUpdateIEs__value_PR_Served_Cells_To_Add_List;
547

548
  for (int j=0;   j<1; j++) {
549
    //
550
    asn1cSequenceAdd(ie2->value.choice.Served_Cells_To_Add_List.list, F1AP_Served_Cells_To_Add_ItemIEs_t, served_cells_to_add_item_ies);
551 552 553
    served_cells_to_add_item_ies->id            = F1AP_ProtocolIE_ID_id_Served_Cells_To_Add_Item;
    served_cells_to_add_item_ies->criticality   = F1AP_Criticality_reject;
    served_cells_to_add_item_ies->value.present = F1AP_Served_Cells_To_Add_ItemIEs__value_PR_Served_Cells_To_Add_Item;
554 555
    F1AP_Served_Cells_To_Add_Item_t *served_cells_to_add_item= &served_cells_to_add_item_ies->value.choice.Served_Cells_To_Add_Item;
    F1AP_Served_Cell_Information_t  *served_cell_information=&served_cells_to_add_item->served_Cell_Information;
556
    /* - nRCGI */
557
    addnRCGI(served_cell_information->nRCGI, &f1ap_setup_req->cell[j]);
558
    /* - nRPCI */
559
    /* 2.1.1 serverd cell Information */
560 561
    cellIDs_t *cell=&f1ap_req(false, instance)->cell[j];
    served_cell_information->nRPCI = cell->nr_pci;  // int 0..1007
562
    /* - fiveGS_TAC */
563
    uint32_t tac=htonl(cell->tac);
564 565
    served_cell_information->fiveGS_TAC=(F1AP_FiveGS_TAC_t *) calloc(1,sizeof(F1AP_FiveGS_TAC_t *));
    OCTET_STRING_fromBuf(served_cell_information->fiveGS_TAC, ((char *)&tac)+1, 3);
566 567 568

    /* - Configured_EPS_TAC */
    if(1) {
569 570
      served_cell_information->configured_EPS_TAC = (F1AP_Configured_EPS_TAC_t *)calloc(1, sizeof(F1AP_Configured_EPS_TAC_t));
      OCTET_STRING_fromBuf(served_cell_information->configured_EPS_TAC,"2", 2);
571 572
    }

573
    asn1cSequenceAdd(served_cell_information->servedPLMNs.list, F1AP_ServedPLMNs_Item_t, servedPLMN_item);
574
    MCC_MNC_TO_PLMNID(cell->mcc, cell->mnc, cell->mnc_digit_length, &servedPLMN_item->pLMN_Identity);
575
    // // /* - CHOICE NR-MODE-Info */
576
    F1AP_NR_Mode_Info_t *nR_Mode_Info=&served_cell_information->nR_Mode_Info;
577
    LOG_E(F1AP,"Here hardcoded values instead of values from configuration file\n");
578 579

    if (f1ap_setup_req->fdd_flag) {
580
      nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
581
      /* > FDD >> FDD Info */
Laurent THOMAS's avatar
Laurent THOMAS committed
582
      asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
583 584
      /* >>> UL NRFreqInfo */
      fDD_Info->uL_NRFreqInfo.nRARFCN = 999L;
585 586 587 588
      asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, ul_freqBandNrItem);
      ul_freqBandNrItem->freqBandIndicatorNr = 888L;
      asn1cSequenceAdd(ul_freqBandNrItem->supportedSULBandList.list, F1AP_SupportedSULFreqBandItem_t, ul_supportedSULFreqBandItem);
      ul_supportedSULFreqBandItem->freqBandIndicatorNr = 777L;
589 590
      /* >>> DL NRFreqInfo */
      fDD_Info->dL_NRFreqInfo.nRARFCN = 666L;
591 592 593 594
      asn1cSequenceAdd(fDD_Info->dL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, dl_freqBandNrItem);
      dl_freqBandNrItem->freqBandIndicatorNr = 555L;
      asn1cSequenceAdd(dl_freqBandNrItem->supportedSULBandList.list, F1AP_SupportedSULFreqBandItem_t, dl_supportedSULFreqBandItem);
      dl_supportedSULFreqBandItem->freqBandIndicatorNr = 444L;
595 596 597 598 599 600 601
      /* >>> UL Transmission Bandwidth */
      fDD_Info->uL_Transmission_Bandwidth.nRSCS = F1AP_NRSCS_scs15;
      fDD_Info->uL_Transmission_Bandwidth.nRNRB = F1AP_NRNRB_nrb11;
      /* >>> DL Transmission Bandwidth */
      fDD_Info->dL_Transmission_Bandwidth.nRSCS = F1AP_NRSCS_scs15;
      fDD_Info->dL_Transmission_Bandwidth.nRNRB = F1AP_NRNRB_nrb11;
    } else { // TDD
602
      nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
603
      /* > TDD >> TDD Info */
Laurent THOMAS's avatar
Laurent THOMAS committed
604
      asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info);
605 606
      /* >>> ARFCN */
      tDD_Info->nRFreqInfo.nRARFCN = 999L; // Integer
607 608 609 610
      asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
      nr_freqBandNrItem->freqBandIndicatorNr = 555L;
      asn1cSequenceAdd(nr_freqBandNrItem->supportedSULBandList.list, F1AP_SupportedSULFreqBandItem_t, nr_supportedSULFreqBandItem);
      nr_supportedSULFreqBandItem->freqBandIndicatorNr = 444L;
611 612 613 614 615 616
      tDD_Info->transmission_Bandwidth.nRSCS= F1AP_NRSCS_scs15;
      tDD_Info->transmission_Bandwidth.nRNRB= F1AP_NRNRB_nrb11;
    }

    /* - measurementTimingConfiguration */
    char *measurementTimingConfiguration = "0"; // sept. 2018
617
    OCTET_STRING_fromBuf(&served_cell_information->measurementTimingConfiguration,
618 619 620
                         measurementTimingConfiguration,
                         strlen(measurementTimingConfiguration));
    /* 2.1.2 gNB-DU System Information */
Laurent THOMAS's avatar
Laurent THOMAS committed
621
    asn1cCalloc(served_cells_to_add_item->gNB_DU_System_Information, gNB_DU_System_Information);
622 623 624 625 626 627
    OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message,  // sept. 2018
                         "1",
                         sizeof("1"));
    OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message,  // sept. 2018
                         "1",
                         sizeof("1"));
628 629 630 631
  }

  /* mandatory */
  /* c3. Served_Cells_To_Modify */
632 633 634 635
  asn1cSequenceAdd(out, F1AP_GNBDUConfigurationUpdateIEs_t, ie3);
  ie3->id                        = F1AP_ProtocolIE_ID_id_Served_Cells_To_Modify_List;
  ie3->criticality               = F1AP_Criticality_reject;
  ie3->value.present             = F1AP_GNBDUConfigurationUpdateIEs__value_PR_Served_Cells_To_Modify_List;
636

637
  for (int i=0; i<1; i++) {
638
    //
639
    cellIDs_t *cell=&f1ap_req(false, instance)->cell[i];
640
    asn1cSequenceAdd(ie3->value.choice.Served_Cells_To_Modify_List.list, F1AP_Served_Cells_To_Modify_ItemIEs_t, served_cells_to_modify_item_ies);
641 642 643
    served_cells_to_modify_item_ies->id            = F1AP_ProtocolIE_ID_id_Served_Cells_To_Modify_Item;
    served_cells_to_modify_item_ies->criticality   = F1AP_Criticality_reject;
    served_cells_to_modify_item_ies->value.present = F1AP_Served_Cells_To_Modify_ItemIEs__value_PR_Served_Cells_To_Modify_Item;
644
    F1AP_Served_Cells_To_Modify_Item_t *served_cells_to_modify_item=&served_cells_to_modify_item_ies->value.choice.Served_Cells_To_Modify_Item;
645
    /* 3.1 oldNRCGI */
646
    //addnRGCI(served_cells_to_modify_item->oldNRCGI, f1ap_setup_req->cell[i]);
647
    /* 3.2.1 serverd cell Information */
648
    F1AP_Served_Cell_Information_t *served_cell_information= &served_cells_to_modify_item->served_Cell_Information;
649
    /* - nRCGI */
650
    //addnRGCI(served_cell_information->nRCGI,f1ap_setup_req->cell[i]);
651
    /* - nRPCI */
652
    served_cell_information->nRPCI = f1ap_setup_req->cell[i].nr_pci;  // int 0..1007
653
    /* - fiveGS_TAC */
Laurent THOMAS's avatar
Laurent THOMAS committed
654
    asn1cCalloc(served_cell_information->fiveGS_TAC, tac );
655 656
    OCTET_STRING_fromBuf(tac,
                         (const char *) &f1ap_setup_req->cell[i].tac,
657 658 659 660
                         3);

    /* - Configured_EPS_TAC */
    if(1) {
Laurent THOMAS's avatar
Laurent THOMAS committed
661
      asn1cCalloc(served_cell_information->configured_EPS_TAC, tmp2);
662
      OCTET_STRING_fromBuf(tmp2,
663 664 665 666
                           "2",
                           2);
    }

667
    asn1cSequenceAdd(served_cell_information->servedPLMNs.list, F1AP_ServedPLMNs_Item_t, servedPLMN_item);
668
    MCC_MNC_TO_PLMNID(cell->mcc, cell->mnc, cell->mnc_digit_length, &servedPLMN_item->pLMN_Identity);
669
    // // /* - CHOICE NR-MODE-Info */
670
    F1AP_NR_Mode_Info_t *nR_Mode_Info= &served_cell_information->nR_Mode_Info;
671 672

    if (f1ap_setup_req->fdd_flag) {
673
      nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
674
      /* > FDD >> FDD Info */
Laurent THOMAS's avatar
Laurent THOMAS committed
675
      asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
676 677
      /* >>> UL NRFreqInfo */
      fDD_Info->uL_NRFreqInfo.nRARFCN = 999L;
678 679 680 681
      asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, ul_freqBandNrItem);
      ul_freqBandNrItem->freqBandIndicatorNr = 888L;
      asn1cSequenceAdd(ul_freqBandNrItem->supportedSULBandList.list, F1AP_SupportedSULFreqBandItem_t, ul_supportedSULFreqBandItem);
      ul_supportedSULFreqBandItem->freqBandIndicatorNr = 777L;
682 683
      /* >>> DL NRFreqInfo */
      fDD_Info->dL_NRFreqInfo.nRARFCN = 666L;
684 685
      asn1cSequenceAdd(dl_freqBandNrItem->supportedSULBandList.list, F1AP_FreqBandNrItem_t, dl_freqBandNrItem);
      dl_freqBandNrItem->freqBandIndicatorNr = 555L;
686 687 688 689 690 691 692 693 694 695
      F1AP_SupportedSULFreqBandItem_t dl_supportedSULFreqBandItem;
      memset((void *)&dl_supportedSULFreqBandItem, 0, sizeof(F1AP_SupportedSULFreqBandItem_t));
      dl_supportedSULFreqBandItem.freqBandIndicatorNr = 444L;
      /* >>> UL Transmission Bandwidth */
      fDD_Info->uL_Transmission_Bandwidth.nRSCS = F1AP_NRSCS_scs15;
      fDD_Info->uL_Transmission_Bandwidth.nRNRB = F1AP_NRNRB_nrb11;
      /* >>> DL Transmission Bandwidth */
      fDD_Info->dL_Transmission_Bandwidth.nRSCS = F1AP_NRSCS_scs15;
      fDD_Info->dL_Transmission_Bandwidth.nRNRB = F1AP_NRNRB_nrb11;
    } else { // TDD
696
      nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
697
      /* > TDD >> TDD Info */
Laurent THOMAS's avatar
Laurent THOMAS committed
698
      asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info);
699 700
      /* >>> ARFCN */
      tDD_Info->nRFreqInfo.nRARFCN = 999L; // Integer
701 702 703 704
      asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
      nr_freqBandNrItem->freqBandIndicatorNr = 555L;
      asn1cSequenceAdd(nr_freqBandNrItem->supportedSULBandList.list, F1AP_SupportedSULFreqBandItem_t, nr_supportedSULFreqBandItem);
      nr_supportedSULFreqBandItem->freqBandIndicatorNr = 444L;
705 706 707 708 709 710
      tDD_Info->transmission_Bandwidth.nRSCS= F1AP_NRSCS_scs15;
      tDD_Info->transmission_Bandwidth.nRNRB= F1AP_NRNRB_nrb11;
    }

    /* - measurementTimingConfiguration */
    char *measurementTimingConfiguration = "0"; // sept. 2018
711
    OCTET_STRING_fromBuf(&served_cell_information->measurementTimingConfiguration,
712 713 714
                         measurementTimingConfiguration,
                         strlen(measurementTimingConfiguration));
    /* 3.2.2 gNB-DU System Information */
Laurent THOMAS's avatar
Laurent THOMAS committed
715
    asn1cCalloc( served_cells_to_modify_item->gNB_DU_System_Information, gNB_DU_System_Information);
716 717 718 719 720 721
    OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message,  // sept. 2018
                         "1",
                         sizeof("1"));
    OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message,  // sept. 2018
                         "1",
                         sizeof("1"));
722 723 724 725
  }

  /* mandatory */
  /* c4. Served_Cells_To_Delete */
726 727 728 729
  asn1cSequenceAdd(out, F1AP_GNBDUConfigurationUpdateIEs_t, ie4);
  ie4->id                        = F1AP_ProtocolIE_ID_id_Served_Cells_To_Delete_List;
  ie4->criticality               = F1AP_Criticality_reject;
  ie4->value.present             = F1AP_GNBDUConfigurationUpdateIEs__value_PR_Served_Cells_To_Delete_List;
730

731
  for (int i=0; i<1; i++) {
732
    //
733
    asn1cSequenceAdd(ie4->value.choice.Served_Cells_To_Delete_List.list, F1AP_Served_Cells_To_Delete_ItemIEs_t, served_cells_to_delete_item_ies);
734 735 736
    served_cells_to_delete_item_ies->id            = F1AP_ProtocolIE_ID_id_Served_Cells_To_Delete_Item;
    served_cells_to_delete_item_ies->criticality   = F1AP_Criticality_reject;
    served_cells_to_delete_item_ies->value.present = F1AP_Served_Cells_To_Delete_ItemIEs__value_PR_Served_Cells_To_Delete_Item;
737
    F1AP_Served_Cells_To_Delete_Item_t *served_cells_to_delete_item=&served_cells_to_delete_item_ies->value.choice.Served_Cells_To_Delete_Item;
738
    /* 3.1 oldNRCGI */
739
    addnRCGI(served_cells_to_delete_item->oldNRCGI, &f1ap_setup_req->cell[i]);
740 741 742
  }

  if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
Xue Song's avatar
Xue Song committed
743
    LOG_E(F1AP, "Failed to encode F1 gNB-DU CONFIGURATION UPDATE\n");
744
    return -1;
745
  }
746

747
  ASN_STRUCT_RESET(asn_DEF_F1AP_F1AP_PDU, &pdu);
748
  return 0;
749 750
}

751
int DU_handle_gNB_DU_CONFIGURATION_FAILURE(instance_t instance,
752 753 754
    uint32_t assoc_id,
    uint32_t stream,
    F1AP_F1AP_PDU_t *pdu) {
755 756
  AssertFatal(1==0,"Not implemented yet\n");
}
Laurent THOMAS's avatar
Laurent THOMAS committed
757

758
int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
759 760 761
    uint32_t assoc_id,
    uint32_t stream,
    F1AP_F1AP_PDU_t *pdu) {
762 763
  AssertFatal(1==0,"Not implemented yet\n");
}
764

Laurent THOMAS's avatar
Laurent THOMAS committed
765 766

int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
767 768 769
    uint32_t assoc_id,
    uint32_t stream,
    F1AP_F1AP_PDU_t *pdu) {
770 771
  LOG_D(F1AP, "DU_handle_gNB_CU_CONFIGURATION_UPDATE\n");
  AssertFatal(pdu->present == F1AP_F1AP_PDU_PR_initiatingMessage,
772
              "pdu->present != F1AP_F1AP_PDU_PR_initiatingMessage\n");
773
  AssertFatal(pdu->choice.initiatingMessage->procedureCode  == F1AP_ProcedureCode_id_gNBCUConfigurationUpdate,
774
              "pdu->choice.initiatingMessage->procedureCode != F1AP_ProcedureCode_id_gNBCUConfigurationUpdate\n");
775
  AssertFatal(pdu->choice.initiatingMessage->criticality  == F1AP_Criticality_reject,
776
              "pdu->choice.initiatingMessage->criticality != F1AP_Criticality_reject\n");
777
  AssertFatal(pdu->choice.initiatingMessage->value.present  == F1AP_InitiatingMessage__value_PR_GNBCUConfigurationUpdate,
778
              "pdu->choice.initiatingMessage->value.present != F1AP_InitiatingMessage__value_PR_GNBCUConfigurationUpdate\n");
779 780 781 782 783 784 785 786
  F1AP_GNBCUConfigurationUpdate_t *in = &pdu->choice.initiatingMessage->value.choice.GNBCUConfigurationUpdate;
  F1AP_GNBCUConfigurationUpdateIEs_t *ie;
  int TransactionId = -1;
  int num_cells_to_activate = 0;
  F1AP_Cells_to_be_Activated_List_Item_t *cell;
  MessageDef *msg_p = itti_alloc_new_message (TASK_DU_F1, 0, F1AP_GNB_CU_CONFIGURATION_UPDATE);
  LOG_D(F1AP, "F1AP: gNB_CU_Configuration_Update: protocolIEs.list.count %d\n",
        in->protocolIEs.list.count);
787 788

  for (int i=0; i < in->protocolIEs.list.count; i++) {
789
    ie = in->protocolIEs.list.array[i];
790

791 792 793
    switch (ie->id) {
      case F1AP_ProtocolIE_ID_id_TransactionID:
        AssertFatal(ie->criticality == F1AP_Criticality_reject,
794
                    "ie->criticality != F1AP_Criticality_reject\n");
795
        AssertFatal(ie->value.present == F1AP_GNBCUConfigurationUpdateIEs__value_PR_TransactionID,
796
                    "ie->value.present != F1AP_GNBCUConfigurationUpdateIEs__value_PR_TransactionID\n");
797 798 799 800
        TransactionId=ie->value.choice.TransactionID;
        LOG_D(F1AP, "F1AP: GNB-CU-ConfigurationUpdate: TransactionId %d\n",
              TransactionId);
        break;
801 802

      case F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List: {
803
        AssertFatal(ie->criticality == F1AP_Criticality_reject,
804
                    "ie->criticality != F1AP_Criticality_reject\n");
805
        AssertFatal(ie->value.present == F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Activated_List,
806
                    "ie->value.present != F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Activated_List\n");
807 808 809
        num_cells_to_activate = ie->value.choice.Cells_to_be_Activated_List.list.count;
        LOG_D(F1AP, "F1AP: Activating %d cells\n",num_cells_to_activate);

810
        for (int i=0; i<num_cells_to_activate; i++) {
811 812
          F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *) ie->value.choice.Cells_to_be_Activated_List.list.array[i];
          AssertFatal(cells_to_be_activated_list_item_ies->id == F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item,
813
                      "cells_to_be_activated_list_item_ies->id != F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item");
814
          AssertFatal(cells_to_be_activated_list_item_ies->criticality == F1AP_Criticality_reject,
815
                      "cells_to_be_activated_list_item_ies->criticality == F1AP_Criticality_reject");
816
          AssertFatal(cells_to_be_activated_list_item_ies->value.present == F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item,
817
                      "cells_to_be_activated_list_item_ies->value.present == F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item");
818
          cell = &cells_to_be_activated_list_item_ies->value.choice.Cells_to_be_Activated_List_Item;
819 820
          TBCD_TO_MCC_MNC(&cell->nRCGI.pLMN_Identity, F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].mcc, F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].mnc,
                          F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].mnc_digit_length);
821 822 823 824 825 826 827
          LOG_D(F1AP, "nr_cellId : %x %x %x %x %x\n",
                cell->nRCGI.nRCellIdentity.buf[0],
                cell->nRCGI.nRCellIdentity.buf[1],
                cell->nRCGI.nRCellIdentity.buf[2],
                cell->nRCGI.nRCellIdentity.buf[3],
                cell->nRCGI.nRCellIdentity.buf[4]);
          BIT_STRING_TO_NR_CELL_IDENTITY(&cell->nRCGI.nRCellIdentity,
828 829
                                         F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].nr_cellid);
          F1AP_ProtocolExtensionContainer_154P112_t *ext = (F1AP_ProtocolExtensionContainer_154P112_t *)cell->iE_Extensions;
830

831 832 833 834
          if (ext==NULL)
            continue;

          for (int cnt=0; cnt<ext->list.count; cnt++) {
835
            F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs=(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)ext->list.array[cnt];
836

837
            switch (cells_to_be_activated_list_itemExtIEs->id) {
838 839 840 841 842 843 844 845 846
              /*
                            case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_NOTHING:
                            case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation,
                            case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_AvailablePLMNList,
                            case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_ExtendedAvailablePLMN_List,
                            case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_IAB_Info_IAB_donor_CU,
                            case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_AvailableSNPN_ID_List
              */
              case F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation: {
847
                F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].nrpci = (cell->nRPCI != NULL) ? *cell->nRPCI : 0;
848
                F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)&cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation;
849 850
                F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].num_SI = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;
                AssertFatal(ext->list.count==1,"At least one SI message should be there, and only 1 for now!\n");
851
                LOG_D(F1AP, "F1AP: Cell %d MCC %d MNC %d NRCellid %lx num_si %d\n",
852 853
                      i, F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].mcc, F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].mnc,
                      F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].nr_cellid, F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].num_SI);
854 855

                for (int si = 0; si < gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count; si++) {
856 857 858
                  F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si];
                  size_t size = sib_item->sIBmessage.size;
                  F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[si] = size;
Laurent THOMAS's avatar
Laurent THOMAS committed
859
                  LOG_D(F1AP, "F1AP: SI_container_length[%d][%ld] %ld bytes\n", i, sib_item->sIBtype, size);
860
                  F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[si] = malloc(F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[si]);
861 862 863
                  memcpy((void *)F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[si],
                         (void *)sib_item->sIBmessage.buf,
                         size);
Laurent Thomas's avatar
Laurent Thomas committed
864
                  F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_type[si]=sib_item->sIBtype;
865
                }
866

867 868
                break;
              }
869

870 871 872
              case F1AP_ProtocolIE_ID_id_AvailablePLMNList:
                AssertFatal(1==0,"F1AP_ProtocolIE_ID_id_AvailablePLMNList not supported yet\n");
                break;
873

874 875 876
              case F1AP_ProtocolIE_ID_id_ExtendedAvailablePLMN_List:
                AssertFatal(1==0,"F1AP_ProtocolIE_ID_id_AvailablePLMNList not supported yet\n");
                break;
877

878 879 880
              case F1AP_ProtocolIE_ID_id_IAB_Info_IAB_donor_CU:
                AssertFatal(1==0,"F1AP_ProtocolIE_ID_id_AvailablePLMNList not supported yet\n");
                break;
881

882 883 884
              case F1AP_ProtocolIE_ID_id_AvailableSNPN_ID_List:
                AssertFatal(1==0,"F1AP_ProtocolIE_ID_id_AvailablePLMNList not supported yet\n");
                break;
885

886 887 888 889 890 891
              default:
                AssertFatal(1==0,"F1AP_ProtocolIE_ID_id %d unknown\n",(int)cells_to_be_activated_list_itemExtIEs->id);
                break;
            }
          } // for (cnt=...
        } // for (cells_to_activate...
892

893 894 895 896 897 898 899 900
        break;
      } // case F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List

      default:
        AssertFatal(1==0,"F1AP_ProtocolIE_ID_id %d unknown\n", (int)ie->id);
        break;
    } // switch ie
  } // for IE
901

902 903 904
  AssertFatal(TransactionId!=-1,"TransactionId was not sent\n");
  LOG_D(F1AP,"F1AP: num_cells_to_activate %d\n",num_cells_to_activate);
  F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).num_cells_to_activate = num_cells_to_activate;
905 906
  LOG_D(F1AP, "Sending F1AP_GNB_CU_CONFIGURATION_UPDATE ITTI message \n");
  itti_send_msg_to_task(TASK_F1APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
907
  return 0;
908 909
}

910
int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
911
    f1ap_gnb_cu_configuration_update_failure_t *GNBCUConfigurationUpdateFailure) {
912
  AssertFatal(1==0,"received gNB CU CONFIGURATION UPDATE FAILURE with cause %d\n",
913
              GNBCUConfigurationUpdateFailure->cause);
914
}
Laurent THOMAS's avatar
Laurent THOMAS committed
915

916
int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
917
    f1ap_gnb_cu_configuration_update_acknowledge_t *GNBCUConfigurationUpdateAcknowledge) {
918
  AssertFatal(GNBCUConfigurationUpdateAcknowledge->num_cells_failed_to_be_activated == 0,
919 920
              "%d cells failed to activate\n",
              GNBCUConfigurationUpdateAcknowledge->num_cells_failed_to_be_activated);
921
  AssertFatal(GNBCUConfigurationUpdateAcknowledge->noofTNLAssociations_to_setup == 0,
922 923
              "%d TNLAssociations to setup, handle this ...\n",
              GNBCUConfigurationUpdateAcknowledge->noofTNLAssociations_to_setup);
924
  AssertFatal(GNBCUConfigurationUpdateAcknowledge->noofTNLAssociations_failed == 0,
925 926
              "%d TNLAssociations failed\n",
              GNBCUConfigurationUpdateAcknowledge->noofTNLAssociations_failed);
927
  AssertFatal(GNBCUConfigurationUpdateAcknowledge->noofDedicatedSIDeliveryNeededUEs == 0,
928 929
              "%d DedicatedSIDeliveryNeededUEs\n",
              GNBCUConfigurationUpdateAcknowledge->noofDedicatedSIDeliveryNeededUEs);
930 931 932
  F1AP_F1AP_PDU_t           pdu= {0};
  uint8_t  *buffer=NULL;
  uint32_t  len=0;
933 934 935
  /* Create */
  /* 0. pdu Type */
  pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
Laurent THOMAS's avatar
Laurent THOMAS committed
936
  asn1cCalloc(pdu.choice.successfulOutcome, tmp);
937 938 939 940
  tmp->procedureCode = F1AP_ProcedureCode_id_gNBCUConfigurationUpdate;
  tmp->criticality   = F1AP_Criticality_reject;
  tmp->value.present = F1AP_SuccessfulOutcome__value_PR_GNBCUConfigurationUpdateAcknowledge;
  F1AP_GNBCUConfigurationUpdateAcknowledge_t *out = &tmp->value.choice.GNBCUConfigurationUpdateAcknowledge;
941 942
  /* mandatory */
  /* c1. Transaction ID (integer value)*/
943
  asn1cSequenceAdd(out->protocolIEs.list, F1AP_GNBCUConfigurationUpdateAcknowledgeIEs_t, ie);
944 945 946 947 948 949 950 951 952 953 954
  ie->id                        = F1AP_ProtocolIE_ID_id_TransactionID;
  ie->criticality               = F1AP_Criticality_reject;
  ie->value.present             = F1AP_GNBCUConfigurationUpdateAcknowledgeIEs__value_PR_TransactionID;
  ie->value.choice.TransactionID = F1AP_get_next_transaction_identifier(0, 0);

  /* encode */
  if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
    LOG_E(F1AP, "Failed to encode GNB-DU-Configuration-Update-Acknowledge\n");
    return -1;
  }

955
  ASN_STRUCT_RESET(asn_DEF_F1AP_F1AP_PDU, &pdu);
956
  f1ap_itti_send_sctp_data_req(false, instance, buffer, len, 0);
957
  return 0;
958
}
Laurent THOMAS's avatar
Laurent THOMAS committed
959 960


961
int DU_send_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance,
962
    F1AP_GNBDUResourceCoordinationRequest_t *GNBDUResourceCoordinationRequest) {
963 964
  AssertFatal(0, "Not implemented yet\n");
}
Laurent THOMAS's avatar
Laurent THOMAS committed
965

966
int DU_handle_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance,
967 968 969
    uint32_t assoc_id,
    uint32_t stream,
    F1AP_F1AP_PDU_t *pdu) {
970 971
  AssertFatal(0, "Not implemented yet\n");
}