1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /* This file contains all utility functions */
20 #include "common_def.h"
22 #include <libxml/parser.h>
23 #include <libxml/tree.h>
24 #include <libxml/xmlmemory.h>
25 #include <arpa/inet.h>
32 #include "du_app_mac_inf.h"
33 #include "du_app_rlc_inf.h"
34 #include "du_e2ap_mgr.h"
38 #include "du_f1ap_conversions.h"
39 #include "OCTET_STRING.h"
40 #include "BIT_STRING.h"
41 #include "odu_common_codec.h"
43 #include "SearchSpace.h"
44 #include "SIB-TypeInfo.h"
45 #include "SchedulingInfo.h"
46 #include "SI-SchedulingInfo.h"
47 #include "ConnEstFailureControl.h"
48 #include "PLMN-IdentityInfo.h"
49 #include "PDSCH-TimeDomainResourceAllocation.h"
50 #include "BCCH-Config.h"
51 #include "PagingCycle.h"
52 #include "PCCH-Config.h"
53 #include "TimeAlignmentTimer.h"
54 #include "BCCH-DL-SCH-Message.h"
55 #include "RACH-ConfigGeneric.h"
56 #include "PUSCH-TimeDomainResourceAllocation.h"
57 #include "PUCCH-ConfigCommon.h"
58 #include "SubcarrierSpacing.h"
59 #include "TDD-UL-DL-Pattern.h"
60 #include "RACH-ConfigCommon.h"
61 #include "BWP-DownlinkCommon.h"
62 #include "BWP-UplinkCommon.h"
63 #include "TDD-UL-DL-ConfigCommon.h"
64 #include "du_sys_info_hdl.h"
67 #include "CmInterface.h"
68 extern StartupConfig g_cfg;
69 extern NRCellDU cellParams;
72 char encBuf[ENC_BUF_MAX_LEN];
74 /*******************************************************************
76 * @brief Configures the DU Parameters
83 * - calculate SLIV value from start and length field
85 * @params[in] start symbol
86 * @params[in] length of symbols
89 * ****************************************************************/
90 uint16_t calcSliv(uint8_t startSymbol, uint8_t lengthSymbol)
93 if((lengthSymbol-1) <= 7)
95 sliv = NUM_SYMBOLS_PER_SLOT * (lengthSymbol-1) + startSymbol;
99 sliv = NUM_SYMBOLS_PER_SLOT * (NUM_SYMBOLS_PER_SLOT - lengthSymbol + 1) \
100 + (NUM_SYMBOLS_PER_SLOT - 1 - startSymbol);
105 /*******************************************************************
107 * @brief Configures the DU Parameters
114 * - Initializes the DuCfg members.
115 * - Calls readMacCfg()
117 * @params[in] system task ID
118 * @return ROK - success
121 * ****************************************************************/
125 uint8_t srvdCellIdx, bandIdx, sliceIdx, plmnIdx;
126 uint8_t brdcstPlmnIdx, freqBandIdx, srvdPlmnIdx;
128 SupportedSliceList *taiSliceSuppLst;
131 /* Note: Added these below variable for local testing*/
132 Snssai snssai[NUM_OF_SUPPORTED_SLICE] = {{1,{2,3,4}},{5,{6,7,8}}};
135 for(srvdCellIdx=0; srvdCellIdx<DEFAULT_CELLS; srvdCellIdx++)
137 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn, 0, sizeof(Plmn));
138 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[0] = PLMN_MCC0;
139 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[1] = PLMN_MCC1;
140 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[2] = PLMN_MCC2;
141 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mnc[0] = PLMN_MNC0;
142 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mnc[1] = PLMN_MNC1;
146 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrPci = cellParams.nRPCI;
148 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrPci = NR_PCI;
150 /* List of Available PLMN */
151 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
153 /* As per spec 38.473, Plmn identity consists of 3 digit from mcc
154 * followed by either 2 digit or 3 digits of mnc */
156 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn, 0,\
159 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
160 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
161 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
162 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
163 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
164 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
166 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[0] = PLMN_MCC0;
167 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[1] = PLMN_MCC1;
168 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[2] = PLMN_MCC2;
169 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[0] = PLMN_MNC0;
170 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[1] = PLMN_MNC1;
173 /* List of Extended PLMN */
174 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
176 /* As per spec 38.473, Plmn identity consists of 3 digit from mcc
177 * followed by either 2 digit or 3 digits of mnc */
179 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn, 0, sizeof(Plmn));
180 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[0] = PLMN_MCC0;
181 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[1] = PLMN_MCC1;
182 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[2] = PLMN_MCC2;
183 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mnc[0] = PLMN_MNC0;
184 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mnc[1] = PLMN_MNC1;
186 /* List of Supporting Slices */
187 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
189 taiSliceSuppLst = &duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].\
192 /* TODO Calculte the exact number of supported slices once will get
193 * cell configuration from O1 */
194 taiSliceSuppLst->numSupportedSlices = NUM_OF_SUPPORTED_SLICE;
195 if(taiSliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
197 DU_LOG("\nERROR --> DU_APP: readCfg(): Number of supported slice [%d] is more than 1024",\
198 taiSliceSuppLst->numSupportedSlices);
202 DU_ALLOC(taiSliceSuppLst->snssai, taiSliceSuppLst->numSupportedSlices*sizeof(Snssai*));
203 if(taiSliceSuppLst->snssai == NULLP)
205 DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
209 for(sliceIdx=0; sliceIdx<taiSliceSuppLst->numSupportedSlices; sliceIdx++)
211 DU_ALLOC(taiSliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
212 if(taiSliceSuppLst->snssai[sliceIdx] == NULLP)
214 DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
218 memcpy(taiSliceSuppLst->snssai[sliceIdx]->sd, cellParams.plmnList[sliceIdx].sd, \
219 SD_SIZE*sizeof(uint8_t));
220 taiSliceSuppLst->snssai[sliceIdx]->sst = cellParams.plmnList[sliceIdx].sst;
222 memcpy(taiSliceSuppLst->snssai[sliceIdx], &snssai[sliceIdx], sizeof(Snssai));
229 /* NR TDD Mode info */
231 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.nrArfcn = cellParams.arfcnUL;
232 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
233 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
235 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.nrArfcn = NR_UL_ARFCN;
236 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
237 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
239 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrb = NRB_273;
241 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
243 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[freqBandIdx].nrFreqBand =\
245 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
247 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[freqBandIdx].sulBand[bandIdx]\
252 /* NR FDD Mode info */
254 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = cellParams.arfcnUL;
255 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
256 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
257 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
258 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = cellParams.arfcnDL;
259 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
260 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
261 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
263 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = NR_UL_ARFCN;
264 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
265 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrScs = NR_SCS;
266 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
267 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = NR_DL_ARFCN;
268 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
269 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
270 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrScs = NR_SCS;
272 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_106;
273 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
275 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[freqBandIdx].\
276 nrFreqBand = NR_FREQ_BAND;
277 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
279 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[freqBandIdx].\
280 sulBand[bandIdx] = SUL_BAND;
283 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_106;
284 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
286 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[freqBandIdx].\
287 nrFreqBand = NR_FREQ_BAND;
288 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
290 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[freqBandIdx].\
291 sulBand[bandIdx] = SUL_BAND;
295 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrb = NRB_106;
296 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrb = NRB_106;
299 /*Measurement Config and Cell Config */
300 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.measTimeCfgDuration = TIME_CFG;
302 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellDir = DL_UL;
304 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellType=CELL_TYPE;
306 /* Broadcast PLMN Identity */
307 for(brdcstPlmnIdx=0; brdcstPlmnIdx<MAX_BPLMN_NRCELL_MINUS_1; brdcstPlmnIdx++)
309 for(plmnIdx=0; plmnIdx<MAX_PLMN; plmnIdx++)
311 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx],\
313 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[0] =\
315 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[1] =\
317 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[2] =\
319 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mnc[0] =\
321 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mnc[1] =\
324 /* Extended PLMN List */
325 for(plmnIdx=0; plmnIdx<MAX_PLMN; plmnIdx++)
327 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
328 extPlmn[plmnIdx], 0, sizeof(Plmn));
329 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
330 extPlmn[plmnIdx].mcc[0] = PLMN_MCC0;
331 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
332 extPlmn[plmnIdx].mcc[1] = PLMN_MCC1;
333 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
334 extPlmn[plmnIdx].mcc[2] = PLMN_MCC2;
335 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
336 extPlmn[plmnIdx].mnc[0] = PLMN_MNC0;
337 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
338 extPlmn[plmnIdx].mnc[1] = PLMN_MNC1;
341 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.epsTac = cellParams.nRTAC; //TODO : to check and fill
342 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.tac = cellParams.nRTAC;
343 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].tac = cellParams.nRTAC;
344 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].nrCellId = cellParams.cellLocalId;
346 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.epsTac = DU_TAC; //TODO : to check and fill
347 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.tac = DU_TAC;
348 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].tac = DU_TAC;
349 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].nrCellId = NR_CELL_ID;
351 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].ranac = NR_RANAC;
354 /*gnb DU System Info mib msg*/
356 DU_ALLOC(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg, encBufSize);
357 if(!(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg))
359 DU_LOG("\nERROR --> DU APP : Memory allocation failure at readCfg");
362 memcpy(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg, encBuf, encBufSize);
363 duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibLen = encBufSize;
365 /*gnb DU System Info mib msg*/
367 DU_ALLOC(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg,\
369 if(!(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg))
371 DU_LOG("\nERROR --> DU APP : Memory allocation failure at readCfg");
374 memcpy(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg,\
376 duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Len = encBufSize;
383 /*******************************************************************
385 * @brief Copy Slice Cfg in temp structre in duCfgParams
389 * Function : cpyRrmPolicyInDuCfgParams
392 * - Copy Slice Cfg in temp structre in duCfgParams
394 * @params[in] RrmPolicy rrmPolicy[], uint8_t policyNum, uint8_t memberList
395 * @return ROK - success
398 * ****************************************************************/
399 uint8_t cpyRrmPolicyInDuCfgParams(RrmPolicyList rrmPolicy[], uint8_t policyNum, MacSliceCfgReq *tempSliceCfg)
401 uint8_t policyIdx = 0, memberListIdx = 0;
404 tempSliceCfg->numOfRrmPolicy = policyNum;
405 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy, tempSliceCfg->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
406 if(!tempSliceCfg->listOfRrmPolicy)
408 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
412 for(policyIdx = 0; policyIdx<tempSliceCfg->numOfRrmPolicy; policyIdx++)
414 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
415 if(!tempSliceCfg->listOfRrmPolicy[policyIdx])
417 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
421 tempSliceCfg->listOfRrmPolicy[policyIdx]->resourceType = rrmPolicy[policyIdx].resourceType;
423 tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem = rrmPolicy[policyIdx].rRMMemberNum;
425 if(tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem)
427 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList,\
428 tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
430 if(!tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList)
432 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
437 for(memberListIdx = 0; memberListIdx<tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem; memberListIdx++)
439 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx], sizeof(RrmPolicyMemberList));
440 if(!tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx])
442 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
445 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->snssai.sd,\
446 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].sd, 3 * sizeof(uint8_t));
447 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->snssai.sst,\
448 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].sst, sizeof(uint8_t));
449 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->plmn.mcc,\
450 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].mcc, 3 * sizeof(uint8_t));
451 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->plmn.mnc,\
452 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].mnc, 3 * sizeof(uint8_t));
454 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.maxRatio = rrmPolicy[policyIdx].rRMPolicyMaxRatio;
455 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.minRatio = rrmPolicy[policyIdx].rRMPolicyMinRatio;
456 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.dedicatedRatio = rrmPolicy[policyIdx].rRMPolicyDedicatedRatio;
464 /*******************************************************************
466 * @brief Fill SCTP Parameters
470 * Function : parseSctpParams
472 * Functionality: Fill SCTP Parameters
474 * @params[in] XML document pointer
476 * Current node in XML
477 * Pointer to structure to be filled
478 * @return ROK - success
481 * ****************************************************************/
482 uint8_t parseSctpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SctpParams *sctp)
484 uint8_t max_du_port = 0;
485 uint16_t f1_sctp_port = 0;
486 uint16_t e2_sctp_port = 0;
488 memset(sctp, 0, sizeof(SctpParams));
489 cur = cur->xmlChildrenNode;
493 sctp->duPort[F1_INTERFACE] = g_cfg.DU_Port;
494 sctp->duPort[E2_INTERFACE] = g_cfg.RIC_Port;
495 sctp->cuPort = g_cfg.CU_Port;
496 sctp->ricPort = g_cfg.RIC_Port;
498 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_DU_PORT")) && (cur->ns == ns))
500 max_du_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
501 if (max_du_port == 2 )
503 sctp->duPort[F1_INTERFACE] = f1_sctp_port; /* DU Port idx 0 */
504 sctp->duPort[E2_INTERFACE] = e2_sctp_port; /* RIC Port idx 1 */
508 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SCTP_PORT")) && (cur->ns == ns))
510 f1_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
512 if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_SCTP_PORT")) && (cur->ns == ns))
514 e2_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
517 sctp->cuPort = f1_sctp_port;
518 sctp->ricPort = e2_sctp_port;
525 /*******************************************************************
527 * @brief Fill EGTP Parameters
531 * Function : parseEgtpParams
533 * Functionality: Fill EGTP Parmeters
535 * @params[in] XML document pointer
537 * Current node in XML
538 * Pointer to structure to be filled
539 * @return ROK - success
542 * ****************************************************************/
543 uint8_t parseEgtpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1EgtpParams *egtp)
545 memset(egtp, 0, sizeof(F1EgtpParams));
546 cur = cur->xmlChildrenNode;
549 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_F1_EGTP_PORT")) && (cur->ns == ns))
551 egtp->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
553 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEST_F1_EGTP_PORT")) && (cur->ns == ns))
555 egtp->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
557 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_TEID")) && (cur->ns == ns))
559 egtp->minTunnelId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
566 /*******************************************************************
568 * @brief Fill MIB configuration
572 * Function : parseMibParams
574 * Functionality: Fill MIB configuration
576 * @params[in] XML document pointer
578 * Current node in XML
579 * Pointer to structure to be filled
580 * @return ROK - success
583 * ****************************************************************/
584 uint8_t parseMibParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MibParams *mib)
586 memset(mib, 0, sizeof(MibParams));
587 cur = cur -> xmlChildrenNode;
590 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SYS_FRAME_NUM")) && (cur->ns == ns))
592 mib->sysFrmNum = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
594 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUB_CARR_SPACE")) && (cur->ns == ns))
596 mib->subCarrierSpacingCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
598 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFFSET")) && (cur->ns == ns))
600 mib->ssb_SubcarrierOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
602 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPEA_POSITION")) && (cur->ns == ns))
604 mib->dmrs_TypeA_Position = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
606 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
608 mib->controlResourceSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
610 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
612 mib->searchSpaceZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
614 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_BARRED")) && (cur->ns == ns))
616 mib->cellBarred = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
618 if ((!xmlStrcmp(cur->name, (const xmlChar *)"INTRA_FREQ_RESELECT")) && (cur->ns == ns))
620 mib->intraFreqReselection = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
627 /*******************************************************************
629 * @brief Fill PLMN ID
633 * Function : parsePlmn
635 * Functionality: Fill PLMN ID
637 * @params[in] XML document pointer
639 * Current node in XML
640 * Pointer to structure to be filled
641 * @return ROK - success
644 * ****************************************************************/
645 uint8_t parsePlmn(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Plmn *plmn)
647 xmlNodePtr child = NULLP;
649 memset(plmn, 0, sizeof(Plmn));
650 cur = cur->xmlChildrenNode;
653 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MCC")) && (cur->ns == ns))
655 child = cur->xmlChildrenNode;
656 while (child != NULL)
658 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MCC0")) && (child->ns == ns))
660 plmn->mcc[0] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
663 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MCC1")) && (child->ns == ns))
665 plmn->mcc[1] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
668 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MCC2")) && (child->ns == ns))
670 plmn->mcc[2] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
677 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MNC")) && (cur->ns == ns))
679 child = cur->xmlChildrenNode;
680 while (child != NULL)
682 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MNC0")) && (child->ns == ns))
684 plmn->mnc[0] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
687 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MNC1")) && (child->ns == ns))
689 plmn->mnc[1] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
692 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MNC2")) && (child->ns == ns))
694 plmn->mnc[2] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
706 /*******************************************************************
712 * Function : parseNrCgi
714 * Functionality: Fill NR CGI
716 * @params[in] XML document pointer
718 * Current node in XML
719 * Pointer to structure to be filled
720 * @return ROK - success
723 * ****************************************************************/
724 uint8_t parseNrCgi(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrEcgi *nrCgi)
726 memset(nrCgi, 0, sizeof(NrEcgi));
727 cur = cur->xmlChildrenNode;
730 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
732 if(parsePlmn(doc, ns, cur, &nrCgi->plmn) != ROK)
738 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
740 nrCgi-> cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
748 /*******************************************************************
754 * Function : parseSnssai
756 * Functionality: Fill SNSSAI
758 * @params[in] XML document pointer
760 * Current node in XML
761 * Pointer to structure to be filled
762 * @return ROK - success
765 * ****************************************************************/
766 uint8_t parseSnssai(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Snssai *snssai)
771 memset(snssai, 0, sizeof(Snssai));
772 cur = cur ->xmlChildrenNode;
775 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SST")) && (cur->ns == ns))
777 snssai->sst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
780 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SD_SIZE")) && (cur->ns == ns))
782 child = cur->xmlChildrenNode;
785 if ((!xmlStrcmp(child->name, (const xmlChar *)"SD")) && (child->ns == ns))
787 snssai->sd[sdIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
790 child = child -> next;
799 /*******************************************************************
801 * @brief Fill Supported Slice List
805 * Function : parseSupportedSliceList
807 * Functionality: Fill Supported Slice List
809 * @params[in] XML document pointer
811 * Current node in XML
812 * Pointer to structure to be filled
813 * @return ROK - success
816 * ****************************************************************/
817 uint8_t parseSupportedSliceList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SupportedSliceList *sliceSuppLst)
819 uint8_t sliceIdx = 0;
820 xmlNodePtr child = NULLP;
822 memset(sliceSuppLst, 0, sizeof(SupportedSliceList));
823 cur = cur->xmlChildrenNode;
826 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SUPPORT_SLICE")) && (cur->ns == ns))
828 sliceSuppLst->numSupportedSlices = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
829 if(sliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
831 DU_LOG("\nERROR --> DU_APP: %s: Number of supported slice [%d] is more than 1024",\
832 __func__, sliceSuppLst->numSupportedSlices);
837 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI_LIST")) && (cur->ns == ns))
839 DU_ALLOC_SHRABL_BUF(sliceSuppLst->snssai, (sliceSuppLst->numSupportedSlices) * sizeof(Snssai*));
840 if (sliceSuppLst->snssai == NULLP)
842 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
846 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
848 DU_ALLOC_SHRABL_BUF(sliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
849 if (sliceSuppLst->snssai[sliceIdx] == NULLP)
851 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
857 memcpy(sliceSuppLst->snssai[sliceIdx]->sd, cellParams.plmnList[sliceIdx].sd, SD_SIZE*sizeof(uint8_t));
858 sliceSuppLst->snssai[sliceIdx]->sst = cellParams.plmnList[sliceIdx].sst;
865 child = cur->xmlChildrenNode;
866 while (child != NULL)
868 if ((!xmlStrcmp(child->name, (const xmlChar *)"SNSSAI")) && (child->ns == ns))
870 if(parseSnssai(doc, ns, child, sliceSuppLst->snssai[sliceIdx]) != ROK)
886 #ifdef XML_BASED_CONFIG
887 /*******************************************************************
889 * @brief Fill Served PLMN
893 * Function : parseF1SrvdPlmn
895 * Functionality: Fill Served PLMN
897 * @params[in] XML document pointer
899 * Current node in XML
900 * Pointer to structure to be filled
901 * @return ROK - success
904 * ****************************************************************/
905 uint8_t parseF1SrvdPlmn(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1SrvdPlmn *srvdPlmn, uint8_t srvdPlmnIdx)
907 memset(srvdPlmn, 0, sizeof(F1SrvdPlmn));
908 cur = cur->xmlChildrenNode;
912 fillPlmnFromO1(&srvdPlmn ->plmn, srvdPlmnIdx);
914 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
916 if(parsePlmn(doc, ns, cur, &srvdPlmn->plmn) != ROK)
923 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
925 if(parsePlmn(doc, ns, cur, &srvdPlmn->extPlmn) != ROK)
931 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
933 if(parseSupportedSliceList(doc, ns, cur, &srvdPlmn->taiSliceSuppLst) != ROK)
944 /*******************************************************************
946 * @brief Fill cell information
950 * Function : parseF1CellInfo
952 * Functionality: Fill cell information
954 * @params[in] XML document pointer
956 * Current node in XML
957 * Pointer to structure to be filled
958 * @return ROK - success
961 * ****************************************************************/
962 uint8_t parseF1CellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1CellInfo *f1CellInfo)
964 memset(f1CellInfo, 0, sizeof(F1CellInfo));
965 cur = cur->xmlChildrenNode;
968 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CGI")) && (cur->ns == ns))
970 if(parseNrCgi(doc, ns, cur, &f1CellInfo->nrCgi) != ROK)
977 f1CellInfo->nrPci = cellParams.nRPCI;
979 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
981 f1CellInfo->nrPci = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
985 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SRVD_PLMN")) && (cur->ns == ns))
987 if(parseF1SrvdPlmn(doc, ns, cur, &f1CellInfo->srvdPlmn[0], 0) != ROK)
998 /*******************************************************************
1000 * @brief Fill Frequency Band
1004 * Function : parseF1FreqBand
1006 * Functionality: Fill Frequency Band
1008 * @params[in] XML document pointer
1010 * Current node in XML
1011 * Pointer to structure to be filled
1012 * @return ROK - success
1015 * ****************************************************************/
1016 uint8_t parseF1FreqBand(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1FreqBand *freqBand)
1019 uint16_t sulValue = 0;
1021 xmlNodePtr sulChild;
1023 memset(freqBand, 0, sizeof(F1FreqBand));
1024 cur = cur->xmlChildrenNode;
1027 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
1029 freqBand->nrFreqBand = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1032 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_BAND_LIST")) && (cur->ns == ns))
1034 child = cur->xmlChildrenNode;
1035 while (child != NULL)
1037 if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
1039 sulChild = child->xmlChildrenNode;
1041 while (sulChild != NULL)
1043 if ((!xmlStrcmp(sulChild->name, (const xmlChar *)"SUL_BAND")) && (sulChild->ns == ns))
1045 sulValue = atoi((char *)xmlNodeListGetString(doc, sulChild->xmlChildrenNode, 1));
1046 if (sulIdx < MAX_NRCELL_BANDS)
1048 freqBand->sulBand[sulIdx] = sulValue;
1053 DU_LOG("ERROR --> DU_APP : %s : SUL_BAND array overflow\n", __func__);
1057 sulChild = sulChild->next;
1060 child = child->next;
1068 /*******************************************************************
1070 * @brief Fill Frequency Band List
1074 * Function : parseF1FreqBandList
1076 * Functionality: Fill Frequency Band List
1078 * @params[in] XML document pointer
1080 * Current node in XML
1081 * Pointer to structure to be filled
1082 * @return ROK - success
1085 * ****************************************************************/
1086 uint8_t parseF1FreqBandList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFreqInfo *nrFreqInfo)
1091 cur = cur->xmlChildrenNode;
1094 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
1096 child = cur->xmlChildrenNode;
1097 while(child != NULL)
1099 if ((!xmlStrcmp(child->name, (const xmlChar *)"F1_FREQ_BAND")) && (child->ns == ns))
1101 if(parseF1FreqBand(doc, ns, child, &nrFreqInfo->freqBand[idx]) != ROK)
1107 child = child -> next;
1116 /*******************************************************************
1118 * @brief Fill Transmission Bandwidth
1122 * Function : parseF1TxBw
1124 * Functionality: Fill Transmission Bandwidth
1126 * @params[in] XML document pointer
1128 * Current node in XML
1129 * Pointer to structure to be filled
1130 * @return ROK - success
1133 * ****************************************************************/
1134 uint8_t parseF1TxBw(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1TxBw *txBw)
1136 memset(txBw, 0, sizeof(F1TxBw));
1137 cur = cur->xmlChildrenNode;
1140 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_SCS")) && (cur->ns == ns))
1142 txBw->nrScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1145 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NRB")) && (cur->ns == ns))
1147 txBw->nrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1155 /*******************************************************************
1157 * @brief Fill SUL Info
1161 * Function : parseF1SulInfo
1163 * Functionality: Fill SUL Info
1165 * @params[in] XML document pointer
1167 * Current node in XML
1168 * Pointer to structure to be filled
1169 * @return ROK - success
1172 * ****************************************************************/
1173 uint8_t parseF1SulInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1SulInfo *sulInfo)
1175 memset(sulInfo, 0, sizeof(F1SulInfo));
1176 cur = cur->xmlChildrenNode;
1179 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_ARFCN")) && (cur->ns == ns))
1181 sulInfo->sulArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1184 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
1186 if(parseF1TxBw(doc, ns, cur, &sulInfo->sulTxBw) != ROK)
1197 /*******************************************************************
1199 * @brief Fill NR Frequency Info
1203 * Function : parseF1NrFreqInfo
1205 * Functionality: Fill NR Frequency Info
1207 * @params[in] XML document pointer
1209 * Current node in XML
1210 * Pointer to structure to be filled
1211 * @return ROK - success
1214 * ****************************************************************/
1215 uint8_t parseF1NrFreqInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFreqInfo *nrFreqInfo)
1217 memset(nrFreqInfo, 0, sizeof(F1NrFreqInfo));
1218 cur = cur->xmlChildrenNode;
1221 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_ARFCN")) && (cur->ns == ns))
1223 nrFreqInfo->nrArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1226 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SUL_INFO")) && (cur->ns == ns))
1228 if(parseF1SulInfo(doc, ns, cur, &nrFreqInfo->sulInfo) != ROK)
1234 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_FREQ_BAND_LIST")) && (cur->ns == ns))
1236 if(parseF1FreqBandList(doc, ns, cur, nrFreqInfo) != ROK)
1247 /*******************************************************************
1249 * @brief Fill NR FDD Info
1253 * Function : parseF1NrFddInfo
1255 * Functionality: Fill NR FDD Info
1257 * @params[in] XML document pointer
1259 * Current node in XML
1260 * Pointer to structure to be filled
1261 * @return ROK - success
1264 * ****************************************************************/
1265 uint8_t parseF1NrFddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFddInfo *fddInfo)
1267 memset(fddInfo, 0, sizeof(F1NrFddInfo));
1268 cur = cur->xmlChildrenNode;
1271 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO_UL")) && (cur->ns == ns))
1273 if(parseF1NrFreqInfo(doc, ns, cur, &fddInfo->ulNrFreqInfo) != ROK)
1279 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO_DL")) && (cur->ns == ns))
1281 if(parseF1NrFreqInfo(doc, ns, cur, &fddInfo->dlNrFreqInfo) != ROK)
1287 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW_UL")) && (cur->ns == ns))
1289 if(parseF1TxBw(doc, ns, cur, &fddInfo->ulTxBw) != ROK)
1295 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW_DL")) && (cur->ns == ns))
1297 if(parseF1TxBw(doc, ns, cur, &fddInfo->dlTxBw) != ROK)
1308 /*******************************************************************
1310 * @brief Fill NR TDD Info
1314 * Function : parseF1NrTddInfo
1316 * Functionality: Fill NR TDD Info
1318 * @params[in] XML document pointer
1320 * Current node in XML
1321 * Pointer to structure to be filled
1322 * @return ROK - success
1325 * ****************************************************************/
1326 uint8_t parseF1NrTddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrTddInfo *tddInfo)
1328 memset(tddInfo, 0, sizeof(F1NrTddInfo));
1329 cur = cur->xmlChildrenNode;
1332 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO")) && (cur->ns == ns))
1334 if(parseF1NrFreqInfo(doc, ns, cur, &tddInfo->nrFreqInfo) != ROK)
1340 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
1342 if(parseF1TxBw(doc, ns, cur, &tddInfo->nrTxBw) != ROK)
1353 /*******************************************************************
1355 * @brief Fill NR Mode Info
1359 * Function : parseNrModeInfo
1361 * Functionality: Fill NR Mode Info
1363 * @params[in] XML document pointer
1365 * Current node in XML
1366 * Pointer to structure to be filled
1367 * @return ROK - success
1370 * ****************************************************************/
1371 uint8_t parseNrModeInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrModeInfo *nrModeInfo)
1375 memset(nrModeInfo, 0, sizeof(NrModeInfo));
1376 cur = cur->xmlChildrenNode;
1379 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE")) && (cur->ns == ns))
1381 strcpy((char*)modeCfg, (char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1384 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FDD_INFO")) && (cur->ns == ns))
1386 if(strcmp(modeCfg, "FDD") == 0)
1388 if(parseF1NrFddInfo(doc, ns, cur, &nrModeInfo->mode.fdd) != ROK)
1395 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_TDD_INFO")) && (cur->ns == ns))
1397 if(strcmp(modeCfg, "TDD") == 0)
1399 if(parseF1NrTddInfo(doc, ns, cur, &nrModeInfo->mode.tdd) != ROK)
1411 /*******************************************************************
1413 * @brief Fill Broadcast PLMN Information
1417 * Function : parseF1BrdcstPlmnInfo
1419 * Functionality: Fill Broadcast PLMN Information
1421 * @params[in] XML document pointer
1423 * Current node in XML
1424 * Pointer to structure to be filled
1425 * @return ROK - success
1428 * ****************************************************************/
1429 uint8_t parseF1BrdcstPlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1BrdcstPlmnInfo *brdcstPlmnInfo)
1431 memset(brdcstPlmnInfo, 0, sizeof(F1BrdcstPlmnInfo));
1432 cur = cur->xmlChildrenNode;
1435 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
1437 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->plmn[0]) != ROK)
1443 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
1445 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->extPlmn[0]) != ROK)
1451 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
1453 brdcstPlmnInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1456 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CELL_ID")) && (cur->ns == ns))
1458 brdcstPlmnInfo->nrCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1461 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_RANAC")) && (cur->ns == ns))
1463 brdcstPlmnInfo->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1471 /*******************************************************************
1473 * @brief Fill DU Cell Information
1477 * Function : parseF1DuCellInfo
1479 * Functionality: Fill DU Cell Information
1481 * @params[in] XML document pointer
1483 * Current node in XML
1484 * Pointer to structure to be filled
1485 * @return ROK - success
1488 * ****************************************************************/
1489 uint8_t parseF1DuCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuCellInfo *duCellInfo)
1491 memset(duCellInfo, 0, sizeof(F1DuCellInfo));
1492 cur = cur->xmlChildrenNode;
1495 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_INFO")) && (cur->ns == ns))
1497 if(parseF1CellInfo(doc, ns, cur, &duCellInfo->cellInfo) != ROK)
1503 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
1505 duCellInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1508 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EPS_TAC")) && (cur->ns == ns))
1510 duCellInfo->epsTac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1513 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE_INFO")) && (cur->ns == ns))
1515 if(parseNrModeInfo(doc, ns, cur, &duCellInfo->f1Mode) != ROK)
1521 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_CFG")) && (cur->ns == ns))
1523 duCellInfo->measTimeCfgDuration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1526 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_DIR")) && (cur->ns == ns))
1528 duCellInfo->cellDir = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1531 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_TYPE")) && (cur->ns == ns))
1533 duCellInfo->cellType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1536 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_BRDCST_PLMN_INFO")) && (cur->ns == ns))
1538 if(parseF1BrdcstPlmnInfo(doc, ns, cur, &duCellInfo->brdcstPlmnInfo[0]) != ROK)
1549 /*******************************************************************
1551 * @brief Fill DU served cell information
1555 * Function : parseF1DuServedCellInfo
1557 * Functionality: Fill DU served cell information
1559 * @params[in] XML document pointer
1561 * Current node in XML
1562 * Pointer to structure to be filled
1563 * @return ROK - success
1566 * ****************************************************************/
1567 uint8_t parseF1DuServedCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuSrvdCellInfo *srvdCellInfo)
1569 memset(srvdCellInfo, 0, sizeof(F1DuSrvdCellInfo));
1570 cur = cur->xmlChildrenNode;
1573 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_CELL_INFO")) && (cur->ns == ns))
1575 if(parseF1DuCellInfo(doc, ns, cur, &srvdCellInfo->duCellInfo) != ROK)
1583 if(fillDuSrvdCellSysInfo(&srvdCellInfo->duSysInfo) != ROK)
1590 /*******************************************************************
1592 * @brief Fill DU Served Cell System Information
1596 * Function : fillDuSrvdCellSysInfo
1598 * Functionality: Fill DU Served Cell System Information
1600 * @params[in] Served Cell System Information
1601 * @return ROK - success
1604 * ****************************************************************/
1605 uint8_t fillDuSrvdCellSysInfo(F1DuSysInfo *sysInfo)
1607 /* GNB DU System Info MIB msg */
1609 DU_ALLOC(sysInfo->mibMsg, encBufSize);
1610 if(!(sysInfo->mibMsg))
1612 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
1615 memcpy(sysInfo->mibMsg, encBuf, encBufSize);
1616 sysInfo->mibLen = encBufSize;
1618 /* GNB DU System Info SIB1 msg */
1620 DU_ALLOC(sysInfo->sib1Msg, encBufSize);
1621 if(!(sysInfo->sib1Msg))
1623 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
1626 memcpy(sysInfo->sib1Msg, encBuf,encBufSize);
1627 sysInfo->sib1Len = encBufSize;
1633 /*******************************************************************
1635 * @brief Fill PLMN received from O1 interface
1639 * Function : fillPlmnFromO1
1641 * Functionality: Fill PLMN received from O1 interface
1643 * @params[in] XML document pointer
1645 * Current node in XML
1646 * Pointer to structure to be filled
1647 * @return ROK - success
1650 * ****************************************************************/
1651 void fillPlmnFromO1(Plmn *PLMN, uint8_t srvdPlmnIdx)
1653 PLMN->mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
1654 PLMN->mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
1655 PLMN->mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
1656 PLMN->mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
1657 PLMN->mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
1658 PLMN->mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
1663 /*******************************************************************
1665 * @brief Fill Beamforming Configuration
1669 * Function : parseBeamformingConfig
1671 * Functionality: Fill Beamforming Configuration
1673 * @params[in] XML document pointer
1675 * Current node in XML
1676 * Pointer to structure to be filled
1677 * @return ROK - success
1680 * ****************************************************************/
1681 uint8_t parseBeamformingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BeamformingConf *beamformingCfg)
1683 memset(beamformingCfg, 0, sizeof(BeamformingConf));
1684 cur = cur -> xmlChildrenNode;
1687 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_BEAMS")) && (cur->ns == ns))
1689 beamformingCfg->numOfBeams = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1692 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_RUS")) && (cur->ns == ns))
1694 beamformingCfg->numTxRUs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1697 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_IDX")) && (cur->ns == ns))
1699 beamformingCfg->beamIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1702 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TYPE")) && (cur->ns == ns))
1704 beamformingCfg->beamType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1707 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_AZIMUTH")) && (cur->ns == ns))
1709 beamformingCfg->beamAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1712 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TILT")) && (cur->ns == ns))
1714 beamformingCfg->beamTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1717 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_HORIZ_WIDTH")) && (cur->ns == ns))
1719 beamformingCfg->beamHorizWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1722 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_VERT_WIDTH")) && (cur->ns == ns))
1724 beamformingCfg->beamVertWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1727 if ((!xmlStrcmp(cur->name, (const xmlChar *)"COVER_SHAPE")) && (cur->ns == ns))
1729 beamformingCfg->coverageShape = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1732 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_TILT")) && (cur->ns == ns))
1734 beamformingCfg->digitalTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1737 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_AZIMUTH")) && (cur->ns == ns))
1739 beamformingCfg->digitalAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1747 /*******************************************************************
1749 * @brief Fill Precoding Configuration
1753 * Function : parsePrecodingConfig
1755 * Functionality: Fill Precoding Configuration
1757 * @params[in] XML document pointer
1759 * Current node in XML
1760 * Pointer to structure to be filled
1761 * @return ROK - success
1764 * ****************************************************************/
1765 uint8_t parsePrecodingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrecodingConf *precodCfg)
1767 memset(precodCfg, 0, sizeof(PrecodingConf));
1768 cur = cur -> xmlChildrenNode;
1771 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_LAYERS")) && (cur->ns == ns))
1773 precodCfg->numLayers = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1776 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ANT_PORTS")) && (cur->ns == ns))
1778 precodCfg->numAntPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1786 /*******************************************************************
1788 * @brief Fill PRACH FDM Information
1792 * Function : parsePrachFdmInfo
1794 * Functionality: Fill PRACH FDM Information
1796 * @params[in] XML document pointer
1798 * Current node in XML
1799 * Pointer to structure to be filled
1800 * @return ROK - success
1803 * ****************************************************************/
1804 uint8_t parsePrachFdmInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PrachFdmInfo *prachFdmInfo)
1806 memset(prachFdmInfo, 0, sizeof(PrachFdmInfo));
1807 cur = cur -> xmlChildrenNode;
1810 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
1812 prachFdmInfo->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1815 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ROOT_SEQ")) && (cur->ns == ns))
1817 prachFdmInfo->numRootSeq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1820 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K1")) && (cur->ns == ns))
1822 prachFdmInfo->k1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1825 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORR_ZONE_CFG")) && (cur->ns == ns))
1827 prachFdmInfo->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1835 /*******************************************************************
1837 * @brief Fill PRACH configuration
1841 * Function : parsePrachCfg
1843 * Functionality: Fill PRACH configuration
1845 * @params[in] XML document pointer
1847 * Current node in XML
1848 * Pointer to structure to be filled
1849 * @return ROK - success
1852 * ****************************************************************/
1853 uint8_t parsePrachCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrachCfg *prachCfg)
1857 uint8_t maxNumRbs = 0;
1858 uint8_t prachMaxPrb = 0;
1860 memset(prachCfg, 0, sizeof(PrachCfg));
1861 cur = cur -> xmlChildrenNode;
1864 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SEQ_LEN")) && (cur->ns == ns))
1866 prachCfg->prachSeqLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1869 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
1871 prachCfg->prachSubcSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1874 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
1876 prachCfg->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1879 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRACH_FDM")) && (cur->ns == ns))
1881 prachCfg->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1884 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FDM_LIST")) && (cur->ns == ns))
1886 child = cur->xmlChildrenNode;
1887 while(child != NULL)
1889 if ((!xmlStrcmp(child->name, (const xmlChar *)"FDM_INFO")) && (child->ns == ns))
1891 if(parsePrachFdmInfo(doc, ns, child, &prachCfg->fdm[fdmIdx]) != ROK)
1897 child = child -> next;
1901 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns == ns))
1903 prachCfg->prachRstSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1906 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PER_RACH")) && (cur->ns == ns))
1908 prachCfg->ssbPerRach = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1911 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
1913 prachCfg->totalNumRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1916 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
1918 prachCfg->numCbPreamblePerSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1921 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
1923 maxNumRbs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1926 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
1928 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1931 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
1933 prachCfg->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1936 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
1938 prachCfg->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1944 prachCfg->msg1FreqStart = maxNumRbs - prachMaxPrb;
1948 /*******************************************************************
1950 * @brief Fill CSI RS configuration
1954 * Function : parseCsiRsCfg
1956 * Functionality: Fill CSI RS configuration
1958 * @params[in] XML document pointer
1960 * Current node in XML
1961 * Pointer to structure to be filled
1962 * @return ROK - success
1965 * ****************************************************************/
1966 uint8_t parseCsiRsCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CsiRsCfg *csiRsCfg)
1968 memset(csiRsCfg, 0, sizeof(CsiRsCfg));
1969 cur = cur -> xmlChildrenNode;
1972 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_FREQ")) && (cur->ns == ns))
1974 csiRsCfg->csiFreqDomainAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1977 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_PORTS")) && (cur->ns == ns))
1979 csiRsCfg->csiNrofPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1982 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT")) && (cur->ns == ns))
1984 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1987 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT_2")) && (cur->ns == ns))
1989 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1992 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DM_TYPE")) && (cur->ns == ns))
1994 csiRsCfg->csirscdmType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1997 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY")) && (cur->ns == ns))
1999 csiRsCfg->csirsdensity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2002 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY_DOT_5")) && (cur->ns == ns))
2004 csiRsCfg->csirsdensitydot5 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2007 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET")) && (cur->ns == ns))
2009 csiRsCfg->powerControlOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2012 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET_SS")) && (cur->ns == ns))
2014 csiRsCfg->powerControlOffsetSS = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2017 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY_OFFSET")) && (cur->ns == ns))
2019 csiRsCfg->periodicityAndOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2027 /*******************************************************************
2029 * @brief Fill SSB Configuration
2033 * Function : parseSsbCfg
2035 * Functionality: Fill SSB Configuration
2037 * @params[in] XML document pointer
2039 * Current node in XML
2040 * Pointer to structure to be filled
2041 * @return ROK - success
2044 * ****************************************************************/
2045 uint8_t parseSsbCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SsbCfg *ssbCfg)
2048 uint8_t ssbMaskIdx = 0;
2050 memset(ssbCfg, 0, sizeof( SsbCfg));
2051 cur = cur -> xmlChildrenNode;
2055 ssbCfg->scsCmn = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
2056 ssbCfg->ssbPeriod = convertSSBPeriodicityToEnum(cellParams.ssbPeriodicity);
2057 ssbCfg->ssbScOffset = cellParams.ssbOffset;
2059 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_CMN")) && (cur->ns == ns))
2061 ssbCfg->scsCmn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2064 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIOD")) && (cur->ns == ns))
2066 ssbCfg->ssbPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2069 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFFSET")) && (cur->ns == ns))
2071 ssbCfg->ssbScOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2075 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_OFFSET_PT_A")) && (cur->ns == ns))
2077 ssbCfg->ssbOffsetPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2080 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBSC_PWR")) && (cur->ns == ns))
2082 ssbCfg->ssbPbchPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2085 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_MASK_LIST")) && (cur->ns == ns))
2087 child = cur -> xmlChildrenNode;
2088 while(child != NULL)
2090 if ((!xmlStrcmp(child->name, (const xmlChar *)"SSB_MASK")) && (child->ns == ns))
2092 ssbCfg->ssbMask[ssbMaskIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
2095 child = child -> next;
2099 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_ID")) && (cur->ns == ns))
2101 ssbCfg->beamId[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2104 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BETA_PSS")) && (cur->ns == ns))
2106 ssbCfg->betaPss = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2109 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCH_PAYLOAD_FLAG")) && (cur->ns == ns))
2111 ssbCfg->bchPayloadFlag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2114 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPE_A_POS")) && (cur->ns == ns))
2116 ssbCfg->dmrsTypeAPos = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2122 if(BuildMibPdu() != ROK)
2124 DU_LOG("\nERROR --> Failed to build MIB PDU");
2125 memset(&ssbCfg->mibPdu, 0, 3*sizeof(uint8_t));
2129 memcpy(&ssbCfg->mibPdu, encBuf, encBufSize);
2135 /*******************************************************************
2137 * @brief Fill Carrier Configuration
2141 * Function : parseCarrierCfg
2143 * Functionality: Fill Carrier Configuration
2145 * @params[in] XML document pointer
2147 * Current node in XML
2148 * Pointer to structure to be filled
2149 * @return ROK - success
2152 * ****************************************************************/
2153 uint8_t parseCarrierCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CarrierCfg *carrierCfg)
2155 memset(carrierCfg, 0, sizeof(CarrierCfg));
2156 cur = cur -> xmlChildrenNode;
2160 carrierCfg->dlBw = cellParams.bSChannelBwDL;
2161 carrierCfg->arfcnDL = cellParams.arfcnDL;
2162 carrierCfg->ulBw = cellParams.bSChannelBwUL;
2163 carrierCfg->arfcnUL = cellParams.arfcnUL;
2165 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_BW")) && (cur->ns == ns))
2167 carrierCfg->dlBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2170 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_DL_ARFCN")) && (cur->ns == ns))
2172 carrierCfg->arfcnDL = convertArfcnToFreqKhz(atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)));
2175 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_BW")) && (cur->ns == ns))
2177 carrierCfg->ulBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2180 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_UL_ARFCN")) && (cur->ns == ns))
2182 carrierCfg->arfcnUL = convertArfcnToFreqKhz(atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)));
2186 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_ANT")) && (cur->ns == ns))
2188 carrierCfg->numTxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2191 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RX_ANT")) && (cur->ns == ns))
2193 carrierCfg->numRxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2201 /*******************************************************************
2203 * @brief Fill PLMN Information List
2207 * Function : parsePlmnInfo
2209 * Functionality: Fill PLMN Information List
2211 * @params[in] XML document pointer
2213 * Current node in XML
2214 * Pointer to structure to be filled
2215 * @return ROK - success
2218 * ****************************************************************/
2219 uint8_t parsePlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PlmnInfoList *plmnInfoList)
2222 memset(plmnInfoList, 0, sizeof(PlmnInfoList));
2223 cur = cur -> xmlChildrenNode;
2226 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
2228 if(parsePlmn(doc, ns, cur,&plmnInfoList->plmn) != ROK)
2234 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
2236 if(parseSupportedSliceList(doc, ns, cur,&plmnInfoList -> suppSliceList) != ROK)
2247 /*******************************************************************
2249 * @brief Fill PUCCH Configuration Common
2253 * Function : parsePucchConfigCommon
2255 * Functionality: Fill PUCCH Configuration Common
2257 * @params[in] XML document pointer
2259 * Current node in XML
2260 * Pointer to structure to be filled
2261 * @return ROK - success
2264 * ****************************************************************/
2265 uint8_t parsePucchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PucchConfigCommon *pucchCfgCmn)
2267 memset(pucchCfgCmn, 0, sizeof(PucchConfigCommon));
2268 cur = cur -> xmlChildrenNode;
2271 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
2273 pucchCfgCmn->pucchResourceCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2276 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_NEITHER_HOPPING")) && (cur->ns == ns))
2278 pucchCfgCmn->pucchGroupHopping = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2286 /*******************************************************************
2288 * @brief Fill PUSCH Common Time Allocation
2292 * Function : parsePuschTimeDomRsrcAlloc
2294 * Functionality: Fill PUSCH Common Time Allocation
2296 * @params[in] XML document pointer
2298 * Current node in XML
2299 * Pointer to structure to be filled
2300 * @return ROK - success
2303 * ****************************************************************/
2304 uint8_t parsePuschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschTimeDomRsrcAlloc *puschTimeDomRsrsAlloc)
2306 memset(puschTimeDomRsrsAlloc, 0, sizeof(PuschTimeDomRsrcAlloc));
2307 cur = cur -> xmlChildrenNode;
2310 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_K2_CFG")) && (cur->ns == ns))
2312 puschTimeDomRsrsAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2315 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MAPPING_TYPE")) && (cur->ns == ns))
2317 puschTimeDomRsrsAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2320 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
2322 puschTimeDomRsrsAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2325 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
2327 puschTimeDomRsrsAlloc->symbolLength= atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2333 puschTimeDomRsrsAlloc -> startSymbolAndLength = \
2334 calcSliv(puschTimeDomRsrsAlloc->startSymbol, puschTimeDomRsrsAlloc->symbolLength);
2338 /*******************************************************************
2340 * @brief Fill PUSCH Configuration Common
2344 * Function : parsePuschConfigCommon
2346 * Functionality: Fill PUSCH Configuration Common
2348 * @params[in] XML document pointer
2350 * Current node in XML
2351 * Pointer to structure to be filled
2352 * @return ROK - success
2355 * ****************************************************************/
2356 uint8_t parsePuschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschConfigCommon *puschCfgCmn)
2359 xmlNodePtr child = NULLP;
2361 memset(puschCfgCmn, 0, sizeof(PuschConfigCommon));
2362 cur = cur -> xmlChildrenNode;
2365 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
2367 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2370 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
2372 child = cur->xmlChildrenNode;
2373 while(child != NULL)
2375 if ((!xmlStrcmp(child->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC")) && (child->ns == ns))
2377 if(parsePuschTimeDomRsrcAlloc(doc, ns, child, &puschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
2383 child = child -> next;
2391 /*******************************************************************
2393 * @brief Fill BWP Configuration
2397 * Function : parseBwp
2399 * Functionality: Fill BWP Configuration
2401 * @params[in] XML document pointer
2403 * Current node in XML
2404 * Pointer to structure to be filled
2405 * @return ROK - success
2408 * ****************************************************************/
2409 uint8_t parseBwp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpParams *bwp)
2411 memset(bwp, 0, sizeof(BwpParams));
2412 cur = cur -> xmlChildrenNode;
2415 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PRB")) && (cur->ns == ns))
2417 bwp->firstPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2420 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRB")) && (cur->ns == ns))
2422 bwp->numPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2425 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
2427 bwp->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2430 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NORMAL_CYCLIC_PREFIX")) && (cur->ns == ns))
2432 bwp->cyclicPrefix = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2440 /*******************************************************************
2442 * @brief Fill UL BWP Configuration
2446 * Function : parseBwpULConfig
2448 * Functionality: Fill UL BWP Configuration
2450 * @params[in] XML document pointer
2452 * Current node in XML
2453 * Pointer to structure to be filled
2454 * @return ROK - success
2457 * ****************************************************************/
2458 uint8_t parseBwpULConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpUlConfig *bwpUlCfg)
2460 memset(bwpUlCfg, 0, sizeof(BwpUlConfig));
2461 cur = cur -> xmlChildrenNode;
2464 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
2466 if(parseBwp(doc, ns, cur, &bwpUlCfg->bwp) != ROK)
2472 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
2474 if(parsePucchConfigCommon(doc, ns, cur, &bwpUlCfg->pucchCommon) != ROK)
2480 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
2482 if(parsePuschConfigCommon(doc, ns, cur, &bwpUlCfg->puschCommon) != ROK)
2492 /*******************************************************************
2494 * @brief Fill Page Configuration
2498 * Function : parsePageCfg
2500 * Functionality: Fill Page Configuration
2502 * @params[in] XML document pointer
2504 * Current node in XML
2505 * Pointer to structure to be filled
2506 * @return ROK - success
2509 * ****************************************************************/
2510 uint8_t parsePageCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SchPageCfg *pageCfg)
2514 memset(pageCfg, 0, sizeof(SchPageCfg));
2515 cur = cur -> xmlChildrenNode;
2518 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PO")) && (cur->ns == ns))
2520 pageCfg->numPO = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2523 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PO_PRESENT")) && (cur->ns == ns))
2525 poPresent = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
2526 if(!strcmp(poPresent, "TRUE"))
2528 pageCfg->poPresent = true;
2532 pageCfg->poPresent = false;
2536 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGING_OCC")) && (cur->ns == ns))
2538 pageCfg->pagingOcc[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2546 /*******************************************************************
2548 * @brief Fill SIB1 PDCCH Configuration
2552 * Function : parsePdcchCfgSib1
2554 * Functionality: Fill SIB1 PDCCH Configuration
2556 * @params[in] XML document pointer
2558 * Current node in XML
2559 * Pointer to structure to be filled
2560 * @return ROK - success
2563 * ****************************************************************/
2564 uint8_t parsePdcchCfgSib1(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigSib1 *pdcchConfigSib1)
2566 memset(pdcchConfigSib1, 0, sizeof(PdcchConfigSib1));
2567 cur = cur -> xmlChildrenNode;
2570 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_ZERO_INDEX")) && (cur->ns == ns))
2572 pdcchConfigSib1->coresetZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2575 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_ZERO_INDEX")) && (cur->ns == ns))
2577 pdcchConfigSib1->searchSpaceZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2585 /*******************************************************************
2587 * @brief Fill SIB1 Cell Configuration
2591 * Function : parseSib1CellCfg
2593 * Functionality: Fill SIB1 Cell Configuration
2595 * @params[in] XML document pointer
2597 * Current node in XML
2598 * Pointer to structure to be filled
2599 * @return ROK - success
2602 * ****************************************************************/
2603 uint8_t parseSib1CellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Sib1CellCfg *sib1CellCfg)
2605 memset(sib1CellCfg, 0, sizeof( Sib1CellCfg));
2606 cur = cur -> xmlChildrenNode;
2609 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_PAGE_CFG")) && (cur->ns == ns))
2611 if(parsePageCfg(doc, ns, cur, &sib1CellCfg->pagingCfg) != ROK)
2617 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CONFIG_SIB1")) && (cur->ns == ns))
2619 if(parsePdcchCfgSib1(doc, ns, cur, &sib1CellCfg->pdcchCfgSib1) != ROK)
2628 sib1CellCfg->sib1PduLen = duCfgParam.srvdCellLst[0].duSysInfo.sib1Len;
2629 if(sib1CellCfg->sib1PduLen > 0)
2631 DU_ALLOC_SHRABL_BUF(sib1CellCfg->sib1Pdu, sib1CellCfg->sib1PduLen);
2632 if(!sib1CellCfg->sib1Pdu)
2634 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
2637 memcpy(sib1CellCfg->sib1Pdu, duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg, sib1CellCfg->sib1PduLen);
2642 /*******************************************************************
2644 * @brief Fill Aggregation Level Candidates Information
2648 * Function : parseCandidateInfo
2650 * Functionality: Fill Aggregation Level Candidates Information
2652 * @params[in] XML document pointer
2654 * Current node in XML
2655 * Pointer to structure to be filled
2656 * @return ROK - success
2659 * ****************************************************************/
2660 uint8_t parseCandidateInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CandidatesInfo *candInfo)
2662 memset(candInfo, 0, sizeof(CandidatesInfo));
2663 cur = cur -> xmlChildrenNode;
2666 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL1")) && (cur->ns == ns))
2668 candInfo->aggLevel1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2671 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL2")) && (cur->ns == ns))
2673 candInfo->aggLevel2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2676 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL4")) && (cur->ns == ns))
2678 candInfo->aggLevel4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2681 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL8")) && (cur->ns == ns))
2683 candInfo->aggLevel8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2686 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL16")) && (cur->ns == ns))
2688 candInfo->aggLevel16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2696 /*******************************************************************
2698 * @brief Fill Search Space Connfiguration
2702 * Function : parseSearchSpaceCfg
2704 * Functionality: Fill Search Space Configuration
2706 * @params[in] XML document pointer
2708 * Current node in XML
2709 * Pointer to structure to be filled
2710 * @return ROK - success
2713 * ****************************************************************/
2714 uint8_t parseSearchSpaceCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SearchSpaceCfg *searchSpaceCfg)
2716 memset(searchSpaceCfg, 0, sizeof(SearchSpaceCfg));
2717 cur = cur -> xmlChildrenNode;
2720 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_1_INDEX")) && (cur->ns == ns))
2722 searchSpaceCfg->searchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2725 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
2727 searchSpaceCfg->coresetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2730 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SLOT_SL1")) && (cur->ns == ns))
2732 searchSpaceCfg->monitoringSlot = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2735 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DURATION")) && (cur->ns == ns))
2737 searchSpaceCfg->duration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2740 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SYMBOL")) && (cur->ns == ns))
2742 searchSpaceCfg->monitoringSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2745 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CANDIDATE_INFO")) && (cur->ns == ns))
2747 if(parseCandidateInfo(doc, ns, cur, &searchSpaceCfg->candidate) != ROK)
2758 /*******************************************************************
2760 * @brief Fill PDCCH Configuration Common
2764 * Function : parsePdcchCfgCommon
2766 * Functionality: Fill PDCCH Configuration Common
2768 * @params[in] XML document pointer
2770 * Current node in XML
2771 * Pointer to structure to be filled
2772 * @return ROK - success
2775 * ****************************************************************/
2776 uint8_t parsePdcchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigCommon *pdcchCfgCm)
2778 memset(pdcchCfgCm, 0, sizeof(PdcchConfigCommon));
2779 cur = cur -> xmlChildrenNode;
2782 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_CFG")) && (cur->ns == ns))
2784 if(parseSearchSpaceCfg(doc, ns, cur, &pdcchCfgCm->commonSearchSpace) != ROK)
2790 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_SEARCH_SPACE_INDEX")) && (cur->ns == ns))
2792 pdcchCfgCm->raSearchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2801 /*******************************************************************
2803 * @brief Fill PDSCH Common Time Domain Resource Allocation
2807 * Function : parsePdschCmnTimeDomRsrcAlloc
2809 * Functionality: Fill PDSCH Common Time Domain Resource Allocation
2811 * @params[in] XML document pointer
2813 * Current node in XML
2814 * Pointer to structure to be filled
2815 * @return ROK - success
2818 * ****************************************************************/
2819 uint8_t parsePdschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,\
2820 PdschCfgCommTimeDomRsrcAlloc *pdschTimeDomRsrcAlloc)
2822 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschCfgCommTimeDomRsrcAlloc));
2823 cur = cur -> xmlChildrenNode;
2826 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_K0_CFG")) && (cur->ns == ns))
2828 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2830 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_MAPPING_TYPE")) && (cur->ns == ns))
2832 pdschTimeDomRsrcAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2834 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
2836 pdschTimeDomRsrcAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2838 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
2840 pdschTimeDomRsrcAlloc->lengthSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2848 /*******************************************************************
2850 * @brief Fill PDSCH Configuration Common
2854 * Function : parsePdschConfigCommon
2856 * Functionality: Fill PDSCH Configuration Common
2858 * @params[in] XML document pointer
2860 * Current node in XML
2861 * Pointer to structure to be filled
2862 * @return ROK - success
2865 * ****************************************************************/
2866 uint8_t parsePdschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdschConfigCommon *pdschCfgCmn)
2869 xmlNodePtr child = NULLP;
2870 xmlNodePtr pdschNode = NULLP;
2872 memset(pdschCfgCmn, 0, sizeof(PdschConfigCommon));
2873 cur = cur -> xmlChildrenNode;
2876 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
2878 pdschCfgCmn->numTimeDomAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2881 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
2883 child = cur->xmlChildrenNode;
2884 while(child != NULL)
2886 if ((!xmlStrcmp(child->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC")) && (child->ns == ns))
2888 if(parsePdschCmnTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
2894 child = child -> next;
2902 /*******************************************************************
2904 * @brief Fill DL BWP Configuration
2908 * Function : parseBwpDLConfig
2910 * Functionality: Fill DL BWP Configuration
2912 * @params[in] XML document pointer
2914 * Current node in XML
2915 * Pointer to structure to be filled
2916 * @return ROK - success
2919 * ****************************************************************/
2920 uint8_t parseBwpDLConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpDlConfig *bwpDlCfg)
2922 memset(bwpDlCfg, 0, sizeof(BwpDlConfig));
2923 cur = cur -> xmlChildrenNode;
2926 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
2928 if(parseBwp(doc, ns, cur, &bwpDlCfg->bwp) != ROK)
2934 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
2936 if(parsePdcchCfgCommon(doc, ns, cur, &bwpDlCfg->pdcchCommon) != ROK)
2942 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
2944 if(parsePdschConfigCommon(doc, ns, cur, &bwpDlCfg->pdschCommon) != ROK)
2955 /*******************************************************************
2957 * @brief Fill Cell Configuration
2961 * Function : parseCellCfg
2963 * Functionality: Fill Cell Configuration
2965 * @params[in] XML document pointer
2967 * Current node in XML
2968 * Pointer to structure to be filled
2969 * @return ROK - success
2972 * ****************************************************************/
2973 uint8_t parseCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CellCfg *cellCfg)
2975 memset(cellCfg, 0, sizeof(CellCfg));
2976 cur = cur -> xmlChildrenNode;
2980 cellCfg->opState = cellParams.operationalState;
2981 cellCfg->adminState = cellParams.administrativeState;
2982 cellCfg->cellState = cellParams.cellState;
2983 cellCfg->phyCellId = cellParams.nRPCI;
2984 cellCfg->tac = cellParams.nRTAC;
2985 cellCfg->ssbFreq = cellParams.ssbFrequency;
2987 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_OP_STATE")) && (cur->ns == ns))
2989 cellCfg->opState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2992 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_ADMIN_STATE")) && (cur->ns == ns))
2994 cellCfg->adminState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2997 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_STATE")) && (cur->ns == ns))
2999 cellCfg->cellState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3002 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
3004 cellCfg->phyCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3007 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
3009 cellCfg->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3012 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_FREQUENCY")) && (cur->ns == ns))
3014 cellCfg->ssbFreq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3018 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN_INFO")) && (cur->ns == ns))
3020 if(parsePlmnInfo(doc, ns, cur, &cellCfg->plmnInfoList[0]) != ROK)
3026 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3028 cellCfg->subCarrSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3031 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DUPLEX_MODE")) && (cur->ns == ns))
3033 cellCfg->dupType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3036 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_CELL_CFG")) && (cur->ns == ns))
3038 if(parseSib1CellCfg(doc, ns, cur, &cellCfg->sib1Cfg) != ROK)
3044 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_DL_CFG")) && (cur->ns == ns))
3046 if(parseBwpDLConfig(doc, ns, cur, &cellCfg->initialDlBwp) != ROK)
3052 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_UL_CFG")) && (cur->ns == ns))
3054 if(parseBwpULConfig(doc, ns, cur, &cellCfg->initialUlBwp) != ROK)
3065 /*******************************************************************
3067 * @brief Fill TDD slot configuration
3071 * Function : parseTddCfg
3073 * Functionality: Fill TDD slot configuration
3075 * @params[in] XML document pointer
3077 * Current node in XML
3078 * Pointer to structure to be filled
3079 * @return ROK - success
3082 * ****************************************************************/
3083 uint8_t parseTddCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TDDCfg *tddCfg)
3085 memset(tddCfg, 0, sizeof(TDDCfg));
3086 cur = cur -> xmlChildrenNode;
3089 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_PERIODICITY")) && (cur->ns == ns))
3091 tddCfg->tddPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3094 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
3096 tddCfg->nrOfDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3099 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
3101 tddCfg->nrOfDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3104 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
3106 tddCfg->nrOfUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3109 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
3111 tddCfg->nrOfUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3120 /*******************************************************************
3122 * @brief Fill MAC Cell Configuration
3126 * Function : parseMacCellCfg
3128 * Functionality: Fill MAC Cell Configuration
3130 * @params[in] XML document pointer
3132 * Current node in XML
3133 * Pointer to structure to be filled
3134 * @return ROK - success
3137 * ****************************************************************/
3138 uint8_t parseMacCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacCellCfg *macCellCfg)
3140 memset(macCellCfg, 0, sizeof(MacCellCfg));
3141 cur = cur -> xmlChildrenNode;
3145 macCellCfg->cellId = cellParams.cellLocalId;
3147 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
3149 macCellCfg->cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3153 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CARRIER_CFG")) && (cur->ns == ns))
3155 if(parseCarrierCfg(doc, ns, cur, &macCellCfg->carrCfg) != ROK)
3161 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_CFG")) && (cur->ns == ns))
3163 if(parseCellCfg(doc, ns, cur, &macCellCfg->cellCfg) != ROK)
3169 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_CFG")) && (cur->ns == ns))
3171 if(parseSsbCfg(doc, ns, cur, &macCellCfg->ssbCfg) != ROK)
3177 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_CFG")) && (cur->ns == ns))
3179 if(parseCsiRsCfg(doc, ns, cur, &macCellCfg->csiRsCfg) != ROK)
3185 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CFG")) && (cur->ns == ns))
3187 if(parsePrachCfg(doc, ns, cur, &macCellCfg->prachCfg) != ROK)
3194 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_CFG")) && (cur->ns == ns))
3196 if(parseTddCfg(doc, ns, cur, &macCellCfg->tddCfg) != ROK)
3203 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRE_CODE_CFG")) && (cur->ns == ns))
3205 if(parsePrecodingConfig(doc, ns, cur, &macCellCfg->precodingConf) != ROK)
3211 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_FORM_CFG")) && (cur->ns == ns))
3213 if(parseBeamformingConfig(doc, ns, cur, &macCellCfg->beamCfg) != ROK)
3224 /*******************************************************************
3226 * @brief Fill PUSCH Configuration Common Time Domain
3227 * Resource Allocation
3231 * Function : parsePuschCmnTimeDomRsrcAlloc
3233 * Functionality: Fill PUSCH Configuration Common Time Domain
3234 * Resource Allocation
3236 * @params[in] XML document pointer
3238 * Current node in XML
3239 * Pointer to structure to be filled
3240 * @return ROK - success
3243 * ****************************************************************/
3244 uint8_t parsePuschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCmnTimeDomAlloc *puschCmnTimeDomAlloc)
3246 uint16_t startSymbol;
3249 memset(puschCmnTimeDomAlloc, 0, sizeof(PuschCfgCmnTimeDomAlloc));
3250 cur = cur -> xmlChildrenNode;
3253 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K2")) && (cur->ns == ns))
3255 puschCmnTimeDomAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3257 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
3259 puschCmnTimeDomAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3261 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
3263 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3265 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3267 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3271 puschCmnTimeDomAlloc->sliv = calcSliv(startSymbol, lenSymbol);
3275 /*******************************************************************
3277 * @brief Fill PUSCH Configuration Common
3281 * Function : parsePuschCfgCommon
3283 * Functionality: Fill PUSCH Configuration Common
3285 * @params[in] XML document pointer
3287 * Current node in XML
3288 * Pointer to structure to be filled
3289 * @return ROK - success
3292 * ****************************************************************/
3293 uint8_t parsePuschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCommon *puschCfgCmn)
3295 uint8_t rsrcIdx = 0;
3296 xmlNodePtr child = NULLP;
3297 xmlNodePtr rsrcNode = NULLP;
3299 memset(puschCfgCmn, 0, sizeof(PuschCfgCommon));
3300 cur = cur -> xmlChildrenNode;
3303 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_PRESENT")) && (cur->ns == ns))
3305 puschCfgCmn->puschCfgPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3308 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MSG3_DELTA_PREAMBLE")) && (cur->ns == ns))
3310 puschCfgCmn->msg3DeltaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3313 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_P0_NOMINAL_WITH_GRANT")) && (cur->ns == ns))
3315 puschCfgCmn->p0NominalWithGrant = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3318 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
3320 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3323 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
3325 child = cur->xmlChildrenNode;
3326 while (child != NULL)
3328 if ((!xmlStrcmp(child->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC")) && (child->ns == ns))
3330 if(parsePuschCmnTimeDomRsrcAlloc(doc, ns, child, &puschCfgCmn->timeDomAllocList[rsrcIdx]) != ROK)
3336 child = child->next;
3344 /*******************************************************************
3346 * @brief Fill PUCCH Configuration Common
3350 * Function : parsePucchCfgCommon
3352 * Functionality: Fill PUCCH Configuration Common
3354 * @params[in] XML document pointer
3356 * Current node in XML
3357 * Pointer to structure to be filled
3358 * @return ROK - success
3361 * ****************************************************************/
3362 uint8_t parsePucchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PucchCfgCommon *pucchCfgCmn)
3364 memset(pucchCfgCmn, 0, sizeof(PucchCfgCommon));
3365 cur = cur -> xmlChildrenNode;
3368 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3370 pucchCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3373 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
3375 pucchCfgCmn->rsrcComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3378 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GRP_HOP")) && (cur->ns == ns))
3380 pucchCfgCmn->grpHop = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3383 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_P0_NOMINAL")) && (cur->ns == ns))
3385 pucchCfgCmn->p0Nominal = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3393 /*******************************************************************
3395 * @brief Fill RACH Configuration Common
3399 * Function : parseRachCfgCommon
3401 * Functionality: Fill RACH Configuration Common
3403 * @params[in] XML document pointer
3405 * Current node in XML
3406 * Pointer to structure to be filled
3407 * @return ROK - success
3410 * ****************************************************************/
3411 uint8_t parseRachCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RachCfgCommon *rachCfgCmn)
3416 memset(rachCfgCmn, 0, sizeof(RachCfgCommon));
3417 cur = cur -> xmlChildrenNode;
3420 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3422 rachCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3425 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
3427 rachCfgCmn->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3430 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MSG_1_FDM")) && (cur->ns == ns))
3432 rachCfgCmn->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3435 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
3437 maxNumRb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3439 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
3441 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3444 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORRELATION_ZONE_CFG")) && (cur->ns == ns))
3446 rachCfgCmn->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3449 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_PREAMBLE_RCVD_TGT_PWR")) && (cur->ns == ns))
3451 rachCfgCmn->preambleRcvdTgtPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3454 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PREAMBLE_TRANS_MAX")) && (cur->ns == ns))
3456 rachCfgCmn->preambleTransMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3459 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PWR_RAMPING_STEP")) && (cur->ns == ns))
3461 rachCfgCmn->pwrRampingStep = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3464 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
3466 rachCfgCmn->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3469 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
3471 rachCfgCmn->numRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3474 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SSB_PER_RACH_OCC")) && (cur->ns == ns))
3476 rachCfgCmn->numSsbPerRachOcc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3479 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
3481 rachCfgCmn->numCbPreamblePerSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3484 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONT_RES_TIMER")) && (cur->ns == ns))
3486 rachCfgCmn->contResTimer = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3489 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
3491 rachCfgCmn->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3494 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX_PRESENT")) && (cur->ns == ns))
3496 rachCfgCmn->rootSeqIdxPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3499 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
3501 rachCfgCmn->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3504 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SUBCARRIER_SPACING")) && (cur->ns == ns))
3506 rachCfgCmn->msg1Scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3509 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns== ns))
3511 rachCfgCmn->restrictedSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3517 rachCfgCmn->msg1FreqStart = ((maxNumRb) - (prachMaxPrb));
3521 /*******************************************************************
3523 * @brief Fill SCS Specific Carrier
3527 * Function : parseScsSpecCarrier
3529 * Functionality: Fill SCS Specific Carrier
3531 * @params[in] XML document pointer
3533 * Current node in XML
3534 * Pointer to structure to be filled
3535 * @return ROK - success
3538 * ****************************************************************/
3539 uint8_t parseScsSpecCarrier(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ScsSpecCarrier *scsSpecCrr)
3541 memset(scsSpecCrr, 0, sizeof(ScsSpecCarrier));
3544 scsSpecCrr->scsOffset = cellParams.ssbOffset;
3545 scsSpecCrr->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
3546 scsSpecCrr->scsBw = cellParams.bSChannelBwUL;
3548 cur = cur -> xmlChildrenNode;
3551 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SUBCARRIER_OFFSET")) && (cur->ns == ns))
3553 scsSpecCrr->scsOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3556 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3558 scsSpecCrr->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3561 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_BW")) && (cur->ns == ns))
3563 scsSpecCrr->scsBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3571 /*******************************************************************
3573 * @brief Fill UL Config Common
3577 * Function : parseUlCfgCommon
3579 * Functionality: Fill UL Config Common
3581 * @params[in] XML document pointer
3583 * Current node in XML
3584 * Pointer to structure to be filled
3585 * @return ROK - success
3588 * ****************************************************************/
3589 uint8_t parseUlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,UlCfgCommon *ulCfgCmn)
3591 memset(ulCfgCmn, 0, sizeof(UlCfgCommon));
3592 cur = cur -> xmlChildrenNode;
3595 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
3597 ulCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3600 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_P_MAX")) && (cur->ns == ns))
3602 ulCfgCmn->pMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3605 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
3607 ulCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3610 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_ALLIGN_TIMER_COMM")) && (cur->ns == ns))
3612 ulCfgCmn->timeAlignTimerComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3615 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
3617 if(parseScsSpecCarrier(doc, ns, cur, &ulCfgCmn->ulScsCarrier) != ROK)
3623 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RACH_CFG_COMMON")) && (cur->ns == ns))
3625 if(parseRachCfgCommon(doc, ns, cur, &ulCfgCmn->rachCfg) != ROK)
3631 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
3633 if(parsePuschCfgCommon(doc, ns, cur, &ulCfgCmn->puschCfg) != ROK)
3639 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
3641 if(parsePucchCfgCommon(doc, ns, cur, &ulCfgCmn->pucchCfg) != ROK)
3652 /*******************************************************************
3654 * @brief Fill TDD UL DL Configuration Common
3658 * Function : parseTddUlDlCfgCommon
3660 * Functionality: Fill TDD UL DL Configuration Common
3662 * @params[in] XML document pointer
3664 * Current node in XML
3665 * Pointer to structure to be filled
3666 * @return ROK - success
3669 * ****************************************************************/
3670 uint8_t parseTddUlDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TddUlDlCfgCommon *tddUlDlCfgCmn)
3672 memset(tddUlDlCfgCmn, 0, sizeof(TddUlDlCfgCommon));
3673 cur = cur -> xmlChildrenNode;
3676 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REF_SCS")) && (cur->ns == ns))
3678 tddUlDlCfgCmn->refScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3681 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TX_PRD")) && (cur->ns == ns))
3683 tddUlDlCfgCmn->txPrd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3686 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
3688 tddUlDlCfgCmn->numDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3691 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
3693 tddUlDlCfgCmn->numDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3696 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
3698 tddUlDlCfgCmn->numUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3701 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
3703 tddUlDlCfgCmn->numUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3711 /*******************************************************************
3713 * @brief Fill PCCH Configuration
3717 * Function : parsePcchCfg
3719 * Functionality: Fill PCCH Configuration
3721 * @params[in] XML document pointer
3723 * Current node in XML
3724 * Pointer to structure to be filled
3725 * @return ROK - success
3728 * ****************************************************************/
3729 uint8_t parsePcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PcchCfg *pcchCfg)
3731 xmlNodePtr child = NULLP;
3734 memset(pcchCfg, 0, sizeof(PcchCfg));
3735 cur = cur -> xmlChildrenNode;
3738 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEFAULT_PAGING_CYCLE")) && (cur->ns == ns))
3740 pcchCfg->dfltPagingCycle = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3743 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAND_PAGING_FRAME_OFFSET")) && (cur->ns == ns))
3745 pcchCfg->nAndPagingFrmOffsetType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3748 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGE_FRAME_OFFSET")) && (cur->ns == ns))
3750 pcchCfg->pageFrameOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3753 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NS")) && (cur->ns == ns))
3755 pcchCfg->ns = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3758 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_TYPE")) && (cur->ns == ns))
3760 pcchCfg->firstPDCCHMontioringType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3763 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_LIST")) && (cur->ns == ns))
3765 child = cur->xmlChildrenNode;
3766 while (child != NULL)
3768 if ((!xmlStrcmp(child->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_INFO")) && (child->ns == ns))
3770 pcchCfg->firstPDCCHMontioringInfo[idx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
3773 child = child->next;
3781 /*******************************************************************
3783 * @brief Fill PDSCH Time Domain Resource Allocation
3787 * Function : parsePdschTimeDomRsrcAlloc
3789 * Functionality: Fill PDSCH Time Domain Resource Allocation
3791 * @params[in] XML document pointer
3793 * Current node in XML
3794 * Pointer to structure to be filled
3795 * @return ROK - success
3798 * ****************************************************************/
3799 uint8_t parsePdschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc)
3801 uint16_t startSymbol;
3804 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschTimeDomainRsrcAlloc));
3805 cur = cur -> xmlChildrenNode;
3808 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K0")) && (cur->ns == ns))
3810 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3813 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
3815 pdschTimeDomRsrcAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3818 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
3820 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3823 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3825 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3830 pdschTimeDomRsrcAlloc->sliv = calcSliv(startSymbol, lenSymbol);
3834 /*******************************************************************
3836 * @brief Fill PDSCH Configuration Common
3840 * Function : parsePdschCfgCommon
3842 * Functionality: Fill PDSCH Configuration Common
3844 * @params[in] XML document pointer
3846 * Current node in XML
3847 * Pointer to structure to be filled
3848 * @return ROK - success
3851 * ****************************************************************/
3852 uint8_t parsePdschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschCfgCommon *pdschCfgCmn)
3855 xmlNodePtr child = NULLP;
3857 memset(pdschCfgCmn, 0, sizeof(PdschCfgCommon));
3858 cur = cur -> xmlChildrenNode;
3861 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3863 pdschCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3866 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRS_ALLOC")) && (cur->ns == ns))
3868 pdschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3871 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
3873 child = cur->xmlChildrenNode;
3874 while (child != NULL)
3876 if ((!xmlStrcmp(child->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC")) && (child->ns == ns))
3878 if(parsePdschTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomAlloc[idx]) != ROK)
3884 child = child->next;
3892 /*******************************************************************
3894 * @brief Fill BCCH Configuration
3898 * Function : parseBcchCfg
3900 * Functionality: Fill BCCH Configuration
3902 * @params[in] XML document pointer
3904 * Current node in XML
3905 * Pointer to structure to be filled
3906 * @return ROK - success
3909 * ****************************************************************/
3910 uint8_t parseBcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BcchCfg *bcchCfg)
3912 memset(bcchCfg, 0, sizeof(BcchCfg));
3913 cur = cur -> xmlChildrenNode;
3916 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MOB_PRD_COEFF")) && (cur->ns == ns))
3918 bcchCfg->modPrdCoeff = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3925 /*******************************************************************
3927 * @brief Fill PDCCH Configuration Common
3931 * Function : parsePdcchConfigCommon
3933 * Functionality: Fill PDCCH Configuration Common
3935 * @params[in] XML document pointer
3937 * Current node in XML
3938 * Pointer to structure to be filled
3939 * @return ROK - success
3942 * ****************************************************************/
3943 uint8_t parsePdcchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdcchCfgCommon *pdccgCfgCmn)
3946 xmlNodePtr child = NULLP;
3948 memset(pdccgCfgCmn, 0, sizeof( PdcchCfgCommon));
3949 cur = cur -> xmlChildrenNode;
3952 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3954 pdccgCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3957 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
3959 pdccgCfgCmn->ctrlRsrcSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3962 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
3964 pdccgCfgCmn->searchSpcZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3967 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID")) && (cur->ns == ns))
3969 pdccgCfgCmn->searchSpcId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3972 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CTRL_RSRC_SET_ID")) && (cur->ns == ns))
3974 pdccgCfgCmn->ctrlRsrcSetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3977 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_SLOT_PERIOD_OFFSET_PRESENT")) && (cur->ns == ns))
3979 pdccgCfgCmn->monitorSlotPrdAndOffPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3982 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_LIST")) && (cur->ns == ns))
3984 child = cur->xmlChildrenNode;
3987 if ((!xmlStrcmp(child->name, (const xmlChar *)"MONITOR_SYMBOL_IN_SLOT")) && (child->ns == ns))
3989 pdccgCfgCmn->monitorSymbolsInSlot[idx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
3992 child = child->next;
3996 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_1")) && (cur->ns == ns))
3998 pdccgCfgCmn->numCandAggLvl1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4001 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_2")) && (cur->ns == ns))
4003 pdccgCfgCmn->numCandAggLvl2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4006 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_4")) && (cur->ns == ns))
4008 pdccgCfgCmn->numCandAggLvl4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4011 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_8")) && (cur->ns == ns))
4013 pdccgCfgCmn->numCandAggLvl8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4016 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_16")) && (cur->ns == ns))
4018 pdccgCfgCmn->numCandAggLvl16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4021 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_TYPE")) && (cur->ns == ns))
4023 pdccgCfgCmn->searchSpcType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4026 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_DCI_FORMAT")) && (cur->ns == ns))
4028 pdccgCfgCmn->commSrchSpcDciFrmt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4031 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_SIB1")) && (cur->ns == ns))
4033 pdccgCfgCmn->searchSpcSib1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4036 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_PAGING")) && (cur->ns == ns))
4038 pdccgCfgCmn->pagingSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4041 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_RA")) && (cur->ns == ns))
4043 pdccgCfgCmn->raSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4051 /*******************************************************************
4053 * @brief Fill DL Configuration Common
4057 * Function : parseDlCfgCommon
4059 * Functionality: Fill DL Configuration Common
4061 * @params[in] XML document pointer
4063 * Current node in XML
4064 * Pointer to structure to be filled
4065 * @return ROK - success
4068 * ****************************************************************/
4069 uint8_t parseDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,DlCfgCommon *dlCfgCmn)
4071 memset(dlCfgCmn, 0, sizeof(DlCfgCommon));
4072 cur = cur -> xmlChildrenNode;
4075 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
4077 dlCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4080 if ((!xmlStrcmp(cur->name, (const xmlChar *)"OFFSET_TO_POINT_A")) && (cur->ns == ns))
4082 dlCfgCmn->offsetToPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4085 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
4087 dlCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4090 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
4092 if(parseScsSpecCarrier(doc, ns, cur, &dlCfgCmn->dlScsCarrier) != ROK)
4098 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
4100 if(parsePdcchConfigCommon(doc, ns, cur, &dlCfgCmn->pdcchCfg) != ROK)
4106 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
4108 if(parsePdschCfgCommon(doc, ns, cur, &dlCfgCmn->pdschCfg) != ROK)
4114 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCCH_CFG")) && (cur->ns == ns))
4116 if(parseBcchCfg(doc, ns, cur, &dlCfgCmn->bcchCfg) != ROK)
4122 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PCCH_CFG")) && (cur->ns == ns))
4124 if(parsePcchCfg(doc, ns, cur, &dlCfgCmn->pcchCfg) != ROK)
4133 /*******************************************************************
4135 * @brief Fill Serving Cell Config Common SIB
4139 * Function : parseSrvCellCfgCmnSib
4141 * Functionality: Fill Serving Cell Config Common SIB
4143 * @params[in] XML document pointer
4145 * Current node in XML
4146 * Pointer to structure to be filled
4147 * @return ROK - success
4150 * ****************************************************************/
4151 uint8_t parseSrvCellCfgCmnSib(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SrvCellCfgCommSib *srvCellCfgCmnSib)
4153 memset(srvCellCfgCmnSib, 0, sizeof(SrvCellCfgCommSib));
4154 cur = cur -> xmlChildrenNode;
4158 srvCellCfgCmnSib->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
4160 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
4162 srvCellCfgCmnSib->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4165 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_POS_INBURST")) && (cur->ns == ns))
4167 srvCellCfgCmnSib->ssbPosInBurst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4170 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIODICITY")) && (cur->ns == ns))
4172 srvCellCfgCmnSib->ssbPrdServingCell = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4175 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBCH_PWR")) && (cur->ns == ns))
4177 srvCellCfgCmnSib->ssPbchBlockPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4180 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_CFG_COMMON")) && (cur->ns == ns))
4182 if(parseDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->dlCfg) != ROK)
4188 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_CFG_COMMON")) && (cur->ns == ns))
4190 if(parseUlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->ulCfg) != ROK)
4196 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_UL_DL_CFG_COMMON")) && (cur->ns == ns))
4198 if(parseTddUlDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->tddCfg) != ROK)
4209 /*******************************************************************
4211 * @brief Fill SI Scheduling Information
4215 * Function : parseSiSchedInfo
4217 * Functionality: Fill SI Scheduling Information
4219 * @params[in] XML document pointer
4221 * Current node in XML
4222 * Pointer to structure to be filled
4223 * @return ROK - success
4226 * ****************************************************************/
4227 uint8_t parseSiSchedInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SiSchedInfo *siSchedInfo)
4229 memset(siSchedInfo, 0, sizeof(SiSchedInfo));
4230 cur = cur -> xmlChildrenNode;
4233 if ((!xmlStrcmp(cur->name, (const xmlChar *)"WIN_LEN")) && (cur->ns == ns))
4235 siSchedInfo->winLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4238 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BROADCAST_STATUS")) && (cur->ns == ns))
4240 siSchedInfo->broadcastSta = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4243 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY")) && (cur->ns == ns))
4245 siSchedInfo->preiodicity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4248 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB_TYPE")) && (cur->ns == ns))
4250 siSchedInfo->sibType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4253 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_VALUE_TAG")) && (cur->ns == ns))
4255 siSchedInfo->sibValTag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4263 /*******************************************************************
4265 * @brief Fill SIB1 Parameters
4269 * Function : parseSib1Params
4271 * Functionality: Fill SIB1 Parameters
4273 * @params[in] XML document pointer
4275 * Current node in XML
4276 * Pointer to structure to be filled
4277 * @return ROK - success
4280 * ****************************************************************/
4281 uint8_t parseSib1Params(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,Sib1Params *sib1Params)
4283 memset(sib1Params, 0, sizeof(Sib1Params));
4284 cur = cur -> xmlChildrenNode;
4288 sib1Params-> tac = cellParams.nRTAC;
4289 sib1Params->cellIdentity = CELL_IDENTITY * cellParams.cellLocalId;
4290 DU_LOG("\nDEBUG --> DU_APP: readCfg(): OAM CellLocalId=%d", sib1Params->cellIdentity);
4292 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
4294 sib1Params-> tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4297 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_IDENTITY")) && (cur->ns == ns))
4299 sib1Params->cellIdentity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4303 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
4305 if(parsePlmn(doc, ns, cur, &sib1Params->plmn) != ROK)
4311 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RANAC")) && (cur->ns == ns))
4313 sib1Params->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4316 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_RESVD_OPUSE")) && (cur->ns == ns))
4318 sib1Params->cellResvdForOpUse = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4321 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_CNT")) && (cur->ns == ns))
4323 sib1Params->connEstFailCnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4326 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFF_VALID")) && (cur->ns == ns))
4328 sib1Params->connEstFailOffValidity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4331 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFFSET")) && (cur->ns == ns))
4333 sib1Params->connEstFailOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4336 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SI_SHED_INFO")) && (cur->ns == ns))
4338 if(parseSiSchedInfo(doc, ns, cur, &sib1Params->siSchedInfo) != ROK)
4344 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SRV_CELL_CFG_COM_SIB")) && (cur->ns == ns))
4346 if(parseSrvCellCfgCmnSib(doc, ns, cur, &sib1Params->srvCellCfgCommSib) != ROK)
4358 /*******************************************************************
4360 * @brief Fill RRM Policy List
4364 * Function : parseRrmPolicyList
4366 * Functionality: Fill RRM Policy List
4368 * @params[in] XML document pointer
4370 * Current node in XML
4371 * Pointer to structure to be filled
4372 * @return ROK - success
4375 * ****************************************************************/
4376 uint8_t parseRrmPolicyList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,RrmPolicyMemberList *rrmPolicyMemberList)
4378 memset(rrmPolicyMemberList, 0, sizeof(RrmPolicyMemberList));
4379 cur = cur->xmlChildrenNode;
4382 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
4384 if(parsePlmn(doc, ns, cur, &rrmPolicyMemberList->plmn) != ROK)
4390 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI")) && (cur->ns == ns))
4392 if(parseSnssai(doc, ns, cur, &rrmPolicyMemberList->snssai) != ROK)
4403 /*******************************************************************
4405 * @brief Fill RRM Policy Ratio
4409 * Function : parseRrmPolicyRatio
4411 * Functionality: Fill RRM Policy Ratio
4413 * @params[in] XML document pointer
4415 * Current node in XML
4416 * Pointer to structure to be filled
4417 * @return ROK - success
4420 * ****************************************************************/
4421 uint8_t parseRrmPolicyRatio(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RrmPolicyRatio *rrmPolicyRatio)
4423 memset(rrmPolicyRatio, 0, sizeof(RrmPolicyRatio));
4424 cur = cur -> xmlChildrenNode;
4427 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_RATIO")) && (cur->ns == ns))
4429 rrmPolicyRatio->maxRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4432 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_RATIO")) && (cur->ns == ns))
4434 rrmPolicyRatio->minRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4437 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEDICATED_RATIO")) && (cur->ns == ns))
4439 rrmPolicyRatio->dedicatedRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4447 /*******************************************************************
4449 * @brief Fill MAC Slice RRM Policy
4453 * Function : parseMacSliceRrmPolicy
4455 * Functionality: Fill MAC Slice RRM Policy
4457 * @params[in] XML document pointer
4459 * Current node in XML
4460 * Pointer to structure to be filled
4461 * @return ROK - success
4464 * ****************************************************************/
4465 uint8_t parseMacSliceRrmPolicy(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MacSliceRrmPolicy *rrmPolicy)
4469 memset(rrmPolicy, 0, sizeof(MacSliceRrmPolicy));
4470 cur = cur -> xmlChildrenNode;
4473 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RESOURCE_TYPE")) && (cur->ns == ns))
4475 rrmPolicy->resourceType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4478 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRM_POLICY_MEMBER")) && (cur->ns == ns))
4480 rrmPolicy->numOfRrmPolicyMem = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4483 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_MEMBER_LIST")) && (cur->ns == ns))
4485 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList,\
4486 rrmPolicy->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
4488 if(!rrmPolicy->rRMPolicyMemberList)
4490 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
4494 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
4496 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList[memIdx], sizeof(RrmPolicyMemberList));
4497 if (rrmPolicy->rRMPolicyMemberList[memIdx] == NULLP)
4499 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4503 if(parseRrmPolicyList(doc, ns, cur, rrmPolicy->rRMPolicyMemberList[memIdx]) != ROK)
4510 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_RATIO")) && (cur->ns == ns))
4512 if(parseRrmPolicyRatio(doc, ns, cur, &rrmPolicy->policyRatio) != ROK)
4523 /*******************************************************************
4525 * @brief Fill MAC Slice Configuration
4529 * Function : parseMacSliceCfgReq
4531 * Functionality: Fill MAC Slice Configuration
4533 * @params[in] XML document pointer
4535 * Current node in XML
4536 * Pointer to structure to be filled
4537 * @return ROK - success
4540 * ****************************************************************/
4541 uint8_t parseMacSliceCfgReq(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacSliceCfgReq *macSliceCfgReq)
4543 uint8_t policyIdx = 0;
4544 memset(macSliceCfgReq, 0, sizeof(MacSliceCfgReq));
4545 cur = cur -> xmlChildrenNode;
4548 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRM_POLICY")) && (cur->ns == ns))
4550 macSliceCfgReq->numOfRrmPolicy = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4553 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_SLICE_RRM_POLICY")) && (cur->ns == ns))
4555 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy, macSliceCfgReq->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
4556 if(!macSliceCfgReq->listOfRrmPolicy)
4558 DU_LOG("\nERROR --> DU APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4562 for(policyIdx = 0; policyIdx < macSliceCfgReq->numOfRrmPolicy; policyIdx++)
4564 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
4565 if (macSliceCfgReq->listOfRrmPolicy[policyIdx] == NULLP)
4567 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4570 if(parseMacSliceRrmPolicy(doc, ns, cur, macSliceCfgReq->listOfRrmPolicy[policyIdx]) != ROK)
4582 #ifdef THREAD_AFFINITY
4583 /*******************************************************************
4585 * @brief Set thread affinity to the core configured via XML file
4589 * Function : parseThreadAffinity
4591 * Functionality: Set thread affinity to the core configured
4594 * @params[in] XML document pointer
4596 * Current node in XML
4597 * Thread information
4598 * @return ROK - success
4601 * ****************************************************************/
4602 uint8_t parseThreadAffinity(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ThreadInfo *threads)
4604 cur = cur -> xmlChildrenNode;
4607 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_APP_CORE")) && (cur->ns == ns))
4609 threads->duAppCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4610 ODU_SET_THREAD_AFFINITY(&threads->duAppSTskId, SS_AFFINITY_MODE_EXCL, threads->duAppCoreId, 0);
4613 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP_CORE")) && (cur->ns == ns))
4615 threads->egtpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4616 ODU_SET_THREAD_AFFINITY(&threads->egtpSTskId, SS_AFFINITY_MODE_EXCL, threads->egtpCoreId, 0);
4619 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_MAC_CORE")) && (cur->ns == ns))
4621 threads->rlcMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4622 ODU_SET_THREAD_AFFINITY(&threads->rlcMacSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcMacCoreId, 0);
4625 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_UL_CORE")) && (cur->ns == ns))
4627 threads->rlcUlCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4628 ODU_SET_THREAD_AFFINITY(&threads->rlcUlSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcUlCoreId, 0);
4631 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_CORE")) && (cur->ns == ns))
4633 threads->schCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4634 ODU_SET_THREAD_AFFINITY(&threads->schSTskId, SS_AFFINITY_MODE_EXCL, threads->schCoreId, 0);
4637 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP_CORE")) && (cur->ns == ns))
4639 threads->sctpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4640 ODU_SET_THREAD_AFFINITY(&threads->sctpSTskId, SS_AFFINITY_MODE_EXCL, threads->sctpCoreId, 0);
4643 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOWER_MAC_CORE")) && (cur->ns == ns))
4645 threads->lwrMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4646 ODU_SET_THREAD_AFFINITY(&threads->lwrMacSTskId, SS_AFFINITY_MODE_EXCL, threads->lwrMacCoreId, 0);
4655 /*******************************************************************
4657 * @brief Fill tmrTqCp
4661 * Function : parseTmrTqCp
4663 * Functionality: Fill tmrTqCp
4665 * @params[in] XML document pointer
4667 * Current node in XML
4668 * Pointer to structure to be filled
4669 * @return ROK - success
4672 * ****************************************************************/
4673 uint8_t parseTmrTqCp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmTqCp *tmrTqCp)
4675 memset(tmrTqCp, 0, sizeof(CmTqCp));
4676 cur = cur ->xmlChildrenNode;
4679 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_LEN")) && (cur->ns == ns))
4681 tmrTqCp->tmrLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4688 /*******************************************************************
4690 * @brief Fill DU timer Parameters
4694 * Function : parseDuTimerParams
4696 * Functionality: Fill DU timer Parmeters
4698 * @params[in] XML document pointer
4700 * Current node in XML
4701 * Pointer to structure to be filled
4702 * @return ROK - success
4705 * ****************************************************************/
4706 uint8_t parseDuTimerParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, DuTimers *duTimers)
4708 memset(duTimers, 0, sizeof(DuTimers));
4710 cur = cur->xmlChildrenNode;
4713 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_TQ_CP")) && (cur->ns == ns))
4715 if(parseTmrTqCp(doc, ns, cur, &duTimers->tmrTqCp) != ROK)
4721 /* Initialzie the timer queue */
4722 memset(&(duTimers->tmrTq), 0, sizeof(CmTqType) * duTimers->tmrTqCp.tmrLen);
4726 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_RESOLUTION")) && (cur->ns == ns))
4728 duTimers->tmrRes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4735 /*******************************************************************
4737 * @brief Fill TNL assoc
4741 * Function : parseTnlAssoc
4743 * Functionality: Fill TNL assoc
4745 * @params[in] XML document pointer
4747 * Current node in XML
4748 * Pointer to structure to be filled
4749 * @return ROK - success
4752 * ****************************************************************/
4753 uint8_t parseTnlAssoc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TNLAssociation *tnlAssoc)
4760 memset(tnlAssoc, 0, sizeof(TNLAssociation));
4761 cur = cur ->xmlChildrenNode;
4764 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_IP")) && (cur->ns == ns))
4766 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4767 cmInetAddr(duIpV4Addr, &(duIp));
4768 tnlAssoc->localIpAddress.ipV4Pres = true;
4769 tnlAssoc->localIpAddress.ipV4Addr = duIp;
4772 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_PORT")) && (cur->ns == ns))
4774 tnlAssoc->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4777 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_IP")) && (cur->ns == ns))
4779 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4780 cmInetAddr(ricIpV4Addr, &(ricIp));
4781 tnlAssoc->destIpAddress.ipV4Pres = true;
4782 tnlAssoc->destIpAddress.ipV4Addr = ricIp;
4785 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_PORT")) && (cur->ns == ns))
4787 tnlAssoc->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4790 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ASSOC_USAGE")) && (cur->ns == ns))
4792 tnlAssoc->usage = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4799 /*******************************************************************
4801 * @brief Fill ric style parmeters
4805 * Function : parseRicStyle
4807 * Functionality: Fill ric style parmeters
4809 * @params[in] XML document pointer
4811 * Current node in XML
4812 * Pointer to structure to be filled
4813 * @return ROK - success
4816 * ****************************************************************/
4817 uint8_t parseRicStyle(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RicStyle *ricStyle)
4820 memset(ricStyle, 0, sizeof(RicStyle));
4822 cur = cur->xmlChildrenNode;
4825 if ((!xmlStrcmp(cur->name, (const xmlChar *)"STYLE_TYPE")) && (cur->ns == ns))
4827 ricStyle->styleType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4830 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAME")) && (cur->ns == ns))
4832 tempName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4833 strcpy((char*)ricStyle->name, tempName);
4836 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FORMAT_TYPE")) && (cur->ns == ns))
4838 ricStyle->formatType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4845 /*******************************************************************
4847 * @brief Fill measurement info parameters
4851 * Function : parseMeasurementInfo
4853 * Functionality: Fill measurement info parmeters
4855 * @params[in] XML document pointer
4857 * Current node in XML
4858 * Pointer to structure to be filled
4859 * @return ROK - success
4862 * ****************************************************************/
4863 uint8_t parseMeasurementInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmLListCp *measurementInfoList)
4867 MeasurementInfoForAction *measurementInfoForAction;
4869 DU_ALLOC(measurementInfoForAction, sizeof(MeasurementInfoForAction));
4870 if(!measurementInfoForAction)
4875 cur = cur->xmlChildrenNode;
4878 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ID")) && (cur->ns == ns))
4880 measurementInfoForAction->measurementTypeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4883 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAME")) && (cur->ns == ns))
4885 tempName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4886 strcpy((char*)measurementInfoForAction->measurementTypeName, tempName);
4892 DU_ALLOC(node, sizeof(CmLList));
4895 node->node = (PTR) measurementInfoForAction;
4896 cmLListAdd2Tail(measurementInfoList, node);
4900 DU_FREE(measurementInfoForAction, sizeof(MeasurementInfoForAction));
4907 /*******************************************************************
4909 * @brief Fill report style parameters
4913 * Function : parseReportStyle
4915 * Functionality: Fill report style parmeters
4917 * @params[in] XML document pointer
4919 * Current node in XML
4920 * Pointer to structure to be filled
4921 * @return ROK - success
4924 * ****************************************************************/
4925 uint8_t parseReportStyle(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RicReportStyle *ricReportStyle)
4927 xmlNodePtr child = NULLP;
4928 memset(ricReportStyle, 0, sizeof(RicReportStyle));
4930 cur = cur->xmlChildrenNode;
4933 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_STYLE")) && (cur->ns == ns))
4935 if(parseRicStyle(doc, ns, cur, &ricReportStyle->reportStyle) != ROK)
4941 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MEASUREMENT_INFO_LIST")) && (cur->ns == ns))
4943 child = cur->xmlChildrenNode;
4944 while(child != NULL)
4946 if ((!xmlStrcmp(child->name, (const xmlChar *)"MEASUREMENT_INFO")) && (child->ns == ns))
4948 if(parseMeasurementInfo(doc, ns, child, &ricReportStyle->measurementInfoList) != ROK)
4953 child = child -> next;
4962 /*******************************************************************
4964 * @brief Fill RAN function name parameters
4968 * Function : parseRanFuncName
4970 * Functionality: Fill RAN function name parmeters
4972 * @params[in] XML document pointer
4974 * Current node in XML
4975 * Pointer to structure to be filled
4976 * @return ROK - success
4979 * ****************************************************************/
4980 uint8_t parseRanFuncName(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RanFunctionName *ranFunctionName)
4982 char *tempShortName;
4983 char *tempServiceModelOid;
4984 char *tempDiscription;
4986 memset(ranFunctionName, 0, sizeof(RanFunctionName));
4988 cur = cur->xmlChildrenNode;
4991 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SHORT_NAME")) && (cur->ns == ns))
4993 tempShortName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4994 strcpy((char*)ranFunctionName->shortName, tempShortName);
4997 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEVICE_MODEL_OID")) && (cur->ns == ns))
4999 tempServiceModelOid =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5000 strcpy((char*)ranFunctionName->serviceModelOID, tempServiceModelOid);
5003 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESCRIPTION")) && (cur->ns == ns))
5005 tempDiscription =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5006 strcpy((char*)ranFunctionName->description, tempDiscription);
5013 /*******************************************************************
5015 * @brief Fill RAN function parameters
5019 * Function : parseRanFunctionParams
5021 * Functionality: Fill RAN function parmeters
5023 * @params[in] XML document pointer
5025 * Current node in XML
5026 * Pointer to structure to be filled
5027 * @return ROK - success
5030 * ****************************************************************/
5031 uint8_t parseRanFunctionParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RanFunction *ranFunction)
5033 xmlNodePtr child = NULLP;
5034 uint8_t eventTriggerStyleIdx=0, reportStyleIdx=0;
5036 memset(ranFunction, 0, sizeof(RanFunction));
5038 cur = cur->xmlChildrenNode;
5042 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ID")) && (cur->ns == ns))
5044 ranFunction->id = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5047 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RAN_FUNCTION_NAME")) && (cur->ns == ns))
5049 if(parseRanFuncName(doc, ns, cur, &ranFunction->name) != ROK)
5055 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REVISION_COUNTER")) && (cur->ns == ns))
5057 ranFunction->revisionCounter = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5060 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_EVENT_TRIGGER_STYLE_SUPPORTED")) && (cur->ns == ns))
5062 ranFunction->numOfEventTriggerStyleSupported = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5066 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EVENT_TRIGGERED_STYLE_LIST")) && (cur->ns == ns))
5068 child = cur->xmlChildrenNode;
5069 while(child != NULL)
5071 if ((!xmlStrcmp(child->name, (const xmlChar *)"EVENT_TRIGGERED_STYLE")) && (child->ns == ns))
5073 if(parseRicStyle(doc, ns, child,&ranFunction->eventTriggerStyleList[eventTriggerStyleIdx]) != ROK)
5077 eventTriggerStyleIdx++;
5080 child = child -> next;
5086 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_REPORT_STYLE_SUPPORTED")) && (cur->ns == ns))
5088 ranFunction->numOfReportStyleSupported = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5091 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REPORT_STYLE_SUPPORTED_LIST")) && (cur->ns == ns))
5093 child = cur->xmlChildrenNode;
5094 while(child != NULL)
5096 if ((!xmlStrcmp(child->name, (const xmlChar *)"REPORT_STYLE")) && (child->ns == ns))
5098 if(parseReportStyle(doc, ns, child,&ranFunction->reportStyleList[reportStyleIdx]) != ROK)
5105 child = child -> next;
5110 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_INDICATION_HEADER_FORMAT")) && (cur->ns == ns))
5112 ranFunction->ricIndicationHeaderFormat = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5115 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_INDICATION_MESSAGE_FORMAT")) && (cur->ns == ns))
5117 ranFunction->ricIndicationMessageFormat = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5124 /*******************************************************************
5126 * @brief Fill E2 config Parameters
5130 * Function : parseE2ConfigParams
5132 * Functionality: Fill E2 config Parmeters
5134 * @params[in] XML document pointer
5136 * Current node in XML
5137 * Pointer to structure to be filled
5138 * @return ROK - success
5141 * ****************************************************************/
5142 uint8_t parseE2ConfigParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, E2apDb *e2apDb)
5144 uint8_t tnlIdx=0,ranFuncIdx=0;
5145 xmlNodePtr child = NULLP;
5147 memset(e2apDb, 0, sizeof(E2apDb));
5148 cur = cur->xmlChildrenNode;
5151 if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_NODE_ID")) && (cur->ns == ns))
5153 e2apDb->e2NodeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5156 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_TNL_ASSOC")) && (cur->ns == ns))
5158 e2apDb->numOfTNLAssoc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5161 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TNL_ASSOC_LIST")) && (cur->ns == ns))
5163 child = cur->xmlChildrenNode;
5164 while(child != NULL)
5166 if ((!xmlStrcmp(child->name, (const xmlChar *)"TNL_ASSOC")) && (child->ns == ns))
5168 if(parseTnlAssoc(doc, ns, child,&e2apDb->tnlAssoc[tnlIdx]) != ROK)
5175 child = child -> next;
5179 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_RAN_FUNCTION")) && (cur->ns == ns))
5181 e2apDb->numOfRanFunction = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5184 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RAN_FUNCTION_LIST")) && (cur->ns == ns))
5186 child = cur->xmlChildrenNode;
5187 while(child != NULL)
5189 if ((!xmlStrcmp(child->name, (const xmlChar *)"RAN_FUNCTION")) && (child->ns == ns))
5191 if(parseRanFunctionParams(doc, ns, child,&e2apDb->ranFunction[ranFuncIdx]) != ROK)
5195 cmLListInit(&e2apDb->ranFunction[ranFuncIdx].subscriptionList);
5199 child = child -> next;
5208 /*******************************************************************
5210 * @brief Fill DU Config Parmeters
5214 * Function : parseDuCfgParams
5218 * @params[in] XML document pointer
5220 * Current node in XML
5221 * @return ROK - success
5224 * ****************************************************************/
5225 uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
5227 char *tempDuName = "";
5235 cur = cur->xmlChildrenNode;
5238 if ((!xmlStrcmp(cur->name, (const xmlChar *)"THREAD_AFFINITY")) && (cur->ns == ns))
5240 #ifdef THREAD_AFFINITY
5241 if(parseThreadAffinity(doc, ns, cur, &duCfgParam.threadInfo) != ROK)
5248 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GNB_ID")) && (cur->ns == ns))
5250 duCb.gnbId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5253 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_ID")) && (cur->ns == ns))
5255 duCfgParam.duId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5258 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_NAME")) && (cur->ns == ns))
5260 tempDuName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5261 DU_ALLOC(duCfgParam.duName, strlen(tempDuName));
5262 if(!duCfgParam.duName)
5264 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
5267 strcpy((char*)duCfgParam.duName, tempDuName);
5270 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_DRB")) && (cur->ns == ns))
5272 duCfgParam.maxNumDrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5275 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE_SUPPORTED")) && (cur->ns == ns))
5277 duCfgParam.maxSupportedUes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5280 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE")) && (cur->ns == ns))
5282 duCfgParam.maxUe = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5286 if( getStartupConfig(&g_cfg) != ROK )
5290 cmInetAddr((S8*)g_cfg.DU_IPV4_Addr, &duIp);
5291 cmInetAddr((S8*)g_cfg.CU_IPV4_Addr, &cuIp);
5292 cmInetAddr((S8*)g_cfg.RIC_IPV4_Addr, &ricIp);
5295 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_IP_V4_ADDR")) && (cur->ns == ns))
5297 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5298 cmInetAddr(duIpV4Addr, &(duIp));
5301 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CU_IP_V4_ADDR")) && (cur->ns == ns))
5303 cuIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5304 cmInetAddr(cuIpV4Addr, &(cuIp));
5307 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_IP_V4_ADDR")) && (cur->ns == ns))
5309 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5310 cmInetAddr(ricIpV4Addr, &(ricIp));
5314 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP")) && (cur->ns == ns))
5316 if(parseSctpParams(doc, ns, cur, &duCfgParam.sctpParams) != ROK)
5320 duCfgParam.sctpParams.duIpAddr.ipV4Pres = true;
5321 duCfgParam.sctpParams.duIpAddr.ipV4Addr = duIp;
5322 duCfgParam.sctpParams.cuIpAddr.ipV4Pres = true;
5323 duCfgParam.sctpParams.cuIpAddr.ipV4Addr = cuIp;
5324 duCfgParam.sctpParams.ricIpAddr.ipV4Pres = true;
5325 duCfgParam.sctpParams.ricIpAddr.ipV4Addr = ricIp;
5328 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP")) && (cur->ns == ns))
5330 if(parseEgtpParams(doc, ns, cur, &duCfgParam.egtpParams) != ROK)
5334 duCfgParam.egtpParams.localIp.ipV4Addr = duIp;
5335 duCfgParam.egtpParams.localIp.ipV4Pres = true;
5336 duCfgParam.egtpParams.destIp.ipV4Pres = true;
5337 duCfgParam.egtpParams.destIp.ipV4Addr = cuIp;
5338 duCfgParam.egtpParams.maxTunnelId = duCfgParam.maxNumDrb * duCfgParam.maxSupportedUes;
5341 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIB_PARAMS")) && (cur->ns == ns))
5343 if(parseMibParams(doc, ns, cur, &duCfgParam.mibParams) != ROK)
5349 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_PARAMS")) && (cur->ns == ns))
5351 if(parseSib1Params(doc, ns, cur, &duCfgParam.sib1Params) != ROK)
5357 #ifdef XML_BASED_CONFIG
5358 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_SRVD_CELL_INFO")) && (cur->ns == ns))
5360 if(parseF1DuServedCellInfo(doc, ns, cur, &duCfgParam.srvdCellLst[0]) != ROK)
5367 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_CFG")) && (cur->ns == ns))
5369 if(parseMacCellCfg(doc, ns, cur, &duCfgParam.macCellCfg) != ROK)
5376 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SLICE_CFG")) && (cur->ns == ns))
5378 if(parseMacSliceCfgReq(doc, ns, cur, &duCfgParam.tempSliceCfg) != ROK)
5385 if((!xmlStrcmp(cur->name, (const xmlChar *)"DU_TIMER_INFO")) && (cur->ns == ns))
5387 if(parseDuTimerParams(doc, ns, cur, &duCb.duTimersInfo) != ROK)
5393 if((!xmlStrcmp(cur->name, (const xmlChar *)"E2AP_CFG")) && (cur->ns == ns))
5395 if(parseE2ConfigParams(doc, ns, cur, &duCb.e2apDb) != ROK)
5401 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2SetupTimer), 1);
5402 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.ricServiceUpdateTimer.timer), 1);
5403 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2NodeConfigUpdate.timer), 1);
5411 /*******************************************************************
5413 * @brief Reads config and posts message to du_app on completion
5417 * Function : duReadCfg
5420 * - Reads configuration from xml file and stores in DB
5421 * - Post to du_app for further processing
5424 * @return ROK - success
5427 * ****************************************************************/
5430 const char *filename = "../build/config/odu_config.xml";
5431 xmlDocPtr doc = NULLP;
5432 xmlNodePtr cur = NULLP;
5433 xmlNsPtr ns = NULLP;
5435 doc = xmlParseFile(filename);
5438 DU_LOG("\nERROR --> DU_APP: Failed to parse the XML file");
5442 cur = xmlDocGetRootElement(doc);
5443 ns = xmlSearchNsByHref(doc, cur, (const xmlChar *)"urn:o-ran:odu:configuration");
5446 DU_LOG("\nERROR --> DU_APP: XML Namespace not found.\n");
5452 parseDuCfgParams(doc, ns, cur);
5460 /* Read configs into duCfgParams */
5461 if(readCfg() != ROK)
5463 DU_LOG("\nERROR --> DU_APP : Reading configuration failed");
5468 /* Fill pst structure */
5469 memset(&(pst), 0, sizeof(Pst));
5470 pst.srcEnt = (Ent)ENTDUAPP;
5471 pst.srcInst = (Inst)DU_INST;
5472 pst.srcProcId = DU_PROC;
5473 pst.dstEnt = pst.srcEnt;
5474 pst.dstInst = pst.srcInst;
5475 pst.dstProcId = pst.srcProcId;
5477 pst.selector = ODU_SELECTOR_TC;
5481 /* Timer Registration request to system services */
5482 if (ODU_REG_TMR_MT(pst.srcEnt, pst.srcInst, duCb.duTimersInfo.tmrRes, duActvTmr) != ROK)
5484 DU_LOG("\nERROR --> DU_APP : Failed to register timer");
5488 if(ODU_GET_MSG_BUF(DFLT_REGION, DU_POOL, &mBuf) != ROK)
5490 DU_LOG("\nERROR --> DU_APP : Memory allocation failed in duReadCfg");
5494 if (ODU_POST_TASK(&pst, mBuf) != ROK)
5496 DU_LOG("\nERROR --> DU_APP : ODU_POST_TASK failed in duReadCfg");
5503 /*******************************************************************
5505 * @brief Prints all DU Configuration
5509 * Function : printDuConfig
5512 * - Prints all DU configurations
5517 * ****************************************************************/
5518 void printDuConfig()
5521 uint16_t ranFuncIdx;
5522 uint8_t reportStyleIdx =0, eventStyleIdx=0, tnlIdx=0;
5523 uint8_t sliceIdx = 0, pfIdx = 0, rsrcIdx = 0, ssbMaskIdx = 0, fdmIdx = 0;
5524 uint8_t monitoringSymbIdx = 0, poIdx = 0, policyIdx = 0, memIdx = 0;
5525 __attribute__((unused)) SctpParams *sctp;
5526 __attribute__((unused)) F1EgtpParams *egtp;
5527 __attribute__((unused)) MibParams *mib;
5528 __attribute__((unused)) F1RrcVersion *f1RrcVersion;
5529 F1DuCellInfo *f1DuCellInfo;
5530 F1CellInfo *f1CellInfo;
5531 __attribute__((unused)) F1DuSysInfo *duSysInfo;
5532 __attribute__((unused)) F1BrdcstPlmnInfo *brdcstPlmnInfo;
5533 NrModeInfo *nrModeInfo;
5534 __attribute__((unused)) F1NrFddInfo *f1NrFddInfo;
5535 F1SrvdPlmn *srvdPlmn;
5536 SupportedSliceList *sliceSuppLst;
5537 MacCellCfg *macCellCfg;
5538 __attribute__((unused)) CarrierCfg *carrierCfg;
5540 PlmnInfoList *plmnInfoList;
5541 Sib1CellCfg *sib1Cfg;
5542 SchPageCfg *pageCfg;
5543 __attribute__((unused)) PdcchConfigSib1 *pdcchConfigSib1;
5544 BwpDlConfig *bwpDlCfg;
5545 __attribute__((unused)) BwpParams *bwp;
5546 PdcchConfigCommon *pdcchCfgCmn;
5547 SearchSpaceCfg *searchSpaceCfg;
5548 __attribute__((unused)) CandidatesInfo *candidateInfo;
5549 PdschConfigCommon *pdschCfgCmn;
5550 __attribute__((unused)) PdschCfgCommTimeDomRsrcAlloc *pdschCmnTimeDomRsrcAlloc;
5551 BwpUlConfig *bwpUlCfg;
5552 __attribute__((unused)) PucchConfigCommon *pucchCfgCmn;
5553 PuschConfigCommon *puschCfgCmn;
5554 __attribute__((unused)) PuschTimeDomRsrcAlloc *puschTimeDomRsrcAlloc;
5555 __attribute__((unused)) SsbCfg *ssbCfg;
5556 __attribute__((unused)) CsiRsCfg *csiRsCfg;
5558 __attribute__((unused)) PrachFdmInfo *prachFdmInfo;
5559 __attribute__((unused)) PrecodingConf *precodCfg;
5560 __attribute__((unused)) BeamformingConf *beamFormingCfg;
5561 Sib1Params *sib1Params;
5562 __attribute__((unused)) SiSchedInfo *siSchedInfo;
5563 SrvCellCfgCommSib *srvCellCfgCmnSib;
5564 DlCfgCommon *dlCfgCmn;
5565 PdcchCfgCommon *pdcchCfgCommon;
5566 PdschCfgCommon *pdschCfgCommon;
5567 __attribute__((unused)) PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc;
5568 __attribute__((unused)) BcchCfg *bcchCfg;
5569 __attribute__((unused)) PcchCfg *pcchCfg;
5570 UlCfgCommon *ulCfgCmn;
5571 RachCfgCommon *rachCfgCmn;
5572 PuschCfgCommon *puschCfgCommon;
5573 __attribute__((unused)) PuschCfgCmnTimeDomAlloc *puschCmnTimeDomRsrsAlloc;
5574 PucchCfgCommon *pucchCfgCommon;
5575 __attribute__((unused)) TddUlDlCfgCommon *tddUlDlCfgCmn;
5576 MacSliceCfgReq *macSliceCfg;
5577 MacSliceRrmPolicy *rrmPolicy;
5578 __attribute__((unused)) RrmPolicyRatio *rrmPolicyRatio;
5579 __attribute__((unused)) RrmPolicyMemberList *rrmPolicyMemberList;
5582 RanFunction *ranFunc;
5583 CmLListCp *measurementInfoList;
5584 MeasurementInfoForAction *measurementInfoForAction;
5586 F1NrTddInfo *f1NrTddInfo;
5590 DU_LOG("\n ** DU CONFIGURATION ** \n");
5591 DU_LOG("DU ID %d\n", duCfgParam.duId);
5592 DU_LOG("DU Name %s\n", duCfgParam.duName);
5594 DU_LOG("\n ** Thread Affinity ** \n");
5595 DU_LOG("DU APP CORE ID %d\n", duCfgParam.threadInfo.duAppCoreId);
5596 DU_LOG("EGTP CORE ID %d\n", duCfgParam.threadInfo.egtpCoreId);
5597 DU_LOG("SCTP CORE ID %d\n", duCfgParam.threadInfo.sctpCoreId);
5598 DU_LOG("RLC-UL CORE ID %d\n", duCfgParam.threadInfo.rlcUlCoreId);
5599 DU_LOG("RLC-DL and MAC CORE ID %d\n", duCfgParam.threadInfo.rlcMacCoreId);
5600 DU_LOG("SCH CORE ID %d\n", duCfgParam.threadInfo.schCoreId);
5601 DU_LOG("Lower MAC CORE ID %d\n", duCfgParam.threadInfo.lwrMacCoreId);
5603 DU_LOG("MAX NUM DRB %d\n", duCfgParam.maxNumDrb);
5604 DU_LOG("MAX SUPPORTED UE %d\n", duCfgParam.maxSupportedUes);
5605 DU_LOG("MAX UE %d\n",duCfgParam.maxUe);
5607 sctp = &duCfgParam.sctpParams;
5608 DU_LOG("\n ** SCTP PARAMETER ** \n");
5609 DU_LOG("DU IPv4 Address present %u\n", sctp->duIpAddr.ipV4Pres);
5610 DU_LOG("DU IP Address %u\n", sctp->duIpAddr.ipV4Addr);
5611 DU_LOG("CU IPv4 Address present %u\n", sctp->cuIpAddr.ipV4Pres);
5612 DU_LOG("CU IP Address %u\n", sctp->cuIpAddr.ipV4Addr);
5613 DU_LOG("RIC IPv4 Address present %u\n", sctp->ricIpAddr.ipV4Pres);
5614 DU_LOG("RIC IP Address %u\n", sctp->ricIpAddr.ipV4Addr);
5615 DU_LOG("SCTP Port at DU for F1 Interface %d\n", sctp->duPort[F1_INTERFACE]);
5616 DU_LOG("SCTP Port at CU for F1 Interface %d\n", sctp->cuPort);
5617 DU_LOG("SCTP Port at DU for E2 Interface %d\n", sctp->duPort[E2_INTERFACE]);
5618 DU_LOG("SCTP Port at RIC for E2 Interface %d\n", sctp->ricPort);
5620 egtp = &duCfgParam.egtpParams;
5621 DU_LOG("\n ** EGTP PARAMETER ** \n");
5622 DU_LOG("DU IP Address %d\n", egtp->localIp.ipV4Addr);
5623 DU_LOG("CU IP Address %d\n", egtp->destIp.ipV4Addr);
5624 DU_LOG("EGTP Port at DU %d\n", egtp->localPort);
5625 DU_LOG("EGTP Port at CU %d\n", egtp->destPort);
5626 DU_LOG("Minimum Tunnel ID %d\n", egtp->minTunnelId);
5627 DU_LOG("Maximum Tunnel ID %d\n",egtp->maxTunnelId);
5629 mib = &duCfgParam.mibParams;
5630 DU_LOG("\n ** MIB PARAMETER ** \n");
5631 DU_LOG("System Frame Number %d\n", mib->sysFrmNum);
5632 DU_LOG("Subcarrier Spacing Common %ld\n", mib->subCarrierSpacingCommon);
5633 DU_LOG("SSB Subcarrier Offset %ld\n", mib->ssb_SubcarrierOffset);
5634 DU_LOG("DMRS Type-A Position %ld\n", mib->dmrs_TypeA_Position);
5635 DU_LOG("Control Resource Set Zero %ld\n", mib->controlResourceSetZero);
5636 DU_LOG("Search Space Zero %ld\n", mib->searchSpaceZero);
5637 DU_LOG("Cell Barred %ld\n", mib->cellBarred);
5638 DU_LOG("Intra Frequency Reselection %ld\n", mib->intraFreqReselection);
5640 duSysInfo = &duCfgParam.srvdCellLst[0].duSysInfo;
5641 DU_LOG("\n ** DU System Information ** \n");
5642 DU_LOG("MIB length %d\n", duSysInfo->mibLen);
5643 DU_LOG("MIB message %s\n", duSysInfo->mibMsg);
5644 DU_LOG("SIB1 length %d\n", duSysInfo->sib1Len);
5645 DU_LOG("SIB1 message %s\n", duSysInfo->sib1Msg);
5647 f1DuCellInfo = &duCfgParam.srvdCellLst[0].duCellInfo;
5648 DU_LOG("\n ** DU Cell Information ** \n");
5650 f1CellInfo = &f1DuCellInfo->cellInfo;
5651 DU_LOG("NR PCI %d\n", f1CellInfo->nrPci);
5652 DU_LOG("DU TAC %d\n", f1DuCellInfo->tac);
5653 DU_LOG("EPS TAC %d\n", f1DuCellInfo->epsTac);
5654 DU_LOG("Measurement Time Configuration Duration %d\n", f1DuCellInfo->measTimeCfgDuration);
5655 DU_LOG("Cell Direction %d\n", f1DuCellInfo->cellDir);
5656 DU_LOG("Cell Type %d\n", f1DuCellInfo->cellType);
5658 DU_LOG("\n ** Cell Info : NR CGI ** \n");
5659 DU_LOG("Cell Id %d\n",f1CellInfo->nrCgi.cellId);
5660 DU_LOG("PLMN : mcc[0] %d\n", f1CellInfo->nrCgi.plmn.mcc[0]);
5661 DU_LOG("PLMN : mcc[1] %d\n", f1CellInfo->nrCgi.plmn.mcc[1]);
5662 DU_LOG("PLMN : mcc[2] %d\n", f1CellInfo->nrCgi.plmn.mcc[2]);
5663 DU_LOG("PLMN : mnc[0] %d\n", f1CellInfo->nrCgi.plmn.mnc[0]);
5664 DU_LOG("PLMN : mnc[1] %d\n", f1CellInfo->nrCgi.plmn.mnc[1]);
5665 DU_LOG("PLMN : mnc[2] %d\n", f1CellInfo->nrCgi.plmn.mnc[2]);
5667 srvdPlmn = &f1CellInfo->srvdPlmn[0];
5668 DU_LOG("\n ** Cell Info : Served PLMN ** \n");
5669 DU_LOG("PLMN : mcc[0] %d\n", srvdPlmn->plmn.mcc[0]);
5670 DU_LOG("PLMN : mcc[1] %d\n", srvdPlmn->plmn.mcc[1]);
5671 DU_LOG("PLMN : mcc[2] %d\n", srvdPlmn->plmn.mcc[2]);
5672 DU_LOG("PLMN : mnc[0] %d\n", srvdPlmn->plmn.mnc[0]);
5673 DU_LOG("PLMN : mnc[1] %d\n", srvdPlmn->plmn.mnc[1]);
5674 DU_LOG("PLMN : mnc[2] %d\n", srvdPlmn->plmn.mnc[2]);
5675 DU_LOG("EXT_PLMN : mcc[0] %d\n", srvdPlmn->extPlmn.mcc[0]);
5676 DU_LOG("EXT_PLMN : mcc[1] %d\n", srvdPlmn->extPlmn.mcc[1]);
5677 DU_LOG("EXT_PLMN : mcc[2] %d\n", srvdPlmn->extPlmn.mcc[2]);
5678 DU_LOG("EXT_PLMN : mnc[0] %d\n", srvdPlmn->extPlmn.mnc[0]);
5679 DU_LOG("EXT_PLMN : mnc[1] %d\n", srvdPlmn->extPlmn.mnc[1]);
5680 DU_LOG("EXT_PLMN : mnc[2] %d\n", srvdPlmn->extPlmn.mnc[2]);
5682 sliceSuppLst = &srvdPlmn->taiSliceSuppLst;
5683 DU_LOG("\n ** Cell Info : Served PLMN : Supported Slice List ** \n");
5684 DU_LOG("Number of Slices supported %d\n", sliceSuppLst->numSupportedSlices);
5685 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
5688 DU_LOG("\tSST %d\n", (*sliceSuppLst->snssai[sliceIdx]).sst);
5689 DU_LOG("\tSD %d %d %d\n", (*sliceSuppLst->snssai[sliceIdx]).sd[0], (*sliceSuppLst->snssai[sliceIdx]).sd[1], \
5690 (*sliceSuppLst->snssai[sliceIdx]).sd[2]);
5693 brdcstPlmnInfo = &f1DuCellInfo->brdcstPlmnInfo[0];
5694 DU_LOG("\n ** DU Cell Information : Broadcast PLMN Info ** \n");
5695 DU_LOG("TAC %d\n", brdcstPlmnInfo->tac);
5696 DU_LOG("NR Cell Id %d\n", brdcstPlmnInfo->nrCellId);
5697 DU_LOG("RANAC %d\n", brdcstPlmnInfo->ranac);
5699 DU_LOG("PLMN : mcc[0] %d\n", brdcstPlmnInfo->plmn[0].mcc[0]);
5700 DU_LOG("PLMN : mcc[1] %d\n", brdcstPlmnInfo->plmn[0].mcc[1]);
5701 DU_LOG("PLMN : mcc[2] %d\n", brdcstPlmnInfo->plmn[0].mcc[2]);
5702 DU_LOG("PLMN : mnc[0] %d\n", brdcstPlmnInfo->plmn[0].mnc[0]);
5703 DU_LOG("PLMN : mnc[1] %d\n", brdcstPlmnInfo->plmn[0].mnc[1]);
5704 DU_LOG("PLMN : mnc[2] %d\n", brdcstPlmnInfo->plmn[0].mnc[2]);
5706 DU_LOG("EXT_PLMN : mcc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[0]);
5707 DU_LOG("EXT_PLMN : mcc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[1]);
5708 DU_LOG("EXT_PLMN : mcc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[2]);
5709 DU_LOG("EXT_PLMN : mnc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[0]);
5710 DU_LOG("EXT_PLMN : mnc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[1]);
5711 DU_LOG("EXT_PLMN : mnc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[2]);
5713 nrModeInfo = &f1DuCellInfo->f1Mode;
5714 f1NrFddInfo = &nrModeInfo->mode.fdd;
5715 DU_LOG("\n ** DU Cell Information : NR Mode Info ** \n");
5717 DU_LOG("\n ** NR Mode Info : FDD ** \n");
5718 DU_LOG("\n ** NR Mode Info : FDD : UL NR Frequency ** \n");
5719 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->ulNrFreqInfo.nrArfcn);
5720 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->ulNrFreqInfo.sulInfo.sulArfcn);
5721 DU_LOG("SUL : Transmission BW Subcarrier Spacing %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrScs);
5722 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrb);
5723 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].nrFreqBand);
5724 DU_LOG("SUL Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].sulBand[0]);
5726 DU_LOG("\n ** NR Mode Info : FDD : DL NR Frequency ** \n");
5727 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->dlNrFreqInfo.nrArfcn);
5728 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->dlNrFreqInfo.sulInfo.sulArfcn);
5729 DU_LOG("SUL : Transmission BW Subcarrier Sapcing %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrScs);
5730 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrb);
5731 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].nrFreqBand);
5732 DU_LOG("SUL Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].sulBand[0]);
5734 DU_LOG("\n ** NR Mode Info : FDD : UL Transmission Bandwidth ** \n");
5735 DU_LOG("Subscarrier spacing %d\n", f1NrFddInfo->ulTxBw.nrScs);
5736 DU_LOG("Number of RBs %d\n", f1NrFddInfo->ulTxBw.nrb);
5738 DU_LOG("\n ** NR Mode Info : FDD : DL Transmission Bandwidth ** \n");
5739 DU_LOG("Subcarrier Spacing %d\n", f1NrFddInfo->dlTxBw.nrScs);
5740 DU_LOG("Number of RBs %d\n", f1NrFddInfo->dlTxBw.nrb);
5744 f1NrTddInfo = &nrModeInfo ->mode.tdd;
5746 DU_LOG("\n ** NR Mode Info : TDD : NR Frequency ** \n");
5747 DU_LOG("NR ARFCN %d\n", f1NrTddInfo->nrFreqInfo.nrArfcn);
5748 DU_LOG("SUL : ARFCN %d\n",f1NrTddInfo->nrFreqInfo.sulInfo.sulArfcn);
5749 DU_LOG("SUL : Transmission BW Subscarrier Spacing %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrScs);
5750 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrb);
5751 DU_LOG("NR Frequency Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].nrFreqBand);
5752 DU_LOG("SUL Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].sulBand[0]);
5754 DU_LOG("\n ** NR Mode Info : TDD : NR Transmission Bandwidth ** \n");
5755 DU_LOG("Subcarrier Spacing %d\n", f1NrTddInfo->nrTxBw.nrScs);
5756 DU_LOG("Number of RBs %d\n", f1NrTddInfo->nrTxBw.nrb);
5759 macCellCfg = &duCfgParam.macCellCfg;
5760 DU_LOG("\n ** MAC CELL CONFIGURATION ** \n");
5761 DU_LOG("Cell Id %d\n", macCellCfg->cellId);
5763 DU_LOG("\n ** MAC Cell Configuration : Carrier Configuration ** \n");
5764 carrierCfg = &macCellCfg ->carrCfg;
5765 DU_LOG("DL Bandwidth %d\n", carrierCfg->dlBw);
5766 DU_LOG("DL ARFCN %d\n", carrierCfg->arfcnDL);
5767 DU_LOG("UL Bandwidth %d\n", carrierCfg->ulBw);
5768 DU_LOG("UL ARFCN %d\n", carrierCfg->arfcnUL);
5769 DU_LOG("Number of Transmission Antenna %d\n", carrierCfg->numTxAnt);
5770 DU_LOG("Number of Received Antenna %d\n", carrierCfg->numRxAnt);
5772 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration ** \n");
5773 cellCfg = &macCellCfg ->cellCfg;
5774 DU_LOG("Operational State %d\n", cellCfg->opState);
5775 DU_LOG("Administration State %d\n", cellCfg->adminState);
5776 DU_LOG("Cell Current State %d\n", cellCfg->cellState);
5777 DU_LOG("NR PCI %d\n", cellCfg->phyCellId);
5778 DU_LOG("TAC: %d\n", cellCfg->tac);
5779 DU_LOG("SSB Freqeuncy %d\n", cellCfg->ssbFreq);
5780 DU_LOG("Subcarrier Spacing: %d\n", cellCfg->subCarrSpacing);
5781 DU_LOG("Duplex Mode %d\n", cellCfg->dupType);
5783 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : PLMN Info List ** \n");
5784 plmnInfoList = &cellCfg ->plmnInfoList[0];
5785 DU_LOG("PLMN : mcc[0] %d\n", plmnInfoList->plmn.mcc[0]);
5786 DU_LOG("PLMN : mcc[1] %d\n", plmnInfoList->plmn.mcc[1]);
5787 DU_LOG("PLMN : mcc[2] %d\n", plmnInfoList->plmn.mcc[2]);
5788 DU_LOG("PLMN : mnc[0] %d\n", plmnInfoList->plmn.mnc[0]);
5789 DU_LOG("PLMN : mnc[1] %d\n", plmnInfoList->plmn.mnc[1]);
5790 DU_LOG("PLMN : mnc[2] %d\n", plmnInfoList->plmn.mnc[2]);
5792 DU_LOG("Number of Slice supported %d\n", plmnInfoList->suppSliceList.numSupportedSlices);
5793 for(sliceIdx = 0; sliceIdx < plmnInfoList->suppSliceList.numSupportedSlices; sliceIdx++)
5796 DU_LOG("\nSST %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sst);
5797 DU_LOG("\nSD %d %d %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[0], \
5798 (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[1],(*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[2]);
5801 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 ** \n");
5802 sib1Cfg = &cellCfg->sib1Cfg;
5803 DU_LOG("SIB1 PDU Length %d\n", sib1Cfg->sib1PduLen);
5804 DU_LOG("SIB1 PDU %s\n", sib1Cfg->sib1Pdu);
5806 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : Paging Configuration ** \n");
5807 pageCfg = &sib1Cfg->pagingCfg;
5809 DU_LOG("Number of Paging Occassion %d\n", pageCfg->numPO);
5810 if (pageCfg->poPresent == true)
5811 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : TRUE\n");
5813 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : FALSE\n");
5815 for(pfIdx = 0; pfIdx < MAX_PO_PER_PF; pfIdx++)
5817 DU_LOG("Paging Occassion at Paging Frame [%d] : %d\n", pfIdx, pageCfg->pagingOcc[pfIdx]);
5820 pdcchConfigSib1 = &sib1Cfg->pdcchCfgSib1;
5821 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : PDCCH ** \n");
5822 DU_LOG("Coreset Zero Index %d\n", pdcchConfigSib1->coresetZeroIndex);
5823 DU_LOG("Search Space Zero Index %d\n", pdcchConfigSib1->searchSpaceZeroIndex);
5825 bwpDlCfg = &cellCfg->initialDlBwp;
5826 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP Configuration ** \n");
5828 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : BWP ** \n");
5829 bwp = &bwpDlCfg->bwp;
5830 DU_LOG("First PRB %d\n", bwp->firstPrb);
5831 DU_LOG("Number of PRBs %d\n", bwp->numPrb);
5832 DU_LOG("Subcarrier Spacing %d\n", bwp->scs);
5833 DU_LOG("Cyclic Perfix %d\n", bwp->cyclicPrefix);
5835 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common ** \n");
5836 pdcchCfgCmn = &bwpDlCfg->pdcchCommon;
5837 DU_LOG("RA Search Space ID %d\n", pdcchCfgCmn->raSearchSpaceId);
5839 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common : Search Space ** \n");
5840 searchSpaceCfg = &pdcchCfgCmn->commonSearchSpace;
5841 DU_LOG("Search Space ID %d\n", searchSpaceCfg->searchSpaceId);
5842 DU_LOG("Coreset ID %d\n", searchSpaceCfg->coresetId);
5843 DU_LOG("Monitoring Slot %d\n", searchSpaceCfg->monitoringSlot);
5844 DU_LOG("Duration %d\n", searchSpaceCfg->duration);
5845 DU_LOG("Monitoring Symbol %x\n", searchSpaceCfg->monitoringSymbol);
5847 candidateInfo = &searchSpaceCfg->candidate;
5848 DU_LOG("Number of Candidates in Aggregation Level_1 %d\n", candidateInfo->aggLevel1);
5849 DU_LOG("Number of Candidates in Aggregation Level_2 %d\n", candidateInfo->aggLevel2);
5850 DU_LOG("Number of Candidates in Aggregation Level_4 %d\n", candidateInfo->aggLevel4);
5851 DU_LOG("Number of Candidates in Aggregation Level_8 %d\n", candidateInfo->aggLevel8);
5852 DU_LOG("Number of Candidates in Aggregation Level_16 %d\n", candidateInfo->aggLevel16);
5854 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDSCH Config Common ** \n");
5855 pdschCfgCmn = &bwpDlCfg->pdschCommon;
5856 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCmn->numTimeDomAlloc);
5858 for (rsrcIdx = 0; rsrcIdx < pdschCfgCmn->numTimeDomAlloc; rsrcIdx++)
5860 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
5861 pdschCmnTimeDomRsrcAlloc = &pdschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
5862 DU_LOG("\tK0 %d\n", pdschCmnTimeDomRsrcAlloc->k0);
5863 DU_LOG("\tPDSCH Mapping Type %d\n", pdschCmnTimeDomRsrcAlloc->mappingType);
5864 DU_LOG("\tPDSCH Start Symbol %d\n", pdschCmnTimeDomRsrcAlloc->startSymbol);
5865 DU_LOG("\tPDSCH Symbol Length %d\n", pdschCmnTimeDomRsrcAlloc->lengthSymbol);
5868 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP Configuration ** \n");
5869 bwpUlCfg = &cellCfg->initialUlBwp;
5871 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : BWP ** \n");
5872 DU_LOG("First PRB %d\n", bwpUlCfg->bwp.firstPrb);
5873 DU_LOG("Number of PRBs %d\n", bwpUlCfg->bwp.numPrb);
5874 DU_LOG("Subcarrier Spacing %d\n", bwpUlCfg->bwp.scs);
5875 DU_LOG("Cyclic Prefix %d\n", bwpUlCfg->bwp.cyclicPrefix);
5877 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUCCH Config Common ** \n");
5878 pucchCfgCmn = &bwpUlCfg->pucchCommon;
5879 DU_LOG("PUCCH Resource Common %d\n", pucchCfgCmn->pucchResourceCommon);
5880 DU_LOG("Group Hopping %d\n", pucchCfgCmn->pucchGroupHopping);
5882 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUSCH Config Common ** \n");
5883 puschCfgCmn = &bwpUlCfg ->puschCommon;
5884 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCmn->numTimeDomRsrcAlloc);
5885 for (rsrcIdx = 0; rsrcIdx < puschCfgCmn->numTimeDomRsrcAlloc; rsrcIdx++)
5887 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
5888 puschTimeDomRsrcAlloc = &puschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
5889 DU_LOG("\tK2 %d\n", puschTimeDomRsrcAlloc->k2);
5890 DU_LOG("\tPUSCH Mapping Type %d\n", puschTimeDomRsrcAlloc->mappingType);
5891 DU_LOG("\tPUSCH Start Symbol %d\n", puschTimeDomRsrcAlloc->startSymbol);
5892 DU_LOG("\tPUSCH Symbol Length %d\n", puschTimeDomRsrcAlloc->symbolLength);
5893 DU_LOG("\tPUSCH Start Symbol And Length %d\n", puschTimeDomRsrcAlloc->startSymbolAndLength);
5896 DU_LOG("\n ** MAC Cell Configuration : SSB Configuration** \n");
5897 ssbCfg = &macCellCfg ->ssbCfg;
5898 DU_LOG("SSB PDCH Power %d\n", ssbCfg->ssbPbchPwr);
5899 DU_LOG("Subcarrier Spacing Common %d\n", ssbCfg->scsCmn);
5900 DU_LOG("SSB Offset from Point A %d\n", ssbCfg->ssbOffsetPointA);
5901 DU_LOG("SSB Periodicity in msec %d\n", ssbCfg->ssbPeriod);
5902 DU_LOG("SSB Subcarrier Offset %d\n", ssbCfg->ssbScOffset);
5903 for (ssbMaskIdx = 0; ssbMaskIdx < SSB_MASK_SIZE; ssbMaskIdx++)
5905 DU_LOG("SSB Mask[%d] :%d\n", ssbMaskIdx, ssbCfg->ssbMask[ssbMaskIdx]);
5907 DU_LOG("Beam ID %d\n", ssbCfg->beamId[0]);
5908 DU_LOG("BETA PSS %d\n", ssbCfg->betaPss);
5909 DU_LOG("BCH Payloag Flag %d\n", ssbCfg->bchPayloadFlag);
5910 DU_LOG("MIB PDU %d %d %d \n", ssbCfg->mibPdu[0], ssbCfg->mibPdu[1], ssbCfg->mibPdu[2]);
5911 DU_LOG("DMRS Type-A Position %d\n", ssbCfg->dmrsTypeAPos);
5913 DU_LOG("\n ** MAC Cell Configuration : CSI RS Configuration ** \n");
5914 csiRsCfg = &macCellCfg->csiRsCfg;
5915 DU_LOG("Frequency Domain Allocation %s\n", csiRsCfg->csiFreqDomainAlloc);
5916 DU_LOG("Number of Ports %d\n", csiRsCfg->csiNrofPorts);
5917 DU_LOG("First OFDM Symbol in Time Domain %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain);
5918 DU_LOG("First OFDM Symbol in Timer Domain 2 %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2);
5919 DU_LOG("CDM Type %d\n", csiRsCfg->csirscdmType);
5920 DU_LOG("Density %d\n", csiRsCfg->csirsdensity);
5921 DU_LOG("Density dot 5:%d\n", csiRsCfg->csirsdensitydot5);
5922 DU_LOG("Power Control Offset %d\n", csiRsCfg->powerControlOffset);
5923 DU_LOG("Power Control Offset Search Space %d\n", csiRsCfg->powerControlOffsetSS);
5924 DU_LOG("Periodicity And Offset %d\n", csiRsCfg->periodicityAndOffset);
5926 DU_LOG("\n ** MAC Cell Configuration : PRACH Configuration ** \n");
5927 prachCfg = &macCellCfg->prachCfg;
5928 DU_LOG("PRACH Sequence Length %d\n", prachCfg->prachSeqLen);
5929 DU_LOG("Subcarrier Spacing %d\n", prachCfg->prachSubcSpacing);
5930 DU_LOG("Number of PRACH FDM %d\n", prachCfg->msg1Fdm);
5931 DU_LOG("PRACH Configuration Index %d\n", prachCfg->prachCfgIdx);
5932 DU_LOG("PRACH Restricted Set Configuration %d\n", prachCfg->prachRstSetCfg);
5933 DU_LOG("Number of SSB per RACH occassion %d\n", prachCfg->ssbPerRach);
5934 DU_LOG("Number of RA preambles %d\n", prachCfg->totalNumRaPreamble);
5935 DU_LOG("Number of Contention Based Preamble per SSB %d\n", prachCfg->numCbPreamblePerSsb);
5936 DU_LOG("PRACH Frequeny Start Offset %d\n", prachCfg->msg1FreqStart);
5937 DU_LOG("RA Contention Resolution Timer %d\n", prachCfg->raContResTmr);
5938 DU_LOG("RSRP Threshold %d\n", prachCfg->rsrpThreshSsb);
5939 DU_LOG("RA Response Window %d\n", prachCfg->raRspWindow);
5940 for(fdmIdx = 0; fdmIdx < prachCfg->msg1Fdm; fdmIdx++)
5942 prachFdmInfo = &prachCfg->fdm[fdmIdx];
5943 DU_LOG("FDM[%d]\n", fdmIdx);
5944 DU_LOG("\tRoot Sequence Index %d\n", prachFdmInfo->rootSeqIdx);
5945 DU_LOG("\tNumber of Root Sequence %d\n", prachFdmInfo->numRootSeq);
5946 DU_LOG("\tK1 %d\n", prachFdmInfo->k1);
5947 DU_LOG("\tZero Correlation Zone Configuration %d\n", prachFdmInfo->zeroCorrZoneCfg);
5951 DU_LOG("\n ** MAC Cell Configuration : TDD Configuration ** \n");
5952 tddCfg = &macCellCfg->tddCfg;
5953 DU_LOG("TDD Slot Periodicity %d\n", tddCfg->tddPeriod);
5954 DU_LOG("Number of DL Slots %d\n", tddCfg->nrOfDlSlots);
5955 DU_LOG("Number of DL Symbols %d\n", tddCfg->nrOfDlSymbols);
5956 DU_LOG("Number of UL Slots %d\n", tddCfg->nrOfUlSlots);
5957 DU_LOG("Number of UL Symbols %d\n", tddCfg->nrOfUlSymbols);
5960 DU_LOG("\n ** MAC Cell Configuration : Precoding Configuration ** \n");
5961 precodCfg = &macCellCfg->precodingConf;
5962 DU_LOG("Number of Layers %d\n", precodCfg->numLayers);
5963 DU_LOG("Number of Antenna Ports %d\n", precodCfg->numAntPorts);
5965 DU_LOG("\n ** MAC Cell Config : BEAM FORMING CFG ** \n");
5966 beamFormingCfg = &macCellCfg ->beamCfg;
5967 DU_LOG("Number of Beams %d\n", beamFormingCfg->numOfBeams);
5968 DU_LOG("Number of Tx RUs %d\n", beamFormingCfg->numTxRUs);
5969 DU_LOG("Beam Index %d\n", beamFormingCfg->beamIdx);
5970 DU_LOG("Beam Type %d\n", beamFormingCfg->beamType);
5971 DU_LOG("Beam Azimuth %d\n", beamFormingCfg->beamAzimuth);
5972 DU_LOG("Beam Tilt %d\n", beamFormingCfg->beamTilt);
5973 DU_LOG("Beam Horizontal Width %d\n", beamFormingCfg->beamHorizWidth);
5974 DU_LOG("Beam Vertical Width %d\n", beamFormingCfg->beamVertWidth);
5975 DU_LOG("Coverage Shape %d\n", beamFormingCfg->coverageShape);
5976 DU_LOG("Digitak Tilt %d\n",beamFormingCfg ->digitalTilt);
5977 DU_LOG("Digital Azimuth %d\n", beamFormingCfg->digitalAzimuth);
5979 DU_LOG("\n ** SIB1 Configuration ** \n");
5980 sib1Params = &duCfgParam.sib1Params;
5981 DU_LOG("TAC %d\n", sib1Params->tac);
5982 DU_LOG("RANAC %ld\n", sib1Params->ranac);
5983 DU_LOG("Cell ID %d\n", sib1Params->cellIdentity);
5984 DU_LOG("Cell Reserved for Operational Use %ld\n", sib1Params->cellResvdForOpUse);
5985 DU_LOG("Connection Establishment Failure Count %ld\n", sib1Params->connEstFailCnt);
5986 DU_LOG("Connection Establishment Failure Offset Valid %ld\n", sib1Params->connEstFailOffValidity);
5987 DU_LOG("Connection Establishment Failure Offset %ld\n", sib1Params->connEstFailOffset);
5988 DU_LOG("PLMN : mcc[0] %d\n", sib1Params->plmn.mcc[0]);
5989 DU_LOG("PLMN : mcc[1] %d\n", sib1Params->plmn.mcc[1]);
5990 DU_LOG("PLMN : mcc[2] %d\n", sib1Params->plmn.mcc[2]);
5991 DU_LOG("PLMN : mnc[0] %d\n", sib1Params->plmn.mnc[0]);
5992 DU_LOG("PLMN : mnc[1] %d\n", sib1Params->plmn.mnc[1]);
5993 DU_LOG("PLMN : mnc[2] %d\n", sib1Params->plmn.mnc[2]);
5995 DU_LOG("\n ** SIB1 : SI Scheduling Info ** \n");
5996 siSchedInfo = &sib1Params ->siSchedInfo;
5997 DU_LOG("Windown Length %ld\n", siSchedInfo->winLen);
5998 DU_LOG("Broadcast Status %ld\n", siSchedInfo->broadcastSta);
5999 DU_LOG("Periodicity %ld\n", siSchedInfo->preiodicity);
6000 DU_LOG("SIB Type %ld\n", siSchedInfo->sibType);
6001 DU_LOG("SIB Value Tag %ld\n", siSchedInfo->sibValTag);
6003 DU_LOG("\n ** SIB1 : Serving Cell Configuration Common SIB ** \n");
6004 srvCellCfgCmnSib = &sib1Params->srvCellCfgCommSib;
6005 DU_LOG("Subcarrier Spacing %ld\n", srvCellCfgCmnSib->scs);
6006 DU_LOG("SSB Position in Burst %d\n", srvCellCfgCmnSib->ssbPosInBurst);
6007 DU_LOG("SSB Periodicity %ld\n", srvCellCfgCmnSib->ssbPrdServingCell);
6008 DU_LOG("SS PBCH Power %ld\n", srvCellCfgCmnSib->ssPbchBlockPwr);
6010 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common ** \n");
6011 dlCfgCmn = &srvCellCfgCmnSib->dlCfg;
6012 DU_LOG("Frequency Band Indicator %ld\n", dlCfgCmn->freqBandInd);
6013 DU_LOG("Offset to Point A %ld\n", dlCfgCmn->offsetToPointA);
6014 DU_LOG("Frequency Location And Bandwidth %ld\n", dlCfgCmn->locAndBw);
6015 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsOffset);
6016 DU_LOG("Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scs);
6017 DU_LOG("Bandwidth considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsBw);
6019 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common : PDCCH Config Common ** \n");
6020 pdcchCfgCommon = &dlCfgCmn->pdcchCfg;
6021 if(pdcchCfgCommon->present)
6023 DU_LOG("Control Resource Set Zero Index %ld\n", pdcchCfgCommon->ctrlRsrcSetZero);
6024 DU_LOG("Search Space Zero Index %ld\n", pdcchCfgCommon->searchSpcZero);
6025 DU_LOG("Search Space ID %ld\n", pdcchCfgCommon->searchSpcId);
6026 DU_LOG("Control Resource Set ID %ld\n", pdcchCfgCommon->ctrlRsrcSetId);
6027 DU_LOG("Monitoring Slot Periodicity and Offset Present %d\n", pdcchCfgCommon->monitorSlotPrdAndOffPresent);
6028 DU_LOG("Monitoring Slot Periodicity and Offset %ld\n", pdcchCfgCommon->monitorSlotPrdAndOff);
6029 for (monitoringSymbIdx = 0; monitoringSymbIdx < 2; monitoringSymbIdx++)
6031 DU_LOG("Monitoring Symbols in Slot [%d] %d\n",monitoringSymbIdx, pdcchCfgCommon->monitorSymbolsInSlot[monitoringSymbIdx]);
6033 DU_LOG("Number of Candidates for Aggregation Level_1 %ld\n", pdcchCfgCommon->numCandAggLvl1);
6034 DU_LOG("Number of Candidates for Aggregation Level_2 %ld\n", pdcchCfgCommon->numCandAggLvl2);
6035 DU_LOG("Number of Candidates for Aggregation Level_4 %ld\n", pdcchCfgCommon->numCandAggLvl4);
6036 DU_LOG("Number of Candidates for Aggregation Level_8 %ld\n", pdcchCfgCommon->numCandAggLvl8);
6037 DU_LOG("Number of Candidates for Aggregation Level_16 %ld\n", pdcchCfgCommon->numCandAggLvl16);
6038 DU_LOG("Seach Space Type %d\n", pdcchCfgCommon->searchSpcType);
6039 DU_LOG("Common Search Space DCI Format %d\n", pdcchCfgCommon->commSrchSpcDciFrmt);
6040 DU_LOG("SIB1 Search Space ID %ld\n", pdcchCfgCommon->searchSpcSib1);
6041 DU_LOG("Paging Search Space ID %ld\n", pdcchCfgCommon->pagingSearchSpc);
6042 DU_LOG("RA Search Space ID %ld\n", pdcchCfgCommon->raSearchSpc);
6046 DU_LOG("PDCCH Config Common not Present");
6049 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PDSCH Config Common ** \n");
6050 pdschCfgCommon = &dlCfgCmn->pdschCfg;
6051 DU_LOG("PDSCH Config Common Present %d\n", pdschCfgCommon->present);
6052 if(pdschCfgCommon->present)
6054 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCommon->numTimeDomRsrcAlloc);
6055 for (rsrcIdx = 0; rsrcIdx < pdschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
6057 pdschTimeDomRsrcAlloc = &pdschCfgCommon->timeDomAlloc[rsrcIdx];
6058 DU_LOG("PDSCH Timer Domain Resource Allocation [%d]", rsrcIdx);
6059 DU_LOG("K0 %ld\n", pdschTimeDomRsrcAlloc->k0);
6060 DU_LOG("MappingType %ld\n", pdschTimeDomRsrcAlloc->mapType);
6061 DU_LOG("SLIV %d\n", pdschTimeDomRsrcAlloc->sliv);
6066 DU_LOG("PDSCH Config Common not Present");
6069 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : BCCH Config Common ** \n");
6070 bcchCfg = &dlCfgCmn->bcchCfg;
6071 DU_LOG("Modification Period Coefficient %ld\n", bcchCfg->modPrdCoeff);
6073 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PCCH Config Common ** \n");
6074 pcchCfg = &dlCfgCmn->pcchCfg;
6075 DU_LOG("Default Paging Cycle %d\n", pcchCfg->dfltPagingCycle);
6076 DU_LOG("Number of PF in Paging Cycle %d\n", pcchCfg->nAndPagingFrmOffsetType);
6077 DU_LOG("PF Offset %d\n", pcchCfg->pageFrameOffset);
6078 DU_LOG("NS - Number of P0 in PF %d\n", pcchCfg->ns);
6079 DU_LOG("First PDCCH Monitoring Occassion of each P0 Type %d\n", pcchCfg->firstPDCCHMontioringType);
6080 for (poIdx = 0; poIdx < MAX_PO_PER_PF; poIdx++)
6082 DU_LOG("First PDCCH Monitoring Occassion in P0 [%d] %d\n", poIdx, pcchCfg->firstPDCCHMontioringInfo[poIdx]);
6085 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common ** \n");
6086 ulCfgCmn = &srvCellCfgCmnSib->ulCfg;
6087 DU_LOG("Frequency Band Indicator %ld\n", ulCfgCmn->freqBandInd);
6088 DU_LOG("Maximum Transmission Power %ld\n", ulCfgCmn->pMax);
6089 DU_LOG("Frequency Location and Bandwidth %ld\n", ulCfgCmn->locAndBw);
6090 DU_LOG("Time Alignment Timer %ld\n", ulCfgCmn->timeAlignTimerComm);
6091 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsOffset);
6092 DU_LOG("Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scs);
6093 DU_LOG("Carrier BW considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsBw);
6095 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : RACH Config Common ** \n");
6096 rachCfgCmn = &ulCfgCmn ->rachCfg;
6097 if(rachCfgCmn->present)
6099 DU_LOG("PRACH Configuration Index %ld\n", rachCfgCmn->prachCfgIdx);
6100 DU_LOG("Number of PRACH FDM %ld\n", rachCfgCmn->msg1Fdm);
6101 DU_LOG("PRACH Frequeny Start Offset %ld\n", rachCfgCmn->msg1FreqStart);
6102 DU_LOG("Zero Correaltion Zone Configuration %ld\n", rachCfgCmn->zeroCorrZoneCfg);
6103 DU_LOG("Target Power Level of Received Preamble %ld\n", rachCfgCmn->preambleRcvdTgtPwr);
6104 DU_LOG("Maximum number of Preamble Transmission %ld\n", rachCfgCmn->preambleTransMax);
6105 DU_LOG("Power Ramping Step %ld\n", rachCfgCmn->pwrRampingStep);
6106 DU_LOG("RA Response Window %ld\n", rachCfgCmn->raRspWindow);
6107 DU_LOG("Total Number of RA Preambles %ld\n", rachCfgCmn->numRaPreamble);
6108 DU_LOG("Number of SSB per RACH Occassion %ld\n", rachCfgCmn->numSsbPerRachOcc);
6109 DU_LOG("Number of Contention Based Preamble per SSB %ld\n", rachCfgCmn->numCbPreamblePerSsb);
6110 DU_LOG("Contention Resolution Timer %ld\n", rachCfgCmn->contResTimer);
6111 DU_LOG("RSRP Threshold %ld\n", rachCfgCmn->rsrpThreshSsb);
6112 DU_LOG("Root Sequence Index Present %d\n", rachCfgCmn->rootSeqIdxPresent);
6113 DU_LOG("Root Sequence Index %ld\n", rachCfgCmn->rootSeqIdx);
6114 DU_LOG("Subcarrier Spacing %ld\n", rachCfgCmn->msg1Scs);
6115 DU_LOG("Restricted Set Configuration %ld\n", rachCfgCmn->restrictedSetCfg);
6119 DU_LOG("RACH Config Common not present\n");
6122 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUSCH Config Common ** \n");
6123 puschCfgCommon = &ulCfgCmn ->puschCfg;
6124 if(puschCfgCommon->puschCfgPresent)
6126 DU_LOG("MSG3 Delta from RACH Preamble %ld\n", puschCfgCommon->msg3DeltaPreamble);
6127 DU_LOG("P0 Nominal With Grant %ld\n", puschCfgCommon->p0NominalWithGrant);
6128 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCommon->numTimeDomRsrcAlloc);
6129 for(rsrcIdx = 0; rsrcIdx < puschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
6131 puschCmnTimeDomRsrsAlloc = &puschCfgCommon ->timeDomAllocList[rsrcIdx];
6132 DU_LOG("Time Domain Resource Alloc [%d]", rsrcIdx);
6133 DU_LOG("\tK2 %ld\n", puschCmnTimeDomRsrsAlloc->k2);
6134 DU_LOG("\tMapping Type %ld\n", puschCmnTimeDomRsrsAlloc->mapType);
6135 DU_LOG("\tSLIV %d\n", puschCmnTimeDomRsrsAlloc->sliv);
6140 DU_LOG("PUSCH Config Common not present\n");
6143 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUCCH Config Common **\n");
6144 pucchCfgCommon = &ulCfgCmn->pucchCfg;
6145 if(pucchCfgCommon->present)
6147 DU_LOG("Resource Common %ld\n", pucchCfgCommon->rsrcComm);
6148 DU_LOG("Group Hopping %ld\n", pucchCfgCommon->grpHop);
6149 DU_LOG("P0 Nominal %ld\n", pucchCfgCommon->p0Nominal);
6153 DU_LOG("PUCCH Config Common not present\n");
6156 DU_LOG("\n ** SIB1 : Serving Cell Config Common : TDD UL DL Config Common ** \n");
6157 tddUlDlCfgCmn = &srvCellCfgCmnSib->tddCfg;
6158 DU_LOG("Reference Subcarrier Spacing %ld\n", tddUlDlCfgCmn->refScs);
6159 DU_LOG("Transmission Periodicity %ld\n", tddUlDlCfgCmn->txPrd);
6160 DU_LOG("Number of DL Slots %ld\n", tddUlDlCfgCmn->numDlSlots);
6161 DU_LOG("Number of DL Symbols %ld\n", tddUlDlCfgCmn->numDlSymbols);
6162 DU_LOG("Number of UL Slots %ld\n", tddUlDlCfgCmn->numUlSlots);
6163 DU_LOG("Number of UL Symbols %ld\n", tddUlDlCfgCmn->numUlSymbols);
6165 DU_LOG("\n ** MAC SLICE CONFIG REQUEST ** \n");
6166 macSliceCfg = &duCfgParam.tempSliceCfg;
6167 DU_LOG("Number of RRM Policy %d\n",macSliceCfg->numOfRrmPolicy);
6169 for(policyIdx = 0; policyIdx < macSliceCfg->numOfRrmPolicy; policyIdx++)
6171 rrmPolicy = macSliceCfg->listOfRrmPolicy[policyIdx];
6172 DU_LOG("RRM Policy [%d]\n", policyIdx);
6173 DU_LOG("\tResource Type %d\n", rrmPolicy->resourceType);
6175 rrmPolicyRatio = &rrmPolicy ->policyRatio;
6176 DU_LOG("\tPolicy Maximum Ratio %d\n", rrmPolicyRatio->maxRatio);
6177 DU_LOG("\tPolicy Minimum Ratio %d\n", rrmPolicyRatio->minRatio);
6178 DU_LOG("\tPolicy Deidcated Ration %d\n", rrmPolicyRatio->dedicatedRatio);
6179 DU_LOG("\tNumber of RRM Policy Member %d\n", rrmPolicy->numOfRrmPolicyMem);
6181 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
6183 rrmPolicyMemberList = rrmPolicy->rRMPolicyMemberList[memIdx];
6184 DU_LOG("\tRRM Policy Member [%d]\n", memIdx);
6185 DU_LOG("\t\tPLMN : mcc[0] %d\n", rrmPolicyMemberList->plmn.mcc[0]);
6186 DU_LOG("\t\tPLMN : mcc[1] %d\n", rrmPolicyMemberList->plmn.mcc[1]);
6187 DU_LOG("\t\tPLMN : mcc[2] %d\n", rrmPolicyMemberList->plmn.mcc[2]);
6188 DU_LOG("\t\tPLMN : mnc[0] %d\n", rrmPolicyMemberList->plmn.mnc[0]);
6189 DU_LOG("\t\tPLMN : mnc[1] %d\n", rrmPolicyMemberList->plmn.mnc[1]);
6190 DU_LOG("\t\tPLMN : mnc[2] %d\n", rrmPolicyMemberList->plmn.mnc[2]);
6191 DU_LOG("\t\tSST %d\n",rrmPolicyMemberList->snssai.sst);
6192 DU_LOG("\t\tSD %d %d %d\n",rrmPolicyMemberList->snssai.sd[0],rrmPolicyMemberList->snssai.sd[1],rrmPolicyMemberList->snssai.sd[2]);
6196 DU_LOG("\n ** E2 configuration ** \n");
6197 e2apDb = &duCb.e2apDb;
6198 DU_LOG("E2 node id %lu\n", e2apDb->e2NodeId);
6199 DU_LOG("Number of RAN function %d\n", e2apDb->numOfRanFunction);
6200 for(ranFuncIdx=0; ranFuncIdx<e2apDb->numOfRanFunction; ranFuncIdx++)
6202 ranFunc = &e2apDb->ranFunction[ranFuncIdx];
6203 DU_LOG("RAN function id %d\n", ranFunc->id);
6204 DU_LOG("Short Name %s\n", ranFunc->name.shortName);
6205 DU_LOG("Service Model OID %s\n", ranFunc->name.serviceModelOID);
6206 DU_LOG("Description %s\n", ranFunc->name.description);
6208 DU_LOG("RevisionCounter %d\n",ranFunc->revisionCounter);
6209 DU_LOG("NUM of Event Trigger Style Supported %d\n",ranFunc->numOfEventTriggerStyleSupported);
6210 for(eventStyleIdx=0;eventStyleIdx<ranFunc->numOfEventTriggerStyleSupported; eventStyleIdx++)
6212 DU_LOG("Style Type %d\n",ranFunc->eventTriggerStyleList[eventStyleIdx].styleType);
6213 DU_LOG("Name %s\n",ranFunc->eventTriggerStyleList[eventStyleIdx].name);
6214 DU_LOG("Format type %d\n",ranFunc->eventTriggerStyleList[eventStyleIdx].formatType);
6217 DU_LOG("Num of Report Style Supported %d\n",ranFunc->numOfReportStyleSupported);
6218 for(reportStyleIdx=0;reportStyleIdx<ranFunc->numOfReportStyleSupported; reportStyleIdx++)
6220 DU_LOG("Style Type %d\n",ranFunc->reportStyleList[reportStyleIdx].reportStyle.styleType);
6221 DU_LOG("Name %s\n",ranFunc->reportStyleList[reportStyleIdx].reportStyle.name);
6222 DU_LOG("Format type %d\n",ranFunc->reportStyleList[reportStyleIdx].reportStyle.formatType);
6223 measurementInfoList = &ranFunc->reportStyleList[reportStyleIdx].measurementInfoList;
6224 if(measurementInfoList->count)
6226 CM_LLIST_FIRST_NODE(measurementInfoList, node);
6229 measurementInfoForAction = (MeasurementInfoForAction*) node->node;
6230 if(measurementInfoForAction)
6232 DU_LOG("Measurement Type Name %s\n",measurementInfoForAction->measurementTypeName);
6233 DU_LOG("Measurement Type Id %d\n",measurementInfoForAction->measurementTypeId);
6239 DU_LOG("Ric Indication header format %d\n",ranFunc->ricIndicationHeaderFormat);
6240 DU_LOG("Ric indication message format %d\n",ranFunc->ricIndicationMessageFormat);
6243 DU_LOG("Number of TNL association %d\n", e2apDb->numOfTNLAssoc);
6244 for(tnlIdx=0;tnlIdx<e2apDb->numOfTNLAssoc;tnlIdx++)
6246 DU_LOG("Local IPv4 Address present %u\n", e2apDb->tnlAssoc[tnlIdx].localIpAddress.ipV4Pres);
6247 DU_LOG("local IP Address %u\n", e2apDb->tnlAssoc[tnlIdx].localIpAddress.ipV4Addr);
6248 DU_LOG("Destination IPv4 Address present %u\n", e2apDb->tnlAssoc[tnlIdx].destIpAddress.ipV4Pres);
6249 DU_LOG("Destination IP Address %u\n", e2apDb->tnlAssoc[tnlIdx].destIpAddress.ipV4Addr);
6250 DU_LOG("Local port %d\n", e2apDb->tnlAssoc[tnlIdx].localPort);
6251 DU_LOG("Destination port %d\n", e2apDb->tnlAssoc[tnlIdx].destPort);
6252 DU_LOG("Tnl usage %d\n", e2apDb->tnlAssoc[tnlIdx].usage);
6256 /**********************************************************************
6258 **********************************************************************/