+ memset(&duCb.e2apDb, 0, sizeof(E2apDb));
+ duCb.e2apDb.e2NodeId = DU_ID;
+ duCb.e2apDb.e2TransInfo.transIdCounter = 0;
+
+ duCb.e2apDb.numOfTNLAssoc = 1;
+ for(tnlAssocIdx =0; tnlAssocIdx<duCb.e2apDb.numOfTNLAssoc; tnlAssocIdx++)
+ {
+ duCb.e2apDb.tnlAssoc[tnlAssocIdx].localIpAddress.ipV4Pres = duCfgParam.sctpParams.duIpAddr.ipV4Pres;
+ duCb.e2apDb.tnlAssoc[tnlAssocIdx].localIpAddress.ipV4Addr = duCfgParam.sctpParams.duIpAddr.ipV4Addr;
+ duCb.e2apDb.tnlAssoc[tnlAssocIdx].localPort = duCfgParam.sctpParams.duPort[E2_INTERFACE];
+ duCb.e2apDb.tnlAssoc[tnlAssocIdx].destIpAddress.ipV4Pres = duCfgParam.sctpParams.ricIpAddr.ipV4Pres;
+ duCb.e2apDb.tnlAssoc[tnlAssocIdx].destIpAddress.ipV4Addr = duCfgParam.sctpParams.ricIpAddr.ipV4Addr;
+ duCb.e2apDb.tnlAssoc[tnlAssocIdx].destPort = duCfgParam.sctpParams.ricPort;
+ duCb.e2apDb.tnlAssoc[tnlAssocIdx].usage = BOTH_FUNCTIONALITY;
+ }
+ duCb.e2apDb.numOfRanFunction = 1;
+ for(ranFuncIdx =0; ranFuncIdx<duCb.e2apDb.numOfRanFunction; ranFuncIdx++)
+ {
+ duCb.e2apDb.ranFunction[ranFuncIdx].id = ranFuncIdx + 1;
+ memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.shortName, shortName, sizeof(shortName));
+ memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.serviceModelOID, serviceModelOID, sizeof(serviceModelOID));
+ memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.description, description, sizeof(description));
+ duCb.e2apDb.ranFunction[ranFuncIdx].revisionCounter = 0;
+
+ duCb.e2apDb.ranFunction[ranFuncIdx].numOfEventTriggerStyleSupported = NUM_OF_EVENT_TRIGGER_STYLE_SUPPORTED;
+ for(eventTriggerStyleIdx=0; eventTriggerStyleIdx<duCb.e2apDb.ranFunction[ranFuncIdx].numOfEventTriggerStyleSupported; eventTriggerStyleIdx++)
+ {
+ duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].styleType = EVENT_TRIGGER_STYLE_TYPE;
+ duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].formatType = EVENT_TRIGGER_STYLE_FORMAT_TYPE;
+ memcpy(duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].name, event_trigger_style_name, sizeof(event_trigger_style_name));
+ }
+
+ duCb.e2apDb.ranFunction[ranFuncIdx].numOfReportStyleSupported= NUM_OF_RIC_REPORT_STYLE_SUPPORTED;
+ for(reportStyleIdx=0; reportStyleIdx<duCb.e2apDb.ranFunction[ranFuncIdx].numOfReportStyleSupported; reportStyleIdx++)
+ {
+ duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.styleType = REPORT_STYLE_TYPE;
+ duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.formatType = REPORT_ACTION_FORMAT_TYPE;
+ memcpy(duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.name, ric_report_style_name, sizeof(ric_report_style_name));
+
+ for(measurementInfoIdx =0; measurementInfoIdx<NUM_OF_MEASUREMENT_INFO_SUPPORTED(CONFIG_ADD); measurementInfoIdx++)
+ {
+ measurementInfoLen= strlen(MEASUREMENT_TYPE_NAME[measurementInfoIdx]);
+ MeasurementInfoForAction *measurementInfoForAction;
+ DU_ALLOC(measurementInfoForAction, sizeof(MeasurementInfoForAction));
+ if(measurementInfoForAction)
+ {
+ measurementInfoForAction->measurementTypeId = measurementInfoIdx+1;
+ memcpy(measurementInfoForAction->measurementTypeName, MEASUREMENT_TYPE_NAME[measurementInfoIdx], measurementInfoLen+1);
+ }
+ DU_ALLOC(node, sizeof(CmLList));
+ if(node)
+ {
+ node->node = (PTR) measurementInfoForAction;
+ cmLListAdd2Tail(&duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].measurementInfoList, node);
+ }
+ else
+ {
+
+ DU_FREE(measurementInfoForAction, sizeof(MeasurementInfoForAction));
+ }
+ }
+ }
+
+ duCb.e2apDb.ranFunction[ranFuncIdx].ricIndicationHeaderFormat = RIC_INDICATION_HEADER_FORMAT;
+ duCb.e2apDb.ranFunction[ranFuncIdx].ricIndicationMessageFormat = RIC_INDICATION_MESSAGE_FORMAT;
+ }
+ memset(duCb.e2apDb.e2TransInfo.e2InitTransaction, 0, MAX_NUM_TRANSACTION * sizeof(E2TransInfo));
+ memset(duCb.e2apDb.e2TransInfo.ricInitTransaction, 0, MAX_NUM_TRANSACTION * sizeof(E2TransInfo));
+
+ /* Mib Params */
+ mib.sysFrmNum = SYS_FRAME_NUM;
+#ifdef NR_TDD
+ mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs30or120;
+#else
+ mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs15or60;
+#endif
+ mib.ssb_SubcarrierOffset = SSB_SC_OFFSET; //Kssb
+ mib.dmrs_TypeA_Position = MIB__dmrs_TypeA_Position_pos2;
+ mib.controlResourceSetZero = CORESET_0_INDEX;
+ mib.searchSpaceZero = SEARCHSPACE_0_INDEX;
+ mib.cellBarred = MIB__cellBarred_notBarred;
+ mib.intraFreqReselection = MIB__intraFreqReselection_notAllowed;
+ duCfgParam.mibParams = mib;
+
+ /* SIB1 Params */
+ memset(&sib1.plmn, 0, sizeof(Plmn));
+ sib1.plmn.mcc[0] = PLMN_MCC0;
+ sib1.plmn.mcc[1] = PLMN_MCC1;
+ sib1.plmn.mcc[2] = PLMN_MCC2;
+ sib1.plmn.mnc[0] = PLMN_MNC0;
+ sib1.plmn.mnc[1] = PLMN_MNC1;
+ sib1.ranac = DU_RANAC;
+
+#ifdef O1_ENABLE
+ sib1.tac = cellParams.nRTAC;
+ sib1.cellIdentity = CELL_IDENTITY * cellParams.cellLocalId;
+ DU_LOG("\nDEBUG --> DU_APP: readCfg(): OAM CellLocalId=%d", \
+ sib1.cellIdentity);
+#else
+ sib1.tac = DU_TAC;
+ sib1.cellIdentity = CELL_IDENTITY * NR_CELL_ID;
+#endif
+ sib1.cellResvdForOpUse = PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved;
+ sib1.connEstFailCnt = ConnEstFailureControl__connEstFailCount_n3;
+ sib1.connEstFailOffValidity = ConnEstFailureControl__connEstFailOffsetValidity_s900;
+ sib1.connEstFailOffset = 15;
+ sib1.siSchedInfo.winLen = SI_SchedulingInfo__si_WindowLength_s5;
+ sib1.siSchedInfo.broadcastSta = SchedulingInfo__si_BroadcastStatus_broadcasting;
+ sib1.siSchedInfo.preiodicity = SchedulingInfo__si_Periodicity_rf8;
+ sib1.siSchedInfo.sibType = SIB_TypeInfo__type_sibType2;
+ sib1.siSchedInfo.sibValTag = SIB1_VALUE_TAG;
+
+ fillServCellCfgCommSib(&sib1.srvCellCfgCommSib);
+
+ duCfgParam.sib1Params = sib1;
+
+ for(srvdCellIdx=0; srvdCellIdx<DEFAULT_CELLS; srvdCellIdx++)