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 /*******************************************************************
334 * @brief Configures the DU Parameters
338 * Function : calcSliv
341 * - calculate SLIV value from start and length field
343 * @params[in] start symbol
344 * @params[in] length of symbols
347 * ****************************************************************/
348 uint16_t calcSliv(uint8_t startSymbol, uint8_t lengthSymbol)
351 if((lengthSymbol-1) <= 7)
353 sliv = NUM_SYMBOLS_PER_SLOT * (lengthSymbol-1) + startSymbol;
357 sliv = NUM_SYMBOLS_PER_SLOT * (NUM_SYMBOLS_PER_SLOT - lengthSymbol + 1) \
358 + (NUM_SYMBOLS_PER_SLOT - 1 - startSymbol);
363 /*******************************************************************
365 * @brief Configures the DU Parameters
372 * - Initializes the DuCfg members.
373 * - Calls readMacCfg()
375 * @params[in] system task ID
376 * @return ROK - success
379 * ****************************************************************/
383 uint8_t srvdCellIdx, bandIdx, sliceIdx, plmnIdx;
384 uint8_t brdcstPlmnIdx, freqBandIdx, srvdPlmnIdx;
386 SupportedSliceList *taiSliceSuppLst;
389 /* Note: Added these below variable for local testing*/
390 Snssai snssai[NUM_OF_SUPPORTED_SLICE] = {{1,{2,3,4}},{5,{6,7,8}}};
393 for(srvdCellIdx=0; srvdCellIdx<DEFAULT_CELLS; srvdCellIdx++)
395 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn, 0, sizeof(Plmn));
396 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[0] = PLMN_MCC0;
397 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[1] = PLMN_MCC1;
398 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[2] = PLMN_MCC2;
399 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mnc[0] = PLMN_MNC0;
400 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mnc[1] = PLMN_MNC1;
404 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrPci = cellParams.nRPCI;
406 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrPci = NR_PCI;
408 /* List of Available PLMN */
409 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
411 /* As per spec 38.473, Plmn identity consists of 3 digit from mcc
412 * followed by either 2 digit or 3 digits of mnc */
414 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn, 0,\
417 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
418 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
419 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
420 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
421 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
422 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
424 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[0] = PLMN_MCC0;
425 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[1] = PLMN_MCC1;
426 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[2] = PLMN_MCC2;
427 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[0] = PLMN_MNC0;
428 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[1] = PLMN_MNC1;
431 /* List of Extended PLMN */
432 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
434 /* As per spec 38.473, Plmn identity consists of 3 digit from mcc
435 * followed by either 2 digit or 3 digits of mnc */
437 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn, 0, sizeof(Plmn));
438 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[0] = PLMN_MCC0;
439 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[1] = PLMN_MCC1;
440 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[2] = PLMN_MCC2;
441 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mnc[0] = PLMN_MNC0;
442 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mnc[1] = PLMN_MNC1;
444 /* List of Supporting Slices */
445 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
447 taiSliceSuppLst = &duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].\
450 /* TODO Calculte the exact number of supported slices once will get
451 * cell configuration from O1 */
452 taiSliceSuppLst->numSupportedSlices = NUM_OF_SUPPORTED_SLICE;
453 if(taiSliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
455 DU_LOG("\nERROR --> DU_APP: readCfg(): Number of supported slice [%d] is more than 1024",\
456 taiSliceSuppLst->numSupportedSlices);
460 DU_ALLOC(taiSliceSuppLst->snssai, taiSliceSuppLst->numSupportedSlices*sizeof(Snssai*));
461 if(taiSliceSuppLst->snssai == NULLP)
463 DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
467 for(sliceIdx=0; sliceIdx<taiSliceSuppLst->numSupportedSlices; sliceIdx++)
469 DU_ALLOC(taiSliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
470 if(taiSliceSuppLst->snssai[sliceIdx] == NULLP)
472 DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
476 memcpy(taiSliceSuppLst->snssai[sliceIdx]->sd, cellParams.plmnList[sliceIdx].sd, \
477 SD_SIZE*sizeof(uint8_t));
478 taiSliceSuppLst->snssai[sliceIdx]->sst = cellParams.plmnList[sliceIdx].sst;
480 memcpy(taiSliceSuppLst->snssai[sliceIdx], &snssai[sliceIdx], sizeof(Snssai));
487 /* NR TDD Mode info */
489 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.nrArfcn = cellParams.arfcnUL;
490 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
491 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
493 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.nrArfcn = NR_UL_ARFCN;
494 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
495 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
497 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrb = NRB_273;
499 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
501 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[freqBandIdx].nrFreqBand =\
503 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
505 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[freqBandIdx].sulBand[bandIdx]\
510 /* NR FDD Mode info */
512 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = cellParams.arfcnUL;
513 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
514 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
515 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
516 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = cellParams.arfcnDL;
517 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
518 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
519 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
521 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = NR_UL_ARFCN;
522 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
523 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrScs = NR_SCS;
524 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
525 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = NR_DL_ARFCN;
526 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
527 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
528 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrScs = NR_SCS;
530 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_106;
531 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
533 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[freqBandIdx].\
534 nrFreqBand = NR_FREQ_BAND;
535 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
537 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[freqBandIdx].\
538 sulBand[bandIdx] = SUL_BAND;
541 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_106;
542 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
544 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[freqBandIdx].\
545 nrFreqBand = NR_FREQ_BAND;
546 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
548 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[freqBandIdx].\
549 sulBand[bandIdx] = SUL_BAND;
553 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrb = NRB_106;
554 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrb = NRB_106;
557 /*Measurement Config and Cell Config */
558 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.measTimeCfgDuration = TIME_CFG;
560 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellDir = DL_UL;
562 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellType=CELL_TYPE;
564 /* Broadcast PLMN Identity */
565 for(brdcstPlmnIdx=0; brdcstPlmnIdx<MAX_BPLMN_NRCELL_MINUS_1; brdcstPlmnIdx++)
567 for(plmnIdx=0; plmnIdx<MAX_PLMN; plmnIdx++)
569 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx],\
571 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[0] =\
573 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[1] =\
575 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[2] =\
577 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mnc[0] =\
579 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mnc[1] =\
582 /* Extended PLMN List */
583 for(plmnIdx=0; plmnIdx<MAX_PLMN; plmnIdx++)
585 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
586 extPlmn[plmnIdx], 0, sizeof(Plmn));
587 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
588 extPlmn[plmnIdx].mcc[0] = PLMN_MCC0;
589 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
590 extPlmn[plmnIdx].mcc[1] = PLMN_MCC1;
591 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
592 extPlmn[plmnIdx].mcc[2] = PLMN_MCC2;
593 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
594 extPlmn[plmnIdx].mnc[0] = PLMN_MNC0;
595 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
596 extPlmn[plmnIdx].mnc[1] = PLMN_MNC1;
599 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.epsTac = cellParams.nRTAC; //TODO : to check and fill
600 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.tac = cellParams.nRTAC;
601 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].tac = cellParams.nRTAC;
602 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].nrCellId = cellParams.cellLocalId;
604 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.epsTac = DU_TAC; //TODO : to check and fill
605 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.tac = DU_TAC;
606 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].tac = DU_TAC;
607 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].nrCellId = NR_CELL_ID;
609 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].ranac = NR_RANAC;
612 /*gnb DU System Info mib msg*/
614 DU_ALLOC(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg, encBufSize);
615 if(!(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg))
617 DU_LOG("\nERROR --> DU APP : Memory allocation failure at readCfg");
620 memcpy(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg, encBuf, encBufSize);
621 duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibLen = encBufSize;
623 /*gnb DU System Info mib msg*/
625 DU_ALLOC(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg,\
627 if(!(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg))
629 DU_LOG("\nERROR --> DU APP : Memory allocation failure at readCfg");
632 memcpy(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg,\
634 duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Len = encBufSize;
638 if(readMacCfg() != ROK)
640 DU_LOG("\nERROR --> DU_APP : Failed while reading MAC config");
647 /*******************************************************************
649 * @brief Copy Slice Cfg in temp structre in duCfgParams
653 * Function : cpyRrmPolicyInDuCfgParams
656 * - Copy Slice Cfg in temp structre in duCfgParams
658 * @params[in] RrmPolicy rrmPolicy[], uint8_t policyNum, uint8_t memberList
659 * @return ROK - success
662 * ****************************************************************/
663 uint8_t cpyRrmPolicyInDuCfgParams(RrmPolicyList rrmPolicy[], uint8_t policyNum, MacSliceCfgReq *tempSliceCfg)
665 uint8_t policyIdx = 0, memberListIdx = 0;
668 tempSliceCfg->numOfRrmPolicy = policyNum;
669 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy, tempSliceCfg->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
670 if(!tempSliceCfg->listOfRrmPolicy)
672 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
676 for(policyIdx = 0; policyIdx<tempSliceCfg->numOfRrmPolicy; policyIdx++)
678 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
679 if(!tempSliceCfg->listOfRrmPolicy[policyIdx])
681 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
685 tempSliceCfg->listOfRrmPolicy[policyIdx]->resourceType = rrmPolicy[policyIdx].resourceType;
687 tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem = rrmPolicy[policyIdx].rRMMemberNum;
689 if(tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem)
691 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList,\
692 tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
694 if(!tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList)
696 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
701 for(memberListIdx = 0; memberListIdx<tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem; memberListIdx++)
703 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx], sizeof(RrmPolicyMemberList));
704 if(!tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx])
706 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
709 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->snssai.sd,\
710 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].sd, 3 * sizeof(uint8_t));
711 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->snssai.sst,\
712 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].sst, sizeof(uint8_t));
713 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->plmn.mcc,\
714 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].mcc, 3 * sizeof(uint8_t));
715 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->plmn.mnc,\
716 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].mnc, 3 * sizeof(uint8_t));
718 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.maxRatio = rrmPolicy[policyIdx].rRMPolicyMaxRatio;
719 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.minRatio = rrmPolicy[policyIdx].rRMPolicyMinRatio;
720 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.dedicatedRatio = rrmPolicy[policyIdx].rRMPolicyDedicatedRatio;
728 /*******************************************************************
730 * @brief Fill SCTP Parameters
734 * Function : parseSctpParams
736 * Functionality: Fill SCTP Parameters
738 * @params[in] XML document pointer
740 * Current node in XML
741 * Pointer to structure to be filled
742 * @return ROK - success
745 * ****************************************************************/
746 uint8_t parseSctpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SctpParams *sctp)
748 uint8_t max_du_port = 0;
749 uint16_t f1_sctp_port = 0;
750 uint16_t e2_sctp_port = 0;
752 memset(sctp, 0, sizeof(SctpParams));
753 cur = cur->xmlChildrenNode;
757 sctp->duPort[F1_INTERFACE] = g_cfg.DU_Port;
758 sctp->duPort[E2_INTERFACE] = g_cfg.RIC_Port;
759 sctp->cuPort = g_cfg.CU_Port;
760 sctp->ricPort = g_cfg.RIC_Port;
762 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_DU_PORT")) && (cur->ns == ns))
764 max_du_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
765 if (max_du_port == 2 )
767 sctp->duPort[F1_INTERFACE] = f1_sctp_port; /* DU Port idx 0 */
768 sctp->duPort[E2_INTERFACE] = e2_sctp_port; /* RIC Port idx 1 */
772 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SCTP_PORT")) && (cur->ns == ns))
774 f1_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
776 if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_SCTP_PORT")) && (cur->ns == ns))
778 e2_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
781 sctp->cuPort = f1_sctp_port;
782 sctp->ricPort = e2_sctp_port;
789 /*******************************************************************
791 * @brief Fill EGTP Parameters
795 * Function : parseEgtpParams
797 * Functionality: Fill EGTP Parmeters
799 * @params[in] XML document pointer
801 * Current node in XML
802 * Pointer to structure to be filled
803 * @return ROK - success
806 * ****************************************************************/
807 uint8_t parseEgtpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1EgtpParams *egtp)
809 memset(egtp, 0, sizeof(F1EgtpParams));
810 cur = cur->xmlChildrenNode;
813 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_F1_EGTP_PORT")) && (cur->ns == ns))
815 egtp->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
817 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEST_F1_EGTP_PORT")) && (cur->ns == ns))
819 egtp->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
821 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_TEID")) && (cur->ns == ns))
823 egtp->minTunnelId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
830 /*******************************************************************
832 * @brief Fill MIB configuration
836 * Function : parseMibParams
838 * Functionality: Fill MIB configuration
840 * @params[in] XML document pointer
842 * Current node in XML
843 * Pointer to structure to be filled
844 * @return ROK - success
847 * ****************************************************************/
848 uint8_t parseMibParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MibParams *mib)
850 memset(mib, 0, sizeof(MibParams));
851 cur = cur -> xmlChildrenNode;
854 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SYS_FRAME_NUM")) && (cur->ns == ns))
856 mib->sysFrmNum = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
858 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUB_CARR_SPACE")) && (cur->ns == ns))
860 mib->subCarrierSpacingCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
862 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFFSET")) && (cur->ns == ns))
864 mib->ssb_SubcarrierOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
866 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPEA_POSITION")) && (cur->ns == ns))
868 mib->dmrs_TypeA_Position = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
870 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
872 mib->controlResourceSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
874 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
876 mib->searchSpaceZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
878 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_BARRED")) && (cur->ns == ns))
880 mib->cellBarred = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
882 if ((!xmlStrcmp(cur->name, (const xmlChar *)"INTRA_FREQ_RESELECT")) && (cur->ns == ns))
884 mib->intraFreqReselection = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
891 /*******************************************************************
893 * @brief Fill PLMN ID
897 * Function : parsePlmn
899 * Functionality: Fill PLMN ID
901 * @params[in] XML document pointer
903 * Current node in XML
904 * Pointer to structure to be filled
905 * @return ROK - success
908 * ****************************************************************/
909 uint8_t parsePlmn(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Plmn *plmn)
911 xmlNodePtr child = NULLP;
913 memset(plmn, 0, sizeof(Plmn));
914 cur = cur->xmlChildrenNode;
917 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MCC")) && (cur->ns == ns))
919 child = cur->xmlChildrenNode;
920 while (child != NULL)
922 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MCC0")) && (child->ns == ns))
924 plmn->mcc[0] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
927 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MCC1")) && (child->ns == ns))
929 plmn->mcc[1] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
932 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MCC2")) && (child->ns == ns))
934 plmn->mcc[2] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
941 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MNC")) && (cur->ns == ns))
943 child = cur->xmlChildrenNode;
944 while (child != NULL)
946 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MNC0")) && (child->ns == ns))
948 plmn->mnc[0] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
951 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MNC1")) && (child->ns == ns))
953 plmn->mnc[1] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
956 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MNC2")) && (child->ns == ns))
958 plmn->mnc[2] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
970 /*******************************************************************
976 * Function : parseNrCgi
978 * Functionality: Fill NR CGI
980 * @params[in] XML document pointer
982 * Current node in XML
983 * Pointer to structure to be filled
984 * @return ROK - success
987 * ****************************************************************/
988 uint8_t parseNrCgi(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrEcgi *nrCgi)
990 memset(nrCgi, 0, sizeof(NrEcgi));
991 cur = cur->xmlChildrenNode;
994 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
996 if(parsePlmn(doc, ns, cur, &nrCgi->plmn) != ROK)
1002 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
1004 nrCgi-> cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1012 /*******************************************************************
1014 * @brief Fill SNSSAI
1018 * Function : parseSnssai
1020 * Functionality: Fill SNSSAI
1022 * @params[in] XML document pointer
1024 * Current node in XML
1025 * Pointer to structure to be filled
1026 * @return ROK - success
1029 * ****************************************************************/
1030 uint8_t parseSnssai(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Snssai *snssai)
1035 memset(snssai, 0, sizeof(Snssai));
1036 cur = cur ->xmlChildrenNode;
1039 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SST")) && (cur->ns == ns))
1041 snssai->sst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1044 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SD_SIZE")) && (cur->ns == ns))
1046 child = cur->xmlChildrenNode;
1047 while(child != NULL)
1049 if ((!xmlStrcmp(child->name, (const xmlChar *)"SD")) && (child->ns == ns))
1051 snssai->sd[sdIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1054 child = child -> next;
1063 #ifdef XML_BASED_CONFIG
1064 /*******************************************************************
1066 * @brief Fill Supported Slice List
1070 * Function : parseSupportedSliceList
1072 * Functionality: Fill Supported Slice List
1074 * @params[in] XML document pointer
1076 * Current node in XML
1077 * Pointer to structure to be filled
1078 * @return ROK - success
1081 * ****************************************************************/
1082 uint8_t parseSupportedSliceList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SupportedSliceList *sliceSuppLst)
1084 uint8_t sliceIdx = 0;
1085 xmlNodePtr child = NULLP;
1086 xmlNodePtr snssaiNode = NULLP;
1088 memset(sliceSuppLst, 0, sizeof(SupportedSliceList));
1089 cur = cur->xmlChildrenNode;
1092 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SUPPORT_SLICE")) && (cur->ns == ns))
1094 sliceSuppLst->numSupportedSlices = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1095 if(sliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
1097 DU_LOG("\nERROR --> DU_APP: %s: Number of supported slice [%d] is more than 1024",\
1098 __func__, sliceSuppLst->numSupportedSlices);
1103 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI_LIST")) && (cur->ns == ns))
1105 DU_ALLOC_SHRABL_BUF(sliceSuppLst->snssai, (sliceSuppLst->numSupportedSlices) * sizeof(Snssai*));
1106 if (sliceSuppLst->snssai == NULLP)
1108 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
1112 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
1114 DU_ALLOC_SHRABL_BUF(sliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
1115 if (sliceSuppLst->snssai[sliceIdx] == NULLP)
1117 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
1123 memcpy(sliceSuppLst->snssai[sliceIdx]->sd, cellParams.plmnList[sliceIdx].sd, SD_SIZE*sizeof(uint8_t));
1124 sliceSuppLst->snssai[sliceIdx]->sst = cellParams.plmnList[sliceIdx].sst;
1130 child = cur->xmlChildrenNode;
1131 while (child != NULL)
1133 if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
1136 snssaiNode = child->xmlChildrenNode;
1137 while (snssaiNode != NULL)
1139 if ((!xmlStrcmp(snssaiNode->name, (const xmlChar *)"SNSSAI")) && (snssaiNode->ns == ns))
1141 if(parseSnssai(doc, ns, snssaiNode, sliceSuppLst->snssai[sliceIdx]) != ROK)
1147 snssaiNode = snssaiNode->next;
1150 child = child->next;
1160 /*******************************************************************
1162 * @brief Fill Served PLMN
1166 * Function : parseF1SrvdPlmn
1168 * Functionality: Fill Served PLMN
1170 * @params[in] XML document pointer
1172 * Current node in XML
1173 * Pointer to structure to be filled
1174 * @return ROK - success
1177 * ****************************************************************/
1178 uint8_t parseF1SrvdPlmn(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1SrvdPlmn *srvdPlmn, uint8_t srvdPlmnIdx)
1180 memset(srvdPlmn, 0, sizeof(F1SrvdPlmn));
1181 cur = cur->xmlChildrenNode;
1185 fillPlmnFromO1(&srvdPlmn ->plmn, srvdPlmnIdx);
1187 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
1189 if(parsePlmn(doc, ns, cur, &srvdPlmn->plmn) != ROK)
1196 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
1198 if(parsePlmn(doc, ns, cur, &srvdPlmn->extPlmn) != ROK)
1204 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
1206 if(parseSupportedSliceList(doc, ns, cur, &srvdPlmn->taiSliceSuppLst) != ROK)
1217 /*******************************************************************
1219 * @brief Fill cell information
1223 * Function : parseF1CellInfo
1225 * Functionality: Fill cell information
1227 * @params[in] XML document pointer
1229 * Current node in XML
1230 * Pointer to structure to be filled
1231 * @return ROK - success
1234 * ****************************************************************/
1235 uint8_t parseF1CellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1CellInfo *f1CellInfo)
1237 memset(f1CellInfo, 0, sizeof(F1CellInfo));
1238 cur = cur->xmlChildrenNode;
1241 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CGI")) && (cur->ns == ns))
1243 if(parseNrCgi(doc, ns, cur, &f1CellInfo->nrCgi) != ROK)
1250 f1CellInfo->nrPci = cellParams.nRPCI;
1252 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
1254 f1CellInfo->nrPci = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1258 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SRVD_PLMN")) && (cur->ns == ns))
1260 if(parseF1SrvdPlmn(doc, ns, cur, &f1CellInfo->srvdPlmn[0], 0) != ROK)
1271 /*******************************************************************
1273 * @brief Fill Frequency Band
1277 * Function : parseF1FreqBand
1279 * Functionality: Fill Frequency Band
1281 * @params[in] XML document pointer
1283 * Current node in XML
1284 * Pointer to structure to be filled
1285 * @return ROK - success
1288 * ****************************************************************/
1289 uint8_t parseF1FreqBand(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1FreqBand *freqBand)
1292 uint16_t sulValue = 0;
1294 xmlNodePtr sulChild;
1296 memset(freqBand, 0, sizeof(F1FreqBand));
1297 cur = cur->xmlChildrenNode;
1300 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
1302 freqBand->nrFreqBand = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1305 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_BAND_LIST")) && (cur->ns == ns))
1307 child = cur->xmlChildrenNode;
1308 while (child != NULL)
1310 if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
1312 sulChild = child->xmlChildrenNode;
1314 while (sulChild != NULL)
1316 if ((!xmlStrcmp(sulChild->name, (const xmlChar *)"SUL_BAND")) && (sulChild->ns == ns))
1318 sulValue = atoi((char *)xmlNodeListGetString(doc, sulChild->xmlChildrenNode, 1));
1319 if (sulIdx < MAX_NRCELL_BANDS)
1321 freqBand->sulBand[sulIdx] = sulValue;
1326 DU_LOG("ERROR --> DU_APP : %s : SUL_BAND array overflow\n", __func__);
1330 sulChild = sulChild->next;
1333 child = child->next;
1341 /*******************************************************************
1343 * @brief Fill Frequency Band List
1347 * Function : parseF1FreqBandList
1349 * Functionality: Fill Frequency Band List
1351 * @params[in] XML document pointer
1353 * Current node in XML
1354 * Pointer to structure to be filled
1355 * @return ROK - success
1358 * ****************************************************************/
1359 uint8_t parseF1FreqBandList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFreqInfo *nrFreqInfo)
1364 cur = cur->xmlChildrenNode;
1367 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
1369 child = cur->xmlChildrenNode;
1370 while(child != NULL)
1372 if ((!xmlStrcmp(child->name, (const xmlChar *)"F1_FREQ_BAND")) && (child->ns == ns))
1374 if(parseF1FreqBand(doc, ns, child, &nrFreqInfo->freqBand[idx]) != ROK)
1380 child = child -> next;
1389 /*******************************************************************
1391 * @brief Fill Transmission Bandwidth
1395 * Function : parseF1TxBw
1397 * Functionality: Fill Transmission Bandwidth
1399 * @params[in] XML document pointer
1401 * Current node in XML
1402 * Pointer to structure to be filled
1403 * @return ROK - success
1406 * ****************************************************************/
1407 uint8_t parseF1TxBw(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1TxBw *txBw)
1409 memset(txBw, 0, sizeof(F1TxBw));
1410 cur = cur->xmlChildrenNode;
1413 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_SCS")) && (cur->ns == ns))
1415 txBw->nrScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1418 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NRB")) && (cur->ns == ns))
1420 txBw->nrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1428 /*******************************************************************
1430 * @brief Fill SUL Info
1434 * Function : parseF1SulInfo
1436 * Functionality: Fill SUL Info
1438 * @params[in] XML document pointer
1440 * Current node in XML
1441 * Pointer to structure to be filled
1442 * @return ROK - success
1445 * ****************************************************************/
1446 uint8_t parseF1SulInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1SulInfo *sulInfo)
1448 memset(sulInfo, 0, sizeof(F1SulInfo));
1449 cur = cur->xmlChildrenNode;
1452 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_ARFCN")) && (cur->ns == ns))
1454 sulInfo->sulArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1457 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
1459 if(parseF1TxBw(doc, ns, cur, &sulInfo->sulTxBw) != ROK)
1470 /*******************************************************************
1472 * @brief Fill NR Frequency Info
1476 * Function : parseF1NrFreqInfo
1478 * Functionality: Fill NR Frequency Info
1480 * @params[in] XML document pointer
1482 * Current node in XML
1483 * Pointer to structure to be filled
1484 * @return ROK - success
1487 * ****************************************************************/
1488 uint8_t parseF1NrFreqInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFreqInfo *nrFreqInfo)
1490 memset(nrFreqInfo, 0, sizeof(F1NrFreqInfo));
1491 cur = cur->xmlChildrenNode;
1494 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_ARFCN")) && (cur->ns == ns))
1496 nrFreqInfo->nrArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1499 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SUL_INFO")) && (cur->ns == ns))
1501 if(parseF1SulInfo(doc, ns, cur, &nrFreqInfo->sulInfo) != ROK)
1507 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_FREQ_BAND_LIST")) && (cur->ns == ns))
1509 if(parseF1FreqBandList(doc, ns, cur, nrFreqInfo) != ROK)
1520 /*******************************************************************
1522 * @brief Fill NR FDD Info
1526 * Function : parseF1NrFddInfo
1528 * Functionality: Fill NR FDD Info
1530 * @params[in] XML document pointer
1532 * Current node in XML
1533 * Pointer to structure to be filled
1534 * @return ROK - success
1537 * ****************************************************************/
1538 uint8_t parseF1NrFddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFddInfo *fddInfo)
1540 memset(fddInfo, 0, sizeof(F1NrFddInfo));
1541 cur = cur->xmlChildrenNode;
1544 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO_UL")) && (cur->ns == ns))
1546 if(parseF1NrFreqInfo(doc, ns, cur, &fddInfo->ulNrFreqInfo) != ROK)
1552 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO_DL")) && (cur->ns == ns))
1554 if(parseF1NrFreqInfo(doc, ns, cur, &fddInfo->dlNrFreqInfo) != ROK)
1560 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW_UL")) && (cur->ns == ns))
1562 if(parseF1TxBw(doc, ns, cur, &fddInfo->ulTxBw) != ROK)
1568 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW_DL")) && (cur->ns == ns))
1570 if(parseF1TxBw(doc, ns, cur, &fddInfo->dlTxBw) != ROK)
1581 /*******************************************************************
1583 * @brief Fill NR TDD Info
1587 * Function : parseF1NrTddInfo
1589 * Functionality: Fill NR TDD Info
1591 * @params[in] XML document pointer
1593 * Current node in XML
1594 * Pointer to structure to be filled
1595 * @return ROK - success
1598 * ****************************************************************/
1599 uint8_t parseF1NrTddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrTddInfo *tddInfo)
1601 memset(tddInfo, 0, sizeof(F1NrTddInfo));
1602 cur = cur->xmlChildrenNode;
1605 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO")) && (cur->ns == ns))
1607 if(parseF1NrFreqInfo(doc, ns, cur, &tddInfo->nrFreqInfo) != ROK)
1613 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
1615 if(parseF1TxBw(doc, ns, cur, &tddInfo->nrTxBw) != ROK)
1626 /*******************************************************************
1628 * @brief Fill NR Mode Info
1632 * Function : parseNrModeInfo
1634 * Functionality: Fill NR Mode Info
1636 * @params[in] XML document pointer
1638 * Current node in XML
1639 * Pointer to structure to be filled
1640 * @return ROK - success
1643 * ****************************************************************/
1644 uint8_t parseNrModeInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrModeInfo *nrModeInfo)
1648 memset(nrModeInfo, 0, sizeof(NrModeInfo));
1649 cur = cur->xmlChildrenNode;
1652 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE")) && (cur->ns == ns))
1654 strcpy((char*)modeCfg, (char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1657 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FDD_INFO")) && (cur->ns == ns))
1659 if(strcmp(modeCfg, "FDD") == 0)
1661 if(parseF1NrFddInfo(doc, ns, cur, &nrModeInfo->mode.fdd) != ROK)
1668 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_TDD_INFO")) && (cur->ns == ns))
1670 if(strcmp(modeCfg, "TDD") == 0)
1672 if(parseF1NrTddInfo(doc, ns, cur, &nrModeInfo->mode.tdd) != ROK)
1684 /*******************************************************************
1686 * @brief Fill Broadcast PLMN Information
1690 * Function : parseF1BrdcstPlmnInfo
1692 * Functionality: Fill Broadcast PLMN Information
1694 * @params[in] XML document pointer
1696 * Current node in XML
1697 * Pointer to structure to be filled
1698 * @return ROK - success
1701 * ****************************************************************/
1702 uint8_t parseF1BrdcstPlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1BrdcstPlmnInfo *brdcstPlmnInfo)
1704 memset(brdcstPlmnInfo, 0, sizeof(F1BrdcstPlmnInfo));
1705 cur = cur->xmlChildrenNode;
1708 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
1710 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->plmn[0]) != ROK)
1716 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
1718 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->extPlmn[0]) != ROK)
1724 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
1726 brdcstPlmnInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1729 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CELL_ID")) && (cur->ns == ns))
1731 brdcstPlmnInfo->nrCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1734 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_RANAC")) && (cur->ns == ns))
1736 brdcstPlmnInfo->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1744 /*******************************************************************
1746 * @brief Fill DU Cell Information
1750 * Function : parseF1DuCellInfo
1752 * Functionality: Fill DU Cell Information
1754 * @params[in] XML document pointer
1756 * Current node in XML
1757 * Pointer to structure to be filled
1758 * @return ROK - success
1761 * ****************************************************************/
1762 uint8_t parseF1DuCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuCellInfo *duCellInfo)
1764 memset(duCellInfo, 0, sizeof(F1DuCellInfo));
1765 cur = cur->xmlChildrenNode;
1768 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_INFO")) && (cur->ns == ns))
1770 if(parseF1CellInfo(doc, ns, cur, &duCellInfo->cellInfo) != ROK)
1776 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
1778 duCellInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1781 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EPS_TAC")) && (cur->ns == ns))
1783 duCellInfo->epsTac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1786 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE_INFO")) && (cur->ns == ns))
1788 if(parseNrModeInfo(doc, ns, cur, &duCellInfo->f1Mode) != ROK)
1794 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_CFG")) && (cur->ns == ns))
1796 duCellInfo->measTimeCfgDuration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1799 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_DIR")) && (cur->ns == ns))
1801 duCellInfo->cellDir = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1804 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_TYPE")) && (cur->ns == ns))
1806 duCellInfo->cellType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1809 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_BRDCST_PLMN_INFO")) && (cur->ns == ns))
1811 if(parseF1BrdcstPlmnInfo(doc, ns, cur, &duCellInfo->brdcstPlmnInfo[0]) != ROK)
1822 /*******************************************************************
1824 * @brief Fill DU served cell information
1828 * Function : parseF1DuServedCellInfo
1830 * Functionality: Fill DU served cell information
1832 * @params[in] XML document pointer
1834 * Current node in XML
1835 * Pointer to structure to be filled
1836 * @return ROK - success
1839 * ****************************************************************/
1840 uint8_t parseF1DuServedCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuSrvdCellInfo *srvdCellInfo)
1842 memset(srvdCellInfo, 0, sizeof(F1DuSrvdCellInfo));
1843 cur = cur->xmlChildrenNode;
1846 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_CELL_INFO")) && (cur->ns == ns))
1848 if(parseF1DuCellInfo(doc, ns, cur, &srvdCellInfo->duCellInfo) != ROK)
1856 if(fillDuSrvdCellSysInfo(&srvdCellInfo->duSysInfo) != ROK)
1863 /*******************************************************************
1865 * @brief Fill DU Served Cell System Information
1869 * Function : fillDuSrvdCellSysInfo
1871 * Functionality: Fill DU Served Cell System Information
1873 * @params[in] Served Cell System Information
1874 * @return ROK - success
1877 * ****************************************************************/
1878 uint8_t fillDuSrvdCellSysInfo(F1DuSysInfo *sysInfo)
1880 /* GNB DU System Info MIB msg */
1882 DU_ALLOC(sysInfo->mibMsg, encBufSize);
1883 if(!(sysInfo->mibMsg))
1885 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
1888 memcpy(sysInfo->mibMsg, encBuf, encBufSize);
1889 sysInfo->mibLen = encBufSize;
1891 /* GNB DU System Info SIB1 msg */
1893 DU_ALLOC(sysInfo->sib1Msg, encBufSize);
1894 if(!(sysInfo->sib1Msg))
1896 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
1899 memcpy(sysInfo->sib1Msg, encBuf,encBufSize);
1900 sysInfo->sib1Len = encBufSize;
1906 /*******************************************************************
1908 * @brief Fill PLMN received from O1 interface
1912 * Function : fillPlmnFromO1
1914 * Functionality: Fill PLMN received from O1 interface
1916 * @params[in] XML document pointer
1918 * Current node in XML
1919 * Pointer to structure to be filled
1920 * @return ROK - success
1923 * ****************************************************************/
1924 void fillPlmnFromO1(Plmn *PLMN, uint8_t srvdPlmnIdx)
1926 PLMN->mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
1927 PLMN->mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
1928 PLMN->mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
1929 PLMN->mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
1930 PLMN->mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
1931 PLMN->mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
1935 /*******************************************************************
1937 * @brief Fill Beamforming Configuration
1941 * Function : parseBeamformingConfig
1943 * Functionality: Fill Beamforming Configuration
1945 * @params[in] XML document pointer
1947 * Current node in XML
1948 * Pointer to structure to be filled
1949 * @return ROK - success
1952 * ****************************************************************/
1953 uint8_t parseBeamformingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BeamformingConf *beamformingCfg)
1955 memset(beamformingCfg, 0, sizeof(BeamformingConf));
1956 cur = cur -> xmlChildrenNode;
1959 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_BEAMS")) && (cur->ns == ns))
1961 beamformingCfg->numOfBeams = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1964 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_RUS")) && (cur->ns == ns))
1966 beamformingCfg->numTxRUs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1969 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_IDX")) && (cur->ns == ns))
1971 beamformingCfg->beamIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1974 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TYPE")) && (cur->ns == ns))
1976 beamformingCfg->beamType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1979 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_AZIMUTH")) && (cur->ns == ns))
1981 beamformingCfg->beamAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1984 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TILT")) && (cur->ns == ns))
1986 beamformingCfg->beamTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1989 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_HORIZ_WIDTH")) && (cur->ns == ns))
1991 beamformingCfg->beamHorizWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1994 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_VERT_WIDTH")) && (cur->ns == ns))
1996 beamformingCfg->beamVertWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1999 if ((!xmlStrcmp(cur->name, (const xmlChar *)"COVER_SHAPE")) && (cur->ns == ns))
2001 beamformingCfg->coverageShape = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2004 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_TILT")) && (cur->ns == ns))
2006 beamformingCfg->digitalTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2009 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_AZIMUTH")) && (cur->ns == ns))
2011 beamformingCfg->digitalAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2019 /*******************************************************************
2021 * @brief Fill Precoding Configuration
2025 * Function : parsePrecodingConfig
2027 * Functionality: Fill Precoding Configuration
2029 * @params[in] XML document pointer
2031 * Current node in XML
2032 * Pointer to structure to be filled
2033 * @return ROK - success
2036 * ****************************************************************/
2037 uint8_t parsePrecodingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrecodingConf *precodCfg)
2039 memset(precodCfg, 0, sizeof(PrecodingConf));
2040 cur = cur -> xmlChildrenNode;
2043 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_LAYERS")) && (cur->ns == ns))
2045 precodCfg->numLayers = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2048 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ANT_PORTS")) && (cur->ns == ns))
2050 precodCfg->numAntPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2058 /*******************************************************************
2060 * @brief Fill PRACH FDM Information
2064 * Function : parsePrachFdmInfo
2066 * Functionality: Fill PRACH FDM Information
2068 * @params[in] XML document pointer
2070 * Current node in XML
2071 * Pointer to structure to be filled
2072 * @return ROK - success
2075 * ****************************************************************/
2076 uint8_t parsePrachFdmInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PrachFdmInfo *prachFdmInfo)
2078 memset(prachFdmInfo, 0, sizeof(PrachFdmInfo));
2079 cur = cur -> xmlChildrenNode;
2082 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
2084 prachFdmInfo->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2087 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ROOT_SEQ")) && (cur->ns == ns))
2089 prachFdmInfo->numRootSeq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2092 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K1")) && (cur->ns == ns))
2094 prachFdmInfo->k1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2097 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORR_ZONE_CFG")) && (cur->ns == ns))
2099 prachFdmInfo->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2107 /*******************************************************************
2109 * @brief Fill PRACH configuration
2113 * Function : parsePrachCfg
2115 * Functionality: Fill PRACH configuration
2117 * @params[in] XML document pointer
2119 * Current node in XML
2120 * Pointer to structure to be filled
2121 * @return ROK - success
2124 * ****************************************************************/
2125 uint8_t parsePrachCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrachCfg *prachCfg)
2129 uint8_t maxNumRbs = 0;
2130 uint8_t prachMaxPrb = 0;
2132 memset(prachCfg, 0, sizeof(PrachCfg));
2133 cur = cur -> xmlChildrenNode;
2136 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SEQ_LEN")) && (cur->ns == ns))
2138 prachCfg->prachSeqLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2141 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
2143 prachCfg->prachSubcSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2146 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
2148 prachCfg->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2151 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRACH_FDM")) && (cur->ns == ns))
2153 prachCfg->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2156 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FDM_LIST")) && (cur->ns == ns))
2158 child = cur->xmlChildrenNode;
2159 while(child != NULL)
2161 if ((!xmlStrcmp(child->name, (const xmlChar *)"FDM_INFO")) && (child->ns == ns))
2163 if(parsePrachFdmInfo(doc, ns, child, &prachCfg->fdm[fdmIdx]) != ROK)
2169 child = child -> next;
2173 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns == ns))
2175 prachCfg->prachRstSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2178 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PER_RACH")) && (cur->ns == ns))
2180 prachCfg->ssbPerRach = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2183 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
2185 prachCfg->totalNumRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2188 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
2190 prachCfg->totalNumRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2193 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
2195 maxNumRbs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2198 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
2200 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2203 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
2205 prachCfg->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2208 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
2210 prachCfg->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2216 prachCfg->msg1FreqStart = maxNumRbs - prachMaxPrb;
2220 /*******************************************************************
2222 * @brief Fill CSI RS configuration
2226 * Function : parseCsiRsCfg
2228 * Functionality: Fill CSI RS configuration
2230 * @params[in] XML document pointer
2232 * Current node in XML
2233 * Pointer to structure to be filled
2234 * @return ROK - success
2237 * ****************************************************************/
2238 uint8_t parseCsiRsCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CsiRsCfg *csiRsCfg)
2240 memset(csiRsCfg, 0, sizeof(CsiRsCfg));
2241 cur = cur -> xmlChildrenNode;
2244 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_FREQ")) && (cur->ns == ns))
2246 csiRsCfg->csiFreqDomainAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2249 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_PORTS")) && (cur->ns == ns))
2251 csiRsCfg->csiNrofPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2254 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT")) && (cur->ns == ns))
2256 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2259 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT_2")) && (cur->ns == ns))
2261 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2264 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DM_TYPE")) && (cur->ns == ns))
2266 csiRsCfg->csirscdmType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2269 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY")) && (cur->ns == ns))
2271 csiRsCfg->csirsdensity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2274 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY_DOT_5")) && (cur->ns == ns))
2276 csiRsCfg->csirsdensitydot5 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2279 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET")) && (cur->ns == ns))
2281 csiRsCfg->powerControlOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2284 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET_SS")) && (cur->ns == ns))
2286 csiRsCfg->powerControlOffsetSS = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2289 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY_OFFSET")) && (cur->ns == ns))
2291 csiRsCfg->periodicityAndOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2299 /*******************************************************************
2301 * @brief Fill SSB Configuration
2305 * Function : parseSsbCfg
2307 * Functionality: Fill SSB Configuration
2309 * @params[in] XML document pointer
2311 * Current node in XML
2312 * Pointer to structure to be filled
2313 * @return ROK - success
2316 * ****************************************************************/
2317 uint8_t parseSsbCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SsbCfg *ssbCfg)
2320 uint8_t ssbMaskIdx = 0;
2322 memset(ssbCfg, 0, sizeof( SsbCfg));
2323 cur = cur -> xmlChildrenNode;
2326 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBSC_PWR")) && (cur->ns == ns))
2328 ssbCfg->ssbPbchPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2331 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_CMN")) && (cur->ns == ns))
2333 ssbCfg->scsCmn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2336 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_OFF_PT_A")) && (cur->ns == ns))
2338 ssbCfg->ssbOffsetPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2341 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIOD")) && (cur->ns == ns))
2343 ssbCfg->ssbPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2346 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFF")) && (cur->ns == ns))
2348 ssbCfg->ssbScOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2351 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_LIST")) && (cur->ns == ns))
2353 child = cur -> xmlChildrenNode;
2354 while(child != NULL)
2356 if ((!xmlStrcmp(child->name, (const xmlChar *)"SSB_MASK")) && (child->ns == ns))
2358 ssbCfg->ssbMask[ssbMaskIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
2361 child = child -> next;
2365 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_ID")) && (cur->ns == ns))
2367 ssbCfg->beamId[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2370 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BETA_PSS")) && (cur->ns == ns))
2372 ssbCfg->betaPss = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2375 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCH_PAY_FLAG")) && (cur->ns == ns))
2377 ssbCfg->bchPayloadFlag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2380 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPE_A_PROS")) && (cur->ns == ns))
2382 ssbCfg->dmrsTypeAPos = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2390 /*******************************************************************
2392 * @brief Fill Carrier Configuration
2396 * Function : parseCarrierCfg
2398 * Functionality: Fill Carrier Configuration
2400 * @params[in] XML document pointer
2402 * Current node in XML
2403 * Pointer to structure to be filled
2404 * @return ROK - success
2407 * ****************************************************************/
2408 uint8_t parseCarrierCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CarrierCfg *carrierCfg)
2410 memset(carrierCfg, 0, sizeof(CarrierCfg));
2411 cur = cur -> xmlChildrenNode;
2414 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_BW")) && (cur->ns == ns))
2416 carrierCfg->dlBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2419 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_DL_ARFCN")) && (cur->ns == ns))
2421 carrierCfg->arfcnDL = convertArfcnToFreqKhz(atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)));
2424 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_BW")) && (cur->ns == ns))
2426 carrierCfg->ulBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2429 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_UL_ARFCN")) && (cur->ns == ns))
2431 carrierCfg->arfcnUL = convertArfcnToFreqKhz(atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)));
2434 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_ANT")) && (cur->ns == ns))
2436 carrierCfg->numTxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2439 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RX_ANT")) && (cur->ns == ns))
2441 carrierCfg->numRxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2449 /*******************************************************************
2451 * @brief Fill PLMN Information List
2455 * Function : parsePlmnInfo
2457 * Functionality: Fill PLMN Information List
2459 * @params[in] XML document pointer
2461 * Current node in XML
2462 * Pointer to structure to be filled
2463 * @return ROK - success
2466 * ****************************************************************/
2467 uint8_t parsePlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PlmnInfoList *plmnInfoList)
2470 memset(plmnInfoList, 0, sizeof(PlmnInfoList));
2471 cur = cur -> xmlChildrenNode;
2474 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
2476 if(parsePlmn(doc, ns, cur,&plmnInfoList->plmn) != ROK)
2482 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
2484 if(parseSupportedSliceList(doc, ns, cur,&plmnInfoList -> suppSliceList) != ROK)
2495 /*******************************************************************
2497 * @brief Fill PUCCH Configuration Common
2501 * Function : parsePucchConfigCommon
2503 * Functionality: Fill PUCCH Configuration Common
2505 * @params[in] XML document pointer
2507 * Current node in XML
2508 * Pointer to structure to be filled
2509 * @return ROK - success
2512 * ****************************************************************/
2513 uint8_t parsePucchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PucchConfigCommon *pucchCfgCmn)
2515 memset(pucchCfgCmn, 0, sizeof(PucchConfigCommon));
2516 cur = cur -> xmlChildrenNode;
2519 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
2521 pucchCfgCmn->pucchResourceCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2524 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_NEITHER_HOPPING")) && (cur->ns == ns))
2526 pucchCfgCmn->pucchGroupHopping = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2534 /*******************************************************************
2536 * @brief Fill PUSCH Common Time Allocation
2540 * Function : parsePuschTimeDomRsrcAlloc
2542 * Functionality: Fill PUSCH Common Time Allocation
2544 * @params[in] XML document pointer
2546 * Current node in XML
2547 * Pointer to structure to be filled
2548 * @return ROK - success
2551 * ****************************************************************/
2552 uint8_t parsePuschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschTimeDomRsrcAlloc *puschTimeDomRsrsAlloc)
2554 memset(puschTimeDomRsrsAlloc, 0, sizeof(PuschTimeDomRsrcAlloc));
2555 cur = cur -> xmlChildrenNode;
2558 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_K2_CFG")) && (cur->ns == ns))
2560 puschTimeDomRsrsAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2563 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MAPPING_TYPE")) && (cur->ns == ns))
2565 puschTimeDomRsrsAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2568 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
2570 puschTimeDomRsrsAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2573 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
2575 puschTimeDomRsrsAlloc->symbolLength= atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2581 puschTimeDomRsrsAlloc -> startSymbolAndLength = \
2582 calcSliv(puschTimeDomRsrsAlloc->startSymbol, puschTimeDomRsrsAlloc->symbolLength);
2586 /*******************************************************************
2588 * @brief Fill PUSCH Configuration Common
2592 * Function : parsePuschConfigCommon
2594 * Functionality: Fill PUSCH Configuration Common
2596 * @params[in] XML document pointer
2598 * Current node in XML
2599 * Pointer to structure to be filled
2600 * @return ROK - success
2603 * ****************************************************************/
2604 uint8_t parsePuschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschConfigCommon *puschCfgCmn)
2607 xmlNodePtr child = NULLP;
2608 xmlNodePtr pdschNode = NULLP;
2610 memset(puschCfgCmn, 0, sizeof(PuschConfigCommon));
2611 cur = cur -> xmlChildrenNode;
2614 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
2616 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2619 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
2621 child = cur->xmlChildrenNode;
2622 while(child != NULL)
2624 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
2626 pdschNode = child->xmlChildrenNode;
2627 while(pdschNode != NULL)
2629 if ((!xmlStrcmp(pdschNode->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC")) && (pdschNode->ns == ns))
2631 if(parsePuschTimeDomRsrcAlloc(doc, ns, child,&puschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
2637 pdschNode = pdschNode -> next;
2641 child = child -> next;
2649 /*******************************************************************
2651 * @brief Fill BWP Configuration
2655 * Function : parseBwp
2657 * Functionality: Fill BWP Configuration
2659 * @params[in] XML document pointer
2661 * Current node in XML
2662 * Pointer to structure to be filled
2663 * @return ROK - success
2666 * ****************************************************************/
2667 uint8_t parseBwp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpParams *bwp)
2669 memset(bwp, 0, sizeof(BwpParams));
2670 cur = cur -> xmlChildrenNode;
2673 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PRB")) && (cur->ns == ns))
2675 bwp->firstPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2678 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRB")) && (cur->ns == ns))
2680 bwp->numPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2683 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
2685 bwp->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2688 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NORMAL_CYCLIC_PREFIX")) && (cur->ns == ns))
2690 bwp->cyclicPrefix = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2698 /*******************************************************************
2700 * @brief Fill UL BWP Configuration
2704 * Function : parseBwpULConfig
2706 * Functionality: Fill UL BWP Configuration
2708 * @params[in] XML document pointer
2710 * Current node in XML
2711 * Pointer to structure to be filled
2712 * @return ROK - success
2715 * ****************************************************************/
2716 uint8_t parseBwpULConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpUlConfig *bwpUlCfg)
2718 memset(bwpUlCfg, 0, sizeof(BwpUlConfig));
2719 cur = cur -> xmlChildrenNode;
2722 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
2724 if(parseBwp(doc, ns, cur, &bwpUlCfg->bwp) != ROK)
2730 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
2732 if(parsePucchConfigCommon(doc, ns, cur, &bwpUlCfg->pucchCommon) != ROK)
2738 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
2740 if(parsePuschConfigCommon(doc, ns, cur, &bwpUlCfg->puschCommon) != ROK)
2750 /*******************************************************************
2752 * @brief Fill Page Configuration
2756 * Function : parsePageCfg
2758 * Functionality: Fill Page Configuration
2760 * @params[in] XML document pointer
2762 * Current node in XML
2763 * Pointer to structure to be filled
2764 * @return ROK - success
2767 * ****************************************************************/
2768 uint8_t parsePageCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SchPageCfg *pageCfg)
2772 memset(pageCfg, 0, sizeof(SchPageCfg));
2773 cur = cur -> xmlChildrenNode;
2776 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PO")) && (cur->ns == ns))
2778 pageCfg->numPO = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2781 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PO_PRESENT")) && (cur->ns == ns))
2783 poPresent = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
2784 if(!strcmp(poPresent, "TRUE"))
2786 pageCfg->poPresent = true;
2790 pageCfg->poPresent = false;
2794 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGING_OCC")) && (cur->ns == ns))
2796 pageCfg->pagingOcc[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2804 /*******************************************************************
2806 * @brief Fill SIB1 PDCCH Configuration
2810 * Function : parsePdcchCfgSib1
2812 * Functionality: Fill SIB1 PDCCH Configuration
2814 * @params[in] XML document pointer
2816 * Current node in XML
2817 * Pointer to structure to be filled
2818 * @return ROK - success
2821 * ****************************************************************/
2822 uint8_t parsePdcchCfgSib1(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigSib1 *pdcchConfigSib1)
2824 memset(pdcchConfigSib1, 0, sizeof(PdcchConfigSib1));
2825 cur = cur -> xmlChildrenNode;
2828 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_ZERO_INDEX")) && (cur->ns == ns))
2830 pdcchConfigSib1->coresetZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2833 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_ZERO_INDEX")) && (cur->ns == ns))
2835 pdcchConfigSib1->searchSpaceZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2843 /*******************************************************************
2845 * @brief Fill SIB1 Cell Configuration
2849 * Function : parseSib1CellCfg
2851 * Functionality: Fill SIB1 Cell Configuration
2853 * @params[in] XML document pointer
2855 * Current node in XML
2856 * Pointer to structure to be filled
2857 * @return ROK - success
2860 * ****************************************************************/
2861 uint8_t parseSib1CellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Sib1CellCfg *sib1CellCfg)
2863 memset(sib1CellCfg, 0, sizeof( Sib1CellCfg));
2864 cur = cur -> xmlChildrenNode;
2867 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_PAGE_CFG")) && (cur->ns == ns))
2869 if(parsePageCfg(doc, ns, cur, &sib1CellCfg->pagingCfg) != ROK)
2875 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CONFIG_SIB1")) && (cur->ns == ns))
2877 if(parsePdcchCfgSib1(doc, ns, cur, &sib1CellCfg->pdcchCfgSib1) != ROK)
2888 /*******************************************************************
2890 * @brief Fill Aggregation Level Candidates Information
2894 * Function : parseCandidateInfo
2896 * Functionality: Fill Aggregation Level Candidates Information
2898 * @params[in] XML document pointer
2900 * Current node in XML
2901 * Pointer to structure to be filled
2902 * @return ROK - success
2905 * ****************************************************************/
2906 uint8_t parseCandidateInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CandidatesInfo *candInfo)
2908 memset(candInfo, 0, sizeof(CandidatesInfo));
2909 cur = cur -> xmlChildrenNode;
2912 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL1")) && (cur->ns == ns))
2914 candInfo->aggLevel1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2917 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL2")) && (cur->ns == ns))
2919 candInfo->aggLevel2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2922 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL4")) && (cur->ns == ns))
2924 candInfo->aggLevel4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2927 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL8")) && (cur->ns == ns))
2929 candInfo->aggLevel8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2932 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL16")) && (cur->ns == ns))
2934 candInfo->aggLevel16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2942 /*******************************************************************
2944 * @brief Fill Search Space Connfiguration
2948 * Function : parseSearchSpaceCfg
2950 * Functionality: Fill Search Space Configuration
2952 * @params[in] XML document pointer
2954 * Current node in XML
2955 * Pointer to structure to be filled
2956 * @return ROK - success
2959 * ****************************************************************/
2960 uint8_t parseSearchSpaceCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SearchSpaceCfg *searchSpaceCfg)
2962 memset(searchSpaceCfg, 0, sizeof(SearchSpaceCfg));
2963 cur = cur -> xmlChildrenNode;
2966 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_1_INDEX")) && (cur->ns == ns))
2968 searchSpaceCfg->searchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2971 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
2973 searchSpaceCfg->coresetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2976 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SLOT_SL1")) && (cur->ns == ns))
2978 searchSpaceCfg->monitoringSlot = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2981 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DURATION")) && (cur->ns == ns))
2983 searchSpaceCfg->duration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2986 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SYMBOL")) && (cur->ns == ns))
2988 searchSpaceCfg->monitoringSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2991 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CANDIDATE_INFO")) && (cur->ns == ns))
2993 if(parseCandidateInfo(doc, ns, cur, &searchSpaceCfg->candidate) != ROK)
3004 /*******************************************************************
3006 * @brief Fill PDCCH Configuration Common
3010 * Function : parsePdcchCfgCommon
3012 * Functionality: Fill PDCCH Configuration Common
3014 * @params[in] XML document pointer
3016 * Current node in XML
3017 * Pointer to structure to be filled
3018 * @return ROK - success
3021 * ****************************************************************/
3022 uint8_t parsePdcchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigCommon *pdcchCfgCm)
3024 memset(pdcchCfgCm, 0, sizeof(PdcchConfigCommon));
3025 cur = cur -> xmlChildrenNode;
3028 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_CFG")) && (cur->ns == ns))
3030 if(parseSearchSpaceCfg(doc, ns, cur, &pdcchCfgCm->commonSearchSpace) != ROK)
3036 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_1_INDEX")) && (cur->ns == ns))
3038 pdcchCfgCm->raSearchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3047 /*******************************************************************
3049 * @brief Fill PDSCH Common Time Domain Resource Allocation
3053 * Function : parsePdschCmnTimeDomRsrcAlloc
3055 * Functionality: Fill PDSCH Common Time Domain Resource Allocation
3057 * @params[in] XML document pointer
3059 * Current node in XML
3060 * Pointer to structure to be filled
3061 * @return ROK - success
3064 * ****************************************************************/
3065 uint8_t parsePdschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,\
3066 PdschCfgCommTimeDomRsrcAlloc *pdschTimeDomRsrcAlloc)
3068 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschCfgCommTimeDomRsrcAlloc));
3069 cur = cur -> xmlChildrenNode;
3072 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_K0_CFG")) && (cur->ns == ns))
3074 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3076 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_MAPPING_TYPE")) && (cur->ns == ns))
3078 pdschTimeDomRsrcAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3080 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
3082 pdschTimeDomRsrcAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3084 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3086 pdschTimeDomRsrcAlloc->lengthSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3094 /*******************************************************************
3096 * @brief Fill PDSCH Configuration Common
3100 * Function : parsePdschConfigCommon
3102 * Functionality: Fill PDSCH Configuration Common
3104 * @params[in] XML document pointer
3106 * Current node in XML
3107 * Pointer to structure to be filled
3108 * @return ROK - success
3111 * ****************************************************************/
3112 uint8_t parsePdschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdschConfigCommon *pdschCfgCmn)
3115 xmlNodePtr child = NULLP;
3116 xmlNodePtr pdschNode = NULLP;
3118 memset(pdschCfgCmn, 0, sizeof(PdschConfigCommon));
3119 cur = cur -> xmlChildrenNode;
3122 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
3124 pdschCfgCmn->numTimeDomAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3127 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
3129 child = cur->xmlChildrenNode;
3130 while(child != NULL)
3132 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
3134 pdschNode = child->xmlChildrenNode;
3135 while(pdschNode != NULL)
3137 if ((!xmlStrcmp(pdschNode->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC")) && (pdschNode->ns == ns))
3139 if(parsePdschCmnTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
3145 pdschNode = pdschNode -> next;
3149 child = child -> next;
3157 /*******************************************************************
3159 * @brief Fill DL BWP Configuration
3163 * Function : parseBwpDLConfig
3165 * Functionality: Fill DL BWP Configuration
3167 * @params[in] XML document pointer
3169 * Current node in XML
3170 * Pointer to structure to be filled
3171 * @return ROK - success
3174 * ****************************************************************/
3175 uint8_t parseBwpDLConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpDlConfig *bwpDlCfg)
3177 memset(bwpDlCfg, 0, sizeof(BwpDlConfig));
3178 cur = cur -> xmlChildrenNode;
3181 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
3183 if(parseBwp(doc, ns, cur, &bwpDlCfg->bwp) != ROK)
3189 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
3191 if(parsePdcchCfgCommon(doc, ns, cur, &bwpDlCfg->pdcchCommon) != ROK)
3197 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
3199 if(parsePdschConfigCommon(doc, ns, cur, &bwpDlCfg->pdschCommon) != ROK)
3210 /*******************************************************************
3212 * @brief Fill Cell Configuration
3216 * Function : parseCellCfg
3218 * Functionality: Fill Cell Configuration
3220 * @params[in] XML document pointer
3222 * Current node in XML
3223 * Pointer to structure to be filled
3224 * @return ROK - success
3227 * ****************************************************************/
3228 uint8_t parseCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CellCfg *cellCfg)
3230 memset(cellCfg, 0, sizeof(CellCfg));
3231 cur = cur -> xmlChildrenNode;
3234 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_OP_STATE")) && (cur->ns == ns))
3236 cellCfg->opState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3239 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_ADMIN_STATE")) && (cur->ns == ns))
3241 cellCfg->adminState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3244 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_STATE")) && (cur->ns == ns))
3246 cellCfg->cellState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3249 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN_INFO")) && (cur->ns == ns))
3251 if(parsePlmnInfo(doc, ns, cur, &cellCfg->plmnInfoList[0]) != ROK)
3257 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
3259 cellCfg->phyCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3262 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
3264 cellCfg->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3267 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_FREQUENCY")) && (cur->ns == ns))
3269 cellCfg->ssbFreq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3272 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3274 cellCfg->subCarrSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3277 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DUPLEX_MODE")) && (cur->ns == ns))
3279 cellCfg->dupType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3282 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_CELL_CFG")) && (cur->ns == ns))
3284 if(parseSib1CellCfg(doc, ns, cur, &cellCfg->sib1Cfg) != ROK)
3290 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_DL_CFG")) && (cur->ns == ns))
3292 if(parseBwpDLConfig(doc, ns, cur, &cellCfg->initialDlBwp) != ROK)
3298 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_UL_CFG")) && (cur->ns == ns))
3300 if(parseBwpULConfig(doc, ns, cur, &cellCfg->initialUlBwp) != ROK)
3312 /*******************************************************************
3314 * @brief Fill TDD slot configuration
3318 * Function : parseTddCfg
3320 * Functionality: Fill TDD slot configuration
3322 * @params[in] XML document pointer
3324 * Current node in XML
3325 * Pointer to structure to be filled
3326 * @return ROK - success
3329 * ****************************************************************/
3330 uint8_t parseTddCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TDDCfg *tddCfg)
3332 memset(tddCfg, 0, sizeof(TDDCfg));
3333 cur = cur -> xmlChildrenNode;
3336 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_PERIODICITY")) && (cur->ns == ns))
3338 tddCfg->tddPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3341 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
3343 tddCfg->nrOfDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3346 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
3348 tddCfg->nrOfDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3351 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
3353 tddCfg->nrOfUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3356 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
3358 tddCfg->nrOfUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3367 /*******************************************************************
3369 * @brief Fill MAC Cell Configuration
3373 * Function : parseMacCellCfg
3375 * Functionality: Fill MAC Cell Configuration
3377 * @params[in] XML document pointer
3379 * Current node in XML
3380 * Pointer to structure to be filled
3381 * @return ROK - success
3384 * ****************************************************************/
3385 uint8_t parseMacCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacCellCfg *macCellCfg)
3387 memset(macCellCfg, 0, sizeof(MacCellCfg));
3388 cur = cur -> xmlChildrenNode;
3391 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
3393 macCellCfg->cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3396 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CARRIER_CFG")) && (cur->ns == ns))
3398 if(parseCarrierCfg(doc, ns, cur, &macCellCfg->carrCfg) != ROK)
3404 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_CFG")) && (cur->ns == ns))
3406 if(parseCellCfg(doc, ns, cur, &macCellCfg->cellCfg) != ROK)
3412 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_CFG")) && (cur->ns == ns))
3414 if(parseSsbCfg(doc, ns, cur, &macCellCfg->ssbCfg) != ROK)
3420 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_CFG")) && (cur->ns == ns))
3422 if(parseCsiRsCfg(doc, ns, cur, &macCellCfg->csiRsCfg) != ROK)
3428 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CFG")) && (cur->ns == ns))
3430 if(parsePrachCfg(doc, ns, cur, &macCellCfg->prachCfg) != ROK)
3437 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_CFG")) && (cur->ns == ns))
3439 if(parseTddCfg(doc, ns, cur, &macCellCfg->tddCfg) != ROK)
3446 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRE_CODE_CFG")) && (cur->ns == ns))
3448 if(parsePrecodingConfig(doc, ns, cur, &macCellCfg->precodingConf) != ROK)
3454 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_FORM_CFG")) && (cur->ns == ns))
3456 if(parseBeamformingConfig(doc, ns, cur, &macCellCfg->beamCfg) != ROK)
3468 /*******************************************************************
3470 * @brief Fill PUSCH Configuration Common Time Domain
3471 * Resource Allocation
3475 * Function : parsePuschCmnTimeDomRsrcAlloc
3477 * Functionality: Fill PUSCH Configuration Common Time Domain
3478 * Resource Allocation
3480 * @params[in] XML document pointer
3482 * Current node in XML
3483 * Pointer to structure to be filled
3484 * @return ROK - success
3487 * ****************************************************************/
3488 uint8_t parsePuschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCmnTimeDomAlloc *puschCmnTimeDomAlloc)
3490 uint16_t startSymbol;
3493 memset(puschCmnTimeDomAlloc, 0, sizeof(PuschCfgCmnTimeDomAlloc));
3494 cur = cur -> xmlChildrenNode;
3497 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K2")) && (cur->ns == ns))
3499 puschCmnTimeDomAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3501 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
3503 puschCmnTimeDomAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3505 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
3507 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3509 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3511 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3515 puschCmnTimeDomAlloc->sliv = calcSliv(startSymbol, lenSymbol);
3519 /*******************************************************************
3521 * @brief Fill PUSCH Configuration Common
3525 * Function : parsePuschCfgCommon
3527 * Functionality: Fill PUSCH Configuration Common
3529 * @params[in] XML document pointer
3531 * Current node in XML
3532 * Pointer to structure to be filled
3533 * @return ROK - success
3536 * ****************************************************************/
3537 uint8_t parsePuschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCommon *puschCfgCmn)
3539 uint8_t rsrcIdx = 0;
3540 xmlNodePtr child = NULLP;
3541 xmlNodePtr rsrcNode = NULLP;
3543 memset(puschCfgCmn, 0, sizeof(PuschCfgCommon));
3544 cur = cur -> xmlChildrenNode;
3547 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_PRESENT")) && (cur->ns == ns))
3549 puschCfgCmn->puschCfgPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3552 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MSG3_DELTA_PREAMBLE")) && (cur->ns == ns))
3554 puschCfgCmn->msg3DeltaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3557 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_P0_NOMINAL_WITH_GRANT")) && (cur->ns == ns))
3559 puschCfgCmn->p0NominalWithGrant = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3562 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
3564 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3567 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
3569 child = cur->xmlChildrenNode;
3570 while (child != NULL)
3572 if ((!xmlStrcmp(child->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC")) && (child->ns == ns))
3574 if(parsePuschCmnTimeDomRsrcAlloc(doc, ns, child, &puschCfgCmn->timeDomAllocList[rsrcIdx]) != ROK)
3580 child = child->next;
3588 /*******************************************************************
3590 * @brief Fill PUCCH Configuration Common
3594 * Function : parsePucchCfgCommon
3596 * Functionality: Fill PUCCH Configuration Common
3598 * @params[in] XML document pointer
3600 * Current node in XML
3601 * Pointer to structure to be filled
3602 * @return ROK - success
3605 * ****************************************************************/
3606 uint8_t parsePucchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PucchCfgCommon *pucchCfgCmn)
3608 memset(pucchCfgCmn, 0, sizeof(PucchCfgCommon));
3609 cur = cur -> xmlChildrenNode;
3612 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3614 pucchCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3617 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
3619 pucchCfgCmn->rsrcComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3622 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GRP_HOP")) && (cur->ns == ns))
3624 pucchCfgCmn->grpHop = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3627 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_P0_NOMINAL")) && (cur->ns == ns))
3629 pucchCfgCmn->p0Nominal = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3637 /*******************************************************************
3639 * @brief Fill RACH Configuration Common
3643 * Function : parseRachCfgCommon
3645 * Functionality: Fill RACH Configuration Common
3647 * @params[in] XML document pointer
3649 * Current node in XML
3650 * Pointer to structure to be filled
3651 * @return ROK - success
3654 * ****************************************************************/
3655 uint8_t parseRachCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RachCfgCommon *rachCfgCmn)
3660 memset(rachCfgCmn, 0, sizeof(RachCfgCommon));
3661 cur = cur -> xmlChildrenNode;
3664 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3666 rachCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3669 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
3671 rachCfgCmn->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3674 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MSG_1_FDM")) && (cur->ns == ns))
3676 rachCfgCmn->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3679 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
3681 maxNumRb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3683 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
3685 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3688 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORRELATION_ZONE_CFG")) && (cur->ns == ns))
3690 rachCfgCmn->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3693 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_PREAMBLE_RCVD_TGT_PWR")) && (cur->ns == ns))
3695 rachCfgCmn->preambleRcvdTgtPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3698 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PREAMBLE_TRANS_MAX")) && (cur->ns == ns))
3700 rachCfgCmn->preambleTransMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3703 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PWR_RAMPING_STEP")) && (cur->ns == ns))
3705 rachCfgCmn->pwrRampingStep = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3708 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
3710 rachCfgCmn->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3713 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
3715 rachCfgCmn->numRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3718 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SSB_PER_RACH_OCC")) && (cur->ns == ns))
3720 rachCfgCmn->numSsbPerRachOcc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3723 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
3725 rachCfgCmn->numCbPreamblePerSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3728 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONT_RES_TIMER")) && (cur->ns == ns))
3730 rachCfgCmn->contResTimer = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3733 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
3735 rachCfgCmn->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3738 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX_PRESENT")) && (cur->ns == ns))
3740 rachCfgCmn->rootSeqIdxPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3743 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
3745 rachCfgCmn->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3748 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SUBCARRIER_SPACING")) && (cur->ns == ns))
3750 rachCfgCmn->msg1Scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3753 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns== ns))
3755 rachCfgCmn->restrictedSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3761 rachCfgCmn->msg1FreqStart = ((maxNumRb) - (prachMaxPrb));
3765 /*******************************************************************
3767 * @brief Fill SCS Specific Carrier
3771 * Function : parseScsSpecCarrier
3773 * Functionality: Fill SCS Specific Carrier
3775 * @params[in] XML document pointer
3777 * Current node in XML
3778 * Pointer to structure to be filled
3779 * @return ROK - success
3782 * ****************************************************************/
3783 uint8_t parseScsSpecCarrier(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ScsSpecCarrier *scsSpecCrr)
3785 memset(scsSpecCrr, 0, sizeof(ScsSpecCarrier));
3788 scsSpecCrr->scsOffset = cellParams.ssbOffset;
3789 scsSpecCrr->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
3790 scsSpecCrr->scsBw = cellParams.bSChannelBwUL;
3792 cur = cur -> xmlChildrenNode;
3795 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SUBCARRIER_OFFSET")) && (cur->ns == ns))
3797 scsSpecCrr->scsOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3800 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3802 scsSpecCrr->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3805 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_BW")) && (cur->ns == ns))
3807 scsSpecCrr->scsBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3815 /*******************************************************************
3817 * @brief Fill UL Config Common
3821 * Function : parseUlCfgCommon
3823 * Functionality: Fill UL Config Common
3825 * @params[in] XML document pointer
3827 * Current node in XML
3828 * Pointer to structure to be filled
3829 * @return ROK - success
3832 * ****************************************************************/
3833 uint8_t parseUlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,UlCfgCommon *ulCfgCmn)
3835 memset(ulCfgCmn, 0, sizeof(UlCfgCommon));
3836 cur = cur -> xmlChildrenNode;
3839 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
3841 ulCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3844 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_P_MAX")) && (cur->ns == ns))
3846 ulCfgCmn->pMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3849 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
3851 ulCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3854 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_ALLIGN_TIMER_COMM")) && (cur->ns == ns))
3856 ulCfgCmn->timeAlignTimerComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3859 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
3861 if(parseScsSpecCarrier(doc, ns, cur, &ulCfgCmn->ulScsCarrier) != ROK)
3867 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RACH_CFG_COMMON")) && (cur->ns == ns))
3869 if(parseRachCfgCommon(doc, ns, cur, &ulCfgCmn->rachCfg) != ROK)
3875 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
3877 if(parsePuschCfgCommon(doc, ns, cur, &ulCfgCmn->puschCfg) != ROK)
3883 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
3885 if(parsePucchCfgCommon(doc, ns, cur, &ulCfgCmn->pucchCfg) != ROK)
3896 /*******************************************************************
3898 * @brief Fill TDD UL DL Configuration Common
3902 * Function : parseTddUlDlCfgCommon
3904 * Functionality: Fill TDD UL DL Configuration Common
3906 * @params[in] XML document pointer
3908 * Current node in XML
3909 * Pointer to structure to be filled
3910 * @return ROK - success
3913 * ****************************************************************/
3914 uint8_t parseTddUlDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TddUlDlCfgCommon *tddUlDlCfgCmn)
3916 memset(tddUlDlCfgCmn, 0, sizeof(TddUlDlCfgCommon));
3917 cur = cur -> xmlChildrenNode;
3920 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REF_SCS")) && (cur->ns == ns))
3922 tddUlDlCfgCmn->refScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3925 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TX_PRD")) && (cur->ns == ns))
3927 tddUlDlCfgCmn->txPrd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3930 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
3932 tddUlDlCfgCmn->numDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3935 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
3937 tddUlDlCfgCmn->numDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3940 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
3942 tddUlDlCfgCmn->numUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3945 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
3947 tddUlDlCfgCmn->numUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3955 /*******************************************************************
3957 * @brief Fill PCCH Configuration
3961 * Function : parsePcchCfg
3963 * Functionality: Fill PCCH Configuration
3965 * @params[in] XML document pointer
3967 * Current node in XML
3968 * Pointer to structure to be filled
3969 * @return ROK - success
3972 * ****************************************************************/
3973 uint8_t parsePcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PcchCfg *pcchCfg)
3975 xmlNodePtr child = NULLP;
3976 xmlNodePtr firstPdcchNode = NULLP;
3979 memset(pcchCfg, 0, sizeof(PcchCfg));
3980 cur = cur -> xmlChildrenNode;
3983 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEFAULT_PAGING_CYCLE")) && (cur->ns == ns))
3985 pcchCfg->dfltPagingCycle = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3988 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAND_PAGING_FRAME_OFFSET")) && (cur->ns == ns))
3990 pcchCfg->nAndPagingFrmOffsetType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3993 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGE_FRAME_OFFSET")) && (cur->ns == ns))
3995 pcchCfg->pageFrameOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3998 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NS")) && (cur->ns == ns))
4000 pcchCfg->ns = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4003 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_TYPE")) && (cur->ns == ns))
4005 pcchCfg->firstPDCCHMontioringType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4008 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_LIST")) && (cur->ns == ns))
4010 child = cur->xmlChildrenNode;
4011 while (child != NULL)
4013 if ((!xmlStrcmp(child->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_INFO")) && (child->ns == ns))
4015 pcchCfg->firstPDCCHMontioringInfo[idx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
4018 child = child->next;
4026 /*******************************************************************
4028 * @brief Fill PDSCH Time Domain Resource Allocation
4032 * Function : parsePdschTimeDomRsrcAlloc
4034 * Functionality: Fill PDSCH Time Domain Resource Allocation
4036 * @params[in] XML document pointer
4038 * Current node in XML
4039 * Pointer to structure to be filled
4040 * @return ROK - success
4043 * ****************************************************************/
4044 uint8_t parsePdschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc)
4046 uint16_t startSymbol;
4049 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschTimeDomainRsrcAlloc));
4050 cur = cur -> xmlChildrenNode;
4053 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K0")) && (cur->ns == ns))
4055 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4058 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
4060 pdschTimeDomRsrcAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4063 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
4065 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4068 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
4070 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4075 pdschTimeDomRsrcAlloc->sliv = calcSliv(startSymbol, lenSymbol);
4079 /*******************************************************************
4081 * @brief Fill PDSCH Configuration Common
4085 * Function : parsePdschCfgCommon
4087 * Functionality: Fill PDSCH Configuration Common
4089 * @params[in] XML document pointer
4091 * Current node in XML
4092 * Pointer to structure to be filled
4093 * @return ROK - success
4096 * ****************************************************************/
4097 uint8_t parsePdschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschCfgCommon *pdschCfgCmn)
4100 xmlNodePtr child = NULLP;
4102 memset(pdschCfgCmn, 0, sizeof(PdschCfgCommon));
4103 cur = cur -> xmlChildrenNode;
4106 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
4108 pdschCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4111 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRS_ALLOC")) && (cur->ns == ns))
4113 pdschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4116 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
4118 child = cur->xmlChildrenNode;
4119 while (child != NULL)
4121 if ((!xmlStrcmp(child->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC")) && (child->ns == ns))
4123 if(parsePdschTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomAlloc[idx]) != ROK)
4129 child = child->next;
4137 /*******************************************************************
4139 * @brief Fill BCCH Configuration
4143 * Function : parseBcchCfg
4145 * Functionality: Fill BCCH Configuration
4147 * @params[in] XML document pointer
4149 * Current node in XML
4150 * Pointer to structure to be filled
4151 * @return ROK - success
4154 * ****************************************************************/
4155 uint8_t parseBcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BcchCfg *bcchCfg)
4157 memset(bcchCfg, 0, sizeof(BcchCfg));
4158 cur = cur -> xmlChildrenNode;
4161 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MOB_PRD_COEFF")) && (cur->ns == ns))
4163 bcchCfg->modPrdCoeff = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4170 /*******************************************************************
4172 * @brief Fill PDCCH Configuration Common
4176 * Function : parsePdcchConfigCommon
4178 * Functionality: Fill PDCCH Configuration Common
4180 * @params[in] XML document pointer
4182 * Current node in XML
4183 * Pointer to structure to be filled
4184 * @return ROK - success
4187 * ****************************************************************/
4188 uint8_t parsePdcchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdcchCfgCommon *pdccgCfgCmn)
4191 xmlNodePtr child = NULLP;
4193 memset(pdccgCfgCmn, 0, sizeof( PdcchCfgCommon));
4194 cur = cur -> xmlChildrenNode;
4197 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
4199 pdccgCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4202 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
4204 pdccgCfgCmn->ctrlRsrcSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4207 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
4209 pdccgCfgCmn->searchSpcZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4212 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID")) && (cur->ns == ns))
4214 pdccgCfgCmn->searchSpcId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4217 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CTRL_RSRC_SET_ID")) && (cur->ns == ns))
4219 pdccgCfgCmn->ctrlRsrcSetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4222 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_SLOT_PERIOD_OFFSET_PRESENT")) && (cur->ns == ns))
4224 pdccgCfgCmn->monitorSlotPrdAndOffPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4227 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_LIST")) && (cur->ns == ns))
4229 child = cur->xmlChildrenNode;
4232 if ((!xmlStrcmp(child->name, (const xmlChar *)"MONITOR_SYMBOL_IN_SLOT")) && (child->ns == ns))
4234 pdccgCfgCmn->monitorSymbolsInSlot[idx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
4237 child = child->next;
4241 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_1")) && (cur->ns == ns))
4243 pdccgCfgCmn->numCandAggLvl1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4246 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_2")) && (cur->ns == ns))
4248 pdccgCfgCmn->numCandAggLvl2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4251 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_4")) && (cur->ns == ns))
4253 pdccgCfgCmn->numCandAggLvl4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4256 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_8")) && (cur->ns == ns))
4258 pdccgCfgCmn->numCandAggLvl8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4261 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_16")) && (cur->ns == ns))
4263 pdccgCfgCmn->numCandAggLvl16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4266 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_TYPE")) && (cur->ns == ns))
4268 pdccgCfgCmn->searchSpcType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4271 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_DCI_FORMAT")) && (cur->ns == ns))
4273 pdccgCfgCmn->commSrchSpcDciFrmt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4276 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_SIB1")) && (cur->ns == ns))
4278 pdccgCfgCmn->searchSpcSib1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4281 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_PAGING")) && (cur->ns == ns))
4283 pdccgCfgCmn->pagingSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4286 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_RA")) && (cur->ns == ns))
4288 pdccgCfgCmn->raSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4296 /*******************************************************************
4298 * @brief Fill DL Configuration Common
4302 * Function : parseDlCfgCommon
4304 * Functionality: Fill DL Configuration Common
4306 * @params[in] XML document pointer
4308 * Current node in XML
4309 * Pointer to structure to be filled
4310 * @return ROK - success
4313 * ****************************************************************/
4314 uint8_t parseDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,DlCfgCommon *dlCfgCmn)
4316 memset(dlCfgCmn, 0, sizeof(DlCfgCommon));
4317 cur = cur -> xmlChildrenNode;
4320 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
4322 dlCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4325 if ((!xmlStrcmp(cur->name, (const xmlChar *)"OFFSET_TO_POINT_A")) && (cur->ns == ns))
4327 dlCfgCmn->offsetToPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4330 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
4332 dlCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4335 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
4337 if(parseScsSpecCarrier(doc, ns, cur, &dlCfgCmn->dlScsCarrier) != ROK)
4343 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
4345 if(parsePdcchConfigCommon(doc, ns, cur, &dlCfgCmn->pdcchCfg) != ROK)
4351 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
4353 if(parsePdschCfgCommon(doc, ns, cur, &dlCfgCmn->pdschCfg) != ROK)
4359 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCCH_CFG")) && (cur->ns == ns))
4361 if(parseBcchCfg(doc, ns, cur, &dlCfgCmn->bcchCfg) != ROK)
4367 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PCCH_CFG")) && (cur->ns == ns))
4369 if(parsePcchCfg(doc, ns, cur, &dlCfgCmn->pcchCfg) != ROK)
4378 /*******************************************************************
4380 * @brief Fill Serving Cell Config Common SIB
4384 * Function : parseSrvCellCfgCmnSib
4386 * Functionality: Fill Serving Cell Config Common SIB
4388 * @params[in] XML document pointer
4390 * Current node in XML
4391 * Pointer to structure to be filled
4392 * @return ROK - success
4395 * ****************************************************************/
4396 uint8_t parseSrvCellCfgCmnSib(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SrvCellCfgCommSib *srvCellCfgCmnSib)
4398 memset(srvCellCfgCmnSib, 0, sizeof(SrvCellCfgCommSib));
4399 cur = cur -> xmlChildrenNode;
4403 srvCellCfgCmnSib->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
4405 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
4407 srvCellCfgCmnSib->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4410 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_POS_INBURST")) && (cur->ns == ns))
4412 srvCellCfgCmnSib->ssbPosInBurst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4415 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIODICITY")) && (cur->ns == ns))
4417 srvCellCfgCmnSib->ssbPrdServingCell = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4420 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBCH_PWR")) && (cur->ns == ns))
4422 srvCellCfgCmnSib->ssPbchBlockPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4425 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_CFG_COMMON")) && (cur->ns == ns))
4427 if(parseDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->dlCfg) != ROK)
4433 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_CFG_COMMON")) && (cur->ns == ns))
4435 if(parseUlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->ulCfg) != ROK)
4441 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_UL_DL_CFG_COMMON")) && (cur->ns == ns))
4443 if(parseTddUlDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->tddCfg) != ROK)
4454 /*******************************************************************
4456 * @brief Fill SI Scheduling Information
4460 * Function : parseSiSchedInfo
4462 * Functionality: Fill SI Scheduling Information
4464 * @params[in] XML document pointer
4466 * Current node in XML
4467 * Pointer to structure to be filled
4468 * @return ROK - success
4471 * ****************************************************************/
4472 uint8_t parseSiSchedInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SiSchedInfo *siSchedInfo)
4474 memset(siSchedInfo, 0, sizeof(SiSchedInfo));
4475 cur = cur -> xmlChildrenNode;
4478 if ((!xmlStrcmp(cur->name, (const xmlChar *)"WIN_LEN")) && (cur->ns == ns))
4480 siSchedInfo->winLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4483 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BROADCAST_STATUS")) && (cur->ns == ns))
4485 siSchedInfo->broadcastSta = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4488 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY")) && (cur->ns == ns))
4490 siSchedInfo->preiodicity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4493 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB_TYPE")) && (cur->ns == ns))
4495 siSchedInfo->sibType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4498 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_VALUE_TAG")) && (cur->ns == ns))
4500 siSchedInfo->sibValTag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4508 /*******************************************************************
4510 * @brief Fill SIB1 Parameters
4514 * Function : parseSib1Params
4516 * Functionality: Fill SIB1 Parameters
4518 * @params[in] XML document pointer
4520 * Current node in XML
4521 * Pointer to structure to be filled
4522 * @return ROK - success
4525 * ****************************************************************/
4526 uint8_t parseSib1Params(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,Sib1Params *sib1Params)
4528 memset(sib1Params, 0, sizeof(Sib1Params));
4529 cur = cur -> xmlChildrenNode;
4533 sib1Params-> tac = cellParams.nRTAC;
4534 sib1Params->cellIdentity = CELL_IDENTITY * cellParams.cellLocalId;
4535 DU_LOG("\nDEBUG --> DU_APP: readCfg(): OAM CellLocalId=%d", sib1Params->cellIdentity);
4537 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
4539 sib1Params-> tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4542 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_IDENTITY")) && (cur->ns == ns))
4544 sib1Params->cellIdentity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4548 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
4550 if(parsePlmn(doc, ns, cur, &sib1Params->plmn) != ROK)
4556 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RANAC")) && (cur->ns == ns))
4558 sib1Params->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4561 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_RESVD_OPUSE")) && (cur->ns == ns))
4563 sib1Params->cellResvdForOpUse = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4566 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_CNT")) && (cur->ns == ns))
4568 sib1Params->connEstFailCnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4571 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFF_VALID")) && (cur->ns == ns))
4573 sib1Params->connEstFailOffValidity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4576 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFFSET")) && (cur->ns == ns))
4578 sib1Params->connEstFailOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4581 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SI_SHED_INFO")) && (cur->ns == ns))
4583 if(parseSiSchedInfo(doc, ns, cur, &sib1Params->siSchedInfo) != ROK)
4589 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SRV_CELL_CFG_COM_SIB")) && (cur->ns == ns))
4591 if(parseSrvCellCfgCmnSib(doc, ns, cur, &sib1Params->srvCellCfgCommSib) != ROK)
4603 /*******************************************************************
4605 * @brief Fill RRM Policy List
4609 * Function : parseRrmPolicyList
4611 * Functionality: Fill RRM Policy List
4613 * @params[in] XML document pointer
4615 * Current node in XML
4616 * Pointer to structure to be filled
4617 * @return ROK - success
4620 * ****************************************************************/
4621 uint8_t parseRrmPolicyList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,RrmPolicyMemberList *rrmPolicyMemberList)
4623 memset(rrmPolicyMemberList, 0, sizeof(RrmPolicyMemberList));
4624 cur = cur->xmlChildrenNode;
4627 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
4629 if(parsePlmn(doc, ns, cur, &rrmPolicyMemberList->plmn) != ROK)
4635 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI")) && (cur->ns == ns))
4637 if(parseSnssai(doc, ns, cur, &rrmPolicyMemberList->snssai) != ROK)
4648 /*******************************************************************
4650 * @brief Fill RRM Policy Ratio
4654 * Function : parseRrmPolicyRatio
4656 * Functionality: Fill RRM Policy Ratio
4658 * @params[in] XML document pointer
4660 * Current node in XML
4661 * Pointer to structure to be filled
4662 * @return ROK - success
4665 * ****************************************************************/
4666 uint8_t parseRrmPolicyRatio(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RrmPolicyRatio *rrmPolicyRatio)
4668 memset(rrmPolicyRatio, 0, sizeof(RrmPolicyRatio));
4669 cur = cur -> xmlChildrenNode;
4672 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_RATIO")) && (cur->ns == ns))
4674 rrmPolicyRatio->maxRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4677 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_RATIO")) && (cur->ns == ns))
4679 rrmPolicyRatio->minRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4682 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEDICATED_RATIO")) && (cur->ns == ns))
4684 rrmPolicyRatio->dedicatedRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4692 /*******************************************************************
4694 * @brief Fill MAC Slice RRM Policy
4698 * Function : parseMacSliceRrmPolicy
4700 * Functionality: Fill MAC Slice RRM Policy
4702 * @params[in] XML document pointer
4704 * Current node in XML
4705 * Pointer to structure to be filled
4706 * @return ROK - success
4709 * ****************************************************************/
4710 uint8_t parseMacSliceRrmPolicy(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MacSliceRrmPolicy *rrmPolicy)
4714 memset(rrmPolicy, 0, sizeof(MacSliceRrmPolicy));
4715 cur = cur -> xmlChildrenNode;
4718 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RESOURCE_TYPE")) && (cur->ns == ns))
4720 rrmPolicy->resourceType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4723 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRM_POLICY_MEMBER")) && (cur->ns == ns))
4725 rrmPolicy->numOfRrmPolicyMem = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4728 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_MEMBER_LIST")) && (cur->ns == ns))
4730 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList,\
4731 rrmPolicy->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
4733 if(!rrmPolicy->rRMPolicyMemberList)
4735 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
4739 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
4741 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList[memIdx], sizeof(RrmPolicyMemberList));
4742 if (rrmPolicy->rRMPolicyMemberList[memIdx] == NULLP)
4744 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4748 if(parseRrmPolicyList(doc, ns, cur, rrmPolicy->rRMPolicyMemberList[memIdx]) != ROK)
4755 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_RATIO")) && (cur->ns == ns))
4757 if(parseRrmPolicyRatio(doc, ns, cur, &rrmPolicy->policyRatio) != ROK)
4768 /*******************************************************************
4770 * @brief Fill MAC Slice Configuration
4774 * Function : parseMacSliceCfgReq
4776 * Functionality: Fill MAC Slice Configuration
4778 * @params[in] XML document pointer
4780 * Current node in XML
4781 * Pointer to structure to be filled
4782 * @return ROK - success
4785 * ****************************************************************/
4786 uint8_t parseMacSliceCfgReq(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacSliceCfgReq *macSliceCfgReq)
4788 uint8_t policyIdx = 0;
4789 memset(macSliceCfgReq, 0, sizeof(MacSliceCfgReq));
4790 cur = cur -> xmlChildrenNode;
4793 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRM_POLICY")) && (cur->ns == ns))
4795 macSliceCfgReq->numOfRrmPolicy = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4798 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_SLICE_RRM_POLICY")) && (cur->ns == ns))
4800 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy, macSliceCfgReq->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
4801 if(!macSliceCfgReq->listOfRrmPolicy)
4803 DU_LOG("\nERROR --> DU APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4807 for(policyIdx = 0; policyIdx < macSliceCfgReq->numOfRrmPolicy; policyIdx++)
4809 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
4810 if (macSliceCfgReq->listOfRrmPolicy[policyIdx] == NULLP)
4812 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4815 if(parseMacSliceRrmPolicy(doc, ns, cur, macSliceCfgReq->listOfRrmPolicy[policyIdx]) != ROK)
4827 #ifdef THREAD_AFFINITY
4828 /*******************************************************************
4830 * @brief Set thread affinity to the core configured via XML file
4834 * Function : parseThreadAffinity
4836 * Functionality: Set thread affinity to the core configured
4839 * @params[in] XML document pointer
4841 * Current node in XML
4842 * Thread information
4843 * @return ROK - success
4846 * ****************************************************************/
4847 uint8_t parseThreadAffinity(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ThreadInfo *threads)
4849 cur = cur -> xmlChildrenNode;
4852 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_APP_CORE")) && (cur->ns == ns))
4854 threads->duAppCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4855 ODU_SET_THREAD_AFFINITY(&threads->duAppSTskId, SS_AFFINITY_MODE_EXCL, threads->duAppCoreId, 0);
4858 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP_CORE")) && (cur->ns == ns))
4860 threads->egtpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4861 ODU_SET_THREAD_AFFINITY(&threads->egtpSTskId, SS_AFFINITY_MODE_EXCL, threads->egtpCoreId, 0);
4864 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_MAC_CORE")) && (cur->ns == ns))
4866 threads->rlcMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4867 ODU_SET_THREAD_AFFINITY(&threads->rlcMacSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcMacCoreId, 0);
4870 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_UL_CORE")) && (cur->ns == ns))
4872 threads->rlcUlCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4873 ODU_SET_THREAD_AFFINITY(&threads->rlcUlSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcUlCoreId, 0);
4876 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_CORE")) && (cur->ns == ns))
4878 threads->schCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4879 ODU_SET_THREAD_AFFINITY(&threads->schSTskId, SS_AFFINITY_MODE_EXCL, threads->schCoreId, 0);
4882 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP_CORE")) && (cur->ns == ns))
4884 threads->sctpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4885 ODU_SET_THREAD_AFFINITY(&threads->sctpSTskId, SS_AFFINITY_MODE_EXCL, threads->sctpCoreId, 0);
4888 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOWER_MAC_CORE")) && (cur->ns == ns))
4890 threads->lwrMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4891 ODU_SET_THREAD_AFFINITY(&threads->lwrMacSTskId, SS_AFFINITY_MODE_EXCL, threads->lwrMacCoreId, 0);
4900 /*******************************************************************
4902 * @brief Fill tmrTqCp
4906 * Function : parseTmrTqCp
4908 * Functionality: Fill tmrTqCp
4910 * @params[in] XML document pointer
4912 * Current node in XML
4913 * Pointer to structure to be filled
4914 * @return ROK - success
4917 * ****************************************************************/
4918 uint8_t parseTmrTqCp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmTqCp *tmrTqCp)
4920 memset(tmrTqCp, 0, sizeof(CmTqCp));
4921 cur = cur ->xmlChildrenNode;
4924 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_LEN")) && (cur->ns == ns))
4926 tmrTqCp->tmrLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4933 /*******************************************************************
4935 * @brief Fill DU timer Parameters
4939 * Function : parseDuTimerParams
4941 * Functionality: Fill DU timer Parmeters
4943 * @params[in] XML document pointer
4945 * Current node in XML
4946 * Pointer to structure to be filled
4947 * @return ROK - success
4950 * ****************************************************************/
4951 uint8_t parseDuTimerParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, DuTimers *duTimers)
4953 memset(duTimers, 0, sizeof(DuTimers));
4955 cur = cur->xmlChildrenNode;
4958 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_TQ_CP")) && (cur->ns == ns))
4960 if(parseTmrTqCp(doc, ns, cur, &duTimers->tmrTqCp) != ROK)
4966 /* Initialzie the timer queue */
4967 memset(&(duTimers->tmrTq), 0, sizeof(CmTqType) * duTimers->tmrTqCp.tmrLen);
4971 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_RESOLUTION")) && (cur->ns == ns))
4973 duTimers->tmrRes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4980 /*******************************************************************
4982 * @brief Fill TNL assoc
4986 * Function : parseTnlAssoc
4988 * Functionality: Fill TNL assoc
4990 * @params[in] XML document pointer
4992 * Current node in XML
4993 * Pointer to structure to be filled
4994 * @return ROK - success
4997 * ****************************************************************/
4998 uint8_t parseTnlAssoc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TNLAssociation *tnlAssoc)
5005 memset(tnlAssoc, 0, sizeof(TNLAssociation));
5006 cur = cur ->xmlChildrenNode;
5009 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_IP")) && (cur->ns == ns))
5011 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5012 cmInetAddr(duIpV4Addr, &(duIp));
5013 tnlAssoc->localIpAddress.ipV4Pres = true;
5014 tnlAssoc->localIpAddress.ipV4Addr = duIp;
5017 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_PORT")) && (cur->ns == ns))
5019 tnlAssoc->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5022 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_IP")) && (cur->ns == ns))
5024 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5025 cmInetAddr(ricIpV4Addr, &(ricIp));
5026 tnlAssoc->destIpAddress.ipV4Pres = true;
5027 tnlAssoc->destIpAddress.ipV4Addr = ricIp;
5030 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_PORT")) && (cur->ns == ns))
5032 tnlAssoc->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5035 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ASSOC_USAGE")) && (cur->ns == ns))
5037 tnlAssoc->usage = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5044 /*******************************************************************
5046 * @brief Fill ric style parmeters
5050 * Function : parseRicStyle
5052 * Functionality: Fill ric style parmeters
5054 * @params[in] XML document pointer
5056 * Current node in XML
5057 * Pointer to structure to be filled
5058 * @return ROK - success
5061 * ****************************************************************/
5062 uint8_t parseRicStyle(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RicStyle *ricStyle)
5065 memset(ricStyle, 0, sizeof(RicStyle));
5067 cur = cur->xmlChildrenNode;
5070 if ((!xmlStrcmp(cur->name, (const xmlChar *)"STYLE_TYPE")) && (cur->ns == ns))
5072 ricStyle->styleType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5075 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAME")) && (cur->ns == ns))
5077 tempName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5078 strcpy((char*)ricStyle->name, tempName);
5081 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FORMAT_TYPE")) && (cur->ns == ns))
5083 ricStyle->formatType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5090 /*******************************************************************
5092 * @brief Fill measurement info parameters
5096 * Function : parseMeasurementInfo
5098 * Functionality: Fill measurement info parmeters
5100 * @params[in] XML document pointer
5102 * Current node in XML
5103 * Pointer to structure to be filled
5104 * @return ROK - success
5107 * ****************************************************************/
5108 uint8_t parseMeasurementInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmLListCp *measurementInfoList)
5112 MeasurementInfoForAction *measurementInfoForAction;
5114 DU_ALLOC(measurementInfoForAction, sizeof(MeasurementInfoForAction));
5115 if(!measurementInfoForAction)
5120 cur = cur->xmlChildrenNode;
5123 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ID")) && (cur->ns == ns))
5125 measurementInfoForAction->measurementTypeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5128 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAME")) && (cur->ns == ns))
5130 tempName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5131 strcpy((char*)measurementInfoForAction->measurementTypeName, tempName);
5137 DU_ALLOC(node, sizeof(CmLList));
5140 node->node = (PTR) measurementInfoForAction;
5141 cmLListAdd2Tail(measurementInfoList, node);
5145 DU_FREE(measurementInfoForAction, sizeof(MeasurementInfoForAction));
5152 /*******************************************************************
5154 * @brief Fill report style parameters
5158 * Function : parseReportStyle
5160 * Functionality: Fill report style parmeters
5162 * @params[in] XML document pointer
5164 * Current node in XML
5165 * Pointer to structure to be filled
5166 * @return ROK - success
5169 * ****************************************************************/
5170 uint8_t parseReportStyle(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RicReportStyle *ricReportStyle)
5172 xmlNodePtr child = NULLP;
5173 uint8_t numOfMeasurementInfo=0;
5174 memset(ricReportStyle, 0, sizeof(RicReportStyle));
5176 cur = cur->xmlChildrenNode;
5179 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_STYLE")) && (cur->ns == ns))
5181 if(parseRicStyle(doc, ns, cur, &ricReportStyle->reportStyle) != ROK)
5187 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_MEASUREMENT_INFO")) && (cur->ns == ns))
5189 numOfMeasurementInfo = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5192 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MEASUREMENT_INFO_LIST")) && (cur->ns == ns))
5194 child = cur->xmlChildrenNode;
5195 while(child != NULL)
5197 if ((!xmlStrcmp(child->name, (const xmlChar *)"MEASUREMENT_INFO")) && (child->ns == ns))
5199 if(parseMeasurementInfo(doc, ns, child, &ricReportStyle->measurementInfoList) != ROK)
5204 child = child -> next;
5213 /*******************************************************************
5215 * @brief Fill RAN function name parameters
5219 * Function : parseRanFuncName
5221 * Functionality: Fill RAN function name parmeters
5223 * @params[in] XML document pointer
5225 * Current node in XML
5226 * Pointer to structure to be filled
5227 * @return ROK - success
5230 * ****************************************************************/
5231 uint8_t parseRanFuncName(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RanFunctionName *ranFunctionName)
5233 char *tempShortName;
5234 char *tempServiceModelOid;
5235 char *tempDiscription;
5237 memset(ranFunctionName, 0, sizeof(RanFunctionName));
5239 cur = cur->xmlChildrenNode;
5242 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SHORT_NAME")) && (cur->ns == ns))
5244 tempShortName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5245 strcpy((char*)ranFunctionName->shortName, tempShortName);
5248 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEVICE_MODEL_OID")) && (cur->ns == ns))
5250 tempServiceModelOid =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5251 strcpy((char*)ranFunctionName->serviceModelOID, tempServiceModelOid);
5254 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESCRIPTION")) && (cur->ns == ns))
5256 tempDiscription =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5257 strcpy((char*)ranFunctionName->description, tempDiscription);
5264 /*******************************************************************
5266 * @brief Fill RAN function parameters
5270 * Function : parseRanFunctionParams
5272 * Functionality: Fill RAN function parmeters
5274 * @params[in] XML document pointer
5276 * Current node in XML
5277 * Pointer to structure to be filled
5278 * @return ROK - success
5281 * ****************************************************************/
5282 uint8_t parseRanFunctionParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RanFunction *ranFunction)
5284 xmlNodePtr child = NULLP;
5285 uint8_t eventTriggerStyleIdx=0, reportStyleIdx=0;
5287 memset(ranFunction, 0, sizeof(RanFunction));
5289 cur = cur->xmlChildrenNode;
5293 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ID")) && (cur->ns == ns))
5295 ranFunction->id = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5298 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RAN_FUNCTION_NAME")) && (cur->ns == ns))
5300 if(parseRanFuncName(doc, ns, cur, &ranFunction->name) != ROK)
5306 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REVISION_COUNTER")) && (cur->ns == ns))
5308 ranFunction->revisionCounter = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5311 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_EVENT_TRIGGER_STYLE_SUPPORTED")) && (cur->ns == ns))
5313 ranFunction->numOfEventTriggerStyleSupported = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5317 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EVENT_TRIGGERED_STYLE_LIST")) && (cur->ns == ns))
5319 child = cur->xmlChildrenNode;
5320 while(child != NULL)
5322 if ((!xmlStrcmp(child->name, (const xmlChar *)"EVENT_TRIGGERED_STYLE")) && (child->ns == ns))
5324 if(parseRicStyle(doc, ns, child,&ranFunction->eventTriggerStyleList[eventTriggerStyleIdx]) != ROK)
5328 eventTriggerStyleIdx++;
5331 child = child -> next;
5337 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_REPORT_STYLE_SUPPORTED")) && (cur->ns == ns))
5339 ranFunction->numOfReportStyleSupported = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5342 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REPORT_STYLE_SUPPORTED_LIST")) && (cur->ns == ns))
5344 child = cur->xmlChildrenNode;
5345 while(child != NULL)
5347 if ((!xmlStrcmp(child->name, (const xmlChar *)"REPORT_STYLE")) && (child->ns == ns))
5349 if(parseReportStyle(doc, ns, child,&ranFunction->reportStyleList[reportStyleIdx]) != ROK)
5356 child = child -> next;
5361 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_INDICATION_HEADER_FORMAT")) && (cur->ns == ns))
5363 ranFunction->ricIndicationHeaderFormat = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5366 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_INDICATION_MESSAGE_FORMAT")) && (cur->ns == ns))
5368 ranFunction->ricIndicationMessageFormat = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5375 /*******************************************************************
5377 * @brief Fill E2 config Parameters
5381 * Function : parseE2ConfigParams
5383 * Functionality: Fill E2 config Parmeters
5385 * @params[in] XML document pointer
5387 * Current node in XML
5388 * Pointer to structure to be filled
5389 * @return ROK - success
5392 * ****************************************************************/
5393 uint8_t parseE2ConfigParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, E2apDb *e2apDb)
5395 uint8_t tnlIdx=0,ranFuncIdx=0;
5396 xmlNodePtr child = NULLP;
5398 memset(e2apDb, 0, sizeof(E2apDb));
5399 cur = cur->xmlChildrenNode;
5402 if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_NODE_ID")) && (cur->ns == ns))
5404 e2apDb->e2NodeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5407 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_TNL_ASSOC")) && (cur->ns == ns))
5409 e2apDb->numOfTNLAssoc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5412 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TNL_ASSOC_LIST")) && (cur->ns == ns))
5414 child = cur->xmlChildrenNode;
5415 while(child != NULL)
5417 if ((!xmlStrcmp(child->name, (const xmlChar *)"TNL_ASSOC")) && (child->ns == ns))
5419 if(parseTnlAssoc(doc, ns, child,&e2apDb->tnlAssoc[tnlIdx]) != ROK)
5426 child = child -> next;
5430 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_RAN_FUNCTION")) && (cur->ns == ns))
5432 e2apDb->numOfRanFunction = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5435 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RAN_FUNCTION_LIST")) && (cur->ns == ns))
5437 child = cur->xmlChildrenNode;
5438 while(child != NULL)
5440 if ((!xmlStrcmp(child->name, (const xmlChar *)"RAN_FUNCTION")) && (child->ns == ns))
5442 if(parseRanFunctionParams(doc, ns, child,&e2apDb->ranFunction[ranFuncIdx]) != ROK)
5446 cmLListInit(&e2apDb->ranFunction[ranFuncIdx].subscriptionList);
5450 child = child -> next;
5459 /*******************************************************************
5461 * @brief Fill DU Config Parmeters
5465 * Function : parseDuCfgParams
5469 * @params[in] XML document pointer
5471 * Current node in XML
5472 * @return ROK - success
5475 * ****************************************************************/
5476 uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
5478 char *tempDuName = "";
5486 cur = cur->xmlChildrenNode;
5489 if ((!xmlStrcmp(cur->name, (const xmlChar *)"THREAD_AFFINITY")) && (cur->ns == ns))
5491 #ifdef THREAD_AFFINITY
5492 if(parseThreadAffinity(doc, ns, cur, &duCfgParam.threadInfo) != ROK)
5499 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GNB_ID")) && (cur->ns == ns))
5501 duCb.gnbId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5504 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_ID")) && (cur->ns == ns))
5506 duCfgParam.duId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5509 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_NAME")) && (cur->ns == ns))
5511 tempDuName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5512 DU_ALLOC(duCfgParam.duName, strlen(tempDuName));
5513 if(!duCfgParam.duName)
5515 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
5518 strcpy((char*)duCfgParam.duName, tempDuName);
5521 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_DRB")) && (cur->ns == ns))
5523 duCfgParam.maxNumDrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5526 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE_SUPPORTED")) && (cur->ns == ns))
5528 duCfgParam.maxSupportedUes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5531 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE")) && (cur->ns == ns))
5533 duCfgParam.maxUe = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5537 if( getStartupConfig(&g_cfg) != ROK )
5541 cmInetAddr((S8*)g_cfg.DU_IPV4_Addr, &duIp);
5542 cmInetAddr((S8*)g_cfg.CU_IPV4_Addr, &cuIp);
5543 cmInetAddr((S8*)g_cfg.RIC_IPV4_Addr, &ricIp);
5546 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_IP_V4_ADDR")) && (cur->ns == ns))
5548 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5549 cmInetAddr(duIpV4Addr, &(duIp));
5552 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CU_IP_V4_ADDR")) && (cur->ns == ns))
5554 cuIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5555 cmInetAddr(cuIpV4Addr, &(cuIp));
5558 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_IP_V4_ADDR")) && (cur->ns == ns))
5560 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5561 cmInetAddr(ricIpV4Addr, &(ricIp));
5565 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP")) && (cur->ns == ns))
5567 if(parseSctpParams(doc, ns, cur, &duCfgParam.sctpParams) != ROK)
5571 duCfgParam.sctpParams.duIpAddr.ipV4Pres = true;
5572 duCfgParam.sctpParams.duIpAddr.ipV4Addr = duIp;
5573 duCfgParam.sctpParams.cuIpAddr.ipV4Pres = true;
5574 duCfgParam.sctpParams.cuIpAddr.ipV4Addr = cuIp;
5575 duCfgParam.sctpParams.ricIpAddr.ipV4Pres = true;
5576 duCfgParam.sctpParams.ricIpAddr.ipV4Addr = ricIp;
5579 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP")) && (cur->ns == ns))
5581 if(parseEgtpParams(doc, ns, cur, &duCfgParam.egtpParams) != ROK)
5585 duCfgParam.egtpParams.localIp.ipV4Addr = duIp;
5586 duCfgParam.egtpParams.localIp.ipV4Pres = true;
5587 duCfgParam.egtpParams.destIp.ipV4Pres = true;
5588 duCfgParam.egtpParams.destIp.ipV4Addr = cuIp;
5589 duCfgParam.egtpParams.maxTunnelId = duCfgParam.maxNumDrb * duCfgParam.maxSupportedUes;
5592 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIB_PARAMS")) && (cur->ns == ns))
5594 if(parseMibParams(doc, ns, cur, &duCfgParam.mibParams) != ROK)
5600 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_PARAMS")) && (cur->ns == ns))
5602 if(parseSib1Params(doc, ns, cur, &duCfgParam.sib1Params) != ROK)
5608 #ifdef XML_BASED_CONFIG
5609 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_SRVD_CELL_INFO")) && (cur->ns == ns))
5611 if(parseF1DuServedCellInfo(doc, ns, cur, &duCfgParam.srvdCellLst[0]) != ROK)
5617 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_CFG")) && (cur->ns == ns))
5619 if(parseMacCellCfg(doc, ns, cur, &duCfgParam.macCellCfg) != ROK)
5627 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SLICE_CFG")) && (cur->ns == ns))
5629 if(parseMacSliceCfgReq(doc, ns, cur, &duCfgParam.tempSliceCfg) != ROK)
5636 if((!xmlStrcmp(cur->name, (const xmlChar *)"DU_TIMER_INFO")) && (cur->ns == ns))
5638 if(parseDuTimerParams(doc, ns, cur, &duCb.duTimersInfo) != ROK)
5644 if((!xmlStrcmp(cur->name, (const xmlChar *)"E2AP_CFG")) && (cur->ns == ns))
5646 if(parseE2ConfigParams(doc, ns, cur, &duCb.e2apDb) != ROK)
5652 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2SetupTimer), 1);
5653 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.ricServiceUpdateTimer.timer), 1);
5654 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2NodeConfigUpdate.timer), 1);
5662 /*******************************************************************
5664 * @brief Reads config and posts message to du_app on completion
5668 * Function : duReadCfg
5671 * - Reads configuration from xml file and stores in DB
5672 * - Post to du_app for further processing
5675 * @return ROK - success
5678 * ****************************************************************/
5681 const char *filename = "../build/config/odu_config.xml";
5682 xmlDocPtr doc = NULLP;
5683 xmlNodePtr cur = NULLP;
5684 xmlNsPtr ns = NULLP;
5686 doc = xmlParseFile(filename);
5689 DU_LOG("\nERROR --> DU_APP: Failed to parse the XML file");
5693 cur = xmlDocGetRootElement(doc);
5694 ns = xmlSearchNsByHref(doc, cur, (const xmlChar *)"urn:o-ran:odu:configuration");
5697 DU_LOG("\nERROR --> DU_APP: XML Namespace not found.\n");
5703 parseDuCfgParams(doc, ns, cur);
5711 /* Read configs into duCfgParams */
5712 if(readCfg() != ROK)
5714 DU_LOG("\nERROR --> DU_APP : Reading configuration failed");
5719 /* Fill pst structure */
5720 memset(&(pst), 0, sizeof(Pst));
5721 pst.srcEnt = (Ent)ENTDUAPP;
5722 pst.srcInst = (Inst)DU_INST;
5723 pst.srcProcId = DU_PROC;
5724 pst.dstEnt = pst.srcEnt;
5725 pst.dstInst = pst.srcInst;
5726 pst.dstProcId = pst.srcProcId;
5728 pst.selector = ODU_SELECTOR_TC;
5732 /* Timer Registration request to system services */
5733 if (ODU_REG_TMR_MT(pst.srcEnt, pst.srcInst, duCb.duTimersInfo.tmrRes, duActvTmr) != ROK)
5735 DU_LOG("\nERROR --> DU_APP : Failed to register timer");
5739 if(ODU_GET_MSG_BUF(DFLT_REGION, DU_POOL, &mBuf) != ROK)
5741 DU_LOG("\nERROR --> DU_APP : Memory allocation failed in duReadCfg");
5745 if (ODU_POST_TASK(&pst, mBuf) != ROK)
5747 DU_LOG("\nERROR --> DU_APP : ODU_POST_TASK failed in duReadCfg");
5754 /*******************************************************************
5756 * @brief Prints all DU Configuration
5760 * Function : printDuConfig
5763 * - Prints all DU configurations
5768 * ****************************************************************/
5769 void printDuConfig()
5771 uint8_t sliceIdx = 0, pfIdx = 0, rsrcIdx = 0, ssbMaskIdx = 0, fdmIdx = 0;
5772 uint8_t monitoringSymbIdx = 0, poIdx = 0, policyIdx = 0, memIdx = 0;
5773 __attribute__((unused)) SctpParams *sctp;
5774 __attribute__((unused)) F1EgtpParams *egtp;
5775 __attribute__((unused)) MibParams *mib;
5776 __attribute__((unused)) F1RrcVersion *f1RrcVersion;
5777 F1DuCellInfo *f1DuCellInfo;
5778 F1CellInfo *f1CellInfo;
5779 __attribute__((unused)) F1DuSysInfo *duSysInfo;
5780 __attribute__((unused)) F1BrdcstPlmnInfo *brdcstPlmnInfo;
5781 NrModeInfo *nrModeInfo;
5782 __attribute__((unused)) F1NrFddInfo *f1NrFddInfo;
5783 F1SrvdPlmn *srvdPlmn;
5784 SupportedSliceList *sliceSuppLst;
5785 MacCellCfg *macCellCfg;
5786 __attribute__((unused)) CarrierCfg *carrierCfg;
5788 PlmnInfoList *plmnInfoList;
5789 Sib1CellCfg *sib1Cfg;
5790 SchPageCfg *pageCfg;
5791 __attribute__((unused)) PdcchConfigSib1 *pdcchConfigSib1;
5792 BwpDlConfig *bwpDlCfg;
5793 __attribute__((unused)) BwpParams *bwp;
5794 PdcchConfigCommon *pdcchCfgCmn;
5795 SearchSpaceCfg *searchSpaceCfg;
5796 __attribute__((unused)) CandidatesInfo *candidateInfo;
5797 PdschConfigCommon *pdschCfgCmn;
5798 __attribute__((unused)) PdschCfgCommTimeDomRsrcAlloc *pdschCmnTimeDomRsrcAlloc;
5799 BwpUlConfig *bwpUlCfg;
5800 __attribute__((unused)) PucchConfigCommon *pucchCfgCmn;
5801 PuschConfigCommon *puschCfgCmn;
5802 __attribute__((unused)) PuschTimeDomRsrcAlloc *puschTimeDomRsrcAlloc;
5803 __attribute__((unused)) SsbCfg *ssbCfg;
5804 __attribute__((unused)) CsiRsCfg *csiRsCfg;
5806 __attribute__((unused)) PrachFdmInfo *prachFdmInfo;
5807 __attribute__((unused)) PrecodingConf *precodCfg;
5808 __attribute__((unused)) BeamformingConf *beamFormingCfg;
5809 Sib1Params *sib1Params;
5810 __attribute__((unused)) SiSchedInfo *siSchedInfo;
5811 SrvCellCfgCommSib *srvCellCfgCmnSib;
5812 DlCfgCommon *dlCfgCmn;
5813 PdcchCfgCommon *pdcchCfgCommon;
5814 PdschCfgCommon *pdschCfgCommon;
5815 __attribute__((unused)) PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc;
5816 __attribute__((unused)) BcchCfg *bcchCfg;
5817 __attribute__((unused)) PcchCfg *pcchCfg;
5818 UlCfgCommon *ulCfgCmn;
5819 RachCfgCommon *rachCfgCmn;
5820 PuschCfgCommon *puschCfgCommon;
5821 __attribute__((unused)) PuschCfgCmnTimeDomAlloc *puschCmnTimeDomRsrsAlloc;
5822 PucchCfgCommon *pucchCfgCommon;
5823 __attribute__((unused)) TddUlDlCfgCommon *tddUlDlCfgCmn;
5824 MacSliceCfgReq *macSliceCfg;
5825 MacSliceRrmPolicy *rrmPolicy;
5826 __attribute__((unused)) RrmPolicyRatio *rrmPolicyRatio;
5827 __attribute__((unused)) RrmPolicyMemberList *rrmPolicyMemberList;
5830 F1NrTddInfo *f1NrTddInfo;
5834 DU_LOG("\n ** DU CONFIGURATION ** \n");
5835 DU_LOG("DU ID %d\n", duCfgParam.duId);
5836 DU_LOG("DU Name %s\n", duCfgParam.duName);
5838 DU_LOG("\n ** Thread Affinity ** \n");
5839 DU_LOG("DU APP CORE ID %d\n", duCfgParam.threadInfo.duAppCoreId);
5840 DU_LOG("EGTP CORE ID %d\n", duCfgParam.threadInfo.egtpCoreId);
5841 DU_LOG("SCTP CORE ID %d\n", duCfgParam.threadInfo.sctpCoreId);
5842 DU_LOG("RLC-UL CORE ID %d\n", duCfgParam.threadInfo.rlcUlCoreId);
5843 DU_LOG("RLC-DL and MAC CORE ID %d\n", duCfgParam.threadInfo.rlcMacCoreId);
5844 DU_LOG("SCH CORE ID %d\n", duCfgParam.threadInfo.schCoreId);
5845 DU_LOG("Lower MAC CORE ID %d\n", duCfgParam.threadInfo.lwrMacCoreId);
5847 DU_LOG("MAX NUM DRB %d\n", duCfgParam.maxNumDrb);
5848 DU_LOG("MAX SUPPORTED UE %d\n", duCfgParam.maxSupportedUes);
5849 DU_LOG("MAX UE %d\n",duCfgParam.maxUe);
5851 sctp = &duCfgParam.sctpParams;
5852 DU_LOG("\n ** SCTP PARAMETER ** \n");
5853 DU_LOG("DU IPv4 Address present %u\n", sctp->duIpAddr.ipV4Pres);
5854 DU_LOG("DU IP Address %u\n", sctp->duIpAddr.ipV4Addr);
5855 DU_LOG("CU IPv4 Address present %u\n", sctp->cuIpAddr.ipV4Pres);
5856 DU_LOG("CU IP Address %u\n", sctp->cuIpAddr.ipV4Addr);
5857 DU_LOG("RIC IPv4 Address present %u\n", sctp->ricIpAddr.ipV4Pres);
5858 DU_LOG("RIC IP Address %u\n", sctp->ricIpAddr.ipV4Addr);
5859 DU_LOG("SCTP Port at DU for F1 Interface %d\n", sctp->duPort[F1_INTERFACE]);
5860 DU_LOG("SCTP Port at CU for F1 Interface %d\n", sctp->cuPort);
5861 DU_LOG("SCTP Port at DU for E2 Interface %d\n", sctp->duPort[E2_INTERFACE]);
5862 DU_LOG("SCTP Port at RIC for E2 Interface %d\n", sctp->ricPort);
5864 egtp = &duCfgParam.egtpParams;
5865 DU_LOG("\n ** EGTP PARAMETER ** \n");
5866 DU_LOG("DU IP Address %d\n", egtp->localIp.ipV4Addr);
5867 DU_LOG("CU IP Address %d\n", egtp->destIp.ipV4Addr);
5868 DU_LOG("EGTP Port at DU %d\n", egtp->localPort);
5869 DU_LOG("EGTP Port at CU %d\n", egtp->destPort);
5870 DU_LOG("Minimum Tunnel ID %d\n", egtp->minTunnelId);
5871 DU_LOG("Maximum Tunnel ID %d\n",egtp->maxTunnelId);
5873 mib = &duCfgParam.mibParams;
5874 DU_LOG("\n ** MIB PARAMETER ** \n");
5875 DU_LOG("System Frame Number %d\n", mib->sysFrmNum);
5876 DU_LOG("Subcarrier Spacing Common %ld\n", mib->subCarrierSpacingCommon);
5877 DU_LOG("SSB Subcarrier Offset %ld\n", mib->ssb_SubcarrierOffset);
5878 DU_LOG("DMRS Type-A Position %ld\n", mib->dmrs_TypeA_Position);
5879 DU_LOG("Control Resource Set Zero %ld\n", mib->controlResourceSetZero);
5880 DU_LOG("Search Space Zero %ld\n", mib->searchSpaceZero);
5881 DU_LOG("Cell Barred %ld\n", mib->cellBarred);
5882 DU_LOG("Intra Frequency Reselection %ld\n", mib->intraFreqReselection);
5884 duSysInfo = &duCfgParam.srvdCellLst[0].duSysInfo;
5885 DU_LOG("\n ** DU System Information ** \n");
5886 DU_LOG("MIB length %d\n", duSysInfo->mibLen);
5887 DU_LOG("MIB message %s\n", duSysInfo->mibMsg);
5888 DU_LOG("SIB1 length %d\n", duSysInfo->sib1Len);
5889 DU_LOG("SIB1 message %s\n", duSysInfo->sib1Msg);
5891 f1DuCellInfo = &duCfgParam.srvdCellLst[0].duCellInfo;
5892 DU_LOG("\n ** DU Cell Information ** \n");
5894 f1CellInfo = &f1DuCellInfo->cellInfo;
5895 DU_LOG("NR PCI %d\n", f1CellInfo->nrPci);
5896 DU_LOG("DU TAC %d\n", f1DuCellInfo->tac);
5897 DU_LOG("EPS TAC %d\n", f1DuCellInfo->epsTac);
5898 DU_LOG("Measurement Time Configuration Duration %d\n", f1DuCellInfo->measTimeCfgDuration);
5899 DU_LOG("Cell Direction %d\n", f1DuCellInfo->cellDir);
5900 DU_LOG("Cell Type %d\n", f1DuCellInfo->cellType);
5902 DU_LOG("\n ** Cell Info : NR CGI ** \n");
5903 DU_LOG("Cell Id %d\n",f1CellInfo->nrCgi.cellId);
5904 DU_LOG("PLMN : mcc[0] %d\n", f1CellInfo->nrCgi.plmn.mcc[0]);
5905 DU_LOG("PLMN : mcc[1] %d\n", f1CellInfo->nrCgi.plmn.mcc[1]);
5906 DU_LOG("PLMN : mcc[2] %d\n", f1CellInfo->nrCgi.plmn.mcc[2]);
5907 DU_LOG("PLMN : mnc[0] %d\n", f1CellInfo->nrCgi.plmn.mnc[0]);
5908 DU_LOG("PLMN : mnc[1] %d\n", f1CellInfo->nrCgi.plmn.mnc[1]);
5909 DU_LOG("PLMN : mnc[2] %d\n", f1CellInfo->nrCgi.plmn.mnc[2]);
5911 srvdPlmn = &f1CellInfo->srvdPlmn[0];
5912 DU_LOG("\n ** Cell Info : Served PLMN ** \n");
5913 DU_LOG("PLMN : mcc[0] %d\n", srvdPlmn->plmn.mcc[0]);
5914 DU_LOG("PLMN : mcc[1] %d\n", srvdPlmn->plmn.mcc[1]);
5915 DU_LOG("PLMN : mcc[2] %d\n", srvdPlmn->plmn.mcc[2]);
5916 DU_LOG("PLMN : mnc[0] %d\n", srvdPlmn->plmn.mnc[0]);
5917 DU_LOG("PLMN : mnc[1] %d\n", srvdPlmn->plmn.mnc[1]);
5918 DU_LOG("PLMN : mnc[2] %d\n", srvdPlmn->plmn.mnc[2]);
5919 DU_LOG("EXT_PLMN : mcc[0] %d\n", srvdPlmn->extPlmn.mcc[0]);
5920 DU_LOG("EXT_PLMN : mcc[1] %d\n", srvdPlmn->extPlmn.mcc[1]);
5921 DU_LOG("EXT_PLMN : mcc[2] %d\n", srvdPlmn->extPlmn.mcc[2]);
5922 DU_LOG("EXT_PLMN : mnc[0] %d\n", srvdPlmn->extPlmn.mnc[0]);
5923 DU_LOG("EXT_PLMN : mnc[1] %d\n", srvdPlmn->extPlmn.mnc[1]);
5924 DU_LOG("EXT_PLMN : mnc[2] %d\n", srvdPlmn->extPlmn.mnc[2]);
5926 sliceSuppLst = &srvdPlmn->taiSliceSuppLst;
5927 DU_LOG("\n ** Cell Info : Served PLMN : Supported Slice List ** \n");
5928 DU_LOG("Number of Slices supported %d\n", sliceSuppLst->numSupportedSlices);
5929 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
5932 DU_LOG("\tSST %d\n", (*sliceSuppLst->snssai[sliceIdx]).sst);
5933 DU_LOG("\tSD %d %d %d\n", (*sliceSuppLst->snssai[sliceIdx]).sd[0], (*sliceSuppLst->snssai[sliceIdx]).sd[1], \
5934 (*sliceSuppLst->snssai[sliceIdx]).sd[2]);
5937 brdcstPlmnInfo = &f1DuCellInfo->brdcstPlmnInfo[0];
5938 DU_LOG("\n ** DU Cell Information : Broadcast PLMN Info ** \n");
5939 DU_LOG("TAC %d\n", brdcstPlmnInfo->tac);
5940 DU_LOG("NR Cell Id %d\n", brdcstPlmnInfo->nrCellId);
5941 DU_LOG("RANAC %d\n", brdcstPlmnInfo->ranac);
5943 DU_LOG("PLMN : mcc[0] %d\n", brdcstPlmnInfo->plmn[0].mcc[0]);
5944 DU_LOG("PLMN : mcc[1] %d\n", brdcstPlmnInfo->plmn[0].mcc[1]);
5945 DU_LOG("PLMN : mcc[2] %d\n", brdcstPlmnInfo->plmn[0].mcc[2]);
5946 DU_LOG("PLMN : mnc[0] %d\n", brdcstPlmnInfo->plmn[0].mnc[0]);
5947 DU_LOG("PLMN : mnc[1] %d\n", brdcstPlmnInfo->plmn[0].mnc[1]);
5948 DU_LOG("PLMN : mnc[2] %d\n", brdcstPlmnInfo->plmn[0].mnc[2]);
5950 DU_LOG("EXT_PLMN : mcc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[0]);
5951 DU_LOG("EXT_PLMN : mcc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[1]);
5952 DU_LOG("EXT_PLMN : mcc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[2]);
5953 DU_LOG("EXT_PLMN : mnc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[0]);
5954 DU_LOG("EXT_PLMN : mnc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[1]);
5955 DU_LOG("EXT_PLMN : mnc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[2]);
5957 nrModeInfo = &f1DuCellInfo->f1Mode;
5958 f1NrFddInfo = &nrModeInfo->mode.fdd;
5959 DU_LOG("\n ** DU Cell Information : NR Mode Info ** \n");
5961 DU_LOG("\n ** NR Mode Info : FDD ** \n");
5962 DU_LOG("\n ** NR Mode Info : FDD : UL NR Frequency ** \n");
5963 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->ulNrFreqInfo.nrArfcn);
5964 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->ulNrFreqInfo.sulInfo.sulArfcn);
5965 DU_LOG("SUL : Transmission BW Subcarrier Spacing %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrScs);
5966 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrb);
5967 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].nrFreqBand);
5968 DU_LOG("SUL Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].sulBand[0]);
5970 DU_LOG("\n ** NR Mode Info : FDD : DL NR Frequency ** \n");
5971 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->dlNrFreqInfo.nrArfcn);
5972 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->dlNrFreqInfo.sulInfo.sulArfcn);
5973 DU_LOG("SUL : Transmission BW Subcarrier Sapcing %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrScs);
5974 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrb);
5975 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].nrFreqBand);
5976 DU_LOG("SUL Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].sulBand[0]);
5978 DU_LOG("\n ** NR Mode Info : FDD : UL Transmission Bandwidth ** \n");
5979 DU_LOG("Subscarrier spacing %d\n", f1NrFddInfo->ulTxBw.nrScs);
5980 DU_LOG("Number of RBs %d\n", f1NrFddInfo->ulTxBw.nrb);
5982 DU_LOG("\n ** NR Mode Info : FDD : DL Transmission Bandwidth ** \n");
5983 DU_LOG("Subcarrier Spacing %d\n", f1NrFddInfo->dlTxBw.nrScs);
5984 DU_LOG("Number of RBs %d\n", f1NrFddInfo->dlTxBw.nrb);
5988 f1NrTddInfo = &nrModeInfo ->mode.tdd;
5990 DU_LOG("\n ** NR Mode Info : TDD : NR Frequency ** \n");
5991 DU_LOG("NR ARFCN %d\n", f1NrTddInfo->nrFreqInfo.nrArfcn);
5992 DU_LOG("SUL : ARFCN %d\n",f1NrTddInfo->nrFreqInfo.sulInfo.sulArfcn);
5993 DU_LOG("SUL : Transmission BW Subscarrier Spacing %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrScs);
5994 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrb);
5995 DU_LOG("NR Frequency Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].nrFreqBand);
5996 DU_LOG("SUL Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].sulBand[0]);
5998 DU_LOG("\n ** NR Mode Info : TDD : NR Transmission Bandwidth ** \n");
5999 DU_LOG("Subcarrier Spacing %d\n", f1NrTddInfo->nrTxBw.nrScs);
6000 DU_LOG("Number of RBs %d\n", f1NrTddInfo->nrTxBw.nrb);
6003 macCellCfg = &duCfgParam.macCellCfg;
6004 DU_LOG("\n ** MAC CELL CONFIGURATION ** \n");
6005 DU_LOG("Cell Id %d\n", macCellCfg->cellId);
6007 DU_LOG("\n ** MAC Cell Configuration : Carrier Configuration ** \n");
6008 carrierCfg = &macCellCfg ->carrCfg;
6009 DU_LOG("DL Bandwidth %d\n", carrierCfg->dlBw);
6010 DU_LOG("DL ARFCN %d\n", carrierCfg->arfcnDL);
6011 DU_LOG("UL Bandwidth %d\n", carrierCfg->ulBw);
6012 DU_LOG("UL ARFCN %d\n", carrierCfg->arfcnUL);
6013 DU_LOG("Number of Transmission Antenna %d\n", carrierCfg->numTxAnt);
6014 DU_LOG("Number of Received Antenna %d\n", carrierCfg->numRxAnt);
6016 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration ** \n");
6017 cellCfg = &macCellCfg ->cellCfg;
6018 DU_LOG("Operational State %d\n", cellCfg->opState);
6019 DU_LOG("Administration State %d\n", cellCfg->adminState);
6020 DU_LOG("Cell Current State %d\n", cellCfg->cellState);
6021 DU_LOG("NR PCI %d\n", cellCfg->phyCellId);
6022 DU_LOG("TAC: %d\n", cellCfg->tac);
6023 DU_LOG("SSB Freqeuncy %d\n", cellCfg->ssbFreq);
6024 DU_LOG("Subcarrier Spacing: %d\n", cellCfg->subCarrSpacing);
6025 DU_LOG("Duplex Mode %d\n", cellCfg->dupType);
6027 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : PLMN Info List ** \n");
6028 plmnInfoList = &cellCfg ->plmnInfoList[0];
6029 DU_LOG("PLMN : mcc[0] %d\n", plmnInfoList->plmn.mcc[0]);
6030 DU_LOG("PLMN : mcc[1] %d\n", plmnInfoList->plmn.mcc[1]);
6031 DU_LOG("PLMN : mcc[2] %d\n", plmnInfoList->plmn.mcc[2]);
6032 DU_LOG("PLMN : mnc[0] %d\n", plmnInfoList->plmn.mnc[0]);
6033 DU_LOG("PLMN : mnc[1] %d\n", plmnInfoList->plmn.mnc[1]);
6034 DU_LOG("PLMN : mnc[2] %d\n", plmnInfoList->plmn.mnc[2]);
6036 DU_LOG("Number of Slice supported %d\n", plmnInfoList->suppSliceList.numSupportedSlices);
6037 for(sliceIdx = 0; sliceIdx < plmnInfoList->suppSliceList.numSupportedSlices; sliceIdx++)
6040 DU_LOG("\nSST %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sst);
6041 DU_LOG("\nSD %d %d %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[0], \
6042 (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[1],(*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[2]);
6045 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 ** \n");
6046 sib1Cfg = &cellCfg->sib1Cfg;
6047 DU_LOG("SIB1 PDU Length %d", sib1Cfg->sib1PduLen);
6048 DU_LOG("SIB1 PDU %s", sib1Cfg->sib1Pdu);
6050 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : Paging Configuration ** \n");
6051 pageCfg = &sib1Cfg->pagingCfg;
6053 DU_LOG("Number of Paging Occassion %d\n", pageCfg->numPO);
6054 if (pageCfg->poPresent == true)
6055 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : TRUE\n");
6057 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : FALSE\n");
6059 for(pfIdx = 0; pfIdx < MAX_PO_PER_PF; pfIdx++)
6061 DU_LOG("Paging Occassion at Paging Frame [%d] : %d\n", pfIdx, pageCfg->pagingOcc[pfIdx]);
6064 pdcchConfigSib1 = &sib1Cfg->pdcchCfgSib1;
6065 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : PDCCH ** \n");
6066 DU_LOG("Coreset Zero Index %d\n", pdcchConfigSib1->coresetZeroIndex);
6067 DU_LOG("Search Space Zero Index %d\n", pdcchConfigSib1->searchSpaceZeroIndex);
6069 bwpDlCfg = &cellCfg->initialDlBwp;
6070 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP Configuration ** \n");
6072 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : BWP ** \n");
6073 bwp = &bwpDlCfg->bwp;
6074 DU_LOG("First PRB %d\n", bwp->firstPrb);
6075 DU_LOG("Number of PRBs %d\n", bwp->numPrb);
6076 DU_LOG("Subcarrier Spacing %d\n", bwp->scs);
6077 DU_LOG("Cyclic Perfix %d\n", bwp->cyclicPrefix);
6079 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common ** \n");
6080 pdcchCfgCmn = &bwpDlCfg->pdcchCommon;
6081 DU_LOG("RA Search Space ID %d\n", pdcchCfgCmn->raSearchSpaceId);
6083 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common : Search Space ** \n");
6084 searchSpaceCfg = &pdcchCfgCmn->commonSearchSpace;
6085 DU_LOG("Search Space ID %d\n", searchSpaceCfg->searchSpaceId);
6086 DU_LOG("Coreset ID %d\n", searchSpaceCfg->coresetId);
6087 DU_LOG("Monitoring Slot %d\n", searchSpaceCfg->monitoringSlot);
6088 DU_LOG("Duration %d\n", searchSpaceCfg->duration);
6089 DU_LOG("Monitoring Symbol %x\n", searchSpaceCfg->monitoringSymbol);
6091 candidateInfo = &searchSpaceCfg->candidate;
6092 DU_LOG("Number of Candidates in Aggregation Level_1 %d\n", candidateInfo->aggLevel1);
6093 DU_LOG("Number of Candidates in Aggregation Level_2 %d\n", candidateInfo->aggLevel2);
6094 DU_LOG("Number of Candidates in Aggregation Level_4 %d\n", candidateInfo->aggLevel4);
6095 DU_LOG("Number of Candidates in Aggregation Level_8 %d\n", candidateInfo->aggLevel8);
6096 DU_LOG("Number of Candidates in Aggregation Level_16 %d\n", candidateInfo->aggLevel16);
6098 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDSCH Config Common ** \n");
6099 pdschCfgCmn = &bwpDlCfg->pdschCommon;
6100 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCmn->numTimeDomAlloc);
6102 for (rsrcIdx = 0; rsrcIdx < pdschCfgCmn->numTimeDomAlloc; rsrcIdx++)
6104 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
6105 pdschCmnTimeDomRsrcAlloc = &pdschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
6106 DU_LOG("\tK0 %d\n", pdschCmnTimeDomRsrcAlloc->k0);
6107 DU_LOG("\tPDSCH Mapping Type %d\n", pdschCmnTimeDomRsrcAlloc->mappingType);
6108 DU_LOG("\tPDSCH Start Symbol %d\n", pdschCmnTimeDomRsrcAlloc->startSymbol);
6109 DU_LOG("\tPDSCH Symbol Length %d\n", pdschCmnTimeDomRsrcAlloc->lengthSymbol);
6112 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP Configuration ** \n");
6113 bwpUlCfg = &cellCfg->initialUlBwp;
6115 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : BWP ** \n");
6116 DU_LOG("First PRB %d\n", bwpUlCfg->bwp.firstPrb);
6117 DU_LOG("Number of PRBs %d\n", bwpUlCfg->bwp.numPrb);
6118 DU_LOG("Subcarrier Spacing %d\n", bwpUlCfg->bwp.scs);
6119 DU_LOG("Cyclic Prefix %d\n", bwpUlCfg->bwp.cyclicPrefix);
6121 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUCCH Config Common ** \n");
6122 pucchCfgCmn = &bwpUlCfg->pucchCommon;
6123 DU_LOG("PUCCH Resource Common %d\n", pucchCfgCmn->pucchResourceCommon);
6124 DU_LOG("Group Hopping %d\n", pucchCfgCmn->pucchGroupHopping);
6126 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUSCH Config Common ** \n");
6127 puschCfgCmn = &bwpUlCfg ->puschCommon;
6128 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCmn->numTimeDomRsrcAlloc);
6129 for (rsrcIdx = 0; rsrcIdx < puschCfgCmn->numTimeDomRsrcAlloc; rsrcIdx++)
6131 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
6132 puschTimeDomRsrcAlloc = &puschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
6133 DU_LOG("\tK2 %d\n", puschTimeDomRsrcAlloc->k2);
6134 DU_LOG("\tPUSCH Mapping Type %d\n", puschTimeDomRsrcAlloc->mappingType);
6135 DU_LOG("\tPUSCH Start Symbol %d\n", puschTimeDomRsrcAlloc->startSymbol);
6136 DU_LOG("\tPUSCH Symbol Length %d\n", puschTimeDomRsrcAlloc->symbolLength);
6137 DU_LOG("\tPUSCH Start Symbol And Length %d\n", puschTimeDomRsrcAlloc->startSymbolAndLength);
6140 DU_LOG("\n ** MAC Cell Configuration : SSB Configuration** \n");
6141 ssbCfg = &macCellCfg ->ssbCfg;
6142 DU_LOG("SSB PDCH Power %d\n", ssbCfg->ssbPbchPwr);
6143 DU_LOG("Subcarrier Spacing Common %d\n", ssbCfg->scsCmn);
6144 DU_LOG("SSB Offset from Point A %d\n", ssbCfg->ssbOffsetPointA);
6145 DU_LOG("SSB Periodicity in msec %d\n", ssbCfg->ssbPeriod);
6146 DU_LOG("SSB Subcarrier Offset %d\n", ssbCfg->ssbScOffset);
6147 for (ssbMaskIdx = 0; ssbMaskIdx < SSB_MASK_SIZE; ssbMaskIdx++)
6149 DU_LOG("SSB Mask[%d] :%d\n", ssbMaskIdx, ssbCfg->ssbMask[ssbMaskIdx]);
6151 DU_LOG("Beam ID %d\n", ssbCfg->beamId[0]);
6152 DU_LOG("BETA PSS %d\n", ssbCfg->betaPss);
6153 DU_LOG("BCH Payloag Flag %d\n", ssbCfg->bchPayloadFlag);
6154 DU_LOG("MIB PDU %d %d %d", ssbCfg->mibPdu[0], ssbCfg->mibPdu[1], ssbCfg->mibPdu[2]);
6155 DU_LOG("DMRS Type-A Position %d\n", ssbCfg->dmrsTypeAPos);
6157 DU_LOG("\n ** MAC Cell Configuration : CSI RS Configuration ** \n");
6158 csiRsCfg = &macCellCfg->csiRsCfg;
6159 DU_LOG("Frequency Domain Allocation %s\n", csiRsCfg->csiFreqDomainAlloc);
6160 DU_LOG("Number of Ports %d\n", csiRsCfg->csiNrofPorts);
6161 DU_LOG("First OFDM Symbol in Time Domain %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain);
6162 DU_LOG("First OFDM Symbol in Timer Domain 2 %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2);
6163 DU_LOG("CDM Type %d\n", csiRsCfg->csirscdmType);
6164 DU_LOG("Density %d\n", csiRsCfg->csirsdensity);
6165 DU_LOG("Density dot 5:%d\n", csiRsCfg->csirsdensitydot5);
6166 DU_LOG("Power Control Offset %d\n", csiRsCfg->powerControlOffset);
6167 DU_LOG("Power Control Offset Search Space %d\n", csiRsCfg->powerControlOffsetSS);
6168 DU_LOG("Periodicity And Offset %d\n", csiRsCfg->periodicityAndOffset);
6170 DU_LOG("\n ** MAC Cell Configuration : PRACH Configuration ** \n");
6171 prachCfg = &macCellCfg->prachCfg;
6172 DU_LOG("PRACH Sequence Length %d\n", prachCfg->prachSeqLen);
6173 DU_LOG("Subcarrier Spacing %d\n", prachCfg->prachSubcSpacing);
6174 DU_LOG("Number of PRACH FDM %d\n", prachCfg->msg1Fdm);
6175 DU_LOG("PRACH Configuration Index %d\n", prachCfg->prachCfgIdx);
6176 DU_LOG("PRACH Restricted Set Configuration %d\n", prachCfg->prachRstSetCfg);
6177 DU_LOG("Number of SSB per RACH occassion %d\n", prachCfg->ssbPerRach);
6178 DU_LOG("Number of RA preambles %d\n", prachCfg->totalNumRaPreamble);
6179 DU_LOG("Number of Contention Based Preamble per SSB %d\n", prachCfg->numCbPreamblePerSsb);
6180 DU_LOG("PRACH Frequeny Start Offset %d\n", prachCfg->msg1FreqStart);
6181 DU_LOG("RA Contention Resolution Timer %d\n", prachCfg->raContResTmr);
6182 DU_LOG("RSRP Threshold %d\n", prachCfg->rsrpThreshSsb);
6183 DU_LOG("RA Response Window %d\n", prachCfg->raRspWindow);
6184 for(fdmIdx = 0; fdmIdx < prachCfg->msg1Fdm; fdmIdx++)
6186 prachFdmInfo = &prachCfg->fdm[fdmIdx];
6187 DU_LOG("FDM[%d]\n", fdmIdx);
6188 DU_LOG("\tRoot Sequence Index %d\n", prachFdmInfo->rootSeqIdx);
6189 DU_LOG("\tNumber of Root Sequence %d\n", prachFdmInfo->numRootSeq);
6190 DU_LOG("\tK1 %d\n", prachFdmInfo->k1);
6191 DU_LOG("\tZero Correlation Zone Configuration %d\n", prachFdmInfo->zeroCorrZoneCfg);
6195 DU_LOG("\n ** MAC Cell Configuration : TDD Configuration ** \n");
6196 tddCfg = &macCellCfg->tddCfg;
6197 DU_LOG("TDD Slot Periodicity %d\n", tddCfg->tddPeriod);
6198 DU_LOG("Number of DL Slots %d\n", tddCfg->nrOfDlSlots);
6199 DU_LOG("Number of DL Symbols %d\n", tddCfg->nrOfDlSymbols);
6200 DU_LOG("Number of UL Slots %d\n", tddCfg->nrOfUlSlots);
6201 DU_LOG("Number of UL Symbols %d\n", tddCfg->nrOfUlSymbols);
6204 DU_LOG("\n ** MAC Cell Configuration : Precoding Configuration ** \n");
6205 precodCfg = &macCellCfg->precodingConf;
6206 DU_LOG("Number of Layers %d\n", precodCfg->numLayers);
6207 DU_LOG("Number of Antenna Ports %d\n", precodCfg->numAntPorts);
6209 DU_LOG("\n ** MAC Cell Config : BEAM FORMING CFG ** \n");
6210 beamFormingCfg = &macCellCfg ->beamCfg;
6211 DU_LOG("Number of Beams %d\n", beamFormingCfg->numOfBeams);
6212 DU_LOG("Number of Tx RUs %d\n", beamFormingCfg->numTxRUs);
6213 DU_LOG("Beam Index %d\n", beamFormingCfg->beamIdx);
6214 DU_LOG("Beam Type %d\n", beamFormingCfg->beamType);
6215 DU_LOG("Beam Azimuth %d\n", beamFormingCfg->beamAzimuth);
6216 DU_LOG("Beam Tilt %d\n", beamFormingCfg->beamTilt);
6217 DU_LOG("Beam Horizontal Width %d\n", beamFormingCfg->beamHorizWidth);
6218 DU_LOG("Beam Vertical Width %d\n", beamFormingCfg->beamVertWidth);
6219 DU_LOG("Coverage Shape %d\n", beamFormingCfg->coverageShape);
6220 DU_LOG("Digitak Tilt %d\n",beamFormingCfg ->digitalTilt);
6221 DU_LOG("Digital Azimuth %d\n", beamFormingCfg->digitalAzimuth);
6223 DU_LOG("\n ** SIB1 Configuration ** \n");
6224 sib1Params = &duCfgParam.sib1Params;
6225 DU_LOG("TAC %d\n", sib1Params->tac);
6226 DU_LOG("RANAC %ld\n", sib1Params->ranac);
6227 DU_LOG("Cell ID %d\n", sib1Params->cellIdentity);
6228 DU_LOG("Cell Reserved for Operational Use %ld\n", sib1Params->cellResvdForOpUse);
6229 DU_LOG("Connection Establishment Failure Count %ld\n", sib1Params->connEstFailCnt);
6230 DU_LOG("Connection Establishment Failure Offset Valid %ld\n", sib1Params->connEstFailOffValidity);
6231 DU_LOG("Connection Establishment Failure Offset %ld\n", sib1Params->connEstFailOffset);
6232 DU_LOG("PLMN : mcc[0] %d\n", sib1Params->plmn.mcc[0]);
6233 DU_LOG("PLMN : mcc[1] %d\n", sib1Params->plmn.mcc[1]);
6234 DU_LOG("PLMN : mcc[2] %d\n", sib1Params->plmn.mcc[2]);
6235 DU_LOG("PLMN : mnc[0] %d\n", sib1Params->plmn.mnc[0]);
6236 DU_LOG("PLMN : mnc[1] %d\n", sib1Params->plmn.mnc[1]);
6237 DU_LOG("PLMN : mnc[2] %d\n", sib1Params->plmn.mnc[2]);
6239 DU_LOG("\n ** SIB1 : SI Scheduling Info ** \n");
6240 siSchedInfo = &sib1Params ->siSchedInfo;
6241 DU_LOG("Windown Length %ld\n", siSchedInfo->winLen);
6242 DU_LOG("Broadcast Status %ld\n", siSchedInfo->broadcastSta);
6243 DU_LOG("Periodicity %ld\n", siSchedInfo->preiodicity);
6244 DU_LOG("SIB Type %ld\n", siSchedInfo->sibType);
6245 DU_LOG("SIB Value Tag %ld\n", siSchedInfo->sibValTag);
6247 DU_LOG("\n ** SIB1 : Serving Cell Configuration Common SIB ** \n");
6248 srvCellCfgCmnSib = &sib1Params->srvCellCfgCommSib;
6249 DU_LOG("Subcarrier Spacing %ld\n", srvCellCfgCmnSib->scs);
6250 DU_LOG("SSB Position in Burst %d\n", srvCellCfgCmnSib->ssbPosInBurst);
6251 DU_LOG("SSB Periodicity %ld\n", srvCellCfgCmnSib->ssbPrdServingCell);
6252 DU_LOG("SS PBCH Power %ld\n", srvCellCfgCmnSib->ssPbchBlockPwr);
6254 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common ** \n");
6255 dlCfgCmn = &srvCellCfgCmnSib->dlCfg;
6256 DU_LOG("Frequency Band Indicator %ld\n", dlCfgCmn->freqBandInd);
6257 DU_LOG("Offset to Point A %ld\n", dlCfgCmn->offsetToPointA);
6258 DU_LOG("Frequency Location And Bandwidth %ld\n", dlCfgCmn->locAndBw);
6259 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsOffset);
6260 DU_LOG("Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scs);
6261 DU_LOG("Bandwidth considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsBw);
6263 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common : PDCCH Config Common ** \n");
6264 pdcchCfgCommon = &dlCfgCmn->pdcchCfg;
6265 if(pdcchCfgCommon->present)
6267 DU_LOG("Control Resource Set Zero Index %ld\n", pdcchCfgCommon->ctrlRsrcSetZero);
6268 DU_LOG("Search Space Zero Index %ld\n", pdcchCfgCommon->searchSpcZero);
6269 DU_LOG("Search Space ID %ld\n", pdcchCfgCommon->searchSpcId);
6270 DU_LOG("Control Resource Set ID %ld\n", pdcchCfgCommon->ctrlRsrcSetId);
6271 DU_LOG("Monitoring Slot Periodicity and Offset Present %d\n", pdcchCfgCommon->monitorSlotPrdAndOffPresent);
6272 DU_LOG("Monitoring Slot Periodicity and Offset %ld\n", pdcchCfgCommon->monitorSlotPrdAndOff);
6273 for (monitoringSymbIdx = 0; monitoringSymbIdx < 2; monitoringSymbIdx++)
6275 DU_LOG("Monitoring Symbols in Slot [%d] %d\n",monitoringSymbIdx, pdcchCfgCommon->monitorSymbolsInSlot[monitoringSymbIdx]);
6277 DU_LOG("Number of Candidates for Aggregation Level_1 %ld\n", pdcchCfgCommon->numCandAggLvl1);
6278 DU_LOG("Number of Candidates for Aggregation Level_2 %ld\n", pdcchCfgCommon->numCandAggLvl2);
6279 DU_LOG("Number of Candidates for Aggregation Level_4 %ld\n", pdcchCfgCommon->numCandAggLvl4);
6280 DU_LOG("Number of Candidates for Aggregation Level_8 %ld\n", pdcchCfgCommon->numCandAggLvl8);
6281 DU_LOG("Number of Candidates for Aggregation Level_16 %ld\n", pdcchCfgCommon->numCandAggLvl16);
6282 DU_LOG("Seach Space Type %d\n", pdcchCfgCommon->searchSpcType);
6283 DU_LOG("Common Search Space DCI Format %d\n", pdcchCfgCommon->commSrchSpcDciFrmt);
6284 DU_LOG("SIB1 Search Space ID %ld\n", pdcchCfgCommon->searchSpcSib1);
6285 DU_LOG("Paging Search Space ID %ld\n", pdcchCfgCommon->pagingSearchSpc);
6286 DU_LOG("RA Search Space ID %ld\n", pdcchCfgCommon->raSearchSpc);
6290 DU_LOG("PDCCH Config Common not Present");
6293 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PDSCH Config Common ** \n");
6294 pdschCfgCommon = &dlCfgCmn->pdschCfg;
6295 DU_LOG("PDSCH Config Common Present %d\n", pdschCfgCommon->present);
6296 if(pdschCfgCommon->present)
6298 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCommon->numTimeDomRsrcAlloc);
6299 for (rsrcIdx = 0; rsrcIdx < pdschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
6301 pdschTimeDomRsrcAlloc = &pdschCfgCommon->timeDomAlloc[rsrcIdx];
6302 DU_LOG("PDSCH Timer Domain Resource Allocation [%d]", rsrcIdx);
6303 DU_LOG("K0 %ld\n", pdschTimeDomRsrcAlloc->k0);
6304 DU_LOG("MappingType %ld\n", pdschTimeDomRsrcAlloc->mapType);
6305 DU_LOG("SLIV %d\n", pdschTimeDomRsrcAlloc->sliv);
6310 DU_LOG("PDSCH Config Common not Present");
6313 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : BCCH Config Common ** \n");
6314 bcchCfg = &dlCfgCmn->bcchCfg;
6315 DU_LOG("Modification Period Coefficient %ld\n", bcchCfg->modPrdCoeff);
6317 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PCCH Config Common ** \n");
6318 pcchCfg = &dlCfgCmn->pcchCfg;
6319 DU_LOG("Default Paging Cycle %d\n", pcchCfg->dfltPagingCycle);
6320 DU_LOG("Number of PF in Paging Cycle %d\n", pcchCfg->nAndPagingFrmOffsetType);
6321 DU_LOG("PF Offset %d\n", pcchCfg->pageFrameOffset);
6322 DU_LOG("NS - Number of P0 in PF %d\n", pcchCfg->ns);
6323 DU_LOG("First PDCCH Monitoring Occassion of each P0 Type %d\n", pcchCfg->firstPDCCHMontioringType);
6324 for (poIdx = 0; poIdx < MAX_PO_PER_PF; poIdx++)
6326 DU_LOG("First PDCCH Monitoring Occassion in P0 [%d] %d\n", poIdx, pcchCfg->firstPDCCHMontioringInfo[poIdx]);
6329 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common ** \n");
6330 ulCfgCmn = &srvCellCfgCmnSib->ulCfg;
6331 DU_LOG("Frequency Band Indicator %ld\n", ulCfgCmn->freqBandInd);
6332 DU_LOG("Maximum Transmission Power %ld\n", ulCfgCmn->pMax);
6333 DU_LOG("Frequency Location and Bandwidth %ld\n", ulCfgCmn->locAndBw);
6334 DU_LOG("Time Alignment Timer %ld\n", ulCfgCmn->timeAlignTimerComm);
6335 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsOffset);
6336 DU_LOG("Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scs);
6337 DU_LOG("Carrier BW considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsBw);
6339 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : RACH Config Common ** \n");
6340 rachCfgCmn = &ulCfgCmn ->rachCfg;
6341 if(rachCfgCmn->present)
6343 DU_LOG("PRACH Configuration Index %ld\n", rachCfgCmn->prachCfgIdx);
6344 DU_LOG("Number of PRACH FDM %ld\n", rachCfgCmn->msg1Fdm);
6345 DU_LOG("PRACH Frequeny Start Offset %ld\n", rachCfgCmn->msg1FreqStart);
6346 DU_LOG("Zero Correaltion Zone Configuration %ld\n", rachCfgCmn->zeroCorrZoneCfg);
6347 DU_LOG("Target Power Level of Received Preamble %ld\n", rachCfgCmn->preambleRcvdTgtPwr);
6348 DU_LOG("Maximum number of Preamble Transmission %ld\n", rachCfgCmn->preambleTransMax);
6349 DU_LOG("Power Ramping Step %ld\n", rachCfgCmn->pwrRampingStep);
6350 DU_LOG("RA Response Window %ld\n", rachCfgCmn->raRspWindow);
6351 DU_LOG("Total Number of RA Preambles %ld\n", rachCfgCmn->numRaPreamble);
6352 DU_LOG("Number of SSB per RACH Occassion %ld\n", rachCfgCmn->numSsbPerRachOcc);
6353 DU_LOG("Number of Contention Based Preamble per SSB %ld\n", rachCfgCmn->numCbPreamblePerSsb);
6354 DU_LOG("Contention Resolution Timer %ld\n", rachCfgCmn->contResTimer);
6355 DU_LOG("RSRP Threshold %ld\n", rachCfgCmn->rsrpThreshSsb);
6356 DU_LOG("Root Sequence Index Present %d\n", rachCfgCmn->rootSeqIdxPresent);
6357 DU_LOG("Root Sequence Index %ld\n", rachCfgCmn->rootSeqIdx);
6358 DU_LOG("Subcarrier Spacing %ld\n", rachCfgCmn->msg1Scs);
6359 DU_LOG("Restricted Set Configuration %ld\n", rachCfgCmn->restrictedSetCfg);
6363 DU_LOG("RACH Config Common not present\n");
6366 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUSCH Config Common ** \n");
6367 puschCfgCommon = &ulCfgCmn ->puschCfg;
6368 if(puschCfgCommon->puschCfgPresent)
6370 DU_LOG("MSG3 Delta from RACH Preamble %ld\n", puschCfgCommon->msg3DeltaPreamble);
6371 DU_LOG("P0 Nominal With Grant %ld\n", puschCfgCommon->p0NominalWithGrant);
6372 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCommon->numTimeDomRsrcAlloc);
6373 for(rsrcIdx = 0; rsrcIdx < puschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
6375 puschCmnTimeDomRsrsAlloc = &puschCfgCommon ->timeDomAllocList[rsrcIdx];
6376 DU_LOG("Time Domain Resource Alloc [%d]", rsrcIdx);
6377 DU_LOG("\tK2 %ld\n", puschCmnTimeDomRsrsAlloc->k2);
6378 DU_LOG("\tMapping Type %ld\n", puschCmnTimeDomRsrsAlloc->mapType);
6379 DU_LOG("\tSLIV %d\n", puschCmnTimeDomRsrsAlloc->sliv);
6384 DU_LOG("PUSCH Config Common not present\n");
6387 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUCCH Config Common **\n");
6388 pucchCfgCommon = &ulCfgCmn->pucchCfg;
6389 if(pucchCfgCommon->present)
6391 DU_LOG("Resource Common %ld\n", pucchCfgCommon->rsrcComm);
6392 DU_LOG("Group Hopping %ld\n", pucchCfgCommon->grpHop);
6393 DU_LOG("P0 Nominal %ld\n", pucchCfgCommon->p0Nominal);
6397 DU_LOG("PUCCH Config Common not present\n");
6400 DU_LOG("\n ** SIB1 : Serving Cell Config Common : TDD UL DL Config Common ** \n");
6401 tddUlDlCfgCmn = &srvCellCfgCmnSib->tddCfg;
6402 DU_LOG("Reference Subcarrier Spacing %ld\n", tddUlDlCfgCmn->refScs);
6403 DU_LOG("Transmission Periodicity %ld\n", tddUlDlCfgCmn->txPrd);
6404 DU_LOG("Number of DL Slots %ld\n", tddUlDlCfgCmn->numDlSlots);
6405 DU_LOG("Number of DL Symbols %ld\n", tddUlDlCfgCmn->numDlSymbols);
6406 DU_LOG("Number of UL Slots %ld\n", tddUlDlCfgCmn->numUlSlots);
6407 DU_LOG("Number of UL Symbols %ld\n", tddUlDlCfgCmn->numUlSymbols);
6409 DU_LOG("\n ** MAC SLICE CONFIG REQUEST ** \n");
6410 macSliceCfg = &duCfgParam.tempSliceCfg;
6411 DU_LOG("Number of RRM Policy %d\n",macSliceCfg->numOfRrmPolicy);
6413 for(policyIdx = 0; policyIdx < macSliceCfg->numOfRrmPolicy; policyIdx++)
6415 rrmPolicy = macSliceCfg->listOfRrmPolicy[policyIdx];
6416 DU_LOG("RRM Policy [%d]\n", policyIdx);
6417 DU_LOG("\tResource Type %d\n", rrmPolicy->resourceType);
6419 rrmPolicyRatio = &rrmPolicy ->policyRatio;
6420 DU_LOG("\tPolicy Maximum Ratio %d\n", rrmPolicyRatio->maxRatio);
6421 DU_LOG("\tPolicy Minimum Ratio %d\n", rrmPolicyRatio->minRatio);
6422 DU_LOG("\tPolicy Deidcated Ration %d\n", rrmPolicyRatio->dedicatedRatio);
6423 DU_LOG("\tNumber of RRM Policy Member %d\n", rrmPolicy->numOfRrmPolicyMem);
6425 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
6427 rrmPolicyMemberList = rrmPolicy->rRMPolicyMemberList[memIdx];
6428 DU_LOG("\tRRM Policy Member [%d]\n", memIdx);
6429 DU_LOG("\t\tPLMN : mcc[0] %d\n", rrmPolicyMemberList->plmn.mcc[0]);
6430 DU_LOG("\t\tPLMN : mcc[1] %d\n", rrmPolicyMemberList->plmn.mcc[1]);
6431 DU_LOG("\t\tPLMN : mcc[2] %d\n", rrmPolicyMemberList->plmn.mcc[2]);
6432 DU_LOG("\t\tPLMN : mnc[0] %d\n", rrmPolicyMemberList->plmn.mnc[0]);
6433 DU_LOG("\t\tPLMN : mnc[1] %d\n", rrmPolicyMemberList->plmn.mnc[1]);
6434 DU_LOG("\t\tPLMN : mnc[2] %d\n", rrmPolicyMemberList->plmn.mnc[2]);
6435 DU_LOG("\t\tSST %d\n",rrmPolicyMemberList->snssai.sst);
6436 DU_LOG("\t\tSD %d %d %d\n",rrmPolicyMemberList->snssai.sd[0],rrmPolicyMemberList->snssai.sd[1],rrmPolicyMemberList->snssai.sd[2]);
6441 /**********************************************************************
6443 **********************************************************************/