#include "du_mgr.h"
#include "du_cell_mgr.h"
#include "du_f1ap_msg_hdl.h"
+#include "DRBs-Setup-Item.h"
+#include "DLUPTNLInformation-ToBeSetup-List.h"
+#include "DLUPTNLInformation-ToBeSetup-Item.h"
+#include "UPTransportLayerInformation.h"
+#include "GTPTunnel.h"
+
+#ifdef O1_ENABLE
+
+#include "Config.h"
+extern StartupConfig g_cfg;
+
+#endif
DuCfgParams duCfgParam;
+/************************************************************************
+ *
+ * @brief Converts enum values into actual value of Poll retransmit timer
+ *
+ * @details
+ *
+ * Function : getPollPdu
+ *
+ * Functionality: Converts enum values into actual value of poll
+ * retransmit timer
+ *
+ * @params[in] Enum value of pollPdu
+ * @return Actual value of pollPdu
+ *
+ * **********************************************************************/
+
+uint16_t getPollRetxTmr(uint8_t pollRetxTmrCfg)
+{
+ uint16_t pollRetxTmr;
+
+ /* All values of poll retx timer are at interval of 5ms.
+ * This is valid upto 250ms
+ * Hence converting the enum value to actual value by multiplying it to 5
+ */
+ if(pollRetxTmrCfg <= T_PollRetransmit_ms250)
+ pollRetxTmr = (pollRetxTmrCfg + 1) * 5;
+ else
+ {
+ switch(pollRetxTmrCfg)
+ {
+ case T_PollRetransmit_ms300:
+ pollRetxTmr = 300;
+ break;
+ case T_PollRetransmit_ms350:
+ pollRetxTmr = 350;
+ break;
+ case T_PollRetransmit_ms400:
+ pollRetxTmr = 400;
+ break;
+ case T_PollRetransmit_ms450:
+ pollRetxTmr = 450;
+ break;
+ case T_PollRetransmit_ms500:
+ pollRetxTmr = 500;
+ break;
+ case T_PollRetransmit_ms800:
+ pollRetxTmr = 800;
+ break;
+ default:
+ DU_LOG("\nERROR --> F1AP: Invalid value of Poll Retransmit timer");
+ pollRetxTmr = 0;
+ }
+ }
+ return pollRetxTmr;
+}
+
+/*******************************************************************
+ *
+ * @brief Converts enum values into actual value of PollPdu
+ *
+ * @details
+ *
+ * Function : getPollPdu
+ *
+ * Functionality: Converts enum values into actual value of PollPdu
+ *
+ * @params[in] Enum value of pollPdu
+ * @return Actual value of pollPdu
+ *
+ * ****************************************************************/
+int32_t getPollPdu(uint8_t pollPduCfg)
+{
+ int32_t pollPdu;
+ switch(pollPduCfg)
+ {
+ case PollPDU_p4:
+ pollPdu = 4;
+ break;
+ case PollPDU_p8:
+ pollPdu = 8;
+ break;
+ case PollPDU_p16:
+ pollPdu = 16;
+ break;
+ case PollPDU_p32:
+ pollPdu = 32;
+ break;
+ case PollPDU_p64:
+ pollPdu = 64;
+ break;
+ case PollPDU_p128:
+ pollPdu = 128;
+ break;
+ case PollPDU_p256:
+ pollPdu = 256;
+ break;
+ case PollPDU_p512:
+ pollPdu = 512;
+ break;
+ case PollPDU_p1024:
+ pollPdu = 1024;
+ break;
+ case PollPDU_p2048:
+ pollPdu = 2048;
+ break;
+ case PollPDU_p4096:
+ pollPdu = 4096;
+ break;
+ case PollPDU_p6144:
+ pollPdu = 6144;
+ break;
+ case PollPDU_p8192:
+ pollPdu = 8192;
+ break;
+ case PollPDU_p12288:
+ pollPdu = 12288;
+ break;
+ case PollPDU_p16384:
+ pollPdu = 16384;
+ break;
+ case PollPDU_p20480:
+ pollPdu = 20480;
+ break;
+ case PollPDU_p24576:
+ pollPdu = 24576;
+ break;
+ case PollPDU_p28672:
+ pollPdu = 28672;
+ break;
+ case PollPDU_p32768:
+ pollPdu = 32768;
+ break;
+ case PollPDU_p40960:
+ pollPdu = 40960;
+ break;
+ case PollPDU_p49152:
+ pollPdu = 49152;
+ break;
+ case PollPDU_p57344:
+ pollPdu = 57344;
+ break;
+ case PollPDU_p65536:
+ pollPdu = 65536;
+ break;
+ case PollPDU_infinity:
+ pollPdu = -1;
+ break;
+ default:
+ DU_LOG("\nERROR --> F1AP: Invalid value of poll pdu");
+ pollPdu = 0;
+ break;
+ }
+ return pollPdu;
+}
+
+/*******************************************************************
+ *
+ * @brief Converts enum values into actual value of poll bytes
+ *
+ * @details
+ *
+ * Function : getPollByte
+ *
+ * Functionality: Converts enum values into actual value of pollBytes
+ *
+ * @params[in] Enum value
+ * @return Actual value
+ *
+ * ****************************************************************/
+int32_t getPollByte(uint16_t pollBytesCfg)
+{
+ int32_t pollBytes;
+ switch(pollBytesCfg)
+ {
+ case PollByte_kB1:
+ pollBytes = 1000;
+ break;
+ case PollByte_kB2:
+ pollBytes = 2000;
+ break;
+ case PollByte_kB5:
+ pollBytes = 5000;
+ break;
+ case PollByte_kB8:
+ pollBytes = 8000;
+ break;
+ case PollByte_kB10:
+ pollBytes = 10000;
+ break;
+ case PollByte_kB15:
+ pollBytes = 15000;
+ break;
+ case PollByte_kB25:
+ pollBytes = 25000;
+ break;
+ case PollByte_kB50:
+ pollBytes = 50000;
+ break;
+ case PollByte_kB75:
+ pollBytes = 75000;
+ break;
+ case PollByte_kB100:
+ pollBytes = 100000;
+ break;
+ case PollByte_kB125:
+ pollBytes = 125000;
+ break;
+ case PollByte_kB250:
+ pollBytes = 250000;
+ break;
+ case PollByte_kB375:
+ pollBytes = 375000;
+ break;
+ case PollByte_kB500:
+ pollBytes = 500000;
+ break;
+ case PollByte_kB750:
+ pollBytes = 750000;
+ break;
+ case PollByte_kB1000:
+ pollBytes = 1000000;
+ break;
+ case PollByte_kB1250:
+ pollBytes = 1250000;
+ break;
+ case PollByte_kB1500:
+ pollBytes = 1500000;
+ break;
+ case PollByte_kB2000:
+ pollBytes = 2000000;
+ break;
+ case PollByte_kB3000:
+ pollBytes = 3000000;
+ break;
+ case PollByte_kB4000:
+ pollBytes = 4000000;
+ break;
+ case PollByte_kB4500:
+ pollBytes = 4500000;
+ break;
+ case PollByte_kB5000:
+ pollBytes = 5000000;
+ break;
+ case PollByte_kB5500:
+ pollBytes = 5500000;
+ break;
+ case PollByte_kB6000:
+ pollBytes = 6000000;
+ break;
+ case PollByte_kB6500:
+ pollBytes = 6500000;
+ break;
+ case PollByte_kB7000:
+ pollBytes = 7000000;
+ break;
+ case PollByte_kB7500:
+ pollBytes = 7500000;
+ break;
+ case PollByte_mB8:
+ pollBytes = 8000000;
+ break;
+ case PollByte_mB9:
+ pollBytes = 9000000;
+ break;
+ case PollByte_mB10:
+ pollBytes = 10000000;
+ break;
+ case PollByte_mB11:
+ pollBytes = 11000000;
+ break;
+ case PollByte_mB12:
+ pollBytes = 12000000;
+ break;
+ case PollByte_mB13:
+ pollBytes = 13000000;
+ break;
+ case PollByte_mB14:
+ pollBytes = 14000000;
+ break;
+ case PollByte_mB15:
+ pollBytes = 15000000;
+ break;
+ case PollByte_mB16:
+ pollBytes = 16000000;
+ break;
+ case PollByte_mB17:
+ pollBytes = 17000000;
+ break;
+ case PollByte_mB18:
+ pollBytes = 18000000;
+ break;
+ case PollByte_mB20:
+ pollBytes = 20000000;
+ break;
+ case PollByte_mB25:
+ pollBytes = 25000000;
+ break;
+ case PollByte_mB30:
+ pollBytes = 30000000;
+ break;
+ case PollByte_mB40:
+ pollBytes = 40000000;
+ break;
+ case PollByte_infinity:
+ pollBytes = -1;
+ break;
+ default:
+ DU_LOG("\nERROR --> F1AP: Invalid value of poll bytes");
+ pollBytes = 0;
+ }
+ return pollBytes;
+}
+
+/*******************************************************************
+ *
+ * @brief Converts enum values into actual value of maxRetx
+ *
+ * @details
+ *
+ * Function : getMaxRetx
+ *
+ * Functionality: Converts enum values into actual value of maxRetx
+ *
+ * @params[in] Enum value
+ * @return Actual value
+ *
+ * ****************************************************************/
+uint8_t getMaxRetx(uint8_t maxRetxCfg)
+{
+ uint8_t maxRetx;
+ switch(maxRetxCfg)
+ {
+ case UL_AM_RLC__maxRetxThreshold_t1:
+ maxRetx = 1;
+ break;
+ case UL_AM_RLC__maxRetxThreshold_t2:
+ maxRetx = 2;
+ break;
+ case UL_AM_RLC__maxRetxThreshold_t3:
+ maxRetx = 3;
+ break;
+ case UL_AM_RLC__maxRetxThreshold_t4:
+ maxRetx = 4;
+ break;
+ case UL_AM_RLC__maxRetxThreshold_t6:
+ maxRetx = 6;
+ break;
+ case UL_AM_RLC__maxRetxThreshold_t8:
+ maxRetx = 8;
+ break;
+ case UL_AM_RLC__maxRetxThreshold_t16:
+ maxRetx = 16;
+ break;
+ case UL_AM_RLC__maxRetxThreshold_t32:
+ maxRetx = 32;
+ break;
+ default:
+ DU_LOG("\nERROR --> F1AP: Invalid configuration for Max retransmission threshold");
+ maxRetx = 0;
+ }
+ return maxRetx;
+}
+
+/*******************************************************************
+ * @brief Converts enum values into actual value of reassembly timer
+ *
+ * @details
+ *
+ * Function : getReAsmblTmr
+ *
+ * Functionality: Converts enum values into actual value of reassembly
+ * timer
+ *
+ * @params[in] Enum value of reassembly timer
+ * @return Actual value of reassembly timer
+ *
+ * **********************************************************************/
+
+int8_t getReAsmblTmr(uint8_t reAsmblTmrCfg)
+{
+ int8_t reAsmblTmr = 0;
+
+ if(reAsmblTmrCfg == T_Reassembly_ms0)
+ {
+ reAsmblTmr = 0;
+ }
+ else if(reAsmblTmrCfg >= T_Reassembly_ms5 || reAsmblTmrCfg <= T_Reassembly_ms100)
+ {
+ /* All values of re assembly timer are at interval of 5ms.
+ * This is valid upto 100ms
+ * Hence converting the enum value to actual value by multiplying it to 5
+ */
+ reAsmblTmr = reAsmblTmrCfg * 5;
+ }
+ else if(reAsmblTmrCfg >= T_Reassembly_ms110 || reAsmblTmrCfg <= T_Reassembly_ms200)
+ {
+ /* All values of re assembly timer are at interval of 10ms.
+ * This is valid upto 200ms
+ * since enum value starts from 20 for 100ms, subtracting 10 and
+ * converting the enum value to actual value by multiplying it to 10
+ */
+ reAsmblTmr = ((reAsmblTmrCfg-10) * 10);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> F1AP : Invalid value of Re Assembly timer %d", reAsmblTmrCfg);
+ reAsmblTmr = -1;
+ }
+ return reAsmblTmr;
+}
+
+/************************************************************************
+ *
+ * @brief Converts enum values into actual value of status prohibit timer
+ *
+ * @details
+ *
+ * Function : getStatProhTmr
+ *
+ * Functionality: Converts enum values into actual value of status prohibit
+ * timer
+ *
+ * @params[in] Enum value of status prohibit timer
+ * @return Actual value of status prohibit timer
+ *
+ * **********************************************************************/
+
+int16_t getStatProhTmr(uint8_t statProhTmrCfg)
+{
+ int16_t statProhTmr =0;
+
+ if(statProhTmrCfg == T_StatusProhibit_ms0)
+ {
+ statProhTmr = 0;
+ }
+ else if(statProhTmrCfg >= T_StatusProhibit_ms5 || statProhTmrCfg <= T_StatusProhibit_ms250)
+ {
+ /* All values of re assembly timer are at interval of 5ms.
+ * This is valid upto 250ms
+ * Hence converting the enum value to actual value by multiplying it to 5
+ */
+ statProhTmr = statProhTmrCfg * 5;
+ }
+ else
+ {
+ switch(statProhTmrCfg)
+ {
+ case T_StatusProhibit_ms300:
+ statProhTmr = 300;
+ break;
+ case T_StatusProhibit_ms350:
+ statProhTmr = 350;
+ break;
+ case T_StatusProhibit_ms400:
+ statProhTmr = 400;
+ break;
+ case T_StatusProhibit_ms450:
+ statProhTmr = 450;
+ break;
+ case T_StatusProhibit_ms500:
+ statProhTmr = 500;
+ break;
+ case T_StatusProhibit_ms800:
+ statProhTmr = 800;
+ break;
+ case T_StatusProhibit_ms1000:
+ statProhTmr = 1000;
+ break;
+ case T_StatusProhibit_ms1200:
+ statProhTmr = 1200;
+ break;
+ case T_StatusProhibit_ms1600:
+ statProhTmr = 1600;
+ break;
+ case T_StatusProhibit_ms2000:
+ statProhTmr = 2000;
+ break;
+ case T_StatusProhibit_ms2400:
+ statProhTmr = 2400;
+ break;
+ default:
+ DU_LOG("\nInvalid value of Status Prohibit timer %d", statProhTmrCfg);
+ statProhTmr = -1;
+ break;
+ }
+ }
+ return statProhTmr;
+}
/*******************************************************************
*
return RFAILED;
}
/* MIB */
- srvCellItem->gNB_DU_System_Information->mIB_message.size =\
- strlen(( char *)duCfgParam.srvdCellLst[0].duSysInfo.mibMsg);
+ srvCellItem->gNB_DU_System_Information->mIB_message.size = duCfgParam.srvdCellLst[0].duSysInfo.mibLen;
DU_ALLOC(srvCellItem->gNB_DU_System_Information->mIB_message.buf,
srvCellItem->gNB_DU_System_Information->mIB_message.size);
if(!srvCellItem->gNB_DU_System_Information->mIB_message.buf)
{
return RFAILED;
}
- strcpy((char *)srvCellItem->gNB_DU_System_Information->mIB_message.buf,
- (char *)duCfgParam.srvdCellLst[0].duSysInfo.mibMsg);
+ memcpy(srvCellItem->gNB_DU_System_Information->mIB_message.buf, duCfgParam.srvdCellLst[0].duSysInfo.mibMsg, \
+ srvCellItem->gNB_DU_System_Information->mIB_message.size);
/* SIB1 */
srvCellItem->gNB_DU_System_Information->sIB1_message.size =\
*
* @details
*
- * Function : SendF1APMsg
+ * Function : sendF1APMsg
*
* Functionality: Sends F1 msg over SCTP
*
* RFAILED - failure
*
* ****************************************************************/
-uint8_t SendF1APMsg(Region region, Pool pool)
+uint8_t sendF1APMsg()
{
Buffer *mBuf = NULLP;
- if(ODU_GET_MSG_BUF(region, pool, &mBuf) == ROK)
+ if(ODU_GET_MSG_BUF(DU_APP_MEM_REGION, DU_POOL, &mBuf) == ROK)
{
if(ODU_ADD_POST_MSG_MULT((Data *)encBuf, encBufSize, mBuf) == ROK)
{
if(sctpSend(mBuf, F1_INTERFACE) != ROK)
{
- DU_LOG("\nF1AP : SCTP Send failed");
+ DU_LOG("\nERROR --> F1AP : SCTP Send failed");
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
}
else
{
- DU_LOG("\nF1AP : ODU_ADD_POST_MSG_MULT failed");
+ DU_LOG("\nERROR --> F1AP : ODU_ADD_POST_MSG_MULT failed");
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
}
else
{
- DU_LOG("\nF1AP : Failed to allocate memory");
+ DU_LOG("\nERROR --> F1AP : Failed to allocate memory");
return RFAILED;
}
return ROK;
-} /* SendF1APMsg */
+} /* sendF1APMsg */
/*******************************************************************
*
FreeRrcVer(&f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.RRC_Version);
break;
default:
- DU_LOG("\nInvalid Event Type %ld", f1SetupReq->protocolIEs.list.array[ieIdx]->id);
+ DU_LOG("\nERROR --> Invalid Event Type %ld", f1SetupReq->protocolIEs.list.array[ieIdx]->id);
break;
}
}
asn_enc_rval_t encRetVal; /* Encoder return value */
ret= RFAILED;
- DU_LOG("\nF1AP : Building F1 Setup Request\n");
+ DU_LOG("\nINFO --> F1AP : Building F1 Setup Request\n");
do
{
DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nF1AP : Could not encode F1SetupRequest structure (at %s)\n",\
+ DU_LOG("\nERROR --> F1AP : Could not encode F1SetupRequest structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\nF1AP : Created APER encoded buffer for F1SetupRequest\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for F1SetupRequest\n");
for(ieIdx=0; ieIdx< encBufSize; ieIdx++)
{
printf("%x",encBuf[ieIdx]);
}
/* Sending msg */
- if(SendF1APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK)
+ if(sendF1APMsg() != ROK)
{
- DU_LOG("\nF1AP : Sending F1 Setup request failed");
+ DU_LOG("\nERROR --> F1AP : Sending F1 Setup request failed");
break;
}
while(true)
{
- DU_LOG("\nF1AP : Building DU config update\n");
+ DU_LOG("\nINFO --> F1AP : Building DU config update\n");
/* Allocate the memory for F1DuCfg */
DU_ALLOC(f1apDuCfg, sizeof(F1AP_PDU_t));
if(f1apDuCfg == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
DU_ALLOC(f1apDuCfg->choice.initiatingMessage,sizeof(InitiatingMessage_t));
if(f1apDuCfg->choice.initiatingMessage == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
DU_ALLOC(duCfgUpdate->protocolIEs.list.array,duCfgUpdate->protocolIEs.list.size);
if(duCfgUpdate->protocolIEs.list.array == NULLP)
{
- DU_LOG("F1AP : Memory allocation for F1RequestIEs failed");
+ DU_LOG("ERROR --> F1AP : Memory allocation for F1RequestIEs failed");
break;
}
for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
/* Checking encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("F1AP : Could not encode DUConfigUpdate structure (at %s)\n",encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
+ DU_LOG("ERROR --> F1AP : Could not encode DUConfigUpdate structure (at %s)\n",\
+ encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\nF1AP : Created APER encoded buffer for DUConfigUpdate\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for DUConfigUpdate\n");
for(ieIdx =0; ieIdx < encBufSize; ieIdx++)
{
printf("%x",encBuf[ieIdx]);
}
}
/* Sending msg */
- if(SendF1APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK)
+ if(sendF1APMsg() != ROK)
{
- DU_LOG("\nF1AP : Sending GND-DU Config Update failed");
+ DU_LOG("\nERROR --> F1AP : Sending GNB-DU Config Update failed");
break;
}
while(true)
{
- DU_LOG("\n F1AP : Building UL RRC Message Transfer Message\n");
+ DU_LOG("\n INFO --> F1AP : Building UL RRC Message Transfer Message\n");
DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
if(f1apMsg == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
f1apMsg->present = F1AP_PDU_PR_initiatingMessage;
DU_ALLOC(f1apMsg->choice.initiatingMessage,sizeof(InitiatingMessage_t));
if(f1apMsg->choice.initiatingMessage == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
f1apMsg->choice.initiatingMessage->procedureCode = ProcedureCode_id_ULRRCMessageTransfer;
DU_ALLOC(ulRRCMsg->protocolIEs.list.array, ulRRCMsg->protocolIEs.list.size);
if(ulRRCMsg->protocolIEs.list.array == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for UL RRC MessageTransferIEs failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for UL RRC MessageTransferIEs failed");
break;
}
for(idx=0; idx<elementCnt; idx++)
ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.RRCContainer.size)
if(!ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.RRCContainer.buf)
{
- DU_LOG(" F1AP : Memory allocation for BuildAndSendULRRCMessageTransfer failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for BuildAndSendULRRCMessageTransfer failed");
break;
}
memset(ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.RRCContainer.buf, 0, msgLen);
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG( "\n F1AP : Could not encode ULRRCMessageTransfer structure (at %s)\n",\
+ DU_LOG( "\nERROR --> F1AP : Could not encode ULRRCMessageTransfer structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\n F1AP : Created APER encoded buffer for ULRRCMessageTransfer\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for ULRRCMessageTransfer\n");
for(int i=0; i< encBufSize; i++)
{
printf("%x",encBuf[i]);
}
/* Sending msg */
- if(SendF1APMsg(DU_APP_MEM_REGION,DU_POOL) != ROK)
+ if(sendF1APMsg() != ROK)
{
- DU_LOG("\n F1AP : Sending UL RRC Message Transfer Failed");
+ DU_LOG("\nERROR --> F1AP : Sending UL RRC Message Transfer Failed");
break;
}
ret = ROK;
DU_ALLOC(tagConfig->tag_ToAddModList, sizeof(struct TAG_Config__tag_ToAddModList));
if(!tagConfig->tag_ToAddModList)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildTagConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildTagConfig");
return RFAILED;
}
DU_ALLOC(tagList->list.array, tagList->list.size);
if(!tagList->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildTagConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildTagConfig");
return RFAILED;
}
DU_ALLOC(tagList->list.array[idx], sizeof(struct TAG));
if(!tagList->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildTagConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildTagConfig");
return RFAILED;
}
}
DU_ALLOC(phrConfig->choice.setup, sizeof(struct PHR_Config));
if(!phrConfig->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildPhrConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildPhrConfig");
return RFAILED;
}
sizeof(struct SchedulingRequestConfig__schedulingRequestToAddModList));
if(!schedulingRequestConfig->schedulingRequestToAddModList)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSchedulingReqConfig");
return RFAILED;
}
DU_ALLOC(schReqList->list.array, schReqList->list.size);
if(!schReqList->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSchedulingReqConfig");
return RFAILED;
}
DU_ALLOC(schReqList->list.array[idx], sizeof(struct SchedulingRequestToAddMod));
if(!schReqList->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSchedulingReqConfig");
return RFAILED;
}
}
DU_ALLOC(schReqList->list.array[idx]->sr_ProhibitTimer, sizeof(long));
if(!schReqList->list.array[idx]->sr_ProhibitTimer)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSchedulingReqConfig");
return RFAILED;
}
*(schReqList->list.array[idx]->sr_ProhibitTimer) = SR_PROHIBIT_TMR;
DU_ALLOC(rlcConfig->choice.am, sizeof(struct RLC_Config__am));
if(!rlcConfig->choice.am)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcConfig");
return RFAILED;
}
DU_ALLOC(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t));
if(!rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcConfig");
return RFAILED;
}
*(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength) = SN_FIELD_LEN;
DU_ALLOC(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t));
if(!rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcConfig");
return RFAILED;
}
*(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength) = SN_FIELD_LEN;
DU_ALLOC(macLcConfig->ul_SpecificParameters, sizeof(struct LogicalChannelConfig__ul_SpecificParameters));
if(!macLcConfig->ul_SpecificParameters)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacLCConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacLCConfig");
return RFAILED;
}
DU_ALLOC(macLcConfig->ul_SpecificParameters->logicalChannelGroup, sizeof(long));
if(!macLcConfig->ul_SpecificParameters->logicalChannelGroup)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacLCConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacLCConfig");
return RFAILED;
}
*(macLcConfig->ul_SpecificParameters->logicalChannelGroup) = LC_GRP;
DU_ALLOC(macLcConfig->ul_SpecificParameters->schedulingRequestID, sizeof(SchedulingRequestId_t));
if(!macLcConfig->ul_SpecificParameters->schedulingRequestID)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacLCConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacLCConfig");
return RFAILED;
}
*(macLcConfig->ul_SpecificParameters->schedulingRequestID) = SCH_REQ_ID;
DU_ALLOC(rlcBearerList->list.array, rlcBearerList->list.size);
if(!rlcBearerList->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
return RFAILED;
}
DU_ALLOC(rlcBearerList->list.array[idx], sizeof(struct RLC_BearerConfig));
if(!rlcBearerList->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
return RFAILED;
}
}
sizeof(struct RLC_BearerConfig__servedRadioBearer));
if(!rlcBearerList->list.array[idx]->servedRadioBearer)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
return RFAILED;
}
DU_ALLOC(rlcBearerList->list.array[idx]->rlc_Config, sizeof(struct RLC_Config));
if(!rlcBearerList->list.array[idx]->rlc_Config)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
return RFAILED;
}
if(BuildRlcConfig(rlcBearerList->list.array[idx]->rlc_Config) != ROK)
{
- DU_LOG("\nF1AP : BuildRlcConfig failed");
+ DU_LOG("\nERROR --> F1AP : BuildRlcConfig failed");
return RFAILED;
}
sizeof(struct LogicalChannelConfig));
if(!rlcBearerList->list.array[idx]->mac_LogicalChannelConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
return RFAILED;
}
if(BuildMacLCConfig(rlcBearerList->list.array[idx]->mac_LogicalChannelConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildMacLCConfig failed");
+ DU_LOG("\nERROR --> F1AP : BuildMacLCConfig failed");
return RFAILED;
}
DU_ALLOC(controlRSetList->list.array, controlRSetList->list.size);
if(!controlRSetList->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
DU_ALLOC(controlRSetList->list.array[idx], sizeof(struct ControlResourceSet));
if(!controlRSetList->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
}
controlRSet->frequencyDomainResources.size);
if(!controlRSet->frequencyDomainResources.buf)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
sizeof(struct ControlResourceSet__tci_StatesPDCCH_ToAddList));
if(!controlRset->tci_StatesPDCCH_ToAddList)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
controlRset->tci_StatesPDCCH_ToAddList->list.size)
if(!controlRset->tci_StatesPDCCH_ToAddList->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
DU_ALLOC(controlRset->tci_StatesPDCCH_ToAddList->list.array[tciStateIdx], sizeof(TCI_StateId_t));
if(!controlRset->tci_StatesPDCCH_ToAddList->list.array[tciStateIdx])
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
}
DU_ALLOC(controlRset->tci_PresentInDCI, sizeof(long));
if(!controlRset->tci_PresentInDCI)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
/* TODO */
DU_ALLOC(controlRSet->pdcch_DMRS_ScramblingID, sizeof(long));
if(!controlRSet->pdcch_DMRS_ScramblingID)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
*(controlRSet->pdcch_DMRS_ScramblingID) = SCRAMBLING_ID;
DU_ALLOC(searchSpcList->list.array, searchSpcList->list.size);
if(!searchSpcList->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
DU_ALLOC(searchSpcList->list.array[idx], sizeof(struct SearchSpace));
if(!searchSpcList->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
}
DU_ALLOC(searchSpc->controlResourceSetId, sizeof(ControlResourceSetId_t));
if(!searchSpc->controlResourceSetId)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
*(searchSpc->controlResourceSetId) = PDCCH_CTRL_RSRC_SET_ONE_ID;
sizeof(struct SearchSpace__monitoringSlotPeriodicityAndOffset));
if(!searchSpc->monitoringSlotPeriodicityAndOffset)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
searchSpc->monitoringSlotPeriodicityAndOffset->present = \
DU_ALLOC(searchSpc->monitoringSymbolsWithinSlot, sizeof(BIT_STRING_t));
if(!searchSpc->monitoringSymbolsWithinSlot)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
searchSpc->monitoringSymbolsWithinSlot->size);
if(!searchSpc->monitoringSymbolsWithinSlot->buf)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
DU_ALLOC(searchSpc->nrofCandidates, sizeof(struct SearchSpace__nrofCandidates));
if(!searchSpc->nrofCandidates)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
DU_ALLOC(searchSpc->searchSpaceType, sizeof(struct SearchSpace__searchSpaceType));
if(!searchSpc->searchSpaceType)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
sizeof(struct SearchSpace__searchSpaceType__ue_Specific));
if(!searchSpc->searchSpaceType->choice.ue_Specific)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
searchSpc->searchSpaceType->choice.ue_Specific->dci_Formats = \
sizeof(struct PDCCH_Config__controlResourceSetToAddModList));
if(!pdcchCfg->controlResourceSetToAddModList)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
return RFAILED;
}
sizeof(struct PDCCH_Config__searchSpacesToAddModList));
if(!pdcchCfg->searchSpacesToAddModList)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
return RFAILED;
}
DU_ALLOC(dmrsDlCfg->choice.setup, sizeof(struct DMRS_DownlinkConfig));
if(!dmrsDlCfg->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
return RFAILED;
}
DU_ALLOC(dmrsDlCfg->choice.setup->dmrs_AdditionalPosition, sizeof(long));
if(!dmrsDlCfg->choice.setup->dmrs_AdditionalPosition)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSDLPdschMapTypeA");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDMRSDLPdschMapTypeA");
return RFAILED;
}
*(dmrsDlCfg->choice.setup->dmrs_AdditionalPosition) = DMRS_ADDITIONAL_POS;
sizeof(struct PDSCH_TimeDomainResourceAllocationList));
if(!timeDomAllocList->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
return RFAILED;
}
timeDomAllocList->choice.setup->list.size);
if(!timeDomAllocList->choice.setup->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
return RFAILED;
}
sizeof(struct PDSCH_TimeDomainResourceAllocation));
if(!timeDomAllocList->choice.setup->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
return RFAILED;
}
}
sizeof(struct PDSCH_Config__prb_BundlingType__staticBundling));
if(!prbBndlType->choice.staticBundling)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPdschPrbBundlingType");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPdschPrbBundlingType");
return RFAILED;
}
prbBndlType->choice.staticBundling->bundleSize = NULLP;
sizeof(struct PDSCH_Config__dmrs_DownlinkForPDSCH_MappingTypeA));
if(!pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
return RFAILED;
}
DU_ALLOC(pdschCfg->tci_StatesToAddModList, sizeof(struct PDSCH_Config__tci_StatesToAddModList));
if(!pdschCfg->tci_StatesToAddModList)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
return RFAILED;
}
if(BuildTCIStatesToAddModList(pdschCfg->tci_StatesToAddModList) != ROK)
sizeof(struct PDSCH_Config__pdsch_TimeDomainAllocationList));
if(!pdschCfg->pdsch_TimeDomainAllocationList)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
return RFAILED;
}
DU_ALLOC(pdschCfg->maxNrofCodeWordsScheduledByDCI, sizeof(long));
if(!pdschCfg->maxNrofCodeWordsScheduledByDCI)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
return RFAILED;
}
*(pdschCfg->maxNrofCodeWordsScheduledByDCI) = PDSCH_MAX_CODEWORD_SCH_BY_DCI;
DU_ALLOC(dlBwp->pdcch_Config, sizeof(struct BWP_DownlinkDedicated__pdcch_Config));
if(!dlBwp->pdcch_Config)
{
- DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failure in BuildInitialDlBWP");
return RFAILED;
}
dlBwp->pdcch_Config->present = BWP_DownlinkDedicated__pdcch_Config_PR_setup;
DU_ALLOC(dlBwp->pdcch_Config->choice.setup, sizeof(struct PDCCH_Config));
if(!dlBwp->pdcch_Config->choice.setup)
{
- DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failure in BuildInitialDlBWP");
return RFAILED;
}
if(BuildBWPDlDedPdcchCfg(dlBwp->pdcch_Config->choice.setup) != ROK)
DU_ALLOC(dlBwp->pdsch_Config, sizeof(struct BWP_DownlinkDedicated__pdsch_Config));
if(!dlBwp->pdsch_Config)
{
- DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failure in BuildInitialDlBWP");
return RFAILED;
}
dlBwp->pdsch_Config->present = BWP_DownlinkDedicated__pdsch_Config_PR_setup;
DU_ALLOC(dlBwp->pdsch_Config->choice.setup, sizeof(struct PDSCH_Config));
if(!dlBwp->pdsch_Config->choice.setup)
{
- DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failure in BuildInitialDlBWP");
return RFAILED;
}
DU_ALLOC(dmrsUlCfg->choice.setup, sizeof(DMRS_UplinkConfig_t));
if(!dmrsUlCfg->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
return RFAILED;
}
DU_ALLOC(dmrsUlCfg->choice.setup->dmrs_AdditionalPosition, sizeof(long));
if(!dmrsUlCfg->choice.setup->dmrs_AdditionalPosition)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
return RFAILED;
}
*(dmrsUlCfg->choice.setup->dmrs_AdditionalPosition) = DMRS_ADDITIONAL_POS;
sizeof(struct DMRS_UplinkConfig__transformPrecodingDisabled));
if(!dmrsUlCfg->choice.setup->transformPrecodingDisabled)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
return RFAILED;
}
sizeof(long));
if(!dmrsUlCfg->choice.setup->transformPrecodingDisabled->scramblingID0)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
return RFAILED;
}
*(dmrsUlCfg->choice.setup->transformPrecodingDisabled->scramblingID0) = SCRAMBLING_ID;
sizeof(struct PUSCH_TimeDomainResourceAllocationList));
if(!timeDomAllocList->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
return RFAILED;
}
timeDomAllocList->choice.setup->list.size);
if(!timeDomAllocList->choice.setup->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
return RFAILED;
}
sizeof(PUSCH_TimeDomainResourceAllocation_t));
if(!timeDomAllocList->choice.setup->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
return RFAILED;
}
}
DU_ALLOC(timeDomAlloc->k2, sizeof(long));
if(!timeDomAlloc->k2)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
return RFAILED;
}
*(timeDomAlloc->k2) = PUSCH_K2;
DU_ALLOC(puschCfg->dataScramblingIdentityPUSCH, sizeof(long));
if(!puschCfg->dataScramblingIdentityPUSCH)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
return RFAILED;
}
*(puschCfg->dataScramblingIdentityPUSCH) = SCRAMBLING_ID;
sizeof(struct PUSCH_Config__dmrs_UplinkForPUSCH_MappingTypeA));
if(!puschCfg->dmrs_UplinkForPUSCH_MappingTypeA)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
return RFAILED;
}
sizeof(struct PUSCH_Config__pusch_TimeDomainAllocationList));
if(!puschCfg->pusch_TimeDomainAllocationList)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
return RFAILED;
}
DU_ALLOC(puschCfg->transformPrecoder, sizeof(long));
if(!puschCfg->transformPrecoder)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
return RFAILED;
}
*(puschCfg->transformPrecoder) = PUSCH_TRANSFORM_PRECODER;
DU_ALLOC(resourceList->list.array, resourceList->list.size);
if(!resourceList->list.array)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSrsRsrcAddModList");
return RFAILED;
}
DU_ALLOC(resourceList->list.array[rsrcIdx], sizeof(SRS_Resource_t));
if(!resourceList->list.array[rsrcIdx])
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSrsRsrcAddModList");
return RFAILED;
}
}
sizeof(struct SRS_Resource__transmissionComb__n2));
if(!resourceList->list.array[rsrcIdx]->transmissionComb.choice.n2)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSrsRsrcAddModList");
return RFAILED;
}
resourceList->list.array[rsrcIdx]->transmissionComb.choice.n2->combOffset_n2\
sizeof(struct SRS_Resource__resourceType__aperiodic));
if(!resourceList->list.array[rsrcIdx]->resourceType.choice.aperiodic)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSrsRsrcAddModList");
return RFAILED;
}
resourceList->list.array[rsrcIdx]->sequenceId = SRS_SEQ_ID;
DU_ALLOC(rsrcSetList->list.array, rsrcSetList->list.size);
if(!rsrcSetList->list.array)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
return RFAILED;
}
DU_ALLOC(rsrcSetList->list.array[rSetIdx], sizeof(SRS_ResourceSet_t));
if(!rsrcSetList->list.array[rSetIdx])
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
return RFAILED;
}
}
sizeof(struct SRS_ResourceSet__srs_ResourceIdList));
if(!rsrcSetList->list.array[rSetIdx]->srs_ResourceIdList)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
return RFAILED;
}
DU_ALLOC(rsrcIdList->list.array, rsrcIdList->list.size);
if(!rsrcIdList->list.array)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
return RFAILED;
}
DU_ALLOC(rsrcIdList->list.array[rsrcIdx], sizeof(SRS_ResourceId_t));
if(!rsrcIdList->list.array[rsrcIdx])
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
return RFAILED;
}
}
sizeof(struct SRS_ResourceSet__resourceType__aperiodic));
if(!rsrcSetList->list.array[rSetIdx]->resourceType.choice.aperiodic)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
return RFAILED;
}
rsrcSetList->list.array[rSetIdx]->resourceType.choice.aperiodic->aperiodicSRS_ResourceTrigger \
sizeof(struct SRS_Config__srs_ResourceSetToAddModList));
if(!srsCfg->srs_ResourceSetToAddModList)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedSrsCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedSrsCfg");
return RFAILED;
}
if(BuildSrsRsrcSetAddModList(srsCfg->srs_ResourceSetToAddModList) != ROK)
sizeof(struct SRS_Config__srs_ResourceToAddModList));
if(!srsCfg->srs_ResourceToAddModList)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedSrsCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedSrsCfg");
return RFAILED;
}
DU_ALLOC(puschCfg->choice.setup, sizeof(struct PUSCH_ServingCellConfig));
if(!puschCfg->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
return RFAILED;
}
DU_ALLOC(puschCfg->choice.setup->ext1, sizeof(struct PUSCH_ServingCellConfig__ext1));
if(!puschCfg->choice.setup->ext1)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
return RFAILED;
}
DU_ALLOC(puschCfg->choice.setup->ext1->maxMIMO_Layers, sizeof(long));
if(!puschCfg->choice.setup->ext1->maxMIMO_Layers)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
return RFAILED;
}
*(puschCfg->choice.setup->ext1->maxMIMO_Layers) = PUSCH_MAX_MIMO_LAYERS;
DU_ALLOC(puschCfg->choice.setup->ext1->processingType2Enabled,sizeof(BOOLEAN_t));
if(!puschCfg->choice.setup->ext1->processingType2Enabled)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
return RFAILED;
}
*(puschCfg->choice.setup->ext1->processingType2Enabled) = PUSCH_PROCESS_TYPE2_ENABLED;
DU_ALLOC(ulBwp->pusch_Config, sizeof(struct BWP_UplinkDedicated__pusch_Config));
if(!ulBwp->pusch_Config)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildInitialUlBWP");
return RFAILED;
}
DU_ALLOC(ulBwp->pusch_Config->choice.setup, sizeof(PUSCH_Config_t));
if(!ulBwp->pusch_Config->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildInitialUlBWP");
return RFAILED;
}
DU_ALLOC(ulBwp->srs_Config, sizeof(struct BWP_UplinkDedicated__srs_Config));
if(!ulBwp->srs_Config)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildInitialUlBWP");
return RFAILED;
}
DU_ALLOC(ulBwp->srs_Config->choice.setup, sizeof(SRS_Config_t));
if(!ulBwp->srs_Config->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildInitialUlBWP");
return RFAILED;
}
DU_ALLOC(ulCfg->initialUplinkBWP, sizeof(BWP_UplinkDedicated_t));
if(!ulCfg->initialUplinkBWP)
{
- DU_LOG("\nF1AP : Memory Allocation failed in BuildUlCfg");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failed in BuildUlCfg");
return RFAILED;
}
DU_ALLOC(ulCfg->firstActiveUplinkBWP_Id, sizeof(BWP_Id_t));
if(!ulCfg->firstActiveUplinkBWP_Id)
{
- DU_LOG("\nF1AP : Memory Allocation failed in BuildUlCfg");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failed in BuildUlCfg");
return RFAILED;
}
*(ulCfg->firstActiveUplinkBWP_Id) = ACTIVE_UL_BWP_ID;
sizeof(struct UplinkConfig__pusch_ServingCellConfig));
if(!ulCfg->pusch_ServingCellConfig)
{
- DU_LOG("\nF1AP : Memory Allocation failed in BuildUlCfg");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failed in BuildUlCfg");
return RFAILED;
}
DU_ALLOC(pdschCfg->choice.setup, sizeof( struct PDSCH_ServingCellConfig));
if(!pdschCfg->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPdschSrvCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPdschSrvCellCfg");
return RFAILED;
}
DU_ALLOC(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH, sizeof(long));
if(!pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPdschSrvCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPdschSrvCellCfg");
return RFAILED;
}
*(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH)= PDSCH_NUM_HARQ_PROC;
DU_ALLOC(srvCellCfg->tdd_UL_DL_ConfigurationDedicated, sizeof(TDD_UL_DL_ConfigDedicated_t));
if(!srvCellCfg->tdd_UL_DL_ConfigurationDedicated)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
DU_ALLOC(srvCellCfg->initialDownlinkBWP, sizeof(BWP_DownlinkDedicated_t));
if(!srvCellCfg->initialDownlinkBWP)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
if(BuildInitialDlBWP(srvCellCfg->initialDownlinkBWP) != ROK)
{
- DU_LOG("\nF1AP : BuildInitialDlBWP failed");
+ DU_LOG("\nERROR --> F1AP : BuildInitialDlBWP failed");
return RFAILED;
}
srvCellCfg->downlinkBWP_ToReleaseList = NULLP;
DU_ALLOC(srvCellCfg->firstActiveDownlinkBWP_Id, sizeof(long));
if(!srvCellCfg->firstActiveDownlinkBWP_Id)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
*(srvCellCfg->firstActiveDownlinkBWP_Id) = ACTIVE_DL_BWP_ID;
DU_ALLOC(srvCellCfg->defaultDownlinkBWP_Id, sizeof(long));
if(!srvCellCfg->defaultDownlinkBWP_Id)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
*(srvCellCfg->defaultDownlinkBWP_Id) = ACTIVE_DL_BWP_ID;
DU_ALLOC(srvCellCfg->uplinkConfig, sizeof(UplinkConfig_t));
if(!srvCellCfg->uplinkConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
if(BuildUlCfg(srvCellCfg->uplinkConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildUlCfg failed");
+ DU_LOG("\nERROR --> F1AP : BuildUlCfg failed");
return RFAILED;
}
srvCellCfg->supplementaryUplink = NULLP;
DU_ALLOC(srvCellCfg->pdsch_ServingCellConfig, sizeof(struct ServingCellConfig__pdsch_ServingCellConfig));
if(!srvCellCfg->pdsch_ServingCellConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
if(BuildPdschSrvCellCfg(srvCellCfg->pdsch_ServingCellConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildPdschSrvCellCfg failed");
+ DU_LOG("\nERROR --> F1AP : BuildPdschSrvCellCfg failed");
return RFAILED;
}
DU_ALLOC(srvCellCfg->csi_MeasConfig, sizeof(struct ServingCellConfig__csi_MeasConfig))
if(!srvCellCfg->csi_MeasConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
DU_ALLOC(spCellCfg->servCellIndex, sizeof(long));
if(!spCellCfg->servCellIndex)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfg");
return RFAILED;
}
*(spCellCfg->servCellIndex) = SERV_CELL_IDX;
DU_ALLOC(spCellCfg->rlmInSyncOutOfSyncThreshold, sizeof(long));
if(!spCellCfg->rlmInSyncOutOfSyncThreshold)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfg");
return RFAILED;
}
*(spCellCfg->rlmInSyncOutOfSyncThreshold) = RLM_SYNC_OUT_SYNC_THRESHOLD;
DU_ALLOC(spCellCfg->spCellConfigDedicated, sizeof(ServingCellConfig_t));
if(!spCellCfg->spCellConfigDedicated)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfg");
return RFAILED;
}
if(BuildSpCellCfgDed(spCellCfg->spCellConfigDedicated) != ROK)
{
- DU_LOG("\nF1AP : BuildSpCellCfgDed failed");
+ DU_LOG("\nERROR --> F1AP : BuildSpCellCfgDed failed");
return RFAILED;
}
return ROK;
DU_ALLOC(phyCellGrpCfg->p_NR_FR1, sizeof(long));
if(!phyCellGrpCfg->p_NR_FR1)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildPhyCellGrpCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildPhyCellGrpCfg");
return RFAILED;
}
*(phyCellGrpCfg->p_NR_FR1) = P_NR_FR1;
DU_ALLOC(macCellGrpCfg->schedulingRequestConfig, sizeof(struct SchedulingRequestConfig));
if(!macCellGrpCfg->schedulingRequestConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacCellGrpCfg");
return RFAILED;
}
if(BuildSchedulingReqConfig(macCellGrpCfg->schedulingRequestConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildSchedulingReqConfig failed");
+ DU_LOG("\nERROR --> F1AP : BuildSchedulingReqConfig failed");
return RFAILED;
}
DU_ALLOC(macCellGrpCfg->bsr_Config, sizeof(struct BSR_Config));
if(!macCellGrpCfg->bsr_Config)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacCellGrpCfg");
return RFAILED;
}
if(BuildBsrConfig(macCellGrpCfg->bsr_Config) != ROK)
{
- DU_LOG("\nF1AP : BuildBsrConfig failed");
+ DU_LOG("\nERROR --> F1AP : BuildBsrConfig failed");
return RFAILED;
}
DU_ALLOC(macCellGrpCfg->tag_Config, sizeof(struct TAG_Config));
if(!macCellGrpCfg->tag_Config)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacCellGrpCfg");
return RFAILED;
}
if(BuildTagConfig(macCellGrpCfg->tag_Config) != ROK)
{
- DU_LOG("\nF1AP : BuildTagConfig failed");
+ DU_LOG("\nERROR --> F1AP : BuildTagConfig failed");
return RFAILED;
}
DU_ALLOC(macCellGrpCfg->phr_Config, sizeof(struct MAC_CellGroupConfig__phr_Config));
if(!macCellGrpCfg->phr_Config)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacCellGrpCfg");
return RFAILED;
}
if(BuildPhrConfig(macCellGrpCfg->phr_Config) != ROK)
{
- DU_LOG("\nF1AP : BuildPhrConfig failed");
+ DU_LOG("\nERROR --> F1AP : BuildPhrConfig failed");
return RFAILED;
}
DU_ALLOC(cellGrpCfg.rlc_BearerToAddModList, sizeof(struct CellGroupConfigRrc__rlc_BearerToAddModList));
if(!cellGrpCfg.rlc_BearerToAddModList)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildDuToCuRrcContainer");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildDuToCuRrcContainer");
ret = RFAILED;
break;
}
if(BuildRlcBearerToAddModList(cellGrpCfg.rlc_BearerToAddModList) != ROK)
{
- DU_LOG("\nF1AP : BuildRlcBearerToAddModList failed");
+ DU_LOG("\nERROR --> F1AP : BuildRlcBearerToAddModList failed");
ret = RFAILED;
break;
}
DU_ALLOC(cellGrpCfg.mac_CellGroupConfig, sizeof(MAC_CellGroupConfig_t));
if(!cellGrpCfg.mac_CellGroupConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildDuToCuRrcContainer");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildDuToCuRrcContainer");
ret = RFAILED;
break;
}
if(BuildMacCellGrpCfg(cellGrpCfg.mac_CellGroupConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildMacCellGrpCfg failed");
+ DU_LOG("\nERROR --> F1AP : BuildMacCellGrpCfg failed");
ret = RFAILED;
break;
}
DU_ALLOC(cellGrpCfg.physicalCellGroupConfig, sizeof(PhysicalCellGroupConfig_t));
if(!cellGrpCfg.physicalCellGroupConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildDuToCuRrcContainer");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildDuToCuRrcContainer");
ret = RFAILED;
break;
}
if(BuildPhyCellGrpCfg(cellGrpCfg.physicalCellGroupConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildPhyCellGrpCfg failed");
+ DU_LOG("\nERROR --> F1AP : BuildPhyCellGrpCfg failed");
ret = RFAILED;
break;
}
DU_ALLOC(cellGrpCfg.spCellConfig, sizeof(SpCellConfig_t));
if(!cellGrpCfg.spCellConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildDuToCuRrcContainer");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildDuToCuRrcContainer");
ret = RFAILED;
break;
}
if(BuildSpCellCfg(cellGrpCfg.spCellConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildSpCellCfg failed");
+ DU_LOG("\nERROR --> F1AP : BuildSpCellCfg failed");
ret = RFAILED;
break;
}
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG( "\n F1AP : Could not encode DuToCuRrcContainer (at %s)\n",\
+ DU_LOG( "\nERROR --> F1AP : Could not encode DuToCuRrcContainer (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
ret = RFAILED;
break;
}
else
{
- DU_LOG("\n F1AP : Created APER encoded buffer for DuToCuRrcContainer\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for DuToCuRrcContainer\n");
for(int i=0; i< encBufSize; i++)
{
printf("%x",encBuf[i]);
DU_ALLOC(duToCuRrcContainer->buf, duToCuRrcContainer->size);
if(!duToCuRrcContainer->buf)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDuToCuRrcContainer");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDuToCuRrcContainer");
ret = RFAILED;
break;
}
}
else
{
- DU_LOG("\nDU_APP : Recevied F1ap Pdu is null at freeInitUlRrcMsgTransfer()");
+ DU_LOG("\nERROR --> DU_APP : Recevied F1ap Pdu is null at freeInitUlRrcMsgTransfer()");
return RFAILED;
}
return ROK;
while(true)
{
- DU_LOG("\n F1AP : Building RRC Setup Request\n");
+ DU_LOG("\n INFO --> F1AP : Building RRC Setup Request\n");
DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
if(f1apMsg == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
f1apMsg->present = F1AP_PDU_PR_initiatingMessage;
DU_ALLOC(f1apMsg->choice.initiatingMessage,sizeof(InitiatingMessage_t));
if(f1apMsg->choice.initiatingMessage == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
f1apMsg->choice.initiatingMessage->procedureCode =\
DU_ALLOC(initULRRCMsg->protocolIEs.list.array,initULRRCMsg->protocolIEs.list.size);
if(initULRRCMsg->protocolIEs.list.array == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for\
+ DU_LOG(" ERROR --> F1AP : Memory allocation for\
RRCSetupRequestMessageTransferIEs failed");
break;
}
initULRRCMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.size)
if(!initULRRCMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf)
{
- DU_LOG(" F1AP : Memory allocation for RRCSetupRequestMessageTransferIEs failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for RRCSetupRequestMessageTransferIEs failed");
break;
}
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG( "\n F1AP : Could not encode Initial UL RRC Message Transfer\
+ DU_LOG( "\nERROR --> F1AP : Could not encode Initial UL RRC Message Transfer\
structure (at %s)\n",encRetVal.failed_type ? \
encRetVal.failed_type->name : "unknown");
ret = RFAILED;
else
{
- DU_LOG("\n F1AP : Created APER encoded buffer for Initial UL RRC\
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for Initial UL RRC\
Message transfer\n");
for(int i=0; i< encBufSize; i++)
{
}
}
/* Sending msg */
- if(SendF1APMsg(DU_APP_MEM_REGION,DU_POOL) != ROK)
+ if(sendF1APMsg() != ROK)
{
- DU_LOG("\n F1AP : Sending Initial UL RRC Message Transfer Failed");
+ DU_LOG("\nERROR --> F1AP : Sending Initial UL RRC Message Transfer Failed");
ret = RFAILED;
break;
}
break;
}
default:
- DU_LOG("\nDU_APP: Invalid Rlc Mode %d at freeRlcLcCfg()", lcCfg->rlcMode);
+ DU_LOG("\nERROR --> DU_APP: Invalid Rlc Mode %d at freeRlcLcCfg()", lcCfg->rlcMode);
break;
}
memset(lcCfg, 0, sizeof(LcCfg));
{
freeMacLcCfg(&ueCfg->macLcCfg[lcIdx]);
}
+ for(lcIdx = 0; lcIdx < ueCfg->numDrb; lcIdx++)
+ {
+ DU_FREE(ueCfg->upTnlInfo[lcIdx].tnlCfg1, sizeof(GtpTnlCfg));
+ memset(&ueCfg->upTnlInfo[lcIdx], 0, sizeof(UpTnlCfg));
+ }
}
/*******************************************************************
if(rlcAmCfg->dl_AM_RLC.sn_FieldLength)
{
amCfgToSet->ulAmCfg.snLenUl = *(rlcAmCfg->dl_AM_RLC.sn_FieldLength);
- amCfgToSet->ulAmCfg.reAssemTmr = rlcAmCfg->dl_AM_RLC.t_Reassembly;
+ /*TODO: Check the timer value when sent by real CU */
+ amCfgToSet->ulAmCfg.reAssemTmr = rlcAmCfg->dl_AM_RLC.t_Reassembly;
amCfgToSet->ulAmCfg.statProhTmr = rlcAmCfg->dl_AM_RLC.t_StatusProhibit;
}
case RLC_AM :
{
if(lcCfg->choice.am)
- {
+ {
DU_ALLOC_SHRABL_BUF(rlcDbCfg->u.amCfg, sizeof(AmBearerCfg));
- if(rlcDbCfg->u.amCfg)
- extractRlcAmCfg(rlcDbCfg->u.amCfg, lcCfg->choice.am);
- }
+ if(rlcDbCfg->u.amCfg)
+ extractRlcAmCfg(rlcDbCfg->u.amCfg, lcCfg->choice.am);
+ }
break;
}
case RLC_UM_BI_DIRECTIONAL :
{
if(lcCfg->choice.um_Bi_Directional)
- {
+ {
DU_ALLOC_SHRABL_BUF(rlcDbCfg->u.umBiDirCfg, sizeof(UmBiDirBearerCfg));
- if(rlcDbCfg->u.umBiDirCfg)
+ if(rlcDbCfg->u.umBiDirCfg)
extractRlcUmBiCfg(rlcDbCfg->u.umBiDirCfg, lcCfg->choice.um_Bi_Directional);
- }
+ }
break;
}
case RLC_UM_UNI_DIRECTIONAL_UL :
if(lcCfg->choice.um_Uni_Directional_DL)
{
DU_ALLOC_SHRABL_BUF(rlcDbCfg->u.umUniDirUlCfg, sizeof(UmUniDirUlBearerCfg));
- if(rlcDbCfg->u.umUniDirUlCfg)
+ if(rlcDbCfg->u.umUniDirUlCfg)
extractRlcUmUlCfg(rlcDbCfg->u.umUniDirUlCfg, lcCfg->choice.um_Uni_Directional_DL);
- }
+ }
break;
}
case RLC_UM_UNI_DIRECTIONAL_DL :
if(lcCfg->choice.um_Uni_Directional_UL)
{
DU_ALLOC_SHRABL_BUF(rlcDbCfg->u.umUniDirDlCfg, sizeof(UmUniDirDlBearerCfg));
- if(rlcDbCfg->u.umUniDirDlCfg)
+ if(rlcDbCfg->u.umUniDirDlCfg)
extractRlcUmDlCfg(rlcDbCfg->u.umUniDirDlCfg, lcCfg->choice.um_Uni_Directional_UL);
- }
+ }
break;
}
default:
- DU_LOG("\nDUAPP: Invalid rlcMode %d at extractRlcCfgToAddMod()", rlcMode);
+ DU_LOG("\nERROR --> DUAPP: Invalid rlcMode %d at extractRlcCfgToAddMod()", rlcMode);
break;
}
}
qosToAdd->ulPduSessAggMaxBitRate = 0;
}
-uint8_t extractDrbCfg(DRBs_ToBeSetup_Item_t *drbItem, LcCfg *macLcToAdd)
+/*******************************************************************
+ *
+ * @brief Function to extract GTP Tunnel Info from CU
+ *
+ * @details
+ *
+ * Function : extractUpTnlInfo
+ *
+ * Functionality: Function to extract GTP Tunnel Info from CU
+ *
+ * @params[in] F1AP message
+ * @return ROK/RFAILED
+ *
+ * ****************************************************************/
+
+uint8_t extractUpTnlInfo(uint8_t drbId, uint8_t configType,\
+ ULUPTNLInformation_ToBeSetup_List_t *tnlInfo, UpTnlCfg *upTnlInfo)
{
- DRB_Information_t *drbInfo = NULLP;
+ uint8_t tnlIdx;
+ uint32_t ipv4_du = 0;
+ GTPTunnel_t *gtpTunnel = NULLP;
- if(drbItem->qoSInformation.present == QoSInformation_PR_choice_extension)
+ upTnlInfo->drbId = drbId;
+ upTnlInfo->configType = configType;
+#ifdef O1_ENABLE
+ cmInetAddr((S8*)g_cfg.DU_IPV4_Addr, &ipv4_du);
+#else
+ cmInetAddr((char *)DU_IP_V4_ADDR, &ipv4_du);
+#endif
+
+ for(tnlIdx=0; tnlIdx < tnlInfo->list.count; tnlIdx++)
{
- if(drbItem->qoSInformation.choice.choice_extension->value.present ==
- QoSInformation_ExtIEs__value_PR_DRB_Information)
+ if(tnlInfo->list.array[tnlIdx]->uLUPTNLInformation.present == UPTransportLayerInformation_PR_gTPTunnel)
{
- drbInfo = &drbItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information;
-
- if(!macLcToAdd->drbQos)
+ if(tnlInfo->list.array[tnlIdx]->uLUPTNLInformation.choice.gTPTunnel)
{
- DU_ALLOC_SHRABL_BUF(macLcToAdd->drbQos, sizeof(DrbQosInfo));
- if(macLcToAdd->drbQos == NULLP)
+ gtpTunnel = tnlInfo->list.array[tnlIdx]->uLUPTNLInformation.choice.gTPTunnel;
+ DU_ALLOC(upTnlInfo->tnlCfg1, sizeof(GtpTnlCfg));
+ if(upTnlInfo->tnlCfg1 == NULLP)
{
- DU_LOG("\n DUAPP:Memory failed at allocating DrbQos at extractDrbCfg()");
- return RFAILED;
+ DU_LOG("\nERROR --> F1AP : extractUpTnlInfo: Failed to allocate mmeory for tunnel cfg 1");
+ return RFAILED;
}
-
- }
- if(drbInfo->dRB_QoS.qoS_Characteristics.present == QoS_Characteristics_PR_non_Dynamic_5QI)
- {
- extractQosInfo(macLcToAdd->drbQos, &drbInfo->dRB_QoS);
- macLcToAdd->dlLcCfg.lcp = macLcToAdd->drbQos->ngRanRetPri.priorityLevel;
- }
- if(!macLcToAdd->snssai)
- {
- DU_ALLOC_SHRABL_BUF(macLcToAdd->snssai, sizeof(Snssai));
- if(macLcToAdd->snssai == NULLP)
+ bitStringToInt(>pTunnel->transportLayerAddress, &upTnlInfo->tnlCfg1->ulTnlAddress);
+ upTnlInfo->tnlCfg1->dlTnlAddress = ipv4_du;
+ if(gtpTunnel->gTP_TEID.size > 0)
{
- DU_LOG("\n DUAPP:Memory failed at allocating SNSSAI at extractDrbCfg()");
- return RFAILED;
+ teIdStringToInt(gtpTunnel->gTP_TEID.buf, &upTnlInfo->tnlCfg1->teId);
}
}
- memcpy(&macLcToAdd->snssai->sst, drbInfo->sNSSAI.sST.buf, \
- drbInfo->sNSSAI.sST.size);
- if(drbInfo->sNSSAI.sD)
- {
- memcpy(macLcToAdd->snssai->sd, drbInfo->sNSSAI.sD->buf, \
- drbInfo->sNSSAI.sD->size);
- }
- }/*End of DRB Info*/
+ break;
+ }
}
return ROK;
}
+/*******************************************************************
+*
+* @brief Function to extract Drb Qos Cfg Info from CU
+*
+* @details
+*
+* Function : extractDrbQosCfg
+*
+* Functionality: Function to extract Drb Qos Cfg Info from CU
+*
+* @params[in] DRB_Information_t *drbInfo, LcCfg *macLcToAdd
+* @return ROK/RFAILED
+*
+* ****************************************************************/
-uint8_t extractMacRbCfg(uint8_t lcId, DRBs_ToBeSetup_Item_t *drbCfg, LogicalChannelConfig_t *ulLcCfg, LcCfg *lcCfg)
+uint8_t extractDrbQosCfg(DRB_Information_t *drbInfo, LcCfg *macLcToAdd )
{
- uint8_t ret = ROK;
+ if(!macLcToAdd->drbQos)
+ {
+ DU_ALLOC_SHRABL_BUF(macLcToAdd->drbQos, sizeof(DrbQosInfo));
+ if(macLcToAdd->drbQos == NULLP)
+ {
+ DU_LOG("\nERROR --> DUAPP:Memory failed at allocating DrbQos at extractDrbCfg()");
+ return RFAILED;
+ }
- if(drbCfg)
+ }
+ if(drbInfo->dRB_QoS.qoS_Characteristics.present == QoS_Characteristics_PR_non_Dynamic_5QI)
{
- ret = extractDrbCfg(drbCfg, lcCfg);
- if(ret == RFAILED)
+ extractQosInfo(macLcToAdd->drbQos, &drbInfo->dRB_QoS);
+ macLcToAdd->dlLcCfg.lcp = macLcToAdd->drbQos->ngRanRetPri.priorityLevel;
+ }
+ if(!macLcToAdd->snssai)
+ {
+ DU_ALLOC_SHRABL_BUF(macLcToAdd->snssai, sizeof(Snssai));
+ if(macLcToAdd->snssai == NULLP)
+ {
+ DU_LOG("\nERROR --> DUAPP : Memory failed at allocating SNSSAI at extractDrbCfg()");
+ return RFAILED;
+ }
+ }
+ memcpy(&macLcToAdd->snssai->sst, drbInfo->sNSSAI.sST.buf, \
+ drbInfo->sNSSAI.sST.size);
+ if(drbInfo->sNSSAI.sD)
+ {
+ memcpy(macLcToAdd->snssai->sd, drbInfo->sNSSAI.sD->buf, \
+ drbInfo->sNSSAI.sD->size);
+ }
+ return ROK;
+}
+/*******************************************************************
+ *
+ * @brief Function to extract DRB info received from CU
+ *
+ * @details
+ *
+ * Function : extractDrbCfg
+ *
+ * Functionality: Function to extract DRB info received from CU
+ *
+ * @params[in] F1AP message
+ * @return void
+ *
+ * ****************************************************************/
+uint8_t extractDrbCfg(DRBs_ToBeSetup_Item_t *drbItem,DRBs_ToBeSetupMod_Item_t *drbSetupModItem,\
+LcCfg *macLcToAdd, UpTnlCfg *upTnlInfo)
+{
+ DRB_Information_t *drbInfo = NULLP;
+
+ if(drbItem != NULLP)
+ {
+ if(extractUpTnlInfo(drbItem->dRBID, CONFIG_ADD, &drbItem->uLUPTNLInformation_ToBeSetup_List, upTnlInfo) != ROK)
+ {
+ DU_LOG("\nERROR --> DUAPP : Failed to extract tunnel Cfg at extractDrbCfg()");
+ return RFAILED;
+ }
+ if(drbItem->qoSInformation.present == QoSInformation_PR_choice_extension)
+ {
+ if(drbItem->qoSInformation.choice.choice_extension->value.present == QoSInformation_ExtIEs__value_PR_DRB_Information)
+ {
+ drbInfo = &drbItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information;
+ if(extractDrbQosCfg(drbInfo , macLcToAdd) != ROK)
+ {
+ DU_LOG("\nERROR --> DUAPP : Failed to extract qos Cfg at extractDrbCfg()");
+ return RFAILED;
+ }
+ }
+ }
+ }
+ else if(drbSetupModItem != NULLP)
+ {
+ if(extractUpTnlInfo(drbSetupModItem->dRBID, CONFIG_ADD, &drbSetupModItem->uLUPTNLInformation_ToBeSetup_List,\
+ upTnlInfo) != ROK)
+ {
+ DU_LOG("\nERROR --> DUAPP : Failed to extract tunnel Cfg at extractDrbCfg()");
+ return RFAILED;
+ }
+ if(drbSetupModItem->qoSInformation.present == QoSInformation_PR_choice_extension)
+ {
+ if(drbSetupModItem->qoSInformation.choice.choice_extension->value.present ==\
+ QoSInformation_ExtIEs__value_PR_DRB_Information)
+ {
+ drbInfo = &drbSetupModItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information;
+ if(extractDrbQosCfg(drbInfo , macLcToAdd) != ROK)
+ {
+ DU_LOG("\nERROR --> DUAPP : Failed to extract qos Cfg at extractDrbCfg()");
+ return RFAILED;
+ }
+
+ }
+ }
+ }
+
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Function to extract RB info received from CU
+ *
+ * @details
+ *
+ * Function : extractMacRbCfg
+ *
+ * Functionality: Function to extract RB info received from CU
+ *
+ * @params[in] F1AP message
+ * @return ROK/RFAILED
+ *
+ * ****************************************************************/
+
+uint8_t extractMacRbCfg(uint8_t lcId, DRBs_ToBeSetup_Item_t *drbCfg,\
+DRBs_ToBeSetupMod_Item_t *drbSetupModCfg, LogicalChannelConfig_t *ulLcCfg, LcCfg *lcCfg, UpTnlCfg *upTnlInfo)
+{
+ if(drbCfg != NULLP)
+ {
+ if(extractDrbCfg(drbCfg, NULL, lcCfg, upTnlInfo) != ROK)
+ {
+ DU_LOG("ERROR --> F1AP : Failed to build Drb Qos at extractMacRbCfg()");
+ return RFAILED;
+ }
+ }
+ else if(drbSetupModCfg != NULLP)
+ {
+ if(extractDrbCfg(NULL, drbSetupModCfg, lcCfg, upTnlInfo) != ROK)
{
- DU_LOG("F1AP: Failed to build Drb Qos at extractMacRbCfg()");
- return ret;
+ DU_LOG("ERROR --> F1AP : Failed to build Drb Qos at extractMacRbCfg()");
+ return RFAILED;
}
}
else
}
else
lcCfg->ulLcCfgPres = false;
- return ret;
+ return ROK;
}
+/*******************************************************************
+ *
+ * @brief Function processing LC config info received from CU
+ *
+ * @details
+ *
+ * Function : procMacLcCfg
+ *
+ * Functionality: Function processing LC config info received from CU
+ *
+ * @params[in] F1AP message
+ * @return ROK/RFAILED
+ *
+ * ****************************************************************/
+
uint8_t procMacLcCfg(uint8_t lcId, uint8_t rbType, uint8_t configType,\
- DRBs_ToBeSetup_Item_t *drbItem, LogicalChannelConfig_t *ulLcCfg, LcCfg *lcCfg)
+DRBs_ToBeSetup_Item_t *drbItem, DRBs_ToBeSetupMod_Item_t *drbSetupModItem, LogicalChannelConfig_t *ulLcCfg,\
+LcCfg *lcCfg, UpTnlCfg *upTnlInfo)
{
uint8_t ret = ROK;
lcCfg->configType = configType;
if(rbType == RB_TYPE_SRB)
{
- ret = extractMacRbCfg(lcId, NULL, ulLcCfg, lcCfg);
+ ret = extractMacRbCfg(lcId, NULL,NULL, ulLcCfg, lcCfg, NULL);
}
else if(rbType == RB_TYPE_DRB)
{
- ret = extractMacRbCfg(lcId, drbItem, ulLcCfg, lcCfg);
+ if(drbItem != NULL)
+ ret = extractMacRbCfg(lcId, drbItem, NULL, ulLcCfg, lcCfg, upTnlInfo);
+ else if(drbSetupModItem != NULL)
+ ret = extractMacRbCfg(lcId, NULL, drbSetupModItem, ulLcCfg, lcCfg, upTnlInfo);
}
return ret;
}
*
* ****************************************************************/
-uint8_t extractRlcCfgToAddMod(struct CellGroupConfigRrc__rlc_BearerToAddModList *lcCfg, \
- DuUeCfg *ueCfgDb)
+uint8_t extractRlcCfgToAddMod(struct CellGroupConfigRrc__rlc_BearerToAddModList *lcCfg, DuUeCfg *ueCfgDb)
{
- uint8_t ret, idx, rbId, lcId, rlcMode, rbType;
+ uint8_t idx, rbId, lcId, rlcMode, rbType;
RLC_Config_t *f1RlcCfg = NULLP;
LogicalChannelConfig_t *macUlLcCfg = NULLP;
}
else
{
- DU_LOG("\n No components present in Bearer config to ADD/MOD");
+ DU_LOG("\nERROR --> No components present in Bearer config to ADD/MOD");
return RFAILED;
}
/* MAC UL LC Config */
}
else
{
- DU_LOG("\nDUAPP: Received RadioBearer config is NULL");
+ DU_LOG("\nERROR --> DUAPP: Received RadioBearer config is NULL");
return RFAILED;
}
/* RLC Mode Config */
memset(&ueCfgDb->macLcCfg[idx], 0, sizeof(LcCfg));
memset(&ueCfgDb->rlcLcCfg[idx], 0, sizeof(RlcBearerCfg));
procRlcLcCfg(rbId, lcId, rbType, rlcMode, CONFIG_UNKNOWN, f1RlcCfg, &(ueCfgDb->rlcLcCfg[idx]));
- ret = procMacLcCfg(lcId, rbType, CONFIG_UNKNOWN, NULL, macUlLcCfg, &ueCfgDb->macLcCfg[idx]);
- if(ret == RFAILED)
+ if(procMacLcCfg(lcId, rbType, CONFIG_UNKNOWN, NULL, NULL, macUlLcCfg, &ueCfgDb->macLcCfg[idx], NULL) != ROK)
{
- DU_LOG("\nDUAPP: Failed while filling MAC LC config at extractRlcCfgToAddMod()");
- return ret;
+ DU_LOG("\nERROR --> DU APP : Failed while filling MAC LC config at extractRlcCfgToAddMod()");
+ return RFAILED;
}
(ueCfgDb->numRlcLcs)++;
(ueCfgDb->numMacLcs)++;
}
//TODO: To send the failure cause in UeContextSetupRsp
- return ret;
+ return ROK;
}
/*******************************************************************
}
else
{
- DU_LOG("\nDUAPP: Memory allocation failed for maxCodeBlkGrpPerTb at extractPdschServingCellCfg()");
+ DU_LOG("\nERROR --> DU APP : Memory allocation failed for maxCodeBlkGrpPerTb at extractPdschServingCellCfg()");
return RFAILED;
}
}
}
else
{
- DU_LOG("\nDUAPP: Memory allocation failed for codeBlkGrpFlushInd at extractPdschServingCellCfg()");
+ DU_LOG("\nERROR --> DU APP : Memory allocation failed for codeBlkGrpFlushInd at extractPdschServingCellCfg()");
return RFAILED;
}
}
}
else
{
- DU_LOG("\nDUAPP: Memory allocation failed for maxMimoLayers at extractPdschServingCellCfg()");
+ DU_LOG("\nERROR --> DU APP : Memory allocation failed for maxMimoLayers at extractPdschServingCellCfg()");
return RFAILED;
}
}
}
else
{
- DU_LOG("\nDUAPP: Memory allocation failed for xOverhead at extractPdschServingCellCfg()");
+ DU_LOG("\nERROR --> DU APP : Memory allocation failed for xOverhead at extractPdschServingCellCfg()");
return RFAILED;
}
}
break;
}
default :
- DU_LOG("\nERROR --> F1AP : Invalid periodicity %d", macPeriodicty);
+ DU_LOG("\nERROR --> F1AP : Invalid periodicity %d", macPeriodicty);
}
}
/* Fill MacCell Group Reconfig */
if(cellGrp->mac_CellGroupConfig)
{
+ macUeCfg->macCellGrpCfgPres = true;
macCellGroup = ((MAC_CellGroupConfig_t *)(cellGrp->mac_CellGroupConfig));
if(macCellGroup->schedulingRequestConfig)
- {
+ {
extractSchReqReConfig(macCellGroup->schedulingRequestConfig, &macUeCfg->macCellGrpCfg.schReqCfg);
- }
+ }
if(macCellGroup->tag_Config)
- {
+ {
extractTagReconfig(macCellGroup->tag_Config, &macUeCfg->macCellGrpCfg.tagCfg);
- }
- if(macCellGroup->bsr_Config)
- {
+ }
+ if(macCellGroup->bsr_Config)
+ {
macUeCfg->macCellGrpCfg.bsrTmrCfg.periodicTimer = macCellGroup->bsr_Config->periodicBSR_Timer;
macUeCfg->macCellGrpCfg.bsrTmrCfg.retxTimer = macCellGroup->bsr_Config->retxBSR_Timer;
- if(macCellGroup->bsr_Config->logicalChannelSR_DelayTimer)
- {
+ if(macCellGroup->bsr_Config->logicalChannelSR_DelayTimer)
+ {
macUeCfg->macCellGrpCfg.bsrTmrCfg.srDelayTimer =\
- *(macCellGroup->bsr_Config->logicalChannelSR_DelayTimer);
- }
- }
- if(macCellGroup->phr_Config)
- {
- if(macCellGroup->phr_Config->present == MAC_CellGroupConfig__phr_Config_PR_setup)
- {
+ *(macCellGroup->bsr_Config->logicalChannelSR_DelayTimer);
+ }
+ }
+ if(macCellGroup->phr_Config)
+ {
+ if(macCellGroup->phr_Config->present == MAC_CellGroupConfig__phr_Config_PR_setup)
+ {
macUeCfg->macCellGrpCfg.phrCfgSetupPres = true;
if(macCellGroup->phr_Config->choice.setup)
- {
- macUeCfg->macCellGrpCfg.phrCfg.periodicTimer = \
- macCellGroup->phr_Config->choice.setup->phr_PeriodicTimer;
- macUeCfg->macCellGrpCfg.phrCfg.prohibitTimer = \
- macCellGroup->phr_Config->choice.setup->phr_ProhibitTimer;
- macUeCfg->macCellGrpCfg.phrCfg.txPowerFactor = \
- macCellGroup->phr_Config->choice.setup->phr_Tx_PowerFactorChange;
- macUeCfg->macCellGrpCfg.phrCfg.multiplePHR = \
- macCellGroup->phr_Config->choice.setup->multiplePHR;
- macUeCfg->macCellGrpCfg.phrCfg.dummy = \
- macCellGroup->phr_Config->choice.setup->dummy;
- macUeCfg->macCellGrpCfg.phrCfg.phrType2OtherCell = \
- macCellGroup->phr_Config->choice.setup->phr_Type2OtherCell;
- macUeCfg->macCellGrpCfg.phrCfg.phrOtherCG = \
- macCellGroup->phr_Config->choice.setup->phr_ModeOtherCG;
- }
- }
- }
+ {
+ macUeCfg->macCellGrpCfg.phrCfg.periodicTimer = \
+ macCellGroup->phr_Config->choice.setup->phr_PeriodicTimer;
+ macUeCfg->macCellGrpCfg.phrCfg.prohibitTimer = \
+ macCellGroup->phr_Config->choice.setup->phr_ProhibitTimer;
+ macUeCfg->macCellGrpCfg.phrCfg.txPowerFactor = \
+ macCellGroup->phr_Config->choice.setup->phr_Tx_PowerFactorChange;
+ macUeCfg->macCellGrpCfg.phrCfg.multiplePHR = \
+ macCellGroup->phr_Config->choice.setup->multiplePHR;
+ macUeCfg->macCellGrpCfg.phrCfg.dummy = \
+ macCellGroup->phr_Config->choice.setup->dummy;
+ macUeCfg->macCellGrpCfg.phrCfg.phrType2OtherCell = \
+ macCellGroup->phr_Config->choice.setup->phr_Type2OtherCell;
+ macUeCfg->macCellGrpCfg.phrCfg.phrOtherCG = \
+ macCellGroup->phr_Config->choice.setup->phr_ModeOtherCG;
+ }
+ }
+ }
}
/* Fill Physical Cell Group Reconfig */
if(cellGrp->physicalCellGroupConfig)
{
+ macUeCfg->phyCellGrpCfgPres = true;
phyCellGrpCfg = ((PhysicalCellGroupConfig_t *)(cellGrp->physicalCellGroupConfig));
if(phyCellGrpCfg->p_NR_FR1)
- {
- if(*(phyCellGrpCfg->p_NR_FR1) != macUeCfg->phyCellGrpCfg.pNrFr1)
+ {
+ if(*(phyCellGrpCfg->p_NR_FR1) != macUeCfg->phyCellGrpCfg.pNrFr1)
macUeCfg->phyCellGrpCfg.pNrFr1 = *(phyCellGrpCfg->p_NR_FR1);
- }
+ }
macUeCfg->phyCellGrpCfg.pdschHarqAckCodebook = phyCellGrpCfg->pdsch_HARQ_ACK_Codebook;
}
/* Fill SpCell Reconfig */
if(cellGrp->spCellConfig)
{
+ macUeCfg->spCellCfgPres = true;
spcellCfg = ((SpCellConfig_t *)(cellGrp->spCellConfig));
if(spcellCfg->servCellIndex)
- {
+ {
macUeCfg->spCellCfg.servCellIdx = *(spcellCfg->servCellIndex);
- }
+ }
/* Fill Serving cell Reconfig info */
- if(cellGrp->spCellConfig->spCellConfigDedicated)
- {
- servCellCfg = ((ServingCellConfig_t *)(cellGrp->spCellConfig->spCellConfigDedicated));
+ if(cellGrp->spCellConfig->spCellConfigDedicated)
+ {
+ servCellCfg = ((ServingCellConfig_t *)(cellGrp->spCellConfig->spCellConfigDedicated));
ret = extractSpCellDedicatedCfg(servCellCfg, &macUeCfg->spCellCfg.servCellCfg);
- if(ret == RFAILED)
- {
- DU_LOG("\nERROR --> F1AP : Failed at extractSpCellDedicatedCfg()");
- }
- }
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed at extractSpCellDedicatedCfg()");
+ }
+ }
}
}
return ret;
}
break;
default:
- DU_LOG("\nF1AP:Invalid Event type %ld at FreeCuToDuInfo()", \
+ DU_LOG("\nERROR --> F1AP : Invalid Event type %ld at FreeCuToDuInfo()", \
rrcMsg->iE_Extensions->list.array[ieIdx]->id);
break;
}
DRBs_ToBeSetup_Item_t *drbSetItem = NULLP;
uint8_t flowIdx =0;
uint8_t drbIdx =0;
-
+
if(drbSet->list.array != NULLP)
{
for(drbIdx=0; drbIdx<drbSet->list.count; drbIdx++)
{
- if(drbIdx==0&&drbSet->list.array[drbIdx] != NULLP)
- {
- drbSetItem =&drbSet->list.array[drbIdx]->value.choice.DRBs_ToBeSetup_Item;
- if(drbSetItem->qoSInformation.choice.choice_extension != NULLP)
- {
- if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
- qoS_Characteristics.choice.non_Dynamic_5QI !=NULLP)
- {
- if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
- qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow!=NULLP)
- {
- if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
- qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume!=NULLP)
- {
-
- if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sST.buf!=NULLP)
- {
-
- if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sD!=NULLP)
- {
-
- if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sD->\
- buf!=NULLP)
- {
-
- if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.\
- flows_Mapped_To_DRB_List.list.array != NULLP)
- {
-
- for(flowIdx=0;flowIdx<drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
- DRB_Information.flows_Mapped_To_DRB_List.list.count; flowIdx++)
- {
-
- if(flowIdx==0&&drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
- DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]!=NULLP)
- {
- if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
- DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
- qoSFlowLevelQoSParameters.\
- qoS_Characteristics.choice.non_Dynamic_5QI!=NULLP)
- {
- if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
- DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
- qoSFlowLevelQoSParameters.\
- qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow!=NULLP)
- {
-
- if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
- DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
- qoSFlowLevelQoSParameters.\
- qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume!=NULLP)
- {
- freeAperDecodeULTnlInfo(&drbSetItem->uLUPTNLInformation_ToBeSetup_List);
- free(drbSetItem->uLConfiguration);
-
-
- free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
- DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
- qoSFlowLevelQoSParameters.\
- qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume);
- }
-
- free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
- DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
- qoSFlowLevelQoSParameters.\
- qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow);
- }
-
- free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
-
- DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
- qoSFlowLevelQoSParameters.\
- qoS_Characteristics.choice.non_Dynamic_5QI);
- }
- }
- if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
- DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]!=NULLP)
- {
-
- free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
- DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]);
- }
- }
-
- free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
- DRB_Information.flows_Mapped_To_DRB_List.list.array);
- }
-
- free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
- DRB_Information.sNSSAI.sD->buf);
- }
-
- free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sD);
- }
-
- free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sST.buf);
-
- }
-
- free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+ if(drbIdx==0&&drbSet->list.array[drbIdx] != NULLP)
+ {
+ drbSetItem =&drbSet->list.array[drbIdx]->value.choice.DRBs_ToBeSetup_Item;
+ if(drbSetItem->qoSInformation.choice.choice_extension != NULLP)
+ {
+ if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+ qoS_Characteristics.choice.non_Dynamic_5QI !=NULLP)
+ {
+ if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+ qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow!=NULLP)
+ {
+ if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+ qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume!=NULLP)
+ {
- qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume);
- }
+ if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sST.buf!=NULLP)
+ {
+
+ if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sD!=NULLP)
+ {
+
+ if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sD->\
+ buf!=NULLP)
+ {
+
+ if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.\
+ flows_Mapped_To_DRB_List.list.array != NULLP)
+ {
+
+ for(flowIdx=0;flowIdx<drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.flows_Mapped_To_DRB_List.list.count; flowIdx++)
+ {
+
+ if(flowIdx==0&&drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]!=NULLP)
+ {
+ if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
+ qoSFlowLevelQoSParameters.\
+ qoS_Characteristics.choice.non_Dynamic_5QI!=NULLP)
+ {
+ if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
+ qoSFlowLevelQoSParameters.\
+ qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow!=NULLP)
+ {
+
+ if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
+ qoSFlowLevelQoSParameters.\
+ qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume!=NULLP)
+ {
+
+
+ free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
+ qoSFlowLevelQoSParameters.\
+ qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume);
+ }
+
+ free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
+ qoSFlowLevelQoSParameters.\
+ qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow);
+ }
+
+ free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+
+ DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
+ qoSFlowLevelQoSParameters.\
+ qoS_Characteristics.choice.non_Dynamic_5QI);
+ }
+ }
+ if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]!=NULLP)
+ {
+
+ free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]);
+ }
+ }
+
+ free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.flows_Mapped_To_DRB_List.list.array);
+ }
+
+ free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.sNSSAI.sD->buf);
+ }
+
+ free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sD);
+ }
+
+ free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sST.buf);
+
+ }
+
+ free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+
+ qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume);
+ }
- free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
- qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow);
- }
+ free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+ qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow);
+ }
- free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
- qoS_Characteristics.choice.non_Dynamic_5QI);
- }
- free(drbSetItem->qoSInformation.choice.choice_extension);
- }
- }
- if(drbSet->list.array[drbIdx]!=NULLP)
- {
- free(drbSet->list.array[drbIdx]);
- }
+ free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+ qoS_Characteristics.choice.non_Dynamic_5QI);
+ }
+ free(drbSetItem->qoSInformation.choice.choice_extension);
+ }
+ freeAperDecodeULTnlInfo(&drbSetItem->uLUPTNLInformation_ToBeSetup_List);
+ if(drbSetItem->uLConfiguration)
+ {
+ free(drbSetItem->uLConfiguration);
+ }
+ }
+ if(drbSet->list.array[drbIdx]!=NULLP)
+ {
+ free(drbSet->list.array[drbIdx]);
+ }
}
free(drbSet->list.array);
}
cellGrp = (CellGroupConfigRrc_t *)cellInfo;
ret = extractUeReCfgCellInfo(cellGrp, macUeCfg);
if(ret == RFAILED)
- DU_LOG("\nF1AP: Failed at procUeReCfgCellInfo()");
+ DU_LOG("\nERROR --> F1AP : Failed at procUeReCfgCellInfo()");
}
if(ret == RFAILED)
{
/* Filling DL modulation info */
if(ueNrCap->featureSets && ueNrCap->featureSets->featureSetsDownlinkPerCC && \
- ueNrCap->featureSets->featureSetsDownlinkPerCC->list.array[0] && \
- ueNrCap->featureSets->featureSetsDownlinkPerCC->list.array[0]->supportedModulationOrderDL)
+ ueNrCap->featureSets->featureSetsDownlinkPerCC->list.array[0] && \
+ ueNrCap->featureSets->featureSetsDownlinkPerCC->list.array[0]->supportedModulationOrderDL)
{
switch(*(ueNrCap->featureSets->featureSetsDownlinkPerCC->list.array[0]->supportedModulationOrderDL))
{
- case ModulationOrder_qpsk:
- {
- ueCfg->dlModInfo.modOrder = MOD_ORDER_QPSK;
- break;
- }
- case ModulationOrder_qam16:
- {
- ueCfg->dlModInfo.modOrder = MOD_ORDER_QAM16;
- break;
- }
- case ModulationOrder_qam64:
- {
- ueCfg->dlModInfo.modOrder = MOD_ORDER_QAM64;
- ueCfg->dlModInfo.mcsIndex = PDSCH_MCS_INDEX;
- ueCfg->dlModInfo.mcsTable = MCS_TABLE_QAM64;
- break;
- }
- case ModulationOrder_qam256:
- {
- ueCfg->dlModInfo.modOrder = MOD_ORDER_QAM256;
- break;
- }
- default:
- {
- DU_LOG("\nDU APP: Incorrect downlink modulation order received. Reatining old modulation configuration");
- memcpy(&ueCfg->dlModInfo, &oldUeCfg->dlModInfo, sizeof(ModulationInfo));
- break;
- }
+ case ModulationOrder_qpsk:
+ {
+ ueCfg->dlModInfo.modOrder = MOD_ORDER_QPSK;
+ break;
+ }
+ case ModulationOrder_qam16:
+ {
+ ueCfg->dlModInfo.modOrder = MOD_ORDER_QAM16;
+ break;
+ }
+ case ModulationOrder_qam64:
+ {
+ ueCfg->dlModInfo.modOrder = MOD_ORDER_QAM64;
+ ueCfg->dlModInfo.mcsIndex = PDSCH_MCS_INDEX;
+ ueCfg->dlModInfo.mcsTable = MCS_TABLE_QAM64;
+ break;
+ }
+ case ModulationOrder_qam256:
+ {
+ ueCfg->dlModInfo.modOrder = MOD_ORDER_QAM256;
+ break;
+ }
+ default:
+ {
+ DU_LOG("\nERROR --> DU APP: Incorrect downlink modulation order received. Reatining old modulation configuration");
+ memcpy(&ueCfg->dlModInfo, &oldUeCfg->dlModInfo, sizeof(ModulationInfo));
+ break;
+ }
}
}
else
/* Filling UL modulation info */
if(ueNrCap->featureSets && ueNrCap->featureSets->featureSetsUplinkPerCC && \
- ueNrCap->featureSets->featureSetsUplinkPerCC->list.array[0] && \
- ueNrCap->featureSets->featureSetsUplinkPerCC->list.array[0]->supportedModulationOrderUL)
+ ueNrCap->featureSets->featureSetsUplinkPerCC->list.array[0] && \
+ ueNrCap->featureSets->featureSetsUplinkPerCC->list.array[0]->supportedModulationOrderUL)
{
switch(*(ueNrCap->featureSets->featureSetsUplinkPerCC->list.array[0]->supportedModulationOrderUL))
{
- case ModulationOrder_qpsk:
- {
- ueCfg->ulModInfo.modOrder = MOD_ORDER_QPSK;
- break;
- }
- case ModulationOrder_qam16:
- {
- ueCfg->ulModInfo.modOrder = MOD_ORDER_QAM16;
- ueCfg->ulModInfo.mcsIndex = PUSCH_MCS_INDEX;
- ueCfg->ulModInfo.mcsTable = MCS_TABLE_QAM64;
- break;
- }
- case ModulationOrder_qam64:
- {
- ueCfg->ulModInfo.modOrder = MOD_ORDER_QAM64;
- break;
- }
- case ModulationOrder_qam256:
- {
- ueCfg->ulModInfo.modOrder = MOD_ORDER_QAM256;
- break;
- }
- default:
- {
- DU_LOG("\nDU APP: Incorrect uplink modulation order received. Reatining old modulation configuration");
- memcpy(&ueCfg->ulModInfo, &oldUeCfg->ulModInfo, sizeof(ModulationInfo));
- break;
- }
- }
- }
- else
- {
- memcpy(&ueCfg->ulModInfo, &oldUeCfg->ulModInfo, sizeof(ModulationInfo));
- }
-}
-
-/*******************************************************************
- *
- * @brief Function to extract cellGrp Info present in cutoDu cont
+ case ModulationOrder_qpsk:
+ {
+ ueCfg->ulModInfo.modOrder = MOD_ORDER_QPSK;
+ break;
+ }
+ case ModulationOrder_qam16:
+ {
+ ueCfg->ulModInfo.modOrder = MOD_ORDER_QAM16;
+ ueCfg->ulModInfo.mcsIndex = PUSCH_MCS_INDEX;
+ ueCfg->ulModInfo.mcsTable = MCS_TABLE_QAM64;
+ break;
+ }
+ case ModulationOrder_qam64:
+ {
+ ueCfg->ulModInfo.modOrder = MOD_ORDER_QAM64;
+ break;
+ }
+ case ModulationOrder_qam256:
+ {
+ ueCfg->ulModInfo.modOrder = MOD_ORDER_QAM256;
+ break;
+ }
+ default:
+ {
+ DU_LOG("\nERROR --> DU APP: Incorrect uplink modulation order received. Reatining old modulation configuration");
+ memcpy(&ueCfg->ulModInfo, &oldUeCfg->ulModInfo, sizeof(ModulationInfo));
+ break;
+ }
+ }
+ }
+ else
+ {
+ memcpy(&ueCfg->ulModInfo, &oldUeCfg->ulModInfo, sizeof(ModulationInfo));
+ }
+}
+
+/*******************************************************************
+ *
+ * @brief Function to extract cellGrp Info present in cutoDu cont
*
* @details
*
* ****************************************************************/
CellGroupConfigRrc_t *extractCellGrpInfo(ProtocolExtensionContainer_4624P16_t *protocolIeExtn,\
- DuUeCfg *ueCfgDb)
+ DuUeCfg *ueCfgDb)
{
uint8_t idx2 =0;
uint16_t id =0;
extIeInfo->extensionValue.choice.CellGroupConfig.buf, recvBufLen, 0, 0);
if(rval.code == RC_FAIL || rval.code == RC_WMORE)
{
- DU_LOG("\nF1AP : ASN decode failed at decodeCellGrpCfg()");
+ DU_LOG("\nERROR --> F1AP : ASN decode failed at decodeCellGrpCfg()");
return NULLP;
}
xer_fprint(stdout, &asn_DEF_CellGroupConfigRrc, cellGrpCfg);
break;
}
default:
- DU_LOG("\nF1AP : Invalid IE received CUtoDURRCInformation:%d at decodeCellGrpCfg()", id);
+ DU_LOG("\nERROR --> F1AP : Invalid IE received CUtoDURRCInformation:%d at decodeCellGrpCfg()", id);
break;
}
}
procRlcLcCfg(srbItem->sRBID, srbItem->sRBID, RB_TYPE_SRB, RLC_AM, CONFIG_ADD, NULL, rlcLcToAdd);
/* Filling MAC INFO */
- ret = procMacLcCfg(srbItem->sRBID, RB_TYPE_SRB, CONFIG_ADD, NULL, NULL, macLcToAdd);
+ ret = procMacLcCfg(srbItem->sRBID, RB_TYPE_SRB, CONFIG_ADD, NULL,NULL, NULL, macLcToAdd, NULL);
if(ret == RFAILED)
{
- DU_LOG("\nF1AP:Failed at MAC LC Cfg in procSrbListToSetup()");
+ DU_LOG("\nERROR --> F1AP : Failed at MAC LC Cfg in procSrbListToSetup()");
return ret;
}
return ret;
srbItem = &srbCfg->list.array[srbIdx]->value.choice.SRBs_ToBeSetup_Item;
if(ueCfgDb->numMacLcs > MAX_NUM_LC)
{
- DU_LOG("\nF1AP: MAX LC Reached in MAC");
+ DU_LOG("\nERROR --> F1AP: MAX LC Reached in MAC");
ret = RFAILED;
break;
}
if(ueCfgDb->numRlcLcs > MAX_NUM_LC)
{
- DU_LOG("\nF1AP: MAX LC Reached in RLC");
+ DU_LOG("\nERROR --> F1AP: MAX LC Reached in RLC");
ret = RFAILED;
break;
}
ueCfgDb->numMacLcs++;
if(ret == RFAILED)
{
- DU_LOG("\nF1AP: Failed at extractSrbListToSetup()");
+ DU_LOG("\nERROR --> F1AP: Failed at extractSrbListToSetup()");
break;
}
}
*
* ****************************************************************/
-uint8_t procDrbListToSetup(uint8_t lcId, DRBs_ToBeSetup_Item_t *drbItem, LcCfg *macLcToAdd, RlcBearerCfg *rlcLcToAdd)
+uint8_t procDrbListToSetup(uint8_t lcId, DRBs_ToBeSetup_Item_t *drbItem,\
+DRBs_ToBeSetupMod_Item_t *drbSetupModItem, LcCfg *macLcToAdd, RlcBearerCfg *rlcLcToAdd, UpTnlCfg *upTnlInfo)
{
- uint8_t ret = ROK;
- /* Filling RLC INFO */
- procRlcLcCfg(drbItem->dRBID, lcId, RB_TYPE_DRB, drbItem->rLCMode, CONFIG_ADD, NULL, rlcLcToAdd);
+ if(drbItem != NULLP)
+ {
+ /* Filling RLC INFO */
+ procRlcLcCfg(drbItem->dRBID, lcId, RB_TYPE_DRB, drbItem->rLCMode, CONFIG_ADD, NULL, rlcLcToAdd);
- /* Filling MAC INFO */
- ret = procMacLcCfg(lcId, RB_TYPE_DRB, CONFIG_ADD, drbItem, NULL, macLcToAdd);
- if(ret == RFAILED)
- {
- DU_LOG("\nF1AP:Failed at RLC LC Cfg in extractDrbListToSetup()");
- return ret;
+ /* Filling MAC INFO */
+ if(procMacLcCfg(lcId, RB_TYPE_DRB, CONFIG_ADD, drbItem, NULL, NULL, macLcToAdd, upTnlInfo) != ROK)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed at RLC LC Cfg in procDrbListToSetup()");
+ return RFAILED;
+ }
}
+ else if(drbSetupModItem != NULLP)
+ {
+ procRlcLcCfg(drbSetupModItem->dRBID, lcId, RB_TYPE_DRB, drbSetupModItem->rLCMode, CONFIG_ADD, NULL, rlcLcToAdd);
- return ret;
+ if(procMacLcCfg(lcId, RB_TYPE_DRB, CONFIG_ADD, NULL, drbSetupModItem, NULL, macLcToAdd, upTnlInfo) != ROK)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed at RLC LC Cfg in procDrbListToSetup()");
+ return RFAILED;
+ }
+ }
+ return ROK;
}
/*******************************************************************
*
* ****************************************************************/
-uint8_t extractDrbListToSetup(uint8_t lcId, DRBs_ToBeSetup_List_t *drbCfg, DuUeCfg *ueCfgDb)
+uint8_t extractDrbListToSetup(uint8_t lcId, DRBs_ToBeSetup_List_t *drbCfg,DRBs_ToBeSetupMod_List_t *drbSetupModCfg,\
+uint8_t drbCount, DuUeCfg *ueCfgDb)
{
uint8_t ret, drbIdx;
DRBs_ToBeSetup_Item_t *drbItem = NULLP;
+ DRBs_ToBeSetupMod_ItemIEs_t *drbSetupModItem = NULLP;
ret = ROK;
- if(drbCfg)
+ if(drbCount > 0)
{
- for(drbIdx = 0; drbIdx < drbCfg->list.count; drbIdx++)
+ for(drbIdx = 0; drbIdx < drbCount; drbIdx++)
{
- drbItem = &drbCfg->list.array[drbIdx]->value.choice.DRBs_ToBeSetup_Item;
- if(ueCfgDb->numMacLcs > MAX_NUM_LC)
- {
- DU_LOG("\nF1AP: MAX LC Reached in MAC ");
- ret = RFAILED;
- break;
- }
- if(ueCfgDb->numRlcLcs > MAX_NUM_LC)
- {
- DU_LOG("\nF1AP: MAX LC Reached in RLC");
- ret = RFAILED;
- break;
- }
- memset(&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], 0, sizeof(LcCfg));
- memset(&ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], 0, sizeof(RlcBearerCfg));
- ret = procDrbListToSetup(lcId, drbItem, &ueCfgDb->macLcCfg[ueCfgDb->numMacLcs],\
- &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs]);
- ueCfgDb->numRlcLcs++;
- ueCfgDb->numMacLcs++;
- if(ret == RFAILED)
- {
- DU_LOG("\nF1AP: Failed at extractDrbListToSetup()");
- break;
- }
+ if(ueCfgDb->numMacLcs > MAX_NUM_LC)
+ {
+ DU_LOG("\nERROR --> F1AP : MAX LC Reached in MAC at extractDrbListToSetup()");
+ ret = RFAILED;
+ break;
+ }
+ if(ueCfgDb->numRlcLcs > MAX_NUM_LC)
+ {
+ DU_LOG("\nERROR --> F1AP : MAX LC Reached in RLC at extractDrbListToSetup()");
+ ret = RFAILED;
+ break;
+ }
+ memset(&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], 0, sizeof(LcCfg));
+ memset(&ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], 0, sizeof(RlcBearerCfg));
+
+ if(drbCfg != NULL)
+ {
+ drbItem = &drbCfg->list.array[drbIdx]->value.choice.DRBs_ToBeSetup_Item;
+ ret = procDrbListToSetup(lcId, drbItem, NULL, &ueCfgDb->macLcCfg[ueCfgDb->numMacLcs],\
+ &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], &ueCfgDb->upTnlInfo[ueCfgDb->numDrb]);
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed at extractDrbListToSetup()");
+ break;
+ }
+ }
+ else if(drbSetupModCfg != NULL)
+ {
+ drbSetupModItem = (DRBs_ToBeSetupMod_ItemIEs_t *) drbSetupModCfg->list.array[drbIdx];
+ ret = procDrbListToSetup(lcId, NULL, &(drbSetupModItem->value.choice.DRBs_ToBeSetupMod_Item) ,\
+ &ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs],\
+ &ueCfgDb->upTnlInfo[ueCfgDb->numDrb]);
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed at extractDrbListToSetup()");
+ break;
+ }
+ }
+ ueCfgDb->numRlcLcs++;
+ ueCfgDb->numMacLcs++;
+ ueCfgDb->numDrb++;
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed at extractDrbListToSetup()");
+ break;
+ }
}
}
else
DU_ALLOC_SHRABL_BUF(dlRrcMsg->rrcMsgPdu, dlRrcMsg->rrcMsgSize);
if(!dlRrcMsg->rrcMsgPdu)
{
- DU_LOG("\nDU APP : Memory allocation failed for RRC Msg in procUeCtxtSetupReq");
+ DU_LOG("\nERROR --> DU APP : Memory allocation failed for RRC Msg in extractDlRrcMsg()");
ret = RFAILED;
}
else
DU_ALLOC(ueCapRatContList, sizeof(UE_CapabilityRAT_ContainerListRRC_t));
if(!ueCapRatContList)
{
- DU_LOG("\nF1AP : Memory allocation failed in extractUeCapability");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in extractUeCapability");
return NULLP;
}
memset(ueCapRatContList, 0, sizeof(UE_CapabilityRAT_ContainerListRRC_t));
ueCapablityListBuf->buf, recvBufLen, 0, 0);
if(rval.code == RC_FAIL || rval.code == RC_WMORE)
{
- DU_LOG("\nF1AP : ASN decode failed at decodeCellGrpCfg()");
+ DU_LOG("\nERROR --> F1AP : ASN decode failed at decodeCellGrpCfg()");
return NULLP;
}
xer_fprint(stdout, &asn_DEF_UE_CapabilityRAT_ContainerListRRC, ueCapRatContList);
DU_ALLOC(ueNrCap, sizeof(UE_NR_Capability_t));
if(!ueNrCap)
{
- DU_LOG("\nF1AP : Memory allocation failed in extractUeCapability");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in extractUeCapability");
DU_FREE(ueCapRatContList, sizeof(UE_CapabilityRAT_ContainerListRRC_t));
return NULLP;
}
ueCapRatContList->list.array[idx]->ue_CapabilityRAT_Container.buf, recvBufLen, 0, 0);
if(rval.code == RC_FAIL || rval.code == RC_WMORE)
{
- DU_LOG("\nF1AP : ASN decode failed at decodeCellGrpCfg()");
+ DU_LOG("\nERROR --> F1AP : ASN decode failed at decodeCellGrpCfg()");
return NULLP;
}
xer_fprint(stdout, &asn_DEF_UE_NR_Capability, ueNrCap);
break;
}
default:
- printf("\nF1AP: Invalid event type %ld",ueSetReq->protocolIEs.list.array[ieIdx]->id);
+ DU_LOG("\nERROR --> F1AP: Invalid event type %ld " ,ueSetReq->protocolIEs.list.array[ieIdx]->id);
}
free(ueSetReq->protocolIEs.list.array[ieIdx]);
}
* ****************************************************************/
uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
{
- uint8_t ret, ieIdx, ueIdx, lcId, cellIdx;
+ uint8_t ret=0, ieIdx=0, ueIdx=0, lcId=0, cellIdx=0;
bool ueCbFound = false;
- uint32_t gnbCuUeF1apId, gnbDuUeF1apId, bitRateSize;
- DuUeCb *duUeCb = NULLP;
- UEContextSetupRequest_t *ueSetReq = NULLP;
-
+ uint32_t gnbCuUeF1apId=0, gnbDuUeF1apId=0, bitRateSize=0;
+ DuUeCb *duUeCb = NULL;
+ UEContextSetupRequest_t *ueSetReq = NULL;
+ DRBs_ToBeSetup_List_t *drbCfg = NULL;
+
ret = ROK;
-
+
ueSetReq = &f1apMsg->choice.initiatingMessage->value.choice.UEContextSetupRequest;
for(ieIdx=0; (ieIdx < ueSetReq->protocolIEs.list.count && ret == ROK); ieIdx++)
{
switch(ueSetReq->protocolIEs.list.array[ieIdx]->id)
{
- case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
- {
- gnbCuUeF1apId = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_UE_F1AP_ID;
- break;
- }
- case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
- {
- gnbDuUeF1apId = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID;
- break;
- }
- case ProtocolIE_ID_id_ServCellIndex:
- {
- cellIdx = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.ServCellIndex;
+ case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
+ {
+ gnbCuUeF1apId = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_UE_F1AP_ID;
+ break;
+ }
+ case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
+ {
+ gnbDuUeF1apId = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID;
+ break;
+ }
+ case ProtocolIE_ID_id_ServCellIndex:
+ {
+ cellIdx = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.ServCellIndex;
for(ueIdx = 0; ueIdx < MAX_NUM_UE; ueIdx++)
- {
- if((duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbDuUeF1apId == gnbDuUeF1apId)&&\
- (duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbCuUeF1apId == gnbCuUeF1apId))
- {
- ueCbFound = true;
+ {
+ if((duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbDuUeF1apId == gnbDuUeF1apId)&&\
+ (duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbCuUeF1apId == gnbCuUeF1apId))
+ {
+ ueCbFound = true;
duUeCb = &duCb.actvCellLst[cellIdx]->ueCb[ueIdx];
DU_ALLOC(duUeCb->f1UeDb, sizeof(F1UeContextSetupDb));
if(duUeCb->f1UeDb)
{
memset(duUeCb->f1UeDb, 0, sizeof(F1UeContextSetupDb));
- duUeCb->f1UeDb->actionType = UE_CTXT_SETUP;
- duUeCb->f1UeDb->cellIdx = cellIdx;
- }
- else
- {
- DU_LOG("\nF1AP: Memory Alloc Failed at procF1UeContextSetupReq()");
+ duUeCb->f1UeDb->actionType = UE_CTXT_SETUP;
+ duUeCb->f1UeDb->cellIdx = cellIdx;
+ }
+ else
+ {
+ DU_LOG("\nERROR --> F1AP: Memory Alloc Failed at procF1UeContextSetupReq()");
ret = RFAILED;
- }
- }
- else
- ueCbFound = false;
-
- }
- if(!ueCbFound)
- {
- DU_LOG("\nF1AP: DuUeCb is not found at procF1UeContextSetupReq()");
+ }
+ }
+ else
+ ueCbFound = false;
+
+ }
+ if(!ueCbFound)
+ {
+ DU_LOG("\nERROR --> F1AP: DuUeCb is not found at procF1UeContextSetupReq()");
ret = RFAILED;
- }
- break;
- }
+ }
+ break;
+ }
case ProtocolIE_ID_id_SpCellULConfigured:
- /* Indicates whether the gNB-CU requests the gNB-DU to configure the uplink as no UL,
- UL, SUL or UL+SUL for the indicated cell for the UE */
- break;
+ /* Indicates whether the gNB-CU requests the gNB-DU to configure the uplink as no UL,
+ UL, SUL or UL+SUL for the indicated cell for the UE */
+ break;
case ProtocolIE_ID_id_CUtoDURRCInformation:
- {
+ {
if(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.CUtoDURRCInformation.uE_CapabilityRAT_ContainerList)
{
duUeCb->f1UeDb->duUeCfg.ueNrCapability = \
- extractUeCapability(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.CUtoDURRCInformation.\
- uE_CapabilityRAT_ContainerList, duUeCb);
+ extractUeCapability(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.CUtoDURRCInformation.\
+ uE_CapabilityRAT_ContainerList, duUeCb);
}
- if(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.CUtoDURRCInformation.iE_Extensions)
- {
+ if(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.CUtoDURRCInformation.iE_Extensions)
+ {
duUeCb->f1UeDb->duUeCfg.cellGrpCfg = extractCellGrpInfo(ueSetReq->protocolIEs.list.array[ieIdx]->\
- value.choice.CUtoDURRCInformation.iE_Extensions, &duUeCb->f1UeDb->duUeCfg);
- if(!duUeCb->f1UeDb->duUeCfg.cellGrpCfg)
- {
- DU_LOG("\n F1AP: Failed to extract cell Grp Info");
- //TODO: Update the failure cause in ue context Setup Response
- ret = RFAILED;
- }
- }
+ value.choice.CUtoDURRCInformation.iE_Extensions, &duUeCb->f1UeDb->duUeCfg);
+ if(!duUeCb->f1UeDb->duUeCfg.cellGrpCfg)
+ {
+ DU_LOG("\nERROR --> F1AP: Failed to extract cell Grp Info");
+ //TODO: Update the failure cause in ue context Setup Response
+ ret = RFAILED;
+ }
+ }
break;
}
case ProtocolIE_ID_id_SCell_ToBeSetup_List:
- {
- DU_LOG("\nDU_APP: Received SCell to be added");
- DU_LOG("\nDU_APP: Not processing the SCell_ToBeSetup_List");
- break;
- }
+ {
+ DU_LOG("\nINFO --> DU_APP: Received SCell_ToBeSetup_List but Not processing the list");
+ break;
+ }
case ProtocolIE_ID_id_SRBs_ToBeSetup_List:
- {
- if(extractSrbListToSetup(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.SRBs_ToBeSetup_List,\
- &duUeCb->f1UeDb->duUeCfg))
- {
- DU_LOG("\nDU_APP: Failed at extractSrbListToSetup()");
- //TODO: Update the failure cause in ue context Setup Response
- ret = RFAILED;
- }
- break;
- }
+ {
+ if(extractSrbListToSetup(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.SRBs_ToBeSetup_List,\
+ &duUeCb->f1UeDb->duUeCfg))
+ {
+ DU_LOG("\nERROR --> DU APP : Failed at extractSrbListToSetup()");
+ //TODO: Update the failure cause in ue context Setup Response
+ ret = RFAILED;
+ }
+ break;
+ }
case ProtocolIE_ID_id_DRBs_ToBeSetup_List:
- {
- lcId = getDrbLcId(&duUeCb->drbBitMap);
- if(lcId != RFAILED)
- {
- if(extractDrbListToSetup(lcId, &ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.DRBs_ToBeSetup_List,\
- &duUeCb->f1UeDb->duUeCfg))
- {
- DU_LOG("\nDU_APP: Failed at extractDrbListToSetup()");
- //TODO: Update the failure cause in ue context Setup Response
- ret = RFAILED;
- }
- }
- else
- ret = RFAILED;
+ {
+ lcId = getDrbLcId(&duUeCb->drbBitMap);
+ if(lcId != RFAILED)
+ {
+ drbCfg = &ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.DRBs_ToBeSetup_List;
+ if(extractDrbListToSetup(lcId, drbCfg, NULL, drbCfg->list.count, &duUeCb->f1UeDb->duUeCfg))
+ {
+ DU_LOG("\nERROR --> DU APP : Failed at extractDrbListToSetup()");
+ //TODO: Update the failure cause in ue context Setup Response
+ ret = RFAILED;
+ }
+ }
+ else
+ ret = RFAILED;
break;
- }
- case ProtocolIE_ID_id_RRCContainer:
- {
- /* Filling Dl RRC Msg Info */
- DU_ALLOC_SHRABL_BUF(duUeCb->f1UeDb->dlRrcMsg, sizeof(F1DlRrcMsg));
- if(!duUeCb->f1UeDb->dlRrcMsg)
- {
- DU_LOG("\nDU APP : Memory allocation failed for DL RRC Msg in procUeCtxtSetupReq()");
- ret = RFAILED;
- }
- else
- {
- memset(duUeCb->f1UeDb->dlRrcMsg, 0, sizeof(F1DlRrcMsg));
- ret = extractDlRrcMsg(gnbDuUeF1apId, gnbCuUeF1apId, duUeCb->f1UeDb->dlRrcMsg,\
- &ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer);
- }
- break;
- }
- case ProtocolIE_ID_id_RRCDeliveryStatusRequest:
- {
- if(duUeCb->f1UeDb->dlRrcMsg->rrcMsgPdu)
- {
- duUeCb->f1UeDb->dlRrcMsg->deliveryStatRpt = true;
- }
- else
- {
- DU_LOG("\nIgnoring delivery report, since rrcContainer is not present");
- }
- break;
- }
- case ProtocolIE_ID_id_GNB_DU_UE_AMBR_UL:
- {
+ }
+ case ProtocolIE_ID_id_RRCContainer:
+ {
+ /* Filling Dl RRC Msg Info */
+ DU_ALLOC_SHRABL_BUF(duUeCb->f1UeDb->dlRrcMsg, sizeof(F1DlRrcMsg));
+ if(!duUeCb->f1UeDb->dlRrcMsg)
+ {
+ DU_LOG("\nERROR --> DU APP : Memory allocation failed for DL RRC Msg in procUeCtxtSetupReq()");
+ ret = RFAILED;
+ }
+ else
+ {
+ duUeCb->f1UeDb->dlRrcMsgPres = true;
+ memset(duUeCb->f1UeDb->dlRrcMsg, 0, sizeof(F1DlRrcMsg));
+ ret = extractDlRrcMsg(gnbDuUeF1apId, gnbCuUeF1apId, duUeCb->f1UeDb->dlRrcMsg,\
+ &ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer);
+ }
+ break;
+ }
+ case ProtocolIE_ID_id_RRCDeliveryStatusRequest:
+ {
+ if(duUeCb->f1UeDb->dlRrcMsg->rrcMsgPdu)
+ {
+ duUeCb->f1UeDb->dlRrcMsg->deliveryStatRpt = true;
+ }
+ else
+ {
+ DU_LOG("\nERROR --> Ignoring delivery report, since rrcContainer is not present");
+ }
+ break;
+ }
+ case ProtocolIE_ID_id_GNB_DU_UE_AMBR_UL:
+ {
/* MaximumBitRate Uplink */
- bitRateSize = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.size;
- if(bitRateSize > 0)
- {
+ bitRateSize = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.size;
+ if(bitRateSize > 0)
+ {
DU_ALLOC_SHRABL_BUF(duUeCb->f1UeDb->duUeCfg.ambrCfg, bitRateSize);
- if(!duUeCb->f1UeDb->duUeCfg.ambrCfg)
- {
- DU_LOG("\nDU APP : Memory allocation failed for bitRate in procUeCtxtSetupReq");
- ret = RFAILED;
- }
- else
- {
- memset(duUeCb->f1UeDb->duUeCfg.ambrCfg, 0, sizeof(AmbrCfg));
+ if(!duUeCb->f1UeDb->duUeCfg.ambrCfg)
+ {
+ DU_LOG("\nERROR --> DU APP : Memory allocation failed for bitRate in procUeCtxtSetupReq");
+ ret = RFAILED;
+ }
+ else
+ {
+ memset(duUeCb->f1UeDb->duUeCfg.ambrCfg, 0, sizeof(AmbrCfg));
memcpy(&duUeCb->f1UeDb->duUeCfg.ambrCfg->ulBr,
- ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.buf, bitRateSize);
- duUeCb->f1UeDb->duUeCfg.ambrCfg->dlBr = 0;
- }
- }
- else
- ret = RFAILED;
- break;
- }
- default:
- {
- break;
- }
+ ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.buf, bitRateSize);
+ }
+ }
+ else
+ ret = RFAILED;
+ break;
+ }
+ default:
+ {
+ break;
+ }
}
}
if(ret == RFAILED)
{
/*TODO : Negative case*/
// BuildAndSendUeContextSetupRsp(ueIdx, cellId);
- DU_LOG("F1AP: Failed to process UE CNTXT SETUP REQ at procF1UeContextSetupReq()");
+ DU_LOG("\nERROR --> F1AP: Failed to process UE CNTXT SETUP REQ at procF1UeContextSetupReq()");
}
else
ret = duProcUeContextSetupRequest(duUeCb);
-
+
freeAperDecodeF1UeContextSetupReq(ueSetReq);
return ret;
}
-
/*******************************************************************
- * @brief Free the memory allocated for UE Setup response
+ * @brief Free the memory allocated for Dl Tunnel Info
*
* @details
*
- * Function : FreeUeContextSetupRsp
+ * Function : freeDlTnlInfo
*
* Functionality:
- * Free the memory allocated for UE Setup response
+ * Free the memory allocated for Dl Tunnel Info
*
- * @params[in] F1AP PDU for UE setup response
- * @return ROK - success
- * RFAILED - failure
+ * @params[in] DLUPTNLInformation_ToBeSetup_List_t *
+ * @return void
*
* ****************************************************************/
-void FreeUeContextSetupRsp(F1AP_PDU_t *f1apMsg)
+
+void freeDlTnlInfo(DLUPTNLInformation_ToBeSetup_List_t *tnlInfo)
{
- uint8_t idx;
- UEContextSetupResponse_t *ueSetRsp = NULLP;
+ uint8_t arrIdx = 0;
- if(f1apMsg)
+ for(arrIdx=0; arrIdx < tnlInfo->list.count; arrIdx++)
{
- if(f1apMsg->choice.successfulOutcome)
- {
- ueSetRsp = &f1apMsg->choice.successfulOutcome->value.choice.\
- UEContextSetupResponse;
- if(ueSetRsp->protocolIEs.list.array)
- {
- for(idx = 0; idx < ueSetRsp->protocolIEs.list.count; idx++)
- {
- if(ueSetRsp->protocolIEs.list.array[idx])
- {
- switch(ueSetRsp->protocolIEs.list.array[idx]->id)
- {
- case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
+ DU_FREE(tnlInfo->list.array[arrIdx]->dLUPTNLInformation.choice.gTPTunnel, sizeof(GTPTunnel_t));
+ }
+}
+
+/*******************************************************************
+ * @brief Free the memory allocated for DRB setup List
+ *
+ * @details
+ *
+ * Function : freeDrbSetupList
+ *
+ * Functionality:
+ * Free the memory allocated for DRB setup list
+ *
+ * @params[in] DRBs_Setup_List_t *
+ * @return void
+ *
+ * ****************************************************************/
+void freeDrbSetupList(DRBs_Setup_List_t *drbSetupList)
+{
+ uint8_t arrIdx = 0;
+ DRBs_Setup_ItemIEs_t *drbItemIe = NULLP;
+
+ for(arrIdx = 0; arrIdx < drbSetupList->list.count; arrIdx++)
+ {
+ drbItemIe = ((DRBs_Setup_ItemIEs_t *)drbSetupList->list.array[arrIdx]);
+ freeDlTnlInfo(&drbItemIe->value.choice.DRBs_Setup_Item.dLUPTNLInformation_ToBeSetup_List);
+ }
+}
+
+/*******************************************************************
+ * @brief Free the memory allocated for UE Setup response
+ *
+ * @details
+ *
+ * Function : FreeUeContextSetupRsp
+ *
+ * Functionality:
+ * Free the memory allocated for UE Setup response
+ *
+ * @params[in] F1AP PDU for UE setup response
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+void FreeUeContextSetupRsp(F1AP_PDU_t *f1apMsg)
+{
+ uint8_t idx;
+ UEContextSetupResponse_t *ueSetRsp = NULLP;
+
+ if(f1apMsg)
+ {
+ if(f1apMsg->choice.successfulOutcome)
+ {
+ ueSetRsp = &f1apMsg->choice.successfulOutcome->value.choice.\
+ UEContextSetupResponse;
+ if(ueSetRsp->protocolIEs.list.array)
+ {
+ for(idx = 0; idx < ueSetRsp->protocolIEs.list.count; idx++)
+ {
+ if(ueSetRsp->protocolIEs.list.array[idx])
+ {
+ switch(ueSetRsp->protocolIEs.list.array[idx]->id)
+ {
+ case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
break;
case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
break;
}
break;
}
+ case ProtocolIE_ID_id_DRBs_Setup_List:
+ {
+ freeDrbSetupList(&ueSetRsp->protocolIEs.list.array[idx]->value.choice.DRBs_Setup_List);
+ break;
+ }
default:
- DU_LOG("\nDUAPP: Invalid Id %ld at FreeUeContextSetupRsp()", ueSetRsp->protocolIEs.list.array[idx]->id);
+ DU_LOG("\nERROR --> DUAPP: Invalid Id %ld at FreeUeContextSetupRsp()",\
+ ueSetRsp->protocolIEs.list.array[idx]->id);
break;
}
DU_FREE(ueSetRsp->protocolIEs.list.array[idx],\
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG( "\n F1AP : Could not encode UeCntxtDuToCuInfo (at %s)\n",\
+ DU_LOG( "\nERROR --> F1AP : Could not encode UeCntxtDuToCuInfo (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
return RFAILED;
}
else
{
- DU_LOG("\n F1AP : Created APER encoded buffer for UeCntxtDuToCuInfo\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for UeCntxtDuToCuInfo\n");
for(int i=0; i< encBufSize; i++)
{
printf("%x",encBuf[i]);
DU_ALLOC(duToCuCellGrp->buf, duToCuCellGrp->size);
if(!duToCuCellGrp->buf)
{
- DU_LOG("\nF1AP : Memory allocation failed in UeCntxtDuToCuInfo");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in UeCntxtDuToCuInfo");
}
memcpy(duToCuCellGrp->buf, encBuf, duToCuCellGrp->size);
return ROK;
}
+/*******************************************************************
+ *
+ * @brief Fills Dl Gtp tunnel Info
+ *
+ * @details
+ *
+ * Function : fillGtpTunnelforDl
+ *
+ * Functionality: Fills Dl Gtp tunnel Info
+ *
+ * @params[in]
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+
+uint8_t fillGtpTunnelforDl(GTPTunnel_t *gtpDl, GtpTnlCfg *gtpUeCfg)
+{
+ uint8_t bufSize = 0;
+
+ gtpDl->transportLayerAddress.size = 4*sizeof(uint8_t);
+ DU_ALLOC(gtpDl->transportLayerAddress.buf, gtpDl->transportLayerAddress.size);
+ if(gtpDl->transportLayerAddress.buf == NULLP)
+ {
+ return RFAILED;
+ }
+ memcpy(gtpDl->transportLayerAddress.buf, >pUeCfg->dlTnlAddress, gtpDl->transportLayerAddress.size);
+
+ /*GTP TEID*/
+ gtpDl->gTP_TEID.size = 4 * sizeof(uint8_t);
+ DU_ALLOC(gtpDl->gTP_TEID.buf, gtpDl->gTP_TEID.size);
+ if(gtpDl->gTP_TEID.buf == NULLP)
+ {
+ return RFAILED;
+ }
+ bufSize = 3; /*forming an Octect String*/
+ fillTeIdString(bufSize, gtpUeCfg->teId, gtpDl->gTP_TEID.buf);
+
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fills DL Tunnel Setup List
+ *
+ * @details
+ *
+ * Function : fillDlTnlSetupList
+ *
+ * Functionality: Fills the DL Tunnel Setup List
+ *
+ * @params[in]
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+
+uint8_t fillDlTnlSetupList(DLUPTNLInformation_ToBeSetup_List_t *dlTnlInfo, UpTnlCfg *tnlCfg)
+{
+ uint8_t ret = ROK, arrIdx = 0, eleCount = 0;
+
+ eleCount = 1;
+ dlTnlInfo->list.count = eleCount;
+ dlTnlInfo->list.size = (eleCount * sizeof(DLUPTNLInformation_ToBeSetup_Item_t *));
+
+ /* Initialize the DL Tnl Setup List Members */
+ DU_ALLOC(dlTnlInfo->list.array, dlTnlInfo->list.size);
+ if(dlTnlInfo->list.array == NULLP)
+ {
+ DU_LOG(" ERROR --> F1AP : Memory allocation for DL Tnl Setup List in fillDlTnlSetupList()");
+ ret = RFAILED;
+ }
+ for(arrIdx=0; arrIdx < eleCount; arrIdx++)
+ {
+ DU_ALLOC(dlTnlInfo->list.array[arrIdx], sizeof(DLUPTNLInformation_ToBeSetup_Item_t));
+ if(dlTnlInfo->list.array[arrIdx] == NULLP)
+ {
+ DU_LOG(" ERROR --> F1AP : Memory allocation for arrIdx [%d] failed in fillDlTnlSetupList()", arrIdx);
+ return RFAILED;
+ }
+ dlTnlInfo->list.array[arrIdx]->dLUPTNLInformation.present = UPTransportLayerInformation_PR_gTPTunnel;
+ DU_ALLOC(dlTnlInfo->list.array[arrIdx]->dLUPTNLInformation.choice.gTPTunnel, sizeof(GTPTunnel_t));
+ if(dlTnlInfo->list.array[arrIdx]->dLUPTNLInformation.choice.gTPTunnel == NULLP)
+ {
+ DU_LOG(" ERROR --> F1AP : Memory allocation for DL tunnel info in fillDlTnlSetupList()");
+ return RFAILED;
+ }
+ ret = fillGtpTunnelforDl(dlTnlInfo->list.array[arrIdx]->dLUPTNLInformation.choice.gTPTunnel,\
+ tnlCfg->tnlCfg1);
+ if(ret != ROK)
+ break;
+ }
+ return ret;
+}
+
+/*******************************************************************
+ *
+ * @brief Fills the Drb Setup List for Ue Context Setup Response
+ *
+ * @details
+ *
+ * Function : fillDrbSetupList
+ *
+ * Functionality: Fills the Drb Setup List for Ue Context Setup Response
+ *
+ * @params[in]
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t fillDrbSetupList(DRBs_Setup_List_t *drbSetupList, DuUeCfg *ueCfg)
+{
+ uint8_t ret = ROK, arrIdx = 0, eleCount = 0;
+ DRBs_Setup_ItemIEs_t *drbItemIe = NULLP;
+
+ eleCount = ueCfg->numDrb;
+ drbSetupList->list.count = eleCount;
+ drbSetupList->list.size = \
+ (eleCount * sizeof(DRBs_Setup_Item_t *));
+
+ /* Initialize the Drb Setup List Members */
+ DU_ALLOC(drbSetupList->list.array, drbSetupList->list.size);
+ if(drbSetupList->list.array == NULLP)
+ {
+ DU_LOG(" ERROR --> F1AP : Memory allocation for DRB Setup List in fillDrbSetupList()");
+ ret = RFAILED;
+ }
+
+ for(arrIdx=0; arrIdx < eleCount; arrIdx++)
+ {
+ DU_ALLOC(drbSetupList->list.array[arrIdx], sizeof(DRBs_Setup_Item_t));
+ if(drbSetupList->list.array[arrIdx] == NULLP)
+ {
+ DU_LOG(" ERROR --> F1AP : Memory allocation for arrIdx [%d] failed in fillDrbSetupList()", arrIdx);
+ return RFAILED;
+ }
+ drbItemIe = ((DRBs_Setup_ItemIEs_t *)drbSetupList->list.array[arrIdx]);
+ drbItemIe->id = ProtocolIE_ID_id_DRBs_Setup_Item;
+ drbItemIe->criticality = Criticality_reject;
+ drbItemIe->value.present = DRBs_Setup_ItemIEs__value_PR_DRBs_Setup_Item;
+ drbItemIe->value.choice.DRBs_Setup_Item.dRBID = ueCfg->upTnlInfo[arrIdx].drbId;
+ ret = fillDlTnlSetupList(&drbItemIe->value.choice.DRBs_Setup_Item.dLUPTNLInformation_ToBeSetup_List,\
+ &ueCfg->upTnlInfo[arrIdx]);
+ if(ret != ROK)
+ break;
+ }
+ return ret;
+}
+
/*******************************************************************
*
* @brief Builds and sends the UE Setup Response
CellGroupConfigRrc_t *cellGrpCfg = NULLP;
DuUeCb *ueCb = NULLP;
- DU_LOG("\n F1AP : Building UE Context Setup Response for cellId %d, ueIdx %d\n", cellId, ueIdx);
+ DU_LOG("\n INFO --> F1AP : Building UE Context Setup Response for cellId %d, ueIdx %d\n", cellId, ueIdx);
while(true)
{
DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
if(f1apMsg == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for F1AP-PDU failed");
ret = RFAILED;
break;
}
sizeof(SuccessfulOutcome_t));
if(f1apMsg->choice.successfulOutcome == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for F1AP-PDU failed");
ret = RFAILED;
break;
}
ueSetRsp =
&f1apMsg->choice.successfulOutcome->value.choice.UEContextSetupResponse;
- elementCnt = 3;
+ elementCnt = 4;
ueSetRsp->protocolIEs.list.count = elementCnt;
ueSetRsp->protocolIEs.list.size = \
elementCnt * sizeof(UEContextSetupResponse_t *);
ueSetRsp->protocolIEs.list.size);
if(ueSetRsp->protocolIEs.list.array == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for UE Setup Response failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for UE Setup Response failed");
ret = RFAILED;
break;
}
sizeof(UEContextSetupResponseIEs_t));
if(ueSetRsp->protocolIEs.list.array[idx] == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for UE Setup Response failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for UE Setup Response failed");
ret = RFAILED;
break;
}
cellGrpCfg = (CellGroupConfigRrc_t*)ueCb->f1UeDb->duUeCfg.cellGrpCfg;
ret = EncodeUeCntxtDuToCuInfo(&ueSetRsp->protocolIEs.list.array[idx]->value.\
choice.DUtoCURRCInformation.cellGroupConfig, cellGrpCfg);
- /* Free UeContext Db created during Ue context Req */
- freeF1UeDb(ueCb->f1UeDb);
- ueCb->f1UeDb = NULLP;
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed to EncodeUeCntxtDuToCuInfo in BuildAndSendUeContextSetupRsp()");
+ freeF1UeDb(ueCb->f1UeDb);
+ ueCb->f1UeDb = NULLP;
+ break;
+ }
}
}
else
{
- DU_LOG("\nF1AP: Failed to form DUtoCU RRCInfo at BuildAndSendUeContextSetupRsp()");
+ DU_LOG("\nERROR --> F1AP : Failed to form DUtoCU RRCInfo at BuildAndSendUeContextSetupRsp()");
ret = RFAILED;
+ break;
}
+
+ /* Drb Setup List */
+ idx++;
+ ueSetRsp->protocolIEs.list.array[idx]->id = \
+ ProtocolIE_ID_id_DRBs_Setup_List;
+ ueSetRsp->protocolIEs.list.array[idx]->criticality = Criticality_reject;
+ ueSetRsp->protocolIEs.list.array[idx]->value.present =\
+ UEContextSetupResponseIEs__value_PR_DRBs_Setup_List;
+ ret = fillDrbSetupList(&ueSetRsp->protocolIEs.list.array[idx]->value.choice.DRBs_Setup_List,\
+ &ueCb->f1UeDb->duUeCfg);
if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed to fillDrbSetupList in BuildAndSendUeContextSetupRsp()");
+ freeF1UeDb(ueCb->f1UeDb);
+ ueCb->f1UeDb = NULLP;
break;
+ }
+
+ /* Free UeContext Db created during Ue context Req */
+ freeF1UeDb(ueCb->f1UeDb);
+ ueCb->f1UeDb = NULLP;
+ /* TODO: To send Drb list */
xer_fprint(stdout, &asn_DEF_F1AP_PDU, f1apMsg);
/* Encode the UE context setup response type as APER */
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG( "\n F1AP : Could not encode UE Context Setup Request structure (at %s)\n",\
+ DU_LOG( "\nERROR --> F1AP : Could not encode UE Context Setup Response structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
ret = RFAILED;
break;
}
else
{
- DU_LOG("\n F1AP : Created APER encoded buffer for UE Context Setup Request\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for UE Context Setup Response\n");
for(int i=0; i< encBufSize; i++)
{
printf("%x",encBuf[i]);
}
/* Sending msg */
- if(SendF1APMsg(DU_APP_MEM_REGION,DU_POOL) != ROK)
+ if(sendF1APMsg() != ROK)
{
- DU_LOG("\n F1AP : Sending UE Context Setup Request Failed");
+ DU_LOG("\nERROR --> F1AP : Sending UE Context Setup Response failed");
ret = RFAILED;
break;
}
BuildAndSendUeContextSetupRsp(ueIdx, cellId);
break;
case UE_CTXT_MOD:
- //TODO: Build Ue context Modification Rsp
+ BuildAndSendUeContextModResp(ueIdx, cellId);
break;
default:
- DU_LOG("F1AP: Invalid Action Type %d at BuildAndSendUeCtxtRsp()", actionType);
+ DU_LOG("ERROR --> F1AP: Invalid Action Type %d at BuildAndSendUeCtxtRsp()", actionType);
break;
}
Reset_t *f1ResetMsg = NULLP;
F1AP_PDU_t *f1apMsg = NULLP;
asn_enc_rval_t encRetVal;
- DU_LOG("\nF1AP : Building F1 Reset request \n");
+ DU_LOG("\nINFO --> F1AP : Building F1 Reset request \n");
do
{
DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nF1AP : Could not encode F1Reset structure (at %s)\n",\
+ DU_LOG("\nERROR --> F1AP : Could not encode F1Reset structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\nF1AP : Created APER encoded buffer for F1Reset\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for F1Reset\n");
for(idx=0; idx< encBufSize; idx++)
{
printf("%x",encBuf[idx]);
}
}
- if(SendF1APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK)
+ if(sendF1APMsg() != ROK)
{
- DU_LOG("\nF1AP : Sending F1 Reset request failed");
+ DU_LOG("\nERROR --> F1AP : Sending F1 Reset request failed");
break;
}
F1AP_PDU_t *f1apMsg = NULL;
ResetAcknowledge_t *f1ResetAck = NULLP;
asn_enc_rval_t encRetVal;
- DU_LOG("\nF1AP : Building F1 Reset Acknowledgment \n");
+ DU_LOG("\nINFO --> F1AP : Building F1 Reset Acknowledgment \n");
do{
/* Allocate the memory for F1ResetRequest_t */
DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
if(f1apMsg == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
DU_ALLOC(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
if(f1apMsg->choice.successfulOutcome == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
f1apMsg->choice.successfulOutcome->criticality = Criticality_reject;
DU_ALLOC(f1ResetAck->protocolIEs.list.array, f1ResetAck->protocolIEs.list.size );
if(f1ResetAck->protocolIEs.list.array == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1ResetAckIEs failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1ResetAckIEs failed");
break;
}
/* Check encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nF1AP : Could not encode F1ResetAck structure (at %s)\n",\
+ DU_LOG("\nERROR --> F1AP : Could not encode F1ResetAck structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\nF1AP : Created APER encoded buffer for F1ResetAck\n");
+ DU_LOG("\nDUBUG --> F1AP : Created APER encoded buffer for F1ResetAck\n");
for(int i=0; i< encBufSize; i++)
{
printf("%x",encBuf[i]);
}
}
/* Sending msg */
- if(SendF1APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK)
+ if(sendF1APMsg() != ROK)
{
- DU_LOG("\nF1AP : Sending F1 Reset Acknowledgement failed");
+ DU_LOG("\nERROR --> F1AP : Sending F1 Reset Acknowledgement failed");
break;
}
uint8_t ret = ROK;
Reset_t *f1ResetMsg = NULLP;
- DU_LOG("\nProcessing F1 reset request");
+ DU_LOG("\nINFO --> Processing F1 reset request");
f1ResetMsg = &f1apMsg->choice.initiatingMessage->value.choice.Reset;
for(ieIdx=0; ieIdx<f1ResetMsg->protocolIEs.list.count; ieIdx++)
case ProtocolIE_ID_id_ResetType:
{
- DU_LOG("\nReceived F1 Reset request");
break;
}
}
}
ret = BuildAndSendF1ResetAck();
- DU_LOG("\nUE release is not supported for now");
+ DU_LOG("\nINFO --> UE release is not supported for now");
freeAperDecodeF1ResetMsg(f1ResetMsg);
do{
- DU_LOG("\nF1AP : Building RRC delivery Message Transfer Message\n");
+ DU_LOG("\nINFO --> F1AP : Building RRC delivery Message Transfer Message\n");
DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
if(f1apMsg == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
f1apMsg->present = F1AP_PDU_PR_initiatingMessage;
DU_ALLOC(f1apMsg->choice.initiatingMessage,sizeof(InitiatingMessage_t));
if(f1apMsg->choice.initiatingMessage == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
f1apMsg->choice.initiatingMessage->procedureCode = ProcedureCode_id_RRCDeliveryReport;
DU_ALLOC(rrcDeliveryReport->protocolIEs.list.array, rrcDeliveryReport->protocolIEs.list.size);
if(rrcDeliveryReport->protocolIEs.list.array == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for RRC Delivery failed");
+ DU_LOG(" ERROR --> F1AP : Memory allocation for RRC Delivery failed");
break;
}
for(idx =0 ;idx <elementCnt; idx++)
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nF1AP : Could not encode RRC Delivery Msg structure (at %s)\n",\
+ DU_LOG("\nERROR --> F1AP : Could not encode RRC Delivery Msg structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\nF1AP : Created APER encoded buffer for RRC Delivery Msg \n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for RRC Delivery Msg \n");
for(idx=0; idx< encBufSize; idx++)
{
printf("%x",encBuf[idx]);
}
/* Sending msg */
- if(SendF1APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK)
+ if(sendF1APMsg() != ROK)
{
- DU_LOG("\nF1AP : Sending RRC delivery msg request failed");
+ DU_LOG("\nERROR --> F1AP : Sending RRC delivery msg request failed");
break;
}
ret = ROK;
}
default:
{
- DU_LOG("\nDU_APP : Invalid IE received in F1SetupRsp:%ld",
+ DU_LOG("\nERROR --> DU_APP : Invalid IE received in F1SetupRsp:%ld",
f1SetRspMsg->protocolIEs.list.array[ieIdx]->id);
}
}
memset(&f1SetRspDb, 0, sizeof(F1SetupRsp));
- DU_LOG("\nF1AP : F1 Setup Response received");
+ DU_LOG("\nINFO --> F1AP : F1 Setup Response received");
f1SetRspMsg = &f1apMsg->choice.successfulOutcome->value.choice.F1SetupResponse;
for(idx=0; idx<f1SetRspMsg->protocolIEs.list.count; idx++)
break;
}
default:
- DU_LOG("\nDU_APP : Invalid IE received in F1SetupRsp:%ld",
+ DU_LOG("\nERROR --> DU_APP : Invalid IE received in F1SetupRsp:%ld",
f1SetRspMsg->protocolIEs.list.array[idx]->id);
}
duProcF1SetupRsp();
* ****************************************************************/
uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg)
{
- uint8_t ieIdx, transId;
+ uint8_t ieIdx;
GNBDUConfigurationUpdateAcknowledge_t *gnbDuAck = NULLP;
-
+
+ DU_LOG("\nINFO --> F1AP : GNB-DU config update acknowledgment");
gnbDuAck = &f1apMsg->choice.successfulOutcome->value.choice.GNBDUConfigurationUpdateAcknowledge;
for(ieIdx=0; ieIdx < gnbDuAck->protocolIEs.list.count; ieIdx++)
switch(gnbDuAck->protocolIEs.list.array[ieIdx]->id)
{
case ProtocolIE_ID_id_TransactionID:
- transId = gnbDuAck->protocolIEs.list.array[ieIdx]->\
- value.choice.TransactionID;
- DU_LOG("\nF1AP : GNB-DU config update acknowledgment received for transId %d", transId);
break;
case ProtocolIE_ID_id_Cells_to_be_Activated_List:
break;
default :
- DU_LOG("\nF1AP: Invalid IE Received: %ld, at procF1GNBDUCfgUpdAck()", \
+ DU_LOG("\nERROR --> F1AP: Invalid IE Received: %ld, at procF1GNBDUCfgUpdAck()", \
gnbDuAck->protocolIEs.list.array[ieIdx]->id);
break;
}
F1DlRrcMsg dlMsg;
memset(&dlMsg, 0, sizeof(F1DlRrcMsg));
- DU_LOG("\nDU_APP : DL RRC message transfer Recevied");
+ DU_LOG("\nINFO --> DU_APP : DL RRC message transfer Recevied");
f1DlRrcMsg = &f1apMsg->choice.initiatingMessage->value.choice.DLRRCMessageTransfer;
ret = ROK;
}
else
{
- DU_LOG("\nDU_APP : Memory alloc Failed at RRC Container at procF1DlRrcMsgTrans()");
+ DU_LOG("\nERROR --> DU APP : Memory alloc Failed at RRC Container at procF1DlRrcMsgTrans()");
return RFAILED;
}
}
else
{
- DU_LOG("\nDU_APP : RRC Container Size is invalid:%ld",\
+ DU_LOG("\nERROR --> DU_APP : RRC Container Size is invalid:%ld",\
f1DlRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.size);
return RFAILED;
}
break;
}
default:
- DU_LOG("\nDU_APP : Invalid IE received in DL RRC Msg Transfer:%ld",
+ DU_LOG("\nERROR --> DU_APP : Invalid IE received in DL RRC Msg Transfer:%ld",
f1DlRrcMsg->protocolIEs.list.array[idx]->id);
}
}
freeAperDecodef1DlRrcMsg(f1DlRrcMsg);
return ret;
}
-
-/*****************************************************************i
- *
- * @brief Handles received F1AP message and sends back response
- *
- * @details
- *
- * Function : F1APMsgHdlr
- *
- * Functionality:
- * - Decodes received F1AP control message
- * - Prepares response message, encodes and sends to SCTP
- *
- * @params[in]
- * @return ROK - success
- * RFAILED - failure
+/*******************************************************************
*
- * ****************************************************************/
-void F1APMsgHdlr(Buffer *mBuf)
-{
- int i =0;
- char *recvBuf =NULLP;
- MsgLen copyCnt =0;
- MsgLen recvBufLen =0;
- F1AP_PDU_t *f1apMsg =NULLP;
- asn_dec_rval_t rval; /* Decoder return value */
- F1AP_PDU_t f1apasnmsg ;
- DU_LOG("\nF1AP : Received F1AP message buffer");
- ODU_PRINT_MSG(mBuf, 0,0);
+* @brief Builds the DRB to be Setup Mod list
+*
+* @details
+*
+* Function :
+*
+* Functionality: Constructs the DRB to be Setup Mod list
+*
+* @params[in] DRBs_SetupMod_List_t *drbSet
+*
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
- /* Copy mBuf into char array to decode it */
- ODU_GET_MSG_LEN(mBuf, &recvBufLen);
- DU_ALLOC(recvBuf, (Size)recvBufLen);
+uint8_t BuildDrbSetupModList(DRBs_SetupMod_List_t *drbSet , DuUeCfg *ueCfg)
+{
+ uint8_t arrIdx =0;
+ uint8_t drbCnt =0;
+ struct DRBs_SetupMod_ItemIEs *drbItemIe;
- if(recvBuf == NULLP)
+ drbCnt = 1;
+ drbSet->list.count = drbCnt;
+ drbSet->list.size = drbCnt * sizeof(DRBs_SetupMod_ItemIEs_t *);
+ DU_ALLOC(drbSet->list.array, drbSet->list.size);
+ if(drbSet->list.array == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed");
- return;
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDrbToBeSetupModList");
+ return RFAILED;
}
- if(ODU_COPY_MSG_TO_FIX_BUF(mBuf, 0, recvBufLen, (Data *)recvBuf, ©Cnt) != ROK)
+ for(arrIdx=0; arrIdx<drbCnt; arrIdx++)
{
- DU_LOG("\nF1AP : Failed while copying %d", copyCnt);
- return;
- }
+ DU_ALLOC(drbSet->list.array[arrIdx], sizeof(DRBs_SetupMod_ItemIEs_t));
+ if(drbSet->list.array[arrIdx] == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDrbToBeSetupModList");
+ return RFAILED;
+ }
- printf("\nF1AP : Received flat buffer to be decoded : ");
- for(i=0; i< recvBufLen; i++)
- {
- printf("%x",recvBuf[i]);
+ drbItemIe = (struct DRBs_SetupMod_ItemIEs *)drbSet->list.array[arrIdx];
+ drbItemIe->id = ProtocolIE_ID_id_DRBs_SetupMod_Item;
+ drbItemIe->criticality = Criticality_reject;
+ drbItemIe->value.present = DRBs_SetupMod_ItemIEs__value_PR_DRBs_SetupMod_Item;
+ drbItemIe->value.choice.DRBs_SetupMod_Item.dRBID = ueCfg->upTnlInfo[arrIdx].drbId;
+ if(fillDlTnlSetupList(&drbItemIe->value.choice.DRBs_SetupMod_Item.dLUPTNLInformation_ToBeSetup_List,\
+ &ueCfg->upTnlInfo[arrIdx])!= ROK)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed to fill DlTnl SetupList in BuildDrbToBeSetupModList");
+ return RFAILED;
+ }
+
}
- /* Decoding flat buffer into F1AP messsage */
- f1apMsg = &f1apasnmsg;
- memset(f1apMsg, 0, sizeof(F1AP_PDU_t));
-
- rval = aper_decode(0, &asn_DEF_F1AP_PDU, (void **)&f1apMsg, recvBuf, recvBufLen, 0, 0);
- DU_FREE(recvBuf, (Size)recvBufLen);
+ return ROK;
+}
+/*******************************************************************
+* @brief Free the memory allocated for DRB setup List
+*
+* @details
+*
+* Function : FreeDrbSetupModList
+*
+* Functionality:
+* Free the memory allocated for DRB setup list
+*
+* @params[in] DRBs_Setup_List_t *
+* @return void
+*
+* ****************************************************************/
+void FreeDrbSetupModList(DRBs_SetupMod_List_t *drbSetupList)
+{
+ uint8_t arrIdx = 0;
+ DRBs_SetupMod_ItemIEs_t *drbItemIe = NULLP;
- if(rval.code == RC_FAIL || rval.code == RC_WMORE)
+ for(arrIdx = 0; arrIdx < drbSetupList->list.count; arrIdx++)
{
- DU_LOG("\nF1AP : ASN decode failed");
- return;
+ drbItemIe = ((DRBs_SetupMod_ItemIEs_t *)drbSetupList->list.array[arrIdx]);
+ freeDlTnlInfo(&drbItemIe->value.choice.DRBs_SetupMod_Item.dLUPTNLInformation_ToBeSetup_List);
}
- printf("\n");
- xer_fprint(stdout, &asn_DEF_F1AP_PDU, f1apMsg);
+}
+/*******************************************************************
+* @brief Free the memory allocated for UE Context Mod Response
+*
+* @details
+*
+* Function : FreeUeContextModResp
+*
+* Functionality:
+* Free the memory allocated for UE Context Mod Response
+*
+* @params[in] F1AP_PDU_t *f1apMsg
+* @return void
+*
+* ****************************************************************/
- switch(f1apMsg->present)
+void FreeUeContextModResp(F1AP_PDU_t *f1apMsg)
+{
+ uint8_t ieIdx;
+ UEContextModificationResponse_t *ueContextModifyRes = NULLP;
+ if(f1apMsg)
{
- case F1AP_PDU_PR_successfulOutcome:
- {
- switch(f1apMsg->choice.successfulOutcome->value.present)
- {
- case SuccessfulOutcome__value_PR_ResetAcknowledge:
- {
- DU_LOG("\nF1AP : F1ResetAcknowledge is received successfully ");
- break;
- }
- case SuccessfulOutcome__value_PR_F1SetupResponse:
- {
+ if(f1apMsg->choice.successfulOutcome)
+ {
+ ueContextModifyRes =&f1apMsg->choice.successfulOutcome->value.choice.UEContextModificationResponse;
+ if(ueContextModifyRes->protocolIEs.list.array)
+ {
+ for(ieIdx=0 ; ieIdx<ueContextModifyRes->protocolIEs.list.count; ieIdx++)
+ {
+ if(ueContextModifyRes->protocolIEs.list.array[ieIdx])
+ {
+ switch(ueContextModifyRes->protocolIEs.list.array[ieIdx]->id)
+ {
+ case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
+ break;
+ case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
+ break;
+ case ProtocolIE_ID_id_DRBs_SetupMod_List:
+ {
+ FreeDrbSetupModList(&(ueContextModifyRes->protocolIEs.list.array[ieIdx]->\
+ value.choice.DRBs_SetupMod_List));
+ break;
+ }
+ }
+ DU_FREE(ueContextModifyRes->protocolIEs.list.array[ieIdx], sizeof(UEContextModificationResponse_t));
+ }
+
+ }
+ DU_FREE(ueContextModifyRes->protocolIEs.list.array, ueContextModifyRes->protocolIEs.list.size);
+ }
+ DU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
+ }
+ DU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
+ }
+}
+
+/*****************************************************************i
+*
+* @brief Creating the ue context modifcation response and sending
+*
+* @details
+*
+* Function : BuildAndSendUeContextModResp
+*
+* Functionality:
+* - Creating the ue context modifcation response
+*
+* @params[in]
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+uint8_t BuildAndSendUeContextModResp(uint8_t ueIdx, uint8_t cellId)
+{
+ uint8_t ieIdx = 0;
+ uint8_t cellIdx =0;
+ uint8_t elementCnt = 0;
+ uint8_t ret = RFAILED;
+ uint32_t gnbCuUeF1apId; /* gNB-CU UE F1AP Id */
+ uint32_t gnbDuUeF1apId; /* gNB-DU UE F1AP Id */
+ F1AP_PDU_t *f1apMsg = NULLP;
+ asn_enc_rval_t encRetVal;
+ UEContextModificationResponse_t *ueContextModifyRes = NULLP;
+ DuUeCb *ueCb = NULLP;
+
+ DU_LOG("\nINFO --> F1AP : Building Ue context modification response\n");
+
+ while(1)
+ {
+ DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
+ if(f1apMsg == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed Ue context modification");
+ break;
+ }
+
+ f1apMsg->present = F1AP_PDU_PR_successfulOutcome;
+
+ DU_ALLOC(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
+ if(f1apMsg->choice.successfulOutcome == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed Ue context modification");
+ break;
+ }
+ f1apMsg->choice.successfulOutcome->procedureCode = ProcedureCode_id_UEContextModification;
+ f1apMsg->choice.successfulOutcome->criticality = Criticality_reject;
+ f1apMsg->choice.successfulOutcome->value.present = SuccessfulOutcome__value_PR_UEContextModificationResponse;
+
+ ueContextModifyRes =&f1apMsg->choice.successfulOutcome->value.choice.UEContextModificationResponse;
+
+ elementCnt = 3;
+ ueContextModifyRes->protocolIEs.list.count = elementCnt;
+ ueContextModifyRes->protocolIEs.list.size = elementCnt*sizeof(UEContextModificationResponse_t*);
+
+ /* Initialize the UE context modification members */
+ DU_ALLOC(ueContextModifyRes->protocolIEs.list.array, ueContextModifyRes->protocolIEs.list.size);
+ if(ueContextModifyRes->protocolIEs.list.array == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation for UE context modifcation Request failed");
+ break;
+ }
+
+ for(ieIdx=0 ; ieIdx<elementCnt; ieIdx++)
+ {
+ DU_ALLOC(ueContextModifyRes->protocolIEs.list.array[ieIdx], sizeof(UEContextModificationResponse_t));
+ if(ueContextModifyRes->protocolIEs.list.array[ieIdx] == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation for UE context modifcation Request failed");
+ break;
+ }
+ }
+
+ /* Fetching Ue Cb Info*/
+ GET_CELL_IDX(cellId, cellIdx);
+ gnbDuUeF1apId = duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].gnbDuUeF1apId;
+ gnbCuUeF1apId = duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].gnbCuUeF1apId;
+ ueCb = &duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1];
+
+ ieIdx=0;
+ ueContextModifyRes->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
+ ueContextModifyRes->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
+ ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.present =\
+ UEContextModificationResponseIEs__value_PR_GNB_CU_UE_F1AP_ID;
+ ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_UE_F1AP_ID = gnbCuUeF1apId;
+
+ ieIdx++;
+ ueContextModifyRes->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
+ ueContextModifyRes->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
+ ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.present=\
+ UEContextModificationResponseIEs__value_PR_GNB_DU_UE_F1AP_ID;
+ ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID = gnbDuUeF1apId;
+
+ ieIdx++;
+ ueContextModifyRes->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_DRBs_SetupMod_List;
+ ueContextModifyRes->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
+ ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.present =\
+ UEContextModificationResponseIEs__value_PR_DRBs_SetupMod_List;
+ if(ueCb->f1UeDb)
+ {
+ ret = BuildDrbSetupModList(&(ueContextModifyRes->protocolIEs.list.array[ieIdx]->\
+ value.choice.DRBs_SetupMod_List) , &ueCb->f1UeDb->duUeCfg);
+ if(ret != ROK)
+ {
+ DU_LOG( "\nERROR --> F1AP : Failed to build drb setupmod List ");
+ break;
+ }
+ freeF1UeDb(ueCb->f1UeDb);
+ ueCb->f1UeDb = NULLP;
+ }
+ xer_fprint(stdout, &asn_DEF_F1AP_PDU, f1apMsg);
+
+ /* Encode the F1SetupRequest type as APER */
+ memset(encBuf, 0, ENC_BUF_MAX_LEN);
+ encBufSize = 0;
+ encRetVal = aper_encode(&asn_DEF_F1AP_PDU, 0, f1apMsg, PrepFinalEncBuf,encBuf);
+
+ /* Encode results */
+ if(encRetVal.encoded == ENCODE_FAIL)
+ {
+ DU_LOG( "\nERROR --> F1AP : Could not encode UE Context Setup Request structure (at %s)\n",\
+ encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
+ ret = RFAILED;
+ break;
+ }
+ else
+ {
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for UE Context Modification Response\n");
+ for(int i=0; i< encBufSize; i++)
+ {
+ printf("%x",encBuf[i]);
+ }
+ }
+
+ /* Sending msg */
+ if(sendF1APMsg() != ROK)
+ {
+ DU_LOG("\nERROR --> F1AP : Sending UE Context Setup Res Failed");
+ ret = RFAILED;
+ break;
+ }
+ break;
+ }
+ FreeUeContextModResp(f1apMsg);
+ return ret;
+
+}
+/*******************************************************************
+ *
+ * @brief Deallocating the memory allocated by the aper decoder
+ * for QOSInfo
+ *
+ * @details
+ *
+ * Function : freeAperDecodeQosInfo
+ *
+ * Functionality: Deallocating the memory allocated for QOSInfo
+ *
+ * @params[in] QoSFlowLevelQoSParameters_t *drbQos
+ *
+ * @return void
+ *
+ * ****************************************************************/
+
+void freeAperDecodeQosInfo(QoSFlowLevelQoSParameters_t *drbQos)
+{
+ if(drbQos->qoS_Characteristics.choice.non_Dynamic_5QI != NULLP)
+ {
+ if(drbQos->qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow!=NULLP)
+ {
+ if(drbQos->qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume!=NULLP)
+ {
+ free(drbQos->qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume);
+ }
+ free(drbQos->qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow);
+ }
+ free(drbQos->qoS_Characteristics.choice.non_Dynamic_5QI);
+ }
+}
+/*******************************************************************
+ *
+ * @brief Deallocating the memory allocated by the aper decoder
+ * for UlTnlInfoforDrb
+ *
+ * @details
+ *
+ * Function : freeAperDecodeUlTnlInfoforDrbSetupMod
+ *
+ * Functionality: Deallocating memory allocated for UlTnlInfoforDrb
+ *
+ * @params[in] ULUPTNLInformation_ToBeSetup_List_t *ulInfo
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void freeAperDecodeUlTnlInfoforDrbSetupMod(ULUPTNLInformation_ToBeSetup_List_t *ulInfo)
+{
+ uint8_t arrIdx =0;
+
+ if(ulInfo->list.array)
+ {
+ for(arrIdx=0; arrIdx<ulInfo->list.count ; arrIdx++)
+ {
+ if(ulInfo->list.array[arrIdx])
+ {
+ if(ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel )
+ {
+ if(ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->transportLayerAddress.buf)
+ {
+ if(ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->gTP_TEID.buf)
+ {
+ free(ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\
+ gTP_TEID.buf);
+ }
+ free(ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\
+ transportLayerAddress.buf);
+ }
+ free(ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel);
+ }
+ free(ulInfo->list.array[arrIdx]);
+ }
+ }
+ free(ulInfo->list.array);
+ }
+}
+/*******************************************************************
+ *
+ * @brief Deallocating the memory allocated by the aper decoder
+ * for DrbSetupModItem
+ *
+ * @details
+ *
+ * Function : freeAperDecodeDrbSetupModItem
+ *
+ * Functionality: Deallocating memory allocated for DrbSetupModItem
+ *
+ * @params[in] DRBs_ToBeSetupMod_Item_t *drbItem
+ *
+ * @return void
+ *
+ * ****************************************************************/
+
+void freeAperDecodeDrbSetupModItem(DRBs_ToBeSetupMod_Item_t *drbItem)
+{
+ uint8_t arrIdx =0;
+ SNSSAI_t *snssai =NULLP;
+ Flows_Mapped_To_DRB_List_t *flowMap = NULLP;
+
+ drbItem->qoSInformation.present = QoSInformation_PR_choice_extension;
+ switch(drbItem->qoSInformation.present)
+ {
+ case QoSInformation_PR_NOTHING:
+ break;
+ case QoSInformation_PR_eUTRANQoS:
+ {
+ if(drbItem->qoSInformation.choice.eUTRANQoS)
+ {
+ free(drbItem->qoSInformation.choice.eUTRANQoS);
+ }
+ break;
+ }
+ case QoSInformation_PR_choice_extension:
+ {
+ if(drbItem->qoSInformation.choice.choice_extension)
+ {
+ freeAperDecodeQosInfo(&drbItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.dRB_QoS);
+ snssai = &drbItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI;
+ if(snssai->sST.buf)
+ {
+ free(snssai->sST.buf);
+ }
+ if(snssai->sD)
+ {
+ if(snssai->sD->buf)
+ {
+ free(snssai->sD->buf);
+ }
+ free(snssai->sD);
+ }
+
+ flowMap = &drbItem->qoSInformation.choice.choice_extension->value.choice.\
+ DRB_Information.flows_Mapped_To_DRB_List;
+ if(flowMap->list.array)
+ {
+ for(arrIdx=0; arrIdx<flowMap->list.count; arrIdx++)
+ {
+ if(flowMap->list.array[arrIdx] )
+ {
+ freeAperDecodeQosInfo(&flowMap->list.array[arrIdx]->qoSFlowLevelQoSParameters);
+ free(flowMap->list.array[arrIdx]);
+ }
+ }
+ free(flowMap->list.array);
+ }
+
+ free(drbItem->qoSInformation.choice.choice_extension);
+ }
+ break;
+ }
+
+ }
+ freeAperDecodeUlTnlInfoforDrbSetupMod(&drbItem->uLUPTNLInformation_ToBeSetup_List);
+ if(drbItem->uLConfiguration)
+ {
+ free(drbItem->uLConfiguration);
+ }
+}
+
+/*******************************************************************
+ *
+ * @brief Deallocating the memory allocated by the aper decoder
+ * for DrbToBeSetupModList
+ *
+ * @details
+ *
+ * Function : freeAperDecodeDrbToBeSetupModList
+ *
+ * Functionality: Deallocating memory allocated for DrbToBeSetupModList
+ *
+ * @params[in] DRBs_ToBeSetupMod_List_t *drbSet
+ *
+ * @return void
+ *
+ * ****************************************************************/
+
+void freeAperDecodeDrbToBeSetupModList(DRBs_ToBeSetupMod_List_t *drbSet)
+{
+ uint8_t arrIdx =0;
+ struct DRBs_ToBeSetupMod_ItemIEs *drbItemIe;
+
+ if(drbSet->list.array)
+ {
+ for(arrIdx=0; arrIdx<drbSet->list.count ; arrIdx++)
+ {
+ if(drbSet->list.array[arrIdx] != NULLP)
+ {
+ if(arrIdx == 0)
+ {
+ drbItemIe = (DRBs_ToBeSetupMod_ItemIEs_t *)drbSet->list.array[arrIdx];
+ freeAperDecodeDrbSetupModItem(&(drbItemIe->value.choice.DRBs_ToBeSetupMod_Item));
+ }
+ free(drbSet->list.array[arrIdx]);
+ }
+ }
+ free(drbSet->list.array);
+ }
+
+}
+/*******************************************************************
+ *
+ * @brief Deallocating the memory allocated by the aper decoder
+ * for UeContextModificationReqMsg
+ *
+ * @details
+ *
+ * Function : freeAperDecodeUeContextModificationReqMsg
+ *
+ * Functionality: Deallocating memory allocated for
+ * UeContextModificationReqMsg
+ *
+ * @params[in] UEContextModificationRequest_t *UeContextModifyReq
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void freeAperDecodeUeContextModificationReqMsg(UEContextModificationRequest_t *UeContextModifyReq )
+{
+ uint8_t arrIdx, ieId;
+
+ if(UeContextModifyReq->protocolIEs.list.array)
+ {
+ for( arrIdx = 0 ; arrIdx<UeContextModifyReq->protocolIEs.list.count ; arrIdx++)
+ {
+ if(UeContextModifyReq->protocolIEs.list.array[arrIdx])
+ {
+ ieId = UeContextModifyReq->protocolIEs.list.array[arrIdx]->id;
+ switch(ieId)
+ {
+ case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
+ break;
+ case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
+ break;
+ case ProtocolIE_ID_id_DRBs_ToBeSetupMod_List:
+ {
+ freeAperDecodeDrbToBeSetupModList(&UeContextModifyReq->protocolIEs.list.array[arrIdx]->\
+ value.choice.DRBs_ToBeSetupMod_List);
+ break;
+ }
+ }
+ free(UeContextModifyReq->protocolIEs.list.array[arrIdx]);
+ }
+ }
+ free(UeContextModifyReq->protocolIEs.list.array);
+ }
+}
+/*******************************************************************
+ *
+ * @brief processing the F1 UeContextModificationReq
+ *
+ * @details
+ *
+ * Function : procF1UeContextModificationReq
+ *
+ * Functionality: processing the F1 UeContextModificationReq
+ *
+ * @params[in] F1AP_PDU_t *f1apMsg
+ *
+ * @return
+ * ****************************************************************/
+uint8_t procF1UeContextModificationReq(F1AP_PDU_t *f1apMsg)
+{
+ UEContextModificationRequest_t *ueContextModifyReq = NULLP;
+ uint8_t ret = ROK, ieIdx = 0, lcId =0,cellIdx=0, ueIdx=0;
+ DuUeCb *duUeCb = NULLP;
+ DRBs_ToBeSetupMod_List_t *drbSetupModCfg;
+ uint32_t gnbCuUeF1apId, gnbDuUeF1apId;
+
+ ueContextModifyReq = &f1apMsg->choice.initiatingMessage->value.choice.UEContextModificationRequest;
+ for(ieIdx=0; (ieIdx < ueContextModifyReq->protocolIEs.list.count && ret == ROK); ieIdx++)
+ {
+ switch(ueContextModifyReq->protocolIEs.list.array[ieIdx]->id)
+ {
+ case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
+ {
+ gnbCuUeF1apId = ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_UE_F1AP_ID;
+ break;
+ }
+ case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
+ {
+ gnbDuUeF1apId = ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID;
+ break;
+ }
+ case ProtocolIE_ID_id_DRBs_ToBeSetupMod_List:
+ {
+ for(cellIdx = 0; cellIdx < duCb.numActvCells; cellIdx++)
+ {
+ for(ueIdx = 0; ueIdx < duCb.numUe; ueIdx++)
+ {
+ if((duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbDuUeF1apId == gnbDuUeF1apId)&&\
+ (duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbCuUeF1apId == gnbCuUeF1apId))
+ {
+
+ duUeCb = &duCb.actvCellLst[cellIdx]->ueCb[ueIdx];
+ lcId = getDrbLcId(&duUeCb->drbBitMap);
+ if(lcId != RFAILED)
+ {
+ DU_ALLOC(duUeCb->f1UeDb, sizeof(F1UeContextSetupDb));
+ if(duUeCb->f1UeDb)
+ {
+ duUeCb->f1UeDb->actionType = UE_CTXT_MOD;
+ drbSetupModCfg = &ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.\
+ choice.DRBs_ToBeSetupMod_List;
+ if(extractDrbListToSetup(lcId, NULL, drbSetupModCfg ,drbSetupModCfg->list.count, \
+ &duUeCb->f1UeDb->duUeCfg))
+ {
+ DU_LOG("\nERROR --> DU APP : Failed at extractDrbListToSetup()");
+ ret = RFAILED;
+ }
+ }
+ }
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU APP : wrong values of gnbCuUeF1apId and gnbDuUeF1apId ");
+ ret = RFAILED;
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+ if(ret != RFAILED)
+ {
+ ret = duProcUeContextModReq(duUeCb);
+ }
+ freeAperDecodeUeContextModificationReqMsg(ueContextModifyReq);
+ return ret;
+}
+/*****************************************************************i
+*
+* @brief Free memory allocated for UE Context Release Request
+*
+* @details
+*
+* Function : FreeUeContextReleaseReq
+*
+* Functionality:
+* - Free memory allocated for UE Context Release Request
+*
+* @params[in] F1AP_PDU_t *f1apMsg
+* @return void
+*
+* *************************************************************/
+void FreeUeContextReleaseReq(F1AP_PDU_t *f1apMsg)
+{
+ uint8_t ieIdx;
+ UEContextReleaseRequest_t *ueReleaseReq = NULLP;
+
+ if(f1apMsg)
+ {
+ if(f1apMsg->choice.initiatingMessage)
+ {
+ ueReleaseReq =&f1apMsg->choice.initiatingMessage->value.choice.UEContextReleaseRequest;
+ if(ueReleaseReq->protocolIEs.list.array)
+ {
+ for(ieIdx=0 ; ieIdx<ueReleaseReq->protocolIEs.list.count; ieIdx++)
+ {
+ DU_FREE(ueReleaseReq->protocolIEs.list.array[ieIdx], sizeof(UEContextReleaseRequest_t));
+ }
+ DU_FREE(ueReleaseReq->protocolIEs.list.array, ueReleaseReq->protocolIEs.list.size);
+ }
+ DU_FREE(f1apMsg->choice.initiatingMessage, sizeof(InitiatingMessage_t));
+ }
+ DU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
+ }
+
+}
+/*****************************************************************i
+*
+* @brief Build and Send UE Context Release Request
+*
+* @details
+*
+* Function : BuildAndSendUeContextReleaseReq
+*
+* Functionality:
+* - Build and Send UE Context Release Request
+*
+* @params[in]
+* @return ROK - success
+* RFAILED - failure
+*
+* *************************************************************/
+uint8_t BuildAndSendUeContextReleaseReq(uint16_t cellId, uint8_t ueIdx)
+{
+ bool memAllocFail = false;
+ uint8_t ieIdx =0;
+ uint8_t ret = RFAILED;
+ uint16_t cellIdx =0;
+ uint16_t crnti = 0;
+ uint8_t elementCnt = 0;
+ uint32_t gnbCuUeF1apId =0; /* gNB-CU UE F1AP Id */
+ uint32_t gnbDuUeF1apId =0; /* gNB-DU UE F1AP Id */
+ asn_enc_rval_t encRetVal;
+ F1AP_PDU_t *f1apMsg = NULLP;
+ UEContextReleaseRequest_t *ueReleaseReq = NULLP;
+
+ DU_LOG("\nINFO --> Building the UE Context Release Request");
+ do
+ {
+ DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
+ if(f1apMsg == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : BuildAndSendUeContextReleaseReq(): Memory allocation failed for f1apMsg");
+ break;
+ }
+
+ f1apMsg->present = F1AP_PDU_PR_initiatingMessage;
+ DU_ALLOC(f1apMsg->choice.initiatingMessage, sizeof(InitiatingMessage_t));
+ if(f1apMsg->choice.initiatingMessage == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : BuildAndSendUeContextReleaseReq(): Memory allocation failed for\
+ initiatingMessage");
+ break;
+ }
+ f1apMsg->choice.initiatingMessage->procedureCode = ProcedureCode_id_UEContextReleaseRequest;
+ f1apMsg->choice.initiatingMessage->criticality = Criticality_reject;
+ f1apMsg->choice.initiatingMessage->value.present = \
+ InitiatingMessage__value_PR_UEContextReleaseRequest;
+
+ ueReleaseReq = &f1apMsg->choice.initiatingMessage->value.choice.UEContextReleaseRequest;
+
+ elementCnt = 2;
+
+ ueReleaseReq->protocolIEs.list.count = elementCnt;
+ ueReleaseReq->protocolIEs.list.size = elementCnt * sizeof(UEContextReleaseRequest_t *);
+
+ /* Initialize the F1Setup members */
+ DU_ALLOC(ueReleaseReq->protocolIEs.list.array,ueReleaseReq->protocolIEs.list.size);
+ if(ueReleaseReq->protocolIEs.list.array == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : BuildAndSendUeContextReleaseReq(): Memory allocation failed for IE array");
+ break;
+ }
+ for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
+ {
+ DU_ALLOC(ueReleaseReq->protocolIEs.list.array[ieIdx],\
+ sizeof(UEContextReleaseRequest_t));
+ if(ueReleaseReq->protocolIEs.list.array[ieIdx] == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : BuildAndSendUeContextReleaseReq(): Memory allocation failed for IE elements");
+ memAllocFail = true;
+ break;
+ }
+ }
+ if(memAllocFail == true)
+ break;
+
+ /* Fetching Ue Cb Info*/
+ GET_CELL_IDX(cellId, cellIdx);
+ if(duCb.actvCellLst[cellIdx] == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : BuildAndSendUeContextReleaseReq(): CellId[%d] does not exist", cellId);
+ break;
+ }
+ else
+ {
+ GET_CRNTI(crnti, ueIdx);
+ if(duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].crnti != crnti)
+ {
+ DU_LOG("\nERROR --> F1AP : BuildAndSendUeContextReleaseReq(): crnti[%d] does not exist", crnti);
+ break;
+ }
+ gnbDuUeF1apId = duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].gnbDuUeF1apId;
+ gnbCuUeF1apId = duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].gnbCuUeF1apId;
+ }
+
+ ieIdx=0;
+ ueReleaseReq->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
+ ueReleaseReq->protocolIEs.list.array[ieIdx]->criticality= Criticality_reject;
+ ueReleaseReq->protocolIEs.list.array[ieIdx]->value.present = \
+ UEContextReleaseRequestIEs__value_PR_GNB_CU_UE_F1AP_ID;
+ ueReleaseReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_UE_F1AP_ID =gnbCuUeF1apId;
+
+ ieIdx++;
+ ueReleaseReq->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
+ ueReleaseReq->protocolIEs.list.array[ieIdx]->criticality= Criticality_reject;
+ ueReleaseReq->protocolIEs.list.array[ieIdx]->value.present =\
+ UEContextReleaseRequestIEs__value_PR_GNB_DU_UE_F1AP_ID;
+ ueReleaseReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID =gnbDuUeF1apId;
+
+ xer_fprint(stdout, &asn_DEF_F1AP_PDU, f1apMsg);
+
+ /* Encode the F1SetupRequest type as APER */
+ memset(encBuf, 0, ENC_BUF_MAX_LEN);
+ encBufSize = 0;
+ encRetVal = aper_encode(&asn_DEF_F1AP_PDU, 0, f1apMsg, PrepFinalEncBuf, encBuf);
+ /* Encode results */
+ if(encRetVal.encoded == ENCODE_FAIL)
+ {
+ DU_LOG("\nERROR --> F1AP : Could not encode UEContextReleaseRequest structure (at %s)\n",\
+ encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
+ break;
+ }
+ else
+ {
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for UEContextReleaseRequest\n");
+ for(ieIdx=0; ieIdx< encBufSize; ieIdx++)
+ {
+ printf("%x",encBuf[ieIdx]);
+ }
+ }
+
+ /* Sending msg */
+ if(sendF1APMsg() != ROK)
+ {
+ DU_LOG("\nERROR --> F1AP : Sending UE Context Release Request failed");
+ break;
+ }
+ ret = ROK;
+ break;
+ }while(true);
+
+ FreeUeContextReleaseReq(f1apMsg);
+ return ret;
+}
+/**************************************************************
+ *
+ * @brief Handles received F1AP message and sends back response
+ *
+ * @details
+ *
+ * Function : F1APMsgHdlr
+ *
+ * Functionality:
+ * - Decodes received F1AP control message
+ * - Prepares response message, encodes and sends to SCTP
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+void F1APMsgHdlr(Buffer *mBuf)
+{
+ int i =0;
+ char *recvBuf =NULLP;
+ MsgLen copyCnt =0;
+ MsgLen recvBufLen =0;
+ F1AP_PDU_t *f1apMsg =NULLP;
+ asn_dec_rval_t rval; /* Decoder return value */
+ F1AP_PDU_t f1apasnmsg ;
+ DU_LOG("\nINFO --> F1AP : Received F1AP message buffer");
+ ODU_PRINT_MSG(mBuf, 0,0);
+
+ /* Copy mBuf into char array to decode it */
+ ODU_GET_MSG_LEN(mBuf, &recvBufLen);
+ DU_ALLOC(recvBuf, (Size)recvBufLen);
+
+ if(recvBuf == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed");
+ return;
+ }
+ if(ODU_COPY_MSG_TO_FIX_BUF(mBuf, 0, recvBufLen, (Data *)recvBuf, ©Cnt) != ROK)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed while copying %d", copyCnt);
+ return;
+ }
+
+ printf("\nDEBUG --> F1AP : Received flat buffer to be decoded : ");
+ for(i=0; i< recvBufLen; i++)
+ {
+ printf("%x",recvBuf[i]);
+ }
+
+ /* Decoding flat buffer into F1AP messsage */
+ f1apMsg = &f1apasnmsg;
+ memset(f1apMsg, 0, sizeof(F1AP_PDU_t));
+
+ rval = aper_decode(0, &asn_DEF_F1AP_PDU, (void **)&f1apMsg, recvBuf, recvBufLen, 0, 0);
+ DU_FREE(recvBuf, (Size)recvBufLen);
+
+ if(rval.code == RC_FAIL || rval.code == RC_WMORE)
+ {
+ DU_LOG("\nERROR --> F1AP : ASN decode failed");
+ return;
+ }
+ printf("\n");
+ xer_fprint(stdout, &asn_DEF_F1AP_PDU, f1apMsg);
+
+ switch(f1apMsg->present)
+ {
+ case F1AP_PDU_PR_successfulOutcome:
+ {
+ switch(f1apMsg->choice.successfulOutcome->value.present)
+ {
+ case SuccessfulOutcome__value_PR_ResetAcknowledge:
+ {
+ DU_LOG("\nINFO --> F1AP : F1ResetAcknowledge is received successfully ");
+ break;
+ }
+ case SuccessfulOutcome__value_PR_F1SetupResponse:
+ {
#ifndef ODU_TEST_STUB
- procF1SetupRsp(f1apMsg);
+ procF1SetupRsp(f1apMsg);
#endif
- break;
- }
+ break;
+ }
- case SuccessfulOutcome__value_PR_GNBDUConfigurationUpdateAcknowledge:
- {
- procF1GNBDUCfgUpdAck(f1apMsg);
- break;
- }
+ case SuccessfulOutcome__value_PR_GNBDUConfigurationUpdateAcknowledge:
+ {
+ procF1GNBDUCfgUpdAck(f1apMsg);
+ break;
+ }
- default:
- {
- DU_LOG("\nF1AP : Invalid type of successful outcome [%d]", f1apMsg->choice.successfulOutcome->value.present);
- return;
- }
- }/* End of switch(successfulOutcome) */
- free(f1apMsg->choice.successfulOutcome);
- break;
- }
+ default:
+ {
+ DU_LOG("\nERROR --> F1AP : Invalid type of SuccessfulOutcome__value_PR_ResetAcknowledge [%d]",\
+ f1apMsg->choice.successfulOutcome->value.present);
+ return;
+ }
+ }/* End of switch(successfulOutcome) */
+ free(f1apMsg->choice.successfulOutcome);
+ break;
+ }
case F1AP_PDU_PR_initiatingMessage:
- {
- switch(f1apMsg->choice.initiatingMessage->value.present)
- {
- case InitiatingMessage__value_PR_Reset:
- {
- DU_LOG("\nF1AP : F1 reset request received");
- procF1ResetReq(f1apMsg);
- break;
- }
- case InitiatingMessage__value_PR_DLRRCMessageTransfer:
- {
- procF1DlRrcMsgTrans(f1apMsg);
- break;
- }
- case InitiatingMessage__value_PR_UEContextSetupRequest:
- {
- procF1UeContextSetupReq(f1apMsg);
- break;
- }
- default:
- {
- DU_LOG("\nF1AP : Invalid type of initiating message[%d]",
- f1apMsg->choice.initiatingMessage->value.present);
- return;
- }
- }/* End of switch(initiatingMessage) */
- free(f1apMsg->choice.initiatingMessage);
- break;
- }
+ {
+ switch(f1apMsg->choice.initiatingMessage->value.present)
+ {
+ case InitiatingMessage__value_PR_Reset:
+ {
+ procF1ResetReq(f1apMsg);
+ break;
+ }
+ case InitiatingMessage__value_PR_DLRRCMessageTransfer:
+ {
+ procF1DlRrcMsgTrans(f1apMsg);
+ break;
+ }
+ case InitiatingMessage__value_PR_UEContextSetupRequest:
+ {
+ procF1UeContextSetupReq(f1apMsg);
+ break;
+ }
+ case InitiatingMessage__value_PR_UEContextModificationRequest:
+ {
+ procF1UeContextModificationReq(f1apMsg);
+ break;
+ }
+ default:
+ {
+ DU_LOG("\nERROR --> F1AP : Invalid type of F1AP_PDU_PR_initiatingMessage [%d]",
+ f1apMsg->choice.initiatingMessage->value.present);
+ return;
+ }
+ }/* End of switch(initiatingMessage) */
+ free(f1apMsg->choice.initiatingMessage);
+ break;
+ }
default:
- {
- DU_LOG("\nF1AP : Invalid type of f1apMsg->present [%d]",f1apMsg->present);
- return;
- }
- free(f1apMsg);
+ {
+ DU_LOG("\nERROR --> F1AP : Invalid type of f1apMsg->present [%d]",f1apMsg->present);
+ return;
+ }
+ free(f1apMsg);
}/* End of switch(f1apMsg->present) */