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 #ifdef XML_BASED_CONFIG
23 #include <libxml/parser.h>
24 #include <libxml/tree.h>
25 #include <libxml/xmlmemory.h>
26 #include <arpa/inet.h>
34 #include "du_app_mac_inf.h"
35 #include "du_app_rlc_inf.h"
36 #include "du_e2ap_mgr.h"
40 #include "du_f1ap_conversions.h"
41 #include "OCTET_STRING.h"
42 #include "BIT_STRING.h"
43 #include "odu_common_codec.h"
45 #include "SearchSpace.h"
46 #include "SIB-TypeInfo.h"
47 #include "SchedulingInfo.h"
48 #include "SI-SchedulingInfo.h"
49 #include "ConnEstFailureControl.h"
50 #include "PLMN-IdentityInfo.h"
51 #include "PDSCH-TimeDomainResourceAllocation.h"
52 #include "BCCH-Config.h"
53 #include "PagingCycle.h"
54 #include "PCCH-Config.h"
55 #include "TimeAlignmentTimer.h"
56 #include "BCCH-DL-SCH-Message.h"
57 #include "RACH-ConfigGeneric.h"
58 #include "PUSCH-TimeDomainResourceAllocation.h"
59 #include "PUCCH-ConfigCommon.h"
60 #include "SubcarrierSpacing.h"
61 #include "TDD-UL-DL-Pattern.h"
62 #include "RACH-ConfigCommon.h"
63 #include "BWP-DownlinkCommon.h"
64 #include "BWP-UplinkCommon.h"
65 #include "TDD-UL-DL-ConfigCommon.h"
66 #include "du_sys_info_hdl.h"
69 #include "CmInterface.h"
70 extern StartupConfig g_cfg;
71 extern NRCellDU cellParams;
74 char encBuf[ENC_BUF_MAX_LEN];
77 /* Filling Slot configuration as :
78 * 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
79 * 0 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
80 * 1 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
81 * 2 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
82 3 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
83 4 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
84 5 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
85 6 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
86 7 DL DL DL DL DL DL DL DL DL DL DL DL F UL
87 8 UL UL UL UL UL UL UL UL UL UL UL UL UL UL
88 9 UL UL UL UL UL UL UL UL UL UL UL UL UL UL
91 /*******************************************************************
92 * @brief Reads the CL Configuration.
96 * Function : readMacCfg
99 * - Fills up the cell configuration for CL.
100 * - Calls FillSlotConfig()
103 * @return ROK - success
106 * ****************************************************************/
110 uint8_t idx=0, sliceIdx=0,plmnIdx = 0;
111 SupportedSliceList *taiSliceSuppLst;
113 /* DL carrier configuration */
115 duCfgParam.macCellCfg.cellId = cellParams.cellLocalId;
116 duCfgParam.macCellCfg.carrCfg.dlBw = cellParams.bSChannelBwDL;
117 duCfgParam.macCellCfg.carrCfg.arfcnDL = cellParams.arfcnDL;
119 duCfgParam.macCellCfg.cellId = NR_CELL_ID;
120 duCfgParam.macCellCfg.carrCfg.dlBw = NR_BANDWIDTH;
121 duCfgParam.macCellCfg.carrCfg.arfcnDL = NR_DL_ARFCN;
123 duCfgParam.macCellCfg.carrCfg.numTxAnt = NUM_TX_ANT;
124 /* UL Carrier configuration */
126 duCfgParam.macCellCfg.carrCfg.ulBw = cellParams.bSChannelBwUL;
127 duCfgParam.macCellCfg.carrCfg.arfcnUL = cellParams.arfcnUL;
129 duCfgParam.macCellCfg.carrCfg.ulBw = NR_BANDWIDTH;
130 duCfgParam.macCellCfg.carrCfg.arfcnUL = NR_UL_ARFCN;
132 duCfgParam.macCellCfg.carrCfg.numRxAnt = NUM_RX_ANT;
134 /* Cell configuration */
136 duCfgParam.macCellCfg.cellCfg.opState = cellParams.operationalState;
137 duCfgParam.macCellCfg.cellCfg.adminState = cellParams.administrativeState;
138 duCfgParam.macCellCfg.cellCfg.cellState = cellParams.cellState;
139 duCfgParam.macCellCfg.cellCfg.phyCellId = cellParams.nRPCI;
140 duCfgParam.macCellCfg.cellCfg.tac = cellParams.nRTAC;
141 duCfgParam.macCellCfg.cellCfg.ssbFreq = cellParams.ssbFrequency;
143 duCfgParam.macCellCfg.cellCfg.opState = OP_DISABLED;
144 duCfgParam.macCellCfg.cellCfg.adminState = ADMIN_UNLOCKED;
145 duCfgParam.macCellCfg.cellCfg.cellState = CELL_INACTIVE;
146 duCfgParam.macCellCfg.cellCfg.phyCellId = NR_PCI;
147 duCfgParam.macCellCfg.cellCfg.tac = DU_TAC;
148 duCfgParam.macCellCfg.cellCfg.ssbFreq = SSB_FREQUENCY;
150 /* Plmn And SNSSAI Configuration */
151 for(plmnIdx = 0; plmnIdx < MAX_PLMN; plmnIdx++)
153 memcpy(&duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].plmn, &duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[plmnIdx].plmn,\
155 taiSliceSuppLst = &duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[plmnIdx].taiSliceSuppLst;
156 duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.numSupportedSlices = taiSliceSuppLst->numSupportedSlices;
157 if(taiSliceSuppLst->snssai)
159 DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai, (duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.numSupportedSlices) * sizeof(Snssai*));
160 if(duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai == NULLP)
162 DU_LOG("\nERROR --> DU_APP: Memory allocation failed at readMacCfg");
166 for(sliceIdx=0; sliceIdx < taiSliceSuppLst->numSupportedSlices; sliceIdx++)
168 if(taiSliceSuppLst->snssai[sliceIdx] != NULLP)
170 DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx], sizeof(Snssai));
171 if(duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx] == NULLP)
173 DU_LOG("\nERROR --> DU_APP: Memory allocation failed at readMacCfg");
176 memcpy(duCfgParam.macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx], taiSliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
180 duCfgParam.macCellCfg.cellCfg.subCarrSpacing = NR_SCS;
181 duCfgParam.macCellCfg.cellCfg.dupType = DUPLEX_MODE;
183 /* SSB configuration */
184 duCfgParam.macCellCfg.ssbCfg.ssbPbchPwr = SSB_PBCH_PWR;
185 duCfgParam.macCellCfg.ssbCfg.bchPayloadFlag = BCH_PAYLOAD;
186 duCfgParam.macCellCfg.ssbCfg.ssbOffsetPointA = OFFSET_TO_POINT_A;
187 duCfgParam.macCellCfg.ssbCfg.betaPss = BETA_PSS;
189 duCfgParam.macCellCfg.ssbCfg.scsCmn = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
190 duCfgParam.macCellCfg.ssbCfg.ssbPeriod = convertSSBPeriodicityToEnum(cellParams.ssbPeriodicity);
191 duCfgParam.macCellCfg.ssbCfg.ssbScOffset = cellParams.ssbOffset;
193 duCfgParam.macCellCfg.ssbCfg.scsCmn = NR_SCS;
194 duCfgParam.macCellCfg.ssbCfg.ssbPeriod = SSB_PRDCTY_MS_20;
195 duCfgParam.macCellCfg.ssbCfg.ssbScOffset = SSB_SUBCARRIER_OFFSET;
197 duCfgParam.macCellCfg.ssbCfg.ssbMask[0] = 1; /* only one SSB is transmitted */
198 if(BuildMibPdu() != ROK)
200 DU_LOG("\nERROR --> Failed to build MIB PDU");
201 memset(&duCfgParam.macCellCfg.ssbCfg.mibPdu, 0, 3*sizeof(uint8_t));
205 memcpy(&duCfgParam.macCellCfg.ssbCfg.mibPdu, encBuf,encBufSize);
208 /* PRACH configuration */
209 duCfgParam.macCellCfg.prachCfg.prachSeqLen = PRACH_SEQ_LEN;
210 duCfgParam.macCellCfg.prachCfg.prachSubcSpacing = convertScsEnumValToScsVal(PRACH_SUBCARRIER_SPACING);
211 duCfgParam.macCellCfg.prachCfg.prachCfgIdx = PRACH_CONFIG_IDX;
212 duCfgParam.macCellCfg.prachCfg.msg1Fdm = NUM_PRACH_FDM;
213 duCfgParam.macCellCfg.prachCfg.fdm[0].rootSeqIdx = ROOT_SEQ_IDX;
214 duCfgParam.macCellCfg.prachCfg.fdm[0].numRootSeq = NUM_ROOT_SEQ;
215 duCfgParam.macCellCfg.prachCfg.fdm[0].k1 = 0;
216 duCfgParam.macCellCfg.prachCfg.fdm[0].zeroCorrZoneCfg = ZERO_CORRELATION_ZONE_CFG;
217 duCfgParam.macCellCfg.prachCfg.prachRstSetCfg = PRACH_RESTRICTED_SET_CFG;
218 duCfgParam.macCellCfg.prachCfg.ssbPerRach = SSB_PER_RACH;
219 duCfgParam.macCellCfg.prachCfg.msg1FreqStart = PRACH_FREQ_START;
221 duCfgParam.macCellCfg.prachCfg.totalNumRaPreamble = NUM_RA_PREAMBLE;
222 duCfgParam.macCellCfg.prachCfg.numCbPreamblePerSsb = CB_PREAMBLE_PER_SSB;
223 duCfgParam.macCellCfg.prachCfg.raRspWindow = RA_RSP_WINDOW;
225 /* TDD configuration */
227 duCfgParam.macCellCfg.tddCfg.tddPeriod = TDD_PERIODICITY;
228 duCfgParam.macCellCfg.tddCfg.nrOfDlSlots = NUM_DL_SLOTS;
229 duCfgParam.macCellCfg.tddCfg.nrOfDlSymbols = NUM_DL_SYMBOLS;
230 duCfgParam.macCellCfg.tddCfg.nrOfUlSlots = NUM_UL_SLOTS;
231 duCfgParam.macCellCfg.tddCfg.nrOfUlSymbols = NUM_UL_SYMBOLS;
237 /* fill SIB1 configuration */
238 duCfgParam.macCellCfg.cellCfg.sib1Cfg.sib1PduLen = duCfgParam.srvdCellLst[0].duSysInfo.sib1Len;
239 DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.cellCfg.sib1Cfg.sib1Pdu,duCfgParam.srvdCellLst[0].duSysInfo.sib1Len);
240 memcpy(duCfgParam.macCellCfg.cellCfg.sib1Cfg.sib1Pdu, duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg, \
241 duCfgParam.srvdCellLst[0].duSysInfo.sib1Len);
242 duCfgParam.macCellCfg.cellCfg.sib1Cfg.pdcchCfgSib1.coresetZeroIndex = CORESET_0_INDEX;
243 duCfgParam.macCellCfg.cellCfg.sib1Cfg.pdcchCfgSib1.searchSpaceZeroIndex = SEARCHSPACE_0_INDEX;
245 duCfgParam.macCellCfg.cellCfg.sib1Cfg.pagingCfg.numPO = duCfgParam.sib1Params.srvCellCfgCommSib.dlCfg.pcchCfg.ns;
246 if((duCfgParam.sib1Params.srvCellCfgCommSib.dlCfg.pcchCfg.firstPDCCHMontioringType != \
247 PCCH_Config__firstPDCCH_MonitoringOccasionOfPO_PR_NOTHING) && (duCfgParam.macCellCfg.cellCfg.sib1Cfg.pagingCfg.numPO != 0))
249 duCfgParam.macCellCfg.cellCfg.sib1Cfg.pagingCfg.poPresent = TRUE;
250 memcpy(duCfgParam.macCellCfg.cellCfg.sib1Cfg.pagingCfg.pagingOcc,
251 duCfgParam.sib1Params.srvCellCfgCommSib.dlCfg.pcchCfg.firstPDCCHMontioringInfo,MAX_PO_PER_PF);
255 duCfgParam.macCellCfg.cellCfg.sib1Cfg.pagingCfg.poPresent = FALSE;
258 /* fill Intial DL BWP */
259 duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.firstPrb = 0;
260 duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.numPrb = TOTAL_PRB_20MHZ_MU0; /* configured to total BW */
261 duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.scs = duCfgParam.macCellCfg.ssbCfg.scsCmn;
262 duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX;
263 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.searchSpaceId = SEARCHSPACE_1_INDEX;
264 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.coresetId = CORESET_0_INDEX;
265 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSlot =
266 SS_MONITORING_SLOT_SL1; /* sl1 - all slots */
267 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.duration = 0;
268 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSymbol =
269 SS_MONITORING_SYMBOL;
270 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
271 candidate.aggLevel1 = 8;
272 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
273 candidate.aggLevel2 = 4;
274 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
275 candidate.aggLevel4 = 2;
276 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
277 candidate.aggLevel8 = 1;
278 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
279 candidate.aggLevel16 = 0;
281 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.numTimeDomAlloc = NUM_TIME_DOM_RSRC_ALLOC;
283 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].k0 = PDSCH_K0_CFG1;
284 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].mappingType =
285 PDSCH_MAPPING_TYPE_A;
286 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].startSymbol =
288 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].lengthSymbol =
292 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].k0 = PDSCH_K0_CFG2;
293 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].mappingType =
294 PDSCH_MAPPING_TYPE_A;
295 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].startSymbol =
297 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].lengthSymbol =
300 /* ra-searchSpace ID is set to 1 */
301 duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.raSearchSpaceId = SEARCHSPACE_1_INDEX;
303 /* fill Intial UL BWP */
304 duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.firstPrb = 0;
305 duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.numPrb = TOTAL_PRB_20MHZ_MU0; /* configured to total BW */
306 duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.scs = duCfgParam.macCellCfg.ssbCfg.scsCmn;
307 duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX;
308 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.numTimeDomRsrcAlloc = 2;
309 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].k2 = PUSCH_K2_CFG1;
310 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].mappingType =
311 PUSCH_MAPPING_TYPE_A;
312 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].startSymbol =
314 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].symbolLength =
317 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].k2 = PUSCH_K2_CFG2;
318 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].mappingType =
319 PUSCH_MAPPING_TYPE_A;
320 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].startSymbol =
322 duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].symbolLength =
325 duCfgParam.macCellCfg.ssbCfg.dmrsTypeAPos = DMRS_TYPE_A_POS;
327 /* fill PUCCH config common */
328 duCfgParam.macCellCfg.cellCfg.initialUlBwp.pucchCommon.pucchResourceCommon = PUCCH_RSRC_COMMON;
329 duCfgParam.macCellCfg.cellCfg.initialUlBwp.pucchCommon.pucchGroupHopping = PUCCH_GROUP_HOPPING;
334 /*Note: Static Configuration, when O1 is not configuring the RRM policy*/
335 RrmPolicyList rrmPolicy;
337 rrmPolicy.resourceType = PRB;
338 rrmPolicy.rRMMemberNum = 1;
339 memcpy(rrmPolicy.rRMPolicyMemberList[0].mcc,duCfgParam.macCellCfg.cellCfg.plmnInfoList[0].plmn.mcc, 3*sizeof(uint8_t));
340 memcpy(rrmPolicy.rRMPolicyMemberList[0].mnc,duCfgParam.macCellCfg.cellCfg.plmnInfoList[0].plmn.mnc, 3*sizeof(uint8_t));
341 rrmPolicy.rRMPolicyMemberList[0].sst = 1;
342 rrmPolicy.rRMPolicyMemberList[0].sd[0] = 2;
343 rrmPolicy.rRMPolicyMemberList[0].sd[1] = 3;
344 rrmPolicy.rRMPolicyMemberList[0].sd[2] = 4;
345 rrmPolicy.rRMPolicyMaxRatio = 90;
346 rrmPolicy.rRMPolicyMinRatio = 30;
347 rrmPolicy.rRMPolicyDedicatedRatio = 10;
349 cpyRrmPolicyInDuCfgParams(&rrmPolicy, 1, &duCfgParam.tempSliceCfg);
356 /*******************************************************************
358 * @brief Configures the DU Parameters
362 * Function : fillDuPort
365 * - fills the DU Ports.
367 * @params[in] duPort array to be filled
368 * @return ROK - success
371 * ****************************************************************/
372 uint8_t fillDuPort(uint16_t *duPort)
376 duPort[F1_INTERFACE] = g_cfg.DU_Port;
377 duPort[E2_INTERFACE] = g_cfg.RIC_Port;
379 duPort[F1_INTERFACE] = F1_SCTP_PORT; /* DU Port idx 0 38472 */
380 duPort[E2_INTERFACE] = E2_SCTP_PORT; /* RIC Port idx 1 36421 */
385 /*******************************************************************
387 * @brief Configures the DU Parameters
391 * Function : calcSliv
394 * - calculate SLIV value from start and length field
396 * @params[in] start symbol
397 * @params[in] length of symbols
400 * ****************************************************************/
401 uint16_t calcSliv(uint8_t startSymbol, uint8_t lengthSymbol)
404 if((lengthSymbol-1) <= 7)
406 sliv = NUM_SYMBOLS_PER_SLOT * (lengthSymbol-1) + startSymbol;
410 sliv = NUM_SYMBOLS_PER_SLOT * (NUM_SYMBOLS_PER_SLOT - lengthSymbol + 1) \
411 + (NUM_SYMBOLS_PER_SLOT - 1 - startSymbol);
417 /*******************************************************************
419 * @brief Configures serving cell config common in sib1
423 * Function : fillServCellCfgCommSib
426 * - fills Serving cell config common for SIB1
428 * @params[in] SrvCellCfgCommSib pointer
429 * @return ROK - success
432 ** ****************************************************************/
433 uint8_t fillServCellCfgCommSib(SrvCellCfgCommSib *srvCellCfgComm)
435 PdcchCfgCommon pdcchCfg;
436 PdschCfgCommon pdschCfg;
438 RachCfgCommon rachCfg;
439 PuschCfgCommon puschCfg;
440 PucchCfgCommon pucchCfg;
441 TddUlDlCfgCommon tddCfg;
444 srvCellCfgComm->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
446 srvCellCfgComm->scs = NR_SCS;
449 /* Configuring DL Config Common for SIB1*/
450 srvCellCfgComm->dlCfg.freqBandInd = NR_FREQ_BAND;
451 srvCellCfgComm->dlCfg.offsetToPointA = OFFSET_TO_POINT_A;
453 srvCellCfgComm->dlCfg.dlScsCarrier.scsOffset = cellParams.ssbOffset;
454 srvCellCfgComm->dlCfg.dlScsCarrier.scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
455 srvCellCfgComm->dlCfg.dlScsCarrier.scsBw = cellParams.bSChannelBwUL;
457 srvCellCfgComm->dlCfg.dlScsCarrier.scsOffset = SSB_SUBCARRIER_OFFSET;
458 srvCellCfgComm->dlCfg.dlScsCarrier.scs = NR_SCS;
459 srvCellCfgComm->dlCfg.dlScsCarrier.scsBw = NR_BANDWIDTH;
461 srvCellCfgComm->dlCfg.locAndBw = FREQ_LOC_BW;
463 /* Configuring PDCCH Config Common For SIB1 */
464 pdcchCfg.present = BWP_DownlinkCommon__pdcch_ConfigCommon_PR_setup;
465 pdcchCfg.ctrlRsrcSetZero = CORESET_0_INDEX;
466 pdcchCfg.searchSpcZero = SEARCHSPACE_0_INDEX;
467 pdcchCfg.searchSpcId = PDCCH_SEARCH_SPACE_ID;
468 pdcchCfg.ctrlRsrcSetId = PDCCH_CTRL_RSRC_SET_ID;
469 pdcchCfg.monitorSlotPrdAndOffPresent = SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1;
470 //pdcchCfg.monitorSlotPrdAndOff = \
471 SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1;
472 pdcchCfg.monitorSymbolsInSlot[0] = 128;
473 pdcchCfg.monitorSymbolsInSlot[1] = 0;
474 pdcchCfg.numCandAggLvl1 = SearchSpace__nrofCandidates__aggregationLevel1_n8;
475 pdcchCfg.numCandAggLvl2 = SearchSpace__nrofCandidates__aggregationLevel2_n4;
476 pdcchCfg.numCandAggLvl4 = SearchSpace__nrofCandidates__aggregationLevel4_n2;
477 pdcchCfg.numCandAggLvl8 = SearchSpace__nrofCandidates__aggregationLevel8_n1;
478 pdcchCfg.numCandAggLvl16 = SearchSpace__nrofCandidates__aggregationLevel16_n0;
479 pdcchCfg.searchSpcType = SearchSpace__searchSpaceType_PR_common;
480 pdcchCfg.commSrchSpcDciFrmt = PDCCH_SERACH_SPACE_DCI_FORMAT;
481 pdcchCfg.searchSpcSib1 = PDCCH_SEARCH_SPACE_ID_SIB1;
482 pdcchCfg.pagingSearchSpc = PDCCH_SEARCH_SPACE_ID_PAGING;
483 pdcchCfg.raSearchSpc = PDCCH_SEARCH_SPACE_ID_PAGING;
484 srvCellCfgComm->dlCfg.pdcchCfg = pdcchCfg;
486 /* Configuring PDSCH Config Common For SIB1 */
487 pdschCfg.present = BWP_DownlinkCommon__pdsch_ConfigCommon_PR_setup;
488 pdschCfg.numTimeDomRsrcAlloc = 2;
489 pdschCfg.timeDomAlloc[0].k0 = PDSCH_K0_CFG1;
490 pdschCfg.timeDomAlloc[0].mapType = PDSCH_TimeDomainResourceAllocation__mappingType_typeA;
491 pdschCfg.timeDomAlloc[0].sliv = calcSliv(PDSCH_START_SYMBOL,PDSCH_LENGTH_SYMBOL);
493 pdschCfg.timeDomAlloc[1].k0 = PDSCH_K0_CFG2;
494 pdschCfg.timeDomAlloc[1].mapType = PDSCH_TimeDomainResourceAllocation__mappingType_typeA;
495 pdschCfg.timeDomAlloc[1].sliv = calcSliv(PDSCH_START_SYMBOL,PDSCH_LENGTH_SYMBOL);
497 srvCellCfgComm->dlCfg.pdschCfg = pdschCfg;
499 /* Configuring BCCH Config for SIB1 */
500 srvCellCfgComm->dlCfg.bcchCfg.modPrdCoeff = BCCH_Config__modificationPeriodCoeff_n16;
502 /* Configuring PCCH Config for SIB1 */
503 pcchCfg.dfltPagingCycle = convertPagingCycleEnumToValue(PagingCycle_rf256);
504 pcchCfg.nAndPagingFrmOffsetType = PCCH_Config__nAndPagingFrameOffset_PR_oneT;
505 pcchCfg.pageFrameOffset = 0;
506 pcchCfg.ns = convertNsEnumToValue(PCCH_Config__ns_one);
507 pcchCfg.firstPDCCHMontioringType = PCCH_Config__firstPDCCH_MonitoringOccasionOfPO_PR_sCS30KHZoneT_SCS15KHZhalfT;
508 memset(pcchCfg.firstPDCCHMontioringInfo, 0, sizeof(uint16_t));
509 pcchCfg.firstPDCCHMontioringInfo[0] = 44;
511 srvCellCfgComm->dlCfg.pcchCfg = pcchCfg;
514 /* Configuring UL Config Common */
516 srvCellCfgComm->ulCfg.ulScsCarrier.scsOffset = cellParams.ssbOffset;
517 srvCellCfgComm->ulCfg.ulScsCarrier.scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
518 srvCellCfgComm->ulCfg.ulScsCarrier.scsBw = cellParams.bSChannelBwUL;
520 srvCellCfgComm->ulCfg.ulScsCarrier.scsOffset = SSB_SUBCARRIER_OFFSET;
521 srvCellCfgComm->ulCfg.ulScsCarrier.scs = NR_SCS;
522 srvCellCfgComm->ulCfg.ulScsCarrier.scsBw = NR_BANDWIDTH;
524 srvCellCfgComm->ulCfg.freqBandInd = NR_FREQ_BAND;
525 srvCellCfgComm->ulCfg.pMax = UL_P_MAX;
526 srvCellCfgComm->ulCfg.locAndBw = FREQ_LOC_BW;
527 srvCellCfgComm->ulCfg.timeAlignTimerComm = TimeAlignmentTimer_infinity;
529 /* Configuring RACH Config Common for SIB1 */
530 rachCfg.present = BWP_UplinkCommon__rach_ConfigCommon_PR_setup;
531 rachCfg.prachCfgIdx = PRACH_CONFIG_IDX;
532 rachCfg.msg1Fdm = RACH_ConfigGeneric__msg1_FDM_one;
533 rachCfg.msg1FreqStart = PRACH_FREQ_START;
534 rachCfg.zeroCorrZoneCfg = ZERO_CORRELATION_ZONE_CFG;
535 rachCfg.preambleRcvdTgtPwr = PRACH_PREAMBLE_RCVD_TGT_PWR;
536 rachCfg.preambleTransMax = RACH_ConfigGeneric__preambleTransMax_n200;
537 rachCfg.pwrRampingStep = RACH_ConfigGeneric__powerRampingStep_dB2;
538 rachCfg.raRspWindow = RACH_ConfigGeneric__ra_ResponseWindow_sl10;
539 rachCfg.numRaPreamble = NUM_RA_PREAMBLE;
540 rachCfg.numSsbPerRachOcc = RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_one;
541 rachCfg.numCbPreamblePerSsb = CB_PREAMBLE_PER_SSB;
542 rachCfg.contResTimer = RACH_ConfigCommon__ra_ContentionResolutionTimer_sf64;
543 rachCfg.rsrpThreshSsb = RSRP_THRESHOLD_SSB;
544 rachCfg.rootSeqIdxPresent = RACH_ConfigCommon__prach_RootSequenceIndex_PR_l139;
545 rachCfg.rootSeqIdx = ROOT_SEQ_IDX;
546 rachCfg.msg1Scs = PRACH_SUBCARRIER_SPACING ;
547 rachCfg.restrictedSetCfg = PRACH_RESTRICTED_SET_CFG;
548 srvCellCfgComm->ulCfg.rachCfg = rachCfg;
550 /* Configuring PUSCH Config Common for SIB1 */
551 puschCfg.puschCfgPresent = BWP_UplinkCommon__pusch_ConfigCommon_PR_setup;
552 puschCfg.numTimeDomRsrcAlloc = 2;
553 puschCfg.timeDomAllocList[0].k2 = PUSCH_K2_CFG1;
554 puschCfg.timeDomAllocList[0].mapType = PUSCH_TimeDomainResourceAllocation__mappingType_typeA;
555 puschCfg.timeDomAllocList[0].sliv = calcSliv(PUSCH_START_SYMBOL,PUSCH_LENGTH_SYMBOL);
556 puschCfg.timeDomAllocList[1].k2 = PUSCH_K2_CFG2;
557 puschCfg.timeDomAllocList[1].mapType = PUSCH_TimeDomainResourceAllocation__mappingType_typeA;
558 puschCfg.timeDomAllocList[1].sliv = calcSliv(PUSCH_START_SYMBOL,PUSCH_LENGTH_SYMBOL);
559 puschCfg.msg3DeltaPreamble = PUSCH_MSG3_DELTA_PREAMBLE;
560 puschCfg.p0NominalWithGrant = PUSCH_P0_NOMINAL_WITH_GRANT;
561 srvCellCfgComm->ulCfg.puschCfg = puschCfg;
563 /* Configuring PUCCH Config Common for SIB1 */
564 pucchCfg.present = BWP_UplinkCommon__pucch_ConfigCommon_PR_setup;
565 pucchCfg.rsrcComm = PUCCH_RSRC_COMMON;
566 pucchCfg.grpHop = PUCCH_ConfigCommon__pucch_GroupHopping_neither;
567 pucchCfg.p0Nominal = PUCCH_P0_NOMINAL;
568 srvCellCfgComm->ulCfg.pucchCfg = pucchCfg;
570 /* Configuring TDD UL DL config common */
571 tddCfg.refScs = SubcarrierSpacing_kHz30;
572 tddCfg.txPrd = TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms5;
573 tddCfg.numDlSlots = NUM_DL_SLOTS;
574 tddCfg.numDlSymbols = NUM_DL_SYMBOLS;
575 tddCfg.numUlSlots = NUM_UL_SLOTS;
576 tddCfg.numUlSymbols = NUM_UL_SYMBOLS;
577 srvCellCfgComm->tddCfg = tddCfg;
579 srvCellCfgComm->ssbPosInBurst = 192;
580 srvCellCfgComm->ssbPrdServingCell = SSB_PERIODICITY;
581 srvCellCfgComm->ssPbchBlockPwr = SSB_PBCH_PWR;
586 /*******************************************************************
588 * @brief Configures the DU Parameters
595 * - Initializes the DuCfg members.
596 * - Calls readMacCfg()
598 * @params[in] system task ID
599 * @return ROK - success
602 * ****************************************************************/
607 uint8_t srvdCellIdx, bandIdx, sliceIdx, plmnIdx, ranFuncIdx, eventTriggerStyleIdx, reportStyleIdx, tnlAssocIdx;
608 uint8_t brdcstPlmnIdx, freqBandIdx, srvdPlmnIdx;
609 uint32_t ipv4_du, ipv4_cu, ipv4_ric;
612 SupportedSliceList *taiSliceSuppLst;
613 uint8_t measurementInfoIdx =0, measurementInfoLen=0;
614 char shortName[] = SHORT_NAME;
615 char serviceModelOID[]= SERVICE_MODEL_OID;
616 char description[] = DESCRIPTION;
617 char event_trigger_style_name[]= EVENT_TRIGGER_STYLE_NAME;
618 char ric_report_style_name[]= REPORT_STYLE_NAME;
621 /* Note: Added these below variable for local testing*/
622 Snssai snssai[NUM_OF_SUPPORTED_SLICE] = {{1,{2,3,4}},{5,{6,7,8}}};
629 if( getStartupConfig(&g_cfg) != ROK )
633 cmInetAddr((S8*)g_cfg.DU_IPV4_Addr, &ipv4_du);
634 cmInetAddr((S8*)g_cfg.CU_IPV4_Addr, &ipv4_cu);
635 cmInetAddr((S8*)g_cfg.RIC_IPV4_Addr, &ipv4_ric);
637 duCfgParam.sctpParams.cuPort = g_cfg.CU_Port;
638 duCfgParam.sctpParams.ricPort = g_cfg.RIC_Port;
640 cmInetAddr((S8*)DU_IP_V4_ADDR, &ipv4_du);
641 cmInetAddr((S8*)CU_IP_V4_ADDR, &ipv4_cu);
642 cmInetAddr((S8*)RIC_IP_V4_ADDR, &ipv4_ric);
644 duCfgParam.sctpParams.cuPort = F1_SCTP_PORT;
645 duCfgParam.sctpParams.ricPort = E2_SCTP_PORT;
648 fillDuPort(duCfgParam.sctpParams.duPort);
650 /* F1 DU IP Address and Port*/
651 duCfgParam.sctpParams.duIpAddr.ipV4Addr = ipv4_du;
653 /* F1 CU IP Address and Port*/
654 duCfgParam.sctpParams.cuIpAddr.ipV4Addr = ipv4_cu;
656 /* Fill RIC Params */
657 duCfgParam.sctpParams.ricIpAddr.ipV4Addr = ipv4_ric;
659 /* EGTP Parameters */
660 duCfgParam.egtpParams.localIp.ipV4Pres = TRUE;
661 duCfgParam.egtpParams.localIp.ipV4Addr = ipv4_du;
662 duCfgParam.egtpParams.localPort = F1_EGTP_PORT;
663 duCfgParam.egtpParams.destIp.ipV4Pres = TRUE;
664 duCfgParam.egtpParams.destIp.ipV4Addr = ipv4_cu;
665 duCfgParam.egtpParams.destPort = F1_EGTP_PORT;
666 duCfgParam.egtpParams.minTunnelId = MIN_TEID;
667 duCfgParam.egtpParams.maxTunnelId = MAX_TEID;
669 duCfgParam.maxUe = 32; //TODO: Check
672 duCfgParam.duId = DU_ID;
673 DU_ALLOC(duCfgParam.duName, sizeof(DU_NAME));
674 if(!duCfgParam.duName)
676 DU_LOG("\nDEBUG --> DU_APP: readCfg(): Memory allocation failure for DU name");
679 strcpy((char*)duCfgParam.duName,DU_NAME);
681 memset(&duCb.e2apDb, 0, sizeof(E2apDb));
682 duCb.e2apDb.e2NodeId = DU_ID;
683 duCb.e2apDb.e2TransInfo.transIdCounter = 0;
685 duCb.e2apDb.numOfTNLAssoc = 1;
686 for(tnlAssocIdx =0; tnlAssocIdx<duCb.e2apDb.numOfTNLAssoc; tnlAssocIdx++)
688 duCb.e2apDb.tnlAssoc[tnlAssocIdx].localIpAddress.ipV4Pres = duCfgParam.sctpParams.duIpAddr.ipV4Pres;
689 duCb.e2apDb.tnlAssoc[tnlAssocIdx].localIpAddress.ipV4Addr = duCfgParam.sctpParams.duIpAddr.ipV4Addr;
690 duCb.e2apDb.tnlAssoc[tnlAssocIdx].localPort = duCfgParam.sctpParams.duPort[E2_INTERFACE];
691 duCb.e2apDb.tnlAssoc[tnlAssocIdx].destIpAddress.ipV4Pres = duCfgParam.sctpParams.ricIpAddr.ipV4Pres;
692 duCb.e2apDb.tnlAssoc[tnlAssocIdx].destIpAddress.ipV4Addr = duCfgParam.sctpParams.ricIpAddr.ipV4Addr;
693 duCb.e2apDb.tnlAssoc[tnlAssocIdx].destPort = duCfgParam.sctpParams.ricPort;
694 duCb.e2apDb.tnlAssoc[tnlAssocIdx].usage = BOTH_FUNCTIONALITY;
696 duCb.e2apDb.numOfRanFunction = 1;
697 for(ranFuncIdx =0; ranFuncIdx<duCb.e2apDb.numOfRanFunction; ranFuncIdx++)
699 duCb.e2apDb.ranFunction[ranFuncIdx].id = ranFuncIdx + 1;
700 memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.shortName, shortName, sizeof(shortName));
701 memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.serviceModelOID, serviceModelOID, sizeof(serviceModelOID));
702 memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.description, description, sizeof(description));
703 duCb.e2apDb.ranFunction[ranFuncIdx].revisionCounter = 0;
705 duCb.e2apDb.ranFunction[ranFuncIdx].numOfEventTriggerStyleSupported = NUM_OF_EVENT_TRIGGER_STYLE_SUPPORTED;
706 for(eventTriggerStyleIdx=0; eventTriggerStyleIdx<duCb.e2apDb.ranFunction[ranFuncIdx].numOfEventTriggerStyleSupported; eventTriggerStyleIdx++)
708 duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].styleType = EVENT_TRIGGER_STYLE_TYPE;
709 duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].formatType = EVENT_TRIGGER_STYLE_FORMAT_TYPE;
710 memcpy(duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].name, event_trigger_style_name, sizeof(event_trigger_style_name));
713 duCb.e2apDb.ranFunction[ranFuncIdx].numOfReportStyleSupported= NUM_OF_RIC_REPORT_STYLE_SUPPORTED;
714 for(reportStyleIdx=0; reportStyleIdx<duCb.e2apDb.ranFunction[ranFuncIdx].numOfReportStyleSupported; reportStyleIdx++)
716 duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.styleType = REPORT_STYLE_TYPE;
717 duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.formatType = REPORT_ACTION_FORMAT_TYPE;
718 memcpy(duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.name, ric_report_style_name, sizeof(ric_report_style_name));
720 for(measurementInfoIdx =0; measurementInfoIdx<NUM_OF_MEASUREMENT_INFO_SUPPORTED(CONFIG_ADD); measurementInfoIdx++)
722 measurementInfoLen= strlen(MEASUREMENT_TYPE_NAME[measurementInfoIdx]);
723 MeasurementInfoForAction *measurementInfoForAction;
724 DU_ALLOC(measurementInfoForAction, sizeof(MeasurementInfoForAction));
725 if(measurementInfoForAction)
727 measurementInfoForAction->measurementTypeId = measurementInfoIdx+1;
728 memcpy(measurementInfoForAction->measurementTypeName, MEASUREMENT_TYPE_NAME[measurementInfoIdx], measurementInfoLen+1);
730 DU_ALLOC(node, sizeof(CmLList));
733 node->node = (PTR) measurementInfoForAction;
734 cmLListAdd2Tail(&duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].measurementInfoList, node);
739 DU_FREE(measurementInfoForAction, sizeof(MeasurementInfoForAction));
744 duCb.e2apDb.ranFunction[ranFuncIdx].ricIndicationHeaderFormat = RIC_INDICATION_HEADER_FORMAT;
745 duCb.e2apDb.ranFunction[ranFuncIdx].ricIndicationMessageFormat = RIC_INDICATION_MESSAGE_FORMAT;
747 cmLListInit(&duCb.e2apDb.ranFunction[ranFuncIdx].subscriptionList);
749 memset(duCb.e2apDb.e2TransInfo.e2InitTransaction, 0, MAX_NUM_TRANSACTION * sizeof(E2TransInfo));
750 memset(duCb.e2apDb.e2TransInfo.ricInitTransaction, 0, MAX_NUM_TRANSACTION * sizeof(E2TransInfo));
753 mib.sysFrmNum = SYS_FRAME_NUM;
755 mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs30or120;
757 mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs15or60;
759 mib.ssb_SubcarrierOffset = SSB_SC_OFFSET; //Kssb
760 mib.dmrs_TypeA_Position = MIB__dmrs_TypeA_Position_pos2;
761 mib.controlResourceSetZero = CORESET_0_INDEX;
762 mib.searchSpaceZero = SEARCHSPACE_0_INDEX;
763 mib.cellBarred = MIB__cellBarred_notBarred;
764 mib.intraFreqReselection = MIB__intraFreqReselection_notAllowed;
765 duCfgParam.mibParams = mib;
768 memset(&sib1.plmn, 0, sizeof(Plmn));
769 sib1.plmn.mcc[0] = PLMN_MCC0;
770 sib1.plmn.mcc[1] = PLMN_MCC1;
771 sib1.plmn.mcc[2] = PLMN_MCC2;
772 sib1.plmn.mnc[0] = PLMN_MNC0;
773 sib1.plmn.mnc[1] = PLMN_MNC1;
774 sib1.ranac = DU_RANAC;
777 sib1.tac = cellParams.nRTAC;
778 sib1.cellIdentity = CELL_IDENTITY * cellParams.cellLocalId;
779 DU_LOG("\nDEBUG --> DU_APP: readCfg(): OAM CellLocalId=%d", \
783 sib1.cellIdentity = CELL_IDENTITY * NR_CELL_ID;
785 sib1.cellResvdForOpUse = PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved;
786 sib1.connEstFailCnt = ConnEstFailureControl__connEstFailCount_n3;
787 sib1.connEstFailOffValidity = ConnEstFailureControl__connEstFailOffsetValidity_s900;
788 sib1.connEstFailOffset = 15;
789 sib1.siSchedInfo.winLen = SI_SchedulingInfo__si_WindowLength_s5;
790 sib1.siSchedInfo.broadcastSta = SchedulingInfo__si_BroadcastStatus_broadcasting;
791 sib1.siSchedInfo.preiodicity = SchedulingInfo__si_Periodicity_rf8;
792 sib1.siSchedInfo.sibType = SIB_TypeInfo__type_sibType2;
793 sib1.siSchedInfo.sibValTag = SIB1_VALUE_TAG;
795 fillServCellCfgCommSib(&sib1.srvCellCfgCommSib);
797 duCfgParam.sib1Params = sib1;
799 for(srvdCellIdx=0; srvdCellIdx<DEFAULT_CELLS; srvdCellIdx++)
801 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn, 0, sizeof(Plmn));
802 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[0] = PLMN_MCC0;
803 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[1] = PLMN_MCC1;
804 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[2] = PLMN_MCC2;
805 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mnc[0] = PLMN_MNC0;
806 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mnc[1] = PLMN_MNC1;
810 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrPci = cellParams.nRPCI;
812 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrPci = NR_PCI;
814 /* List of Available PLMN */
815 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
817 /* As per spec 38.473, Plmn identity consists of 3 digit from mcc
818 * followed by either 2 digit or 3 digits of mnc */
820 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn, 0,\
823 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
824 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
825 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
826 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
827 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
828 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
830 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[0] = PLMN_MCC0;
831 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[1] = PLMN_MCC1;
832 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[2] = PLMN_MCC2;
833 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[0] = PLMN_MNC0;
834 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[1] = PLMN_MNC1;
837 /* List of Extended PLMN */
838 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
840 /* As per spec 38.473, Plmn identity consists of 3 digit from mcc
841 * followed by either 2 digit or 3 digits of mnc */
843 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn, 0, sizeof(Plmn));
844 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[0] = PLMN_MCC0;
845 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[1] = PLMN_MCC1;
846 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[2] = PLMN_MCC2;
847 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mnc[0] = PLMN_MNC0;
848 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mnc[1] = PLMN_MNC1;
850 /* List of Supporting Slices */
851 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
853 taiSliceSuppLst = &duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].\
856 /* TODO Calculte the exact number of supported slices once will get
857 * cell configuration from O1 */
858 taiSliceSuppLst->numSupportedSlices = NUM_OF_SUPPORTED_SLICE;
859 if(taiSliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
861 DU_LOG("\nERROR --> DU_APP: readCfg(): Number of supported slice [%d] is more than 1024",\
862 taiSliceSuppLst->numSupportedSlices);
866 DU_ALLOC(taiSliceSuppLst->snssai, taiSliceSuppLst->numSupportedSlices*sizeof(Snssai*));
867 if(taiSliceSuppLst->snssai == NULLP)
869 DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
873 for(sliceIdx=0; sliceIdx<taiSliceSuppLst->numSupportedSlices; sliceIdx++)
875 DU_ALLOC(taiSliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
876 if(taiSliceSuppLst->snssai[sliceIdx] == NULLP)
878 DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
882 memcpy(taiSliceSuppLst->snssai[sliceIdx]->sd, cellParams.plmnList[sliceIdx].sd, \
883 SD_SIZE*sizeof(uint8_t));
884 taiSliceSuppLst->snssai[sliceIdx]->sst = cellParams.plmnList[sliceIdx].sst;
886 memcpy(taiSliceSuppLst->snssai[sliceIdx], &snssai[sliceIdx], sizeof(Snssai));
893 /* NR TDD Mode info */
895 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.nrArfcn = cellParams.arfcnUL;
896 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
897 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
899 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.nrArfcn = NR_UL_ARFCN;
900 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
901 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
903 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrb = NRB_273;
905 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
907 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[freqBandIdx].nrFreqBand =\
909 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
911 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[freqBandIdx].sulBand[bandIdx]\
916 /* NR FDD Mode info */
918 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = cellParams.arfcnUL;
919 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
920 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
921 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
922 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = cellParams.arfcnDL;
923 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
924 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
925 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
927 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = NR_UL_ARFCN;
928 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
929 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrScs = NR_SCS;
930 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
931 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = NR_DL_ARFCN;
932 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
933 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
934 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrScs = NR_SCS;
936 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_106;
937 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
939 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[freqBandIdx].\
940 nrFreqBand = NR_FREQ_BAND;
941 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
943 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[freqBandIdx].\
944 sulBand[bandIdx] = SUL_BAND;
947 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_106;
948 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
950 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[freqBandIdx].\
951 nrFreqBand = NR_FREQ_BAND;
952 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
954 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[freqBandIdx].\
955 sulBand[bandIdx] = SUL_BAND;
959 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrb = NRB_106;
960 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrb = NRB_106;
963 /*Measurement Config and Cell Config */
964 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.measTimeCfgDuration = TIME_CFG;
966 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellDir = DL_UL;
968 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellType=CELL_TYPE;
970 /* Broadcast PLMN Identity */
971 for(brdcstPlmnIdx=0; brdcstPlmnIdx<MAX_BPLMN_NRCELL_MINUS_1; brdcstPlmnIdx++)
973 for(plmnIdx=0; plmnIdx<MAX_PLMN; plmnIdx++)
975 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx],\
977 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[0] =\
979 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[1] =\
981 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[2] =\
983 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mnc[0] =\
985 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mnc[1] =\
988 /* Extended PLMN List */
989 for(plmnIdx=0; plmnIdx<MAX_PLMN; plmnIdx++)
991 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
992 extPlmn[plmnIdx], 0, sizeof(Plmn));
993 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
994 extPlmn[plmnIdx].mcc[0] = PLMN_MCC0;
995 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
996 extPlmn[plmnIdx].mcc[1] = PLMN_MCC1;
997 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
998 extPlmn[plmnIdx].mcc[2] = PLMN_MCC2;
999 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
1000 extPlmn[plmnIdx].mnc[0] = PLMN_MNC0;
1001 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
1002 extPlmn[plmnIdx].mnc[1] = PLMN_MNC1;
1005 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.epsTac = cellParams.nRTAC; //TODO : to check and fill
1006 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.tac = cellParams.nRTAC;
1007 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].tac = cellParams.nRTAC;
1008 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].nrCellId = cellParams.cellLocalId;
1010 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.epsTac = DU_TAC; //TODO : to check and fill
1011 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.tac = DU_TAC;
1012 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].tac = DU_TAC;
1013 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].nrCellId = NR_CELL_ID;
1015 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].ranac = NR_RANAC;
1018 /*gnb DU System Info mib msg*/
1020 DU_ALLOC(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg, encBufSize);
1021 if(!(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg))
1023 DU_LOG("\nERROR --> DU APP : Memory allocation failure at readCfg");
1026 memcpy(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg, encBuf, encBufSize);
1027 duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibLen = encBufSize;
1029 /*gnb DU System Info mib msg*/
1031 DU_ALLOC(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg,\
1033 if(!(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg))
1035 DU_LOG("\nERROR --> DU APP : Memory allocation failure at readCfg");
1038 memcpy(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg,\
1040 duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Len = encBufSize;
1044 if(readMacCfg() != ROK)
1046 DU_LOG("\nERROR --> DU_APP : Failed while reading MAC config");
1053 /*******************************************************************
1055 * @brief Copy Slice Cfg in temp structre in duCfgParams
1059 * Function : cpyRrmPolicyInDuCfgParams
1062 * - Copy Slice Cfg in temp structre in duCfgParams
1064 * @params[in] RrmPolicy rrmPolicy[], uint8_t policyNum, uint8_t memberList
1065 * @return ROK - success
1068 * ****************************************************************/
1069 uint8_t cpyRrmPolicyInDuCfgParams(RrmPolicyList rrmPolicy[], uint8_t policyNum, MacSliceCfgReq *tempSliceCfg)
1071 uint8_t policyIdx = 0, memberListIdx = 0;
1074 tempSliceCfg->numOfRrmPolicy = policyNum;
1075 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy, tempSliceCfg->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
1076 if(!tempSliceCfg->listOfRrmPolicy)
1078 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
1082 for(policyIdx = 0; policyIdx<tempSliceCfg->numOfRrmPolicy; policyIdx++)
1084 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
1085 if(!tempSliceCfg->listOfRrmPolicy[policyIdx])
1087 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
1091 tempSliceCfg->listOfRrmPolicy[policyIdx]->resourceType = rrmPolicy[policyIdx].resourceType;
1093 tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem = rrmPolicy[policyIdx].rRMMemberNum;
1095 if(tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem)
1097 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList,\
1098 tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
1100 if(!tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList)
1102 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
1107 for(memberListIdx = 0; memberListIdx<tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem; memberListIdx++)
1109 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx], sizeof(RrmPolicyMemberList));
1110 if(!tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx])
1112 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
1115 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->snssai.sd,\
1116 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].sd, 3 * sizeof(uint8_t));
1117 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->snssai.sst,\
1118 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].sst, sizeof(uint8_t));
1119 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->plmn.mcc,\
1120 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].mcc, 3 * sizeof(uint8_t));
1121 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->plmn.mnc,\
1122 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].mnc, 3 * sizeof(uint8_t));
1124 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.maxRatio = rrmPolicy[policyIdx].rRMPolicyMaxRatio;
1125 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.minRatio = rrmPolicy[policyIdx].rRMPolicyMinRatio;
1126 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.dedicatedRatio = rrmPolicy[policyIdx].rRMPolicyDedicatedRatio;
1134 #ifdef XML_BASED_CONFIG
1135 /*******************************************************************
1137 * @brief Fill SCTP Parameters
1141 * Function : parseSctpParams
1143 * Functionality: Fill SCTP Parameters
1145 * @params[in] XML document pointer
1147 * Current node in XML
1148 * Pointer to structure to be filled
1149 * @return ROK - success
1152 * ****************************************************************/
1153 uint8_t parseSctpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SctpParams *sctp)
1155 uint8_t max_du_port;
1156 uint16_t f1_sctp_port;
1157 uint16_t e2_sctp_port;
1159 memset(sctp, 0, sizeof(SctpParams));
1160 cur = cur->xmlChildrenNode;
1163 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_DU_PORT")) && (cur->ns == ns))
1165 max_du_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1166 if (max_du_port == 2 )
1168 sctp->duPort[F1_INTERFACE] = f1_sctp_port; /* DU Port idx 0 */
1169 sctp->duPort[E2_INTERFACE] = e2_sctp_port; /* RIC Port idx 1 */
1172 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SCTP_PORT")) && (cur->ns == ns))
1174 f1_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1176 if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_SCTP_PORT")) && (cur->ns == ns))
1178 e2_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1182 sctp->cuPort = g_cfg.CU_Port;
1183 sctp->ricPort = g_cfg.RIC_Port;
1185 sctp->cuPort = f1_sctp_port;
1186 sctp->ricPort = e2_sctp_port;
1193 /*******************************************************************
1195 * @brief Fill EGTP Parameters
1199 * Function : parseEgtpParams
1201 * Functionality: Fill EGTP Parmeters
1203 * @params[in] XML document pointer
1205 * Current node in XML
1206 * Pointer to structure to be filled
1207 * @return ROK - success
1210 * ****************************************************************/
1211 uint8_t parseEgtpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1EgtpParams *egtp)
1213 memset(egtp, 0, sizeof(F1EgtpParams));
1214 cur = cur->xmlChildrenNode;
1217 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_F1_EGTP_PORT")) && (cur->ns == ns))
1219 egtp->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1221 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEST_F1_EGTP_PORT")) && (cur->ns == ns))
1223 egtp->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1225 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_TEID")) && (cur->ns == ns))
1227 egtp->minTunnelId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1234 /*******************************************************************
1236 * @brief Fill MIB configuration
1240 * Function : parseMibParams
1242 * Functionality: Fill MIB configuration
1244 * @params[in] XML document pointer
1246 * Current node in XML
1247 * Pointer to structure to be filled
1248 * @return ROK - success
1251 * ****************************************************************/
1252 uint8_t parseMibParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MibParams *mib)
1254 memset(mib, 0, sizeof(MibParams));
1255 cur = cur -> xmlChildrenNode;
1258 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SYS_FRAME_NUM")) && (cur->ns == ns))
1260 mib->sysFrmNum = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1262 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUB_CARR_SPACE")) && (cur->ns == ns))
1264 mib->subCarrierSpacingCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1266 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFFSET")) && (cur->ns == ns))
1268 mib->ssb_SubcarrierOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1270 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPEA_POSITION")) && (cur->ns == ns))
1272 mib->dmrs_TypeA_Position = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1274 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
1276 mib->controlResourceSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1278 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
1280 mib->searchSpaceZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1282 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_BARRED")) && (cur->ns == ns))
1284 mib->cellBarred = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1286 if ((!xmlStrcmp(cur->name, (const xmlChar *)"INTRA_FREQ_RESELECT")) && (cur->ns == ns))
1288 mib->intraFreqReselection = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1295 /*******************************************************************
1297 * @brief Fill RRC version
1301 * Function : parseF1RrcVersion
1303 * Functionality: Fill RRC version
1305 * @params[in] XML document pointer
1307 * Current node in XML
1308 * Pointer to structure to be filled
1309 * @return ROK - success
1312 * ****************************************************************/
1313 uint8_t parseF1RrcVersion(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,F1RrcVersion *f1RrcVersion)
1315 memset(f1RrcVersion, 0, sizeof(F1RrcVersion));
1316 cur = cur->xmlChildrenNode;
1319 if((!xmlStrcmp(cur->name, (const xmlChar *)"RRC_VER")) && (cur->ns == ns))
1321 strcpy((char*)f1RrcVersion->rrcVer, (char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1324 if((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_RRC_VER")) && (cur->ns == ns))
1326 f1RrcVersion->extRrcVer = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1333 /*******************************************************************
1335 * @brief Fill PLMN ID
1339 * Function : parsePlmn
1341 * Functionality: Fill PLMN ID
1343 * @params[in] XML document pointer
1345 * Current node in XML
1346 * Pointer to structure to be filled
1347 * @return ROK - success
1350 * ****************************************************************/
1351 uint8_t parsePlmn(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Plmn *plmn)
1353 xmlNodePtr child = NULLP;
1355 memset(plmn, 0, sizeof(Plmn));
1356 cur = cur->xmlChildrenNode;
1359 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MCC")) && (cur->ns == ns))
1361 child = cur->xmlChildrenNode;
1362 while (child != NULL)
1364 if ((!xmlStrcmp(child->name, (const xmlChar *)"plmn_MCC0")) && (child->ns == ns))
1366 plmn->mcc[0] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1369 if ((!xmlStrcmp(child->name, (const xmlChar *)"plmn_MCC1")) && (child->ns == ns))
1371 plmn->mcc[1] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1374 if ((!xmlStrcmp(child->name, (const xmlChar *)"plmn_MCC2")) && (child->ns == ns))
1376 plmn->mcc[2] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1379 child = child->next;
1383 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MNC")) && (cur->ns == ns))
1385 child = cur->xmlChildrenNode;
1386 while (child != NULL)
1388 if ((!xmlStrcmp(child->name, (const xmlChar *)"plmn_MNC0")) && (child->ns == ns))
1390 plmn->mnc[0] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1393 if ((!xmlStrcmp(child->name, (const xmlChar *)"plmn_MNC1")) && (child->ns == ns))
1395 plmn->mnc[1] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1398 if ((!xmlStrcmp(child->name, (const xmlChar *)"plmn_MNC2")) && (child->ns == ns))
1400 plmn->mnc[2] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1403 child = child->next;
1412 /*******************************************************************
1414 * @brief Fill NR CGI
1418 * Function : parseNrCgi
1420 * Functionality: Fill NR CGI
1422 * @params[in] XML document pointer
1424 * Current node in XML
1425 * Pointer to structure to be filled
1426 * @return ROK - success
1429 * ****************************************************************/
1430 uint8_t parseNrCgi(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrEcgi *nrCgi)
1432 memset(nrCgi, 0, sizeof(NrEcgi));
1433 cur = cur->xmlChildrenNode;
1436 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
1438 if(parsePlmn(doc, ns, cur, &nrCgi->plmn) != ROK)
1444 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
1446 nrCgi-> cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1454 /*******************************************************************
1456 * @brief Fill SNSSAI
1460 * Function : parseSnssai
1462 * Functionality: Fill SNSSAI
1464 * @params[in] XML document pointer
1466 * Current node in XML
1467 * Pointer to structure to be filled
1468 * @return ROK - success
1471 * ****************************************************************/
1472 uint8_t parseSnssai(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Snssai *snssai)
1477 memset(snssai, 0, sizeof(Snssai));
1478 cur = cur ->xmlChildrenNode;
1481 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SST")) && (cur->ns == ns))
1483 snssai->sst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1486 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SD_SIZE")) && (cur->ns == ns))
1488 child = cur->xmlChildrenNode;
1489 while(child != NULL)
1491 if ((!xmlStrcmp(child->name, (const xmlChar *)"SD")) && (child->ns == ns))
1493 snssai->sd[sdIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1496 child = child -> next;
1505 /*******************************************************************
1507 * @brief Fill Supported Slice List
1511 * Function : parseSupportedSliceList
1513 * Functionality: Fill Supported Slice List
1515 * @params[in] XML document pointer
1517 * Current node in XML
1518 * Pointer to structure to be filled
1519 * @return ROK - success
1522 * ****************************************************************/
1523 uint8_t parseSupportedSliceList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SupportedSliceList *sliceSuppLst)
1525 uint8_t sliceIdx = 0;
1526 xmlNodePtr child = NULLP;
1527 xmlNodePtr snssaiNode = NULLP;
1529 memset(sliceSuppLst, 0, sizeof(SupportedSliceList));
1530 cur = cur->xmlChildrenNode;
1533 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SUPPORT_SLICE")) && (cur->ns == ns))
1535 sliceSuppLst->numSupportedSlices = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1536 if(sliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
1538 DU_LOG("\nERROR --> DU_APP: %s: Number of supported slice [%d] is more than 1024",\
1539 __func__, sliceSuppLst->numSupportedSlices);
1544 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI_LIST")) && (cur->ns == ns))
1546 DU_ALLOC_SHRABL_BUF(sliceSuppLst->snssai, (sliceSuppLst->numSupportedSlices) * sizeof(Snssai*));
1547 if (sliceSuppLst->snssai == NULLP)
1549 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
1553 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
1555 DU_ALLOC_SHRABL_BUF(sliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
1556 if (sliceSuppLst->snssai[sliceIdx] == NULLP)
1558 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
1564 memcpy(sliceSuppLst->snssai[sliceIdx]->sd, cellParams.plmnList[sliceIdx].sd, SD_SIZE*sizeof(uint8_t));
1565 sliceSuppLst->snssai[sliceIdx]->sst = cellParams.plmnList[sliceIdx].sst;
1571 child = cur->xmlChildrenNode;
1572 while (child != NULL)
1574 if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
1577 snssaiNode = child->xmlChildrenNode;
1578 while (snssaiNode != NULL)
1580 if ((!xmlStrcmp(snssaiNode->name, (const xmlChar *)"SNSSAI")) && (snssaiNode->ns == ns))
1582 if(parseSnssai(doc, ns, snssaiNode, sliceSuppLst->snssai[sliceIdx]) != ROK)
1588 snssaiNode = snssaiNode->next;
1591 child = child->next;
1601 /*******************************************************************
1603 * @brief Fill Served PLMN
1607 * Function : parseF1SrvdPlmn
1609 * Functionality: Fill Served PLMN
1611 * @params[in] XML document pointer
1613 * Current node in XML
1614 * Pointer to structure to be filled
1615 * @return ROK - success
1618 * ****************************************************************/
1619 uint8_t parseF1SrvdPlmn(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1SrvdPlmn *srvdPlmn, uint8_t srvdPlmnIdx)
1621 memset(srvdPlmn, 0, sizeof(F1SrvdPlmn));
1622 cur = cur->xmlChildrenNode;
1626 fillPlmnFromO1(&srvdPlmn ->plmn, srvdPlmnIdx);
1628 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
1630 if(parsePlmn(doc, ns, cur, &srvdPlmn->plmn) != ROK)
1637 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
1639 if(parsePlmn(doc, ns, cur, &srvdPlmn->extPlmn) != ROK)
1645 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
1647 if(parseSupportedSliceList(doc, ns, cur, &srvdPlmn->taiSliceSuppLst) != ROK)
1658 /*******************************************************************
1660 * @brief Fill cell information
1664 * Function : parseF1CellInfo
1666 * Functionality: Fill cell information
1668 * @params[in] XML document pointer
1670 * Current node in XML
1671 * Pointer to structure to be filled
1672 * @return ROK - success
1675 * ****************************************************************/
1676 uint8_t parseF1CellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1CellInfo *f1CellInfo)
1678 memset(f1CellInfo, 0, sizeof(F1CellInfo));
1679 cur = cur->xmlChildrenNode;
1682 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CGI")) && (cur->ns == ns))
1684 if(parseNrCgi(doc, ns, cur, &f1CellInfo->nrCgi) != ROK)
1691 f1CellInfo->nrPci = cellParams.nRPCI;
1693 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
1695 f1CellInfo->nrPci = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1699 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SRVD_PLMN")) && (cur->ns == ns))
1701 if(parseF1SrvdPlmn(doc, ns, cur, &f1CellInfo->srvdPlmn[0], 0) != ROK)
1712 /*******************************************************************
1714 * @brief Fill Frequency Band
1718 * Function : parseF1FreqBand
1720 * Functionality: Fill Frequency Band
1722 * @params[in] XML document pointer
1724 * Current node in XML
1725 * Pointer to structure to be filled
1726 * @return ROK - success
1729 * ****************************************************************/
1730 uint8_t parseF1FreqBand(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1FreqBand *freqBand)
1733 uint16_t sulValue = 0;
1735 xmlNodePtr sulChild;
1737 memset(freqBand, 0, sizeof(F1FreqBand));
1738 cur = cur->xmlChildrenNode;
1741 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
1743 freqBand->nrFreqBand = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1746 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_BAND_LIST")) && (cur->ns == ns))
1748 child = cur->xmlChildrenNode;
1749 while (child != NULL)
1751 if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
1753 sulChild = child->xmlChildrenNode;
1755 while (sulChild != NULL)
1757 if ((!xmlStrcmp(sulChild->name, (const xmlChar *)"SUL_BAND")) && (sulChild->ns == ns))
1759 sulValue = atoi((char *)xmlNodeListGetString(doc, sulChild->xmlChildrenNode, 1));
1760 if (sulIdx < MAX_NRCELL_BANDS)
1762 freqBand->sulBand[sulIdx] = sulValue;
1767 DU_LOG("ERROR --> DU_APP : %s : SUL_BAND array overflow\n", __func__);
1771 sulChild = sulChild->next;
1774 child = child->next;
1782 /*******************************************************************
1784 * @brief Fill Frequency Band List
1788 * Function : parseF1FreqBandList
1790 * Functionality: Fill Frequency Band List
1792 * @params[in] XML document pointer
1794 * Current node in XML
1795 * Pointer to structure to be filled
1796 * @return ROK - success
1799 * ****************************************************************/
1800 uint8_t parseF1FreqBandList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFreqInfo *nrFreqInfo)
1805 cur = cur->xmlChildrenNode;
1808 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
1810 child = cur->xmlChildrenNode;
1811 while(child != NULL)
1813 if ((!xmlStrcmp(child->name, (const xmlChar *)"F1_FREQ_BAND")) && (child->ns == ns))
1815 if(parseF1FreqBand(doc, ns, child, &nrFreqInfo->freqBand[idx]) != ROK)
1821 child = child -> next;
1830 /*******************************************************************
1832 * @brief Fill Transmission Bandwidth
1836 * Function : parseF1TxBw
1838 * Functionality: Fill Transmission Bandwidth
1840 * @params[in] XML document pointer
1842 * Current node in XML
1843 * Pointer to structure to be filled
1844 * @return ROK - success
1847 * ****************************************************************/
1848 uint8_t parseF1TxBw(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1TxBw *txBw)
1850 memset(txBw, 0, sizeof(F1TxBw));
1851 cur = cur->xmlChildrenNode;
1854 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_SCS")) && (cur->ns == ns))
1856 txBw->nrScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1859 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NRB")) && (cur->ns == ns))
1861 txBw->nrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1869 /*******************************************************************
1871 * @brief Fill SUL Info
1875 * Function : parseF1SulInfo
1877 * Functionality: Fill SUL Info
1879 * @params[in] XML document pointer
1881 * Current node in XML
1882 * Pointer to structure to be filled
1883 * @return ROK - success
1886 * ****************************************************************/
1887 uint8_t parseF1SulInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1SulInfo *sulInfo)
1889 memset(sulInfo, 0, sizeof(F1SulInfo));
1890 cur = cur->xmlChildrenNode;
1893 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_ARFCN")) && (cur->ns == ns))
1895 sulInfo->sulArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1898 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
1900 if(parseF1TxBw(doc, ns, cur, &sulInfo->sulTxBw) != ROK)
1911 /*******************************************************************
1913 * @brief Fill NR Frequency Info
1917 * Function : parseF1NrFreqInfo
1919 * Functionality: Fill NR Frequency Info
1921 * @params[in] XML document pointer
1923 * Current node in XML
1924 * Pointer to structure to be filled
1925 * @return ROK - success
1928 * ****************************************************************/
1929 uint8_t parseF1NrFreqInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFreqInfo *nrFreqInfo)
1931 memset(nrFreqInfo, 0, sizeof(F1NrFreqInfo));
1932 cur = cur->xmlChildrenNode;
1935 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_ARFCN")) && (cur->ns == ns))
1937 nrFreqInfo->nrArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1940 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SUL_INFO")) && (cur->ns == ns))
1942 if(parseF1SulInfo(doc, ns, cur, &nrFreqInfo->sulInfo) != ROK)
1948 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_FREQ_BAND_LIST")) && (cur->ns == ns))
1950 if(parseF1FreqBandList(doc, ns, cur, nrFreqInfo) != ROK)
1961 /*******************************************************************
1963 * @brief Fill NR FDD Info
1967 * Function : parseF1NrFddInfo
1969 * Functionality: Fill NR FDD Info
1971 * @params[in] XML document pointer
1973 * Current node in XML
1974 * Pointer to structure to be filled
1975 * @return ROK - success
1978 * ****************************************************************/
1979 uint8_t parseF1NrFddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFddInfo *fddInfo)
1981 memset(fddInfo, 0, sizeof(F1NrFddInfo));
1982 cur = cur->xmlChildrenNode;
1985 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO_UL")) && (cur->ns == ns))
1987 if(parseF1NrFreqInfo(doc, ns, cur, &fddInfo->ulNrFreqInfo) != ROK)
1993 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO_DL")) && (cur->ns == ns))
1995 if(parseF1NrFreqInfo(doc, ns, cur, &fddInfo->dlNrFreqInfo) != ROK)
2001 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW_UL")) && (cur->ns == ns))
2003 if(parseF1TxBw(doc, ns, cur, &fddInfo->ulTxBw) != ROK)
2009 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW_DL")) && (cur->ns == ns))
2011 if(parseF1TxBw(doc, ns, cur, &fddInfo->dlTxBw) != ROK)
2022 /*******************************************************************
2024 * @brief Fill NR TDD Info
2028 * Function : parseF1NrTddInfo
2030 * Functionality: Fill NR TDD Info
2032 * @params[in] XML document pointer
2034 * Current node in XML
2035 * Pointer to structure to be filled
2036 * @return ROK - success
2039 * ****************************************************************/
2040 uint8_t parseF1NrTddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrTddInfo *tddInfo)
2042 memset(tddInfo, 0, sizeof(F1NrTddInfo));
2043 cur = cur->xmlChildrenNode;
2046 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO")) && (cur->ns == ns))
2048 if(parseF1NrFreqInfo(doc, ns, cur, &tddInfo->nrFreqInfo) != ROK)
2054 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
2056 if(parseF1TxBw(doc, ns, cur, &tddInfo->nrTxBw) != ROK)
2067 /*******************************************************************
2069 * @brief Fill NR Mode Info
2073 * Function : parseNrModeInfo
2075 * Functionality: Fill NR Mode Info
2077 * @params[in] XML document pointer
2079 * Current node in XML
2080 * Pointer to structure to be filled
2081 * @return ROK - success
2084 * ****************************************************************/
2085 uint8_t parseNrModeInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrModeInfo *nrModeInfo)
2089 memset(nrModeInfo, 0, sizeof(NrModeInfo));
2090 cur = cur->xmlChildrenNode;
2093 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE")) && (cur->ns == ns))
2095 strcpy((char*)modeCfg, (char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2098 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FDD_INFO")) && (cur->ns == ns))
2100 if(strcmp(modeCfg, "FDD") == 0)
2102 if(parseF1NrFddInfo(doc, ns, cur, &nrModeInfo->mode.fdd) != ROK)
2109 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_TDD_INFO")) && (cur->ns == ns))
2111 if(strcmp(modeCfg, "TDD") == 0)
2113 if(parseF1NrTddInfo(doc, ns, cur, &nrModeInfo->mode.tdd) != ROK)
2125 /*******************************************************************
2127 * @brief Fill Broadcast PLMN Information
2131 * Function : parseF1BrdcstPlmnInfo
2133 * Functionality: Fill Broadcast PLMN Information
2135 * @params[in] XML document pointer
2137 * Current node in XML
2138 * Pointer to structure to be filled
2139 * @return ROK - success
2142 * ****************************************************************/
2143 uint8_t parseF1BrdcstPlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1BrdcstPlmnInfo *brdcstPlmnInfo)
2145 memset(brdcstPlmnInfo, 0, sizeof(F1BrdcstPlmnInfo));
2146 cur = cur->xmlChildrenNode;
2149 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
2151 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->plmn[0]) != ROK)
2157 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
2159 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->extPlmn[0]) != ROK)
2165 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
2167 brdcstPlmnInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2170 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CELL_ID")) && (cur->ns == ns))
2172 brdcstPlmnInfo->nrCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2175 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_RANAC")) && (cur->ns == ns))
2177 brdcstPlmnInfo->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2185 /*******************************************************************
2187 * @brief Fill DU Cell Information
2191 * Function : parseF1DuCellInfo
2193 * Functionality: Fill DU Cell Information
2195 * @params[in] XML document pointer
2197 * Current node in XML
2198 * Pointer to structure to be filled
2199 * @return ROK - success
2202 * ****************************************************************/
2203 uint8_t parseF1DuCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuCellInfo *duCellInfo)
2205 memset(duCellInfo, 0, sizeof(F1DuCellInfo));
2206 cur = cur->xmlChildrenNode;
2209 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_INFO")) && (cur->ns == ns))
2211 if(parseF1CellInfo(doc, ns, cur, &duCellInfo->cellInfo) != ROK)
2217 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
2219 duCellInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2222 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EPS_TAC")) && (cur->ns == ns))
2224 duCellInfo->epsTac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2227 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE_INFO")) && (cur->ns == ns))
2229 if(parseNrModeInfo(doc, ns, cur, &duCellInfo->f1Mode) != ROK)
2235 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_CFG")) && (cur->ns == ns))
2237 duCellInfo->measTimeCfgDuration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2240 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_DIR")) && (cur->ns == ns))
2242 duCellInfo->cellDir = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2245 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_TYPE")) && (cur->ns == ns))
2247 duCellInfo->cellType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2250 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_BRDCST_PLMN_INFO")) && (cur->ns == ns))
2252 if(parseF1BrdcstPlmnInfo(doc, ns, cur, &duCellInfo->brdcstPlmnInfo[0]) != ROK)
2263 /*******************************************************************
2265 * @brief Fill DU served cell information
2269 * Function : parseF1DuServedCellInfo
2271 * Functionality: Fill DU served cell information
2273 * @params[in] XML document pointer
2275 * Current node in XML
2276 * Pointer to structure to be filled
2277 * @return ROK - success
2280 * ****************************************************************/
2281 uint8_t parseF1DuServedCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuSrvdCellInfo *srvdCellInfo)
2283 memset(srvdCellInfo, 0, sizeof(F1DuSrvdCellInfo));
2284 cur = cur->xmlChildrenNode;
2287 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_CELL_INFO")) && (cur->ns == ns))
2289 if(parseF1DuCellInfo(doc, ns, cur, &srvdCellInfo->duCellInfo) != ROK)
2297 if(fillDuSrvdCellSysInfo(&srvdCellInfo->duSysInfo) != ROK)
2304 /*******************************************************************
2306 * @brief Fill DU Served Cell System Information
2310 * Function : fillDuSrvdCellSysInfo
2312 * Functionality: Fill DU Served Cell System Information
2314 * @params[in] Served Cell System Information
2315 * @return ROK - success
2318 * ****************************************************************/
2319 uint8_t fillDuSrvdCellSysInfo(F1DuSysInfo *sysInfo)
2321 /* GNB DU System Info MIB msg */
2323 DU_ALLOC(sysInfo->mibMsg, encBufSize);
2324 if(!(sysInfo->mibMsg))
2326 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
2329 memcpy(sysInfo->mibMsg, encBuf, encBufSize);
2330 sysInfo->mibLen = encBufSize;
2332 /* GNB DU System Info SIB1 msg */
2334 DU_ALLOC(sysInfo->sib1Msg, encBufSize);
2335 if(!(sysInfo->sib1Msg))
2337 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
2340 memcpy(sysInfo->sib1Msg, encBuf,encBufSize);
2341 sysInfo->sib1Len = encBufSize;
2347 /*******************************************************************
2349 * @brief Fill PLMN received from O1 interface
2353 * Function : fillPlmnFromO1
2355 * Functionality: Fill PLMN received from O1 interface
2357 * @params[in] XML document pointer
2359 * Current node in XML
2360 * Pointer to structure to be filled
2361 * @return ROK - success
2364 * ****************************************************************/
2365 void fillPlmnFromO1(Plmn *PLMN, uint8_t srvdPlmnIdx)
2367 PLMN->mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
2368 PLMN->mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
2369 PLMN->mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
2370 PLMN->mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
2371 PLMN->mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
2372 PLMN->mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
2376 /*******************************************************************
2378 * @brief Fill Beamforming Configuration
2382 * Function : parseBeamformingConfig
2384 * Functionality: Fill Beamforming Configuration
2386 * @params[in] XML document pointer
2388 * Current node in XML
2389 * Pointer to structure to be filled
2390 * @return ROK - success
2393 * ****************************************************************/
2394 uint8_t parseBeamformingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BeamformingConf *beamformingCfg)
2396 memset(beamformingCfg, 0, sizeof(BeamformingConf));
2397 cur = cur -> xmlChildrenNode;
2400 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_BEAMS")) && (cur->ns == ns))
2402 beamformingCfg->numOfBeams = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2405 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_RUS")) && (cur->ns == ns))
2407 beamformingCfg->numTxRUs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2410 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_IDX")) && (cur->ns == ns))
2412 beamformingCfg->beamIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2415 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TYPE")) && (cur->ns == ns))
2417 beamformingCfg->beamType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2420 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_AZIMUTH")) && (cur->ns == ns))
2422 beamformingCfg->beamAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2425 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TILT")) && (cur->ns == ns))
2427 beamformingCfg->beamTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2430 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_HORIZ_WIDTH")) && (cur->ns == ns))
2432 beamformingCfg->beamHorizWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2435 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_VERT_WIDTH")) && (cur->ns == ns))
2437 beamformingCfg->beamVertWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2440 if ((!xmlStrcmp(cur->name, (const xmlChar *)"COVER_SHAPE")) && (cur->ns == ns))
2442 beamformingCfg->coverageShape = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2445 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_TILT")) && (cur->ns == ns))
2447 beamformingCfg->digitalTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2450 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_AZIMUTH")) && (cur->ns == ns))
2452 beamformingCfg->digitalAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2460 /*******************************************************************
2462 * @brief Fill Precoding Configuration
2466 * Function : parsePrecodingConfig
2468 * Functionality: Fill Precoding Configuration
2470 * @params[in] XML document pointer
2472 * Current node in XML
2473 * Pointer to structure to be filled
2474 * @return ROK - success
2477 * ****************************************************************/
2478 uint8_t parsePrecodingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrecodingConf *precodCfg)
2480 memset(precodCfg, 0, sizeof(PrecodingConf));
2481 cur = cur -> xmlChildrenNode;
2484 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_LAYERS")) && (cur->ns == ns))
2486 precodCfg->numLayers = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2489 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ANT_PORTS")) && (cur->ns == ns))
2491 precodCfg->numAntPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2499 /*******************************************************************
2501 * @brief Fill PRACH FDM Information
2505 * Function : parsePrachFdmInfo
2507 * Functionality: Fill PRACH FDM Information
2509 * @params[in] XML document pointer
2511 * Current node in XML
2512 * Pointer to structure to be filled
2513 * @return ROK - success
2516 * ****************************************************************/
2517 uint8_t parsePrachFdmInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PrachFdmInfo *prachFdmInfo)
2519 memset(prachFdmInfo, 0, sizeof(PrachFdmInfo));
2520 cur = cur -> xmlChildrenNode;
2523 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
2525 prachFdmInfo->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2528 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ROOT_SEQ")) && (cur->ns == ns))
2530 prachFdmInfo->numRootSeq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2533 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K1")) && (cur->ns == ns))
2535 prachFdmInfo->k1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2538 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORR_ZONE_CFG")) && (cur->ns == ns))
2540 prachFdmInfo->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2548 /*******************************************************************
2550 * @brief Fill PRACH configuration
2554 * Function : parsePrachCfg
2556 * Functionality: Fill PRACH configuration
2558 * @params[in] XML document pointer
2560 * Current node in XML
2561 * Pointer to structure to be filled
2562 * @return ROK - success
2565 * ****************************************************************/
2566 uint8_t parsePrachCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrachCfg *prachCfg)
2570 uint8_t maxNumRbs = 0;
2571 uint8_t prachMaxPrb = 0;
2573 memset(prachCfg, 0, sizeof(PrachCfg));
2574 cur = cur -> xmlChildrenNode;
2577 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SEQ_LEN")) && (cur->ns == ns))
2579 prachCfg->prachSeqLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2582 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
2584 prachCfg->prachSubcSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2587 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
2589 prachCfg->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2592 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRACH_FDM")) && (cur->ns == ns))
2594 prachCfg->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2597 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FDM_LIST")) && (cur->ns == ns))
2599 child = cur->xmlChildrenNode;
2600 while(child != NULL)
2602 if ((!xmlStrcmp(child->name, (const xmlChar *)"FDM_INFO")) && (child->ns == ns))
2604 if(parsePrachFdmInfo(doc, ns, child, &prachCfg->fdm[fdmIdx]) != ROK)
2610 child = child -> next;
2614 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns == ns))
2616 prachCfg->prachRstSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2619 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PER_RACH")) && (cur->ns == ns))
2621 prachCfg->ssbPerRach = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2624 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
2626 prachCfg->totalNumRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2629 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
2631 prachCfg->totalNumRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2634 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
2636 maxNumRbs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2639 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
2641 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2644 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
2646 prachCfg->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2649 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
2651 prachCfg->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2657 prachCfg->msg1FreqStart = maxNumRbs - prachMaxPrb;
2661 /*******************************************************************
2663 * @brief Fill CSI RS configuration
2667 * Function : parseCsiRsCfg
2669 * Functionality: Fill CSI RS configuration
2671 * @params[in] XML document pointer
2673 * Current node in XML
2674 * Pointer to structure to be filled
2675 * @return ROK - success
2678 * ****************************************************************/
2679 uint8_t parseCsiRsCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CsiRsCfg *csiRsCfg)
2681 memset(csiRsCfg, 0, sizeof(CsiRsCfg));
2682 cur = cur -> xmlChildrenNode;
2685 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_FREQ")) && (cur->ns == ns))
2687 csiRsCfg->csiFreqDomainAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2690 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_PORTS")) && (cur->ns == ns))
2692 csiRsCfg->csiNrofPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2695 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT")) && (cur->ns == ns))
2697 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2700 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT_2")) && (cur->ns == ns))
2702 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2705 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DM_TYPE")) && (cur->ns == ns))
2707 csiRsCfg->csirscdmType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2710 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY")) && (cur->ns == ns))
2712 csiRsCfg->csirsdensity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2715 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY_DOT_5")) && (cur->ns == ns))
2717 csiRsCfg->csirsdensitydot5 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2720 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET")) && (cur->ns == ns))
2722 csiRsCfg->powerControlOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2725 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET_SS")) && (cur->ns == ns))
2727 csiRsCfg->powerControlOffsetSS = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2730 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY_OFFSET")) && (cur->ns == ns))
2732 csiRsCfg->periodicityAndOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2740 /*******************************************************************
2742 * @brief Fill SSB Configuration
2746 * Function : parseSsbCfg
2748 * Functionality: Fill SSB Configuration
2750 * @params[in] XML document pointer
2752 * Current node in XML
2753 * Pointer to structure to be filled
2754 * @return ROK - success
2757 * ****************************************************************/
2758 uint8_t parseSsbCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SsbCfg *ssbCfg)
2761 uint8_t ssbMaskIdx = 0;
2763 memset(ssbCfg, 0, sizeof( SsbCfg));
2764 cur = cur -> xmlChildrenNode;
2767 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBSC_PWR")) && (cur->ns == ns))
2769 ssbCfg->ssbPbchPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2772 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_CMN")) && (cur->ns == ns))
2774 ssbCfg->scsCmn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2777 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_OFF_PT_A")) && (cur->ns == ns))
2779 ssbCfg->ssbOffsetPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2782 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIOD")) && (cur->ns == ns))
2784 ssbCfg->ssbPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2787 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFF")) && (cur->ns == ns))
2789 ssbCfg->ssbScOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2792 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_LIST")) && (cur->ns == ns))
2794 child = cur -> xmlChildrenNode;
2795 while(child != NULL)
2797 if ((!xmlStrcmp(child->name, (const xmlChar *)"SSB_MASK")) && (child->ns == ns))
2799 ssbCfg->ssbMask[ssbMaskIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
2802 child = child -> next;
2806 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_ID")) && (cur->ns == ns))
2808 ssbCfg->beamId[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2811 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BETA_PSS")) && (cur->ns == ns))
2813 ssbCfg->betaPss = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2816 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCH_PAY_FLAG")) && (cur->ns == ns))
2818 ssbCfg->bchPayloadFlag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2821 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPE_A_PROS")) && (cur->ns == ns))
2823 ssbCfg->dmrsTypeAPos = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2831 /*******************************************************************
2833 * @brief Fill Carrier Configuration
2837 * Function : parseCarrierCfg
2839 * Functionality: Fill Carrier Configuration
2841 * @params[in] XML document pointer
2843 * Current node in XML
2844 * Pointer to structure to be filled
2845 * @return ROK - success
2848 * ****************************************************************/
2849 uint8_t parseCarrierCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CarrierCfg *carrierCfg)
2851 memset(carrierCfg, 0, sizeof(CarrierCfg));
2852 cur = cur -> xmlChildrenNode;
2855 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_BW")) && (cur->ns == ns))
2857 carrierCfg->dlBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2860 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_DL_ARFCN")) && (cur->ns == ns))
2862 carrierCfg->arfcnDL = convertArfcnToFreqKhz(atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)));
2865 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_BW")) && (cur->ns == ns))
2867 carrierCfg->ulBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2870 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_UL_ARFCN")) && (cur->ns == ns))
2872 carrierCfg->arfcnUL = convertArfcnToFreqKhz(atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)));
2875 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_ANT")) && (cur->ns == ns))
2877 carrierCfg->numTxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2880 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RX_ANT")) && (cur->ns == ns))
2882 carrierCfg->numRxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2890 /*******************************************************************
2892 * @brief Fill PLMN Information List
2896 * Function : parsePlmnInfo
2898 * Functionality: Fill PLMN Information List
2900 * @params[in] XML document pointer
2902 * Current node in XML
2903 * Pointer to structure to be filled
2904 * @return ROK - success
2907 * ****************************************************************/
2908 uint8_t parsePlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PlmnInfoList *plmnInfoList)
2911 memset(plmnInfoList, 0, sizeof(PlmnInfoList));
2912 cur = cur -> xmlChildrenNode;
2915 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
2917 if(parsePlmn(doc, ns, cur,&plmnInfoList->plmn) != ROK)
2923 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
2925 if(parseSupportedSliceList(doc, ns, cur,&plmnInfoList -> suppSliceList) != ROK)
2936 /*******************************************************************
2938 * @brief Fill PUCCH Configuration Common
2942 * Function : parsePucchConfigCommon
2944 * Functionality: Fill PUCCH Configuration Common
2946 * @params[in] XML document pointer
2948 * Current node in XML
2949 * Pointer to structure to be filled
2950 * @return ROK - success
2953 * ****************************************************************/
2954 uint8_t parsePucchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PucchConfigCommon *pucchCfgCmn)
2956 memset(pucchCfgCmn, 0, sizeof(PucchConfigCommon));
2957 cur = cur -> xmlChildrenNode;
2960 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
2962 pucchCfgCmn->pucchResourceCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2965 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_GROUP_HOPPING")) && (cur->ns == ns))
2967 pucchCfgCmn->pucchGroupHopping = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2975 /*******************************************************************
2977 * @brief Fill PUSCH Common Time Allocation
2981 * Function : parsePuschTimeDomRsrcAlloc
2983 * Functionality: Fill PUSCH Common Time Allocation
2985 * @params[in] XML document pointer
2987 * Current node in XML
2988 * Pointer to structure to be filled
2989 * @return ROK - success
2992 * ****************************************************************/
2993 uint8_t parsePuschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschTimeDomRsrcAlloc *puschTimeDomRsrsAlloc)
2995 memset(puschTimeDomRsrsAlloc, 0, sizeof(PuschTimeDomRsrcAlloc));
2996 cur = cur -> xmlChildrenNode;
2999 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_K2_CFG")) && (cur->ns == ns))
3001 puschTimeDomRsrsAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3004 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MAPPING_TYPE")) && (cur->ns == ns))
3006 puschTimeDomRsrsAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3009 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
3011 puschTimeDomRsrsAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3014 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3016 puschTimeDomRsrsAlloc->symbolLength= atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3022 puschTimeDomRsrsAlloc -> startSymbolAndLength = \
3023 calcSliv(puschTimeDomRsrsAlloc->startSymbol, puschTimeDomRsrsAlloc->symbolLength);
3027 /*******************************************************************
3029 * @brief Fill PUSCH Configuration Common
3033 * Function : parsePuschConfigCommon
3035 * Functionality: Fill PUSCH Configuration Common
3037 * @params[in] XML document pointer
3039 * Current node in XML
3040 * Pointer to structure to be filled
3041 * @return ROK - success
3044 * ****************************************************************/
3045 uint8_t parsePuschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschConfigCommon *puschCfgCmn)
3048 xmlNodePtr child = NULLP;
3049 xmlNodePtr pdschNode = NULLP;
3051 memset(puschCfgCmn, 0, sizeof(PuschConfigCommon));
3052 cur = cur -> xmlChildrenNode;
3055 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
3057 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3060 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
3062 child = cur->xmlChildrenNode;
3063 while(child != NULL)
3065 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
3067 pdschNode = child->xmlChildrenNode;
3068 while(pdschNode != NULL)
3070 if ((!xmlStrcmp(pdschNode->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC")) && (pdschNode->ns == ns))
3072 if(parsePuschTimeDomRsrcAlloc(doc, ns, child,&puschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
3078 pdschNode = pdschNode -> next;
3082 child = child -> next;
3090 /*******************************************************************
3092 * @brief Fill BWP Configuration
3096 * Function : parseBwp
3098 * Functionality: Fill BWP Configuration
3100 * @params[in] XML document pointer
3102 * Current node in XML
3103 * Pointer to structure to be filled
3104 * @return ROK - success
3107 * ****************************************************************/
3108 uint8_t parseBwp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpParams *bwp)
3110 memset(bwp, 0, sizeof(BwpParams));
3111 cur = cur -> xmlChildrenNode;
3114 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PRB")) && (cur->ns == ns))
3116 bwp->firstPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3119 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRB")) && (cur->ns == ns))
3121 bwp->numPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3124 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3126 bwp->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3129 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NORMAL_CYCLIC_PREFIX")) && (cur->ns == ns))
3131 bwp->cyclicPrefix = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3139 /*******************************************************************
3141 * @brief Fill UL BWP Configuration
3145 * Function : parseBwpULConfig
3147 * Functionality: Fill UL BWP Configuration
3149 * @params[in] XML document pointer
3151 * Current node in XML
3152 * Pointer to structure to be filled
3153 * @return ROK - success
3156 * ****************************************************************/
3157 uint8_t parseBwpULConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpUlConfig *bwpUlCfg)
3159 memset(bwpUlCfg, 0, sizeof(BwpUlConfig));
3160 cur = cur -> xmlChildrenNode;
3163 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
3165 if(parseBwp(doc, ns, cur, &bwpUlCfg->bwp) != ROK)
3171 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
3173 if(parsePucchConfigCommon(doc, ns, cur, &bwpUlCfg->pucchCommon) != ROK)
3179 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
3181 if(parsePuschConfigCommon(doc, ns, cur, &bwpUlCfg->puschCommon) != ROK)
3191 /*******************************************************************
3193 * @brief Fill Page Configuration
3197 * Function : parsePageCfg
3199 * Functionality: Fill Page Configuration
3201 * @params[in] XML document pointer
3203 * Current node in XML
3204 * Pointer to structure to be filled
3205 * @return ROK - success
3208 * ****************************************************************/
3209 uint8_t parsePageCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SchPageCfg *pageCfg)
3213 memset(pageCfg, 0, sizeof(SchPageCfg));
3214 cur = cur -> xmlChildrenNode;
3217 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PO")) && (cur->ns == ns))
3219 pageCfg->numPO = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3222 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PO_PRESENT")) && (cur->ns == ns))
3224 poPresent = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
3225 if(!strcmp(poPresent, "TRUE"))
3227 pageCfg->poPresent = true;
3231 pageCfg->poPresent = false;
3235 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGING_OCC")) && (cur->ns == ns))
3237 pageCfg->pagingOcc[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3245 /*******************************************************************
3247 * @brief Fill SIB1 PDCCH Configuration
3251 * Function : parsePdcchCfgSib1
3253 * Functionality: Fill SIB1 PDCCH Configuration
3255 * @params[in] XML document pointer
3257 * Current node in XML
3258 * Pointer to structure to be filled
3259 * @return ROK - success
3262 * ****************************************************************/
3263 uint8_t parsePdcchCfgSib1(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigSib1 *pdcchConfigSib1)
3265 memset(pdcchConfigSib1, 0, sizeof(PdcchConfigSib1));
3266 cur = cur -> xmlChildrenNode;
3269 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_ZERO_INDEX")) && (cur->ns == ns))
3271 pdcchConfigSib1->coresetZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3274 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_ZERO_INDEX")) && (cur->ns == ns))
3276 pdcchConfigSib1->searchSpaceZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3284 /*******************************************************************
3286 * @brief Fill SIB1 Cell Configuration
3290 * Function : parseSib1CellCfg
3292 * Functionality: Fill SIB1 Cell Configuration
3294 * @params[in] XML document pointer
3296 * Current node in XML
3297 * Pointer to structure to be filled
3298 * @return ROK - success
3301 * ****************************************************************/
3302 uint8_t parseSib1CellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Sib1CellCfg *sib1CellCfg)
3304 memset(sib1CellCfg, 0, sizeof( Sib1CellCfg));
3305 cur = cur -> xmlChildrenNode;
3308 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_PAGE_CFG")) && (cur->ns == ns))
3310 if(parsePageCfg(doc, ns, cur, &sib1CellCfg->pagingCfg) != ROK)
3316 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CONFIG_SIB1")) && (cur->ns == ns))
3318 if(parsePdcchCfgSib1(doc, ns, cur, &sib1CellCfg->pdcchCfgSib1) != ROK)
3329 /*******************************************************************
3331 * @brief Fill Aggregation Level Candidates Information
3335 * Function : parseCandidateInfo
3337 * Functionality: Fill Aggregation Level Candidates Information
3339 * @params[in] XML document pointer
3341 * Current node in XML
3342 * Pointer to structure to be filled
3343 * @return ROK - success
3346 * ****************************************************************/
3347 uint8_t parseCandidateInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CandidatesInfo *candInfo)
3349 memset(candInfo, 0, sizeof(CandidatesInfo));
3350 cur = cur -> xmlChildrenNode;
3353 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL1")) && (cur->ns == ns))
3355 candInfo->aggLevel1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3358 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL2")) && (cur->ns == ns))
3360 candInfo->aggLevel2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3363 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL4")) && (cur->ns == ns))
3365 candInfo->aggLevel4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3368 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL8")) && (cur->ns == ns))
3370 candInfo->aggLevel8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3373 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL16")) && (cur->ns == ns))
3375 candInfo->aggLevel16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3383 /*******************************************************************
3385 * @brief Fill Search Space Connfiguration
3389 * Function : parseSearchSpaceCfg
3391 * Functionality: Fill Search Space Configuration
3393 * @params[in] XML document pointer
3395 * Current node in XML
3396 * Pointer to structure to be filled
3397 * @return ROK - success
3400 * ****************************************************************/
3401 uint8_t parseSearchSpaceCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SearchSpaceCfg *searchSpaceCfg)
3403 memset(searchSpaceCfg, 0, sizeof(SearchSpaceCfg));
3404 cur = cur -> xmlChildrenNode;
3407 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_1_INDEX")) && (cur->ns == ns))
3409 searchSpaceCfg->searchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3412 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
3414 searchSpaceCfg->coresetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3417 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SLOT_SL1")) && (cur->ns == ns))
3419 searchSpaceCfg->monitoringSlot = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3422 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DURATION")) && (cur->ns == ns))
3424 searchSpaceCfg->duration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3427 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SYMBOL")) && (cur->ns == ns))
3429 searchSpaceCfg->monitoringSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3432 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CANDIDATE_INFO")) && (cur->ns == ns))
3434 if(parseCandidateInfo(doc, ns, cur, &searchSpaceCfg->candidate) != ROK)
3445 /*******************************************************************
3447 * @brief Fill PDCCH Configuration Common
3451 * Function : parsePdcchCfgCommon
3453 * Functionality: Fill PDCCH Configuration Common
3455 * @params[in] XML document pointer
3457 * Current node in XML
3458 * Pointer to structure to be filled
3459 * @return ROK - success
3462 * ****************************************************************/
3463 uint8_t parsePdcchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigCommon *pdcchCfgCm)
3465 memset(pdcchCfgCm, 0, sizeof(PdcchConfigCommon));
3466 cur = cur -> xmlChildrenNode;
3469 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_CFG")) && (cur->ns == ns))
3471 if(parseSearchSpaceCfg(doc, ns, cur, &pdcchCfgCm->commonSearchSpace) != ROK)
3477 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_1_INDEX")) && (cur->ns == ns))
3479 pdcchCfgCm->raSearchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3488 /*******************************************************************
3490 * @brief Fill PDSCH Common Time Domain Resource Allocation
3494 * Function : parsePdschCmnTimeDomRsrcAlloc
3496 * Functionality: Fill PDSCH Common Time Domain Resource Allocation
3498 * @params[in] XML document pointer
3500 * Current node in XML
3501 * Pointer to structure to be filled
3502 * @return ROK - success
3505 * ****************************************************************/
3506 uint8_t parsePdschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,\
3507 PdschCfgCommTimeDomRsrcAlloc *pdschTimeDomRsrcAlloc)
3509 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschCfgCommTimeDomRsrcAlloc));
3510 cur = cur -> xmlChildrenNode;
3513 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_K0_CFG")) && (cur->ns == ns))
3515 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3517 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_MAPPING_TYPE")) && (cur->ns == ns))
3519 pdschTimeDomRsrcAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3521 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
3523 pdschTimeDomRsrcAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3525 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3527 pdschTimeDomRsrcAlloc->lengthSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3535 /*******************************************************************
3537 * @brief Fill PDSCH Configuration Common
3541 * Function : parsePdschConfigCommon
3543 * Functionality: Fill PDSCH Configuration Common
3545 * @params[in] XML document pointer
3547 * Current node in XML
3548 * Pointer to structure to be filled
3549 * @return ROK - success
3552 * ****************************************************************/
3553 uint8_t parsePdschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdschConfigCommon *pdschCfgCmn)
3556 xmlNodePtr child = NULLP;
3557 xmlNodePtr pdschNode = NULLP;
3559 memset(pdschCfgCmn, 0, sizeof(PdschConfigCommon));
3560 cur = cur -> xmlChildrenNode;
3563 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
3565 pdschCfgCmn->numTimeDomAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3568 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
3570 child = cur->xmlChildrenNode;
3571 while(child != NULL)
3573 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
3575 pdschNode = child->xmlChildrenNode;
3576 while(pdschNode != NULL)
3578 if ((!xmlStrcmp(pdschNode->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC")) && (pdschNode->ns == ns))
3580 if(parsePdschCmnTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
3586 pdschNode = pdschNode -> next;
3590 child = child -> next;
3598 /*******************************************************************
3600 * @brief Fill DL BWP Configuration
3604 * Function : parseBwpDLConfig
3606 * Functionality: Fill DL BWP Configuration
3608 * @params[in] XML document pointer
3610 * Current node in XML
3611 * Pointer to structure to be filled
3612 * @return ROK - success
3615 * ****************************************************************/
3616 uint8_t parseBwpDLConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpDlConfig *bwpDlCfg)
3618 memset(bwpDlCfg, 0, sizeof(BwpDlConfig));
3619 cur = cur -> xmlChildrenNode;
3622 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
3624 if(parseBwp(doc, ns, cur, &bwpDlCfg->bwp) != ROK)
3630 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
3632 if(parsePdcchCfgCommon(doc, ns, cur, &bwpDlCfg->pdcchCommon) != ROK)
3638 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
3640 if(parsePdschConfigCommon(doc, ns, cur, &bwpDlCfg->pdschCommon) != ROK)
3651 /*******************************************************************
3653 * @brief Fill Cell Configuration
3657 * Function : parseCellCfg
3659 * Functionality: Fill Cell Configuration
3661 * @params[in] XML document pointer
3663 * Current node in XML
3664 * Pointer to structure to be filled
3665 * @return ROK - success
3668 * ****************************************************************/
3669 uint8_t parseCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CellCfg *cellCfg)
3671 memset(cellCfg, 0, sizeof(CellCfg));
3672 cur = cur -> xmlChildrenNode;
3675 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_OP_STATE")) && (cur->ns == ns))
3677 cellCfg->opState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3680 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_ADMIN_STATE")) && (cur->ns == ns))
3682 cellCfg->adminState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3685 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_STATE")) && (cur->ns == ns))
3687 cellCfg->cellState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3690 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN_INFO")) && (cur->ns == ns))
3692 if(parsePlmnInfo(doc, ns, cur, &cellCfg->plmnInfoList[0]) != ROK)
3698 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
3700 cellCfg->phyCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3703 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
3705 cellCfg->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3708 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_FREQUENCY")) && (cur->ns == ns))
3710 cellCfg->ssbFreq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3713 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3715 cellCfg->subCarrSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3718 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DUPLEX_MODE")) && (cur->ns == ns))
3720 cellCfg->dupType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3723 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_CELL_CFG")) && (cur->ns == ns))
3725 if(parseSib1CellCfg(doc, ns, cur, &cellCfg->sib1Cfg) != ROK)
3731 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_DL_CFG")) && (cur->ns == ns))
3733 if(parseBwpDLConfig(doc, ns, cur, &cellCfg->initialDlBwp) != ROK)
3739 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_UL_CFG")) && (cur->ns == ns))
3741 if(parseBwpULConfig(doc, ns, cur, &cellCfg->initialUlBwp) != ROK)
3753 /*******************************************************************
3755 * @brief Fill TDD slot configuration
3759 * Function : parseTddCfg
3761 * Functionality: Fill TDD slot configuration
3763 * @params[in] XML document pointer
3765 * Current node in XML
3766 * Pointer to structure to be filled
3767 * @return ROK - success
3770 * ****************************************************************/
3771 uint8_t parseTddCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TDDCfg *tddCfg)
3773 memset(tddCfg, 0, sizeof(TDDCfg));
3774 cur = cur -> xmlChildrenNode;
3777 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_PERIODICITY")) && (cur->ns == ns))
3779 tddCfg->tddPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3782 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
3784 tddCfg->nrOfDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3787 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
3789 tddCfg->nrOfDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3792 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
3794 tddCfg->nrOfUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3797 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
3799 tddCfg->nrOfUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3808 /*******************************************************************
3810 * @brief Fill MAC Cell Configuration
3814 * Function : parseMacCellCfg
3816 * Functionality: Fill MAC Cell Configuration
3818 * @params[in] XML document pointer
3820 * Current node in XML
3821 * Pointer to structure to be filled
3822 * @return ROK - success
3825 * ****************************************************************/
3826 uint8_t parseMacCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacCellCfg *macCellCfg)
3828 memset(macCellCfg, 0, sizeof(MacCellCfg));
3829 cur = cur -> xmlChildrenNode;
3832 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
3834 macCellCfg->cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3837 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CARRIER_CFG")) && (cur->ns == ns))
3839 if(parseCarrierCfg(doc, ns, cur, &macCellCfg->carrCfg) != ROK)
3845 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_CFG")) && (cur->ns == ns))
3847 if(parseCellCfg(doc, ns, cur, &macCellCfg->cellCfg) != ROK)
3853 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_CFG")) && (cur->ns == ns))
3855 if(parseSsbCfg(doc, ns, cur, &macCellCfg->ssbCfg) != ROK)
3861 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_CFG")) && (cur->ns == ns))
3863 if(parseCsiRsCfg(doc, ns, cur, &macCellCfg->csiRsCfg) != ROK)
3869 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CFG")) && (cur->ns == ns))
3871 if(parsePrachCfg(doc, ns, cur, &macCellCfg->prachCfg) != ROK)
3878 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_CFG")) && (cur->ns == ns))
3880 if(parseTddCfg(doc, ns, cur, &macCellCfg->tddCfg) != ROK)
3887 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRE_CODE_CFG")) && (cur->ns == ns))
3889 if(parsePrecodingConfig(doc, ns, cur, &macCellCfg->precodingConf) != ROK)
3895 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_FORM_CFG")) && (cur->ns == ns))
3897 if(parseBeamformingConfig(doc, ns, cur, &macCellCfg->beamCfg) != ROK)
3908 /*******************************************************************
3910 * @brief Fill PUSCH Configuration Common Time Domain
3911 * Resource Allocation
3915 * Function : parsePuschCmnTimeDomRsrcAlloc
3917 * Functionality: Fill PUSCH Configuration Common Time Domain
3918 * Resource Allocation
3920 * @params[in] XML document pointer
3922 * Current node in XML
3923 * Pointer to structure to be filled
3924 * @return ROK - success
3927 * ****************************************************************/
3928 uint8_t parsePuschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCmnTimeDomAlloc *puschCmnTimeDomAlloc)
3930 uint16_t startSymbol;
3933 memset(puschCmnTimeDomAlloc, 0, sizeof(PuschCfgCmnTimeDomAlloc));
3934 cur = cur -> xmlChildrenNode;
3937 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K2")) && (cur->ns == ns))
3939 puschCmnTimeDomAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3941 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
3943 puschCmnTimeDomAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3945 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
3947 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3949 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3951 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3955 puschCmnTimeDomAlloc->sliv = calcSliv(startSymbol, lenSymbol);
3959 /*******************************************************************
3961 * @brief Fill PUSCH Configuration Common
3965 * Function : parsePuschCfgCommon
3967 * Functionality: Fill PUSCH Configuration Common
3969 * @params[in] XML document pointer
3971 * Current node in XML
3972 * Pointer to structure to be filled
3973 * @return ROK - success
3976 * ****************************************************************/
3977 uint8_t parsePuschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCommon *puschCfgCmn)
3979 uint8_t rsrcIdx = 0;
3980 xmlNodePtr child = NULLP;
3981 xmlNodePtr rsrcNode = NULLP;
3983 memset(puschCfgCmn, 0, sizeof(PuschCfgCommon));
3984 cur = cur -> xmlChildrenNode;
3987 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_PRESENT")) && (cur->ns == ns))
3989 puschCfgCmn->puschCfgPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3992 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MSG3_DELTA_PREAMBLE")) && (cur->ns == ns))
3994 puschCfgCmn->msg3DeltaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3997 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_P0_NOMINAL_WITH_GRANT")) && (cur->ns == ns))
3999 puschCfgCmn->p0NominalWithGrant = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4002 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
4004 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4007 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
4009 child = cur->xmlChildrenNode;
4010 while (child != NULL)
4012 if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
4014 rsrcNode = child->xmlChildrenNode;
4015 while (rsrcNode != NULL)
4017 if ((!xmlStrcmp(rsrcNode->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC")) \
4018 && (rsrcNode->ns == ns))
4020 if(parsePuschCmnTimeDomRsrcAlloc(doc, ns, rsrcNode, &puschCfgCmn->timeDomAllocList[rsrcIdx]) != ROK)
4026 rsrcNode = rsrcNode->next;
4029 child = child->next;
4037 /*******************************************************************
4039 * @brief Fill PUCCH Configuration Common
4043 * Function : parsePucchCfgCommon
4045 * Functionality: Fill PUCCH Configuration Common
4047 * @params[in] XML document pointer
4049 * Current node in XML
4050 * Pointer to structure to be filled
4051 * @return ROK - success
4054 * ****************************************************************/
4055 uint8_t parsePucchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PucchCfgCommon *pucchCfgCmn)
4057 memset(pucchCfgCmn, 0, sizeof(PucchCfgCommon));
4058 cur = cur -> xmlChildrenNode;
4061 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
4063 pucchCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4066 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
4068 pucchCfgCmn->rsrcComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4071 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GRP_HOP")) && (cur->ns == ns))
4073 pucchCfgCmn->grpHop = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4076 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_P0_NOMINAL")) && (cur->ns == ns))
4078 pucchCfgCmn->p0Nominal = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4086 /*******************************************************************
4088 * @brief Fill RACH Configuration Common
4092 * Function : parseRachCfgCommon
4094 * Functionality: Fill RACH Configuration Common
4096 * @params[in] XML document pointer
4098 * Current node in XML
4099 * Pointer to structure to be filled
4100 * @return ROK - success
4103 * ****************************************************************/
4104 uint8_t parseRachCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RachCfgCommon *rachCfgCmn)
4109 memset(rachCfgCmn, 0, sizeof(RachCfgCommon));
4110 cur = cur -> xmlChildrenNode;
4113 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
4115 rachCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4118 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
4120 rachCfgCmn->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4123 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MSG_1_FDM")) && (cur->ns == ns))
4125 rachCfgCmn->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4128 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
4130 maxNumRb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4132 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
4134 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4137 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORRELATION_ZONE_CFG")) && (cur->ns == ns))
4139 rachCfgCmn->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4142 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_PREAMBLE_RCVD_TGT_PWR")) && (cur->ns == ns))
4144 rachCfgCmn->preambleRcvdTgtPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4147 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PREAMBLE_TRANS_MAX")) && (cur->ns == ns))
4149 rachCfgCmn->preambleTransMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4152 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PWR_RAMPING_STEP")) && (cur->ns == ns))
4154 rachCfgCmn->pwrRampingStep = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4157 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
4159 rachCfgCmn->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4162 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
4164 rachCfgCmn->numRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4167 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SSB_PER_RACH_OCC")) && (cur->ns == ns))
4169 rachCfgCmn->numSsbPerRachOcc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4172 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
4174 rachCfgCmn->numCbPreamblePerSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4177 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONT_RES_TIMER")) && (cur->ns == ns))
4179 rachCfgCmn->contResTimer = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4182 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
4184 rachCfgCmn->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4187 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX_PRESENT")) && (cur->ns == ns))
4189 rachCfgCmn->rootSeqIdxPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4192 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
4194 rachCfgCmn->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4197 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SUBCARRIER_SPACING")) && (cur->ns == ns))
4199 rachCfgCmn->msg1Scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4202 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns== ns))
4204 rachCfgCmn->restrictedSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4210 rachCfgCmn->msg1FreqStart = ((maxNumRb) - (prachMaxPrb));
4214 /*******************************************************************
4216 * @brief Fill SCS Specific Carrier
4220 * Function : parseScsSpecCarrier
4222 * Functionality: Fill SCS Specific Carrier
4224 * @params[in] XML document pointer
4226 * Current node in XML
4227 * Pointer to structure to be filled
4228 * @return ROK - success
4231 * ****************************************************************/
4232 uint8_t parseScsSpecCarrier(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,ScsSpecCarrier *scsSpecCrr)
4234 memset(scsSpecCrr, 0, sizeof(ScsSpecCarrier));
4235 cur = cur -> xmlChildrenNode;
4238 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SUBCARRIER_OFFSET")) && (cur->ns == ns))
4240 scsSpecCrr->scsOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4243 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
4245 scsSpecCrr->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4248 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_BW")) && (cur->ns == ns))
4250 scsSpecCrr->scsBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4257 /*******************************************************************
4259 * @brief Fill UL Config Common
4263 * Function : parseUlCfgCommon
4265 * Functionality: Fill UL Config Common
4267 * @params[in] XML document pointer
4269 * Current node in XML
4270 * Pointer to structure to be filled
4271 * @return ROK - success
4274 * ****************************************************************/
4275 uint8_t parseUlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,UlCfgCommon *ulCfgCmn)
4277 memset(ulCfgCmn, 0, sizeof(UlCfgCommon));
4278 cur = cur -> xmlChildrenNode;
4281 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
4283 ulCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4286 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_P_MAX")) && (cur->ns == ns))
4288 ulCfgCmn->pMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4291 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
4293 ulCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4296 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_ALLIGN_TIMER_COMM")) && (cur->ns == ns))
4298 ulCfgCmn->timeAlignTimerComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4301 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
4303 if(parseScsSpecCarrier(doc, ns, cur, &ulCfgCmn->ulScsCarrier) != ROK)
4309 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RACH_CFG_COMMON")) && (cur->ns == ns))
4311 if(parseRachCfgCommon(doc, ns, cur, &ulCfgCmn->rachCfg) != ROK)
4317 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
4319 if(parsePuschCfgCommon(doc, ns, cur, &ulCfgCmn->puschCfg) != ROK)
4325 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
4327 if(parsePucchCfgCommon(doc, ns, cur, &ulCfgCmn->pucchCfg) != ROK)
4338 /*******************************************************************
4340 * @brief Fill TDD UL DL Configuration Common
4344 * Function : parseTddUlDlCfgCommon
4346 * Functionality: Fill TDD UL DL Configuration Common
4348 * @params[in] XML document pointer
4350 * Current node in XML
4351 * Pointer to structure to be filled
4352 * @return ROK - success
4355 * ****************************************************************/
4356 uint8_t parseTddUlDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TddUlDlCfgCommon *tddUlDlCfgCmn)
4358 memset(tddUlDlCfgCmn, 0, sizeof(TddUlDlCfgCommon));
4359 cur = cur -> xmlChildrenNode;
4362 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REF_SCS")) && (cur->ns == ns))
4364 tddUlDlCfgCmn->refScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4367 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TX_PRD")) && (cur->ns == ns))
4369 tddUlDlCfgCmn->txPrd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4372 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
4374 tddUlDlCfgCmn->numDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4377 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
4379 tddUlDlCfgCmn->numDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4382 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
4384 tddUlDlCfgCmn->numUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4387 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
4389 tddUlDlCfgCmn->numUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4397 /*******************************************************************
4399 * @brief Fill PCCH Configuration
4403 * Function : parsePcchCfg
4405 * Functionality: Fill PCCH Configuration
4407 * @params[in] XML document pointer
4409 * Current node in XML
4410 * Pointer to structure to be filled
4411 * @return ROK - success
4414 * ****************************************************************/
4415 uint8_t parsePcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PcchCfg *pcchCfg)
4417 xmlNodePtr child = NULLP;
4418 xmlNodePtr firstPdcchNode = NULLP;
4421 memset(pcchCfg, 0, sizeof(PcchCfg));
4422 cur = cur -> xmlChildrenNode;
4425 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DFLT_PAGING_CYCLE")) && (cur->ns == ns))
4427 pcchCfg->dfltPagingCycle = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4430 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAND_PAGING_FRM_OFFSET")) && (cur->ns == ns))
4432 pcchCfg->nAndPagingFrmOffsetType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4435 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGE_FRM_OFFSET")) && (cur->ns == ns))
4437 pcchCfg->pageFrameOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4440 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NS")) && (cur->ns == ns))
4442 pcchCfg->ns = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4445 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_TYPE")) && (cur->ns == ns))
4447 pcchCfg->firstPDCCHMontioringType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4450 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
4452 child = cur->xmlChildrenNode;
4453 while(child != NULL)
4455 if ((!xmlStrcmp(child->name, (const xmlChar *)"FIRST_PDCCH_LIST")) && (child->ns == ns))
4457 firstPdcchNode = child->xmlChildrenNode;
4458 while (firstPdcchNode != NULL)
4460 if ((!xmlStrcmp(firstPdcchNode->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_INFO")) && (firstPdcchNode->ns == ns))
4462 pcchCfg->firstPDCCHMontioringInfo[idx] = atoi((char *)xmlNodeListGetString(doc, firstPdcchNode->xmlChildrenNode, 1));
4465 firstPdcchNode = firstPdcchNode->next;
4468 child = child -> next;
4476 /*******************************************************************
4478 * @brief Fill PDSCH Time Domain Resource Allocation
4482 * Function : parsePdschTimeDomRsrcAlloc
4484 * Functionality: Fill PDSCH Time Domain Resource Allocation
4486 * @params[in] XML document pointer
4488 * Current node in XML
4489 * Pointer to structure to be filled
4490 * @return ROK - success
4493 * ****************************************************************/
4494 uint8_t parsePdschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc)
4496 uint16_t startSymbol;
4499 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschTimeDomainRsrcAlloc));
4500 cur = cur -> xmlChildrenNode;
4503 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K0")) && (cur->ns == ns))
4505 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4508 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
4510 pdschTimeDomRsrcAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4513 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
4515 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4518 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
4520 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4525 pdschTimeDomRsrcAlloc->sliv = calcSliv(startSymbol, lenSymbol);
4529 /*******************************************************************
4531 * @brief Fill PDSCH Configuration Common
4535 * Function : parsePdschCfgCommon
4537 * Functionality: Fill PDSCH Configuration Common
4539 * @params[in] XML document pointer
4541 * Current node in XML
4542 * Pointer to structure to be filled
4543 * @return ROK - success
4546 * ****************************************************************/
4547 uint8_t parsePdschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschCfgCommon *pdschCfgCmn)
4550 xmlNodePtr child = NULLP;
4551 xmlNodePtr listChild = NULLP;
4553 memset(pdschCfgCmn, 0, sizeof(PdschCfgCommon));
4554 cur = cur -> xmlChildrenNode;
4557 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
4559 pdschCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4562 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRS_ALLOC")) && (cur->ns == ns))
4564 pdschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4567 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
4569 child = cur->xmlChildrenNode;
4570 while (child != NULL)
4572 if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
4574 listChild = child->xmlChildrenNode;
4575 while (listChild != NULL)
4577 if ((!xmlStrcmp(listChild->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC")) && (listChild->ns == ns))
4579 if(parsePdschTimeDomRsrcAlloc(doc, ns, listChild, &pdschCfgCmn->timeDomAlloc[idx]) != ROK)
4585 listChild = listChild->next;
4588 child = child->next;
4596 /*******************************************************************
4598 * @brief Fill BCCH Configuration
4602 * Function : parseBcchCfg
4604 * Functionality: Fill BCCH Configuration
4606 * @params[in] XML document pointer
4608 * Current node in XML
4609 * Pointer to structure to be filled
4610 * @return ROK - success
4613 * ****************************************************************/
4614 uint8_t parseBcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BcchCfg *bcchCfg)
4616 memset(bcchCfg, 0, sizeof(BcchCfg));
4617 cur = cur -> xmlChildrenNode;
4620 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MOB_PRD_COEFF")) && (cur->ns == ns))
4622 bcchCfg->modPrdCoeff = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4629 /*******************************************************************
4631 * @brief Fill PDCCH Configuration Common
4635 * Function : parsePdcchConfigCommon
4637 * Functionality: Fill PDCCH Configuration Common
4639 * @params[in] XML document pointer
4641 * Current node in XML
4642 * Pointer to structure to be filled
4643 * @return ROK - success
4646 * ****************************************************************/
4647 uint8_t parsePdcchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdcchCfgCommon *pdccgCfgCmn)
4650 xmlNodePtr child = NULLP;
4651 xmlNodePtr listChild = NULLP;
4653 memset(pdccgCfgCmn, 0, sizeof( PdcchCfgCommon));
4654 cur = cur -> xmlChildrenNode;
4657 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
4659 pdccgCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4662 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
4664 pdccgCfgCmn->ctrlRsrcSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4667 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
4669 pdccgCfgCmn->searchSpcZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4672 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID")) && (cur->ns == ns))
4674 pdccgCfgCmn->searchSpcId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4677 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CTRL_RSRC_SET_ID")) && (cur->ns == ns))
4679 pdccgCfgCmn->ctrlRsrcSetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4682 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_SLOT_PRD_OFFPRESENT")) && (cur->ns == ns))
4684 pdccgCfgCmn->monitorSlotPrdAndOffPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4687 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
4689 child = cur->xmlChildrenNode;
4692 if ((!xmlStrcmp(child->name, (const xmlChar *)"MONITOR_LIST")) && (child->ns == ns))
4694 listChild = child->xmlChildrenNode;
4695 while (listChild != NULL)
4697 if ((!xmlStrcmp(listChild->name, (const xmlChar *)"MONITOR_SYMBOL_INSLOT")) && (listChild->ns == ns))
4699 pdccgCfgCmn->monitorSymbolsInSlot[idx] = atoi((char *)xmlNodeListGetString(doc, listChild->xmlChildrenNode, 1));
4702 listChild = listChild->next;
4705 child = child->next;
4709 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUMC_AGG_LVL1")) && (cur->ns == ns))
4711 pdccgCfgCmn->numCandAggLvl1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4714 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUMC_AGG_LVL2")) && (cur->ns == ns))
4716 pdccgCfgCmn->numCandAggLvl2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4719 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUMC_AGG_LVL4")) && (cur->ns == ns))
4721 pdccgCfgCmn->numCandAggLvl4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4724 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUMC_AGG_LVL8")) && (cur->ns == ns))
4726 pdccgCfgCmn->numCandAggLvl8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4729 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUMC_AGG_LVL16")) && (cur->ns == ns))
4731 pdccgCfgCmn->numCandAggLvl16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4734 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPC_TYPE")) && (cur->ns == ns))
4736 pdccgCfgCmn->searchSpcType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4739 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SERACH_SPACE_DCI_FORMAT")) && (cur->ns == ns))
4741 pdccgCfgCmn->commSrchSpcDciFrmt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4744 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_SIB1")) && (cur->ns == ns))
4746 pdccgCfgCmn->searchSpcSib1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4749 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_PAGING")) && (cur->ns == ns))
4751 pdccgCfgCmn->pagingSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4754 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_PDCCH_SEARCH_SPACE_ID_PAGING")) && (cur->ns == ns))
4756 pdccgCfgCmn->raSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4764 /*******************************************************************
4766 * @brief Fill DL Configuration Common
4770 * Function : parseDlCfgCommon
4772 * Functionality: Fill DL Configuration Common
4774 * @params[in] XML document pointer
4776 * Current node in XML
4777 * Pointer to structure to be filled
4778 * @return ROK - success
4781 * ****************************************************************/
4782 uint8_t parseDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,DlCfgCommon *dlCfgCmn)
4784 memset(dlCfgCmn, 0, sizeof(DlCfgCommon));
4785 cur = cur -> xmlChildrenNode;
4788 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
4790 dlCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4793 if ((!xmlStrcmp(cur->name, (const xmlChar *)"OFFSET_TO_POINT_A")) && (cur->ns == ns))
4795 dlCfgCmn->offsetToPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4798 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
4800 dlCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4803 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
4805 if(parseScsSpecCarrier(doc, ns, cur, &dlCfgCmn->dlScsCarrier) != ROK)
4811 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
4813 if(parsePdcchConfigCommon(doc, ns, cur, &dlCfgCmn->pdcchCfg) != ROK)
4819 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
4821 if(parsePdschCfgCommon(doc, ns, cur, &dlCfgCmn->pdschCfg) != ROK)
4827 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCCH_CFG")) && (cur->ns == ns))
4829 if(parseBcchCfg(doc, ns, cur, &dlCfgCmn->bcchCfg) != ROK)
4835 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PCCH_CFG")) && (cur->ns == ns))
4837 if(parsePcchCfg(doc, ns, cur, &dlCfgCmn->pcchCfg) != ROK)
4847 /*******************************************************************
4849 * @brief Fill Serving Cell Config Common SIB
4853 * Function : parseSrvCellCfgCmnSib
4855 * Functionality: Fill Serving Cell Config Common SIB
4857 * @params[in] XML document pointer
4859 * Current node in XML
4860 * Pointer to structure to be filled
4861 * @return ROK - success
4864 * ****************************************************************/
4865 uint8_t parseSrvCellCfgCmnSib(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SrvCellCfgCommSib *srvCellCfgCmnSib)
4867 memset(srvCellCfgCmnSib, 0, sizeof(SrvCellCfgCommSib));
4868 cur = cur -> xmlChildrenNode;
4871 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
4873 srvCellCfgCmnSib->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4876 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_POS_INBURST")) && (cur->ns == ns))
4878 srvCellCfgCmnSib->ssbPosInBurst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4881 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIODICITY")) && (cur->ns == ns))
4883 srvCellCfgCmnSib->ssbPrdServingCell = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4886 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBCH_PWR")) && (cur->ns == ns))
4888 srvCellCfgCmnSib->ssPbchBlockPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4891 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_CFG_COMMON")) && (cur->ns == ns))
4893 if(parseDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->dlCfg) != ROK)
4899 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_CFG_COMMON")) && (cur->ns == ns))
4901 if(parseUlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->ulCfg) != ROK)
4907 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_UL_DL_CFG_COMMON")) && (cur->ns == ns))
4909 if(parseTddUlDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->tddCfg) != ROK)
4920 /*******************************************************************
4922 * @brief Fill SI Scheduling Information
4926 * Function : parseSiSchedInfo
4928 * Functionality: Fill SI Scheduling Information
4930 * @params[in] XML document pointer
4932 * Current node in XML
4933 * Pointer to structure to be filled
4934 * @return ROK - success
4937 * ****************************************************************/
4938 uint8_t parseSiSchedInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SiSchedInfo *siSchedInfo)
4940 memset(siSchedInfo, 0, sizeof(SiSchedInfo));
4941 cur = cur -> xmlChildrenNode;
4944 if ((!xmlStrcmp(cur->name, (const xmlChar *)"WIN_LEN")) && (cur->ns == ns))
4946 siSchedInfo->winLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4949 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BROADCAST_STA")) && (cur->ns == ns))
4951 siSchedInfo->broadcastSta = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4954 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY")) && (cur->ns == ns))
4956 siSchedInfo->preiodicity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4959 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB_TYPE")) && (cur->ns == ns))
4961 siSchedInfo->sibType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4964 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_VAL_TAG")) && (cur->ns == ns))
4966 siSchedInfo->sibValTag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4974 /*******************************************************************
4976 * @brief Fill SIB1 Parameters
4980 * Function : parseSib1Params
4982 * Functionality: Fill SIB1 Parameters
4984 * @params[in] XML document pointer
4986 * Current node in XML
4987 * Pointer to structure to be filled
4988 * @return ROK - success
4991 * ****************************************************************/
4992 uint8_t parseSib1Params(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,Sib1Params *sib1Params)
4994 memset(sib1Params, 0, sizeof(Sib1Params));
4995 cur = cur -> xmlChildrenNode;
4998 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
5000 if(parsePlmn(doc, ns, cur, &sib1Params->plmn) != ROK)
5006 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
5008 sib1Params-> tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5011 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RANAC")) && (cur->ns == ns))
5013 sib1Params->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5016 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_IDENTITY")) && (cur->ns == ns))
5018 sib1Params->cellIdentity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5021 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_RESVD_OPUSE")) && (cur->ns == ns))
5023 sib1Params->cellResvdForOpUse = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5026 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_CNT")) && (cur->ns == ns))
5028 sib1Params->connEstFailCnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5031 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFF_VALID")) && (cur->ns == ns))
5033 sib1Params->connEstFailOffValidity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5036 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFFSET")) && (cur->ns == ns))
5038 sib1Params->connEstFailOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5041 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SI_SHED_INFO")) && (cur->ns == ns))
5043 if(parseSiSchedInfo(doc, ns, cur, &sib1Params->siSchedInfo) != ROK)
5049 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SRV_CELLCFG_COM_SIB")) && (cur->ns == ns))
5051 if(parseSrvCellCfgCmnSib(doc, ns, cur, &sib1Params->srvCellCfgCommSib) != ROK)
5062 /*******************************************************************
5064 * @brief Fill RRM Policy List
5068 * Function : parseRrmPolicyList
5070 * Functionality: Fill RRM Policy List
5072 * @params[in] XML document pointer
5074 * Current node in XML
5075 * Pointer to structure to be filled
5076 * @return ROK - success
5079 * ****************************************************************/
5080 uint8_t parseRrmPolicyList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,RrmPolicyMemberList *rrmPolicyMemberList)
5082 memset(rrmPolicyMemberList, 0, sizeof(RrmPolicyMemberList));
5083 cur = cur->xmlChildrenNode;
5086 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
5088 if(parsePlmn(doc, ns, cur, &rrmPolicyMemberList->plmn) != ROK)
5094 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI")) && (cur->ns == ns))
5096 if(parseSnssai(doc, ns, cur, &rrmPolicyMemberList->snssai) != ROK)
5107 /*******************************************************************
5109 * @brief Fill RRM Policy Ratio
5113 * Function : parseRrmPolicyRatio
5115 * Functionality: Fill RRM Policy Ratio
5117 * @params[in] XML document pointer
5119 * Current node in XML
5120 * Pointer to structure to be filled
5121 * @return ROK - success
5124 * ****************************************************************/
5125 uint8_t parseRrmPolicyRatio(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RrmPolicyRatio *rrmPolicyRatio)
5127 memset(rrmPolicyRatio, 0, sizeof(RrmPolicyRatio));
5128 cur = cur -> xmlChildrenNode;
5131 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_RATIO")) && (cur->ns == ns))
5133 rrmPolicyRatio->maxRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5136 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_RATIO")) && (cur->ns == ns))
5138 rrmPolicyRatio->minRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5141 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEDICATED_RATIO")) && (cur->ns == ns))
5143 rrmPolicyRatio->dedicatedRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5151 /*******************************************************************
5152 /*******************************************************************
5154 * @brief Fill MAC Slice RRM Policy
5158 * Function : parseMacSliceRrmPolicy
5160 * Functionality: Fill MAC Slice RRM Policy
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 parseMacSliceRrmPolicy(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MacSliceRrmPolicy *rrmPolicy)
5174 memset(rrmPolicy, 0, sizeof(MacSliceRrmPolicy));
5175 cur = cur -> xmlChildrenNode;
5178 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RESOURCE_TYPE")) && (cur->ns == ns))
5180 rrmPolicy->resourceType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5183 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRC_POLICY_MEM")) && (cur->ns == ns))
5185 rrmPolicy->numOfRrmPolicyMem = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5188 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_MUM_LIST")) && (cur->ns == ns))
5190 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList,\
5191 rrmPolicy->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
5193 if(!rrmPolicy->rRMPolicyMemberList)
5195 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
5199 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
5201 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList[memIdx], sizeof(RrmPolicyMemberList));
5202 if (rrmPolicy->rRMPolicyMemberList[memIdx] == NULLP)
5204 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
5208 if(parseRrmPolicyList(doc, ns, cur, rrmPolicy->rRMPolicyMemberList[memIdx]) != ROK)
5215 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_RATIO")) && (cur->ns == ns))
5217 if(parseRrmPolicyRatio(doc, ns, cur, &rrmPolicy->policyRatio) != ROK)
5228 /*******************************************************************
5230 * @brief Fill MAC Slice Configuration
5234 * Function : parseMacSliceCfgReq
5236 * Functionality: Fill MAC Slice Configuration
5238 * @params[in] XML document pointer
5240 * Current node in XML
5241 * Pointer to structure to be filled
5242 * @return ROK - success
5245 * ****************************************************************/
5246 uint8_t parseMacSliceCfgReq(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacSliceCfgReq *macSliceCfgReq)
5248 uint8_t policyIdx = 0;
5249 memset(macSliceCfgReq, 0, sizeof(MacSliceCfgReq));
5250 cur = cur -> xmlChildrenNode;
5253 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRC_POLICY")) && (cur->ns == ns))
5255 macSliceCfgReq->numOfRrmPolicy = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5258 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_SLICE_RRM_POLICY")) && (cur->ns == ns))
5260 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy, macSliceCfgReq->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
5261 if(!macSliceCfgReq->listOfRrmPolicy)
5263 DU_LOG("\nERROR --> DU APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
5267 for(policyIdx = 0; policyIdx < macSliceCfgReq->numOfRrmPolicy; policyIdx++)
5269 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
5270 if (macSliceCfgReq->listOfRrmPolicy[policyIdx] == NULLP)
5272 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
5275 if(parseMacSliceRrmPolicy(doc, ns, cur, macSliceCfgReq->listOfRrmPolicy[policyIdx]) != ROK)
5286 /*******************************************************************
5288 * @brief Fill DU Config Parmeters
5292 * Function : parseDuCfgParams
5296 * @params[in] XML document pointer
5298 * Current node in XML
5299 * @return ROK - success
5302 * ****************************************************************/
5303 uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
5305 char *tempDuName = "";
5313 memset(&duCfgParam, 0, sizeof(struct duCfgParams));
5314 cur = cur->xmlChildrenNode;
5317 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_DRB")) && (cur->ns == ns))
5319 duCfgParam.maxNumDrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5322 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE_SUPPORTED")) && (cur->ns == ns))
5324 duCfgParam.maxSupportedUes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5327 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_ID")) && (cur->ns == ns))
5329 duCfgParam.duId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5332 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_NAME")) && (cur->ns == ns))
5334 tempDuName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5335 DU_ALLOC(duCfgParam.duName, strlen(tempDuName));
5336 if(!duCfgParam.duName)
5338 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
5341 strcpy((char*)duCfgParam.duName, tempDuName);
5344 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE")) && (cur->ns == ns))
5346 duCfgParam.maxUe = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5350 if( getStartupConfig(&g_cfg) != ROK )
5354 cmInetAddr((S8*)g_cfg.DU_IPV4_Addr, &duIp);
5355 cmInetAddr((S8*)g_cfg.CU_IPV4_Addr, &cuIp);
5356 cmInetAddr((S8*)g_cfg.RIC_IPV4_Addr, &ricIp);
5359 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_IP_V4_ADDR")) && (cur->ns == ns))
5361 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5362 cmInetAddr(duIpV4Addr, &(duIp));
5365 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CU_IP_V4_ADDR")) && (cur->ns == ns))
5367 cuIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5368 cmInetAddr(cuIpV4Addr, &(cuIp));
5371 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_IP_V4_ADDR")) && (cur->ns == ns))
5373 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5374 cmInetAddr(ricIpV4Addr, &(ricIp));
5378 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP")) && (cur->ns == ns))
5380 if(parseSctpParams(doc, ns, cur, &duCfgParam.sctpParams) != ROK)
5384 duCfgParam.sctpParams.duIpAddr.ipV4Pres = true;
5385 duCfgParam.sctpParams.duIpAddr.ipV4Addr = duIp;
5386 duCfgParam.sctpParams.cuIpAddr.ipV4Pres = true;
5387 duCfgParam.sctpParams.cuIpAddr.ipV4Addr = cuIp;
5388 duCfgParam.sctpParams.ricIpAddr.ipV4Pres = true;
5389 duCfgParam.sctpParams.ricIpAddr.ipV4Addr = ricIp;
5392 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP")) && (cur->ns == ns))
5394 if(parseEgtpParams(doc, ns, cur, &duCfgParam.egtpParams) != ROK)
5398 duCfgParam.egtpParams.localIp.ipV4Addr = duIp;
5399 duCfgParam.egtpParams.localIp.ipV4Pres = true;
5400 duCfgParam.egtpParams.destIp.ipV4Pres = true;
5401 duCfgParam.egtpParams.destIp.ipV4Addr = cuIp;
5402 duCfgParam.egtpParams.maxTunnelId = duCfgParam.maxNumDrb * duCfgParam.maxSupportedUes;
5405 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIB_PARAMS")) && (cur->ns == ns))
5407 if(parseMibParams(doc, ns, cur, &duCfgParam.mibParams) != ROK)
5413 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_RRC_VERSION")) && (cur->ns == ns))
5415 if(parseF1RrcVersion(doc, ns, cur, &duCfgParam.rrcVersion) != ROK)
5421 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_SRVD_CELL_INFO")) && (cur->ns == ns))
5423 if(parseF1DuServedCellInfo(doc, ns, cur, &duCfgParam.srvdCellLst[0]) != ROK)
5429 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_CFG")) && (cur->ns == ns))
5431 if(parseMacCellCfg(doc, ns, cur, &duCfgParam.macCellCfg) != ROK)
5437 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_PARAMS")) && (cur->ns == ns))
5439 if(parseSib1Params(doc, ns, cur, &duCfgParam.sib1Params) != ROK)
5445 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SLICE_CFG")) && (cur->ns == ns))
5447 if(parseMacSliceCfgReq(doc, ns, cur, &duCfgParam.tempSliceCfg) != ROK)
5459 /*******************************************************************
5461 * @brief Reads config and posts message to du_app on completion
5465 * Function : duReadCfg
5468 * - Reads configuration from xml file and stores in DB
5469 * - Post to du_app for further processing
5472 * @return ROK - success
5475 * ****************************************************************/
5478 #ifdef XML_BASED_CONFIG
5479 const char *filename = "../build/config/odu_config.xml";
5480 xmlDocPtr doc = NULLP;
5481 xmlNodePtr cur = NULLP;
5482 xmlNsPtr ns = NULLP;
5484 doc = xmlParseFile(filename);
5487 DU_LOG("\nERROR --> DU_APP: Failed to parse the XML file");
5491 cur = xmlDocGetRootElement(doc);
5492 ns = xmlSearchNsByHref(doc, cur, (const xmlChar *)"odu_config.xml");
5495 DU_LOG("\nERROR --> DU_APP: XML Namespace not found.\n");
5501 parseDuCfgParams(doc, ns, cur);
5510 memset(&duCfgParam, 0, sizeof(DuCfgParams));
5512 /* Read configs into duCfgParams */
5513 if(readCfg() != ROK)
5515 DU_LOG("\nERROR --> DU_APP : Reading configuration failed");
5520 /* Fill pst structure */
5521 memset(&(pst), 0, sizeof(Pst));
5522 pst.srcEnt = (Ent)ENTDUAPP;
5523 pst.srcInst = (Inst)DU_INST;
5524 pst.srcProcId = DU_PROC;
5525 pst.dstEnt = pst.srcEnt;
5526 pst.dstInst = pst.srcInst;
5527 pst.dstProcId = pst.srcProcId;
5529 pst.selector = ODU_SELECTOR_TC;
5532 /* Initialize the timer blocks */
5533 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2SetupTimer), 1);
5534 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.ricServiceUpdateTimer.timer), 1);
5535 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2NodeConfigUpdate.timer), 1);
5537 /* Initialzie the timer queue */
5538 memset(&(duCb.duTimersInfo.tmrTq), 0, sizeof(CmTqType) * DU_TQ_SIZE);
5540 /* Initialize the timer control point */
5541 memset(&(duCb.duTimersInfo.tmrTqCp), 0, sizeof(CmTqCp));
5542 duCb.duTimersInfo.tmrTqCp.tmrLen = DU_TQ_SIZE;
5544 /* Initialize the timer resolution */
5545 duCb.duTimersInfo.tmrRes = DU_TIMER_RESOLUTION;
5547 /* Timer Registration request to system services */
5548 if (ODU_REG_TMR_MT(pst.srcEnt, pst.srcInst, duCb.duTimersInfo.tmrRes, duActvTmr) != ROK)
5550 DU_LOG("\nERROR --> DU_APP : Failed to register timer");
5554 if(ODU_GET_MSG_BUF(DFLT_REGION, DU_POOL, &mBuf) != ROK)
5556 DU_LOG("\nERROR --> DU_APP : Memory allocation failed in duReadCfg");
5560 if (ODU_POST_TASK(&pst, mBuf) != ROK)
5562 DU_LOG("\nERROR --> DU_APP : ODU_POST_TASK failed in duReadCfg");
5569 /*******************************************************************
5571 * @brief Prints all DU Configuration
5575 * Function : printDuConfig
5578 * - Prints all DU configurations
5583 * ****************************************************************/
5584 void printDuConfig()
5586 uint8_t sliceIdx = 0, pfIdx = 0, rsrcIdx = 0, ssbMaskIdx = 0, fdmIdx = 0;
5587 uint8_t monitoringSymbIdx = 0, poIdx = 0, policyIdx = 0, memIdx = 0;
5588 __attribute__((unused)) SctpParams *sctp;
5589 __attribute__((unused)) F1EgtpParams *egtp;
5590 __attribute__((unused)) MibParams *mib;
5591 __attribute__((unused)) F1RrcVersion *f1RrcVersion;
5592 F1DuCellInfo *f1DuCellInfo;
5593 F1CellInfo *f1CellInfo;
5594 __attribute__((unused)) F1DuSysInfo *duSysInfo;
5595 __attribute__((unused)) F1BrdcstPlmnInfo *brdcstPlmnInfo;
5596 NrModeInfo *nrModeInfo;
5597 __attribute__((unused)) F1NrFddInfo *f1NrFddInfo;
5598 F1SrvdPlmn *srvdPlmn;
5599 SupportedSliceList *sliceSuppLst;
5600 MacCellCfg *macCellCfg;
5601 __attribute__((unused)) CarrierCfg *carrierCfg;
5603 PlmnInfoList *plmnInfoList;
5604 Sib1CellCfg *sib1Cfg;
5605 SchPageCfg *pageCfg;
5606 __attribute__((unused)) PdcchConfigSib1 *pdcchConfigSib1;
5607 BwpDlConfig *bwpDlCfg;
5608 __attribute__((unused)) BwpParams *bwp;
5609 PdcchConfigCommon *pdcchCfgCmn;
5610 SearchSpaceCfg *searchSpaceCfg;
5611 __attribute__((unused)) CandidatesInfo *candidateInfo;
5612 PdschConfigCommon *pdschCfgCmn;
5613 __attribute__((unused)) PdschCfgCommTimeDomRsrcAlloc *pdschCmnTimeDomRsrcAlloc;
5614 BwpUlConfig *bwpUlCfg;
5615 __attribute__((unused)) PucchConfigCommon *pucchCfgCmn;
5616 PuschConfigCommon *puschCfgCmn;
5617 __attribute__((unused)) PuschTimeDomRsrcAlloc *puschTimeDomRsrcAlloc;
5618 __attribute__((unused)) SsbCfg *ssbCfg;
5619 __attribute__((unused)) CsiRsCfg *csiRsCfg;
5621 __attribute__((unused)) PrachFdmInfo *prachFdmInfo;
5622 __attribute__((unused)) PrecodingConf *precodCfg;
5623 __attribute__((unused)) BeamformingConf *beamFormingCfg;
5624 Sib1Params *sib1Params;
5625 __attribute__((unused)) SiSchedInfo *siSchedInfo;
5626 SrvCellCfgCommSib *srvCellCfgCmnSib;
5627 DlCfgCommon *dlCfgCmn;
5628 PdcchCfgCommon *pdcchCfgCommon;
5629 PdschCfgCommon *pdschCfgCommon;
5630 __attribute__((unused)) PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc;
5631 __attribute__((unused)) BcchCfg *bcchCfg;
5632 __attribute__((unused)) PcchCfg *pcchCfg;
5633 UlCfgCommon *ulCfgCmn;
5634 RachCfgCommon *rachCfgCmn;
5635 PuschCfgCommon *puschCfgCommon;
5636 __attribute__((unused)) PuschCfgCmnTimeDomAlloc *puschCmnTimeDomRsrsAlloc;
5637 PucchCfgCommon *pucchCfgCommon;
5638 __attribute__((unused)) TddUlDlCfgCommon *tddUlDlCfgCmn;
5639 MacSliceCfgReq *macSliceCfg;
5640 MacSliceRrmPolicy *rrmPolicy;
5641 __attribute__((unused)) RrmPolicyRatio *rrmPolicyRatio;
5642 __attribute__((unused)) RrmPolicyMemberList *rrmPolicyMemberList;
5645 F1NrTddInfo *f1NrTddInfo;
5649 DU_LOG("\n ** DU CONFIGURATION ** \n");
5650 DU_LOG("DU ID %d\n", duCfgParam.duId);
5651 DU_LOG("DU Name %s\n", duCfgParam.duName);
5652 DU_LOG("MAX NUM DRB %d\n", duCfgParam.maxNumDrb);
5653 DU_LOG("MAX SUPPORTED UE %d\n", duCfgParam.maxSupportedUes);
5654 DU_LOG("MAX UE %d\n",duCfgParam.maxUe);
5656 sctp = &duCfgParam.sctpParams;
5657 DU_LOG("\n ** SCTP PARAMETER ** \n");
5658 DU_LOG("DU IPv4 Address present %u\n", sctp->duIpAddr.ipV4Pres);
5659 DU_LOG("DU IP Address %u\n", sctp->duIpAddr.ipV4Addr);
5660 DU_LOG("CU IPv4 Address present %u\n", sctp->cuIpAddr.ipV4Pres);
5661 DU_LOG("CU IP Address %u\n", sctp->cuIpAddr.ipV4Addr);
5662 DU_LOG("RIC IPv4 Address present %u\n", sctp->ricIpAddr.ipV4Pres);
5663 DU_LOG("RIC IP Address %u\n", sctp->ricIpAddr.ipV4Addr);
5664 DU_LOG("SCTP Port at DU for F1 Interface %d\n", sctp->duPort[F1_INTERFACE]);
5665 DU_LOG("SCTP Port at CU for F1 Interface %d\n", sctp->cuPort);
5666 DU_LOG("SCTP Port at DU for E2 Interface %d\n", sctp->duPort[E2_INTERFACE]);
5667 DU_LOG("SCTP Port at RIC for E2 Interface %d\n", sctp->ricPort);
5669 egtp = &duCfgParam.egtpParams;
5670 DU_LOG("\n ** EGTP PARAMETER ** \n");
5671 DU_LOG("DU IP Address %d\n", egtp->localIp.ipV4Addr);
5672 DU_LOG("CU IP Address %d\n", egtp->destIp.ipV4Addr);
5673 DU_LOG("EGTP Port at DU %d\n", egtp->localPort);
5674 DU_LOG("EGTP Port at CU %d\n", egtp->destPort);
5675 DU_LOG("Minimum Tunnel ID %d\n", egtp->minTunnelId);
5676 DU_LOG("Maximum Tunnel ID %d\n",egtp->maxTunnelId);
5678 mib = &duCfgParam.mibParams;
5679 DU_LOG("\n ** MIB PARAMETER ** \n");
5680 DU_LOG("System Frame Number %d\n", mib->sysFrmNum);
5681 DU_LOG("Subcarrier Spacing Common %ld\n", mib->subCarrierSpacingCommon);
5682 DU_LOG("SSB Subcarrier Offset %ld\n", mib->ssb_SubcarrierOffset);
5683 DU_LOG("DMRS Type-A Position %ld\n", mib->dmrs_TypeA_Position);
5684 DU_LOG("Control Resource Set Zero %ld\n", mib->controlResourceSetZero);
5685 DU_LOG("Search Space Zero %ld\n", mib->searchSpaceZero);
5686 DU_LOG("Cell Barred %ld\n", mib->cellBarred);
5687 DU_LOG("Intra Frequency Reselection %ld\n", mib->intraFreqReselection);
5689 f1RrcVersion = &duCfgParam.rrcVersion;
5690 DU_LOG("\n ** RRC Version ** \n");
5691 DU_LOG("RRC Version %s\n", f1RrcVersion->rrcVer);
5692 DU_LOG("Extended RRC Version %d\n", f1RrcVersion->extRrcVer);
5694 duSysInfo = &duCfgParam.srvdCellLst[0].duSysInfo;
5695 DU_LOG("\n ** DU System Information ** \n");
5696 DU_LOG("MIB length %d\n", duSysInfo->mibLen);
5697 DU_LOG("MIB message %s\n", duSysInfo->mibMsg);
5698 DU_LOG("SIB1 length %d\n", duSysInfo->sib1Len);
5699 DU_LOG("SIB1 message %s\n", duSysInfo->sib1Msg);
5701 f1DuCellInfo = &duCfgParam.srvdCellLst[0].duCellInfo;
5702 DU_LOG("\n ** DU Cell Information ** \n");
5704 f1CellInfo = &f1DuCellInfo->cellInfo;
5705 DU_LOG("NR PCI %d\n", f1CellInfo->nrPci);
5706 DU_LOG("DU TAC %d\n", f1DuCellInfo->tac);
5707 DU_LOG("EPS TAC %d\n", f1DuCellInfo->epsTac);
5708 DU_LOG("Measurement Time Configuration Duration %d\n", f1DuCellInfo->measTimeCfgDuration);
5709 DU_LOG("Cell Direction %d\n", f1DuCellInfo->cellDir);
5710 DU_LOG("Cell Type %d\n", f1DuCellInfo->cellType);
5712 DU_LOG("\n ** Cell Info : NR CGI ** \n");
5713 DU_LOG("Cell Id %d\n",f1CellInfo->nrCgi.cellId);
5714 DU_LOG("PLMN : mcc[0] %d\n", f1CellInfo->nrCgi.plmn.mcc[0]);
5715 DU_LOG("PLMN : mcc[1] %d\n", f1CellInfo->nrCgi.plmn.mcc[1]);
5716 DU_LOG("PLMN : mcc[2] %d\n", f1CellInfo->nrCgi.plmn.mcc[2]);
5717 DU_LOG("PLMN : mnc[0] %d\n", f1CellInfo->nrCgi.plmn.mnc[0]);
5718 DU_LOG("PLMN : mnc[1] %d\n", f1CellInfo->nrCgi.plmn.mnc[1]);
5719 DU_LOG("PLMN : mnc[2] %d\n", f1CellInfo->nrCgi.plmn.mnc[2]);
5721 srvdPlmn = &f1CellInfo->srvdPlmn[0];
5722 DU_LOG("\n ** Cell Info : Served PLMN ** \n");
5723 DU_LOG("PLMN : mcc[0] %d\n", srvdPlmn->plmn.mcc[0]);
5724 DU_LOG("PLMN : mcc[1] %d\n", srvdPlmn->plmn.mcc[1]);
5725 DU_LOG("PLMN : mcc[2] %d\n", srvdPlmn->plmn.mcc[2]);
5726 DU_LOG("PLMN : mnc[0] %d\n", srvdPlmn->plmn.mnc[0]);
5727 DU_LOG("PLMN : mnc[1] %d\n", srvdPlmn->plmn.mnc[1]);
5728 DU_LOG("PLMN : mnc[2] %d\n", srvdPlmn->plmn.mnc[2]);
5729 DU_LOG("EXT_PLMN : mcc[0] %d\n", srvdPlmn->extPlmn.mcc[0]);
5730 DU_LOG("EXT_PLMN : mcc[1] %d\n", srvdPlmn->extPlmn.mcc[1]);
5731 DU_LOG("EXT_PLMN : mcc[2] %d\n", srvdPlmn->extPlmn.mcc[2]);
5732 DU_LOG("EXT_PLMN : mnc[0] %d\n", srvdPlmn->extPlmn.mnc[0]);
5733 DU_LOG("EXT_PLMN : mnc[1] %d\n", srvdPlmn->extPlmn.mnc[1]);
5734 DU_LOG("EXT_PLMN : mnc[2] %d\n", srvdPlmn->extPlmn.mnc[2]);
5736 sliceSuppLst = &srvdPlmn->taiSliceSuppLst;
5737 DU_LOG("\n ** Cell Info : Served PLMN : Supported Slice List ** \n");
5738 DU_LOG("Number of Slices supported %d\n", sliceSuppLst->numSupportedSlices);
5739 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
5742 DU_LOG("\tSST %d\n", (*sliceSuppLst->snssai[sliceIdx]).sst);
5743 DU_LOG("\tSD %d %d %d\n", (*sliceSuppLst->snssai[sliceIdx]).sd[0], (*sliceSuppLst->snssai[sliceIdx]).sd[1], \
5744 (*sliceSuppLst->snssai[sliceIdx]).sd[2]);
5747 brdcstPlmnInfo = &f1DuCellInfo->brdcstPlmnInfo[0];
5748 DU_LOG("\n ** DU Cell Information : Broadcast PLMN Info ** \n");
5749 DU_LOG("TAC %d\n", brdcstPlmnInfo->tac);
5750 DU_LOG("NR Cell Id %d\n", brdcstPlmnInfo->nrCellId);
5751 DU_LOG("RANAC %d\n", brdcstPlmnInfo->ranac);
5753 DU_LOG("PLMN : mcc[0] %d\n", brdcstPlmnInfo->plmn[0].mcc[0]);
5754 DU_LOG("PLMN : mcc[1] %d\n", brdcstPlmnInfo->plmn[0].mcc[1]);
5755 DU_LOG("PLMN : mcc[2] %d\n", brdcstPlmnInfo->plmn[0].mcc[2]);
5756 DU_LOG("PLMN : mnc[0] %d\n", brdcstPlmnInfo->plmn[0].mnc[0]);
5757 DU_LOG("PLMN : mnc[1] %d\n", brdcstPlmnInfo->plmn[0].mnc[1]);
5758 DU_LOG("PLMN : mnc[2] %d\n", brdcstPlmnInfo->plmn[0].mnc[2]);
5760 DU_LOG("EXT_PLMN : mcc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[0]);
5761 DU_LOG("EXT_PLMN : mcc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[1]);
5762 DU_LOG("EXT_PLMN : mcc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[2]);
5763 DU_LOG("EXT_PLMN : mnc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[0]);
5764 DU_LOG("EXT_PLMN : mnc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[1]);
5765 DU_LOG("EXT_PLMN : mnc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[2]);
5767 nrModeInfo = &f1DuCellInfo->f1Mode;
5768 f1NrFddInfo = &nrModeInfo->mode.fdd;
5769 DU_LOG("\n ** DU Cell Information : NR Mode Info ** \n");
5771 DU_LOG("\n ** NR Mode Info : FDD ** \n");
5772 DU_LOG("\n ** NR Mode Info : FDD : UL NR Frequency ** \n");
5773 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->ulNrFreqInfo.nrArfcn);
5774 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->ulNrFreqInfo.sulInfo.sulArfcn);
5775 DU_LOG("SUL : Transmission BW Subcarrier Spacing %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrScs);
5776 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrb);
5777 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].nrFreqBand);
5778 DU_LOG("SUL Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].sulBand[0]);
5780 DU_LOG("\n ** NR Mode Info : FDD : DL NR Frequency ** \n");
5781 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->dlNrFreqInfo.nrArfcn);
5782 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->dlNrFreqInfo.sulInfo.sulArfcn);
5783 DU_LOG("SUL : Transmission BW Subcarrier Sapcing %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrScs);
5784 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrb);
5785 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].nrFreqBand);
5786 DU_LOG("SUL Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].sulBand[0]);
5788 DU_LOG("\n ** NR Mode Info : FDD : UL Transmission Bandwidth ** \n");
5789 DU_LOG("Subscarrier spacing %d\n", f1NrFddInfo->ulTxBw.nrScs);
5790 DU_LOG("Number of RBs %d\n", f1NrFddInfo->ulTxBw.nrb);
5792 DU_LOG("\n ** NR Mode Info : FDD : DL Transmission Bandwidth ** \n");
5793 DU_LOG("Subcarrier Spacing %d\n", f1NrFddInfo->dlTxBw.nrScs);
5794 DU_LOG("Number of RBs %d\n", f1NrFddInfo->dlTxBw.nrb);
5798 f1NrTddInfo = &nrModeInfo ->mode.tdd;
5800 DU_LOG("\n ** NR Mode Info : TDD : NR Frequency ** \n");
5801 DU_LOG("NR ARFCN %d\n", f1NrTddInfo->nrFreqInfo.nrArfcn);
5802 DU_LOG("SUL : ARFCN %d\n",f1NrTddInfo->nrFreqInfo.sulInfo.sulArfcn);
5803 DU_LOG("SUL : Transmission BW Subscarrier Spacing %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrScs);
5804 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrb);
5805 DU_LOG("NR Frequency Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].nrFreqBand);
5806 DU_LOG("SUL Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].sulBand[0]);
5808 DU_LOG("\n ** NR Mode Info : TDD : NR Transmission Bandwidth ** \n");
5809 DU_LOG("Subcarrier Spacing %d\n", f1NrTddInfo->nrTxBw.nrScs);
5810 DU_LOG("Number of RBs %d\n", f1NrTddInfo->nrTxBw.nrb);
5813 macCellCfg = &duCfgParam.macCellCfg;
5814 DU_LOG("\n ** MAC CELL CONFIGURATION ** \n");
5815 DU_LOG("Cell Id %d\n", macCellCfg->cellId);
5817 DU_LOG("\n ** MAC Cell Configuration : Carrier Configuration ** \n");
5818 carrierCfg = &macCellCfg ->carrCfg;
5819 DU_LOG("DL Bandwidth %d\n", carrierCfg->dlBw);
5820 DU_LOG("DL ARFCN %d\n", carrierCfg->arfcnDL);
5821 DU_LOG("UL Bandwidth %d\n", carrierCfg->ulBw);
5822 DU_LOG("UL ARFCN %d\n", carrierCfg->arfcnUL);
5823 DU_LOG("Number of Transmission Antenna %d\n", carrierCfg->numTxAnt);
5824 DU_LOG("Number of Received Antenna %d\n", carrierCfg->numRxAnt);
5826 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration ** \n");
5827 cellCfg = &macCellCfg ->cellCfg;
5828 DU_LOG("Operational State %d\n", cellCfg->opState);
5829 DU_LOG("Administration State %d\n", cellCfg->adminState);
5830 DU_LOG("Cell Current State %d\n", cellCfg->cellState);
5831 DU_LOG("NR PCI %d\n", cellCfg->phyCellId);
5832 DU_LOG("TAC: %d\n", cellCfg->tac);
5833 DU_LOG("SSB Freqeuncy %d\n", cellCfg->ssbFreq);
5834 DU_LOG("Subcarrier Spacing: %d\n", cellCfg->subCarrSpacing);
5835 DU_LOG("Duplex Mode %d\n", cellCfg->dupType);
5837 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : PLMN Info List ** \n");
5838 plmnInfoList = &cellCfg ->plmnInfoList[0];
5839 DU_LOG("PLMN : mcc[0] %d\n", plmnInfoList->plmn.mcc[0]);
5840 DU_LOG("PLMN : mcc[1] %d\n", plmnInfoList->plmn.mcc[1]);
5841 DU_LOG("PLMN : mcc[2] %d\n", plmnInfoList->plmn.mcc[2]);
5842 DU_LOG("PLMN : mnc[0] %d\n", plmnInfoList->plmn.mnc[0]);
5843 DU_LOG("PLMN : mnc[1] %d\n", plmnInfoList->plmn.mnc[1]);
5844 DU_LOG("PLMN : mnc[2] %d\n", plmnInfoList->plmn.mnc[2]);
5846 DU_LOG("Number of Slice supported %d\n", plmnInfoList->suppSliceList.numSupportedSlices);
5847 for(sliceIdx = 0; sliceIdx < plmnInfoList->suppSliceList.numSupportedSlices; sliceIdx++)
5850 DU_LOG("\nSST %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sst);
5851 DU_LOG("\nSD %d %d %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[0], \
5852 (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[1],(*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[2]);
5855 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 ** \n");
5856 sib1Cfg = &cellCfg->sib1Cfg;
5857 DU_LOG("SIB1 PDU Length %d", sib1Cfg->sib1PduLen);
5858 DU_LOG("SIB1 PDU %s", sib1Cfg->sib1Pdu);
5860 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : Paging Configuration ** \n");
5861 pageCfg = &sib1Cfg->pagingCfg;
5863 DU_LOG("Number of Paging Occassion %d\n", pageCfg->numPO);
5864 if (pageCfg->poPresent == true)
5865 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : TRUE\n");
5867 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : FALSE\n");
5869 for(pfIdx = 0; pfIdx < MAX_PO_PER_PF; pfIdx++)
5871 DU_LOG("Paging Occassion at Paging Frame [%d] : %d\n", pfIdx, pageCfg->pagingOcc[pfIdx]);
5874 pdcchConfigSib1 = &sib1Cfg->pdcchCfgSib1;
5875 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : PDCCH ** \n");
5876 DU_LOG("Coreset Zero Index %d\n", pdcchConfigSib1->coresetZeroIndex);
5877 DU_LOG("Search Space Zero Index %d\n", pdcchConfigSib1->searchSpaceZeroIndex);
5879 bwpDlCfg = &cellCfg->initialDlBwp;
5880 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP Configuration ** \n");
5882 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : BWP ** \n");
5883 bwp = &bwpDlCfg->bwp;
5884 DU_LOG("First PRB %d\n", bwp->firstPrb);
5885 DU_LOG("Number of PRBs %d\n", bwp->numPrb);
5886 DU_LOG("Subcarrier Spacing %d\n", bwp->scs);
5887 DU_LOG("Cyclic Perfix %d\n", bwp->cyclicPrefix);
5889 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common ** \n");
5890 pdcchCfgCmn = &bwpDlCfg->pdcchCommon;
5891 DU_LOG("RA Search Space ID %d\n", pdcchCfgCmn->raSearchSpaceId);
5893 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common : Search Space ** \n");
5894 searchSpaceCfg = &pdcchCfgCmn->commonSearchSpace;
5895 DU_LOG("Search Space ID %d\n", searchSpaceCfg->searchSpaceId);
5896 DU_LOG("Coreset ID %d\n", searchSpaceCfg->coresetId);
5897 DU_LOG("Monitoring Slot %d\n", searchSpaceCfg->monitoringSlot);
5898 DU_LOG("Duration %d\n", searchSpaceCfg->duration);
5899 DU_LOG("Monitoring Symbol %x\n", searchSpaceCfg->monitoringSymbol);
5901 candidateInfo = &searchSpaceCfg->candidate;
5902 DU_LOG("Number of Candidates in Aggregation Level_1 %d\n", candidateInfo->aggLevel1);
5903 DU_LOG("Number of Candidates in Aggregation Level_2 %d\n", candidateInfo->aggLevel2);
5904 DU_LOG("Number of Candidates in Aggregation Level_4 %d\n", candidateInfo->aggLevel4);
5905 DU_LOG("Number of Candidates in Aggregation Level_8 %d\n", candidateInfo->aggLevel8);
5906 DU_LOG("Number of Candidates in Aggregation Level_16 %d\n", candidateInfo->aggLevel16);
5908 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDSCH Config Common ** \n");
5909 pdschCfgCmn = &bwpDlCfg->pdschCommon;
5910 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCmn->numTimeDomAlloc);
5912 for (rsrcIdx = 0; rsrcIdx < pdschCfgCmn->numTimeDomAlloc; rsrcIdx++)
5914 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
5915 pdschCmnTimeDomRsrcAlloc = &pdschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
5916 DU_LOG("\tK0 %d\n", pdschCmnTimeDomRsrcAlloc->k0);
5917 DU_LOG("\tPDSCH Mapping Type %d\n", pdschCmnTimeDomRsrcAlloc->mappingType);
5918 DU_LOG("\tPDSCH Start Symbol %d\n", pdschCmnTimeDomRsrcAlloc->startSymbol);
5919 DU_LOG("\tPDSCH Symbol Length %d\n", pdschCmnTimeDomRsrcAlloc->lengthSymbol);
5922 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP Configuration ** \n");
5923 bwpUlCfg = &cellCfg->initialUlBwp;
5925 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : BWP ** \n");
5926 DU_LOG("First PRB %d\n", bwpUlCfg->bwp.firstPrb);
5927 DU_LOG("Number of PRBs %d\n", bwpUlCfg->bwp.numPrb);
5928 DU_LOG("Subcarrier Spacing %d\n", bwpUlCfg->bwp.scs);
5929 DU_LOG("Cyclic Prefix %d\n", bwpUlCfg->bwp.cyclicPrefix);
5931 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUCCH Config Common ** \n");
5932 pucchCfgCmn = &bwpUlCfg->pucchCommon;
5933 DU_LOG("PUCCH Resource Common %d\n", pucchCfgCmn->pucchResourceCommon);
5934 DU_LOG("Group Hopping %d\n", pucchCfgCmn->pucchGroupHopping);
5936 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUSCH Config Common ** \n");
5937 puschCfgCmn = &bwpUlCfg ->puschCommon;
5938 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCmn->numTimeDomRsrcAlloc);
5939 for (rsrcIdx = 0; rsrcIdx < puschCfgCmn->numTimeDomRsrcAlloc; rsrcIdx++)
5941 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
5942 puschTimeDomRsrcAlloc = &puschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
5943 DU_LOG("\tK2 %d\n", puschTimeDomRsrcAlloc->k2);
5944 DU_LOG("\tPUSCH Mapping Type %d\n", puschTimeDomRsrcAlloc->mappingType);
5945 DU_LOG("\tPUSCH Start Symbol %d\n", puschTimeDomRsrcAlloc->startSymbol);
5946 DU_LOG("\tPUSCH Symbol Length %d\n", puschTimeDomRsrcAlloc->symbolLength);
5947 DU_LOG("\tPUSCH Start Symbol And Length %d\n", puschTimeDomRsrcAlloc->startSymbolAndLength);
5950 DU_LOG("\n ** MAC Cell Configuration : SSB Configuration** \n");
5951 ssbCfg = &macCellCfg ->ssbCfg;
5952 DU_LOG("SSB PDCH Power %d\n", ssbCfg->ssbPbchPwr);
5953 DU_LOG("Subcarrier Spacing Common %d\n", ssbCfg->scsCmn);
5954 DU_LOG("SSB Offset from Point A %d\n", ssbCfg->ssbOffsetPointA);
5955 DU_LOG("SSB Periodicity in msec %d\n", ssbCfg->ssbPeriod);
5956 DU_LOG("SSB Subcarrier Offset %d\n", ssbCfg->ssbScOffset);
5957 for (ssbMaskIdx = 0; ssbMaskIdx < SSB_MASK_SIZE; ssbMaskIdx++)
5959 DU_LOG("SSB Mask[%d] :%d\n", ssbMaskIdx, ssbCfg->ssbMask[ssbMaskIdx]);
5961 DU_LOG("Beam ID %d\n", ssbCfg->beamId[0]);
5962 DU_LOG("BETA PSS %d\n", ssbCfg->betaPss);
5963 DU_LOG("BCH Payloag Flag %d\n", ssbCfg->bchPayloadFlag);
5964 DU_LOG("MIB PDU %d %d %d", ssbCfg->mibPdu[0], ssbCfg->mibPdu[1], ssbCfg->mibPdu[2]);
5965 DU_LOG("DMRS Type-A Position %d\n", ssbCfg->dmrsTypeAPos);
5967 DU_LOG("\n ** MAC Cell Configuration : CSI RS Configuration ** \n");
5968 csiRsCfg = &macCellCfg->csiRsCfg;
5969 DU_LOG("Frequency Domain Allocation %s\n", csiRsCfg->csiFreqDomainAlloc);
5970 DU_LOG("Number of Ports %d\n", csiRsCfg->csiNrofPorts);
5971 DU_LOG("First OFDM Symbol in Time Domain %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain);
5972 DU_LOG("First OFDM Symbol in Timer Domain 2 %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2);
5973 DU_LOG("CDM Type %d\n", csiRsCfg->csirscdmType);
5974 DU_LOG("Density %d\n", csiRsCfg->csirsdensity);
5975 DU_LOG("Density dot 5:%d\n", csiRsCfg->csirsdensitydot5);
5976 DU_LOG("Power Control Offset %d\n", csiRsCfg->powerControlOffset);
5977 DU_LOG("Power Control Offset Search Space %d\n", csiRsCfg->powerControlOffsetSS);
5978 DU_LOG("Periodicity And Offset %d\n", csiRsCfg->periodicityAndOffset);
5980 DU_LOG("\n ** MAC Cell Configuration : PRACH Configuration ** \n");
5981 prachCfg = &macCellCfg->prachCfg;
5982 DU_LOG("PRACH Sequence Length %d\n", prachCfg->prachSeqLen);
5983 DU_LOG("Subcarrier Spacing %d\n", prachCfg->prachSubcSpacing);
5984 DU_LOG("Number of PRACH FDM %d\n", prachCfg->msg1Fdm);
5985 DU_LOG("PRACH Configuration Index %d\n", prachCfg->prachCfgIdx);
5986 DU_LOG("PRACH Restricted Set Configuration %d\n", prachCfg->prachRstSetCfg);
5987 DU_LOG("Number of SSB per RACH occassion %d\n", prachCfg->ssbPerRach);
5988 DU_LOG("Number of RA preambles %d\n", prachCfg->totalNumRaPreamble);
5989 DU_LOG("Number of Contention Based Preamble per SSB %d\n", prachCfg->numCbPreamblePerSsb);
5990 DU_LOG("PRACH Frequeny Start Offset %d\n", prachCfg->msg1FreqStart);
5991 DU_LOG("RA Contention Resolution Timer %d\n", prachCfg->raContResTmr);
5992 DU_LOG("RSRP Threshold %d\n", prachCfg->rsrpThreshSsb);
5993 DU_LOG("RA Response Window %d\n", prachCfg->raRspWindow);
5994 for(fdmIdx = 0; fdmIdx < prachCfg->msg1Fdm; fdmIdx++)
5996 prachFdmInfo = &prachCfg->fdm[fdmIdx];
5997 DU_LOG("FDM[%d]\n", fdmIdx);
5998 DU_LOG("\tRoot Sequence Index %d\n", prachFdmInfo->rootSeqIdx);
5999 DU_LOG("\tNumber of Root Sequence %d\n", prachFdmInfo->numRootSeq);
6000 DU_LOG("\tK1 %d\n", prachFdmInfo->k1);
6001 DU_LOG("\tZero Correlation Zone Configuration %d\n", prachFdmInfo->zeroCorrZoneCfg);
6005 DU_LOG("\n ** MAC Cell Configuration : TDD Configuration ** \n");
6006 tddCfg = &macCellCfg->tddCfg;
6007 DU_LOG("TDD Slot Periodicity %d\n", tddCfg->tddPeriod);
6008 DU_LOG("Number of DL Slots %d\n", tddCfg->nrOfDlSlots);
6009 DU_LOG("Number of DL Symbols %d\n", tddCfg->nrOfDlSymbols);
6010 DU_LOG("Number of UL Slots %d\n", tddCfg->nrOfUlSlots);
6011 DU_LOG("Number of UL Symbols %d\n", tddCfg->nrOfUlSymbols);
6014 DU_LOG("\n ** MAC Cell Configuration : Precoding Configuration ** \n");
6015 precodCfg = &macCellCfg->precodingConf;
6016 DU_LOG("Number of Layers %d\n", precodCfg->numLayers);
6017 DU_LOG("Number of Antenna Ports %d\n", precodCfg->numAntPorts);
6019 DU_LOG("\n ** MAC Cell Config : BEAM FORMING CFG ** \n");
6020 beamFormingCfg = &macCellCfg ->beamCfg;
6021 DU_LOG("Number of Beams %d\n", beamFormingCfg->numOfBeams);
6022 DU_LOG("Number of Tx RUs %d\n", beamFormingCfg->numTxRUs);
6023 DU_LOG("Beam Index %d\n", beamFormingCfg->beamIdx);
6024 DU_LOG("Beam Type %d\n", beamFormingCfg->beamType);
6025 DU_LOG("Beam Azimuth %d\n", beamFormingCfg->beamAzimuth);
6026 DU_LOG("Beam Tilt %d\n", beamFormingCfg->beamTilt);
6027 DU_LOG("Beam Horizontal Width %d\n", beamFormingCfg->beamHorizWidth);
6028 DU_LOG("Beam Vertical Width %d\n", beamFormingCfg->beamVertWidth);
6029 DU_LOG("Coverage Shape %d\n", beamFormingCfg->coverageShape);
6030 DU_LOG("Digitak Tilt %d\n",beamFormingCfg ->digitalTilt);
6031 DU_LOG("Digital Azimuth %d\n", beamFormingCfg->digitalAzimuth);
6033 DU_LOG("\n ** SIB1 Configuration ** \n");
6034 sib1Params = &duCfgParam.sib1Params;
6035 DU_LOG("TAC %d\n", sib1Params->tac);
6036 DU_LOG("RANAC %ld\n", sib1Params->ranac);
6037 DU_LOG("Cell ID %d\n", sib1Params->cellIdentity);
6038 DU_LOG("Cell Reserved for Operational Use %ld\n", sib1Params->cellResvdForOpUse);
6039 DU_LOG("Connection Establishment Failure Count %ld\n", sib1Params->connEstFailCnt);
6040 DU_LOG("Connection Establishment Failure Offset Valid %ld\n", sib1Params->connEstFailOffValidity);
6041 DU_LOG("Connection Establishment Failure Offset %ld\n", sib1Params->connEstFailOffset);
6042 DU_LOG("PLMN : mcc[0] %d\n", sib1Params->plmn.mcc[0]);
6043 DU_LOG("PLMN : mcc[1] %d\n", sib1Params->plmn.mcc[1]);
6044 DU_LOG("PLMN : mcc[2] %d\n", sib1Params->plmn.mcc[2]);
6045 DU_LOG("PLMN : mnc[0] %d\n", sib1Params->plmn.mnc[0]);
6046 DU_LOG("PLMN : mnc[1] %d\n", sib1Params->plmn.mnc[1]);
6047 DU_LOG("PLMN : mnc[2] %d\n", sib1Params->plmn.mnc[2]);
6049 DU_LOG("\n ** SIB1 : SI Scheduling Info ** \n");
6050 siSchedInfo = &sib1Params ->siSchedInfo;
6051 DU_LOG("Windown Length %ld\n", siSchedInfo->winLen);
6052 DU_LOG("Broadcast Status %ld\n", siSchedInfo->broadcastSta);
6053 DU_LOG("Periodicity %ld\n", siSchedInfo->preiodicity);
6054 DU_LOG("SIB Type %ld\n", siSchedInfo->sibType);
6055 DU_LOG("SIB Value Tag %ld\n", siSchedInfo->sibValTag);
6057 DU_LOG("\n ** SIB1 : Serving Cell Configuration Common SIB ** \n");
6058 srvCellCfgCmnSib = &sib1Params->srvCellCfgCommSib;
6059 DU_LOG("Subcarrier Spacing %ld\n", srvCellCfgCmnSib->scs);
6060 DU_LOG("SSB Position in Burst %d\n", srvCellCfgCmnSib->ssbPosInBurst);
6061 DU_LOG("SSB Periodicity %ld\n", srvCellCfgCmnSib->ssbPrdServingCell);
6062 DU_LOG("SS PBCH Power %ld\n", srvCellCfgCmnSib->ssPbchBlockPwr);
6064 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common ** \n");
6065 dlCfgCmn = &srvCellCfgCmnSib->dlCfg;
6066 DU_LOG("Frequency Band Indicator %ld\n", dlCfgCmn->freqBandInd);
6067 DU_LOG("Offset to Point A %ld\n", dlCfgCmn->offsetToPointA);
6068 DU_LOG("Frequency Location And Bandwidth %ld\n", dlCfgCmn->locAndBw);
6069 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsOffset);
6070 DU_LOG("Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scs);
6071 DU_LOG("Bandwidth considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsBw);
6073 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common : PDCCH Config Common ** \n");
6074 pdcchCfgCommon = &dlCfgCmn->pdcchCfg;
6075 if(pdcchCfgCommon->present)
6077 DU_LOG("Control Resource Set Zero Index %ld\n", pdcchCfgCommon->ctrlRsrcSetZero);
6078 DU_LOG("Search Space Zero Index %ld\n", pdcchCfgCommon->searchSpcZero);
6079 DU_LOG("Search Space ID %ld\n", pdcchCfgCommon->searchSpcId);
6080 DU_LOG("Control Resource Set ID %ld\n", pdcchCfgCommon->ctrlRsrcSetId);
6081 DU_LOG("Monitoring Slot Periodicity and Offset Present %d\n", pdcchCfgCommon->monitorSlotPrdAndOffPresent);
6082 DU_LOG("Monitoring Slot Periodicity and Offset %ld\n", pdcchCfgCommon->monitorSlotPrdAndOff);
6083 for (monitoringSymbIdx = 0; monitoringSymbIdx < 2; monitoringSymbIdx++)
6085 DU_LOG("Monitoring Symbols in Slot [%d] %d\n",monitoringSymbIdx, pdcchCfgCommon->monitorSymbolsInSlot[monitoringSymbIdx]);
6087 DU_LOG("Number of Candidates for Aggregation Level_1 %ld\n", pdcchCfgCommon->numCandAggLvl1);
6088 DU_LOG("Number of Candidates for Aggregation Level_2 %ld\n", pdcchCfgCommon->numCandAggLvl2);
6089 DU_LOG("Number of Candidates for Aggregation Level_4 %ld\n", pdcchCfgCommon->numCandAggLvl4);
6090 DU_LOG("Number of Candidates for Aggregation Level_8 %ld\n", pdcchCfgCommon->numCandAggLvl8);
6091 DU_LOG("Number of Candidates for Aggregation Level_16 %ld\n", pdcchCfgCommon->numCandAggLvl16);
6092 DU_LOG("Seach Space Type %d\n", pdcchCfgCommon->searchSpcType);
6093 DU_LOG("Common Search Space DCI Format %d\n", pdcchCfgCommon->commSrchSpcDciFrmt);
6094 DU_LOG("SIB1 Search Space ID %ld\n", pdcchCfgCommon->searchSpcSib1);
6095 DU_LOG("Paging Search Space ID %ld\n", pdcchCfgCommon->pagingSearchSpc);
6096 DU_LOG("RA Search Space ID %ld\n", pdcchCfgCommon->raSearchSpc);
6100 DU_LOG("PDCCH Config Common not Present");
6103 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PDSCH Config Common ** \n");
6104 pdschCfgCommon = &dlCfgCmn->pdschCfg;
6105 DU_LOG("PDSCH Config Common Present %d\n", pdschCfgCommon->present);
6106 if(pdschCfgCommon->present)
6108 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCommon->numTimeDomRsrcAlloc);
6109 for (rsrcIdx = 0; rsrcIdx < pdschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
6111 pdschTimeDomRsrcAlloc = &pdschCfgCommon->timeDomAlloc[rsrcIdx];
6112 DU_LOG("PDSCH Timer Domain Resource Allocation [%d]", rsrcIdx);
6113 DU_LOG("K0 %ld\n", pdschTimeDomRsrcAlloc->k0);
6114 DU_LOG("MappingType %ld\n", pdschTimeDomRsrcAlloc->mapType);
6115 DU_LOG("SLIV %d\n", pdschTimeDomRsrcAlloc->sliv);
6120 DU_LOG("PDSCH Config Common not Present");
6123 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : BCCH Config Common ** \n");
6124 bcchCfg = &dlCfgCmn->bcchCfg;
6125 DU_LOG("Modification Period Coefficient %ld\n", bcchCfg->modPrdCoeff);
6127 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PCCH Config Common ** \n");
6128 pcchCfg = &dlCfgCmn->pcchCfg;
6129 DU_LOG("Default Paging Cycle %d\n", pcchCfg->dfltPagingCycle);
6130 DU_LOG("Number of PF in Paging Cycle %d\n", pcchCfg->nAndPagingFrmOffsetType);
6131 DU_LOG("PF Offset %d\n", pcchCfg->pageFrameOffset);
6132 DU_LOG("NS - Number of P0 in PF %d\n", pcchCfg->ns);
6133 DU_LOG("First PDCCH Monitoring Occassion of each P0 Type %d\n", pcchCfg->firstPDCCHMontioringType);
6134 for (poIdx = 0; poIdx < MAX_PO_PER_PF; poIdx++)
6136 DU_LOG("First PDCCH Monitoring Occassion in P0 [%d] %d\n", poIdx, pcchCfg->firstPDCCHMontioringInfo[poIdx]);
6139 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common ** \n");
6140 ulCfgCmn = &srvCellCfgCmnSib->ulCfg;
6141 DU_LOG("Frequency Band Indicator %ld\n", ulCfgCmn->freqBandInd);
6142 DU_LOG("Maximum Transmission Power %ld\n", ulCfgCmn->pMax);
6143 DU_LOG("Frequency Location and Bandwidth %ld\n", ulCfgCmn->locAndBw);
6144 DU_LOG("Time Alignment Timer %ld\n", ulCfgCmn->timeAlignTimerComm);
6145 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsOffset);
6146 DU_LOG("Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scs);
6147 DU_LOG("Carrier BW considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsBw);
6149 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : RACH Config Common ** \n");
6150 rachCfgCmn = &ulCfgCmn ->rachCfg;
6151 if(rachCfgCmn->present)
6153 DU_LOG("PRACH Configuration Index %ld\n", rachCfgCmn->prachCfgIdx);
6154 DU_LOG("Number of PRACH FDM %ld\n", rachCfgCmn->msg1Fdm);
6155 DU_LOG("PRACH Frequeny Start Offset %ld\n", rachCfgCmn->msg1FreqStart);
6156 DU_LOG("Zero Correaltion Zone Configuration %ld\n", rachCfgCmn->zeroCorrZoneCfg);
6157 DU_LOG("Target Power Level of Received Preamble %ld\n", rachCfgCmn->preambleRcvdTgtPwr);
6158 DU_LOG("Maximum number of Preamble Transmission %ld\n", rachCfgCmn->preambleTransMax);
6159 DU_LOG("Power Ramping Step %ld\n", rachCfgCmn->pwrRampingStep);
6160 DU_LOG("RA Response Window %ld\n", rachCfgCmn->raRspWindow);
6161 DU_LOG("Total Number of RA Preambles %ld\n", rachCfgCmn->numRaPreamble);
6162 DU_LOG("Number of SSB per RACH Occassion %ld\n", rachCfgCmn->numSsbPerRachOcc);
6163 DU_LOG("Number of Contention Based Preamble per SSB %ld\n", rachCfgCmn->numCbPreamblePerSsb);
6164 DU_LOG("Contention Resolution Timer %ld\n", rachCfgCmn->contResTimer);
6165 DU_LOG("RSRP Threshold %ld\n", rachCfgCmn->rsrpThreshSsb);
6166 DU_LOG("Root Sequence Index Present %d\n", rachCfgCmn->rootSeqIdxPresent);
6167 DU_LOG("Root Sequence Index %ld\n", rachCfgCmn->rootSeqIdx);
6168 DU_LOG("Subcarrier Spacing %ld\n", rachCfgCmn->msg1Scs);
6169 DU_LOG("Restricted Set Configuration %ld\n", rachCfgCmn->restrictedSetCfg);
6173 DU_LOG("RACH Config Common not present\n");
6176 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUSCH Config Common ** \n");
6177 puschCfgCommon = &ulCfgCmn ->puschCfg;
6178 if(puschCfgCommon->puschCfgPresent)
6180 DU_LOG("MSG3 Delta from RACH Preamble %ld\n", puschCfgCommon->msg3DeltaPreamble);
6181 DU_LOG("P0 Nominal With Grant %ld\n", puschCfgCommon->p0NominalWithGrant);
6182 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCommon->numTimeDomRsrcAlloc);
6183 for(rsrcIdx = 0; rsrcIdx < puschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
6185 puschCmnTimeDomRsrsAlloc = &puschCfgCommon ->timeDomAllocList[rsrcIdx];
6186 DU_LOG("Time Domain Resource Alloc [%d]", rsrcIdx);
6187 DU_LOG("\tK2 %ld\n", puschCmnTimeDomRsrsAlloc->k2);
6188 DU_LOG("\tMapping Type %ld\n", puschCmnTimeDomRsrsAlloc->mapType);
6189 DU_LOG("\tSLIV %d\n", puschCmnTimeDomRsrsAlloc->sliv);
6194 DU_LOG("PUSCH Config Common not present\n");
6197 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUCCH Config Common **\n");
6198 pucchCfgCommon = &ulCfgCmn->pucchCfg;
6199 if(pucchCfgCommon->present)
6201 DU_LOG("Resource Common %ld\n", pucchCfgCommon->rsrcComm);
6202 DU_LOG("Group Hopping %ld\n", pucchCfgCommon->grpHop);
6203 DU_LOG("P0 Nominal %ld\n", pucchCfgCommon->p0Nominal);
6207 DU_LOG("PUCCH Config Common not present\n");
6210 DU_LOG("\n ** SIB1 : Serving Cell Config Common : TDD UL DL Config Common ** \n");
6211 tddUlDlCfgCmn = &srvCellCfgCmnSib->tddCfg;
6212 DU_LOG("Reference Subcarrier Spacing %ld\n", tddUlDlCfgCmn->refScs);
6213 DU_LOG("Transmission Periodicity %ld\n", tddUlDlCfgCmn->txPrd);
6214 DU_LOG("Number of DL Slots %ld\n", tddUlDlCfgCmn->numDlSlots);
6215 DU_LOG("Number of DL Symbols %ld\n", tddUlDlCfgCmn->numDlSymbols);
6216 DU_LOG("Number of UL Slots %ld\n", tddUlDlCfgCmn->numUlSlots);
6217 DU_LOG("Number of UL Symbols %ld\n", tddUlDlCfgCmn->numUlSymbols);
6219 DU_LOG("\n ** MAC SLICE CONFIG REQUEST ** \n");
6220 macSliceCfg = &duCfgParam.tempSliceCfg;
6221 DU_LOG("Number of RRM Policy %d\n",macSliceCfg->numOfRrmPolicy);
6223 for(policyIdx = 0; policyIdx < macSliceCfg->numOfRrmPolicy; policyIdx++)
6225 rrmPolicy = macSliceCfg->listOfRrmPolicy[policyIdx];
6226 DU_LOG("RRM Policy [%d]", policyIdx);
6227 DU_LOG("\tResource Type %d\n", rrmPolicy->resourceType);
6229 rrmPolicyRatio = &rrmPolicy ->policyRatio;
6230 DU_LOG("\tPolicy Maximum Ratio %d\n", rrmPolicyRatio->maxRatio);
6231 DU_LOG("\tPolicy Minimum Ratio %d\n", rrmPolicyRatio->minRatio);
6232 DU_LOG("\tPolicy Deidcated Ration %d\n", rrmPolicyRatio->dedicatedRatio);
6233 DU_LOG("\tNumber of RRM Policy Member %d\n", rrmPolicy->numOfRrmPolicyMem);
6235 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
6237 rrmPolicyMemberList = rrmPolicy->rRMPolicyMemberList[memIdx];
6238 DU_LOG("\tRRM Policy Member [%d]", memIdx);
6239 DU_LOG("\t\tPLMN : mcc[0] %d\n", rrmPolicyMemberList->plmn.mcc[0]);
6240 DU_LOG("\t\tPLMN : mcc[1] %d\n", rrmPolicyMemberList->plmn.mcc[1]);
6241 DU_LOG("\t\tPLMN : mcc[2] %d\n", rrmPolicyMemberList->plmn.mcc[2]);
6242 DU_LOG("\t\tPLMN : mnc[0] %d\n", rrmPolicyMemberList->plmn.mnc[0]);
6243 DU_LOG("\t\tPLMN : mnc[1] %d\n", rrmPolicyMemberList->plmn.mnc[1]);
6244 DU_LOG("\t\tPLMN : mnc[2] %d\n", rrmPolicyMemberList->plmn.mnc[2]);
6245 DU_LOG("\t\tSST %d\n",rrmPolicyMemberList->snssai.sst);
6246 DU_LOG("\t\tSD %d %d %d\n",rrmPolicyMemberList->snssai.sd[0],rrmPolicyMemberList->snssai.sd[1],rrmPolicyMemberList->snssai.sd[2]);
6251 /**********************************************************************
6253 **********************************************************************/