[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-414] Support at CU and RIC stub for SCTP...
[o-du/l2.git] / src / cu_stub / cu_f1ap_msg_hdl.c
index 2174601..2317466 100644 (file)
 /* This file contains F1AP message handler functions */
 #include "common_def.h"
 #include "OCTET_STRING.h"
-#include "BIT_STRING.h"
-#include "odu_common_codec.h"
 #include "cu_stub_sctp.h"
+#include "cu_stub_egtp.h"
 #include "cu_f1ap_msg_hdl.h"
-#include "legtp.h"
-/*header files needed for Ue Context Setup */
-#include<ProtocolIE-Field.h>
+#include "cu_stub.h"
+
+#include "BIT_STRING.h"
+#include "odu_common_codec.h"
+#include "ProtocolIE-Field.h"
 #include "ProtocolExtensionField.h"
 #include "ProtocolIE-SingleContainer.h"
 #include "F1AP-PDU.h"
 #include "UPTransportLayerInformation.h"
 #include "GTPTunnel.h"
 #include "QoSInformation.h"
+#include "Cells-to-be-Activated-List.h"
+#include "DL-CCCH-Message.h"
+#include "SRB-ToAddModList.h"
+#include "SRB-ToAddMod.h"
+#include "RRCSetup-IEs.h"
+#include "RRCSetup.h"
+#include "DL-DCCH-Message.h"
+#include "RRCReconfiguration-IEs.h"
+#include "RRCReconfiguration.h"
+#include "DRB-ToAddModList.h"
+#include "DRB-ToAddMod.h"
+#include "SDAP-Config.h"
 
 /* MACRO for CUtoDURRCInformation */
 #define CELL_GRP_ID 1
@@ -1894,7 +1907,7 @@ uint8_t BuildNrcgi(NRCGI_t *nrcgi)
    uint8_t ret;
    uint8_t unused_bits = 4;
    uint8_t byteSize = 5;
-   uint8_t val = 1;
+   uint8_t val = 16;
    /* Allocate Buffer Memory */
    nrcgi->pLMN_Identity.size = 3 * sizeof(uint8_t);
    CU_ALLOC(nrcgi->pLMN_Identity.buf, nrcgi->pLMN_Identity.size);
@@ -1914,16 +1927,7 @@ uint8_t BuildNrcgi(NRCGI_t *nrcgi)
    {
       return RFAILED;
    }
-#if 0
-   ret = fillBitString(&nrcgi->nRCellIdentity, unused, byteSize, val);
-   if(ret != ROK)
-   {
-      return RFAILED;
-   }
-#endif
-   memset(nrcgi->nRCellIdentity.buf, 0, nrcgi->nRCellIdentity.size);
-   nrcgi->nRCellIdentity.buf[0] |= val;
-   nrcgi->nRCellIdentity.bits_unused = unused_bits;
+   fillBitString(&nrcgi->nRCellIdentity, unused_bits, byteSize, val);
 
    return ROK;
 }
@@ -8577,6 +8581,9 @@ uint8_t procGnbDuUpdate(F1AP_PDU_t *f1apMsg)
       DU_LOG("ERROR  -->  F1AP : Failed to build and send DUUpdateAck");  
       return RFAILED;
    }
+#if 0
+   /* We don't require F1 Reset message in Cell Up and Broadcast Procedure flow, So that's why
+    * commented this trigger for now */
 
    if(cellToBeDelete == false)
    {
@@ -8587,7 +8594,8 @@ uint8_t procGnbDuUpdate(F1AP_PDU_t *f1apMsg)
          return RFAILED;
       }
    }
-   else
+#endif
+   if(cellToBeDelete == true) 
    {
       for(ueIdx = 0; ueIdx < MAX_NUM_UE; ueIdx++)
       {