/* This file contains F1AP message handler functions */
#include "common_def.h"
+#include "du_tmr.h"
#include "ckw.h"
#include "ckw.x"
#include "kwu.h"
#include "du_app_mac_inf.h"
#include "du_cfg.h"
#include "du_app_rlc_inf.h"
+#include "du_e2ap_mgr.h"
+#include "du_e2ap_msg_hdl.h"
#include "du_mgr_main.h"
#include "du_mgr.h"
#include "du_utils.h"
#include "UPTransportLayerInformation.h"
#include "GTPTunnel.h"
#include "SupportedSULFreqBandItem.h"
-#include "du_e2ap_msg_hdl.h"
#include "du_f1ap_conversions.h"
#include "CNUEPagingIdentity.h"
#include "PCCH-Config.h"
printf("%x",encBuf[ieIdx]);
}
#endif
+
- duCb.f1SetupReqAndRspMsg.f1MsgReqBufSize = encBufSize;
- DU_ALLOC(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf, encBufSize);
- if(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf == NULLP)
- {
- DU_LOG("\nERROR --> F1AP : Memory allocation failed to store the encoding of f1setup req");
- return RFAILED;
- }
- memcpy(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf, &encBuf, duCb.f1SetupReqAndRspMsg.f1MsgReqBufSize);
}
-
+ if(addOrModifyE2NodeComponent(F1, E2_NODE_COMPONENT_ADD, true, encBufSize, encBuf) !=ROK)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed to add the e2 node in the list");
+ break;
+ }
/* Sending msg */
if(sendF1APMsg() != ROK)
{
}
#endif
}
+ if(addOrModifyE2NodeComponent(F1, E2_NODE_COMPONENT_UPDATE, true, encBufSize, encBuf)!=ROK)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed to update the e2 node in the list");
+ break;
+ }
/* Sending msg */
if(sendF1APMsg() != ROK)
{
/* Fill default AM UL configuration if input pointer to DU database is NULL */
if(amCfg == NULLP)
{
- *(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength) = SN_FIELD_LEN;
+
+ *(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength) = SN_FIELD_LEN_12BIT; /*As per Spec 38.331, "Network configures only value size12 in SN-FieldLengthAM for SRB"*/
rlcConfig->choice.am->ul_AM_RLC.t_PollRetransmit = T_POLL_RETRANSMIT;
rlcConfig->choice.am->ul_AM_RLC.pollPDU = POLL_PDU;
rlcConfig->choice.am->ul_AM_RLC.pollByte = POLL_BYTE;
/* Fill default AM DL configuration if input pointer to DU database is NULL */
if(amCfg == NULLP)
{
- *(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength) = SN_FIELD_LEN;
+ *(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength) = SN_FIELD_LEN_12BIT; /*As per Spec 38.331, "Network configures only value size12 in SN-FieldLengthAM for SRB"*/
rlcConfig->choice.am->dl_AM_RLC.t_Reassembly = T_REASSEMBLY;
rlcConfig->choice.am->dl_AM_RLC.t_StatusProhibit = T_STATUS_PROHIBHIT;
}
duProcF1SetupRsp();
freeAperDecodeF1SetupRsp(f1SetRspMsg);
-
- duCb.f1SetupReqAndRspMsg.f1MsgRspBufSize = recvBufLen;
- DU_ALLOC(duCb.f1SetupReqAndRspMsg.f1MsgRspBuf, duCb.f1SetupReqAndRspMsg.f1MsgRspBufSize);
- if(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf == NULLP)
+
+ if(addOrModifyE2NodeComponent(F1, E2_NODE_COMPONENT_ADD, false, recvBufLen, recvBuf) !=ROK)
{
- DU_LOG("\nERROR --> F1AP : Memory allocation failed to store the buf of F1setup response");
+ DU_LOG("\nERROR --> F1AP : Failed to add the e2 node in the list");
return RFAILED;
}
- memcpy(duCb.f1SetupReqAndRspMsg.f1MsgRspBuf, recvBuf, recvBufLen);
if(BuildAndSendE2SetupReq() != ROK)
{
*
* Functionality: added free part for the memory allocated by aper_decoder
*
-* @params[in] F1AP_PDU_t *f1apMsg
+* @params[in] F1AP_PDU_t *f1apMsg, MsgLen recvBufLen, char *recvBuf
* @return void
*
* ****************************************************************/
-uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg)
+
+uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg, MsgLen recvBufLen, char *recvBuf)
{
uint8_t ieIdx=0,transId=0;
GNBDUConfigurationUpdateAcknowledge_t *gnbDuAck = NULLP;
}
#endif
+ if(addOrModifyE2NodeComponent(F1, E2_NODE_COMPONENT_UPDATE, false, recvBufLen, recvBuf) !=ROK)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed to update the e2 node in the list");
+ return RFAILED;
+ }
+
freeAperDecodeGnbDuAck(gnbDuAck);
return ROK;
}
break;
case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
break;
+ case ProtocolIE_ID_id_DUtoCURRCInformation:
+ {
+ DU_FREE(ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.choice.DUtoCURRCInformation.\
+ cellGroupConfig.buf, ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.choice.\
+ DUtoCURRCInformation.cellGroupConfig.size);
+ break;
+ }
case ProtocolIE_ID_id_DRBs_SetupMod_List:
{
FreeDrbSetupModList(&(ueContextModifyRes->protocolIEs.list.array[ieIdx]->\
ret = ROK;
break;
}
+
FreeUeContextModResp(f1apMsg);
return ret;
}
case SuccessfulOutcome__value_PR_GNBDUConfigurationUpdateAcknowledge:
{
- procF1GNBDUCfgUpdAck(f1apMsg);
+ procF1GNBDUCfgUpdAck(f1apMsg, recvBufLen, recvBuf);
break;
}