1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /* This file contains all utility functions */
20 #include "common_def.h"
22 #include <libxml/parser.h>
23 #include <libxml/tree.h>
24 #include <libxml/xmlmemory.h>
25 #include <arpa/inet.h>
32 #include "du_app_mac_inf.h"
33 #include "du_app_rlc_inf.h"
34 #include "du_e2ap_mgr.h"
38 #include "du_f1ap_conversions.h"
39 #include "OCTET_STRING.h"
40 #include "BIT_STRING.h"
41 #include "odu_common_codec.h"
43 #include "SearchSpace.h"
44 #include "SIB-TypeInfo.h"
45 #include "SchedulingInfo.h"
46 #include "SI-SchedulingInfo.h"
47 #include "ConnEstFailureControl.h"
48 #include "PLMN-IdentityInfo.h"
49 #include "PDSCH-TimeDomainResourceAllocation.h"
50 #include "BCCH-Config.h"
51 #include "PagingCycle.h"
52 #include "PCCH-Config.h"
53 #include "TimeAlignmentTimer.h"
54 #include "BCCH-DL-SCH-Message.h"
55 #include "RACH-ConfigGeneric.h"
56 #include "PUSCH-TimeDomainResourceAllocation.h"
57 #include "PUCCH-ConfigCommon.h"
58 #include "SubcarrierSpacing.h"
59 #include "TDD-UL-DL-Pattern.h"
60 #include "RACH-ConfigCommon.h"
61 #include "BWP-DownlinkCommon.h"
62 #include "BWP-UplinkCommon.h"
63 #include "TDD-UL-DL-ConfigCommon.h"
64 #include "du_sys_info_hdl.h"
67 #include "CmInterface.h"
68 extern StartupConfig g_cfg;
69 extern NRCellDU cellParams;
72 char encBuf[ENC_BUF_MAX_LEN];
75 /* Filling Slot configuration as :
76 * Slot Sym 0 Sym 1 Sym 2 Sym 3 Sym 4 Sym 5 Sym 6 Sym 7 Sym 8 Sym 9 Sym10 Sym11 Sym12 Sym13
77 * 0 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
78 * 1 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
79 * 2 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
80 3 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
81 4 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
82 5 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
83 6 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
84 7 DL DL DL DL DL DL DL DL DL DL DL DL F UL
85 8 UL UL UL UL UL UL UL UL UL UL UL UL UL UL
86 9 UL UL UL UL UL UL UL UL UL UL UL UL UL UL
89 /*******************************************************************
90 * @brief Reads the CL Configuration.
94 * Function : readMacCfg
97 * - Fills up the cell configuration for CL.
98 * - Calls FillSlotConfig()
101 * @return ROK - success
104 * ****************************************************************/
108 uint8_t idx=0, sliceIdx=0,plmnIdx = 0;
109 SupportedSliceList *taiSliceSuppLst;
111 /* DL carrier configuration */
113 duCfgParam.macCellCfg.cellId = cellParams.cellLocalId;
114 duCfgParam.macCellCfg.carrCfg.dlBw = cellParams.bSChannelBwDL;
115 duCfgParam.macCellCfg.carrCfg.arfcnDL = cellParams.arfcnDL;
117 duCfgParam.macCellCfg.cellId = NR_CELL_ID;
118 duCfgParam.macCellCfg.carrCfg.dlBw = NR_BANDWIDTH;
119 duCfgParam.macCellCfg.carrCfg.arfcnDL = NR_DL_ARFCN;
121 duCfgParam.macCellCfg.carrCfg.numTxAnt = NUM_TX_ANT;
122 /* UL Carrier configuration */
124 duCfgParam.macCellCfg.carrCfg.ulBw = cellParams.bSChannelBwUL;
125 duCfgParam.macCellCfg.carrCfg.arfcnUL = cellParams.arfcnUL;
127 duCfgParam.macCellCfg.carrCfg.ulBw = NR_BANDWIDTH;
128 duCfgParam.macCellCfg.carrCfg.arfcnUL = NR_UL_ARFCN;
130 duCfgParam.macCellCfg.carrCfg.numRxAnt = NUM_RX_ANT;
132 /* Cell configuration */
134 duCfgParam.macCellCfg.cellCfg.opState = cellParams.operationalState;
135 duCfgParam.macCellCfg.cellCfg.adminState = cellParams.administrativeState;
136 duCfgParam.macCellCfg.cellCfg.cellState = cellParams.cellState;
137 duCfgParam.macCellCfg.cellCfg.phyCellId = cellParams.nRPCI;
138 duCfgParam.macCellCfg.cellCfg.tac = cellParams.nRTAC;
139 duCfgParam.macCellCfg.cellCfg.ssbFreq = cellParams.ssbFrequency;
141 duCfgParam.macCellCfg.cellCfg.opState = OP_DISABLED;
142 duCfgParam.macCellCfg.cellCfg.adminState = ADMIN_UNLOCKED;
143 duCfgParam.macCellCfg.cellCfg.cellState = CELL_INACTIVE;
144 duCfgParam.macCellCfg.cellCfg.phyCellId = NR_PCI;
145 duCfgParam.macCellCfg.cellCfg.tac = DU_TAC;
146 duCfgParam.macCellCfg.cellCfg.ssbFreq = SSB_FREQUENCY;
148 /* Plmn And SNSSAI Configuration */
149 for(plmnIdx = 0; plmnIdx < MAX_PLMN; plmnIdx++)
151 memcpy(&duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].plmn, &duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[plmnIdx].plmn,\
153 taiSliceSuppLst = &duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[plmnIdx].taiSliceSuppLst;
154 duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.numSupportedSlices = taiSliceSuppLst->numSupportedSlices;
155 if(taiSliceSuppLst->snssai)
157 DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai, (duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.numSupportedSlices) * sizeof(Snssai*));
158 if(duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai == NULLP)
160 DU_LOG("\nERROR --> DU_APP: Memory allocation failed at readMacCfg");
164 for(sliceIdx=0; sliceIdx < taiSliceSuppLst->numSupportedSlices; sliceIdx++)
166 if(taiSliceSuppLst->snssai[sliceIdx] != NULLP)
168 DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx], sizeof(Snssai));
169 if(duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx] == NULLP)
171 DU_LOG("\nERROR --> DU_APP: Memory allocation failed at readMacCfg");
174 memcpy(duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx], taiSliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
178 duCfgParam.macCellCfg.cellCfg.subCarrSpacing = NR_SCS;
179 duCfgParam.macCellCfg.cellCfg.dupType = DUPLEX_MODE;
181 /* SSB configuration */
182 duCfgParam.macCellCfg.ssbCfg.ssbPbchPwr = SSB_PBCH_PWR;
183 duCfgParam.macCellCfg.ssbCfg.bchPayloadFlag = BCH_PAYLOAD;
184 duCfgParam.macCellCfg.ssbCfg.ssbOffsetPointA = OFFSET_TO_POINT_A;
185 duCfgParam.macCellCfg.ssbCfg.betaPss = BETA_PSS;
187 duCfgParam.macCellCfg.ssbCfg.scsCmn = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
188 duCfgParam.macCellCfg.ssbCfg.ssbPeriod = convertSSBPeriodicityToEnum(cellParams.ssbPeriodicity);
189 duCfgParam.macCellCfg.ssbCfg.ssbScOffset = cellParams.ssbOffset;
191 duCfgParam.macCellCfg.ssbCfg.scsCmn = NR_SCS;
192 duCfgParam.macCellCfg.ssbCfg.ssbPeriod = SSB_PRDCTY_MS_20;
193 duCfgParam.macCellCfg.ssbCfg.ssbScOffset = SSB_SUBCARRIER_OFFSET;
195 duCfgParam.macCellCfg.ssbCfg.ssbMask[0] = 1; /* only one SSB is transmitted */
196 if(BuildMibPdu() != ROK)
198 DU_LOG("\nERROR --> Failed to build MIB PDU");
199 memset(&duCfgParam.macCellCfg.ssbCfg.mibPdu, 0, 3*sizeof(uint8_t));
203 memcpy(&duCfgParam.macCellCfg.ssbCfg.mibPdu, encBuf,encBufSize);
206 /* PRACH configuration */
207 duCfgParam.macCellCfg.prachCfg.prachSeqLen = PRACH_SEQ_LEN;
208 duCfgParam.macCellCfg.prachCfg.prachSubcSpacing = convertScsEnumValToScsVal(PRACH_SUBCARRIER_SPACING);
209 duCfgParam.macCellCfg.prachCfg.prachCfgIdx = PRACH_CONFIG_IDX;
210 duCfgParam.macCellCfg.prachCfg.msg1Fdm = NUM_PRACH_FDM;
211 duCfgParam.macCellCfg.prachCfg.fdm[0].rootSeqIdx = ROOT_SEQ_IDX;
212 duCfgParam.macCellCfg.prachCfg.fdm[0].numRootSeq = NUM_ROOT_SEQ;
213 duCfgParam.macCellCfg.prachCfg.fdm[0].k1 = 0;
214 duCfgParam.macCellCfg.prachCfg.fdm[0].zeroCorrZoneCfg = ZERO_CORRELATION_ZONE_CFG;
215 duCfgParam.macCellCfg.prachCfg.prachRstSetCfg = PRACH_RESTRICTED_SET_CFG;
216 duCfgParam.macCellCfg.prachCfg.ssbPerRach = SSB_PER_RACH;
217 duCfgParam.macCellCfg.prachCfg.msg1FreqStart = PRACH_FREQ_START;
219 duCfgParam.macCellCfg.prachCfg.totalNumRaPreamble = NUM_RA_PREAMBLE;
220 duCfgParam.macCellCfg.prachCfg.numCbPreamblePerSsb = CB_PREAMBLE_PER_SSB;
221 duCfgParam.macCellCfg.prachCfg.raRspWindow = RA_RSP_WINDOW;
223 /* TDD configuration */
225 duCfgParam.macCellCfg.tddCfg.tddPeriod = TDD_PERIODICITY;
226 duCfgParam.macCellCfg.tddCfg.nrOfDlSlots = NUM_DL_SLOTS;
227 duCfgParam.macCellCfg.tddCfg.nrOfDlSymbols = NUM_DL_SYMBOLS;
228 duCfgParam.macCellCfg.tddCfg.nrOfUlSlots = NUM_UL_SLOTS;
229 duCfgParam.macCellCfg.tddCfg.nrOfUlSymbols = NUM_UL_SYMBOLS;
235 /* fill SIB1 configuration */
236 duCfgParam.macCellCfg.cellCfg.sib1Cfg.sib1PduLen = duCfgParam.srvdCellLst[0].duSysInfo.sib1Len;
237 DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.cellCfg.sib1Cfg.sib1Pdu,duCfgParam.srvdCellLst[0].duSysInfo.sib1Len);
238 memcpy(duCfgParam.macCellCfg.cellCfg.sib1Cfg.sib1Pdu, duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg, \
239 duCfgParam.srvdCellLst[0].duSysInfo.sib1Len);
240 duCfgParam.macCellCfg.cellCfg.sib1Cfg.pdcchCfgSib1.coresetZeroIndex = CORESET_0_INDEX;
241 duCfgParam.macCellCfg.cellCfg.sib1Cfg.pdcchCfgSib1.searchSpaceZeroIndex = SEARCHSPACE_0_INDEX;
243 duCfgParam.macCellCfg.cellCfg.sib1Cfg.pagingCfg.numPO = duCfgParam.sib1Params.srvCellCfgCommSib.dlCfg.pcchCfg.ns;
244 if((duCfgParam.sib1Params.srvCellCfgCommSib.dlCfg.pcchCfg.firstPDCCHMontioringType != \
245 PCCH_Config__firstPDCCH_MonitoringOccasionOfPO_PR_NOTHING) && (duCfgParam.macCellCfg.cellCfg.sib1Cfg.pagingCfg.numPO != 0))
247 duCfgParam.macCellCfg.cellCfg.sib1Cfg.pagingCfg.poPresent = TRUE;
248 memcpy(duCfgParam.macCellCfg.cellCfg.sib1Cfg.pagingCfg.pagingOcc,
249 duCfgParam.sib1Params.srvCellCfgCommSib.dlCfg.pcchCfg.firstPDCCHMontioringInfo,MAX_PO_PER_PF);
253 duCfgParam.macCellCfg.cellCfg.sib1Cfg.pagingCfg.poPresent = FALSE;
256 /* fill Intial DL BWP */
257 duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.firstPrb = 0;
258 duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.numPrb = MAX_NUM_RB; /* configured to total BW */
259 duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.scs = duCfgParam.macCellCfg.ssbCfg.scsCmn;
260 duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX;
261 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.searchSpaceId = SEARCHSPACE_1_INDEX;
262 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.coresetId = CORESET_0_INDEX;
263 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSlot =
264 SS_MONITORING_SLOT_SL1; /* sl1 - all slots */
265 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.duration = 0;
266 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSymbol =
267 SS_MONITORING_SYMBOL;
268 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
269 candidate.aggLevel1 = 8;
270 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
271 candidate.aggLevel2 = 4;
272 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
273 candidate.aggLevel4 = 2;
274 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
275 candidate.aggLevel8 = 1;
276 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
277 candidate.aggLevel16 = 0;
279 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.numTimeDomAlloc = NUM_TIME_DOM_RSRC_ALLOC;
281 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].k0 = PDSCH_K0_CFG1;
282 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].mappingType =
283 PDSCH_MAPPING_TYPE_A;
284 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].startSymbol =
286 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].lengthSymbol =
290 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].k0 = PDSCH_K0_CFG2;
291 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].mappingType =
292 PDSCH_MAPPING_TYPE_A;
293 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].startSymbol =
295 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].lengthSymbol =
298 /* ra-searchSpace ID is set to 1 */
299 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.raSearchSpaceId = SEARCHSPACE_1_INDEX;
301 /* fill Intial UL BWP */
302 duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.firstPrb = 0;
303 duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.numPrb = MAX_NUM_RB; /* configured to total BW */
304 duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.scs = duCfgParam.macCellCfg.ssbCfg.scsCmn;
305 duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX;
306 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.numTimeDomRsrcAlloc = 2;
307 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].k2 = PUSCH_K2_CFG1;
308 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].mappingType =
309 PUSCH_MAPPING_TYPE_A;
310 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].startSymbol =
312 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].symbolLength =
315 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].k2 = PUSCH_K2_CFG2;
316 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].mappingType =
317 PUSCH_MAPPING_TYPE_A;
318 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].startSymbol =
320 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].symbolLength =
323 duCfgParam.macCellCfg.ssbCfg.dmrsTypeAPos = DMRS_TYPE_A_POS;
325 /* fill PUCCH config common */
326 duCfgParam.macCellCfg.cellCfg.initialUlBwp.pucchCommon.pucchResourceCommon = PUCCH_RSRC_COMMON;
327 duCfgParam.macCellCfg.cellCfg.initialUlBwp.pucchCommon.pucchGroupHopping = PUCCH_NEITHER_HOPPING;
332 /*Note: Static Configuration, when O1 is not configuring the RRM policy*/
333 RrmPolicyList rrmPolicy;
335 rrmPolicy.resourceType = PRB;
336 rrmPolicy.rRMMemberNum = 1;
337 memcpy(rrmPolicy.rRMPolicyMemberList[0].mcc,duCfgParam.macCellCfg.cellCfg.plmnInfoList[0].plmn.mcc, 3*sizeof(uint8_t));
338 memcpy(rrmPolicy.rRMPolicyMemberList[0].mnc,duCfgParam.macCellCfg.cellCfg.plmnInfoList[0].plmn.mnc, 3*sizeof(uint8_t));
339 rrmPolicy.rRMPolicyMemberList[0].sst = 1;
340 rrmPolicy.rRMPolicyMemberList[0].sd[0] = 2;
341 rrmPolicy.rRMPolicyMemberList[0].sd[1] = 3;
342 rrmPolicy.rRMPolicyMemberList[0].sd[2] = 4;
343 rrmPolicy.rRMPolicyMaxRatio = 90;
344 rrmPolicy.rRMPolicyMinRatio = 30;
345 rrmPolicy.rRMPolicyDedicatedRatio = 10;
347 cpyRrmPolicyInDuCfgParams(&rrmPolicy, 1, &duCfgParam.tempSliceCfg);
354 /*******************************************************************
356 * @brief Configures the DU Parameters
360 * Function : calcSliv
363 * - calculate SLIV value from start and length field
365 * @params[in] start symbol
366 * @params[in] length of symbols
369 * ****************************************************************/
370 uint16_t calcSliv(uint8_t startSymbol, uint8_t lengthSymbol)
373 if((lengthSymbol-1) <= 7)
375 sliv = NUM_SYMBOLS_PER_SLOT * (lengthSymbol-1) + startSymbol;
379 sliv = NUM_SYMBOLS_PER_SLOT * (NUM_SYMBOLS_PER_SLOT - lengthSymbol + 1) \
380 + (NUM_SYMBOLS_PER_SLOT - 1 - startSymbol);
386 /*******************************************************************
388 * @brief Configures serving cell config common in sib1
392 * Function : fillServCellCfgCommSib
395 * - fills Serving cell config common for SIB1
397 * @params[in] SrvCellCfgCommSib pointer
398 * @return ROK - success
401 ** ****************************************************************/
402 uint8_t fillServCellCfgCommSib(SrvCellCfgCommSib *srvCellCfgComm)
404 PdcchCfgCommon pdcchCfg;
405 PdschCfgCommon pdschCfg;
407 RachCfgCommon rachCfg;
408 PuschCfgCommon puschCfg;
409 PucchCfgCommon pucchCfg;
410 TddUlDlCfgCommon tddCfg;
413 srvCellCfgComm->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
415 srvCellCfgComm->scs = NR_SCS;
418 /* Configuring DL Config Common for SIB1*/
419 srvCellCfgComm->dlCfg.freqBandInd = NR_FREQ_BAND;
420 srvCellCfgComm->dlCfg.offsetToPointA = OFFSET_TO_POINT_A;
422 srvCellCfgComm->dlCfg.dlScsCarrier.scsOffset = cellParams.ssbOffset;
423 srvCellCfgComm->dlCfg.dlScsCarrier.scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
424 srvCellCfgComm->dlCfg.dlScsCarrier.scsBw = cellParams.bSChannelBwUL;
426 srvCellCfgComm->dlCfg.dlScsCarrier.scsOffset = SSB_SUBCARRIER_OFFSET;
427 srvCellCfgComm->dlCfg.dlScsCarrier.scs = NR_SCS;
428 srvCellCfgComm->dlCfg.dlScsCarrier.scsBw = NR_BANDWIDTH;
430 srvCellCfgComm->dlCfg.locAndBw = FREQ_LOC_BW;
432 /* Configuring PDCCH Config Common For SIB1 */
433 pdcchCfg.present = BWP_DownlinkCommon__pdcch_ConfigCommon_PR_setup;
434 pdcchCfg.ctrlRsrcSetZero = CORESET_0_INDEX;
435 pdcchCfg.searchSpcZero = SEARCHSPACE_0_INDEX;
436 pdcchCfg.searchSpcId = PDCCH_SEARCH_SPACE_ID;
437 pdcchCfg.ctrlRsrcSetId = PDCCH_CTRL_RSRC_SET_ID;
438 pdcchCfg.monitorSlotPrdAndOffPresent = SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1;
439 //pdcchCfg.monitorSlotPrdAndOff = \
440 SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1;
441 pdcchCfg.monitorSymbolsInSlot[0] = 128;
442 pdcchCfg.monitorSymbolsInSlot[1] = 0;
443 pdcchCfg.numCandAggLvl1 = SearchSpace__nrofCandidates__aggregationLevel1_n8;
444 pdcchCfg.numCandAggLvl2 = SearchSpace__nrofCandidates__aggregationLevel2_n4;
445 pdcchCfg.numCandAggLvl4 = SearchSpace__nrofCandidates__aggregationLevel4_n2;
446 pdcchCfg.numCandAggLvl8 = SearchSpace__nrofCandidates__aggregationLevel8_n1;
447 pdcchCfg.numCandAggLvl16 = SearchSpace__nrofCandidates__aggregationLevel16_n0;
448 pdcchCfg.searchSpcType = SearchSpace__searchSpaceType_PR_common;
449 pdcchCfg.commSrchSpcDciFrmt = PDCCH_SERACH_SPACE_DCI_FORMAT;
450 pdcchCfg.searchSpcSib1 = PDCCH_SEARCH_SPACE_ID_SIB1;
451 pdcchCfg.pagingSearchSpc = PDCCH_SEARCH_SPACE_ID_PAGING;
452 pdcchCfg.raSearchSpc = PDCCH_SEARCH_SPACE_ID_PAGING;
453 srvCellCfgComm->dlCfg.pdcchCfg = pdcchCfg;
455 /* Configuring PDSCH Config Common For SIB1 */
456 pdschCfg.present = BWP_DownlinkCommon__pdsch_ConfigCommon_PR_setup;
457 pdschCfg.numTimeDomRsrcAlloc = 2;
458 pdschCfg.timeDomAlloc[0].k0 = PDSCH_K0_CFG1;
459 pdschCfg.timeDomAlloc[0].mapType = PDSCH_TimeDomainResourceAllocation__mappingType_typeA;
460 pdschCfg.timeDomAlloc[0].sliv = calcSliv(PDSCH_START_SYMBOL,PDSCH_LENGTH_SYMBOL);
462 pdschCfg.timeDomAlloc[1].k0 = PDSCH_K0_CFG2;
463 pdschCfg.timeDomAlloc[1].mapType = PDSCH_TimeDomainResourceAllocation__mappingType_typeA;
464 pdschCfg.timeDomAlloc[1].sliv = calcSliv(PDSCH_START_SYMBOL,PDSCH_LENGTH_SYMBOL);
466 srvCellCfgComm->dlCfg.pdschCfg = pdschCfg;
468 /* Configuring BCCH Config for SIB1 */
469 srvCellCfgComm->dlCfg.bcchCfg.modPrdCoeff = BCCH_Config__modificationPeriodCoeff_n16;
471 /* Configuring PCCH Config for SIB1 */
472 pcchCfg.dfltPagingCycle = convertPagingCycleEnumToValue(PagingCycle_rf256);
473 pcchCfg.nAndPagingFrmOffsetType = PCCH_Config__nAndPagingFrameOffset_PR_oneT;
474 pcchCfg.pageFrameOffset = 0;
475 pcchCfg.ns = convertNsEnumToValue(PCCH_Config__ns_one);
476 pcchCfg.firstPDCCHMontioringType = PCCH_Config__firstPDCCH_MonitoringOccasionOfPO_PR_sCS30KHZoneT_SCS15KHZhalfT;
477 memset(pcchCfg.firstPDCCHMontioringInfo, 0, sizeof(uint16_t));
478 pcchCfg.firstPDCCHMontioringInfo[0] = 44;
480 srvCellCfgComm->dlCfg.pcchCfg = pcchCfg;
483 /* Configuring UL Config Common */
485 srvCellCfgComm->ulCfg.ulScsCarrier.scsOffset = cellParams.ssbOffset;
486 srvCellCfgComm->ulCfg.ulScsCarrier.scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
487 srvCellCfgComm->ulCfg.ulScsCarrier.scsBw = cellParams.bSChannelBwUL;
489 srvCellCfgComm->ulCfg.ulScsCarrier.scsOffset = SSB_SUBCARRIER_OFFSET;
490 srvCellCfgComm->ulCfg.ulScsCarrier.scs = NR_SCS;
491 srvCellCfgComm->ulCfg.ulScsCarrier.scsBw = NR_BANDWIDTH;
493 srvCellCfgComm->ulCfg.freqBandInd = NR_FREQ_BAND;
494 srvCellCfgComm->ulCfg.pMax = UL_P_MAX;
495 srvCellCfgComm->ulCfg.locAndBw = FREQ_LOC_BW;
496 srvCellCfgComm->ulCfg.timeAlignTimerComm = TimeAlignmentTimer_infinity;
498 /* Configuring RACH Config Common for SIB1 */
499 rachCfg.present = BWP_UplinkCommon__rach_ConfigCommon_PR_setup;
500 rachCfg.prachCfgIdx = PRACH_CONFIG_IDX;
501 rachCfg.msg1Fdm = RACH_ConfigGeneric__msg1_FDM_one;
502 rachCfg.msg1FreqStart = PRACH_FREQ_START;
503 rachCfg.zeroCorrZoneCfg = ZERO_CORRELATION_ZONE_CFG;
504 rachCfg.preambleRcvdTgtPwr = PRACH_PREAMBLE_RCVD_TGT_PWR;
505 rachCfg.preambleTransMax = RACH_ConfigGeneric__preambleTransMax_n200;
506 rachCfg.pwrRampingStep = RACH_ConfigGeneric__powerRampingStep_dB2;
507 rachCfg.raRspWindow = RACH_ConfigGeneric__ra_ResponseWindow_sl10;
508 rachCfg.numRaPreamble = NUM_RA_PREAMBLE;
509 rachCfg.numSsbPerRachOcc = RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_one;
510 rachCfg.numCbPreamblePerSsb = CB_PREAMBLE_PER_SSB;
511 rachCfg.contResTimer = RACH_ConfigCommon__ra_ContentionResolutionTimer_sf64;
512 rachCfg.rsrpThreshSsb = RSRP_THRESHOLD_SSB;
513 rachCfg.rootSeqIdxPresent = RACH_ConfigCommon__prach_RootSequenceIndex_PR_l139;
514 rachCfg.rootSeqIdx = ROOT_SEQ_IDX;
515 rachCfg.msg1Scs = PRACH_SUBCARRIER_SPACING ;
516 rachCfg.restrictedSetCfg = PRACH_RESTRICTED_SET_CFG;
517 srvCellCfgComm->ulCfg.rachCfg = rachCfg;
519 /* Configuring PUSCH Config Common for SIB1 */
520 puschCfg.puschCfgPresent = BWP_UplinkCommon__pusch_ConfigCommon_PR_setup;
521 puschCfg.numTimeDomRsrcAlloc = 2;
522 puschCfg.timeDomAllocList[0].k2 = PUSCH_K2_CFG1;
523 puschCfg.timeDomAllocList[0].mapType = PUSCH_TimeDomainResourceAllocation__mappingType_typeA;
524 puschCfg.timeDomAllocList[0].sliv = calcSliv(PUSCH_START_SYMBOL,PUSCH_LENGTH_SYMBOL);
525 puschCfg.timeDomAllocList[1].k2 = PUSCH_K2_CFG2;
526 puschCfg.timeDomAllocList[1].mapType = PUSCH_TimeDomainResourceAllocation__mappingType_typeA;
527 puschCfg.timeDomAllocList[1].sliv = calcSliv(PUSCH_START_SYMBOL,PUSCH_LENGTH_SYMBOL);
528 puschCfg.msg3DeltaPreamble = PUSCH_MSG3_DELTA_PREAMBLE;
529 puschCfg.p0NominalWithGrant = PUSCH_P0_NOMINAL_WITH_GRANT;
530 srvCellCfgComm->ulCfg.puschCfg = puschCfg;
532 /* Configuring PUCCH Config Common for SIB1 */
533 pucchCfg.present = BWP_UplinkCommon__pucch_ConfigCommon_PR_setup;
534 pucchCfg.rsrcComm = PUCCH_RSRC_COMMON;
535 pucchCfg.grpHop = PUCCH_ConfigCommon__pucch_GroupHopping_neither;
536 pucchCfg.p0Nominal = PUCCH_P0_NOMINAL;
537 srvCellCfgComm->ulCfg.pucchCfg = pucchCfg;
539 /* Configuring TDD UL DL config common */
540 tddCfg.refScs = SubcarrierSpacing_kHz30;
541 tddCfg.txPrd = TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms5;
542 tddCfg.numDlSlots = NUM_DL_SLOTS;
543 tddCfg.numDlSymbols = NUM_DL_SYMBOLS;
544 tddCfg.numUlSlots = NUM_UL_SLOTS;
545 tddCfg.numUlSymbols = NUM_UL_SYMBOLS;
546 srvCellCfgComm->tddCfg = tddCfg;
548 srvCellCfgComm->ssbPosInBurst = 192;
549 srvCellCfgComm->ssbPrdServingCell = SSB_PERIODICITY;
550 srvCellCfgComm->ssPbchBlockPwr = SSB_PBCH_PWR;
555 /*******************************************************************
557 * @brief Configures the DU Parameters
564 * - Initializes the DuCfg members.
565 * - Calls readMacCfg()
567 * @params[in] system task ID
568 * @return ROK - success
571 * ****************************************************************/
576 uint8_t srvdCellIdx, bandIdx, sliceIdx, plmnIdx, ranFuncIdx, eventTriggerStyleIdx, reportStyleIdx, tnlAssocIdx;
577 uint8_t brdcstPlmnIdx, freqBandIdx, srvdPlmnIdx;
580 SupportedSliceList *taiSliceSuppLst;
581 uint8_t measurementInfoIdx =0, measurementInfoLen=0;
582 char shortName[] = SHORT_NAME;
583 char serviceModelOID[]= SERVICE_MODEL_OID;
584 char description[] = DESCRIPTION;
585 char event_trigger_style_name[]= EVENT_TRIGGER_STYLE_NAME;
586 char ric_report_style_name[]= REPORT_STYLE_NAME;
589 /* Note: Added these below variable for local testing*/
590 Snssai snssai[NUM_OF_SUPPORTED_SLICE] = {{1,{2,3,4}},{5,{6,7,8}}};
593 duCb.e2apDb.e2TransInfo.transIdCounter = 0;
594 duCb.e2apDb.numOfRanFunction = 1;
595 for(ranFuncIdx =0; ranFuncIdx<duCb.e2apDb.numOfRanFunction; ranFuncIdx++)
597 duCb.e2apDb.ranFunction[ranFuncIdx].id = ranFuncIdx + 1;
598 memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.shortName, shortName, sizeof(shortName));
599 memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.serviceModelOID, serviceModelOID, sizeof(serviceModelOID));
600 memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.description, description, sizeof(description));
601 duCb.e2apDb.ranFunction[ranFuncIdx].revisionCounter = 0;
603 duCb.e2apDb.ranFunction[ranFuncIdx].numOfEventTriggerStyleSupported = NUM_OF_EVENT_TRIGGER_STYLE_SUPPORTED;
604 for(eventTriggerStyleIdx=0; eventTriggerStyleIdx<duCb.e2apDb.ranFunction[ranFuncIdx].numOfEventTriggerStyleSupported; eventTriggerStyleIdx++)
606 duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].styleType = EVENT_TRIGGER_STYLE_TYPE;
607 duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].formatType = EVENT_TRIGGER_STYLE_FORMAT_TYPE;
608 memcpy(duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].name, event_trigger_style_name, sizeof(event_trigger_style_name));
611 duCb.e2apDb.ranFunction[ranFuncIdx].numOfReportStyleSupported= NUM_OF_RIC_REPORT_STYLE_SUPPORTED;
612 for(reportStyleIdx=0; reportStyleIdx<duCb.e2apDb.ranFunction[ranFuncIdx].numOfReportStyleSupported; reportStyleIdx++)
614 duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.styleType = REPORT_STYLE_TYPE;
615 duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.formatType = REPORT_ACTION_FORMAT_TYPE;
616 memcpy(duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.name, ric_report_style_name, sizeof(ric_report_style_name));
618 for(measurementInfoIdx =0; measurementInfoIdx<NUM_OF_MEASUREMENT_INFO_SUPPORTED(CONFIG_ADD); measurementInfoIdx++)
620 measurementInfoLen= strlen(MEASUREMENT_TYPE_NAME[measurementInfoIdx]);
621 MeasurementInfoForAction *measurementInfoForAction;
622 DU_ALLOC(measurementInfoForAction, sizeof(MeasurementInfoForAction));
623 if(measurementInfoForAction)
625 measurementInfoForAction->measurementTypeId = measurementInfoIdx+1;
626 memcpy(measurementInfoForAction->measurementTypeName, MEASUREMENT_TYPE_NAME[measurementInfoIdx], measurementInfoLen+1);
628 DU_ALLOC(node, sizeof(CmLList));
631 node->node = (PTR) measurementInfoForAction;
632 cmLListAdd2Tail(&duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].measurementInfoList, node);
637 DU_FREE(measurementInfoForAction, sizeof(MeasurementInfoForAction));
642 duCb.e2apDb.ranFunction[ranFuncIdx].ricIndicationHeaderFormat = RIC_INDICATION_HEADER_FORMAT;
643 duCb.e2apDb.ranFunction[ranFuncIdx].ricIndicationMessageFormat = RIC_INDICATION_MESSAGE_FORMAT;
645 cmLListInit(&duCb.e2apDb.ranFunction[ranFuncIdx].subscriptionList);
647 memset(duCb.e2apDb.e2TransInfo.e2InitTransaction, 0, MAX_NUM_TRANSACTION * sizeof(E2TransInfo));
648 memset(duCb.e2apDb.e2TransInfo.ricInitTransaction, 0, MAX_NUM_TRANSACTION * sizeof(E2TransInfo));
651 mib.sysFrmNum = SYS_FRAME_NUM;
653 mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs30or120;
655 mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs15or60;
657 mib.ssb_SubcarrierOffset = SSB_SC_OFFSET; //Kssb
658 mib.dmrs_TypeA_Position = MIB__dmrs_TypeA_Position_pos2;
659 mib.controlResourceSetZero = CORESET_0_INDEX;
660 mib.searchSpaceZero = SEARCHSPACE_0_INDEX;
661 mib.cellBarred = MIB__cellBarred_notBarred;
662 mib.intraFreqReselection = MIB__intraFreqReselection_notAllowed;
663 duCfgParam.mibParams = mib;
666 memset(&sib1.plmn, 0, sizeof(Plmn));
667 sib1.plmn.mcc[0] = PLMN_MCC0;
668 sib1.plmn.mcc[1] = PLMN_MCC1;
669 sib1.plmn.mcc[2] = PLMN_MCC2;
670 sib1.plmn.mnc[0] = PLMN_MNC0;
671 sib1.plmn.mnc[1] = PLMN_MNC1;
672 sib1.ranac = DU_RANAC;
675 sib1.tac = cellParams.nRTAC;
676 sib1.cellIdentity = CELL_IDENTITY * cellParams.cellLocalId;
677 DU_LOG("\nDEBUG --> DU_APP: readCfg(): OAM CellLocalId=%d", \
681 sib1.cellIdentity = CELL_IDENTITY * NR_CELL_ID;
683 sib1.cellResvdForOpUse = PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved;
684 sib1.connEstFailCnt = ConnEstFailureControl__connEstFailCount_n3;
685 sib1.connEstFailOffValidity = ConnEstFailureControl__connEstFailOffsetValidity_s900;
686 sib1.connEstFailOffset = 15;
687 sib1.siSchedInfo.winLen = SI_SchedulingInfo__si_WindowLength_s5;
688 sib1.siSchedInfo.broadcastSta = SchedulingInfo__si_BroadcastStatus_broadcasting;
689 sib1.siSchedInfo.preiodicity = SchedulingInfo__si_Periodicity_rf8;
690 sib1.siSchedInfo.sibType = SIB_TypeInfo__type_sibType2;
691 sib1.siSchedInfo.sibValTag = SIB1_VALUE_TAG;
693 fillServCellCfgCommSib(&sib1.srvCellCfgCommSib);
695 duCfgParam.sib1Params = sib1;
697 for(srvdCellIdx=0; srvdCellIdx<DEFAULT_CELLS; srvdCellIdx++)
699 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn, 0, sizeof(Plmn));
700 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[0] = PLMN_MCC0;
701 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[1] = PLMN_MCC1;
702 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[2] = PLMN_MCC2;
703 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mnc[0] = PLMN_MNC0;
704 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mnc[1] = PLMN_MNC1;
708 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrPci = cellParams.nRPCI;
710 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrPci = NR_PCI;
712 /* List of Available PLMN */
713 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
715 /* As per spec 38.473, Plmn identity consists of 3 digit from mcc
716 * followed by either 2 digit or 3 digits of mnc */
718 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn, 0,\
721 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
722 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
723 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
724 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
725 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
726 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
728 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[0] = PLMN_MCC0;
729 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[1] = PLMN_MCC1;
730 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[2] = PLMN_MCC2;
731 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[0] = PLMN_MNC0;
732 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[1] = PLMN_MNC1;
735 /* List of Extended PLMN */
736 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
738 /* As per spec 38.473, Plmn identity consists of 3 digit from mcc
739 * followed by either 2 digit or 3 digits of mnc */
741 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn, 0, sizeof(Plmn));
742 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[0] = PLMN_MCC0;
743 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[1] = PLMN_MCC1;
744 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[2] = PLMN_MCC2;
745 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mnc[0] = PLMN_MNC0;
746 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mnc[1] = PLMN_MNC1;
748 /* List of Supporting Slices */
749 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
751 taiSliceSuppLst = &duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].\
754 /* TODO Calculte the exact number of supported slices once will get
755 * cell configuration from O1 */
756 taiSliceSuppLst->numSupportedSlices = NUM_OF_SUPPORTED_SLICE;
757 if(taiSliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
759 DU_LOG("\nERROR --> DU_APP: readCfg(): Number of supported slice [%d] is more than 1024",\
760 taiSliceSuppLst->numSupportedSlices);
764 DU_ALLOC(taiSliceSuppLst->snssai, taiSliceSuppLst->numSupportedSlices*sizeof(Snssai*));
765 if(taiSliceSuppLst->snssai == NULLP)
767 DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
771 for(sliceIdx=0; sliceIdx<taiSliceSuppLst->numSupportedSlices; sliceIdx++)
773 DU_ALLOC(taiSliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
774 if(taiSliceSuppLst->snssai[sliceIdx] == NULLP)
776 DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
780 memcpy(taiSliceSuppLst->snssai[sliceIdx]->sd, cellParams.plmnList[sliceIdx].sd, \
781 SD_SIZE*sizeof(uint8_t));
782 taiSliceSuppLst->snssai[sliceIdx]->sst = cellParams.plmnList[sliceIdx].sst;
784 memcpy(taiSliceSuppLst->snssai[sliceIdx], &snssai[sliceIdx], sizeof(Snssai));
791 /* NR TDD Mode info */
793 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.nrArfcn = cellParams.arfcnUL;
794 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
795 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
797 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.nrArfcn = NR_UL_ARFCN;
798 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
799 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
801 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrb = NRB_273;
803 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
805 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[freqBandIdx].nrFreqBand =\
807 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
809 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[freqBandIdx].sulBand[bandIdx]\
814 /* NR FDD Mode info */
816 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = cellParams.arfcnUL;
817 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
818 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
819 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
820 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = cellParams.arfcnDL;
821 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
822 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
823 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
825 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = NR_UL_ARFCN;
826 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
827 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrScs = NR_SCS;
828 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
829 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = NR_DL_ARFCN;
830 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
831 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
832 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrScs = NR_SCS;
834 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_106;
835 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
837 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[freqBandIdx].\
838 nrFreqBand = NR_FREQ_BAND;
839 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
841 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[freqBandIdx].\
842 sulBand[bandIdx] = SUL_BAND;
845 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_106;
846 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
848 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[freqBandIdx].\
849 nrFreqBand = NR_FREQ_BAND;
850 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
852 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[freqBandIdx].\
853 sulBand[bandIdx] = SUL_BAND;
857 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrb = NRB_106;
858 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrb = NRB_106;
861 /*Measurement Config and Cell Config */
862 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.measTimeCfgDuration = TIME_CFG;
864 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellDir = DL_UL;
866 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellType=CELL_TYPE;
868 /* Broadcast PLMN Identity */
869 for(brdcstPlmnIdx=0; brdcstPlmnIdx<MAX_BPLMN_NRCELL_MINUS_1; brdcstPlmnIdx++)
871 for(plmnIdx=0; plmnIdx<MAX_PLMN; plmnIdx++)
873 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx],\
875 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[0] =\
877 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[1] =\
879 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[2] =\
881 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mnc[0] =\
883 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mnc[1] =\
886 /* Extended PLMN List */
887 for(plmnIdx=0; plmnIdx<MAX_PLMN; plmnIdx++)
889 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
890 extPlmn[plmnIdx], 0, sizeof(Plmn));
891 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
892 extPlmn[plmnIdx].mcc[0] = PLMN_MCC0;
893 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
894 extPlmn[plmnIdx].mcc[1] = PLMN_MCC1;
895 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
896 extPlmn[plmnIdx].mcc[2] = PLMN_MCC2;
897 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
898 extPlmn[plmnIdx].mnc[0] = PLMN_MNC0;
899 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
900 extPlmn[plmnIdx].mnc[1] = PLMN_MNC1;
903 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.epsTac = cellParams.nRTAC; //TODO : to check and fill
904 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.tac = cellParams.nRTAC;
905 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].tac = cellParams.nRTAC;
906 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].nrCellId = cellParams.cellLocalId;
908 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.epsTac = DU_TAC; //TODO : to check and fill
909 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.tac = DU_TAC;
910 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].tac = DU_TAC;
911 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].nrCellId = NR_CELL_ID;
913 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].ranac = NR_RANAC;
916 /*gnb DU System Info mib msg*/
918 DU_ALLOC(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg, encBufSize);
919 if(!(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg))
921 DU_LOG("\nERROR --> DU APP : Memory allocation failure at readCfg");
924 memcpy(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg, encBuf, encBufSize);
925 duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibLen = encBufSize;
927 /*gnb DU System Info mib msg*/
929 DU_ALLOC(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg,\
931 if(!(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg))
933 DU_LOG("\nERROR --> DU APP : Memory allocation failure at readCfg");
936 memcpy(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg,\
938 duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Len = encBufSize;
942 if(readMacCfg() != ROK)
944 DU_LOG("\nERROR --> DU_APP : Failed while reading MAC config");
951 /*******************************************************************
953 * @brief Copy Slice Cfg in temp structre in duCfgParams
957 * Function : cpyRrmPolicyInDuCfgParams
960 * - Copy Slice Cfg in temp structre in duCfgParams
962 * @params[in] RrmPolicy rrmPolicy[], uint8_t policyNum, uint8_t memberList
963 * @return ROK - success
966 * ****************************************************************/
967 uint8_t cpyRrmPolicyInDuCfgParams(RrmPolicyList rrmPolicy[], uint8_t policyNum, MacSliceCfgReq *tempSliceCfg)
969 uint8_t policyIdx = 0, memberListIdx = 0;
972 tempSliceCfg->numOfRrmPolicy = policyNum;
973 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy, tempSliceCfg->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
974 if(!tempSliceCfg->listOfRrmPolicy)
976 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
980 for(policyIdx = 0; policyIdx<tempSliceCfg->numOfRrmPolicy; policyIdx++)
982 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
983 if(!tempSliceCfg->listOfRrmPolicy[policyIdx])
985 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
989 tempSliceCfg->listOfRrmPolicy[policyIdx]->resourceType = rrmPolicy[policyIdx].resourceType;
991 tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem = rrmPolicy[policyIdx].rRMMemberNum;
993 if(tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem)
995 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList,\
996 tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
998 if(!tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList)
1000 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
1005 for(memberListIdx = 0; memberListIdx<tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem; memberListIdx++)
1007 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx], sizeof(RrmPolicyMemberList));
1008 if(!tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx])
1010 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
1013 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->snssai.sd,\
1014 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].sd, 3 * sizeof(uint8_t));
1015 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->snssai.sst,\
1016 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].sst, sizeof(uint8_t));
1017 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->plmn.mcc,\
1018 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].mcc, 3 * sizeof(uint8_t));
1019 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->plmn.mnc,\
1020 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].mnc, 3 * sizeof(uint8_t));
1022 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.maxRatio = rrmPolicy[policyIdx].rRMPolicyMaxRatio;
1023 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.minRatio = rrmPolicy[policyIdx].rRMPolicyMinRatio;
1024 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.dedicatedRatio = rrmPolicy[policyIdx].rRMPolicyDedicatedRatio;
1032 /*******************************************************************
1034 * @brief Fill SCTP Parameters
1038 * Function : parseSctpParams
1040 * Functionality: Fill SCTP Parameters
1042 * @params[in] XML document pointer
1044 * Current node in XML
1045 * Pointer to structure to be filled
1046 * @return ROK - success
1049 * ****************************************************************/
1050 uint8_t parseSctpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SctpParams *sctp)
1052 uint8_t max_du_port = 0;
1053 uint16_t f1_sctp_port = 0;
1054 uint16_t e2_sctp_port = 0;
1056 memset(sctp, 0, sizeof(SctpParams));
1057 cur = cur->xmlChildrenNode;
1061 sctp->duPort[F1_INTERFACE] = g_cfg.DU_Port;
1062 sctp->duPort[E2_INTERFACE] = g_cfg.RIC_Port;
1063 sctp->cuPort = g_cfg.CU_Port;
1064 sctp->ricPort = g_cfg.RIC_Port;
1066 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_DU_PORT")) && (cur->ns == ns))
1068 max_du_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1069 if (max_du_port == 2 )
1071 sctp->duPort[F1_INTERFACE] = f1_sctp_port; /* DU Port idx 0 */
1072 sctp->duPort[E2_INTERFACE] = e2_sctp_port; /* RIC Port idx 1 */
1076 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SCTP_PORT")) && (cur->ns == ns))
1078 f1_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1080 if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_SCTP_PORT")) && (cur->ns == ns))
1082 e2_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1085 sctp->cuPort = f1_sctp_port;
1086 sctp->ricPort = e2_sctp_port;
1093 /*******************************************************************
1095 * @brief Fill EGTP Parameters
1099 * Function : parseEgtpParams
1101 * Functionality: Fill EGTP Parmeters
1103 * @params[in] XML document pointer
1105 * Current node in XML
1106 * Pointer to structure to be filled
1107 * @return ROK - success
1110 * ****************************************************************/
1111 uint8_t parseEgtpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1EgtpParams *egtp)
1113 memset(egtp, 0, sizeof(F1EgtpParams));
1114 cur = cur->xmlChildrenNode;
1117 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_F1_EGTP_PORT")) && (cur->ns == ns))
1119 egtp->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1121 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEST_F1_EGTP_PORT")) && (cur->ns == ns))
1123 egtp->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1125 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_TEID")) && (cur->ns == ns))
1127 egtp->minTunnelId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1134 #ifdef XML_BASED_CONFIG
1135 /*******************************************************************
1137 * @brief Fill MIB configuration
1141 * Function : parseMibParams
1143 * Functionality: Fill MIB configuration
1145 * @params[in] XML document pointer
1147 * Current node in XML
1148 * Pointer to structure to be filled
1149 * @return ROK - success
1152 * ****************************************************************/
1153 uint8_t parseMibParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MibParams *mib)
1155 memset(mib, 0, sizeof(MibParams));
1156 cur = cur -> xmlChildrenNode;
1159 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SYS_FRAME_NUM")) && (cur->ns == ns))
1161 mib->sysFrmNum = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1163 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUB_CARR_SPACE")) && (cur->ns == ns))
1165 mib->subCarrierSpacingCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1167 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFFSET")) && (cur->ns == ns))
1169 mib->ssb_SubcarrierOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1171 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPEA_POSITION")) && (cur->ns == ns))
1173 mib->dmrs_TypeA_Position = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1175 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
1177 mib->controlResourceSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1179 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
1181 mib->searchSpaceZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1183 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_BARRED")) && (cur->ns == ns))
1185 mib->cellBarred = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1187 if ((!xmlStrcmp(cur->name, (const xmlChar *)"INTRA_FREQ_RESELECT")) && (cur->ns == ns))
1189 mib->intraFreqReselection = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1196 /*******************************************************************
1198 * @brief Fill PLMN ID
1202 * Function : parsePlmn
1204 * Functionality: Fill PLMN ID
1206 * @params[in] XML document pointer
1208 * Current node in XML
1209 * Pointer to structure to be filled
1210 * @return ROK - success
1213 * ****************************************************************/
1214 uint8_t parsePlmn(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Plmn *plmn)
1216 xmlNodePtr child = NULLP;
1218 memset(plmn, 0, sizeof(Plmn));
1219 cur = cur->xmlChildrenNode;
1222 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MCC")) && (cur->ns == ns))
1224 child = cur->xmlChildrenNode;
1225 while (child != NULL)
1227 if ((!xmlStrcmp(child->name, (const xmlChar *)"plmn_MCC0")) && (child->ns == ns))
1229 plmn->mcc[0] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1232 if ((!xmlStrcmp(child->name, (const xmlChar *)"plmn_MCC1")) && (child->ns == ns))
1234 plmn->mcc[1] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1237 if ((!xmlStrcmp(child->name, (const xmlChar *)"plmn_MCC2")) && (child->ns == ns))
1239 plmn->mcc[2] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1242 child = child->next;
1246 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MNC")) && (cur->ns == ns))
1248 child = cur->xmlChildrenNode;
1249 while (child != NULL)
1251 if ((!xmlStrcmp(child->name, (const xmlChar *)"plmn_MNC0")) && (child->ns == ns))
1253 plmn->mnc[0] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1256 if ((!xmlStrcmp(child->name, (const xmlChar *)"plmn_MNC1")) && (child->ns == ns))
1258 plmn->mnc[1] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1261 if ((!xmlStrcmp(child->name, (const xmlChar *)"plmn_MNC2")) && (child->ns == ns))
1263 plmn->mnc[2] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1266 child = child->next;
1275 /*******************************************************************
1277 * @brief Fill NR CGI
1281 * Function : parseNrCgi
1283 * Functionality: Fill NR CGI
1285 * @params[in] XML document pointer
1287 * Current node in XML
1288 * Pointer to structure to be filled
1289 * @return ROK - success
1292 * ****************************************************************/
1293 uint8_t parseNrCgi(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrEcgi *nrCgi)
1295 memset(nrCgi, 0, sizeof(NrEcgi));
1296 cur = cur->xmlChildrenNode;
1299 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
1301 if(parsePlmn(doc, ns, cur, &nrCgi->plmn) != ROK)
1307 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
1309 nrCgi-> cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1317 /*******************************************************************
1319 * @brief Fill SNSSAI
1323 * Function : parseSnssai
1325 * Functionality: Fill SNSSAI
1327 * @params[in] XML document pointer
1329 * Current node in XML
1330 * Pointer to structure to be filled
1331 * @return ROK - success
1334 * ****************************************************************/
1335 uint8_t parseSnssai(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Snssai *snssai)
1340 memset(snssai, 0, sizeof(Snssai));
1341 cur = cur ->xmlChildrenNode;
1344 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SST")) && (cur->ns == ns))
1346 snssai->sst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1349 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SD_SIZE")) && (cur->ns == ns))
1351 child = cur->xmlChildrenNode;
1352 while(child != NULL)
1354 if ((!xmlStrcmp(child->name, (const xmlChar *)"SD")) && (child->ns == ns))
1356 snssai->sd[sdIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1359 child = child -> next;
1368 /*******************************************************************
1370 * @brief Fill Supported Slice List
1374 * Function : parseSupportedSliceList
1376 * Functionality: Fill Supported Slice List
1378 * @params[in] XML document pointer
1380 * Current node in XML
1381 * Pointer to structure to be filled
1382 * @return ROK - success
1385 * ****************************************************************/
1386 uint8_t parseSupportedSliceList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SupportedSliceList *sliceSuppLst)
1388 uint8_t sliceIdx = 0;
1389 xmlNodePtr child = NULLP;
1390 xmlNodePtr snssaiNode = NULLP;
1392 memset(sliceSuppLst, 0, sizeof(SupportedSliceList));
1393 cur = cur->xmlChildrenNode;
1396 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SUPPORT_SLICE")) && (cur->ns == ns))
1398 sliceSuppLst->numSupportedSlices = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1399 if(sliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
1401 DU_LOG("\nERROR --> DU_APP: %s: Number of supported slice [%d] is more than 1024",\
1402 __func__, sliceSuppLst->numSupportedSlices);
1407 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI_LIST")) && (cur->ns == ns))
1409 DU_ALLOC_SHRABL_BUF(sliceSuppLst->snssai, (sliceSuppLst->numSupportedSlices) * sizeof(Snssai*));
1410 if (sliceSuppLst->snssai == NULLP)
1412 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
1416 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
1418 DU_ALLOC_SHRABL_BUF(sliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
1419 if (sliceSuppLst->snssai[sliceIdx] == NULLP)
1421 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
1427 memcpy(sliceSuppLst->snssai[sliceIdx]->sd, cellParams.plmnList[sliceIdx].sd, SD_SIZE*sizeof(uint8_t));
1428 sliceSuppLst->snssai[sliceIdx]->sst = cellParams.plmnList[sliceIdx].sst;
1434 child = cur->xmlChildrenNode;
1435 while (child != NULL)
1437 if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
1440 snssaiNode = child->xmlChildrenNode;
1441 while (snssaiNode != NULL)
1443 if ((!xmlStrcmp(snssaiNode->name, (const xmlChar *)"SNSSAI")) && (snssaiNode->ns == ns))
1445 if(parseSnssai(doc, ns, snssaiNode, sliceSuppLst->snssai[sliceIdx]) != ROK)
1451 snssaiNode = snssaiNode->next;
1454 child = child->next;
1464 /*******************************************************************
1466 * @brief Fill Served PLMN
1470 * Function : parseF1SrvdPlmn
1472 * Functionality: Fill Served PLMN
1474 * @params[in] XML document pointer
1476 * Current node in XML
1477 * Pointer to structure to be filled
1478 * @return ROK - success
1481 * ****************************************************************/
1482 uint8_t parseF1SrvdPlmn(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1SrvdPlmn *srvdPlmn, uint8_t srvdPlmnIdx)
1484 memset(srvdPlmn, 0, sizeof(F1SrvdPlmn));
1485 cur = cur->xmlChildrenNode;
1489 fillPlmnFromO1(&srvdPlmn ->plmn, srvdPlmnIdx);
1491 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
1493 if(parsePlmn(doc, ns, cur, &srvdPlmn->plmn) != ROK)
1500 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
1502 if(parsePlmn(doc, ns, cur, &srvdPlmn->extPlmn) != ROK)
1508 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
1510 if(parseSupportedSliceList(doc, ns, cur, &srvdPlmn->taiSliceSuppLst) != ROK)
1521 /*******************************************************************
1523 * @brief Fill cell information
1527 * Function : parseF1CellInfo
1529 * Functionality: Fill cell information
1531 * @params[in] XML document pointer
1533 * Current node in XML
1534 * Pointer to structure to be filled
1535 * @return ROK - success
1538 * ****************************************************************/
1539 uint8_t parseF1CellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1CellInfo *f1CellInfo)
1541 memset(f1CellInfo, 0, sizeof(F1CellInfo));
1542 cur = cur->xmlChildrenNode;
1545 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CGI")) && (cur->ns == ns))
1547 if(parseNrCgi(doc, ns, cur, &f1CellInfo->nrCgi) != ROK)
1554 f1CellInfo->nrPci = cellParams.nRPCI;
1556 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
1558 f1CellInfo->nrPci = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1562 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SRVD_PLMN")) && (cur->ns == ns))
1564 if(parseF1SrvdPlmn(doc, ns, cur, &f1CellInfo->srvdPlmn[0], 0) != ROK)
1575 /*******************************************************************
1577 * @brief Fill Frequency Band
1581 * Function : parseF1FreqBand
1583 * Functionality: Fill Frequency Band
1585 * @params[in] XML document pointer
1587 * Current node in XML
1588 * Pointer to structure to be filled
1589 * @return ROK - success
1592 * ****************************************************************/
1593 uint8_t parseF1FreqBand(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1FreqBand *freqBand)
1596 uint16_t sulValue = 0;
1598 xmlNodePtr sulChild;
1600 memset(freqBand, 0, sizeof(F1FreqBand));
1601 cur = cur->xmlChildrenNode;
1604 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
1606 freqBand->nrFreqBand = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1609 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_BAND_LIST")) && (cur->ns == ns))
1611 child = cur->xmlChildrenNode;
1612 while (child != NULL)
1614 if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
1616 sulChild = child->xmlChildrenNode;
1618 while (sulChild != NULL)
1620 if ((!xmlStrcmp(sulChild->name, (const xmlChar *)"SUL_BAND")) && (sulChild->ns == ns))
1622 sulValue = atoi((char *)xmlNodeListGetString(doc, sulChild->xmlChildrenNode, 1));
1623 if (sulIdx < MAX_NRCELL_BANDS)
1625 freqBand->sulBand[sulIdx] = sulValue;
1630 DU_LOG("ERROR --> DU_APP : %s : SUL_BAND array overflow\n", __func__);
1634 sulChild = sulChild->next;
1637 child = child->next;
1645 /*******************************************************************
1647 * @brief Fill Frequency Band List
1651 * Function : parseF1FreqBandList
1653 * Functionality: Fill Frequency Band List
1655 * @params[in] XML document pointer
1657 * Current node in XML
1658 * Pointer to structure to be filled
1659 * @return ROK - success
1662 * ****************************************************************/
1663 uint8_t parseF1FreqBandList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFreqInfo *nrFreqInfo)
1668 cur = cur->xmlChildrenNode;
1671 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
1673 child = cur->xmlChildrenNode;
1674 while(child != NULL)
1676 if ((!xmlStrcmp(child->name, (const xmlChar *)"F1_FREQ_BAND")) && (child->ns == ns))
1678 if(parseF1FreqBand(doc, ns, child, &nrFreqInfo->freqBand[idx]) != ROK)
1684 child = child -> next;
1693 /*******************************************************************
1695 * @brief Fill Transmission Bandwidth
1699 * Function : parseF1TxBw
1701 * Functionality: Fill Transmission Bandwidth
1703 * @params[in] XML document pointer
1705 * Current node in XML
1706 * Pointer to structure to be filled
1707 * @return ROK - success
1710 * ****************************************************************/
1711 uint8_t parseF1TxBw(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1TxBw *txBw)
1713 memset(txBw, 0, sizeof(F1TxBw));
1714 cur = cur->xmlChildrenNode;
1717 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_SCS")) && (cur->ns == ns))
1719 txBw->nrScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1722 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NRB")) && (cur->ns == ns))
1724 txBw->nrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1732 /*******************************************************************
1734 * @brief Fill SUL Info
1738 * Function : parseF1SulInfo
1740 * Functionality: Fill SUL Info
1742 * @params[in] XML document pointer
1744 * Current node in XML
1745 * Pointer to structure to be filled
1746 * @return ROK - success
1749 * ****************************************************************/
1750 uint8_t parseF1SulInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1SulInfo *sulInfo)
1752 memset(sulInfo, 0, sizeof(F1SulInfo));
1753 cur = cur->xmlChildrenNode;
1756 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_ARFCN")) && (cur->ns == ns))
1758 sulInfo->sulArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1761 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
1763 if(parseF1TxBw(doc, ns, cur, &sulInfo->sulTxBw) != ROK)
1774 /*******************************************************************
1776 * @brief Fill NR Frequency Info
1780 * Function : parseF1NrFreqInfo
1782 * Functionality: Fill NR Frequency Info
1784 * @params[in] XML document pointer
1786 * Current node in XML
1787 * Pointer to structure to be filled
1788 * @return ROK - success
1791 * ****************************************************************/
1792 uint8_t parseF1NrFreqInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFreqInfo *nrFreqInfo)
1794 memset(nrFreqInfo, 0, sizeof(F1NrFreqInfo));
1795 cur = cur->xmlChildrenNode;
1798 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_ARFCN")) && (cur->ns == ns))
1800 nrFreqInfo->nrArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1803 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SUL_INFO")) && (cur->ns == ns))
1805 if(parseF1SulInfo(doc, ns, cur, &nrFreqInfo->sulInfo) != ROK)
1811 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_FREQ_BAND_LIST")) && (cur->ns == ns))
1813 if(parseF1FreqBandList(doc, ns, cur, nrFreqInfo) != ROK)
1824 /*******************************************************************
1826 * @brief Fill NR FDD Info
1830 * Function : parseF1NrFddInfo
1832 * Functionality: Fill NR FDD Info
1834 * @params[in] XML document pointer
1836 * Current node in XML
1837 * Pointer to structure to be filled
1838 * @return ROK - success
1841 * ****************************************************************/
1842 uint8_t parseF1NrFddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFddInfo *fddInfo)
1844 memset(fddInfo, 0, sizeof(F1NrFddInfo));
1845 cur = cur->xmlChildrenNode;
1848 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO_UL")) && (cur->ns == ns))
1850 if(parseF1NrFreqInfo(doc, ns, cur, &fddInfo->ulNrFreqInfo) != ROK)
1856 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO_DL")) && (cur->ns == ns))
1858 if(parseF1NrFreqInfo(doc, ns, cur, &fddInfo->dlNrFreqInfo) != ROK)
1864 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW_UL")) && (cur->ns == ns))
1866 if(parseF1TxBw(doc, ns, cur, &fddInfo->ulTxBw) != ROK)
1872 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW_DL")) && (cur->ns == ns))
1874 if(parseF1TxBw(doc, ns, cur, &fddInfo->dlTxBw) != ROK)
1885 /*******************************************************************
1887 * @brief Fill NR TDD Info
1891 * Function : parseF1NrTddInfo
1893 * Functionality: Fill NR TDD Info
1895 * @params[in] XML document pointer
1897 * Current node in XML
1898 * Pointer to structure to be filled
1899 * @return ROK - success
1902 * ****************************************************************/
1903 uint8_t parseF1NrTddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrTddInfo *tddInfo)
1905 memset(tddInfo, 0, sizeof(F1NrTddInfo));
1906 cur = cur->xmlChildrenNode;
1909 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO")) && (cur->ns == ns))
1911 if(parseF1NrFreqInfo(doc, ns, cur, &tddInfo->nrFreqInfo) != ROK)
1917 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
1919 if(parseF1TxBw(doc, ns, cur, &tddInfo->nrTxBw) != ROK)
1930 /*******************************************************************
1932 * @brief Fill NR Mode Info
1936 * Function : parseNrModeInfo
1938 * Functionality: Fill NR Mode Info
1940 * @params[in] XML document pointer
1942 * Current node in XML
1943 * Pointer to structure to be filled
1944 * @return ROK - success
1947 * ****************************************************************/
1948 uint8_t parseNrModeInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrModeInfo *nrModeInfo)
1952 memset(nrModeInfo, 0, sizeof(NrModeInfo));
1953 cur = cur->xmlChildrenNode;
1956 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE")) && (cur->ns == ns))
1958 strcpy((char*)modeCfg, (char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1961 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FDD_INFO")) && (cur->ns == ns))
1963 if(strcmp(modeCfg, "FDD") == 0)
1965 if(parseF1NrFddInfo(doc, ns, cur, &nrModeInfo->mode.fdd) != ROK)
1972 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_TDD_INFO")) && (cur->ns == ns))
1974 if(strcmp(modeCfg, "TDD") == 0)
1976 if(parseF1NrTddInfo(doc, ns, cur, &nrModeInfo->mode.tdd) != ROK)
1988 /*******************************************************************
1990 * @brief Fill Broadcast PLMN Information
1994 * Function : parseF1BrdcstPlmnInfo
1996 * Functionality: Fill Broadcast PLMN Information
1998 * @params[in] XML document pointer
2000 * Current node in XML
2001 * Pointer to structure to be filled
2002 * @return ROK - success
2005 * ****************************************************************/
2006 uint8_t parseF1BrdcstPlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1BrdcstPlmnInfo *brdcstPlmnInfo)
2008 memset(brdcstPlmnInfo, 0, sizeof(F1BrdcstPlmnInfo));
2009 cur = cur->xmlChildrenNode;
2012 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
2014 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->plmn[0]) != ROK)
2020 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
2022 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->extPlmn[0]) != ROK)
2028 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
2030 brdcstPlmnInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2033 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CELL_ID")) && (cur->ns == ns))
2035 brdcstPlmnInfo->nrCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2038 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_RANAC")) && (cur->ns == ns))
2040 brdcstPlmnInfo->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2048 /*******************************************************************
2050 * @brief Fill DU Cell Information
2054 * Function : parseF1DuCellInfo
2056 * Functionality: Fill DU Cell Information
2058 * @params[in] XML document pointer
2060 * Current node in XML
2061 * Pointer to structure to be filled
2062 * @return ROK - success
2065 * ****************************************************************/
2066 uint8_t parseF1DuCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuCellInfo *duCellInfo)
2068 memset(duCellInfo, 0, sizeof(F1DuCellInfo));
2069 cur = cur->xmlChildrenNode;
2072 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_INFO")) && (cur->ns == ns))
2074 if(parseF1CellInfo(doc, ns, cur, &duCellInfo->cellInfo) != ROK)
2080 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
2082 duCellInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2085 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EPS_TAC")) && (cur->ns == ns))
2087 duCellInfo->epsTac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2090 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE_INFO")) && (cur->ns == ns))
2092 if(parseNrModeInfo(doc, ns, cur, &duCellInfo->f1Mode) != ROK)
2098 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_CFG")) && (cur->ns == ns))
2100 duCellInfo->measTimeCfgDuration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2103 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_DIR")) && (cur->ns == ns))
2105 duCellInfo->cellDir = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2108 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_TYPE")) && (cur->ns == ns))
2110 duCellInfo->cellType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2113 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_BRDCST_PLMN_INFO")) && (cur->ns == ns))
2115 if(parseF1BrdcstPlmnInfo(doc, ns, cur, &duCellInfo->brdcstPlmnInfo[0]) != ROK)
2126 /*******************************************************************
2128 * @brief Fill DU served cell information
2132 * Function : parseF1DuServedCellInfo
2134 * Functionality: Fill DU served cell information
2136 * @params[in] XML document pointer
2138 * Current node in XML
2139 * Pointer to structure to be filled
2140 * @return ROK - success
2143 * ****************************************************************/
2144 uint8_t parseF1DuServedCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuSrvdCellInfo *srvdCellInfo)
2146 memset(srvdCellInfo, 0, sizeof(F1DuSrvdCellInfo));
2147 cur = cur->xmlChildrenNode;
2150 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_CELL_INFO")) && (cur->ns == ns))
2152 if(parseF1DuCellInfo(doc, ns, cur, &srvdCellInfo->duCellInfo) != ROK)
2160 if(fillDuSrvdCellSysInfo(&srvdCellInfo->duSysInfo) != ROK)
2167 /*******************************************************************
2169 * @brief Fill DU Served Cell System Information
2173 * Function : fillDuSrvdCellSysInfo
2175 * Functionality: Fill DU Served Cell System Information
2177 * @params[in] Served Cell System Information
2178 * @return ROK - success
2181 * ****************************************************************/
2182 uint8_t fillDuSrvdCellSysInfo(F1DuSysInfo *sysInfo)
2184 /* GNB DU System Info MIB msg */
2186 DU_ALLOC(sysInfo->mibMsg, encBufSize);
2187 if(!(sysInfo->mibMsg))
2189 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
2192 memcpy(sysInfo->mibMsg, encBuf, encBufSize);
2193 sysInfo->mibLen = encBufSize;
2195 /* GNB DU System Info SIB1 msg */
2197 DU_ALLOC(sysInfo->sib1Msg, encBufSize);
2198 if(!(sysInfo->sib1Msg))
2200 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
2203 memcpy(sysInfo->sib1Msg, encBuf,encBufSize);
2204 sysInfo->sib1Len = encBufSize;
2210 /*******************************************************************
2212 * @brief Fill PLMN received from O1 interface
2216 * Function : fillPlmnFromO1
2218 * Functionality: Fill PLMN received from O1 interface
2220 * @params[in] XML document pointer
2222 * Current node in XML
2223 * Pointer to structure to be filled
2224 * @return ROK - success
2227 * ****************************************************************/
2228 void fillPlmnFromO1(Plmn *PLMN, uint8_t srvdPlmnIdx)
2230 PLMN->mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
2231 PLMN->mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
2232 PLMN->mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
2233 PLMN->mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
2234 PLMN->mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
2235 PLMN->mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
2239 /*******************************************************************
2241 * @brief Fill Beamforming Configuration
2245 * Function : parseBeamformingConfig
2247 * Functionality: Fill Beamforming Configuration
2249 * @params[in] XML document pointer
2251 * Current node in XML
2252 * Pointer to structure to be filled
2253 * @return ROK - success
2256 * ****************************************************************/
2257 uint8_t parseBeamformingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BeamformingConf *beamformingCfg)
2259 memset(beamformingCfg, 0, sizeof(BeamformingConf));
2260 cur = cur -> xmlChildrenNode;
2263 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_BEAMS")) && (cur->ns == ns))
2265 beamformingCfg->numOfBeams = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2268 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_RUS")) && (cur->ns == ns))
2270 beamformingCfg->numTxRUs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2273 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_IDX")) && (cur->ns == ns))
2275 beamformingCfg->beamIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2278 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TYPE")) && (cur->ns == ns))
2280 beamformingCfg->beamType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2283 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_AZIMUTH")) && (cur->ns == ns))
2285 beamformingCfg->beamAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2288 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TILT")) && (cur->ns == ns))
2290 beamformingCfg->beamTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2293 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_HORIZ_WIDTH")) && (cur->ns == ns))
2295 beamformingCfg->beamHorizWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2298 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_VERT_WIDTH")) && (cur->ns == ns))
2300 beamformingCfg->beamVertWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2303 if ((!xmlStrcmp(cur->name, (const xmlChar *)"COVER_SHAPE")) && (cur->ns == ns))
2305 beamformingCfg->coverageShape = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2308 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_TILT")) && (cur->ns == ns))
2310 beamformingCfg->digitalTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2313 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_AZIMUTH")) && (cur->ns == ns))
2315 beamformingCfg->digitalAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2323 /*******************************************************************
2325 * @brief Fill Precoding Configuration
2329 * Function : parsePrecodingConfig
2331 * Functionality: Fill Precoding Configuration
2333 * @params[in] XML document pointer
2335 * Current node in XML
2336 * Pointer to structure to be filled
2337 * @return ROK - success
2340 * ****************************************************************/
2341 uint8_t parsePrecodingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrecodingConf *precodCfg)
2343 memset(precodCfg, 0, sizeof(PrecodingConf));
2344 cur = cur -> xmlChildrenNode;
2347 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_LAYERS")) && (cur->ns == ns))
2349 precodCfg->numLayers = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2352 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ANT_PORTS")) && (cur->ns == ns))
2354 precodCfg->numAntPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2362 /*******************************************************************
2364 * @brief Fill PRACH FDM Information
2368 * Function : parsePrachFdmInfo
2370 * Functionality: Fill PRACH FDM Information
2372 * @params[in] XML document pointer
2374 * Current node in XML
2375 * Pointer to structure to be filled
2376 * @return ROK - success
2379 * ****************************************************************/
2380 uint8_t parsePrachFdmInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PrachFdmInfo *prachFdmInfo)
2382 memset(prachFdmInfo, 0, sizeof(PrachFdmInfo));
2383 cur = cur -> xmlChildrenNode;
2386 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
2388 prachFdmInfo->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2391 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ROOT_SEQ")) && (cur->ns == ns))
2393 prachFdmInfo->numRootSeq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2396 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K1")) && (cur->ns == ns))
2398 prachFdmInfo->k1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2401 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORR_ZONE_CFG")) && (cur->ns == ns))
2403 prachFdmInfo->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2411 /*******************************************************************
2413 * @brief Fill PRACH configuration
2417 * Function : parsePrachCfg
2419 * Functionality: Fill PRACH configuration
2421 * @params[in] XML document pointer
2423 * Current node in XML
2424 * Pointer to structure to be filled
2425 * @return ROK - success
2428 * ****************************************************************/
2429 uint8_t parsePrachCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrachCfg *prachCfg)
2433 uint8_t maxNumRbs = 0;
2434 uint8_t prachMaxPrb = 0;
2436 memset(prachCfg, 0, sizeof(PrachCfg));
2437 cur = cur -> xmlChildrenNode;
2440 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SEQ_LEN")) && (cur->ns == ns))
2442 prachCfg->prachSeqLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2445 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
2447 prachCfg->prachSubcSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2450 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
2452 prachCfg->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2455 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRACH_FDM")) && (cur->ns == ns))
2457 prachCfg->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2460 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FDM_LIST")) && (cur->ns == ns))
2462 child = cur->xmlChildrenNode;
2463 while(child != NULL)
2465 if ((!xmlStrcmp(child->name, (const xmlChar *)"FDM_INFO")) && (child->ns == ns))
2467 if(parsePrachFdmInfo(doc, ns, child, &prachCfg->fdm[fdmIdx]) != ROK)
2473 child = child -> next;
2477 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns == ns))
2479 prachCfg->prachRstSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2482 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PER_RACH")) && (cur->ns == ns))
2484 prachCfg->ssbPerRach = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2487 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
2489 prachCfg->totalNumRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2492 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
2494 prachCfg->totalNumRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2497 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
2499 maxNumRbs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2502 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
2504 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2507 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
2509 prachCfg->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2512 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
2514 prachCfg->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2520 prachCfg->msg1FreqStart = maxNumRbs - prachMaxPrb;
2524 /*******************************************************************
2526 * @brief Fill CSI RS configuration
2530 * Function : parseCsiRsCfg
2532 * Functionality: Fill CSI RS configuration
2534 * @params[in] XML document pointer
2536 * Current node in XML
2537 * Pointer to structure to be filled
2538 * @return ROK - success
2541 * ****************************************************************/
2542 uint8_t parseCsiRsCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CsiRsCfg *csiRsCfg)
2544 memset(csiRsCfg, 0, sizeof(CsiRsCfg));
2545 cur = cur -> xmlChildrenNode;
2548 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_FREQ")) && (cur->ns == ns))
2550 csiRsCfg->csiFreqDomainAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2553 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_PORTS")) && (cur->ns == ns))
2555 csiRsCfg->csiNrofPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2558 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT")) && (cur->ns == ns))
2560 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2563 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT_2")) && (cur->ns == ns))
2565 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2568 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DM_TYPE")) && (cur->ns == ns))
2570 csiRsCfg->csirscdmType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2573 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY")) && (cur->ns == ns))
2575 csiRsCfg->csirsdensity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2578 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY_DOT_5")) && (cur->ns == ns))
2580 csiRsCfg->csirsdensitydot5 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2583 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET")) && (cur->ns == ns))
2585 csiRsCfg->powerControlOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2588 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET_SS")) && (cur->ns == ns))
2590 csiRsCfg->powerControlOffsetSS = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2593 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY_OFFSET")) && (cur->ns == ns))
2595 csiRsCfg->periodicityAndOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2603 /*******************************************************************
2605 * @brief Fill SSB Configuration
2609 * Function : parseSsbCfg
2611 * Functionality: Fill SSB Configuration
2613 * @params[in] XML document pointer
2615 * Current node in XML
2616 * Pointer to structure to be filled
2617 * @return ROK - success
2620 * ****************************************************************/
2621 uint8_t parseSsbCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SsbCfg *ssbCfg)
2624 uint8_t ssbMaskIdx = 0;
2626 memset(ssbCfg, 0, sizeof( SsbCfg));
2627 cur = cur -> xmlChildrenNode;
2630 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBSC_PWR")) && (cur->ns == ns))
2632 ssbCfg->ssbPbchPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2635 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_CMN")) && (cur->ns == ns))
2637 ssbCfg->scsCmn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2640 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_OFF_PT_A")) && (cur->ns == ns))
2642 ssbCfg->ssbOffsetPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2645 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIOD")) && (cur->ns == ns))
2647 ssbCfg->ssbPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2650 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFF")) && (cur->ns == ns))
2652 ssbCfg->ssbScOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2655 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_LIST")) && (cur->ns == ns))
2657 child = cur -> xmlChildrenNode;
2658 while(child != NULL)
2660 if ((!xmlStrcmp(child->name, (const xmlChar *)"SSB_MASK")) && (child->ns == ns))
2662 ssbCfg->ssbMask[ssbMaskIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
2665 child = child -> next;
2669 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_ID")) && (cur->ns == ns))
2671 ssbCfg->beamId[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2674 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BETA_PSS")) && (cur->ns == ns))
2676 ssbCfg->betaPss = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2679 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCH_PAY_FLAG")) && (cur->ns == ns))
2681 ssbCfg->bchPayloadFlag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2684 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPE_A_PROS")) && (cur->ns == ns))
2686 ssbCfg->dmrsTypeAPos = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2694 /*******************************************************************
2696 * @brief Fill Carrier Configuration
2700 * Function : parseCarrierCfg
2702 * Functionality: Fill Carrier Configuration
2704 * @params[in] XML document pointer
2706 * Current node in XML
2707 * Pointer to structure to be filled
2708 * @return ROK - success
2711 * ****************************************************************/
2712 uint8_t parseCarrierCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CarrierCfg *carrierCfg)
2714 memset(carrierCfg, 0, sizeof(CarrierCfg));
2715 cur = cur -> xmlChildrenNode;
2718 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_BW")) && (cur->ns == ns))
2720 carrierCfg->dlBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2723 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_DL_ARFCN")) && (cur->ns == ns))
2725 carrierCfg->arfcnDL = convertArfcnToFreqKhz(atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)));
2728 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_BW")) && (cur->ns == ns))
2730 carrierCfg->ulBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2733 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_UL_ARFCN")) && (cur->ns == ns))
2735 carrierCfg->arfcnUL = convertArfcnToFreqKhz(atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)));
2738 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_ANT")) && (cur->ns == ns))
2740 carrierCfg->numTxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2743 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RX_ANT")) && (cur->ns == ns))
2745 carrierCfg->numRxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2753 /*******************************************************************
2755 * @brief Fill PLMN Information List
2759 * Function : parsePlmnInfo
2761 * Functionality: Fill PLMN Information List
2763 * @params[in] XML document pointer
2765 * Current node in XML
2766 * Pointer to structure to be filled
2767 * @return ROK - success
2770 * ****************************************************************/
2771 uint8_t parsePlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PlmnInfoList *plmnInfoList)
2774 memset(plmnInfoList, 0, sizeof(PlmnInfoList));
2775 cur = cur -> xmlChildrenNode;
2778 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
2780 if(parsePlmn(doc, ns, cur,&plmnInfoList->plmn) != ROK)
2786 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
2788 if(parseSupportedSliceList(doc, ns, cur,&plmnInfoList -> suppSliceList) != ROK)
2799 /*******************************************************************
2801 * @brief Fill PUCCH Configuration Common
2805 * Function : parsePucchConfigCommon
2807 * Functionality: Fill PUCCH Configuration Common
2809 * @params[in] XML document pointer
2811 * Current node in XML
2812 * Pointer to structure to be filled
2813 * @return ROK - success
2816 * ****************************************************************/
2817 uint8_t parsePucchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PucchConfigCommon *pucchCfgCmn)
2819 memset(pucchCfgCmn, 0, sizeof(PucchConfigCommon));
2820 cur = cur -> xmlChildrenNode;
2823 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
2825 pucchCfgCmn->pucchResourceCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2828 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_NEITHER_HOPPING")) && (cur->ns == ns))
2830 pucchCfgCmn->pucchGroupHopping = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2838 /*******************************************************************
2840 * @brief Fill PUSCH Common Time Allocation
2844 * Function : parsePuschTimeDomRsrcAlloc
2846 * Functionality: Fill PUSCH Common Time Allocation
2848 * @params[in] XML document pointer
2850 * Current node in XML
2851 * Pointer to structure to be filled
2852 * @return ROK - success
2855 * ****************************************************************/
2856 uint8_t parsePuschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschTimeDomRsrcAlloc *puschTimeDomRsrsAlloc)
2858 memset(puschTimeDomRsrsAlloc, 0, sizeof(PuschTimeDomRsrcAlloc));
2859 cur = cur -> xmlChildrenNode;
2862 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_K2_CFG")) && (cur->ns == ns))
2864 puschTimeDomRsrsAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2867 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MAPPING_TYPE")) && (cur->ns == ns))
2869 puschTimeDomRsrsAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2872 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
2874 puschTimeDomRsrsAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2877 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
2879 puschTimeDomRsrsAlloc->symbolLength= atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2885 puschTimeDomRsrsAlloc -> startSymbolAndLength = \
2886 calcSliv(puschTimeDomRsrsAlloc->startSymbol, puschTimeDomRsrsAlloc->symbolLength);
2890 /*******************************************************************
2892 * @brief Fill PUSCH Configuration Common
2896 * Function : parsePuschConfigCommon
2898 * Functionality: Fill PUSCH Configuration Common
2900 * @params[in] XML document pointer
2902 * Current node in XML
2903 * Pointer to structure to be filled
2904 * @return ROK - success
2907 * ****************************************************************/
2908 uint8_t parsePuschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschConfigCommon *puschCfgCmn)
2911 xmlNodePtr child = NULLP;
2912 xmlNodePtr pdschNode = NULLP;
2914 memset(puschCfgCmn, 0, sizeof(PuschConfigCommon));
2915 cur = cur -> xmlChildrenNode;
2918 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
2920 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2923 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
2925 child = cur->xmlChildrenNode;
2926 while(child != NULL)
2928 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
2930 pdschNode = child->xmlChildrenNode;
2931 while(pdschNode != NULL)
2933 if ((!xmlStrcmp(pdschNode->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC")) && (pdschNode->ns == ns))
2935 if(parsePuschTimeDomRsrcAlloc(doc, ns, child,&puschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
2941 pdschNode = pdschNode -> next;
2945 child = child -> next;
2953 /*******************************************************************
2955 * @brief Fill BWP Configuration
2959 * Function : parseBwp
2961 * Functionality: Fill BWP Configuration
2963 * @params[in] XML document pointer
2965 * Current node in XML
2966 * Pointer to structure to be filled
2967 * @return ROK - success
2970 * ****************************************************************/
2971 uint8_t parseBwp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpParams *bwp)
2973 memset(bwp, 0, sizeof(BwpParams));
2974 cur = cur -> xmlChildrenNode;
2977 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PRB")) && (cur->ns == ns))
2979 bwp->firstPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2982 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRB")) && (cur->ns == ns))
2984 bwp->numPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2987 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
2989 bwp->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2992 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NORMAL_CYCLIC_PREFIX")) && (cur->ns == ns))
2994 bwp->cyclicPrefix = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3002 /*******************************************************************
3004 * @brief Fill UL BWP Configuration
3008 * Function : parseBwpULConfig
3010 * Functionality: Fill UL BWP Configuration
3012 * @params[in] XML document pointer
3014 * Current node in XML
3015 * Pointer to structure to be filled
3016 * @return ROK - success
3019 * ****************************************************************/
3020 uint8_t parseBwpULConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpUlConfig *bwpUlCfg)
3022 memset(bwpUlCfg, 0, sizeof(BwpUlConfig));
3023 cur = cur -> xmlChildrenNode;
3026 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
3028 if(parseBwp(doc, ns, cur, &bwpUlCfg->bwp) != ROK)
3034 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
3036 if(parsePucchConfigCommon(doc, ns, cur, &bwpUlCfg->pucchCommon) != ROK)
3042 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
3044 if(parsePuschConfigCommon(doc, ns, cur, &bwpUlCfg->puschCommon) != ROK)
3054 /*******************************************************************
3056 * @brief Fill Page Configuration
3060 * Function : parsePageCfg
3062 * Functionality: Fill Page Configuration
3064 * @params[in] XML document pointer
3066 * Current node in XML
3067 * Pointer to structure to be filled
3068 * @return ROK - success
3071 * ****************************************************************/
3072 uint8_t parsePageCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SchPageCfg *pageCfg)
3076 memset(pageCfg, 0, sizeof(SchPageCfg));
3077 cur = cur -> xmlChildrenNode;
3080 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PO")) && (cur->ns == ns))
3082 pageCfg->numPO = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3085 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PO_PRESENT")) && (cur->ns == ns))
3087 poPresent = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
3088 if(!strcmp(poPresent, "TRUE"))
3090 pageCfg->poPresent = true;
3094 pageCfg->poPresent = false;
3098 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGING_OCC")) && (cur->ns == ns))
3100 pageCfg->pagingOcc[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3108 /*******************************************************************
3110 * @brief Fill SIB1 PDCCH Configuration
3114 * Function : parsePdcchCfgSib1
3116 * Functionality: Fill SIB1 PDCCH Configuration
3118 * @params[in] XML document pointer
3120 * Current node in XML
3121 * Pointer to structure to be filled
3122 * @return ROK - success
3125 * ****************************************************************/
3126 uint8_t parsePdcchCfgSib1(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigSib1 *pdcchConfigSib1)
3128 memset(pdcchConfigSib1, 0, sizeof(PdcchConfigSib1));
3129 cur = cur -> xmlChildrenNode;
3132 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_ZERO_INDEX")) && (cur->ns == ns))
3134 pdcchConfigSib1->coresetZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3137 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_ZERO_INDEX")) && (cur->ns == ns))
3139 pdcchConfigSib1->searchSpaceZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3147 /*******************************************************************
3149 * @brief Fill SIB1 Cell Configuration
3153 * Function : parseSib1CellCfg
3155 * Functionality: Fill SIB1 Cell Configuration
3157 * @params[in] XML document pointer
3159 * Current node in XML
3160 * Pointer to structure to be filled
3161 * @return ROK - success
3164 * ****************************************************************/
3165 uint8_t parseSib1CellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Sib1CellCfg *sib1CellCfg)
3167 memset(sib1CellCfg, 0, sizeof( Sib1CellCfg));
3168 cur = cur -> xmlChildrenNode;
3171 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_PAGE_CFG")) && (cur->ns == ns))
3173 if(parsePageCfg(doc, ns, cur, &sib1CellCfg->pagingCfg) != ROK)
3179 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CONFIG_SIB1")) && (cur->ns == ns))
3181 if(parsePdcchCfgSib1(doc, ns, cur, &sib1CellCfg->pdcchCfgSib1) != ROK)
3192 /*******************************************************************
3194 * @brief Fill Aggregation Level Candidates Information
3198 * Function : parseCandidateInfo
3200 * Functionality: Fill Aggregation Level Candidates Information
3202 * @params[in] XML document pointer
3204 * Current node in XML
3205 * Pointer to structure to be filled
3206 * @return ROK - success
3209 * ****************************************************************/
3210 uint8_t parseCandidateInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CandidatesInfo *candInfo)
3212 memset(candInfo, 0, sizeof(CandidatesInfo));
3213 cur = cur -> xmlChildrenNode;
3216 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL1")) && (cur->ns == ns))
3218 candInfo->aggLevel1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3221 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL2")) && (cur->ns == ns))
3223 candInfo->aggLevel2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3226 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL4")) && (cur->ns == ns))
3228 candInfo->aggLevel4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3231 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL8")) && (cur->ns == ns))
3233 candInfo->aggLevel8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3236 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL16")) && (cur->ns == ns))
3238 candInfo->aggLevel16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3246 /*******************************************************************
3248 * @brief Fill Search Space Connfiguration
3252 * Function : parseSearchSpaceCfg
3254 * Functionality: Fill Search Space Configuration
3256 * @params[in] XML document pointer
3258 * Current node in XML
3259 * Pointer to structure to be filled
3260 * @return ROK - success
3263 * ****************************************************************/
3264 uint8_t parseSearchSpaceCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SearchSpaceCfg *searchSpaceCfg)
3266 memset(searchSpaceCfg, 0, sizeof(SearchSpaceCfg));
3267 cur = cur -> xmlChildrenNode;
3270 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_1_INDEX")) && (cur->ns == ns))
3272 searchSpaceCfg->searchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3275 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
3277 searchSpaceCfg->coresetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3280 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SLOT_SL1")) && (cur->ns == ns))
3282 searchSpaceCfg->monitoringSlot = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3285 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DURATION")) && (cur->ns == ns))
3287 searchSpaceCfg->duration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3290 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SYMBOL")) && (cur->ns == ns))
3292 searchSpaceCfg->monitoringSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3295 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CANDIDATE_INFO")) && (cur->ns == ns))
3297 if(parseCandidateInfo(doc, ns, cur, &searchSpaceCfg->candidate) != ROK)
3308 /*******************************************************************
3310 * @brief Fill PDCCH Configuration Common
3314 * Function : parsePdcchCfgCommon
3316 * Functionality: Fill PDCCH Configuration Common
3318 * @params[in] XML document pointer
3320 * Current node in XML
3321 * Pointer to structure to be filled
3322 * @return ROK - success
3325 * ****************************************************************/
3326 uint8_t parsePdcchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigCommon *pdcchCfgCm)
3328 memset(pdcchCfgCm, 0, sizeof(PdcchConfigCommon));
3329 cur = cur -> xmlChildrenNode;
3332 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_CFG")) && (cur->ns == ns))
3334 if(parseSearchSpaceCfg(doc, ns, cur, &pdcchCfgCm->commonSearchSpace) != ROK)
3340 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_1_INDEX")) && (cur->ns == ns))
3342 pdcchCfgCm->raSearchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3351 /*******************************************************************
3353 * @brief Fill PDSCH Common Time Domain Resource Allocation
3357 * Function : parsePdschCmnTimeDomRsrcAlloc
3359 * Functionality: Fill PDSCH Common Time Domain Resource Allocation
3361 * @params[in] XML document pointer
3363 * Current node in XML
3364 * Pointer to structure to be filled
3365 * @return ROK - success
3368 * ****************************************************************/
3369 uint8_t parsePdschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,\
3370 PdschCfgCommTimeDomRsrcAlloc *pdschTimeDomRsrcAlloc)
3372 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschCfgCommTimeDomRsrcAlloc));
3373 cur = cur -> xmlChildrenNode;
3376 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_K0_CFG")) && (cur->ns == ns))
3378 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3380 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_MAPPING_TYPE")) && (cur->ns == ns))
3382 pdschTimeDomRsrcAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3384 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
3386 pdschTimeDomRsrcAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3388 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3390 pdschTimeDomRsrcAlloc->lengthSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3398 /*******************************************************************
3400 * @brief Fill PDSCH Configuration Common
3404 * Function : parsePdschConfigCommon
3406 * Functionality: Fill PDSCH Configuration Common
3408 * @params[in] XML document pointer
3410 * Current node in XML
3411 * Pointer to structure to be filled
3412 * @return ROK - success
3415 * ****************************************************************/
3416 uint8_t parsePdschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdschConfigCommon *pdschCfgCmn)
3419 xmlNodePtr child = NULLP;
3420 xmlNodePtr pdschNode = NULLP;
3422 memset(pdschCfgCmn, 0, sizeof(PdschConfigCommon));
3423 cur = cur -> xmlChildrenNode;
3426 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
3428 pdschCfgCmn->numTimeDomAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3431 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
3433 child = cur->xmlChildrenNode;
3434 while(child != NULL)
3436 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
3438 pdschNode = child->xmlChildrenNode;
3439 while(pdschNode != NULL)
3441 if ((!xmlStrcmp(pdschNode->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC")) && (pdschNode->ns == ns))
3443 if(parsePdschCmnTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
3449 pdschNode = pdschNode -> next;
3453 child = child -> next;
3461 /*******************************************************************
3463 * @brief Fill DL BWP Configuration
3467 * Function : parseBwpDLConfig
3469 * Functionality: Fill DL BWP Configuration
3471 * @params[in] XML document pointer
3473 * Current node in XML
3474 * Pointer to structure to be filled
3475 * @return ROK - success
3478 * ****************************************************************/
3479 uint8_t parseBwpDLConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpDlConfig *bwpDlCfg)
3481 memset(bwpDlCfg, 0, sizeof(BwpDlConfig));
3482 cur = cur -> xmlChildrenNode;
3485 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
3487 if(parseBwp(doc, ns, cur, &bwpDlCfg->bwp) != ROK)
3493 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
3495 if(parsePdcchCfgCommon(doc, ns, cur, &bwpDlCfg->pdcchCommon) != ROK)
3501 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
3503 if(parsePdschConfigCommon(doc, ns, cur, &bwpDlCfg->pdschCommon) != ROK)
3514 /*******************************************************************
3516 * @brief Fill Cell Configuration
3520 * Function : parseCellCfg
3522 * Functionality: Fill Cell Configuration
3524 * @params[in] XML document pointer
3526 * Current node in XML
3527 * Pointer to structure to be filled
3528 * @return ROK - success
3531 * ****************************************************************/
3532 uint8_t parseCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CellCfg *cellCfg)
3534 memset(cellCfg, 0, sizeof(CellCfg));
3535 cur = cur -> xmlChildrenNode;
3538 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_OP_STATE")) && (cur->ns == ns))
3540 cellCfg->opState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3543 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_ADMIN_STATE")) && (cur->ns == ns))
3545 cellCfg->adminState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3548 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_STATE")) && (cur->ns == ns))
3550 cellCfg->cellState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3553 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN_INFO")) && (cur->ns == ns))
3555 if(parsePlmnInfo(doc, ns, cur, &cellCfg->plmnInfoList[0]) != ROK)
3561 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
3563 cellCfg->phyCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3566 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
3568 cellCfg->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3571 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_FREQUENCY")) && (cur->ns == ns))
3573 cellCfg->ssbFreq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3576 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3578 cellCfg->subCarrSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3581 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DUPLEX_MODE")) && (cur->ns == ns))
3583 cellCfg->dupType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3586 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_CELL_CFG")) && (cur->ns == ns))
3588 if(parseSib1CellCfg(doc, ns, cur, &cellCfg->sib1Cfg) != ROK)
3594 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_DL_CFG")) && (cur->ns == ns))
3596 if(parseBwpDLConfig(doc, ns, cur, &cellCfg->initialDlBwp) != ROK)
3602 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_UL_CFG")) && (cur->ns == ns))
3604 if(parseBwpULConfig(doc, ns, cur, &cellCfg->initialUlBwp) != ROK)
3616 /*******************************************************************
3618 * @brief Fill TDD slot configuration
3622 * Function : parseTddCfg
3624 * Functionality: Fill TDD slot configuration
3626 * @params[in] XML document pointer
3628 * Current node in XML
3629 * Pointer to structure to be filled
3630 * @return ROK - success
3633 * ****************************************************************/
3634 uint8_t parseTddCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TDDCfg *tddCfg)
3636 memset(tddCfg, 0, sizeof(TDDCfg));
3637 cur = cur -> xmlChildrenNode;
3640 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_PERIODICITY")) && (cur->ns == ns))
3642 tddCfg->tddPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3645 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
3647 tddCfg->nrOfDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3650 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
3652 tddCfg->nrOfDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3655 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
3657 tddCfg->nrOfUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3660 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
3662 tddCfg->nrOfUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3671 /*******************************************************************
3673 * @brief Fill MAC Cell Configuration
3677 * Function : parseMacCellCfg
3679 * Functionality: Fill MAC Cell Configuration
3681 * @params[in] XML document pointer
3683 * Current node in XML
3684 * Pointer to structure to be filled
3685 * @return ROK - success
3688 * ****************************************************************/
3689 uint8_t parseMacCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacCellCfg *macCellCfg)
3691 memset(macCellCfg, 0, sizeof(MacCellCfg));
3692 cur = cur -> xmlChildrenNode;
3695 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
3697 macCellCfg->cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3700 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CARRIER_CFG")) && (cur->ns == ns))
3702 if(parseCarrierCfg(doc, ns, cur, &macCellCfg->carrCfg) != ROK)
3708 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_CFG")) && (cur->ns == ns))
3710 if(parseCellCfg(doc, ns, cur, &macCellCfg->cellCfg) != ROK)
3716 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_CFG")) && (cur->ns == ns))
3718 if(parseSsbCfg(doc, ns, cur, &macCellCfg->ssbCfg) != ROK)
3724 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_CFG")) && (cur->ns == ns))
3726 if(parseCsiRsCfg(doc, ns, cur, &macCellCfg->csiRsCfg) != ROK)
3732 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CFG")) && (cur->ns == ns))
3734 if(parsePrachCfg(doc, ns, cur, &macCellCfg->prachCfg) != ROK)
3741 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_CFG")) && (cur->ns == ns))
3743 if(parseTddCfg(doc, ns, cur, &macCellCfg->tddCfg) != ROK)
3750 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRE_CODE_CFG")) && (cur->ns == ns))
3752 if(parsePrecodingConfig(doc, ns, cur, &macCellCfg->precodingConf) != ROK)
3758 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_FORM_CFG")) && (cur->ns == ns))
3760 if(parseBeamformingConfig(doc, ns, cur, &macCellCfg->beamCfg) != ROK)
3771 /*******************************************************************
3773 * @brief Fill PUSCH Configuration Common Time Domain
3774 * Resource Allocation
3778 * Function : parsePuschCmnTimeDomRsrcAlloc
3780 * Functionality: Fill PUSCH Configuration Common Time Domain
3781 * Resource Allocation
3783 * @params[in] XML document pointer
3785 * Current node in XML
3786 * Pointer to structure to be filled
3787 * @return ROK - success
3790 * ****************************************************************/
3791 uint8_t parsePuschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCmnTimeDomAlloc *puschCmnTimeDomAlloc)
3793 uint16_t startSymbol;
3796 memset(puschCmnTimeDomAlloc, 0, sizeof(PuschCfgCmnTimeDomAlloc));
3797 cur = cur -> xmlChildrenNode;
3800 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K2")) && (cur->ns == ns))
3802 puschCmnTimeDomAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3804 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
3806 puschCmnTimeDomAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3808 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
3810 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3812 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3814 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3818 puschCmnTimeDomAlloc->sliv = calcSliv(startSymbol, lenSymbol);
3822 /*******************************************************************
3824 * @brief Fill PUSCH Configuration Common
3828 * Function : parsePuschCfgCommon
3830 * Functionality: Fill PUSCH Configuration Common
3832 * @params[in] XML document pointer
3834 * Current node in XML
3835 * Pointer to structure to be filled
3836 * @return ROK - success
3839 * ****************************************************************/
3840 uint8_t parsePuschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCommon *puschCfgCmn)
3842 uint8_t rsrcIdx = 0;
3843 xmlNodePtr child = NULLP;
3844 xmlNodePtr rsrcNode = NULLP;
3846 memset(puschCfgCmn, 0, sizeof(PuschCfgCommon));
3847 cur = cur -> xmlChildrenNode;
3850 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_PRESENT")) && (cur->ns == ns))
3852 puschCfgCmn->puschCfgPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3855 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MSG3_DELTA_PREAMBLE")) && (cur->ns == ns))
3857 puschCfgCmn->msg3DeltaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3860 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_P0_NOMINAL_WITH_GRANT")) && (cur->ns == ns))
3862 puschCfgCmn->p0NominalWithGrant = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3865 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
3867 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3870 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
3872 child = cur->xmlChildrenNode;
3873 while (child != NULL)
3875 if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
3877 rsrcNode = child->xmlChildrenNode;
3878 while (rsrcNode != NULL)
3880 if ((!xmlStrcmp(rsrcNode->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC")) \
3881 && (rsrcNode->ns == ns))
3883 if(parsePuschCmnTimeDomRsrcAlloc(doc, ns, rsrcNode, &puschCfgCmn->timeDomAllocList[rsrcIdx]) != ROK)
3889 rsrcNode = rsrcNode->next;
3892 child = child->next;
3900 /*******************************************************************
3902 * @brief Fill PUCCH Configuration Common
3906 * Function : parsePucchCfgCommon
3908 * Functionality: Fill PUCCH Configuration Common
3910 * @params[in] XML document pointer
3912 * Current node in XML
3913 * Pointer to structure to be filled
3914 * @return ROK - success
3917 * ****************************************************************/
3918 uint8_t parsePucchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PucchCfgCommon *pucchCfgCmn)
3920 memset(pucchCfgCmn, 0, sizeof(PucchCfgCommon));
3921 cur = cur -> xmlChildrenNode;
3924 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3926 pucchCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3929 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
3931 pucchCfgCmn->rsrcComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3934 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GRP_HOP")) && (cur->ns == ns))
3936 pucchCfgCmn->grpHop = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3939 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_P0_NOMINAL")) && (cur->ns == ns))
3941 pucchCfgCmn->p0Nominal = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3949 /*******************************************************************
3951 * @brief Fill RACH Configuration Common
3955 * Function : parseRachCfgCommon
3957 * Functionality: Fill RACH Configuration Common
3959 * @params[in] XML document pointer
3961 * Current node in XML
3962 * Pointer to structure to be filled
3963 * @return ROK - success
3966 * ****************************************************************/
3967 uint8_t parseRachCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RachCfgCommon *rachCfgCmn)
3972 memset(rachCfgCmn, 0, sizeof(RachCfgCommon));
3973 cur = cur -> xmlChildrenNode;
3976 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3978 rachCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3981 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
3983 rachCfgCmn->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3986 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MSG_1_FDM")) && (cur->ns == ns))
3988 rachCfgCmn->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3991 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
3993 maxNumRb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3995 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
3997 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4000 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORRELATION_ZONE_CFG")) && (cur->ns == ns))
4002 rachCfgCmn->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4005 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_PREAMBLE_RCVD_TGT_PWR")) && (cur->ns == ns))
4007 rachCfgCmn->preambleRcvdTgtPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4010 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PREAMBLE_TRANS_MAX")) && (cur->ns == ns))
4012 rachCfgCmn->preambleTransMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4015 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PWR_RAMPING_STEP")) && (cur->ns == ns))
4017 rachCfgCmn->pwrRampingStep = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4020 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
4022 rachCfgCmn->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4025 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
4027 rachCfgCmn->numRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4030 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SSB_PER_RACH_OCC")) && (cur->ns == ns))
4032 rachCfgCmn->numSsbPerRachOcc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4035 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
4037 rachCfgCmn->numCbPreamblePerSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4040 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONT_RES_TIMER")) && (cur->ns == ns))
4042 rachCfgCmn->contResTimer = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4045 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
4047 rachCfgCmn->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4050 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX_PRESENT")) && (cur->ns == ns))
4052 rachCfgCmn->rootSeqIdxPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4055 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
4057 rachCfgCmn->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4060 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SUBCARRIER_SPACING")) && (cur->ns == ns))
4062 rachCfgCmn->msg1Scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4065 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns== ns))
4067 rachCfgCmn->restrictedSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4073 rachCfgCmn->msg1FreqStart = ((maxNumRb) - (prachMaxPrb));
4077 /*******************************************************************
4079 * @brief Fill SCS Specific Carrier
4083 * Function : parseScsSpecCarrier
4085 * Functionality: Fill SCS Specific Carrier
4087 * @params[in] XML document pointer
4089 * Current node in XML
4090 * Pointer to structure to be filled
4091 * @return ROK - success
4094 * ****************************************************************/
4095 uint8_t parseScsSpecCarrier(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,ScsSpecCarrier *scsSpecCrr)
4097 memset(scsSpecCrr, 0, sizeof(ScsSpecCarrier));
4098 cur = cur -> xmlChildrenNode;
4101 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SUBCARRIER_OFFSET")) && (cur->ns == ns))
4103 scsSpecCrr->scsOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4106 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
4108 scsSpecCrr->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4111 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_BW")) && (cur->ns == ns))
4113 scsSpecCrr->scsBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4120 /*******************************************************************
4122 * @brief Fill UL Config Common
4126 * Function : parseUlCfgCommon
4128 * Functionality: Fill UL Config Common
4130 * @params[in] XML document pointer
4132 * Current node in XML
4133 * Pointer to structure to be filled
4134 * @return ROK - success
4137 * ****************************************************************/
4138 uint8_t parseUlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,UlCfgCommon *ulCfgCmn)
4140 memset(ulCfgCmn, 0, sizeof(UlCfgCommon));
4141 cur = cur -> xmlChildrenNode;
4144 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
4146 ulCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4149 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_P_MAX")) && (cur->ns == ns))
4151 ulCfgCmn->pMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4154 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
4156 ulCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4159 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_ALLIGN_TIMER_COMM")) && (cur->ns == ns))
4161 ulCfgCmn->timeAlignTimerComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4164 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
4166 if(parseScsSpecCarrier(doc, ns, cur, &ulCfgCmn->ulScsCarrier) != ROK)
4172 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RACH_CFG_COMMON")) && (cur->ns == ns))
4174 if(parseRachCfgCommon(doc, ns, cur, &ulCfgCmn->rachCfg) != ROK)
4180 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
4182 if(parsePuschCfgCommon(doc, ns, cur, &ulCfgCmn->puschCfg) != ROK)
4188 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
4190 if(parsePucchCfgCommon(doc, ns, cur, &ulCfgCmn->pucchCfg) != ROK)
4201 /*******************************************************************
4203 * @brief Fill TDD UL DL Configuration Common
4207 * Function : parseTddUlDlCfgCommon
4209 * Functionality: Fill TDD UL DL Configuration Common
4211 * @params[in] XML document pointer
4213 * Current node in XML
4214 * Pointer to structure to be filled
4215 * @return ROK - success
4218 * ****************************************************************/
4219 uint8_t parseTddUlDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TddUlDlCfgCommon *tddUlDlCfgCmn)
4221 memset(tddUlDlCfgCmn, 0, sizeof(TddUlDlCfgCommon));
4222 cur = cur -> xmlChildrenNode;
4225 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REF_SCS")) && (cur->ns == ns))
4227 tddUlDlCfgCmn->refScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4230 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TX_PRD")) && (cur->ns == ns))
4232 tddUlDlCfgCmn->txPrd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4235 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
4237 tddUlDlCfgCmn->numDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4240 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
4242 tddUlDlCfgCmn->numDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4245 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
4247 tddUlDlCfgCmn->numUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4250 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
4252 tddUlDlCfgCmn->numUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4260 /*******************************************************************
4262 * @brief Fill PCCH Configuration
4266 * Function : parsePcchCfg
4268 * Functionality: Fill PCCH Configuration
4270 * @params[in] XML document pointer
4272 * Current node in XML
4273 * Pointer to structure to be filled
4274 * @return ROK - success
4277 * ****************************************************************/
4278 uint8_t parsePcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PcchCfg *pcchCfg)
4280 xmlNodePtr child = NULLP;
4281 xmlNodePtr firstPdcchNode = NULLP;
4284 memset(pcchCfg, 0, sizeof(PcchCfg));
4285 cur = cur -> xmlChildrenNode;
4288 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DFLT_PAGING_CYCLE")) && (cur->ns == ns))
4290 pcchCfg->dfltPagingCycle = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4293 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAND_PAGING_FRM_OFFSET")) && (cur->ns == ns))
4295 pcchCfg->nAndPagingFrmOffsetType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4298 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGE_FRM_OFFSET")) && (cur->ns == ns))
4300 pcchCfg->pageFrameOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4303 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NS")) && (cur->ns == ns))
4305 pcchCfg->ns = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4308 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_TYPE")) && (cur->ns == ns))
4310 pcchCfg->firstPDCCHMontioringType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4313 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
4315 child = cur->xmlChildrenNode;
4316 while(child != NULL)
4318 if ((!xmlStrcmp(child->name, (const xmlChar *)"FIRST_PDCCH_LIST")) && (child->ns == ns))
4320 firstPdcchNode = child->xmlChildrenNode;
4321 while (firstPdcchNode != NULL)
4323 if ((!xmlStrcmp(firstPdcchNode->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_INFO")) && (firstPdcchNode->ns == ns))
4325 pcchCfg->firstPDCCHMontioringInfo[idx] = atoi((char *)xmlNodeListGetString(doc, firstPdcchNode->xmlChildrenNode, 1));
4328 firstPdcchNode = firstPdcchNode->next;
4331 child = child -> next;
4339 /*******************************************************************
4341 * @brief Fill PDSCH Time Domain Resource Allocation
4345 * Function : parsePdschTimeDomRsrcAlloc
4347 * Functionality: Fill PDSCH Time Domain Resource Allocation
4349 * @params[in] XML document pointer
4351 * Current node in XML
4352 * Pointer to structure to be filled
4353 * @return ROK - success
4356 * ****************************************************************/
4357 uint8_t parsePdschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc)
4359 uint16_t startSymbol;
4362 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschTimeDomainRsrcAlloc));
4363 cur = cur -> xmlChildrenNode;
4366 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K0")) && (cur->ns == ns))
4368 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4371 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
4373 pdschTimeDomRsrcAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4376 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
4378 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4381 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
4383 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4388 pdschTimeDomRsrcAlloc->sliv = calcSliv(startSymbol, lenSymbol);
4392 /*******************************************************************
4394 * @brief Fill PDSCH Configuration Common
4398 * Function : parsePdschCfgCommon
4400 * Functionality: Fill PDSCH Configuration Common
4402 * @params[in] XML document pointer
4404 * Current node in XML
4405 * Pointer to structure to be filled
4406 * @return ROK - success
4409 * ****************************************************************/
4410 uint8_t parsePdschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschCfgCommon *pdschCfgCmn)
4413 xmlNodePtr child = NULLP;
4414 xmlNodePtr listChild = NULLP;
4416 memset(pdschCfgCmn, 0, sizeof(PdschCfgCommon));
4417 cur = cur -> xmlChildrenNode;
4420 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
4422 pdschCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4425 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRS_ALLOC")) && (cur->ns == ns))
4427 pdschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4430 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
4432 child = cur->xmlChildrenNode;
4433 while (child != NULL)
4435 if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
4437 listChild = child->xmlChildrenNode;
4438 while (listChild != NULL)
4440 if ((!xmlStrcmp(listChild->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC")) && (listChild->ns == ns))
4442 if(parsePdschTimeDomRsrcAlloc(doc, ns, listChild, &pdschCfgCmn->timeDomAlloc[idx]) != ROK)
4448 listChild = listChild->next;
4451 child = child->next;
4459 /*******************************************************************
4461 * @brief Fill BCCH Configuration
4465 * Function : parseBcchCfg
4467 * Functionality: Fill BCCH Configuration
4469 * @params[in] XML document pointer
4471 * Current node in XML
4472 * Pointer to structure to be filled
4473 * @return ROK - success
4476 * ****************************************************************/
4477 uint8_t parseBcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BcchCfg *bcchCfg)
4479 memset(bcchCfg, 0, sizeof(BcchCfg));
4480 cur = cur -> xmlChildrenNode;
4483 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MOB_PRD_COEFF")) && (cur->ns == ns))
4485 bcchCfg->modPrdCoeff = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4492 /*******************************************************************
4494 * @brief Fill PDCCH Configuration Common
4498 * Function : parsePdcchConfigCommon
4500 * Functionality: Fill PDCCH Configuration Common
4502 * @params[in] XML document pointer
4504 * Current node in XML
4505 * Pointer to structure to be filled
4506 * @return ROK - success
4509 * ****************************************************************/
4510 uint8_t parsePdcchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdcchCfgCommon *pdccgCfgCmn)
4513 xmlNodePtr child = NULLP;
4514 xmlNodePtr listChild = NULLP;
4516 memset(pdccgCfgCmn, 0, sizeof( PdcchCfgCommon));
4517 cur = cur -> xmlChildrenNode;
4520 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
4522 pdccgCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4525 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
4527 pdccgCfgCmn->ctrlRsrcSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4530 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
4532 pdccgCfgCmn->searchSpcZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4535 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID")) && (cur->ns == ns))
4537 pdccgCfgCmn->searchSpcId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4540 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CTRL_RSRC_SET_ID")) && (cur->ns == ns))
4542 pdccgCfgCmn->ctrlRsrcSetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4545 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_SLOT_PRD_OFFPRESENT")) && (cur->ns == ns))
4547 pdccgCfgCmn->monitorSlotPrdAndOffPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4550 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
4552 child = cur->xmlChildrenNode;
4555 if ((!xmlStrcmp(child->name, (const xmlChar *)"MONITOR_LIST")) && (child->ns == ns))
4557 listChild = child->xmlChildrenNode;
4558 while (listChild != NULL)
4560 if ((!xmlStrcmp(listChild->name, (const xmlChar *)"MONITOR_SYMBOL_INSLOT")) && (listChild->ns == ns))
4562 pdccgCfgCmn->monitorSymbolsInSlot[idx] = atoi((char *)xmlNodeListGetString(doc, listChild->xmlChildrenNode, 1));
4565 listChild = listChild->next;
4568 child = child->next;
4572 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUMC_AGG_LVL1")) && (cur->ns == ns))
4574 pdccgCfgCmn->numCandAggLvl1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4577 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUMC_AGG_LVL2")) && (cur->ns == ns))
4579 pdccgCfgCmn->numCandAggLvl2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4582 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUMC_AGG_LVL4")) && (cur->ns == ns))
4584 pdccgCfgCmn->numCandAggLvl4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4587 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUMC_AGG_LVL8")) && (cur->ns == ns))
4589 pdccgCfgCmn->numCandAggLvl8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4592 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUMC_AGG_LVL16")) && (cur->ns == ns))
4594 pdccgCfgCmn->numCandAggLvl16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4597 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPC_TYPE")) && (cur->ns == ns))
4599 pdccgCfgCmn->searchSpcType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4602 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SERACH_SPACE_DCI_FORMAT")) && (cur->ns == ns))
4604 pdccgCfgCmn->commSrchSpcDciFrmt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4607 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_SIB1")) && (cur->ns == ns))
4609 pdccgCfgCmn->searchSpcSib1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4612 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_PAGING")) && (cur->ns == ns))
4614 pdccgCfgCmn->pagingSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4617 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_PDCCH_SEARCH_SPACE_ID_PAGING")) && (cur->ns == ns))
4619 pdccgCfgCmn->raSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4627 /*******************************************************************
4629 * @brief Fill DL Configuration Common
4633 * Function : parseDlCfgCommon
4635 * Functionality: Fill DL Configuration Common
4637 * @params[in] XML document pointer
4639 * Current node in XML
4640 * Pointer to structure to be filled
4641 * @return ROK - success
4644 * ****************************************************************/
4645 uint8_t parseDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,DlCfgCommon *dlCfgCmn)
4647 memset(dlCfgCmn, 0, sizeof(DlCfgCommon));
4648 cur = cur -> xmlChildrenNode;
4651 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
4653 dlCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4656 if ((!xmlStrcmp(cur->name, (const xmlChar *)"OFFSET_TO_POINT_A")) && (cur->ns == ns))
4658 dlCfgCmn->offsetToPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4661 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
4663 dlCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4666 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
4668 if(parseScsSpecCarrier(doc, ns, cur, &dlCfgCmn->dlScsCarrier) != ROK)
4674 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
4676 if(parsePdcchConfigCommon(doc, ns, cur, &dlCfgCmn->pdcchCfg) != ROK)
4682 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
4684 if(parsePdschCfgCommon(doc, ns, cur, &dlCfgCmn->pdschCfg) != ROK)
4690 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCCH_CFG")) && (cur->ns == ns))
4692 if(parseBcchCfg(doc, ns, cur, &dlCfgCmn->bcchCfg) != ROK)
4698 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PCCH_CFG")) && (cur->ns == ns))
4700 if(parsePcchCfg(doc, ns, cur, &dlCfgCmn->pcchCfg) != ROK)
4710 /*******************************************************************
4712 * @brief Fill Serving Cell Config Common SIB
4716 * Function : parseSrvCellCfgCmnSib
4718 * Functionality: Fill Serving Cell Config Common SIB
4720 * @params[in] XML document pointer
4722 * Current node in XML
4723 * Pointer to structure to be filled
4724 * @return ROK - success
4727 * ****************************************************************/
4728 uint8_t parseSrvCellCfgCmnSib(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SrvCellCfgCommSib *srvCellCfgCmnSib)
4730 memset(srvCellCfgCmnSib, 0, sizeof(SrvCellCfgCommSib));
4731 cur = cur -> xmlChildrenNode;
4734 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
4736 srvCellCfgCmnSib->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4739 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_POS_INBURST")) && (cur->ns == ns))
4741 srvCellCfgCmnSib->ssbPosInBurst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4744 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIODICITY")) && (cur->ns == ns))
4746 srvCellCfgCmnSib->ssbPrdServingCell = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4749 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBCH_PWR")) && (cur->ns == ns))
4751 srvCellCfgCmnSib->ssPbchBlockPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4754 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_CFG_COMMON")) && (cur->ns == ns))
4756 if(parseDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->dlCfg) != ROK)
4762 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_CFG_COMMON")) && (cur->ns == ns))
4764 if(parseUlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->ulCfg) != ROK)
4770 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_UL_DL_CFG_COMMON")) && (cur->ns == ns))
4772 if(parseTddUlDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->tddCfg) != ROK)
4783 /*******************************************************************
4785 * @brief Fill SI Scheduling Information
4789 * Function : parseSiSchedInfo
4791 * Functionality: Fill SI Scheduling Information
4793 * @params[in] XML document pointer
4795 * Current node in XML
4796 * Pointer to structure to be filled
4797 * @return ROK - success
4800 * ****************************************************************/
4801 uint8_t parseSiSchedInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SiSchedInfo *siSchedInfo)
4803 memset(siSchedInfo, 0, sizeof(SiSchedInfo));
4804 cur = cur -> xmlChildrenNode;
4807 if ((!xmlStrcmp(cur->name, (const xmlChar *)"WIN_LEN")) && (cur->ns == ns))
4809 siSchedInfo->winLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4812 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BROADCAST_STA")) && (cur->ns == ns))
4814 siSchedInfo->broadcastSta = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4817 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY")) && (cur->ns == ns))
4819 siSchedInfo->preiodicity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4822 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB_TYPE")) && (cur->ns == ns))
4824 siSchedInfo->sibType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4827 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_VAL_TAG")) && (cur->ns == ns))
4829 siSchedInfo->sibValTag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4837 /*******************************************************************
4839 * @brief Fill SIB1 Parameters
4843 * Function : parseSib1Params
4845 * Functionality: Fill SIB1 Parameters
4847 * @params[in] XML document pointer
4849 * Current node in XML
4850 * Pointer to structure to be filled
4851 * @return ROK - success
4854 * ****************************************************************/
4855 uint8_t parseSib1Params(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,Sib1Params *sib1Params)
4857 memset(sib1Params, 0, sizeof(Sib1Params));
4858 cur = cur -> xmlChildrenNode;
4861 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
4863 if(parsePlmn(doc, ns, cur, &sib1Params->plmn) != ROK)
4869 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
4871 sib1Params-> tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4874 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RANAC")) && (cur->ns == ns))
4876 sib1Params->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4879 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_IDENTITY")) && (cur->ns == ns))
4881 sib1Params->cellIdentity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4884 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_RESVD_OPUSE")) && (cur->ns == ns))
4886 sib1Params->cellResvdForOpUse = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4889 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_CNT")) && (cur->ns == ns))
4891 sib1Params->connEstFailCnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4894 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFF_VALID")) && (cur->ns == ns))
4896 sib1Params->connEstFailOffValidity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4899 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFFSET")) && (cur->ns == ns))
4901 sib1Params->connEstFailOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4904 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SI_SHED_INFO")) && (cur->ns == ns))
4906 if(parseSiSchedInfo(doc, ns, cur, &sib1Params->siSchedInfo) != ROK)
4912 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SRV_CELLCFG_COM_SIB")) && (cur->ns == ns))
4914 if(parseSrvCellCfgCmnSib(doc, ns, cur, &sib1Params->srvCellCfgCommSib) != ROK)
4925 /*******************************************************************
4927 * @brief Fill RRM Policy List
4931 * Function : parseRrmPolicyList
4933 * Functionality: Fill RRM Policy List
4935 * @params[in] XML document pointer
4937 * Current node in XML
4938 * Pointer to structure to be filled
4939 * @return ROK - success
4942 * ****************************************************************/
4943 uint8_t parseRrmPolicyList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,RrmPolicyMemberList *rrmPolicyMemberList)
4945 memset(rrmPolicyMemberList, 0, sizeof(RrmPolicyMemberList));
4946 cur = cur->xmlChildrenNode;
4949 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
4951 if(parsePlmn(doc, ns, cur, &rrmPolicyMemberList->plmn) != ROK)
4957 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI")) && (cur->ns == ns))
4959 if(parseSnssai(doc, ns, cur, &rrmPolicyMemberList->snssai) != ROK)
4970 /*******************************************************************
4972 * @brief Fill RRM Policy Ratio
4976 * Function : parseRrmPolicyRatio
4978 * Functionality: Fill RRM Policy Ratio
4980 * @params[in] XML document pointer
4982 * Current node in XML
4983 * Pointer to structure to be filled
4984 * @return ROK - success
4987 * ****************************************************************/
4988 uint8_t parseRrmPolicyRatio(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RrmPolicyRatio *rrmPolicyRatio)
4990 memset(rrmPolicyRatio, 0, sizeof(RrmPolicyRatio));
4991 cur = cur -> xmlChildrenNode;
4994 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_RATIO")) && (cur->ns == ns))
4996 rrmPolicyRatio->maxRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4999 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_RATIO")) && (cur->ns == ns))
5001 rrmPolicyRatio->minRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5004 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEDICATED_RATIO")) && (cur->ns == ns))
5006 rrmPolicyRatio->dedicatedRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5014 /*******************************************************************
5015 /*******************************************************************
5017 * @brief Fill MAC Slice RRM Policy
5021 * Function : parseMacSliceRrmPolicy
5023 * Functionality: Fill MAC Slice RRM Policy
5025 * @params[in] XML document pointer
5027 * Current node in XML
5028 * Pointer to structure to be filled
5029 * @return ROK - success
5032 * ****************************************************************/
5033 uint8_t parseMacSliceRrmPolicy(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MacSliceRrmPolicy *rrmPolicy)
5037 memset(rrmPolicy, 0, sizeof(MacSliceRrmPolicy));
5038 cur = cur -> xmlChildrenNode;
5041 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RESOURCE_TYPE")) && (cur->ns == ns))
5043 rrmPolicy->resourceType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5046 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRC_POLICY_MEM")) && (cur->ns == ns))
5048 rrmPolicy->numOfRrmPolicyMem = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5051 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_MUM_LIST")) && (cur->ns == ns))
5053 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList,\
5054 rrmPolicy->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
5056 if(!rrmPolicy->rRMPolicyMemberList)
5058 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
5062 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
5064 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList[memIdx], sizeof(RrmPolicyMemberList));
5065 if (rrmPolicy->rRMPolicyMemberList[memIdx] == NULLP)
5067 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
5071 if(parseRrmPolicyList(doc, ns, cur, rrmPolicy->rRMPolicyMemberList[memIdx]) != ROK)
5078 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_RATIO")) && (cur->ns == ns))
5080 if(parseRrmPolicyRatio(doc, ns, cur, &rrmPolicy->policyRatio) != ROK)
5091 /*******************************************************************
5093 * @brief Fill MAC Slice Configuration
5097 * Function : parseMacSliceCfgReq
5099 * Functionality: Fill MAC Slice Configuration
5101 * @params[in] XML document pointer
5103 * Current node in XML
5104 * Pointer to structure to be filled
5105 * @return ROK - success
5108 * ****************************************************************/
5109 uint8_t parseMacSliceCfgReq(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacSliceCfgReq *macSliceCfgReq)
5111 uint8_t policyIdx = 0;
5112 memset(macSliceCfgReq, 0, sizeof(MacSliceCfgReq));
5113 cur = cur -> xmlChildrenNode;
5116 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRC_POLICY")) && (cur->ns == ns))
5118 macSliceCfgReq->numOfRrmPolicy = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5121 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_SLICE_RRM_POLICY")) && (cur->ns == ns))
5123 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy, macSliceCfgReq->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
5124 if(!macSliceCfgReq->listOfRrmPolicy)
5126 DU_LOG("\nERROR --> DU APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
5130 for(policyIdx = 0; policyIdx < macSliceCfgReq->numOfRrmPolicy; policyIdx++)
5132 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
5133 if (macSliceCfgReq->listOfRrmPolicy[policyIdx] == NULLP)
5135 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
5138 if(parseMacSliceRrmPolicy(doc, ns, cur, macSliceCfgReq->listOfRrmPolicy[policyIdx]) != ROK)
5150 #ifdef THREAD_AFFINITY
5151 /*******************************************************************
5153 * @brief Set thread affinity to the core configured via XML file
5157 * Function : parseThreadAffinity
5159 * Functionality: Set thread affinity to the core configured
5162 * @params[in] XML document pointer
5164 * Current node in XML
5165 * Thread information
5166 * @return ROK - success
5169 * ****************************************************************/
5170 uint8_t parseThreadAffinity(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ThreadInfo *threads)
5172 cur = cur -> xmlChildrenNode;
5175 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_APP_CORE")) && (cur->ns == ns))
5177 threads->duAppCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5178 ODU_SET_THREAD_AFFINITY(&threads->duAppSTskId, SS_AFFINITY_MODE_EXCL, threads->duAppCoreId, 0);
5181 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP_CORE")) && (cur->ns == ns))
5183 threads->egtpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5184 ODU_SET_THREAD_AFFINITY(&threads->egtpSTskId, SS_AFFINITY_MODE_EXCL, threads->egtpCoreId, 0);
5187 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_MAC_CORE")) && (cur->ns == ns))
5189 threads->rlcMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5190 ODU_SET_THREAD_AFFINITY(&threads->rlcMacSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcMacCoreId, 0);
5193 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_UL_CORE")) && (cur->ns == ns))
5195 threads->rlcUlCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5196 ODU_SET_THREAD_AFFINITY(&threads->rlcUlSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcUlCoreId, 0);
5199 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_CORE")) && (cur->ns == ns))
5201 threads->schCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5202 ODU_SET_THREAD_AFFINITY(&threads->schSTskId, SS_AFFINITY_MODE_EXCL, threads->schCoreId, 0);
5205 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP_CORE")) && (cur->ns == ns))
5207 threads->sctpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5208 ODU_SET_THREAD_AFFINITY(&threads->sctpSTskId, SS_AFFINITY_MODE_EXCL, threads->sctpCoreId, 0);
5211 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOWER_MAC_CORE")) && (cur->ns == ns))
5213 threads->lwrMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5214 ODU_SET_THREAD_AFFINITY(&threads->lwrMacSTskId, SS_AFFINITY_MODE_EXCL, threads->lwrMacCoreId, 0);
5223 /*******************************************************************
5225 * @brief Fill tmrTqCp
5229 * Function : parseTmrTqCp
5231 * Functionality: Fill tmrTqCp
5233 * @params[in] XML document pointer
5235 * Current node in XML
5236 * Pointer to structure to be filled
5237 * @return ROK - success
5240 * ****************************************************************/
5241 uint8_t parseTmrTqCp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmTqCp *tmrTqCp)
5243 memset(tmrTqCp, 0, sizeof(CmTqCp));
5244 cur = cur ->xmlChildrenNode;
5247 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_LEN")) && (cur->ns == ns))
5249 tmrTqCp->tmrLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5256 /*******************************************************************
5258 * @brief Fill DU timer Parameters
5262 * Function : parseDuTimerParams
5264 * Functionality: Fill DU timer Parmeters
5266 * @params[in] XML document pointer
5268 * Current node in XML
5269 * Pointer to structure to be filled
5270 * @return ROK - success
5273 * ****************************************************************/
5274 uint8_t parseDuTimerParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, DuTimers *duTimers)
5276 memset(duTimers, 0, sizeof(DuTimers));
5278 cur = cur->xmlChildrenNode;
5281 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_TQ_CP")) && (cur->ns == ns))
5283 if(parseTmrTqCp(doc, ns, cur, &duTimers->tmrTqCp) != ROK)
5289 /* Initialzie the timer queue */
5290 memset(&(duTimers->tmrTq), 0, sizeof(CmTqType) * duTimers->tmrTqCp.tmrLen);
5294 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_RESOLUTION")) && (cur->ns == ns))
5296 duTimers->tmrRes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5303 /*******************************************************************
5305 * @brief Fill TNL assoc
5309 * Function : parseTnlAssoc
5311 * Functionality: Fill TNL assoc
5313 * @params[in] XML document pointer
5315 * Current node in XML
5316 * Pointer to structure to be filled
5317 * @return ROK - success
5320 * ****************************************************************/
5321 uint8_t parseTnlAssoc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TNLAssociation *tnlAssoc)
5328 memset(tnlAssoc, 0, sizeof(TNLAssociation));
5329 cur = cur ->xmlChildrenNode;
5332 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_IP")) && (cur->ns == ns))
5334 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5335 cmInetAddr(duIpV4Addr, &(duIp));
5336 tnlAssoc->localIpAddress.ipV4Pres = true;
5337 tnlAssoc->localIpAddress.ipV4Addr = duIp;
5340 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_PORT")) && (cur->ns == ns))
5342 tnlAssoc->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5345 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_IP")) && (cur->ns == ns))
5347 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5348 cmInetAddr(ricIpV4Addr, &(ricIp));
5349 tnlAssoc->destIpAddress.ipV4Pres = true;
5350 tnlAssoc->destIpAddress.ipV4Addr = ricIp;
5353 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_PORT")) && (cur->ns == ns))
5355 tnlAssoc->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5358 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ASSOC_USAGE")) && (cur->ns == ns))
5360 tnlAssoc->usage = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5367 /*******************************************************************
5369 * @brief Fill E2 config Parameters
5373 * Function : parseE2ConfigParams
5375 * Functionality: Fill E2 config Parmeters
5377 * @params[in] XML document pointer
5379 * Current node in XML
5380 * Pointer to structure to be filled
5381 * @return ROK - success
5384 * ****************************************************************/
5385 uint8_t parseE2ConfigParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, E2apDb *e2apDb)
5388 xmlNodePtr child = NULLP;
5390 memset(e2apDb, 0, sizeof(E2apDb));
5391 cur = cur->xmlChildrenNode;
5394 if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_NODE_ID")) && (cur->ns == ns))
5396 e2apDb->e2NodeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5399 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_TNL_ASSOC")) && (cur->ns == ns))
5401 e2apDb->numOfTNLAssoc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5404 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TNL_ASSOC_LIST")) && (cur->ns == ns))
5406 child = cur->xmlChildrenNode;
5407 while(child != NULL)
5409 if ((!xmlStrcmp(child->name, (const xmlChar *)"TNL_ASSOC")) && (child->ns == ns))
5411 if(parseTnlAssoc(doc, ns, child,&e2apDb->tnlAssoc[tnlIdx]) != ROK)
5418 child = child -> next;
5426 /*******************************************************************
5428 * @brief Fill DU Config Parmeters
5432 * Function : parseDuCfgParams
5436 * @params[in] XML document pointer
5438 * Current node in XML
5439 * @return ROK - success
5442 * ****************************************************************/
5443 uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
5445 char *tempDuName = "";
5453 cur = cur->xmlChildrenNode;
5456 if ((!xmlStrcmp(cur->name, (const xmlChar *)"THREAD_AFFINITY")) && (cur->ns == ns))
5458 #ifdef THREAD_AFFINITY
5459 if(parseThreadAffinity(doc, ns, cur, &duCfgParam.threadInfo) != ROK)
5466 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GNB_ID")) && (cur->ns == ns))
5468 duCb.gnbId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5471 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_ID")) && (cur->ns == ns))
5473 duCfgParam.duId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5476 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_NAME")) && (cur->ns == ns))
5478 tempDuName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5479 DU_ALLOC(duCfgParam.duName, strlen(tempDuName));
5480 if(!duCfgParam.duName)
5482 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
5485 strcpy((char*)duCfgParam.duName, tempDuName);
5488 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_DRB")) && (cur->ns == ns))
5490 duCfgParam.maxNumDrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5493 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE_SUPPORTED")) && (cur->ns == ns))
5495 duCfgParam.maxSupportedUes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5498 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE")) && (cur->ns == ns))
5500 duCfgParam.maxUe = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5504 if( getStartupConfig(&g_cfg) != ROK )
5508 cmInetAddr((S8*)g_cfg.DU_IPV4_Addr, &duIp);
5509 cmInetAddr((S8*)g_cfg.CU_IPV4_Addr, &cuIp);
5510 cmInetAddr((S8*)g_cfg.RIC_IPV4_Addr, &ricIp);
5513 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_IP_V4_ADDR")) && (cur->ns == ns))
5515 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5516 cmInetAddr(duIpV4Addr, &(duIp));
5519 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CU_IP_V4_ADDR")) && (cur->ns == ns))
5521 cuIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5522 cmInetAddr(cuIpV4Addr, &(cuIp));
5525 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_IP_V4_ADDR")) && (cur->ns == ns))
5527 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5528 cmInetAddr(ricIpV4Addr, &(ricIp));
5532 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP")) && (cur->ns == ns))
5534 if(parseSctpParams(doc, ns, cur, &duCfgParam.sctpParams) != ROK)
5538 duCfgParam.sctpParams.duIpAddr.ipV4Pres = true;
5539 duCfgParam.sctpParams.duIpAddr.ipV4Addr = duIp;
5540 duCfgParam.sctpParams.cuIpAddr.ipV4Pres = true;
5541 duCfgParam.sctpParams.cuIpAddr.ipV4Addr = cuIp;
5542 duCfgParam.sctpParams.ricIpAddr.ipV4Pres = true;
5543 duCfgParam.sctpParams.ricIpAddr.ipV4Addr = ricIp;
5546 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP")) && (cur->ns == ns))
5548 if(parseEgtpParams(doc, ns, cur, &duCfgParam.egtpParams) != ROK)
5552 duCfgParam.egtpParams.localIp.ipV4Addr = duIp;
5553 duCfgParam.egtpParams.localIp.ipV4Pres = true;
5554 duCfgParam.egtpParams.destIp.ipV4Pres = true;
5555 duCfgParam.egtpParams.destIp.ipV4Addr = cuIp;
5556 duCfgParam.egtpParams.maxTunnelId = duCfgParam.maxNumDrb * duCfgParam.maxSupportedUes;
5559 #ifdef XML_BASED_CONFIG
5560 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIB_PARAMS")) && (cur->ns == ns))
5562 if(parseMibParams(doc, ns, cur, &duCfgParam.mibParams) != ROK)
5568 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_SRVD_CELL_INFO")) && (cur->ns == ns))
5570 if(parseF1DuServedCellInfo(doc, ns, cur, &duCfgParam.srvdCellLst[0]) != ROK)
5576 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_CFG")) && (cur->ns == ns))
5578 if(parseMacCellCfg(doc, ns, cur, &duCfgParam.macCellCfg) != ROK)
5584 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_PARAMS")) && (cur->ns == ns))
5586 if(parseSib1Params(doc, ns, cur, &duCfgParam.sib1Params) != ROK)
5592 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SLICE_CFG")) && (cur->ns == ns))
5594 if(parseMacSliceCfgReq(doc, ns, cur, &duCfgParam.tempSliceCfg) != ROK)
5601 if((!xmlStrcmp(cur->name, (const xmlChar *)"DU_TIMER_INFO")) && (cur->ns == ns))
5603 if(parseDuTimerParams(doc, ns, cur, &duCb.duTimersInfo) != ROK)
5609 if((!xmlStrcmp(cur->name, (const xmlChar *)"E2AP_CFG")) && (cur->ns == ns))
5611 if(parseE2ConfigParams(doc, ns, cur, &duCb.e2apDb) != ROK)
5621 /*******************************************************************
5623 * @brief Reads config and posts message to du_app on completion
5627 * Function : duReadCfg
5630 * - Reads configuration from xml file and stores in DB
5631 * - Post to du_app for further processing
5634 * @return ROK - success
5637 * ****************************************************************/
5640 const char *filename = "../build/config/odu_config.xml";
5641 xmlDocPtr doc = NULLP;
5642 xmlNodePtr cur = NULLP;
5643 xmlNsPtr ns = NULLP;
5645 doc = xmlParseFile(filename);
5648 DU_LOG("\nERROR --> DU_APP: Failed to parse the XML file");
5652 cur = xmlDocGetRootElement(doc);
5653 ns = xmlSearchNsByHref(doc, cur, (const xmlChar *)"urn:o-ran:odu:configuration");
5656 DU_LOG("\nERROR --> DU_APP: XML Namespace not found.\n");
5662 parseDuCfgParams(doc, ns, cur);
5670 /* Read configs into duCfgParams */
5671 if(readCfg() != ROK)
5673 DU_LOG("\nERROR --> DU_APP : Reading configuration failed");
5678 /* Fill pst structure */
5679 memset(&(pst), 0, sizeof(Pst));
5680 pst.srcEnt = (Ent)ENTDUAPP;
5681 pst.srcInst = (Inst)DU_INST;
5682 pst.srcProcId = DU_PROC;
5683 pst.dstEnt = pst.srcEnt;
5684 pst.dstInst = pst.srcInst;
5685 pst.dstProcId = pst.srcProcId;
5687 pst.selector = ODU_SELECTOR_TC;
5690 /* Initialize the timer blocks */
5691 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2SetupTimer), 1);
5692 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.ricServiceUpdateTimer.timer), 1);
5693 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2NodeConfigUpdate.timer), 1);
5695 /* Timer Registration request to system services */
5696 if (ODU_REG_TMR_MT(pst.srcEnt, pst.srcInst, duCb.duTimersInfo.tmrRes, duActvTmr) != ROK)
5698 DU_LOG("\nERROR --> DU_APP : Failed to register timer");
5702 if(ODU_GET_MSG_BUF(DFLT_REGION, DU_POOL, &mBuf) != ROK)
5704 DU_LOG("\nERROR --> DU_APP : Memory allocation failed in duReadCfg");
5708 if (ODU_POST_TASK(&pst, mBuf) != ROK)
5710 DU_LOG("\nERROR --> DU_APP : ODU_POST_TASK failed in duReadCfg");
5717 /*******************************************************************
5719 * @brief Prints all DU Configuration
5723 * Function : printDuConfig
5726 * - Prints all DU configurations
5731 * ****************************************************************/
5732 void printDuConfig()
5734 uint8_t sliceIdx = 0, pfIdx = 0, rsrcIdx = 0, ssbMaskIdx = 0, fdmIdx = 0;
5735 uint8_t monitoringSymbIdx = 0, poIdx = 0, policyIdx = 0, memIdx = 0;
5736 __attribute__((unused)) SctpParams *sctp;
5737 __attribute__((unused)) F1EgtpParams *egtp;
5738 __attribute__((unused)) MibParams *mib;
5739 __attribute__((unused)) F1RrcVersion *f1RrcVersion;
5740 F1DuCellInfo *f1DuCellInfo;
5741 F1CellInfo *f1CellInfo;
5742 __attribute__((unused)) F1DuSysInfo *duSysInfo;
5743 __attribute__((unused)) F1BrdcstPlmnInfo *brdcstPlmnInfo;
5744 NrModeInfo *nrModeInfo;
5745 __attribute__((unused)) F1NrFddInfo *f1NrFddInfo;
5746 F1SrvdPlmn *srvdPlmn;
5747 SupportedSliceList *sliceSuppLst;
5748 MacCellCfg *macCellCfg;
5749 __attribute__((unused)) CarrierCfg *carrierCfg;
5751 PlmnInfoList *plmnInfoList;
5752 Sib1CellCfg *sib1Cfg;
5753 SchPageCfg *pageCfg;
5754 __attribute__((unused)) PdcchConfigSib1 *pdcchConfigSib1;
5755 BwpDlConfig *bwpDlCfg;
5756 __attribute__((unused)) BwpParams *bwp;
5757 PdcchConfigCommon *pdcchCfgCmn;
5758 SearchSpaceCfg *searchSpaceCfg;
5759 __attribute__((unused)) CandidatesInfo *candidateInfo;
5760 PdschConfigCommon *pdschCfgCmn;
5761 __attribute__((unused)) PdschCfgCommTimeDomRsrcAlloc *pdschCmnTimeDomRsrcAlloc;
5762 BwpUlConfig *bwpUlCfg;
5763 __attribute__((unused)) PucchConfigCommon *pucchCfgCmn;
5764 PuschConfigCommon *puschCfgCmn;
5765 __attribute__((unused)) PuschTimeDomRsrcAlloc *puschTimeDomRsrcAlloc;
5766 __attribute__((unused)) SsbCfg *ssbCfg;
5767 __attribute__((unused)) CsiRsCfg *csiRsCfg;
5769 __attribute__((unused)) PrachFdmInfo *prachFdmInfo;
5770 __attribute__((unused)) PrecodingConf *precodCfg;
5771 __attribute__((unused)) BeamformingConf *beamFormingCfg;
5772 Sib1Params *sib1Params;
5773 __attribute__((unused)) SiSchedInfo *siSchedInfo;
5774 SrvCellCfgCommSib *srvCellCfgCmnSib;
5775 DlCfgCommon *dlCfgCmn;
5776 PdcchCfgCommon *pdcchCfgCommon;
5777 PdschCfgCommon *pdschCfgCommon;
5778 __attribute__((unused)) PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc;
5779 __attribute__((unused)) BcchCfg *bcchCfg;
5780 __attribute__((unused)) PcchCfg *pcchCfg;
5781 UlCfgCommon *ulCfgCmn;
5782 RachCfgCommon *rachCfgCmn;
5783 PuschCfgCommon *puschCfgCommon;
5784 __attribute__((unused)) PuschCfgCmnTimeDomAlloc *puschCmnTimeDomRsrsAlloc;
5785 PucchCfgCommon *pucchCfgCommon;
5786 __attribute__((unused)) TddUlDlCfgCommon *tddUlDlCfgCmn;
5787 MacSliceCfgReq *macSliceCfg;
5788 MacSliceRrmPolicy *rrmPolicy;
5789 __attribute__((unused)) RrmPolicyRatio *rrmPolicyRatio;
5790 __attribute__((unused)) RrmPolicyMemberList *rrmPolicyMemberList;
5793 F1NrTddInfo *f1NrTddInfo;
5797 DU_LOG("\n ** DU CONFIGURATION ** \n");
5798 DU_LOG("DU ID %d\n", duCfgParam.duId);
5799 DU_LOG("DU Name %s\n", duCfgParam.duName);
5801 DU_LOG("\n ** Thread Affinity ** \n");
5802 DU_LOG("DU APP CORE ID %d\n", duCfgParam.threadInfo.duAppCoreId);
5803 DU_LOG("EGTP CORE ID %d\n", duCfgParam.threadInfo.egtpCoreId);
5804 DU_LOG("SCTP CORE ID %d\n", duCfgParam.threadInfo.sctpCoreId);
5805 DU_LOG("RLC-UL CORE ID %d\n", duCfgParam.threadInfo.rlcUlCoreId);
5806 DU_LOG("RLC-DL and MAC CORE ID %d\n", duCfgParam.threadInfo.rlcMacCoreId);
5807 DU_LOG("SCH CORE ID %d\n", duCfgParam.threadInfo.schCoreId);
5808 DU_LOG("Lower MAC CORE ID %d\n", duCfgParam.threadInfo.lwrMacCoreId);
5810 DU_LOG("MAX NUM DRB %d\n", duCfgParam.maxNumDrb);
5811 DU_LOG("MAX SUPPORTED UE %d\n", duCfgParam.maxSupportedUes);
5812 DU_LOG("MAX UE %d\n",duCfgParam.maxUe);
5814 sctp = &duCfgParam.sctpParams;
5815 DU_LOG("\n ** SCTP PARAMETER ** \n");
5816 DU_LOG("DU IPv4 Address present %u\n", sctp->duIpAddr.ipV4Pres);
5817 DU_LOG("DU IP Address %u\n", sctp->duIpAddr.ipV4Addr);
5818 DU_LOG("CU IPv4 Address present %u\n", sctp->cuIpAddr.ipV4Pres);
5819 DU_LOG("CU IP Address %u\n", sctp->cuIpAddr.ipV4Addr);
5820 DU_LOG("RIC IPv4 Address present %u\n", sctp->ricIpAddr.ipV4Pres);
5821 DU_LOG("RIC IP Address %u\n", sctp->ricIpAddr.ipV4Addr);
5822 DU_LOG("SCTP Port at DU for F1 Interface %d\n", sctp->duPort[F1_INTERFACE]);
5823 DU_LOG("SCTP Port at CU for F1 Interface %d\n", sctp->cuPort);
5824 DU_LOG("SCTP Port at DU for E2 Interface %d\n", sctp->duPort[E2_INTERFACE]);
5825 DU_LOG("SCTP Port at RIC for E2 Interface %d\n", sctp->ricPort);
5827 egtp = &duCfgParam.egtpParams;
5828 DU_LOG("\n ** EGTP PARAMETER ** \n");
5829 DU_LOG("DU IP Address %d\n", egtp->localIp.ipV4Addr);
5830 DU_LOG("CU IP Address %d\n", egtp->destIp.ipV4Addr);
5831 DU_LOG("EGTP Port at DU %d\n", egtp->localPort);
5832 DU_LOG("EGTP Port at CU %d\n", egtp->destPort);
5833 DU_LOG("Minimum Tunnel ID %d\n", egtp->minTunnelId);
5834 DU_LOG("Maximum Tunnel ID %d\n",egtp->maxTunnelId);
5836 mib = &duCfgParam.mibParams;
5837 DU_LOG("\n ** MIB PARAMETER ** \n");
5838 DU_LOG("System Frame Number %d\n", mib->sysFrmNum);
5839 DU_LOG("Subcarrier Spacing Common %ld\n", mib->subCarrierSpacingCommon);
5840 DU_LOG("SSB Subcarrier Offset %ld\n", mib->ssb_SubcarrierOffset);
5841 DU_LOG("DMRS Type-A Position %ld\n", mib->dmrs_TypeA_Position);
5842 DU_LOG("Control Resource Set Zero %ld\n", mib->controlResourceSetZero);
5843 DU_LOG("Search Space Zero %ld\n", mib->searchSpaceZero);
5844 DU_LOG("Cell Barred %ld\n", mib->cellBarred);
5845 DU_LOG("Intra Frequency Reselection %ld\n", mib->intraFreqReselection);
5847 duSysInfo = &duCfgParam.srvdCellLst[0].duSysInfo;
5848 DU_LOG("\n ** DU System Information ** \n");
5849 DU_LOG("MIB length %d\n", duSysInfo->mibLen);
5850 DU_LOG("MIB message %s\n", duSysInfo->mibMsg);
5851 DU_LOG("SIB1 length %d\n", duSysInfo->sib1Len);
5852 DU_LOG("SIB1 message %s\n", duSysInfo->sib1Msg);
5854 f1DuCellInfo = &duCfgParam.srvdCellLst[0].duCellInfo;
5855 DU_LOG("\n ** DU Cell Information ** \n");
5857 f1CellInfo = &f1DuCellInfo->cellInfo;
5858 DU_LOG("NR PCI %d\n", f1CellInfo->nrPci);
5859 DU_LOG("DU TAC %d\n", f1DuCellInfo->tac);
5860 DU_LOG("EPS TAC %d\n", f1DuCellInfo->epsTac);
5861 DU_LOG("Measurement Time Configuration Duration %d\n", f1DuCellInfo->measTimeCfgDuration);
5862 DU_LOG("Cell Direction %d\n", f1DuCellInfo->cellDir);
5863 DU_LOG("Cell Type %d\n", f1DuCellInfo->cellType);
5865 DU_LOG("\n ** Cell Info : NR CGI ** \n");
5866 DU_LOG("Cell Id %d\n",f1CellInfo->nrCgi.cellId);
5867 DU_LOG("PLMN : mcc[0] %d\n", f1CellInfo->nrCgi.plmn.mcc[0]);
5868 DU_LOG("PLMN : mcc[1] %d\n", f1CellInfo->nrCgi.plmn.mcc[1]);
5869 DU_LOG("PLMN : mcc[2] %d\n", f1CellInfo->nrCgi.plmn.mcc[2]);
5870 DU_LOG("PLMN : mnc[0] %d\n", f1CellInfo->nrCgi.plmn.mnc[0]);
5871 DU_LOG("PLMN : mnc[1] %d\n", f1CellInfo->nrCgi.plmn.mnc[1]);
5872 DU_LOG("PLMN : mnc[2] %d\n", f1CellInfo->nrCgi.plmn.mnc[2]);
5874 srvdPlmn = &f1CellInfo->srvdPlmn[0];
5875 DU_LOG("\n ** Cell Info : Served PLMN ** \n");
5876 DU_LOG("PLMN : mcc[0] %d\n", srvdPlmn->plmn.mcc[0]);
5877 DU_LOG("PLMN : mcc[1] %d\n", srvdPlmn->plmn.mcc[1]);
5878 DU_LOG("PLMN : mcc[2] %d\n", srvdPlmn->plmn.mcc[2]);
5879 DU_LOG("PLMN : mnc[0] %d\n", srvdPlmn->plmn.mnc[0]);
5880 DU_LOG("PLMN : mnc[1] %d\n", srvdPlmn->plmn.mnc[1]);
5881 DU_LOG("PLMN : mnc[2] %d\n", srvdPlmn->plmn.mnc[2]);
5882 DU_LOG("EXT_PLMN : mcc[0] %d\n", srvdPlmn->extPlmn.mcc[0]);
5883 DU_LOG("EXT_PLMN : mcc[1] %d\n", srvdPlmn->extPlmn.mcc[1]);
5884 DU_LOG("EXT_PLMN : mcc[2] %d\n", srvdPlmn->extPlmn.mcc[2]);
5885 DU_LOG("EXT_PLMN : mnc[0] %d\n", srvdPlmn->extPlmn.mnc[0]);
5886 DU_LOG("EXT_PLMN : mnc[1] %d\n", srvdPlmn->extPlmn.mnc[1]);
5887 DU_LOG("EXT_PLMN : mnc[2] %d\n", srvdPlmn->extPlmn.mnc[2]);
5889 sliceSuppLst = &srvdPlmn->taiSliceSuppLst;
5890 DU_LOG("\n ** Cell Info : Served PLMN : Supported Slice List ** \n");
5891 DU_LOG("Number of Slices supported %d\n", sliceSuppLst->numSupportedSlices);
5892 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
5895 DU_LOG("\tSST %d\n", (*sliceSuppLst->snssai[sliceIdx]).sst);
5896 DU_LOG("\tSD %d %d %d\n", (*sliceSuppLst->snssai[sliceIdx]).sd[0], (*sliceSuppLst->snssai[sliceIdx]).sd[1], \
5897 (*sliceSuppLst->snssai[sliceIdx]).sd[2]);
5900 brdcstPlmnInfo = &f1DuCellInfo->brdcstPlmnInfo[0];
5901 DU_LOG("\n ** DU Cell Information : Broadcast PLMN Info ** \n");
5902 DU_LOG("TAC %d\n", brdcstPlmnInfo->tac);
5903 DU_LOG("NR Cell Id %d\n", brdcstPlmnInfo->nrCellId);
5904 DU_LOG("RANAC %d\n", brdcstPlmnInfo->ranac);
5906 DU_LOG("PLMN : mcc[0] %d\n", brdcstPlmnInfo->plmn[0].mcc[0]);
5907 DU_LOG("PLMN : mcc[1] %d\n", brdcstPlmnInfo->plmn[0].mcc[1]);
5908 DU_LOG("PLMN : mcc[2] %d\n", brdcstPlmnInfo->plmn[0].mcc[2]);
5909 DU_LOG("PLMN : mnc[0] %d\n", brdcstPlmnInfo->plmn[0].mnc[0]);
5910 DU_LOG("PLMN : mnc[1] %d\n", brdcstPlmnInfo->plmn[0].mnc[1]);
5911 DU_LOG("PLMN : mnc[2] %d\n", brdcstPlmnInfo->plmn[0].mnc[2]);
5913 DU_LOG("EXT_PLMN : mcc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[0]);
5914 DU_LOG("EXT_PLMN : mcc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[1]);
5915 DU_LOG("EXT_PLMN : mcc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[2]);
5916 DU_LOG("EXT_PLMN : mnc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[0]);
5917 DU_LOG("EXT_PLMN : mnc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[1]);
5918 DU_LOG("EXT_PLMN : mnc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[2]);
5920 nrModeInfo = &f1DuCellInfo->f1Mode;
5921 f1NrFddInfo = &nrModeInfo->mode.fdd;
5922 DU_LOG("\n ** DU Cell Information : NR Mode Info ** \n");
5924 DU_LOG("\n ** NR Mode Info : FDD ** \n");
5925 DU_LOG("\n ** NR Mode Info : FDD : UL NR Frequency ** \n");
5926 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->ulNrFreqInfo.nrArfcn);
5927 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->ulNrFreqInfo.sulInfo.sulArfcn);
5928 DU_LOG("SUL : Transmission BW Subcarrier Spacing %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrScs);
5929 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrb);
5930 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].nrFreqBand);
5931 DU_LOG("SUL Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].sulBand[0]);
5933 DU_LOG("\n ** NR Mode Info : FDD : DL NR Frequency ** \n");
5934 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->dlNrFreqInfo.nrArfcn);
5935 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->dlNrFreqInfo.sulInfo.sulArfcn);
5936 DU_LOG("SUL : Transmission BW Subcarrier Sapcing %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrScs);
5937 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrb);
5938 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].nrFreqBand);
5939 DU_LOG("SUL Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].sulBand[0]);
5941 DU_LOG("\n ** NR Mode Info : FDD : UL Transmission Bandwidth ** \n");
5942 DU_LOG("Subscarrier spacing %d\n", f1NrFddInfo->ulTxBw.nrScs);
5943 DU_LOG("Number of RBs %d\n", f1NrFddInfo->ulTxBw.nrb);
5945 DU_LOG("\n ** NR Mode Info : FDD : DL Transmission Bandwidth ** \n");
5946 DU_LOG("Subcarrier Spacing %d\n", f1NrFddInfo->dlTxBw.nrScs);
5947 DU_LOG("Number of RBs %d\n", f1NrFddInfo->dlTxBw.nrb);
5951 f1NrTddInfo = &nrModeInfo ->mode.tdd;
5953 DU_LOG("\n ** NR Mode Info : TDD : NR Frequency ** \n");
5954 DU_LOG("NR ARFCN %d\n", f1NrTddInfo->nrFreqInfo.nrArfcn);
5955 DU_LOG("SUL : ARFCN %d\n",f1NrTddInfo->nrFreqInfo.sulInfo.sulArfcn);
5956 DU_LOG("SUL : Transmission BW Subscarrier Spacing %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrScs);
5957 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrb);
5958 DU_LOG("NR Frequency Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].nrFreqBand);
5959 DU_LOG("SUL Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].sulBand[0]);
5961 DU_LOG("\n ** NR Mode Info : TDD : NR Transmission Bandwidth ** \n");
5962 DU_LOG("Subcarrier Spacing %d\n", f1NrTddInfo->nrTxBw.nrScs);
5963 DU_LOG("Number of RBs %d\n", f1NrTddInfo->nrTxBw.nrb);
5966 macCellCfg = &duCfgParam.macCellCfg;
5967 DU_LOG("\n ** MAC CELL CONFIGURATION ** \n");
5968 DU_LOG("Cell Id %d\n", macCellCfg->cellId);
5970 DU_LOG("\n ** MAC Cell Configuration : Carrier Configuration ** \n");
5971 carrierCfg = &macCellCfg ->carrCfg;
5972 DU_LOG("DL Bandwidth %d\n", carrierCfg->dlBw);
5973 DU_LOG("DL ARFCN %d\n", carrierCfg->arfcnDL);
5974 DU_LOG("UL Bandwidth %d\n", carrierCfg->ulBw);
5975 DU_LOG("UL ARFCN %d\n", carrierCfg->arfcnUL);
5976 DU_LOG("Number of Transmission Antenna %d\n", carrierCfg->numTxAnt);
5977 DU_LOG("Number of Received Antenna %d\n", carrierCfg->numRxAnt);
5979 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration ** \n");
5980 cellCfg = &macCellCfg ->cellCfg;
5981 DU_LOG("Operational State %d\n", cellCfg->opState);
5982 DU_LOG("Administration State %d\n", cellCfg->adminState);
5983 DU_LOG("Cell Current State %d\n", cellCfg->cellState);
5984 DU_LOG("NR PCI %d\n", cellCfg->phyCellId);
5985 DU_LOG("TAC: %d\n", cellCfg->tac);
5986 DU_LOG("SSB Freqeuncy %d\n", cellCfg->ssbFreq);
5987 DU_LOG("Subcarrier Spacing: %d\n", cellCfg->subCarrSpacing);
5988 DU_LOG("Duplex Mode %d\n", cellCfg->dupType);
5990 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : PLMN Info List ** \n");
5991 plmnInfoList = &cellCfg ->plmnInfoList[0];
5992 DU_LOG("PLMN : mcc[0] %d\n", plmnInfoList->plmn.mcc[0]);
5993 DU_LOG("PLMN : mcc[1] %d\n", plmnInfoList->plmn.mcc[1]);
5994 DU_LOG("PLMN : mcc[2] %d\n", plmnInfoList->plmn.mcc[2]);
5995 DU_LOG("PLMN : mnc[0] %d\n", plmnInfoList->plmn.mnc[0]);
5996 DU_LOG("PLMN : mnc[1] %d\n", plmnInfoList->plmn.mnc[1]);
5997 DU_LOG("PLMN : mnc[2] %d\n", plmnInfoList->plmn.mnc[2]);
5999 DU_LOG("Number of Slice supported %d\n", plmnInfoList->suppSliceList.numSupportedSlices);
6000 for(sliceIdx = 0; sliceIdx < plmnInfoList->suppSliceList.numSupportedSlices; sliceIdx++)
6003 DU_LOG("\nSST %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sst);
6004 DU_LOG("\nSD %d %d %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[0], \
6005 (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[1],(*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[2]);
6008 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 ** \n");
6009 sib1Cfg = &cellCfg->sib1Cfg;
6010 DU_LOG("SIB1 PDU Length %d", sib1Cfg->sib1PduLen);
6011 DU_LOG("SIB1 PDU %s", sib1Cfg->sib1Pdu);
6013 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : Paging Configuration ** \n");
6014 pageCfg = &sib1Cfg->pagingCfg;
6016 DU_LOG("Number of Paging Occassion %d\n", pageCfg->numPO);
6017 if (pageCfg->poPresent == true)
6018 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : TRUE\n");
6020 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : FALSE\n");
6022 for(pfIdx = 0; pfIdx < MAX_PO_PER_PF; pfIdx++)
6024 DU_LOG("Paging Occassion at Paging Frame [%d] : %d\n", pfIdx, pageCfg->pagingOcc[pfIdx]);
6027 pdcchConfigSib1 = &sib1Cfg->pdcchCfgSib1;
6028 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : PDCCH ** \n");
6029 DU_LOG("Coreset Zero Index %d\n", pdcchConfigSib1->coresetZeroIndex);
6030 DU_LOG("Search Space Zero Index %d\n", pdcchConfigSib1->searchSpaceZeroIndex);
6032 bwpDlCfg = &cellCfg->initialDlBwp;
6033 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP Configuration ** \n");
6035 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : BWP ** \n");
6036 bwp = &bwpDlCfg->bwp;
6037 DU_LOG("First PRB %d\n", bwp->firstPrb);
6038 DU_LOG("Number of PRBs %d\n", bwp->numPrb);
6039 DU_LOG("Subcarrier Spacing %d\n", bwp->scs);
6040 DU_LOG("Cyclic Perfix %d\n", bwp->cyclicPrefix);
6042 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common ** \n");
6043 pdcchCfgCmn = &bwpDlCfg->pdcchCommon;
6044 DU_LOG("RA Search Space ID %d\n", pdcchCfgCmn->raSearchSpaceId);
6046 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common : Search Space ** \n");
6047 searchSpaceCfg = &pdcchCfgCmn->commonSearchSpace;
6048 DU_LOG("Search Space ID %d\n", searchSpaceCfg->searchSpaceId);
6049 DU_LOG("Coreset ID %d\n", searchSpaceCfg->coresetId);
6050 DU_LOG("Monitoring Slot %d\n", searchSpaceCfg->monitoringSlot);
6051 DU_LOG("Duration %d\n", searchSpaceCfg->duration);
6052 DU_LOG("Monitoring Symbol %x\n", searchSpaceCfg->monitoringSymbol);
6054 candidateInfo = &searchSpaceCfg->candidate;
6055 DU_LOG("Number of Candidates in Aggregation Level_1 %d\n", candidateInfo->aggLevel1);
6056 DU_LOG("Number of Candidates in Aggregation Level_2 %d\n", candidateInfo->aggLevel2);
6057 DU_LOG("Number of Candidates in Aggregation Level_4 %d\n", candidateInfo->aggLevel4);
6058 DU_LOG("Number of Candidates in Aggregation Level_8 %d\n", candidateInfo->aggLevel8);
6059 DU_LOG("Number of Candidates in Aggregation Level_16 %d\n", candidateInfo->aggLevel16);
6061 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDSCH Config Common ** \n");
6062 pdschCfgCmn = &bwpDlCfg->pdschCommon;
6063 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCmn->numTimeDomAlloc);
6065 for (rsrcIdx = 0; rsrcIdx < pdschCfgCmn->numTimeDomAlloc; rsrcIdx++)
6067 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
6068 pdschCmnTimeDomRsrcAlloc = &pdschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
6069 DU_LOG("\tK0 %d\n", pdschCmnTimeDomRsrcAlloc->k0);
6070 DU_LOG("\tPDSCH Mapping Type %d\n", pdschCmnTimeDomRsrcAlloc->mappingType);
6071 DU_LOG("\tPDSCH Start Symbol %d\n", pdschCmnTimeDomRsrcAlloc->startSymbol);
6072 DU_LOG("\tPDSCH Symbol Length %d\n", pdschCmnTimeDomRsrcAlloc->lengthSymbol);
6075 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP Configuration ** \n");
6076 bwpUlCfg = &cellCfg->initialUlBwp;
6078 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : BWP ** \n");
6079 DU_LOG("First PRB %d\n", bwpUlCfg->bwp.firstPrb);
6080 DU_LOG("Number of PRBs %d\n", bwpUlCfg->bwp.numPrb);
6081 DU_LOG("Subcarrier Spacing %d\n", bwpUlCfg->bwp.scs);
6082 DU_LOG("Cyclic Prefix %d\n", bwpUlCfg->bwp.cyclicPrefix);
6084 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUCCH Config Common ** \n");
6085 pucchCfgCmn = &bwpUlCfg->pucchCommon;
6086 DU_LOG("PUCCH Resource Common %d\n", pucchCfgCmn->pucchResourceCommon);
6087 DU_LOG("Group Hopping %d\n", pucchCfgCmn->pucchGroupHopping);
6089 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUSCH Config Common ** \n");
6090 puschCfgCmn = &bwpUlCfg ->puschCommon;
6091 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCmn->numTimeDomRsrcAlloc);
6092 for (rsrcIdx = 0; rsrcIdx < puschCfgCmn->numTimeDomRsrcAlloc; rsrcIdx++)
6094 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
6095 puschTimeDomRsrcAlloc = &puschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
6096 DU_LOG("\tK2 %d\n", puschTimeDomRsrcAlloc->k2);
6097 DU_LOG("\tPUSCH Mapping Type %d\n", puschTimeDomRsrcAlloc->mappingType);
6098 DU_LOG("\tPUSCH Start Symbol %d\n", puschTimeDomRsrcAlloc->startSymbol);
6099 DU_LOG("\tPUSCH Symbol Length %d\n", puschTimeDomRsrcAlloc->symbolLength);
6100 DU_LOG("\tPUSCH Start Symbol And Length %d\n", puschTimeDomRsrcAlloc->startSymbolAndLength);
6103 DU_LOG("\n ** MAC Cell Configuration : SSB Configuration** \n");
6104 ssbCfg = &macCellCfg ->ssbCfg;
6105 DU_LOG("SSB PDCH Power %d\n", ssbCfg->ssbPbchPwr);
6106 DU_LOG("Subcarrier Spacing Common %d\n", ssbCfg->scsCmn);
6107 DU_LOG("SSB Offset from Point A %d\n", ssbCfg->ssbOffsetPointA);
6108 DU_LOG("SSB Periodicity in msec %d\n", ssbCfg->ssbPeriod);
6109 DU_LOG("SSB Subcarrier Offset %d\n", ssbCfg->ssbScOffset);
6110 for (ssbMaskIdx = 0; ssbMaskIdx < SSB_MASK_SIZE; ssbMaskIdx++)
6112 DU_LOG("SSB Mask[%d] :%d\n", ssbMaskIdx, ssbCfg->ssbMask[ssbMaskIdx]);
6114 DU_LOG("Beam ID %d\n", ssbCfg->beamId[0]);
6115 DU_LOG("BETA PSS %d\n", ssbCfg->betaPss);
6116 DU_LOG("BCH Payloag Flag %d\n", ssbCfg->bchPayloadFlag);
6117 DU_LOG("MIB PDU %d %d %d", ssbCfg->mibPdu[0], ssbCfg->mibPdu[1], ssbCfg->mibPdu[2]);
6118 DU_LOG("DMRS Type-A Position %d\n", ssbCfg->dmrsTypeAPos);
6120 DU_LOG("\n ** MAC Cell Configuration : CSI RS Configuration ** \n");
6121 csiRsCfg = &macCellCfg->csiRsCfg;
6122 DU_LOG("Frequency Domain Allocation %s\n", csiRsCfg->csiFreqDomainAlloc);
6123 DU_LOG("Number of Ports %d\n", csiRsCfg->csiNrofPorts);
6124 DU_LOG("First OFDM Symbol in Time Domain %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain);
6125 DU_LOG("First OFDM Symbol in Timer Domain 2 %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2);
6126 DU_LOG("CDM Type %d\n", csiRsCfg->csirscdmType);
6127 DU_LOG("Density %d\n", csiRsCfg->csirsdensity);
6128 DU_LOG("Density dot 5:%d\n", csiRsCfg->csirsdensitydot5);
6129 DU_LOG("Power Control Offset %d\n", csiRsCfg->powerControlOffset);
6130 DU_LOG("Power Control Offset Search Space %d\n", csiRsCfg->powerControlOffsetSS);
6131 DU_LOG("Periodicity And Offset %d\n", csiRsCfg->periodicityAndOffset);
6133 DU_LOG("\n ** MAC Cell Configuration : PRACH Configuration ** \n");
6134 prachCfg = &macCellCfg->prachCfg;
6135 DU_LOG("PRACH Sequence Length %d\n", prachCfg->prachSeqLen);
6136 DU_LOG("Subcarrier Spacing %d\n", prachCfg->prachSubcSpacing);
6137 DU_LOG("Number of PRACH FDM %d\n", prachCfg->msg1Fdm);
6138 DU_LOG("PRACH Configuration Index %d\n", prachCfg->prachCfgIdx);
6139 DU_LOG("PRACH Restricted Set Configuration %d\n", prachCfg->prachRstSetCfg);
6140 DU_LOG("Number of SSB per RACH occassion %d\n", prachCfg->ssbPerRach);
6141 DU_LOG("Number of RA preambles %d\n", prachCfg->totalNumRaPreamble);
6142 DU_LOG("Number of Contention Based Preamble per SSB %d\n", prachCfg->numCbPreamblePerSsb);
6143 DU_LOG("PRACH Frequeny Start Offset %d\n", prachCfg->msg1FreqStart);
6144 DU_LOG("RA Contention Resolution Timer %d\n", prachCfg->raContResTmr);
6145 DU_LOG("RSRP Threshold %d\n", prachCfg->rsrpThreshSsb);
6146 DU_LOG("RA Response Window %d\n", prachCfg->raRspWindow);
6147 for(fdmIdx = 0; fdmIdx < prachCfg->msg1Fdm; fdmIdx++)
6149 prachFdmInfo = &prachCfg->fdm[fdmIdx];
6150 DU_LOG("FDM[%d]\n", fdmIdx);
6151 DU_LOG("\tRoot Sequence Index %d\n", prachFdmInfo->rootSeqIdx);
6152 DU_LOG("\tNumber of Root Sequence %d\n", prachFdmInfo->numRootSeq);
6153 DU_LOG("\tK1 %d\n", prachFdmInfo->k1);
6154 DU_LOG("\tZero Correlation Zone Configuration %d\n", prachFdmInfo->zeroCorrZoneCfg);
6158 DU_LOG("\n ** MAC Cell Configuration : TDD Configuration ** \n");
6159 tddCfg = &macCellCfg->tddCfg;
6160 DU_LOG("TDD Slot Periodicity %d\n", tddCfg->tddPeriod);
6161 DU_LOG("Number of DL Slots %d\n", tddCfg->nrOfDlSlots);
6162 DU_LOG("Number of DL Symbols %d\n", tddCfg->nrOfDlSymbols);
6163 DU_LOG("Number of UL Slots %d\n", tddCfg->nrOfUlSlots);
6164 DU_LOG("Number of UL Symbols %d\n", tddCfg->nrOfUlSymbols);
6167 DU_LOG("\n ** MAC Cell Configuration : Precoding Configuration ** \n");
6168 precodCfg = &macCellCfg->precodingConf;
6169 DU_LOG("Number of Layers %d\n", precodCfg->numLayers);
6170 DU_LOG("Number of Antenna Ports %d\n", precodCfg->numAntPorts);
6172 DU_LOG("\n ** MAC Cell Config : BEAM FORMING CFG ** \n");
6173 beamFormingCfg = &macCellCfg ->beamCfg;
6174 DU_LOG("Number of Beams %d\n", beamFormingCfg->numOfBeams);
6175 DU_LOG("Number of Tx RUs %d\n", beamFormingCfg->numTxRUs);
6176 DU_LOG("Beam Index %d\n", beamFormingCfg->beamIdx);
6177 DU_LOG("Beam Type %d\n", beamFormingCfg->beamType);
6178 DU_LOG("Beam Azimuth %d\n", beamFormingCfg->beamAzimuth);
6179 DU_LOG("Beam Tilt %d\n", beamFormingCfg->beamTilt);
6180 DU_LOG("Beam Horizontal Width %d\n", beamFormingCfg->beamHorizWidth);
6181 DU_LOG("Beam Vertical Width %d\n", beamFormingCfg->beamVertWidth);
6182 DU_LOG("Coverage Shape %d\n", beamFormingCfg->coverageShape);
6183 DU_LOG("Digitak Tilt %d\n",beamFormingCfg ->digitalTilt);
6184 DU_LOG("Digital Azimuth %d\n", beamFormingCfg->digitalAzimuth);
6186 DU_LOG("\n ** SIB1 Configuration ** \n");
6187 sib1Params = &duCfgParam.sib1Params;
6188 DU_LOG("TAC %d\n", sib1Params->tac);
6189 DU_LOG("RANAC %ld\n", sib1Params->ranac);
6190 DU_LOG("Cell ID %d\n", sib1Params->cellIdentity);
6191 DU_LOG("Cell Reserved for Operational Use %ld\n", sib1Params->cellResvdForOpUse);
6192 DU_LOG("Connection Establishment Failure Count %ld\n", sib1Params->connEstFailCnt);
6193 DU_LOG("Connection Establishment Failure Offset Valid %ld\n", sib1Params->connEstFailOffValidity);
6194 DU_LOG("Connection Establishment Failure Offset %ld\n", sib1Params->connEstFailOffset);
6195 DU_LOG("PLMN : mcc[0] %d\n", sib1Params->plmn.mcc[0]);
6196 DU_LOG("PLMN : mcc[1] %d\n", sib1Params->plmn.mcc[1]);
6197 DU_LOG("PLMN : mcc[2] %d\n", sib1Params->plmn.mcc[2]);
6198 DU_LOG("PLMN : mnc[0] %d\n", sib1Params->plmn.mnc[0]);
6199 DU_LOG("PLMN : mnc[1] %d\n", sib1Params->plmn.mnc[1]);
6200 DU_LOG("PLMN : mnc[2] %d\n", sib1Params->plmn.mnc[2]);
6202 DU_LOG("\n ** SIB1 : SI Scheduling Info ** \n");
6203 siSchedInfo = &sib1Params ->siSchedInfo;
6204 DU_LOG("Windown Length %ld\n", siSchedInfo->winLen);
6205 DU_LOG("Broadcast Status %ld\n", siSchedInfo->broadcastSta);
6206 DU_LOG("Periodicity %ld\n", siSchedInfo->preiodicity);
6207 DU_LOG("SIB Type %ld\n", siSchedInfo->sibType);
6208 DU_LOG("SIB Value Tag %ld\n", siSchedInfo->sibValTag);
6210 DU_LOG("\n ** SIB1 : Serving Cell Configuration Common SIB ** \n");
6211 srvCellCfgCmnSib = &sib1Params->srvCellCfgCommSib;
6212 DU_LOG("Subcarrier Spacing %ld\n", srvCellCfgCmnSib->scs);
6213 DU_LOG("SSB Position in Burst %d\n", srvCellCfgCmnSib->ssbPosInBurst);
6214 DU_LOG("SSB Periodicity %ld\n", srvCellCfgCmnSib->ssbPrdServingCell);
6215 DU_LOG("SS PBCH Power %ld\n", srvCellCfgCmnSib->ssPbchBlockPwr);
6217 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common ** \n");
6218 dlCfgCmn = &srvCellCfgCmnSib->dlCfg;
6219 DU_LOG("Frequency Band Indicator %ld\n", dlCfgCmn->freqBandInd);
6220 DU_LOG("Offset to Point A %ld\n", dlCfgCmn->offsetToPointA);
6221 DU_LOG("Frequency Location And Bandwidth %ld\n", dlCfgCmn->locAndBw);
6222 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsOffset);
6223 DU_LOG("Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scs);
6224 DU_LOG("Bandwidth considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsBw);
6226 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common : PDCCH Config Common ** \n");
6227 pdcchCfgCommon = &dlCfgCmn->pdcchCfg;
6228 if(pdcchCfgCommon->present)
6230 DU_LOG("Control Resource Set Zero Index %ld\n", pdcchCfgCommon->ctrlRsrcSetZero);
6231 DU_LOG("Search Space Zero Index %ld\n", pdcchCfgCommon->searchSpcZero);
6232 DU_LOG("Search Space ID %ld\n", pdcchCfgCommon->searchSpcId);
6233 DU_LOG("Control Resource Set ID %ld\n", pdcchCfgCommon->ctrlRsrcSetId);
6234 DU_LOG("Monitoring Slot Periodicity and Offset Present %d\n", pdcchCfgCommon->monitorSlotPrdAndOffPresent);
6235 DU_LOG("Monitoring Slot Periodicity and Offset %ld\n", pdcchCfgCommon->monitorSlotPrdAndOff);
6236 for (monitoringSymbIdx = 0; monitoringSymbIdx < 2; monitoringSymbIdx++)
6238 DU_LOG("Monitoring Symbols in Slot [%d] %d\n",monitoringSymbIdx, pdcchCfgCommon->monitorSymbolsInSlot[monitoringSymbIdx]);
6240 DU_LOG("Number of Candidates for Aggregation Level_1 %ld\n", pdcchCfgCommon->numCandAggLvl1);
6241 DU_LOG("Number of Candidates for Aggregation Level_2 %ld\n", pdcchCfgCommon->numCandAggLvl2);
6242 DU_LOG("Number of Candidates for Aggregation Level_4 %ld\n", pdcchCfgCommon->numCandAggLvl4);
6243 DU_LOG("Number of Candidates for Aggregation Level_8 %ld\n", pdcchCfgCommon->numCandAggLvl8);
6244 DU_LOG("Number of Candidates for Aggregation Level_16 %ld\n", pdcchCfgCommon->numCandAggLvl16);
6245 DU_LOG("Seach Space Type %d\n", pdcchCfgCommon->searchSpcType);
6246 DU_LOG("Common Search Space DCI Format %d\n", pdcchCfgCommon->commSrchSpcDciFrmt);
6247 DU_LOG("SIB1 Search Space ID %ld\n", pdcchCfgCommon->searchSpcSib1);
6248 DU_LOG("Paging Search Space ID %ld\n", pdcchCfgCommon->pagingSearchSpc);
6249 DU_LOG("RA Search Space ID %ld\n", pdcchCfgCommon->raSearchSpc);
6253 DU_LOG("PDCCH Config Common not Present");
6256 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PDSCH Config Common ** \n");
6257 pdschCfgCommon = &dlCfgCmn->pdschCfg;
6258 DU_LOG("PDSCH Config Common Present %d\n", pdschCfgCommon->present);
6259 if(pdschCfgCommon->present)
6261 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCommon->numTimeDomRsrcAlloc);
6262 for (rsrcIdx = 0; rsrcIdx < pdschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
6264 pdschTimeDomRsrcAlloc = &pdschCfgCommon->timeDomAlloc[rsrcIdx];
6265 DU_LOG("PDSCH Timer Domain Resource Allocation [%d]", rsrcIdx);
6266 DU_LOG("K0 %ld\n", pdschTimeDomRsrcAlloc->k0);
6267 DU_LOG("MappingType %ld\n", pdschTimeDomRsrcAlloc->mapType);
6268 DU_LOG("SLIV %d\n", pdschTimeDomRsrcAlloc->sliv);
6273 DU_LOG("PDSCH Config Common not Present");
6276 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : BCCH Config Common ** \n");
6277 bcchCfg = &dlCfgCmn->bcchCfg;
6278 DU_LOG("Modification Period Coefficient %ld\n", bcchCfg->modPrdCoeff);
6280 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PCCH Config Common ** \n");
6281 pcchCfg = &dlCfgCmn->pcchCfg;
6282 DU_LOG("Default Paging Cycle %d\n", pcchCfg->dfltPagingCycle);
6283 DU_LOG("Number of PF in Paging Cycle %d\n", pcchCfg->nAndPagingFrmOffsetType);
6284 DU_LOG("PF Offset %d\n", pcchCfg->pageFrameOffset);
6285 DU_LOG("NS - Number of P0 in PF %d\n", pcchCfg->ns);
6286 DU_LOG("First PDCCH Monitoring Occassion of each P0 Type %d\n", pcchCfg->firstPDCCHMontioringType);
6287 for (poIdx = 0; poIdx < MAX_PO_PER_PF; poIdx++)
6289 DU_LOG("First PDCCH Monitoring Occassion in P0 [%d] %d\n", poIdx, pcchCfg->firstPDCCHMontioringInfo[poIdx]);
6292 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common ** \n");
6293 ulCfgCmn = &srvCellCfgCmnSib->ulCfg;
6294 DU_LOG("Frequency Band Indicator %ld\n", ulCfgCmn->freqBandInd);
6295 DU_LOG("Maximum Transmission Power %ld\n", ulCfgCmn->pMax);
6296 DU_LOG("Frequency Location and Bandwidth %ld\n", ulCfgCmn->locAndBw);
6297 DU_LOG("Time Alignment Timer %ld\n", ulCfgCmn->timeAlignTimerComm);
6298 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsOffset);
6299 DU_LOG("Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scs);
6300 DU_LOG("Carrier BW considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsBw);
6302 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : RACH Config Common ** \n");
6303 rachCfgCmn = &ulCfgCmn ->rachCfg;
6304 if(rachCfgCmn->present)
6306 DU_LOG("PRACH Configuration Index %ld\n", rachCfgCmn->prachCfgIdx);
6307 DU_LOG("Number of PRACH FDM %ld\n", rachCfgCmn->msg1Fdm);
6308 DU_LOG("PRACH Frequeny Start Offset %ld\n", rachCfgCmn->msg1FreqStart);
6309 DU_LOG("Zero Correaltion Zone Configuration %ld\n", rachCfgCmn->zeroCorrZoneCfg);
6310 DU_LOG("Target Power Level of Received Preamble %ld\n", rachCfgCmn->preambleRcvdTgtPwr);
6311 DU_LOG("Maximum number of Preamble Transmission %ld\n", rachCfgCmn->preambleTransMax);
6312 DU_LOG("Power Ramping Step %ld\n", rachCfgCmn->pwrRampingStep);
6313 DU_LOG("RA Response Window %ld\n", rachCfgCmn->raRspWindow);
6314 DU_LOG("Total Number of RA Preambles %ld\n", rachCfgCmn->numRaPreamble);
6315 DU_LOG("Number of SSB per RACH Occassion %ld\n", rachCfgCmn->numSsbPerRachOcc);
6316 DU_LOG("Number of Contention Based Preamble per SSB %ld\n", rachCfgCmn->numCbPreamblePerSsb);
6317 DU_LOG("Contention Resolution Timer %ld\n", rachCfgCmn->contResTimer);
6318 DU_LOG("RSRP Threshold %ld\n", rachCfgCmn->rsrpThreshSsb);
6319 DU_LOG("Root Sequence Index Present %d\n", rachCfgCmn->rootSeqIdxPresent);
6320 DU_LOG("Root Sequence Index %ld\n", rachCfgCmn->rootSeqIdx);
6321 DU_LOG("Subcarrier Spacing %ld\n", rachCfgCmn->msg1Scs);
6322 DU_LOG("Restricted Set Configuration %ld\n", rachCfgCmn->restrictedSetCfg);
6326 DU_LOG("RACH Config Common not present\n");
6329 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUSCH Config Common ** \n");
6330 puschCfgCommon = &ulCfgCmn ->puschCfg;
6331 if(puschCfgCommon->puschCfgPresent)
6333 DU_LOG("MSG3 Delta from RACH Preamble %ld\n", puschCfgCommon->msg3DeltaPreamble);
6334 DU_LOG("P0 Nominal With Grant %ld\n", puschCfgCommon->p0NominalWithGrant);
6335 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCommon->numTimeDomRsrcAlloc);
6336 for(rsrcIdx = 0; rsrcIdx < puschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
6338 puschCmnTimeDomRsrsAlloc = &puschCfgCommon ->timeDomAllocList[rsrcIdx];
6339 DU_LOG("Time Domain Resource Alloc [%d]", rsrcIdx);
6340 DU_LOG("\tK2 %ld\n", puschCmnTimeDomRsrsAlloc->k2);
6341 DU_LOG("\tMapping Type %ld\n", puschCmnTimeDomRsrsAlloc->mapType);
6342 DU_LOG("\tSLIV %d\n", puschCmnTimeDomRsrsAlloc->sliv);
6347 DU_LOG("PUSCH Config Common not present\n");
6350 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUCCH Config Common **\n");
6351 pucchCfgCommon = &ulCfgCmn->pucchCfg;
6352 if(pucchCfgCommon->present)
6354 DU_LOG("Resource Common %ld\n", pucchCfgCommon->rsrcComm);
6355 DU_LOG("Group Hopping %ld\n", pucchCfgCommon->grpHop);
6356 DU_LOG("P0 Nominal %ld\n", pucchCfgCommon->p0Nominal);
6360 DU_LOG("PUCCH Config Common not present\n");
6363 DU_LOG("\n ** SIB1 : Serving Cell Config Common : TDD UL DL Config Common ** \n");
6364 tddUlDlCfgCmn = &srvCellCfgCmnSib->tddCfg;
6365 DU_LOG("Reference Subcarrier Spacing %ld\n", tddUlDlCfgCmn->refScs);
6366 DU_LOG("Transmission Periodicity %ld\n", tddUlDlCfgCmn->txPrd);
6367 DU_LOG("Number of DL Slots %ld\n", tddUlDlCfgCmn->numDlSlots);
6368 DU_LOG("Number of DL Symbols %ld\n", tddUlDlCfgCmn->numDlSymbols);
6369 DU_LOG("Number of UL Slots %ld\n", tddUlDlCfgCmn->numUlSlots);
6370 DU_LOG("Number of UL Symbols %ld\n", tddUlDlCfgCmn->numUlSymbols);
6372 DU_LOG("\n ** MAC SLICE CONFIG REQUEST ** \n");
6373 macSliceCfg = &duCfgParam.tempSliceCfg;
6374 DU_LOG("Number of RRM Policy %d\n",macSliceCfg->numOfRrmPolicy);
6376 for(policyIdx = 0; policyIdx < macSliceCfg->numOfRrmPolicy; policyIdx++)
6378 rrmPolicy = macSliceCfg->listOfRrmPolicy[policyIdx];
6379 DU_LOG("RRM Policy [%d]", policyIdx);
6380 DU_LOG("\tResource Type %d\n", rrmPolicy->resourceType);
6382 rrmPolicyRatio = &rrmPolicy ->policyRatio;
6383 DU_LOG("\tPolicy Maximum Ratio %d\n", rrmPolicyRatio->maxRatio);
6384 DU_LOG("\tPolicy Minimum Ratio %d\n", rrmPolicyRatio->minRatio);
6385 DU_LOG("\tPolicy Deidcated Ration %d\n", rrmPolicyRatio->dedicatedRatio);
6386 DU_LOG("\tNumber of RRM Policy Member %d\n", rrmPolicy->numOfRrmPolicyMem);
6388 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
6390 rrmPolicyMemberList = rrmPolicy->rRMPolicyMemberList[memIdx];
6391 DU_LOG("\tRRM Policy Member [%d]", memIdx);
6392 DU_LOG("\t\tPLMN : mcc[0] %d\n", rrmPolicyMemberList->plmn.mcc[0]);
6393 DU_LOG("\t\tPLMN : mcc[1] %d\n", rrmPolicyMemberList->plmn.mcc[1]);
6394 DU_LOG("\t\tPLMN : mcc[2] %d\n", rrmPolicyMemberList->plmn.mcc[2]);
6395 DU_LOG("\t\tPLMN : mnc[0] %d\n", rrmPolicyMemberList->plmn.mnc[0]);
6396 DU_LOG("\t\tPLMN : mnc[1] %d\n", rrmPolicyMemberList->plmn.mnc[1]);
6397 DU_LOG("\t\tPLMN : mnc[2] %d\n", rrmPolicyMemberList->plmn.mnc[2]);
6398 DU_LOG("\t\tSST %d\n",rrmPolicyMemberList->snssai.sst);
6399 DU_LOG("\t\tSD %d %d %d\n",rrmPolicyMemberList->snssai.sd[0],rrmPolicyMemberList->snssai.sd[1],rrmPolicyMemberList->snssai.sd[2]);
6404 /**********************************************************************
6406 **********************************************************************/