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 * ****************************************************************/
126 uint8_t srvdCellIdx, bandIdx, sliceIdx, plmnIdx, ranFuncIdx, eventTriggerStyleIdx, reportStyleIdx, tnlAssocIdx;
127 uint8_t brdcstPlmnIdx, freqBandIdx, srvdPlmnIdx;
130 SupportedSliceList *taiSliceSuppLst;
131 uint8_t measurementInfoIdx =0, measurementInfoLen=0;
132 char shortName[] = SHORT_NAME;
133 char serviceModelOID[]= SERVICE_MODEL_OID;
134 char description[] = DESCRIPTION;
135 char event_trigger_style_name[]= EVENT_TRIGGER_STYLE_NAME;
136 char ric_report_style_name[]= REPORT_STYLE_NAME;
139 /* Note: Added these below variable for local testing*/
140 Snssai snssai[NUM_OF_SUPPORTED_SLICE] = {{1,{2,3,4}},{5,{6,7,8}}};
143 duCb.e2apDb.e2TransInfo.transIdCounter = 0;
144 duCb.e2apDb.numOfRanFunction = 1;
145 for(ranFuncIdx =0; ranFuncIdx<duCb.e2apDb.numOfRanFunction; ranFuncIdx++)
147 duCb.e2apDb.ranFunction[ranFuncIdx].id = ranFuncIdx + 1;
148 memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.shortName, shortName, sizeof(shortName));
149 memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.serviceModelOID, serviceModelOID, sizeof(serviceModelOID));
150 memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.description, description, sizeof(description));
151 duCb.e2apDb.ranFunction[ranFuncIdx].revisionCounter = 0;
153 duCb.e2apDb.ranFunction[ranFuncIdx].numOfEventTriggerStyleSupported = NUM_OF_EVENT_TRIGGER_STYLE_SUPPORTED;
154 for(eventTriggerStyleIdx=0; eventTriggerStyleIdx<duCb.e2apDb.ranFunction[ranFuncIdx].numOfEventTriggerStyleSupported; eventTriggerStyleIdx++)
156 duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].styleType = EVENT_TRIGGER_STYLE_TYPE;
157 duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].formatType = EVENT_TRIGGER_STYLE_FORMAT_TYPE;
158 memcpy(duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].name, event_trigger_style_name, sizeof(event_trigger_style_name));
161 duCb.e2apDb.ranFunction[ranFuncIdx].numOfReportStyleSupported= NUM_OF_RIC_REPORT_STYLE_SUPPORTED;
162 for(reportStyleIdx=0; reportStyleIdx<duCb.e2apDb.ranFunction[ranFuncIdx].numOfReportStyleSupported; reportStyleIdx++)
164 duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.styleType = REPORT_STYLE_TYPE;
165 duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.formatType = REPORT_ACTION_FORMAT_TYPE;
166 memcpy(duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.name, ric_report_style_name, sizeof(ric_report_style_name));
168 for(measurementInfoIdx =0; measurementInfoIdx<NUM_OF_MEASUREMENT_INFO_SUPPORTED(CONFIG_ADD); measurementInfoIdx++)
170 measurementInfoLen= strlen(MEASUREMENT_TYPE_NAME[measurementInfoIdx]);
171 MeasurementInfoForAction *measurementInfoForAction;
172 DU_ALLOC(measurementInfoForAction, sizeof(MeasurementInfoForAction));
173 if(measurementInfoForAction)
175 measurementInfoForAction->measurementTypeId = measurementInfoIdx+1;
176 memcpy(measurementInfoForAction->measurementTypeName, MEASUREMENT_TYPE_NAME[measurementInfoIdx], measurementInfoLen+1);
178 DU_ALLOC(node, sizeof(CmLList));
181 node->node = (PTR) measurementInfoForAction;
182 cmLListAdd2Tail(&duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].measurementInfoList, node);
187 DU_FREE(measurementInfoForAction, sizeof(MeasurementInfoForAction));
192 duCb.e2apDb.ranFunction[ranFuncIdx].ricIndicationHeaderFormat = RIC_INDICATION_HEADER_FORMAT;
193 duCb.e2apDb.ranFunction[ranFuncIdx].ricIndicationMessageFormat = RIC_INDICATION_MESSAGE_FORMAT;
195 cmLListInit(&duCb.e2apDb.ranFunction[ranFuncIdx].subscriptionList);
197 memset(duCb.e2apDb.e2TransInfo.e2InitTransaction, 0, MAX_NUM_TRANSACTION * sizeof(E2TransInfo));
198 memset(duCb.e2apDb.e2TransInfo.ricInitTransaction, 0, MAX_NUM_TRANSACTION * sizeof(E2TransInfo));
200 for(srvdCellIdx=0; srvdCellIdx<DEFAULT_CELLS; srvdCellIdx++)
202 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn, 0, sizeof(Plmn));
203 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[0] = PLMN_MCC0;
204 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[1] = PLMN_MCC1;
205 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[2] = PLMN_MCC2;
206 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mnc[0] = PLMN_MNC0;
207 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mnc[1] = PLMN_MNC1;
211 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrPci = cellParams.nRPCI;
213 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrPci = NR_PCI;
215 /* List of Available PLMN */
216 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
218 /* As per spec 38.473, Plmn identity consists of 3 digit from mcc
219 * followed by either 2 digit or 3 digits of mnc */
221 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn, 0,\
224 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
225 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
226 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
227 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
228 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
229 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
231 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[0] = PLMN_MCC0;
232 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[1] = PLMN_MCC1;
233 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[2] = PLMN_MCC2;
234 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[0] = PLMN_MNC0;
235 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[1] = PLMN_MNC1;
238 /* List of Extended PLMN */
239 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
241 /* As per spec 38.473, Plmn identity consists of 3 digit from mcc
242 * followed by either 2 digit or 3 digits of mnc */
244 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn, 0, sizeof(Plmn));
245 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[0] = PLMN_MCC0;
246 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[1] = PLMN_MCC1;
247 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[2] = PLMN_MCC2;
248 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mnc[0] = PLMN_MNC0;
249 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mnc[1] = PLMN_MNC1;
251 /* List of Supporting Slices */
252 for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
254 taiSliceSuppLst = &duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].\
257 /* TODO Calculte the exact number of supported slices once will get
258 * cell configuration from O1 */
259 taiSliceSuppLst->numSupportedSlices = NUM_OF_SUPPORTED_SLICE;
260 if(taiSliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
262 DU_LOG("\nERROR --> DU_APP: readCfg(): Number of supported slice [%d] is more than 1024",\
263 taiSliceSuppLst->numSupportedSlices);
267 DU_ALLOC(taiSliceSuppLst->snssai, taiSliceSuppLst->numSupportedSlices*sizeof(Snssai*));
268 if(taiSliceSuppLst->snssai == NULLP)
270 DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
274 for(sliceIdx=0; sliceIdx<taiSliceSuppLst->numSupportedSlices; sliceIdx++)
276 DU_ALLOC(taiSliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
277 if(taiSliceSuppLst->snssai[sliceIdx] == NULLP)
279 DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
283 memcpy(taiSliceSuppLst->snssai[sliceIdx]->sd, cellParams.plmnList[sliceIdx].sd, \
284 SD_SIZE*sizeof(uint8_t));
285 taiSliceSuppLst->snssai[sliceIdx]->sst = cellParams.plmnList[sliceIdx].sst;
287 memcpy(taiSliceSuppLst->snssai[sliceIdx], &snssai[sliceIdx], sizeof(Snssai));
294 /* NR TDD Mode info */
296 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.nrArfcn = cellParams.arfcnUL;
297 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
298 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
300 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.nrArfcn = NR_UL_ARFCN;
301 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
302 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
304 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrb = NRB_273;
306 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
308 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[freqBandIdx].nrFreqBand =\
310 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
312 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[freqBandIdx].sulBand[bandIdx]\
317 /* NR FDD Mode info */
319 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = cellParams.arfcnUL;
320 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
321 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
322 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
323 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = cellParams.arfcnDL;
324 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
325 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
326 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
328 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = NR_UL_ARFCN;
329 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
330 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrScs = NR_SCS;
331 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
332 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = NR_DL_ARFCN;
333 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
334 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
335 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrScs = NR_SCS;
337 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_106;
338 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
340 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[freqBandIdx].\
341 nrFreqBand = NR_FREQ_BAND;
342 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
344 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[freqBandIdx].\
345 sulBand[bandIdx] = SUL_BAND;
348 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_106;
349 for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
351 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[freqBandIdx].\
352 nrFreqBand = NR_FREQ_BAND;
353 for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
355 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[freqBandIdx].\
356 sulBand[bandIdx] = SUL_BAND;
360 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrb = NRB_106;
361 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrb = NRB_106;
364 /*Measurement Config and Cell Config */
365 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.measTimeCfgDuration = TIME_CFG;
367 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellDir = DL_UL;
369 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellType=CELL_TYPE;
371 /* Broadcast PLMN Identity */
372 for(brdcstPlmnIdx=0; brdcstPlmnIdx<MAX_BPLMN_NRCELL_MINUS_1; brdcstPlmnIdx++)
374 for(plmnIdx=0; plmnIdx<MAX_PLMN; plmnIdx++)
376 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx],\
378 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[0] =\
380 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[1] =\
382 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[2] =\
384 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mnc[0] =\
386 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mnc[1] =\
389 /* Extended PLMN List */
390 for(plmnIdx=0; plmnIdx<MAX_PLMN; plmnIdx++)
392 memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
393 extPlmn[plmnIdx], 0, sizeof(Plmn));
394 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
395 extPlmn[plmnIdx].mcc[0] = PLMN_MCC0;
396 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
397 extPlmn[plmnIdx].mcc[1] = PLMN_MCC1;
398 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
399 extPlmn[plmnIdx].mcc[2] = PLMN_MCC2;
400 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
401 extPlmn[plmnIdx].mnc[0] = PLMN_MNC0;
402 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
403 extPlmn[plmnIdx].mnc[1] = PLMN_MNC1;
406 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.epsTac = cellParams.nRTAC; //TODO : to check and fill
407 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.tac = cellParams.nRTAC;
408 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].tac = cellParams.nRTAC;
409 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].nrCellId = cellParams.cellLocalId;
411 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.epsTac = DU_TAC; //TODO : to check and fill
412 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.tac = DU_TAC;
413 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].tac = DU_TAC;
414 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].nrCellId = NR_CELL_ID;
416 duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].ranac = NR_RANAC;
419 /*gnb DU System Info mib msg*/
421 DU_ALLOC(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg, encBufSize);
422 if(!(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg))
424 DU_LOG("\nERROR --> DU APP : Memory allocation failure at readCfg");
427 memcpy(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg, encBuf, encBufSize);
428 duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibLen = encBufSize;
430 /*gnb DU System Info mib msg*/
432 DU_ALLOC(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg,\
434 if(!(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg))
436 DU_LOG("\nERROR --> DU APP : Memory allocation failure at readCfg");
439 memcpy(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg,\
441 duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Len = encBufSize;
448 /*******************************************************************
450 * @brief Copy Slice Cfg in temp structre in duCfgParams
454 * Function : cpyRrmPolicyInDuCfgParams
457 * - Copy Slice Cfg in temp structre in duCfgParams
459 * @params[in] RrmPolicy rrmPolicy[], uint8_t policyNum, uint8_t memberList
460 * @return ROK - success
463 * ****************************************************************/
464 uint8_t cpyRrmPolicyInDuCfgParams(RrmPolicyList rrmPolicy[], uint8_t policyNum, MacSliceCfgReq *tempSliceCfg)
466 uint8_t policyIdx = 0, memberListIdx = 0;
469 tempSliceCfg->numOfRrmPolicy = policyNum;
470 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy, tempSliceCfg->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
471 if(!tempSliceCfg->listOfRrmPolicy)
473 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
477 for(policyIdx = 0; policyIdx<tempSliceCfg->numOfRrmPolicy; policyIdx++)
479 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
480 if(!tempSliceCfg->listOfRrmPolicy[policyIdx])
482 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
486 tempSliceCfg->listOfRrmPolicy[policyIdx]->resourceType = rrmPolicy[policyIdx].resourceType;
488 tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem = rrmPolicy[policyIdx].rRMMemberNum;
490 if(tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem)
492 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList,\
493 tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
495 if(!tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList)
497 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
502 for(memberListIdx = 0; memberListIdx<tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem; memberListIdx++)
504 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx], sizeof(RrmPolicyMemberList));
505 if(!tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx])
507 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
510 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->snssai.sd,\
511 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].sd, 3 * sizeof(uint8_t));
512 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->snssai.sst,\
513 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].sst, sizeof(uint8_t));
514 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->plmn.mcc,\
515 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].mcc, 3 * sizeof(uint8_t));
516 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->plmn.mnc,\
517 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].mnc, 3 * sizeof(uint8_t));
519 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.maxRatio = rrmPolicy[policyIdx].rRMPolicyMaxRatio;
520 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.minRatio = rrmPolicy[policyIdx].rRMPolicyMinRatio;
521 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.dedicatedRatio = rrmPolicy[policyIdx].rRMPolicyDedicatedRatio;
529 /*******************************************************************
531 * @brief Fill SCTP Parameters
535 * Function : parseSctpParams
537 * Functionality: Fill SCTP Parameters
539 * @params[in] XML document pointer
541 * Current node in XML
542 * Pointer to structure to be filled
543 * @return ROK - success
546 * ****************************************************************/
547 uint8_t parseSctpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SctpParams *sctp)
549 uint8_t max_du_port = 0;
550 uint16_t f1_sctp_port = 0;
551 uint16_t e2_sctp_port = 0;
553 memset(sctp, 0, sizeof(SctpParams));
554 cur = cur->xmlChildrenNode;
558 sctp->duPort[F1_INTERFACE] = g_cfg.DU_Port;
559 sctp->duPort[E2_INTERFACE] = g_cfg.RIC_Port;
560 sctp->cuPort = g_cfg.CU_Port;
561 sctp->ricPort = g_cfg.RIC_Port;
563 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_DU_PORT")) && (cur->ns == ns))
565 max_du_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
566 if (max_du_port == 2 )
568 sctp->duPort[F1_INTERFACE] = f1_sctp_port; /* DU Port idx 0 */
569 sctp->duPort[E2_INTERFACE] = e2_sctp_port; /* RIC Port idx 1 */
573 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SCTP_PORT")) && (cur->ns == ns))
575 f1_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
577 if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_SCTP_PORT")) && (cur->ns == ns))
579 e2_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
582 sctp->cuPort = f1_sctp_port;
583 sctp->ricPort = e2_sctp_port;
590 /*******************************************************************
592 * @brief Fill EGTP Parameters
596 * Function : parseEgtpParams
598 * Functionality: Fill EGTP Parmeters
600 * @params[in] XML document pointer
602 * Current node in XML
603 * Pointer to structure to be filled
604 * @return ROK - success
607 * ****************************************************************/
608 uint8_t parseEgtpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1EgtpParams *egtp)
610 memset(egtp, 0, sizeof(F1EgtpParams));
611 cur = cur->xmlChildrenNode;
614 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_F1_EGTP_PORT")) && (cur->ns == ns))
616 egtp->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
618 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEST_F1_EGTP_PORT")) && (cur->ns == ns))
620 egtp->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
622 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_TEID")) && (cur->ns == ns))
624 egtp->minTunnelId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
631 /*******************************************************************
633 * @brief Fill MIB configuration
637 * Function : parseMibParams
639 * Functionality: Fill MIB configuration
641 * @params[in] XML document pointer
643 * Current node in XML
644 * Pointer to structure to be filled
645 * @return ROK - success
648 * ****************************************************************/
649 uint8_t parseMibParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MibParams *mib)
651 memset(mib, 0, sizeof(MibParams));
652 cur = cur -> xmlChildrenNode;
655 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SYS_FRAME_NUM")) && (cur->ns == ns))
657 mib->sysFrmNum = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
659 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUB_CARR_SPACE")) && (cur->ns == ns))
661 mib->subCarrierSpacingCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
663 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFFSET")) && (cur->ns == ns))
665 mib->ssb_SubcarrierOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
667 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPEA_POSITION")) && (cur->ns == ns))
669 mib->dmrs_TypeA_Position = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
671 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
673 mib->controlResourceSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
675 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
677 mib->searchSpaceZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
679 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_BARRED")) && (cur->ns == ns))
681 mib->cellBarred = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
683 if ((!xmlStrcmp(cur->name, (const xmlChar *)"INTRA_FREQ_RESELECT")) && (cur->ns == ns))
685 mib->intraFreqReselection = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
692 /*******************************************************************
694 * @brief Fill PLMN ID
698 * Function : parsePlmn
700 * Functionality: Fill PLMN ID
702 * @params[in] XML document pointer
704 * Current node in XML
705 * Pointer to structure to be filled
706 * @return ROK - success
709 * ****************************************************************/
710 uint8_t parsePlmn(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Plmn *plmn)
712 xmlNodePtr child = NULLP;
714 memset(plmn, 0, sizeof(Plmn));
715 cur = cur->xmlChildrenNode;
718 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MCC")) && (cur->ns == ns))
720 child = cur->xmlChildrenNode;
721 while (child != NULL)
723 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MCC0")) && (child->ns == ns))
725 plmn->mcc[0] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
728 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MCC1")) && (child->ns == ns))
730 plmn->mcc[1] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
733 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MCC2")) && (child->ns == ns))
735 plmn->mcc[2] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
742 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MNC")) && (cur->ns == ns))
744 child = cur->xmlChildrenNode;
745 while (child != NULL)
747 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MNC0")) && (child->ns == ns))
749 plmn->mnc[0] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
752 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MNC1")) && (child->ns == ns))
754 plmn->mnc[1] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
757 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MNC2")) && (child->ns == ns))
759 plmn->mnc[2] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
771 /*******************************************************************
777 * Function : parseNrCgi
779 * Functionality: Fill NR CGI
781 * @params[in] XML document pointer
783 * Current node in XML
784 * Pointer to structure to be filled
785 * @return ROK - success
788 * ****************************************************************/
789 uint8_t parseNrCgi(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrEcgi *nrCgi)
791 memset(nrCgi, 0, sizeof(NrEcgi));
792 cur = cur->xmlChildrenNode;
795 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
797 if(parsePlmn(doc, ns, cur, &nrCgi->plmn) != ROK)
803 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
805 nrCgi-> cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
813 /*******************************************************************
819 * Function : parseSnssai
821 * Functionality: Fill SNSSAI
823 * @params[in] XML document pointer
825 * Current node in XML
826 * Pointer to structure to be filled
827 * @return ROK - success
830 * ****************************************************************/
831 uint8_t parseSnssai(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Snssai *snssai)
836 memset(snssai, 0, sizeof(Snssai));
837 cur = cur ->xmlChildrenNode;
840 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SST")) && (cur->ns == ns))
842 snssai->sst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
845 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SD_SIZE")) && (cur->ns == ns))
847 child = cur->xmlChildrenNode;
850 if ((!xmlStrcmp(child->name, (const xmlChar *)"SD")) && (child->ns == ns))
852 snssai->sd[sdIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
855 child = child -> next;
864 /*******************************************************************
866 * @brief Fill Supported Slice List
870 * Function : parseSupportedSliceList
872 * Functionality: Fill Supported Slice List
874 * @params[in] XML document pointer
876 * Current node in XML
877 * Pointer to structure to be filled
878 * @return ROK - success
881 * ****************************************************************/
882 uint8_t parseSupportedSliceList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SupportedSliceList *sliceSuppLst)
884 uint8_t sliceIdx = 0;
885 xmlNodePtr child = NULLP;
887 memset(sliceSuppLst, 0, sizeof(SupportedSliceList));
888 cur = cur->xmlChildrenNode;
891 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SUPPORT_SLICE")) && (cur->ns == ns))
893 sliceSuppLst->numSupportedSlices = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
894 if(sliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
896 DU_LOG("\nERROR --> DU_APP: %s: Number of supported slice [%d] is more than 1024",\
897 __func__, sliceSuppLst->numSupportedSlices);
902 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI_LIST")) && (cur->ns == ns))
904 DU_ALLOC_SHRABL_BUF(sliceSuppLst->snssai, (sliceSuppLst->numSupportedSlices) * sizeof(Snssai*));
905 if (sliceSuppLst->snssai == NULLP)
907 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
911 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
913 DU_ALLOC_SHRABL_BUF(sliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
914 if (sliceSuppLst->snssai[sliceIdx] == NULLP)
916 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
922 memcpy(sliceSuppLst->snssai[sliceIdx]->sd, cellParams.plmnList[sliceIdx].sd, SD_SIZE*sizeof(uint8_t));
923 sliceSuppLst->snssai[sliceIdx]->sst = cellParams.plmnList[sliceIdx].sst;
930 child = cur->xmlChildrenNode;
931 while (child != NULL)
933 if ((!xmlStrcmp(child->name, (const xmlChar *)"SNSSAI")) && (child->ns == ns))
935 if(parseSnssai(doc, ns, child, sliceSuppLst->snssai[sliceIdx]) != ROK)
951 #ifdef XML_BASED_CONFIG
952 /*******************************************************************
954 * @brief Fill Served PLMN
958 * Function : parseF1SrvdPlmn
960 * Functionality: Fill Served PLMN
962 * @params[in] XML document pointer
964 * Current node in XML
965 * Pointer to structure to be filled
966 * @return ROK - success
969 * ****************************************************************/
970 uint8_t parseF1SrvdPlmn(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1SrvdPlmn *srvdPlmn, uint8_t srvdPlmnIdx)
972 memset(srvdPlmn, 0, sizeof(F1SrvdPlmn));
973 cur = cur->xmlChildrenNode;
977 fillPlmnFromO1(&srvdPlmn ->plmn, srvdPlmnIdx);
979 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
981 if(parsePlmn(doc, ns, cur, &srvdPlmn->plmn) != ROK)
988 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
990 if(parsePlmn(doc, ns, cur, &srvdPlmn->extPlmn) != ROK)
996 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
998 if(parseSupportedSliceList(doc, ns, cur, &srvdPlmn->taiSliceSuppLst) != ROK)
1009 /*******************************************************************
1011 * @brief Fill cell information
1015 * Function : parseF1CellInfo
1017 * Functionality: Fill cell information
1019 * @params[in] XML document pointer
1021 * Current node in XML
1022 * Pointer to structure to be filled
1023 * @return ROK - success
1026 * ****************************************************************/
1027 uint8_t parseF1CellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1CellInfo *f1CellInfo)
1029 memset(f1CellInfo, 0, sizeof(F1CellInfo));
1030 cur = cur->xmlChildrenNode;
1033 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CGI")) && (cur->ns == ns))
1035 if(parseNrCgi(doc, ns, cur, &f1CellInfo->nrCgi) != ROK)
1042 f1CellInfo->nrPci = cellParams.nRPCI;
1044 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
1046 f1CellInfo->nrPci = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1050 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SRVD_PLMN")) && (cur->ns == ns))
1052 if(parseF1SrvdPlmn(doc, ns, cur, &f1CellInfo->srvdPlmn[0], 0) != ROK)
1063 /*******************************************************************
1065 * @brief Fill Frequency Band
1069 * Function : parseF1FreqBand
1071 * Functionality: Fill Frequency Band
1073 * @params[in] XML document pointer
1075 * Current node in XML
1076 * Pointer to structure to be filled
1077 * @return ROK - success
1080 * ****************************************************************/
1081 uint8_t parseF1FreqBand(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1FreqBand *freqBand)
1084 uint16_t sulValue = 0;
1086 xmlNodePtr sulChild;
1088 memset(freqBand, 0, sizeof(F1FreqBand));
1089 cur = cur->xmlChildrenNode;
1092 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
1094 freqBand->nrFreqBand = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1097 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_BAND_LIST")) && (cur->ns == ns))
1099 child = cur->xmlChildrenNode;
1100 while (child != NULL)
1102 if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
1104 sulChild = child->xmlChildrenNode;
1106 while (sulChild != NULL)
1108 if ((!xmlStrcmp(sulChild->name, (const xmlChar *)"SUL_BAND")) && (sulChild->ns == ns))
1110 sulValue = atoi((char *)xmlNodeListGetString(doc, sulChild->xmlChildrenNode, 1));
1111 if (sulIdx < MAX_NRCELL_BANDS)
1113 freqBand->sulBand[sulIdx] = sulValue;
1118 DU_LOG("ERROR --> DU_APP : %s : SUL_BAND array overflow\n", __func__);
1122 sulChild = sulChild->next;
1125 child = child->next;
1133 /*******************************************************************
1135 * @brief Fill Frequency Band List
1139 * Function : parseF1FreqBandList
1141 * Functionality: Fill Frequency Band List
1143 * @params[in] XML document pointer
1145 * Current node in XML
1146 * Pointer to structure to be filled
1147 * @return ROK - success
1150 * ****************************************************************/
1151 uint8_t parseF1FreqBandList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFreqInfo *nrFreqInfo)
1156 cur = cur->xmlChildrenNode;
1159 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
1161 child = cur->xmlChildrenNode;
1162 while(child != NULL)
1164 if ((!xmlStrcmp(child->name, (const xmlChar *)"F1_FREQ_BAND")) && (child->ns == ns))
1166 if(parseF1FreqBand(doc, ns, child, &nrFreqInfo->freqBand[idx]) != ROK)
1172 child = child -> next;
1181 /*******************************************************************
1183 * @brief Fill Transmission Bandwidth
1187 * Function : parseF1TxBw
1189 * Functionality: Fill Transmission Bandwidth
1191 * @params[in] XML document pointer
1193 * Current node in XML
1194 * Pointer to structure to be filled
1195 * @return ROK - success
1198 * ****************************************************************/
1199 uint8_t parseF1TxBw(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1TxBw *txBw)
1201 memset(txBw, 0, sizeof(F1TxBw));
1202 cur = cur->xmlChildrenNode;
1205 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_SCS")) && (cur->ns == ns))
1207 txBw->nrScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1210 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NRB")) && (cur->ns == ns))
1212 txBw->nrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1220 /*******************************************************************
1222 * @brief Fill SUL Info
1226 * Function : parseF1SulInfo
1228 * Functionality: Fill SUL Info
1230 * @params[in] XML document pointer
1232 * Current node in XML
1233 * Pointer to structure to be filled
1234 * @return ROK - success
1237 * ****************************************************************/
1238 uint8_t parseF1SulInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1SulInfo *sulInfo)
1240 memset(sulInfo, 0, sizeof(F1SulInfo));
1241 cur = cur->xmlChildrenNode;
1244 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_ARFCN")) && (cur->ns == ns))
1246 sulInfo->sulArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1249 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
1251 if(parseF1TxBw(doc, ns, cur, &sulInfo->sulTxBw) != ROK)
1262 /*******************************************************************
1264 * @brief Fill NR Frequency Info
1268 * Function : parseF1NrFreqInfo
1270 * Functionality: Fill NR Frequency Info
1272 * @params[in] XML document pointer
1274 * Current node in XML
1275 * Pointer to structure to be filled
1276 * @return ROK - success
1279 * ****************************************************************/
1280 uint8_t parseF1NrFreqInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFreqInfo *nrFreqInfo)
1282 memset(nrFreqInfo, 0, sizeof(F1NrFreqInfo));
1283 cur = cur->xmlChildrenNode;
1286 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_ARFCN")) && (cur->ns == ns))
1288 nrFreqInfo->nrArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1291 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SUL_INFO")) && (cur->ns == ns))
1293 if(parseF1SulInfo(doc, ns, cur, &nrFreqInfo->sulInfo) != ROK)
1299 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_FREQ_BAND_LIST")) && (cur->ns == ns))
1301 if(parseF1FreqBandList(doc, ns, cur, nrFreqInfo) != ROK)
1312 /*******************************************************************
1314 * @brief Fill NR FDD Info
1318 * Function : parseF1NrFddInfo
1320 * Functionality: Fill NR FDD Info
1322 * @params[in] XML document pointer
1324 * Current node in XML
1325 * Pointer to structure to be filled
1326 * @return ROK - success
1329 * ****************************************************************/
1330 uint8_t parseF1NrFddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFddInfo *fddInfo)
1332 memset(fddInfo, 0, sizeof(F1NrFddInfo));
1333 cur = cur->xmlChildrenNode;
1336 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO_UL")) && (cur->ns == ns))
1338 if(parseF1NrFreqInfo(doc, ns, cur, &fddInfo->ulNrFreqInfo) != ROK)
1344 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO_DL")) && (cur->ns == ns))
1346 if(parseF1NrFreqInfo(doc, ns, cur, &fddInfo->dlNrFreqInfo) != ROK)
1352 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW_UL")) && (cur->ns == ns))
1354 if(parseF1TxBw(doc, ns, cur, &fddInfo->ulTxBw) != ROK)
1360 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW_DL")) && (cur->ns == ns))
1362 if(parseF1TxBw(doc, ns, cur, &fddInfo->dlTxBw) != ROK)
1373 /*******************************************************************
1375 * @brief Fill NR TDD Info
1379 * Function : parseF1NrTddInfo
1381 * Functionality: Fill NR TDD Info
1383 * @params[in] XML document pointer
1385 * Current node in XML
1386 * Pointer to structure to be filled
1387 * @return ROK - success
1390 * ****************************************************************/
1391 uint8_t parseF1NrTddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrTddInfo *tddInfo)
1393 memset(tddInfo, 0, sizeof(F1NrTddInfo));
1394 cur = cur->xmlChildrenNode;
1397 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO")) && (cur->ns == ns))
1399 if(parseF1NrFreqInfo(doc, ns, cur, &tddInfo->nrFreqInfo) != ROK)
1405 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
1407 if(parseF1TxBw(doc, ns, cur, &tddInfo->nrTxBw) != ROK)
1418 /*******************************************************************
1420 * @brief Fill NR Mode Info
1424 * Function : parseNrModeInfo
1426 * Functionality: Fill NR Mode Info
1428 * @params[in] XML document pointer
1430 * Current node in XML
1431 * Pointer to structure to be filled
1432 * @return ROK - success
1435 * ****************************************************************/
1436 uint8_t parseNrModeInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrModeInfo *nrModeInfo)
1440 memset(nrModeInfo, 0, sizeof(NrModeInfo));
1441 cur = cur->xmlChildrenNode;
1444 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE")) && (cur->ns == ns))
1446 strcpy((char*)modeCfg, (char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1449 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FDD_INFO")) && (cur->ns == ns))
1451 if(strcmp(modeCfg, "FDD") == 0)
1453 if(parseF1NrFddInfo(doc, ns, cur, &nrModeInfo->mode.fdd) != ROK)
1460 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_TDD_INFO")) && (cur->ns == ns))
1462 if(strcmp(modeCfg, "TDD") == 0)
1464 if(parseF1NrTddInfo(doc, ns, cur, &nrModeInfo->mode.tdd) != ROK)
1476 /*******************************************************************
1478 * @brief Fill Broadcast PLMN Information
1482 * Function : parseF1BrdcstPlmnInfo
1484 * Functionality: Fill Broadcast PLMN Information
1486 * @params[in] XML document pointer
1488 * Current node in XML
1489 * Pointer to structure to be filled
1490 * @return ROK - success
1493 * ****************************************************************/
1494 uint8_t parseF1BrdcstPlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1BrdcstPlmnInfo *brdcstPlmnInfo)
1496 memset(brdcstPlmnInfo, 0, sizeof(F1BrdcstPlmnInfo));
1497 cur = cur->xmlChildrenNode;
1500 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
1502 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->plmn[0]) != ROK)
1508 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
1510 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->extPlmn[0]) != ROK)
1516 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
1518 brdcstPlmnInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1521 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CELL_ID")) && (cur->ns == ns))
1523 brdcstPlmnInfo->nrCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1526 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_RANAC")) && (cur->ns == ns))
1528 brdcstPlmnInfo->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1536 /*******************************************************************
1538 * @brief Fill DU Cell Information
1542 * Function : parseF1DuCellInfo
1544 * Functionality: Fill DU Cell Information
1546 * @params[in] XML document pointer
1548 * Current node in XML
1549 * Pointer to structure to be filled
1550 * @return ROK - success
1553 * ****************************************************************/
1554 uint8_t parseF1DuCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuCellInfo *duCellInfo)
1556 memset(duCellInfo, 0, sizeof(F1DuCellInfo));
1557 cur = cur->xmlChildrenNode;
1560 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_INFO")) && (cur->ns == ns))
1562 if(parseF1CellInfo(doc, ns, cur, &duCellInfo->cellInfo) != ROK)
1568 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
1570 duCellInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1573 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EPS_TAC")) && (cur->ns == ns))
1575 duCellInfo->epsTac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1578 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE_INFO")) && (cur->ns == ns))
1580 if(parseNrModeInfo(doc, ns, cur, &duCellInfo->f1Mode) != ROK)
1586 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_CFG")) && (cur->ns == ns))
1588 duCellInfo->measTimeCfgDuration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1591 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_DIR")) && (cur->ns == ns))
1593 duCellInfo->cellDir = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1596 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_TYPE")) && (cur->ns == ns))
1598 duCellInfo->cellType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1601 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_BRDCST_PLMN_INFO")) && (cur->ns == ns))
1603 if(parseF1BrdcstPlmnInfo(doc, ns, cur, &duCellInfo->brdcstPlmnInfo[0]) != ROK)
1614 /*******************************************************************
1616 * @brief Fill DU served cell information
1620 * Function : parseF1DuServedCellInfo
1622 * Functionality: Fill DU served cell information
1624 * @params[in] XML document pointer
1626 * Current node in XML
1627 * Pointer to structure to be filled
1628 * @return ROK - success
1631 * ****************************************************************/
1632 uint8_t parseF1DuServedCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuSrvdCellInfo *srvdCellInfo)
1634 memset(srvdCellInfo, 0, sizeof(F1DuSrvdCellInfo));
1635 cur = cur->xmlChildrenNode;
1638 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_CELL_INFO")) && (cur->ns == ns))
1640 if(parseF1DuCellInfo(doc, ns, cur, &srvdCellInfo->duCellInfo) != ROK)
1648 if(fillDuSrvdCellSysInfo(&srvdCellInfo->duSysInfo) != ROK)
1655 /*******************************************************************
1657 * @brief Fill DU Served Cell System Information
1661 * Function : fillDuSrvdCellSysInfo
1663 * Functionality: Fill DU Served Cell System Information
1665 * @params[in] Served Cell System Information
1666 * @return ROK - success
1669 * ****************************************************************/
1670 uint8_t fillDuSrvdCellSysInfo(F1DuSysInfo *sysInfo)
1672 /* GNB DU System Info MIB msg */
1674 DU_ALLOC(sysInfo->mibMsg, encBufSize);
1675 if(!(sysInfo->mibMsg))
1677 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
1680 memcpy(sysInfo->mibMsg, encBuf, encBufSize);
1681 sysInfo->mibLen = encBufSize;
1683 /* GNB DU System Info SIB1 msg */
1685 DU_ALLOC(sysInfo->sib1Msg, encBufSize);
1686 if(!(sysInfo->sib1Msg))
1688 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
1691 memcpy(sysInfo->sib1Msg, encBuf,encBufSize);
1692 sysInfo->sib1Len = encBufSize;
1698 /*******************************************************************
1700 * @brief Fill PLMN received from O1 interface
1704 * Function : fillPlmnFromO1
1706 * Functionality: Fill PLMN received from O1 interface
1708 * @params[in] XML document pointer
1710 * Current node in XML
1711 * Pointer to structure to be filled
1712 * @return ROK - success
1715 * ****************************************************************/
1716 void fillPlmnFromO1(Plmn *PLMN, uint8_t srvdPlmnIdx)
1718 PLMN->mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
1719 PLMN->mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
1720 PLMN->mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
1721 PLMN->mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
1722 PLMN->mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
1723 PLMN->mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
1728 /*******************************************************************
1730 * @brief Fill Beamforming Configuration
1734 * Function : parseBeamformingConfig
1736 * Functionality: Fill Beamforming Configuration
1738 * @params[in] XML document pointer
1740 * Current node in XML
1741 * Pointer to structure to be filled
1742 * @return ROK - success
1745 * ****************************************************************/
1746 uint8_t parseBeamformingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BeamformingConf *beamformingCfg)
1748 memset(beamformingCfg, 0, sizeof(BeamformingConf));
1749 cur = cur -> xmlChildrenNode;
1752 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_BEAMS")) && (cur->ns == ns))
1754 beamformingCfg->numOfBeams = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1757 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_RUS")) && (cur->ns == ns))
1759 beamformingCfg->numTxRUs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1762 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_IDX")) && (cur->ns == ns))
1764 beamformingCfg->beamIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1767 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TYPE")) && (cur->ns == ns))
1769 beamformingCfg->beamType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1772 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_AZIMUTH")) && (cur->ns == ns))
1774 beamformingCfg->beamAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1777 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TILT")) && (cur->ns == ns))
1779 beamformingCfg->beamTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1782 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_HORIZ_WIDTH")) && (cur->ns == ns))
1784 beamformingCfg->beamHorizWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1787 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_VERT_WIDTH")) && (cur->ns == ns))
1789 beamformingCfg->beamVertWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1792 if ((!xmlStrcmp(cur->name, (const xmlChar *)"COVER_SHAPE")) && (cur->ns == ns))
1794 beamformingCfg->coverageShape = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1797 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_TILT")) && (cur->ns == ns))
1799 beamformingCfg->digitalTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1802 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_AZIMUTH")) && (cur->ns == ns))
1804 beamformingCfg->digitalAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1812 /*******************************************************************
1814 * @brief Fill Precoding Configuration
1818 * Function : parsePrecodingConfig
1820 * Functionality: Fill Precoding Configuration
1822 * @params[in] XML document pointer
1824 * Current node in XML
1825 * Pointer to structure to be filled
1826 * @return ROK - success
1829 * ****************************************************************/
1830 uint8_t parsePrecodingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrecodingConf *precodCfg)
1832 memset(precodCfg, 0, sizeof(PrecodingConf));
1833 cur = cur -> xmlChildrenNode;
1836 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_LAYERS")) && (cur->ns == ns))
1838 precodCfg->numLayers = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1841 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ANT_PORTS")) && (cur->ns == ns))
1843 precodCfg->numAntPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1851 /*******************************************************************
1853 * @brief Fill PRACH FDM Information
1857 * Function : parsePrachFdmInfo
1859 * Functionality: Fill PRACH FDM Information
1861 * @params[in] XML document pointer
1863 * Current node in XML
1864 * Pointer to structure to be filled
1865 * @return ROK - success
1868 * ****************************************************************/
1869 uint8_t parsePrachFdmInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PrachFdmInfo *prachFdmInfo)
1871 memset(prachFdmInfo, 0, sizeof(PrachFdmInfo));
1872 cur = cur -> xmlChildrenNode;
1875 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
1877 prachFdmInfo->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1880 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ROOT_SEQ")) && (cur->ns == ns))
1882 prachFdmInfo->numRootSeq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1885 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K1")) && (cur->ns == ns))
1887 prachFdmInfo->k1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1890 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORR_ZONE_CFG")) && (cur->ns == ns))
1892 prachFdmInfo->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1900 /*******************************************************************
1902 * @brief Fill PRACH configuration
1906 * Function : parsePrachCfg
1908 * Functionality: Fill PRACH configuration
1910 * @params[in] XML document pointer
1912 * Current node in XML
1913 * Pointer to structure to be filled
1914 * @return ROK - success
1917 * ****************************************************************/
1918 uint8_t parsePrachCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrachCfg *prachCfg)
1922 uint8_t maxNumRbs = 0;
1923 uint8_t prachMaxPrb = 0;
1925 memset(prachCfg, 0, sizeof(PrachCfg));
1926 cur = cur -> xmlChildrenNode;
1929 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SEQ_LEN")) && (cur->ns == ns))
1931 prachCfg->prachSeqLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1934 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
1936 prachCfg->prachSubcSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1939 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
1941 prachCfg->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1944 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRACH_FDM")) && (cur->ns == ns))
1946 prachCfg->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1949 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FDM_LIST")) && (cur->ns == ns))
1951 child = cur->xmlChildrenNode;
1952 while(child != NULL)
1954 if ((!xmlStrcmp(child->name, (const xmlChar *)"FDM_INFO")) && (child->ns == ns))
1956 if(parsePrachFdmInfo(doc, ns, child, &prachCfg->fdm[fdmIdx]) != ROK)
1962 child = child -> next;
1966 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns == ns))
1968 prachCfg->prachRstSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1971 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PER_RACH")) && (cur->ns == ns))
1973 prachCfg->ssbPerRach = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1976 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
1978 prachCfg->totalNumRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1981 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
1983 prachCfg->numCbPreamblePerSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1986 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
1988 maxNumRbs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1991 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
1993 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1996 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
1998 prachCfg->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2001 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
2003 prachCfg->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2009 prachCfg->msg1FreqStart = maxNumRbs - prachMaxPrb;
2013 /*******************************************************************
2015 * @brief Fill CSI RS configuration
2019 * Function : parseCsiRsCfg
2021 * Functionality: Fill CSI RS configuration
2023 * @params[in] XML document pointer
2025 * Current node in XML
2026 * Pointer to structure to be filled
2027 * @return ROK - success
2030 * ****************************************************************/
2031 uint8_t parseCsiRsCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CsiRsCfg *csiRsCfg)
2033 memset(csiRsCfg, 0, sizeof(CsiRsCfg));
2034 cur = cur -> xmlChildrenNode;
2037 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_FREQ")) && (cur->ns == ns))
2039 csiRsCfg->csiFreqDomainAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2042 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_PORTS")) && (cur->ns == ns))
2044 csiRsCfg->csiNrofPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2047 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT")) && (cur->ns == ns))
2049 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2052 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT_2")) && (cur->ns == ns))
2054 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2057 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DM_TYPE")) && (cur->ns == ns))
2059 csiRsCfg->csirscdmType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2062 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY")) && (cur->ns == ns))
2064 csiRsCfg->csirsdensity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2067 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY_DOT_5")) && (cur->ns == ns))
2069 csiRsCfg->csirsdensitydot5 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2072 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET")) && (cur->ns == ns))
2074 csiRsCfg->powerControlOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2077 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET_SS")) && (cur->ns == ns))
2079 csiRsCfg->powerControlOffsetSS = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2082 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY_OFFSET")) && (cur->ns == ns))
2084 csiRsCfg->periodicityAndOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2092 /*******************************************************************
2094 * @brief Fill SSB Configuration
2098 * Function : parseSsbCfg
2100 * Functionality: Fill SSB Configuration
2102 * @params[in] XML document pointer
2104 * Current node in XML
2105 * Pointer to structure to be filled
2106 * @return ROK - success
2109 * ****************************************************************/
2110 uint8_t parseSsbCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SsbCfg *ssbCfg)
2113 uint8_t ssbMaskIdx = 0;
2115 memset(ssbCfg, 0, sizeof( SsbCfg));
2116 cur = cur -> xmlChildrenNode;
2120 ssbCfg->scsCmn = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
2121 ssbCfg->ssbPeriod = convertSSBPeriodicityToEnum(cellParams.ssbPeriodicity);
2122 ssbCfg->ssbScOffset = cellParams.ssbOffset;
2124 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_CMN")) && (cur->ns == ns))
2126 ssbCfg->scsCmn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2129 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIOD")) && (cur->ns == ns))
2131 ssbCfg->ssbPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2134 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFFSET")) && (cur->ns == ns))
2136 ssbCfg->ssbScOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2140 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_OFFSET_PT_A")) && (cur->ns == ns))
2142 ssbCfg->ssbOffsetPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2145 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBSC_PWR")) && (cur->ns == ns))
2147 ssbCfg->ssbPbchPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2150 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_MASK_LIST")) && (cur->ns == ns))
2152 child = cur -> xmlChildrenNode;
2153 while(child != NULL)
2155 if ((!xmlStrcmp(child->name, (const xmlChar *)"SSB_MASK")) && (child->ns == ns))
2157 ssbCfg->ssbMask[ssbMaskIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
2160 child = child -> next;
2164 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_ID")) && (cur->ns == ns))
2166 ssbCfg->beamId[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2169 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BETA_PSS")) && (cur->ns == ns))
2171 ssbCfg->betaPss = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2174 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCH_PAYLOAD_FLAG")) && (cur->ns == ns))
2176 ssbCfg->bchPayloadFlag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2179 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPE_A_POS")) && (cur->ns == ns))
2181 ssbCfg->dmrsTypeAPos = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2187 if(BuildMibPdu() != ROK)
2189 DU_LOG("\nERROR --> Failed to build MIB PDU");
2190 memset(&ssbCfg->mibPdu, 0, 3*sizeof(uint8_t));
2194 memcpy(&ssbCfg->mibPdu, encBuf, encBufSize);
2200 /*******************************************************************
2202 * @brief Fill Carrier Configuration
2206 * Function : parseCarrierCfg
2208 * Functionality: Fill Carrier Configuration
2210 * @params[in] XML document pointer
2212 * Current node in XML
2213 * Pointer to structure to be filled
2214 * @return ROK - success
2217 * ****************************************************************/
2218 uint8_t parseCarrierCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CarrierCfg *carrierCfg)
2220 memset(carrierCfg, 0, sizeof(CarrierCfg));
2221 cur = cur -> xmlChildrenNode;
2225 carrierCfg->dlBw = cellParams.bSChannelBwDL;
2226 carrierCfg->arfcnDL = cellParams.arfcnDL;
2227 carrierCfg->ulBw = cellParams.bSChannelBwUL;
2228 carrierCfg->arfcnUL = cellParams.arfcnUL;
2230 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_BW")) && (cur->ns == ns))
2232 carrierCfg->dlBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2235 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_DL_ARFCN")) && (cur->ns == ns))
2237 carrierCfg->arfcnDL = convertArfcnToFreqKhz(atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)));
2240 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_BW")) && (cur->ns == ns))
2242 carrierCfg->ulBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2245 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_UL_ARFCN")) && (cur->ns == ns))
2247 carrierCfg->arfcnUL = convertArfcnToFreqKhz(atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)));
2251 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_ANT")) && (cur->ns == ns))
2253 carrierCfg->numTxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2256 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RX_ANT")) && (cur->ns == ns))
2258 carrierCfg->numRxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2266 /*******************************************************************
2268 * @brief Fill PLMN Information List
2272 * Function : parsePlmnInfo
2274 * Functionality: Fill PLMN Information List
2276 * @params[in] XML document pointer
2278 * Current node in XML
2279 * Pointer to structure to be filled
2280 * @return ROK - success
2283 * ****************************************************************/
2284 uint8_t parsePlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PlmnInfoList *plmnInfoList)
2287 memset(plmnInfoList, 0, sizeof(PlmnInfoList));
2288 cur = cur -> xmlChildrenNode;
2291 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
2293 if(parsePlmn(doc, ns, cur,&plmnInfoList->plmn) != ROK)
2299 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
2301 if(parseSupportedSliceList(doc, ns, cur,&plmnInfoList -> suppSliceList) != ROK)
2312 /*******************************************************************
2314 * @brief Fill PUCCH Configuration Common
2318 * Function : parsePucchConfigCommon
2320 * Functionality: Fill PUCCH Configuration Common
2322 * @params[in] XML document pointer
2324 * Current node in XML
2325 * Pointer to structure to be filled
2326 * @return ROK - success
2329 * ****************************************************************/
2330 uint8_t parsePucchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PucchConfigCommon *pucchCfgCmn)
2332 memset(pucchCfgCmn, 0, sizeof(PucchConfigCommon));
2333 cur = cur -> xmlChildrenNode;
2336 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
2338 pucchCfgCmn->pucchResourceCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2341 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_NEITHER_HOPPING")) && (cur->ns == ns))
2343 pucchCfgCmn->pucchGroupHopping = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2351 /*******************************************************************
2353 * @brief Fill PUSCH Common Time Allocation
2357 * Function : parsePuschTimeDomRsrcAlloc
2359 * Functionality: Fill PUSCH Common Time Allocation
2361 * @params[in] XML document pointer
2363 * Current node in XML
2364 * Pointer to structure to be filled
2365 * @return ROK - success
2368 * ****************************************************************/
2369 uint8_t parsePuschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschTimeDomRsrcAlloc *puschTimeDomRsrsAlloc)
2371 memset(puschTimeDomRsrsAlloc, 0, sizeof(PuschTimeDomRsrcAlloc));
2372 cur = cur -> xmlChildrenNode;
2375 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_K2_CFG")) && (cur->ns == ns))
2377 puschTimeDomRsrsAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2380 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MAPPING_TYPE")) && (cur->ns == ns))
2382 puschTimeDomRsrsAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2385 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
2387 puschTimeDomRsrsAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2390 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
2392 puschTimeDomRsrsAlloc->symbolLength= atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2398 puschTimeDomRsrsAlloc -> startSymbolAndLength = \
2399 calcSliv(puschTimeDomRsrsAlloc->startSymbol, puschTimeDomRsrsAlloc->symbolLength);
2403 /*******************************************************************
2405 * @brief Fill PUSCH Configuration Common
2409 * Function : parsePuschConfigCommon
2411 * Functionality: Fill PUSCH Configuration Common
2413 * @params[in] XML document pointer
2415 * Current node in XML
2416 * Pointer to structure to be filled
2417 * @return ROK - success
2420 * ****************************************************************/
2421 uint8_t parsePuschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschConfigCommon *puschCfgCmn)
2424 xmlNodePtr child = NULLP;
2426 memset(puschCfgCmn, 0, sizeof(PuschConfigCommon));
2427 cur = cur -> xmlChildrenNode;
2430 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
2432 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2435 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
2437 child = cur->xmlChildrenNode;
2438 while(child != NULL)
2440 if ((!xmlStrcmp(child->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC")) && (child->ns == ns))
2442 if(parsePuschTimeDomRsrcAlloc(doc, ns, child, &puschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
2448 child = child -> next;
2456 /*******************************************************************
2458 * @brief Fill BWP Configuration
2462 * Function : parseBwp
2464 * Functionality: Fill BWP Configuration
2466 * @params[in] XML document pointer
2468 * Current node in XML
2469 * Pointer to structure to be filled
2470 * @return ROK - success
2473 * ****************************************************************/
2474 uint8_t parseBwp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpParams *bwp)
2476 memset(bwp, 0, sizeof(BwpParams));
2477 cur = cur -> xmlChildrenNode;
2480 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PRB")) && (cur->ns == ns))
2482 bwp->firstPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2485 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRB")) && (cur->ns == ns))
2487 bwp->numPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2490 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
2492 bwp->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2495 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NORMAL_CYCLIC_PREFIX")) && (cur->ns == ns))
2497 bwp->cyclicPrefix = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2505 /*******************************************************************
2507 * @brief Fill UL BWP Configuration
2511 * Function : parseBwpULConfig
2513 * Functionality: Fill UL BWP Configuration
2515 * @params[in] XML document pointer
2517 * Current node in XML
2518 * Pointer to structure to be filled
2519 * @return ROK - success
2522 * ****************************************************************/
2523 uint8_t parseBwpULConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpUlConfig *bwpUlCfg)
2525 memset(bwpUlCfg, 0, sizeof(BwpUlConfig));
2526 cur = cur -> xmlChildrenNode;
2529 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
2531 if(parseBwp(doc, ns, cur, &bwpUlCfg->bwp) != ROK)
2537 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
2539 if(parsePucchConfigCommon(doc, ns, cur, &bwpUlCfg->pucchCommon) != ROK)
2545 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
2547 if(parsePuschConfigCommon(doc, ns, cur, &bwpUlCfg->puschCommon) != ROK)
2557 /*******************************************************************
2559 * @brief Fill Page Configuration
2563 * Function : parsePageCfg
2565 * Functionality: Fill Page Configuration
2567 * @params[in] XML document pointer
2569 * Current node in XML
2570 * Pointer to structure to be filled
2571 * @return ROK - success
2574 * ****************************************************************/
2575 uint8_t parsePageCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SchPageCfg *pageCfg)
2579 memset(pageCfg, 0, sizeof(SchPageCfg));
2580 cur = cur -> xmlChildrenNode;
2583 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PO")) && (cur->ns == ns))
2585 pageCfg->numPO = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2588 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PO_PRESENT")) && (cur->ns == ns))
2590 poPresent = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
2591 if(!strcmp(poPresent, "TRUE"))
2593 pageCfg->poPresent = true;
2597 pageCfg->poPresent = false;
2601 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGING_OCC")) && (cur->ns == ns))
2603 pageCfg->pagingOcc[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2611 /*******************************************************************
2613 * @brief Fill SIB1 PDCCH Configuration
2617 * Function : parsePdcchCfgSib1
2619 * Functionality: Fill SIB1 PDCCH Configuration
2621 * @params[in] XML document pointer
2623 * Current node in XML
2624 * Pointer to structure to be filled
2625 * @return ROK - success
2628 * ****************************************************************/
2629 uint8_t parsePdcchCfgSib1(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigSib1 *pdcchConfigSib1)
2631 memset(pdcchConfigSib1, 0, sizeof(PdcchConfigSib1));
2632 cur = cur -> xmlChildrenNode;
2635 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_ZERO_INDEX")) && (cur->ns == ns))
2637 pdcchConfigSib1->coresetZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2640 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_ZERO_INDEX")) && (cur->ns == ns))
2642 pdcchConfigSib1->searchSpaceZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2650 /*******************************************************************
2652 * @brief Fill SIB1 Cell Configuration
2656 * Function : parseSib1CellCfg
2658 * Functionality: Fill SIB1 Cell Configuration
2660 * @params[in] XML document pointer
2662 * Current node in XML
2663 * Pointer to structure to be filled
2664 * @return ROK - success
2667 * ****************************************************************/
2668 uint8_t parseSib1CellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Sib1CellCfg *sib1CellCfg)
2670 memset(sib1CellCfg, 0, sizeof( Sib1CellCfg));
2671 cur = cur -> xmlChildrenNode;
2674 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_PAGE_CFG")) && (cur->ns == ns))
2676 if(parsePageCfg(doc, ns, cur, &sib1CellCfg->pagingCfg) != ROK)
2682 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CONFIG_SIB1")) && (cur->ns == ns))
2684 if(parsePdcchCfgSib1(doc, ns, cur, &sib1CellCfg->pdcchCfgSib1) != ROK)
2693 sib1CellCfg->sib1PduLen = duCfgParam.srvdCellLst[0].duSysInfo.sib1Len;
2694 if(sib1CellCfg->sib1PduLen > 0)
2696 DU_ALLOC_SHRABL_BUF(sib1CellCfg->sib1Pdu, sib1CellCfg->sib1PduLen);
2697 if(!sib1CellCfg->sib1Pdu)
2699 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
2702 memcpy(sib1CellCfg->sib1Pdu, duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg, sib1CellCfg->sib1PduLen);
2707 /*******************************************************************
2709 * @brief Fill Aggregation Level Candidates Information
2713 * Function : parseCandidateInfo
2715 * Functionality: Fill Aggregation Level Candidates Information
2717 * @params[in] XML document pointer
2719 * Current node in XML
2720 * Pointer to structure to be filled
2721 * @return ROK - success
2724 * ****************************************************************/
2725 uint8_t parseCandidateInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CandidatesInfo *candInfo)
2727 memset(candInfo, 0, sizeof(CandidatesInfo));
2728 cur = cur -> xmlChildrenNode;
2731 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL1")) && (cur->ns == ns))
2733 candInfo->aggLevel1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2736 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL2")) && (cur->ns == ns))
2738 candInfo->aggLevel2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2741 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL4")) && (cur->ns == ns))
2743 candInfo->aggLevel4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2746 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL8")) && (cur->ns == ns))
2748 candInfo->aggLevel8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2751 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL16")) && (cur->ns == ns))
2753 candInfo->aggLevel16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2761 /*******************************************************************
2763 * @brief Fill Search Space Connfiguration
2767 * Function : parseSearchSpaceCfg
2769 * Functionality: Fill Search Space Configuration
2771 * @params[in] XML document pointer
2773 * Current node in XML
2774 * Pointer to structure to be filled
2775 * @return ROK - success
2778 * ****************************************************************/
2779 uint8_t parseSearchSpaceCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SearchSpaceCfg *searchSpaceCfg)
2781 memset(searchSpaceCfg, 0, sizeof(SearchSpaceCfg));
2782 cur = cur -> xmlChildrenNode;
2785 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_1_INDEX")) && (cur->ns == ns))
2787 searchSpaceCfg->searchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2790 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
2792 searchSpaceCfg->coresetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2795 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SLOT_SL1")) && (cur->ns == ns))
2797 searchSpaceCfg->monitoringSlot = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2800 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DURATION")) && (cur->ns == ns))
2802 searchSpaceCfg->duration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2805 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SYMBOL")) && (cur->ns == ns))
2807 searchSpaceCfg->monitoringSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2810 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CANDIDATE_INFO")) && (cur->ns == ns))
2812 if(parseCandidateInfo(doc, ns, cur, &searchSpaceCfg->candidate) != ROK)
2823 /*******************************************************************
2825 * @brief Fill PDCCH Configuration Common
2829 * Function : parsePdcchCfgCommon
2831 * Functionality: Fill PDCCH Configuration Common
2833 * @params[in] XML document pointer
2835 * Current node in XML
2836 * Pointer to structure to be filled
2837 * @return ROK - success
2840 * ****************************************************************/
2841 uint8_t parsePdcchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigCommon *pdcchCfgCm)
2843 memset(pdcchCfgCm, 0, sizeof(PdcchConfigCommon));
2844 cur = cur -> xmlChildrenNode;
2847 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_CFG")) && (cur->ns == ns))
2849 if(parseSearchSpaceCfg(doc, ns, cur, &pdcchCfgCm->commonSearchSpace) != ROK)
2855 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_SEARCH_SPACE_INDEX")) && (cur->ns == ns))
2857 pdcchCfgCm->raSearchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2866 /*******************************************************************
2868 * @brief Fill PDSCH Common Time Domain Resource Allocation
2872 * Function : parsePdschCmnTimeDomRsrcAlloc
2874 * Functionality: Fill PDSCH Common Time Domain Resource Allocation
2876 * @params[in] XML document pointer
2878 * Current node in XML
2879 * Pointer to structure to be filled
2880 * @return ROK - success
2883 * ****************************************************************/
2884 uint8_t parsePdschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,\
2885 PdschCfgCommTimeDomRsrcAlloc *pdschTimeDomRsrcAlloc)
2887 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschCfgCommTimeDomRsrcAlloc));
2888 cur = cur -> xmlChildrenNode;
2891 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_K0_CFG")) && (cur->ns == ns))
2893 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2895 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_MAPPING_TYPE")) && (cur->ns == ns))
2897 pdschTimeDomRsrcAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2899 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
2901 pdschTimeDomRsrcAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2903 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
2905 pdschTimeDomRsrcAlloc->lengthSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2913 /*******************************************************************
2915 * @brief Fill PDSCH Configuration Common
2919 * Function : parsePdschConfigCommon
2921 * Functionality: Fill PDSCH Configuration Common
2923 * @params[in] XML document pointer
2925 * Current node in XML
2926 * Pointer to structure to be filled
2927 * @return ROK - success
2930 * ****************************************************************/
2931 uint8_t parsePdschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdschConfigCommon *pdschCfgCmn)
2934 xmlNodePtr child = NULLP;
2935 xmlNodePtr pdschNode = NULLP;
2937 memset(pdschCfgCmn, 0, sizeof(PdschConfigCommon));
2938 cur = cur -> xmlChildrenNode;
2941 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
2943 pdschCfgCmn->numTimeDomAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2946 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
2948 child = cur->xmlChildrenNode;
2949 while(child != NULL)
2951 if ((!xmlStrcmp(child->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC")) && (child->ns == ns))
2953 if(parsePdschCmnTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
2959 child = child -> next;
2967 /*******************************************************************
2969 * @brief Fill DL BWP Configuration
2973 * Function : parseBwpDLConfig
2975 * Functionality: Fill DL BWP Configuration
2977 * @params[in] XML document pointer
2979 * Current node in XML
2980 * Pointer to structure to be filled
2981 * @return ROK - success
2984 * ****************************************************************/
2985 uint8_t parseBwpDLConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpDlConfig *bwpDlCfg)
2987 memset(bwpDlCfg, 0, sizeof(BwpDlConfig));
2988 cur = cur -> xmlChildrenNode;
2991 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
2993 if(parseBwp(doc, ns, cur, &bwpDlCfg->bwp) != ROK)
2999 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
3001 if(parsePdcchCfgCommon(doc, ns, cur, &bwpDlCfg->pdcchCommon) != ROK)
3007 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
3009 if(parsePdschConfigCommon(doc, ns, cur, &bwpDlCfg->pdschCommon) != ROK)
3020 /*******************************************************************
3022 * @brief Fill Cell Configuration
3026 * Function : parseCellCfg
3028 * Functionality: Fill Cell Configuration
3030 * @params[in] XML document pointer
3032 * Current node in XML
3033 * Pointer to structure to be filled
3034 * @return ROK - success
3037 * ****************************************************************/
3038 uint8_t parseCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CellCfg *cellCfg)
3040 memset(cellCfg, 0, sizeof(CellCfg));
3041 cur = cur -> xmlChildrenNode;
3045 cellCfg->opState = cellParams.operationalState;
3046 cellCfg->adminState = cellParams.administrativeState;
3047 cellCfg->cellState = cellParams.cellState;
3048 cellCfg->phyCellId = cellParams.nRPCI;
3049 cellCfg->tac = cellParams.nRTAC;
3050 cellCfg->ssbFreq = cellParams.ssbFrequency;
3052 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_OP_STATE")) && (cur->ns == ns))
3054 cellCfg->opState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3057 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_ADMIN_STATE")) && (cur->ns == ns))
3059 cellCfg->adminState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3062 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_STATE")) && (cur->ns == ns))
3064 cellCfg->cellState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3067 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
3069 cellCfg->phyCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3072 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
3074 cellCfg->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3077 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_FREQUENCY")) && (cur->ns == ns))
3079 cellCfg->ssbFreq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3083 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN_INFO")) && (cur->ns == ns))
3085 if(parsePlmnInfo(doc, ns, cur, &cellCfg->plmnInfoList[0]) != ROK)
3091 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3093 cellCfg->subCarrSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3096 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DUPLEX_MODE")) && (cur->ns == ns))
3098 cellCfg->dupType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3101 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_CELL_CFG")) && (cur->ns == ns))
3103 if(parseSib1CellCfg(doc, ns, cur, &cellCfg->sib1Cfg) != ROK)
3109 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_DL_CFG")) && (cur->ns == ns))
3111 if(parseBwpDLConfig(doc, ns, cur, &cellCfg->initialDlBwp) != ROK)
3117 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_UL_CFG")) && (cur->ns == ns))
3119 if(parseBwpULConfig(doc, ns, cur, &cellCfg->initialUlBwp) != ROK)
3130 /*******************************************************************
3132 * @brief Fill TDD slot configuration
3136 * Function : parseTddCfg
3138 * Functionality: Fill TDD slot configuration
3140 * @params[in] XML document pointer
3142 * Current node in XML
3143 * Pointer to structure to be filled
3144 * @return ROK - success
3147 * ****************************************************************/
3148 uint8_t parseTddCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TDDCfg *tddCfg)
3150 memset(tddCfg, 0, sizeof(TDDCfg));
3151 cur = cur -> xmlChildrenNode;
3154 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_PERIODICITY")) && (cur->ns == ns))
3156 tddCfg->tddPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3159 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
3161 tddCfg->nrOfDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3164 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
3166 tddCfg->nrOfDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3169 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
3171 tddCfg->nrOfUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3174 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
3176 tddCfg->nrOfUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3185 /*******************************************************************
3187 * @brief Fill MAC Cell Configuration
3191 * Function : parseMacCellCfg
3193 * Functionality: Fill MAC Cell Configuration
3195 * @params[in] XML document pointer
3197 * Current node in XML
3198 * Pointer to structure to be filled
3199 * @return ROK - success
3202 * ****************************************************************/
3203 uint8_t parseMacCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacCellCfg *macCellCfg)
3205 memset(macCellCfg, 0, sizeof(MacCellCfg));
3206 cur = cur -> xmlChildrenNode;
3210 macCellCfg->cellId = cellParams.cellLocalId;
3212 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
3214 macCellCfg->cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3218 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CARRIER_CFG")) && (cur->ns == ns))
3220 if(parseCarrierCfg(doc, ns, cur, &macCellCfg->carrCfg) != ROK)
3226 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_CFG")) && (cur->ns == ns))
3228 if(parseCellCfg(doc, ns, cur, &macCellCfg->cellCfg) != ROK)
3234 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_CFG")) && (cur->ns == ns))
3236 if(parseSsbCfg(doc, ns, cur, &macCellCfg->ssbCfg) != ROK)
3242 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_CFG")) && (cur->ns == ns))
3244 if(parseCsiRsCfg(doc, ns, cur, &macCellCfg->csiRsCfg) != ROK)
3250 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CFG")) && (cur->ns == ns))
3252 if(parsePrachCfg(doc, ns, cur, &macCellCfg->prachCfg) != ROK)
3259 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_CFG")) && (cur->ns == ns))
3261 if(parseTddCfg(doc, ns, cur, &macCellCfg->tddCfg) != ROK)
3268 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRE_CODE_CFG")) && (cur->ns == ns))
3270 if(parsePrecodingConfig(doc, ns, cur, &macCellCfg->precodingConf) != ROK)
3276 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_FORM_CFG")) && (cur->ns == ns))
3278 if(parseBeamformingConfig(doc, ns, cur, &macCellCfg->beamCfg) != ROK)
3289 /*******************************************************************
3291 * @brief Fill PUSCH Configuration Common Time Domain
3292 * Resource Allocation
3296 * Function : parsePuschCmnTimeDomRsrcAlloc
3298 * Functionality: Fill PUSCH Configuration Common Time Domain
3299 * Resource Allocation
3301 * @params[in] XML document pointer
3303 * Current node in XML
3304 * Pointer to structure to be filled
3305 * @return ROK - success
3308 * ****************************************************************/
3309 uint8_t parsePuschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCmnTimeDomAlloc *puschCmnTimeDomAlloc)
3311 uint16_t startSymbol;
3314 memset(puschCmnTimeDomAlloc, 0, sizeof(PuschCfgCmnTimeDomAlloc));
3315 cur = cur -> xmlChildrenNode;
3318 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K2")) && (cur->ns == ns))
3320 puschCmnTimeDomAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3322 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
3324 puschCmnTimeDomAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3326 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
3328 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3330 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3332 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3336 puschCmnTimeDomAlloc->sliv = calcSliv(startSymbol, lenSymbol);
3340 /*******************************************************************
3342 * @brief Fill PUSCH Configuration Common
3346 * Function : parsePuschCfgCommon
3348 * Functionality: Fill PUSCH Configuration Common
3350 * @params[in] XML document pointer
3352 * Current node in XML
3353 * Pointer to structure to be filled
3354 * @return ROK - success
3357 * ****************************************************************/
3358 uint8_t parsePuschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCommon *puschCfgCmn)
3360 uint8_t rsrcIdx = 0;
3361 xmlNodePtr child = NULLP;
3362 xmlNodePtr rsrcNode = NULLP;
3364 memset(puschCfgCmn, 0, sizeof(PuschCfgCommon));
3365 cur = cur -> xmlChildrenNode;
3368 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_PRESENT")) && (cur->ns == ns))
3370 puschCfgCmn->puschCfgPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3373 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MSG3_DELTA_PREAMBLE")) && (cur->ns == ns))
3375 puschCfgCmn->msg3DeltaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3378 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_P0_NOMINAL_WITH_GRANT")) && (cur->ns == ns))
3380 puschCfgCmn->p0NominalWithGrant = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3383 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
3385 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3388 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
3390 child = cur->xmlChildrenNode;
3391 while (child != NULL)
3393 if ((!xmlStrcmp(child->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC")) && (child->ns == ns))
3395 if(parsePuschCmnTimeDomRsrcAlloc(doc, ns, child, &puschCfgCmn->timeDomAllocList[rsrcIdx]) != ROK)
3401 child = child->next;
3409 /*******************************************************************
3411 * @brief Fill PUCCH Configuration Common
3415 * Function : parsePucchCfgCommon
3417 * Functionality: Fill PUCCH Configuration Common
3419 * @params[in] XML document pointer
3421 * Current node in XML
3422 * Pointer to structure to be filled
3423 * @return ROK - success
3426 * ****************************************************************/
3427 uint8_t parsePucchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PucchCfgCommon *pucchCfgCmn)
3429 memset(pucchCfgCmn, 0, sizeof(PucchCfgCommon));
3430 cur = cur -> xmlChildrenNode;
3433 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3435 pucchCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3438 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
3440 pucchCfgCmn->rsrcComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3443 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GRP_HOP")) && (cur->ns == ns))
3445 pucchCfgCmn->grpHop = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3448 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_P0_NOMINAL")) && (cur->ns == ns))
3450 pucchCfgCmn->p0Nominal = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3458 /*******************************************************************
3460 * @brief Fill RACH Configuration Common
3464 * Function : parseRachCfgCommon
3466 * Functionality: Fill RACH Configuration Common
3468 * @params[in] XML document pointer
3470 * Current node in XML
3471 * Pointer to structure to be filled
3472 * @return ROK - success
3475 * ****************************************************************/
3476 uint8_t parseRachCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RachCfgCommon *rachCfgCmn)
3481 memset(rachCfgCmn, 0, sizeof(RachCfgCommon));
3482 cur = cur -> xmlChildrenNode;
3485 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3487 rachCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3490 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
3492 rachCfgCmn->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3495 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MSG_1_FDM")) && (cur->ns == ns))
3497 rachCfgCmn->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3500 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
3502 maxNumRb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3504 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
3506 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3509 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORRELATION_ZONE_CFG")) && (cur->ns == ns))
3511 rachCfgCmn->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3514 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_PREAMBLE_RCVD_TGT_PWR")) && (cur->ns == ns))
3516 rachCfgCmn->preambleRcvdTgtPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3519 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PREAMBLE_TRANS_MAX")) && (cur->ns == ns))
3521 rachCfgCmn->preambleTransMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3524 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PWR_RAMPING_STEP")) && (cur->ns == ns))
3526 rachCfgCmn->pwrRampingStep = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3529 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
3531 rachCfgCmn->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3534 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
3536 rachCfgCmn->numRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3539 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SSB_PER_RACH_OCC")) && (cur->ns == ns))
3541 rachCfgCmn->numSsbPerRachOcc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3544 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
3546 rachCfgCmn->numCbPreamblePerSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3549 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONT_RES_TIMER")) && (cur->ns == ns))
3551 rachCfgCmn->contResTimer = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3554 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
3556 rachCfgCmn->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3559 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX_PRESENT")) && (cur->ns == ns))
3561 rachCfgCmn->rootSeqIdxPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3564 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
3566 rachCfgCmn->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3569 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SUBCARRIER_SPACING")) && (cur->ns == ns))
3571 rachCfgCmn->msg1Scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3574 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns== ns))
3576 rachCfgCmn->restrictedSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3582 rachCfgCmn->msg1FreqStart = ((maxNumRb) - (prachMaxPrb));
3586 /*******************************************************************
3588 * @brief Fill SCS Specific Carrier
3592 * Function : parseScsSpecCarrier
3594 * Functionality: Fill SCS Specific Carrier
3596 * @params[in] XML document pointer
3598 * Current node in XML
3599 * Pointer to structure to be filled
3600 * @return ROK - success
3603 * ****************************************************************/
3604 uint8_t parseScsSpecCarrier(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ScsSpecCarrier *scsSpecCrr)
3606 memset(scsSpecCrr, 0, sizeof(ScsSpecCarrier));
3609 scsSpecCrr->scsOffset = cellParams.ssbOffset;
3610 scsSpecCrr->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
3611 scsSpecCrr->scsBw = cellParams.bSChannelBwUL;
3613 cur = cur -> xmlChildrenNode;
3616 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SUBCARRIER_OFFSET")) && (cur->ns == ns))
3618 scsSpecCrr->scsOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3621 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3623 scsSpecCrr->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3626 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_BW")) && (cur->ns == ns))
3628 scsSpecCrr->scsBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3636 /*******************************************************************
3638 * @brief Fill UL Config Common
3642 * Function : parseUlCfgCommon
3644 * Functionality: Fill UL Config Common
3646 * @params[in] XML document pointer
3648 * Current node in XML
3649 * Pointer to structure to be filled
3650 * @return ROK - success
3653 * ****************************************************************/
3654 uint8_t parseUlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,UlCfgCommon *ulCfgCmn)
3656 memset(ulCfgCmn, 0, sizeof(UlCfgCommon));
3657 cur = cur -> xmlChildrenNode;
3660 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
3662 ulCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3665 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_P_MAX")) && (cur->ns == ns))
3667 ulCfgCmn->pMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3670 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
3672 ulCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3675 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_ALLIGN_TIMER_COMM")) && (cur->ns == ns))
3677 ulCfgCmn->timeAlignTimerComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3680 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
3682 if(parseScsSpecCarrier(doc, ns, cur, &ulCfgCmn->ulScsCarrier) != ROK)
3688 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RACH_CFG_COMMON")) && (cur->ns == ns))
3690 if(parseRachCfgCommon(doc, ns, cur, &ulCfgCmn->rachCfg) != ROK)
3696 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
3698 if(parsePuschCfgCommon(doc, ns, cur, &ulCfgCmn->puschCfg) != ROK)
3704 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
3706 if(parsePucchCfgCommon(doc, ns, cur, &ulCfgCmn->pucchCfg) != ROK)
3717 /*******************************************************************
3719 * @brief Fill TDD UL DL Configuration Common
3723 * Function : parseTddUlDlCfgCommon
3725 * Functionality: Fill TDD UL DL Configuration Common
3727 * @params[in] XML document pointer
3729 * Current node in XML
3730 * Pointer to structure to be filled
3731 * @return ROK - success
3734 * ****************************************************************/
3735 uint8_t parseTddUlDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TddUlDlCfgCommon *tddUlDlCfgCmn)
3737 memset(tddUlDlCfgCmn, 0, sizeof(TddUlDlCfgCommon));
3738 cur = cur -> xmlChildrenNode;
3741 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REF_SCS")) && (cur->ns == ns))
3743 tddUlDlCfgCmn->refScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3746 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TX_PRD")) && (cur->ns == ns))
3748 tddUlDlCfgCmn->txPrd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3751 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
3753 tddUlDlCfgCmn->numDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3756 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
3758 tddUlDlCfgCmn->numDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3761 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
3763 tddUlDlCfgCmn->numUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3766 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
3768 tddUlDlCfgCmn->numUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3776 /*******************************************************************
3778 * @brief Fill PCCH Configuration
3782 * Function : parsePcchCfg
3784 * Functionality: Fill PCCH Configuration
3786 * @params[in] XML document pointer
3788 * Current node in XML
3789 * Pointer to structure to be filled
3790 * @return ROK - success
3793 * ****************************************************************/
3794 uint8_t parsePcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PcchCfg *pcchCfg)
3796 xmlNodePtr child = NULLP;
3799 memset(pcchCfg, 0, sizeof(PcchCfg));
3800 cur = cur -> xmlChildrenNode;
3803 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEFAULT_PAGING_CYCLE")) && (cur->ns == ns))
3805 pcchCfg->dfltPagingCycle = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3808 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAND_PAGING_FRAME_OFFSET")) && (cur->ns == ns))
3810 pcchCfg->nAndPagingFrmOffsetType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3813 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGE_FRAME_OFFSET")) && (cur->ns == ns))
3815 pcchCfg->pageFrameOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3818 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NS")) && (cur->ns == ns))
3820 pcchCfg->ns = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3823 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_TYPE")) && (cur->ns == ns))
3825 pcchCfg->firstPDCCHMontioringType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3828 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_LIST")) && (cur->ns == ns))
3830 child = cur->xmlChildrenNode;
3831 while (child != NULL)
3833 if ((!xmlStrcmp(child->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_INFO")) && (child->ns == ns))
3835 pcchCfg->firstPDCCHMontioringInfo[idx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
3838 child = child->next;
3846 /*******************************************************************
3848 * @brief Fill PDSCH Time Domain Resource Allocation
3852 * Function : parsePdschTimeDomRsrcAlloc
3854 * Functionality: Fill PDSCH Time Domain Resource Allocation
3856 * @params[in] XML document pointer
3858 * Current node in XML
3859 * Pointer to structure to be filled
3860 * @return ROK - success
3863 * ****************************************************************/
3864 uint8_t parsePdschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc)
3866 uint16_t startSymbol;
3869 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschTimeDomainRsrcAlloc));
3870 cur = cur -> xmlChildrenNode;
3873 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K0")) && (cur->ns == ns))
3875 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3878 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
3880 pdschTimeDomRsrcAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3883 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
3885 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3888 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3890 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3895 pdschTimeDomRsrcAlloc->sliv = calcSliv(startSymbol, lenSymbol);
3899 /*******************************************************************
3901 * @brief Fill PDSCH Configuration Common
3905 * Function : parsePdschCfgCommon
3907 * Functionality: Fill PDSCH Configuration Common
3909 * @params[in] XML document pointer
3911 * Current node in XML
3912 * Pointer to structure to be filled
3913 * @return ROK - success
3916 * ****************************************************************/
3917 uint8_t parsePdschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschCfgCommon *pdschCfgCmn)
3920 xmlNodePtr child = NULLP;
3922 memset(pdschCfgCmn, 0, sizeof(PdschCfgCommon));
3923 cur = cur -> xmlChildrenNode;
3926 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3928 pdschCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3931 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRS_ALLOC")) && (cur->ns == ns))
3933 pdschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3936 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
3938 child = cur->xmlChildrenNode;
3939 while (child != NULL)
3941 if ((!xmlStrcmp(child->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC")) && (child->ns == ns))
3943 if(parsePdschTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomAlloc[idx]) != ROK)
3949 child = child->next;
3957 /*******************************************************************
3959 * @brief Fill BCCH Configuration
3963 * Function : parseBcchCfg
3965 * Functionality: Fill BCCH Configuration
3967 * @params[in] XML document pointer
3969 * Current node in XML
3970 * Pointer to structure to be filled
3971 * @return ROK - success
3974 * ****************************************************************/
3975 uint8_t parseBcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BcchCfg *bcchCfg)
3977 memset(bcchCfg, 0, sizeof(BcchCfg));
3978 cur = cur -> xmlChildrenNode;
3981 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MOB_PRD_COEFF")) && (cur->ns == ns))
3983 bcchCfg->modPrdCoeff = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3990 /*******************************************************************
3992 * @brief Fill PDCCH Configuration Common
3996 * Function : parsePdcchConfigCommon
3998 * Functionality: Fill PDCCH Configuration Common
4000 * @params[in] XML document pointer
4002 * Current node in XML
4003 * Pointer to structure to be filled
4004 * @return ROK - success
4007 * ****************************************************************/
4008 uint8_t parsePdcchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdcchCfgCommon *pdccgCfgCmn)
4011 xmlNodePtr child = NULLP;
4013 memset(pdccgCfgCmn, 0, sizeof( PdcchCfgCommon));
4014 cur = cur -> xmlChildrenNode;
4017 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
4019 pdccgCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4022 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
4024 pdccgCfgCmn->ctrlRsrcSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4027 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
4029 pdccgCfgCmn->searchSpcZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4032 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID")) && (cur->ns == ns))
4034 pdccgCfgCmn->searchSpcId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4037 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CTRL_RSRC_SET_ID")) && (cur->ns == ns))
4039 pdccgCfgCmn->ctrlRsrcSetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4042 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_SLOT_PERIOD_OFFSET_PRESENT")) && (cur->ns == ns))
4044 pdccgCfgCmn->monitorSlotPrdAndOffPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4047 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_LIST")) && (cur->ns == ns))
4049 child = cur->xmlChildrenNode;
4052 if ((!xmlStrcmp(child->name, (const xmlChar *)"MONITOR_SYMBOL_IN_SLOT")) && (child->ns == ns))
4054 pdccgCfgCmn->monitorSymbolsInSlot[idx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
4057 child = child->next;
4061 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_1")) && (cur->ns == ns))
4063 pdccgCfgCmn->numCandAggLvl1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4066 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_2")) && (cur->ns == ns))
4068 pdccgCfgCmn->numCandAggLvl2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4071 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_4")) && (cur->ns == ns))
4073 pdccgCfgCmn->numCandAggLvl4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4076 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_8")) && (cur->ns == ns))
4078 pdccgCfgCmn->numCandAggLvl8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4081 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_16")) && (cur->ns == ns))
4083 pdccgCfgCmn->numCandAggLvl16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4086 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_TYPE")) && (cur->ns == ns))
4088 pdccgCfgCmn->searchSpcType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4091 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_DCI_FORMAT")) && (cur->ns == ns))
4093 pdccgCfgCmn->commSrchSpcDciFrmt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4096 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_SIB1")) && (cur->ns == ns))
4098 pdccgCfgCmn->searchSpcSib1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4101 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_PAGING")) && (cur->ns == ns))
4103 pdccgCfgCmn->pagingSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4106 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_RA")) && (cur->ns == ns))
4108 pdccgCfgCmn->raSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4116 /*******************************************************************
4118 * @brief Fill DL Configuration Common
4122 * Function : parseDlCfgCommon
4124 * Functionality: Fill DL Configuration Common
4126 * @params[in] XML document pointer
4128 * Current node in XML
4129 * Pointer to structure to be filled
4130 * @return ROK - success
4133 * ****************************************************************/
4134 uint8_t parseDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,DlCfgCommon *dlCfgCmn)
4136 memset(dlCfgCmn, 0, sizeof(DlCfgCommon));
4137 cur = cur -> xmlChildrenNode;
4140 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
4142 dlCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4145 if ((!xmlStrcmp(cur->name, (const xmlChar *)"OFFSET_TO_POINT_A")) && (cur->ns == ns))
4147 dlCfgCmn->offsetToPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4150 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
4152 dlCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4155 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
4157 if(parseScsSpecCarrier(doc, ns, cur, &dlCfgCmn->dlScsCarrier) != ROK)
4163 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
4165 if(parsePdcchConfigCommon(doc, ns, cur, &dlCfgCmn->pdcchCfg) != ROK)
4171 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
4173 if(parsePdschCfgCommon(doc, ns, cur, &dlCfgCmn->pdschCfg) != ROK)
4179 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCCH_CFG")) && (cur->ns == ns))
4181 if(parseBcchCfg(doc, ns, cur, &dlCfgCmn->bcchCfg) != ROK)
4187 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PCCH_CFG")) && (cur->ns == ns))
4189 if(parsePcchCfg(doc, ns, cur, &dlCfgCmn->pcchCfg) != ROK)
4198 /*******************************************************************
4200 * @brief Fill Serving Cell Config Common SIB
4204 * Function : parseSrvCellCfgCmnSib
4206 * Functionality: Fill Serving Cell Config Common SIB
4208 * @params[in] XML document pointer
4210 * Current node in XML
4211 * Pointer to structure to be filled
4212 * @return ROK - success
4215 * ****************************************************************/
4216 uint8_t parseSrvCellCfgCmnSib(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SrvCellCfgCommSib *srvCellCfgCmnSib)
4218 memset(srvCellCfgCmnSib, 0, sizeof(SrvCellCfgCommSib));
4219 cur = cur -> xmlChildrenNode;
4223 srvCellCfgCmnSib->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
4225 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
4227 srvCellCfgCmnSib->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4230 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_POS_INBURST")) && (cur->ns == ns))
4232 srvCellCfgCmnSib->ssbPosInBurst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4235 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIODICITY")) && (cur->ns == ns))
4237 srvCellCfgCmnSib->ssbPrdServingCell = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4240 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBCH_PWR")) && (cur->ns == ns))
4242 srvCellCfgCmnSib->ssPbchBlockPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4245 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_CFG_COMMON")) && (cur->ns == ns))
4247 if(parseDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->dlCfg) != ROK)
4253 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_CFG_COMMON")) && (cur->ns == ns))
4255 if(parseUlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->ulCfg) != ROK)
4261 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_UL_DL_CFG_COMMON")) && (cur->ns == ns))
4263 if(parseTddUlDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->tddCfg) != ROK)
4274 /*******************************************************************
4276 * @brief Fill SI Scheduling Information
4280 * Function : parseSiSchedInfo
4282 * Functionality: Fill SI Scheduling Information
4284 * @params[in] XML document pointer
4286 * Current node in XML
4287 * Pointer to structure to be filled
4288 * @return ROK - success
4291 * ****************************************************************/
4292 uint8_t parseSiSchedInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SiSchedInfo *siSchedInfo)
4294 memset(siSchedInfo, 0, sizeof(SiSchedInfo));
4295 cur = cur -> xmlChildrenNode;
4298 if ((!xmlStrcmp(cur->name, (const xmlChar *)"WIN_LEN")) && (cur->ns == ns))
4300 siSchedInfo->winLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4303 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BROADCAST_STATUS")) && (cur->ns == ns))
4305 siSchedInfo->broadcastSta = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4308 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY")) && (cur->ns == ns))
4310 siSchedInfo->preiodicity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4313 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB_TYPE")) && (cur->ns == ns))
4315 siSchedInfo->sibType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4318 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_VALUE_TAG")) && (cur->ns == ns))
4320 siSchedInfo->sibValTag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4328 /*******************************************************************
4330 * @brief Fill SIB1 Parameters
4334 * Function : parseSib1Params
4336 * Functionality: Fill SIB1 Parameters
4338 * @params[in] XML document pointer
4340 * Current node in XML
4341 * Pointer to structure to be filled
4342 * @return ROK - success
4345 * ****************************************************************/
4346 uint8_t parseSib1Params(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,Sib1Params *sib1Params)
4348 memset(sib1Params, 0, sizeof(Sib1Params));
4349 cur = cur -> xmlChildrenNode;
4353 sib1Params-> tac = cellParams.nRTAC;
4354 sib1Params->cellIdentity = CELL_IDENTITY * cellParams.cellLocalId;
4355 DU_LOG("\nDEBUG --> DU_APP: readCfg(): OAM CellLocalId=%d", sib1Params->cellIdentity);
4357 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
4359 sib1Params-> tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4362 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_IDENTITY")) && (cur->ns == ns))
4364 sib1Params->cellIdentity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4368 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
4370 if(parsePlmn(doc, ns, cur, &sib1Params->plmn) != ROK)
4376 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RANAC")) && (cur->ns == ns))
4378 sib1Params->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4381 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_RESVD_OPUSE")) && (cur->ns == ns))
4383 sib1Params->cellResvdForOpUse = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4386 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_CNT")) && (cur->ns == ns))
4388 sib1Params->connEstFailCnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4391 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFF_VALID")) && (cur->ns == ns))
4393 sib1Params->connEstFailOffValidity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4396 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFFSET")) && (cur->ns == ns))
4398 sib1Params->connEstFailOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4401 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SI_SHED_INFO")) && (cur->ns == ns))
4403 if(parseSiSchedInfo(doc, ns, cur, &sib1Params->siSchedInfo) != ROK)
4409 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SRV_CELL_CFG_COM_SIB")) && (cur->ns == ns))
4411 if(parseSrvCellCfgCmnSib(doc, ns, cur, &sib1Params->srvCellCfgCommSib) != ROK)
4423 /*******************************************************************
4425 * @brief Fill RRM Policy List
4429 * Function : parseRrmPolicyList
4431 * Functionality: Fill RRM Policy List
4433 * @params[in] XML document pointer
4435 * Current node in XML
4436 * Pointer to structure to be filled
4437 * @return ROK - success
4440 * ****************************************************************/
4441 uint8_t parseRrmPolicyList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,RrmPolicyMemberList *rrmPolicyMemberList)
4443 memset(rrmPolicyMemberList, 0, sizeof(RrmPolicyMemberList));
4444 cur = cur->xmlChildrenNode;
4447 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
4449 if(parsePlmn(doc, ns, cur, &rrmPolicyMemberList->plmn) != ROK)
4455 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI")) && (cur->ns == ns))
4457 if(parseSnssai(doc, ns, cur, &rrmPolicyMemberList->snssai) != ROK)
4468 /*******************************************************************
4470 * @brief Fill RRM Policy Ratio
4474 * Function : parseRrmPolicyRatio
4476 * Functionality: Fill RRM Policy Ratio
4478 * @params[in] XML document pointer
4480 * Current node in XML
4481 * Pointer to structure to be filled
4482 * @return ROK - success
4485 * ****************************************************************/
4486 uint8_t parseRrmPolicyRatio(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RrmPolicyRatio *rrmPolicyRatio)
4488 memset(rrmPolicyRatio, 0, sizeof(RrmPolicyRatio));
4489 cur = cur -> xmlChildrenNode;
4492 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_RATIO")) && (cur->ns == ns))
4494 rrmPolicyRatio->maxRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4497 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_RATIO")) && (cur->ns == ns))
4499 rrmPolicyRatio->minRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4502 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEDICATED_RATIO")) && (cur->ns == ns))
4504 rrmPolicyRatio->dedicatedRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4512 /*******************************************************************
4514 * @brief Fill MAC Slice RRM Policy
4518 * Function : parseMacSliceRrmPolicy
4520 * Functionality: Fill MAC Slice RRM Policy
4522 * @params[in] XML document pointer
4524 * Current node in XML
4525 * Pointer to structure to be filled
4526 * @return ROK - success
4529 * ****************************************************************/
4530 uint8_t parseMacSliceRrmPolicy(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MacSliceRrmPolicy *rrmPolicy)
4534 memset(rrmPolicy, 0, sizeof(MacSliceRrmPolicy));
4535 cur = cur -> xmlChildrenNode;
4538 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RESOURCE_TYPE")) && (cur->ns == ns))
4540 rrmPolicy->resourceType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4543 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRM_POLICY_MEMBER")) && (cur->ns == ns))
4545 rrmPolicy->numOfRrmPolicyMem = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4548 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_MEMBER_LIST")) && (cur->ns == ns))
4550 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList,\
4551 rrmPolicy->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
4553 if(!rrmPolicy->rRMPolicyMemberList)
4555 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
4559 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
4561 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList[memIdx], sizeof(RrmPolicyMemberList));
4562 if (rrmPolicy->rRMPolicyMemberList[memIdx] == NULLP)
4564 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4568 if(parseRrmPolicyList(doc, ns, cur, rrmPolicy->rRMPolicyMemberList[memIdx]) != ROK)
4575 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_RATIO")) && (cur->ns == ns))
4577 if(parseRrmPolicyRatio(doc, ns, cur, &rrmPolicy->policyRatio) != ROK)
4588 /*******************************************************************
4590 * @brief Fill MAC Slice Configuration
4594 * Function : parseMacSliceCfgReq
4596 * Functionality: Fill MAC Slice Configuration
4598 * @params[in] XML document pointer
4600 * Current node in XML
4601 * Pointer to structure to be filled
4602 * @return ROK - success
4605 * ****************************************************************/
4606 uint8_t parseMacSliceCfgReq(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacSliceCfgReq *macSliceCfgReq)
4608 uint8_t policyIdx = 0;
4609 memset(macSliceCfgReq, 0, sizeof(MacSliceCfgReq));
4610 cur = cur -> xmlChildrenNode;
4613 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRM_POLICY")) && (cur->ns == ns))
4615 macSliceCfgReq->numOfRrmPolicy = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4618 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_SLICE_RRM_POLICY")) && (cur->ns == ns))
4620 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy, macSliceCfgReq->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
4621 if(!macSliceCfgReq->listOfRrmPolicy)
4623 DU_LOG("\nERROR --> DU APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4627 for(policyIdx = 0; policyIdx < macSliceCfgReq->numOfRrmPolicy; policyIdx++)
4629 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
4630 if (macSliceCfgReq->listOfRrmPolicy[policyIdx] == NULLP)
4632 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4635 if(parseMacSliceRrmPolicy(doc, ns, cur, macSliceCfgReq->listOfRrmPolicy[policyIdx]) != ROK)
4647 #ifdef THREAD_AFFINITY
4648 /*******************************************************************
4650 * @brief Set thread affinity to the core configured via XML file
4654 * Function : parseThreadAffinity
4656 * Functionality: Set thread affinity to the core configured
4659 * @params[in] XML document pointer
4661 * Current node in XML
4662 * Thread information
4663 * @return ROK - success
4666 * ****************************************************************/
4667 uint8_t parseThreadAffinity(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ThreadInfo *threads)
4669 cur = cur -> xmlChildrenNode;
4672 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_APP_CORE")) && (cur->ns == ns))
4674 threads->duAppCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4675 ODU_SET_THREAD_AFFINITY(&threads->duAppSTskId, SS_AFFINITY_MODE_EXCL, threads->duAppCoreId, 0);
4678 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP_CORE")) && (cur->ns == ns))
4680 threads->egtpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4681 ODU_SET_THREAD_AFFINITY(&threads->egtpSTskId, SS_AFFINITY_MODE_EXCL, threads->egtpCoreId, 0);
4684 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_MAC_CORE")) && (cur->ns == ns))
4686 threads->rlcMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4687 ODU_SET_THREAD_AFFINITY(&threads->rlcMacSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcMacCoreId, 0);
4690 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_UL_CORE")) && (cur->ns == ns))
4692 threads->rlcUlCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4693 ODU_SET_THREAD_AFFINITY(&threads->rlcUlSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcUlCoreId, 0);
4696 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_CORE")) && (cur->ns == ns))
4698 threads->schCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4699 ODU_SET_THREAD_AFFINITY(&threads->schSTskId, SS_AFFINITY_MODE_EXCL, threads->schCoreId, 0);
4702 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP_CORE")) && (cur->ns == ns))
4704 threads->sctpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4705 ODU_SET_THREAD_AFFINITY(&threads->sctpSTskId, SS_AFFINITY_MODE_EXCL, threads->sctpCoreId, 0);
4708 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOWER_MAC_CORE")) && (cur->ns == ns))
4710 threads->lwrMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4711 ODU_SET_THREAD_AFFINITY(&threads->lwrMacSTskId, SS_AFFINITY_MODE_EXCL, threads->lwrMacCoreId, 0);
4720 /*******************************************************************
4722 * @brief Fill tmrTqCp
4726 * Function : parseTmrTqCp
4728 * Functionality: Fill tmrTqCp
4730 * @params[in] XML document pointer
4732 * Current node in XML
4733 * Pointer to structure to be filled
4734 * @return ROK - success
4737 * ****************************************************************/
4738 uint8_t parseTmrTqCp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmTqCp *tmrTqCp)
4740 memset(tmrTqCp, 0, sizeof(CmTqCp));
4741 cur = cur ->xmlChildrenNode;
4744 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_LEN")) && (cur->ns == ns))
4746 tmrTqCp->tmrLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4753 /*******************************************************************
4755 * @brief Fill DU timer Parameters
4759 * Function : parseDuTimerParams
4761 * Functionality: Fill DU timer Parmeters
4763 * @params[in] XML document pointer
4765 * Current node in XML
4766 * Pointer to structure to be filled
4767 * @return ROK - success
4770 * ****************************************************************/
4771 uint8_t parseDuTimerParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, DuTimers *duTimers)
4773 memset(duTimers, 0, sizeof(DuTimers));
4775 cur = cur->xmlChildrenNode;
4778 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_TQ_CP")) && (cur->ns == ns))
4780 if(parseTmrTqCp(doc, ns, cur, &duTimers->tmrTqCp) != ROK)
4786 /* Initialzie the timer queue */
4787 memset(&(duTimers->tmrTq), 0, sizeof(CmTqType) * duTimers->tmrTqCp.tmrLen);
4791 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_RESOLUTION")) && (cur->ns == ns))
4793 duTimers->tmrRes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4800 /*******************************************************************
4802 * @brief Fill TNL assoc
4806 * Function : parseTnlAssoc
4808 * Functionality: Fill TNL assoc
4810 * @params[in] XML document pointer
4812 * Current node in XML
4813 * Pointer to structure to be filled
4814 * @return ROK - success
4817 * ****************************************************************/
4818 uint8_t parseTnlAssoc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TNLAssociation *tnlAssoc)
4825 memset(tnlAssoc, 0, sizeof(TNLAssociation));
4826 cur = cur ->xmlChildrenNode;
4829 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_IP")) && (cur->ns == ns))
4831 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4832 cmInetAddr(duIpV4Addr, &(duIp));
4833 tnlAssoc->localIpAddress.ipV4Pres = true;
4834 tnlAssoc->localIpAddress.ipV4Addr = duIp;
4837 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_PORT")) && (cur->ns == ns))
4839 tnlAssoc->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4842 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_IP")) && (cur->ns == ns))
4844 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4845 cmInetAddr(ricIpV4Addr, &(ricIp));
4846 tnlAssoc->destIpAddress.ipV4Pres = true;
4847 tnlAssoc->destIpAddress.ipV4Addr = ricIp;
4850 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_PORT")) && (cur->ns == ns))
4852 tnlAssoc->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4855 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ASSOC_USAGE")) && (cur->ns == ns))
4857 tnlAssoc->usage = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4864 /*******************************************************************
4866 * @brief Fill E2 config Parameters
4870 * Function : parseE2ConfigParams
4872 * Functionality: Fill E2 config Parmeters
4874 * @params[in] XML document pointer
4876 * Current node in XML
4877 * Pointer to structure to be filled
4878 * @return ROK - success
4881 * ****************************************************************/
4882 uint8_t parseE2ConfigParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, E2apDb *e2apDb)
4885 xmlNodePtr child = NULLP;
4887 memset(e2apDb, 0, sizeof(E2apDb));
4888 cur = cur->xmlChildrenNode;
4891 if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_NODE_ID")) && (cur->ns == ns))
4893 e2apDb->e2NodeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4896 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_TNL_ASSOC")) && (cur->ns == ns))
4898 e2apDb->numOfTNLAssoc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4901 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TNL_ASSOC_LIST")) && (cur->ns == ns))
4903 child = cur->xmlChildrenNode;
4904 while(child != NULL)
4906 if ((!xmlStrcmp(child->name, (const xmlChar *)"TNL_ASSOC")) && (child->ns == ns))
4908 if(parseTnlAssoc(doc, ns, child,&e2apDb->tnlAssoc[tnlIdx]) != ROK)
4915 child = child -> next;
4923 /*******************************************************************
4925 * @brief Fill DU Config Parmeters
4929 * Function : parseDuCfgParams
4933 * @params[in] XML document pointer
4935 * Current node in XML
4936 * @return ROK - success
4939 * ****************************************************************/
4940 uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
4942 char *tempDuName = "";
4950 cur = cur->xmlChildrenNode;
4953 if ((!xmlStrcmp(cur->name, (const xmlChar *)"THREAD_AFFINITY")) && (cur->ns == ns))
4955 #ifdef THREAD_AFFINITY
4956 if(parseThreadAffinity(doc, ns, cur, &duCfgParam.threadInfo) != ROK)
4963 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GNB_ID")) && (cur->ns == ns))
4965 duCb.gnbId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4968 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_ID")) && (cur->ns == ns))
4970 duCfgParam.duId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4973 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_NAME")) && (cur->ns == ns))
4975 tempDuName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4976 DU_ALLOC(duCfgParam.duName, strlen(tempDuName));
4977 if(!duCfgParam.duName)
4979 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4982 strcpy((char*)duCfgParam.duName, tempDuName);
4985 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_DRB")) && (cur->ns == ns))
4987 duCfgParam.maxNumDrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4990 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE_SUPPORTED")) && (cur->ns == ns))
4992 duCfgParam.maxSupportedUes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4995 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE")) && (cur->ns == ns))
4997 duCfgParam.maxUe = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5001 if( getStartupConfig(&g_cfg) != ROK )
5005 cmInetAddr((S8*)g_cfg.DU_IPV4_Addr, &duIp);
5006 cmInetAddr((S8*)g_cfg.CU_IPV4_Addr, &cuIp);
5007 cmInetAddr((S8*)g_cfg.RIC_IPV4_Addr, &ricIp);
5010 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_IP_V4_ADDR")) && (cur->ns == ns))
5012 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5013 cmInetAddr(duIpV4Addr, &(duIp));
5016 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CU_IP_V4_ADDR")) && (cur->ns == ns))
5018 cuIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5019 cmInetAddr(cuIpV4Addr, &(cuIp));
5022 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_IP_V4_ADDR")) && (cur->ns == ns))
5024 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5025 cmInetAddr(ricIpV4Addr, &(ricIp));
5029 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP")) && (cur->ns == ns))
5031 if(parseSctpParams(doc, ns, cur, &duCfgParam.sctpParams) != ROK)
5035 duCfgParam.sctpParams.duIpAddr.ipV4Pres = true;
5036 duCfgParam.sctpParams.duIpAddr.ipV4Addr = duIp;
5037 duCfgParam.sctpParams.cuIpAddr.ipV4Pres = true;
5038 duCfgParam.sctpParams.cuIpAddr.ipV4Addr = cuIp;
5039 duCfgParam.sctpParams.ricIpAddr.ipV4Pres = true;
5040 duCfgParam.sctpParams.ricIpAddr.ipV4Addr = ricIp;
5043 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP")) && (cur->ns == ns))
5045 if(parseEgtpParams(doc, ns, cur, &duCfgParam.egtpParams) != ROK)
5049 duCfgParam.egtpParams.localIp.ipV4Addr = duIp;
5050 duCfgParam.egtpParams.localIp.ipV4Pres = true;
5051 duCfgParam.egtpParams.destIp.ipV4Pres = true;
5052 duCfgParam.egtpParams.destIp.ipV4Addr = cuIp;
5053 duCfgParam.egtpParams.maxTunnelId = duCfgParam.maxNumDrb * duCfgParam.maxSupportedUes;
5056 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIB_PARAMS")) && (cur->ns == ns))
5058 if(parseMibParams(doc, ns, cur, &duCfgParam.mibParams) != ROK)
5064 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_PARAMS")) && (cur->ns == ns))
5066 if(parseSib1Params(doc, ns, cur, &duCfgParam.sib1Params) != ROK)
5072 #ifdef XML_BASED_CONFIG
5073 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_SRVD_CELL_INFO")) && (cur->ns == ns))
5075 if(parseF1DuServedCellInfo(doc, ns, cur, &duCfgParam.srvdCellLst[0]) != ROK)
5082 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_CFG")) && (cur->ns == ns))
5084 if(parseMacCellCfg(doc, ns, cur, &duCfgParam.macCellCfg) != ROK)
5091 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SLICE_CFG")) && (cur->ns == ns))
5093 if(parseMacSliceCfgReq(doc, ns, cur, &duCfgParam.tempSliceCfg) != ROK)
5100 if((!xmlStrcmp(cur->name, (const xmlChar *)"DU_TIMER_INFO")) && (cur->ns == ns))
5102 if(parseDuTimerParams(doc, ns, cur, &duCb.duTimersInfo) != ROK)
5108 if((!xmlStrcmp(cur->name, (const xmlChar *)"E2AP_CFG")) && (cur->ns == ns))
5110 if(parseE2ConfigParams(doc, ns, cur, &duCb.e2apDb) != ROK)
5120 /*******************************************************************
5122 * @brief Reads config and posts message to du_app on completion
5126 * Function : duReadCfg
5129 * - Reads configuration from xml file and stores in DB
5130 * - Post to du_app for further processing
5133 * @return ROK - success
5136 * ****************************************************************/
5139 const char *filename = "../build/config/odu_config.xml";
5140 xmlDocPtr doc = NULLP;
5141 xmlNodePtr cur = NULLP;
5142 xmlNsPtr ns = NULLP;
5144 doc = xmlParseFile(filename);
5147 DU_LOG("\nERROR --> DU_APP: Failed to parse the XML file");
5151 cur = xmlDocGetRootElement(doc);
5152 ns = xmlSearchNsByHref(doc, cur, (const xmlChar *)"urn:o-ran:odu:configuration");
5155 DU_LOG("\nERROR --> DU_APP: XML Namespace not found.\n");
5161 parseDuCfgParams(doc, ns, cur);
5169 /* Read configs into duCfgParams */
5170 if(readCfg() != ROK)
5172 DU_LOG("\nERROR --> DU_APP : Reading configuration failed");
5177 /* Fill pst structure */
5178 memset(&(pst), 0, sizeof(Pst));
5179 pst.srcEnt = (Ent)ENTDUAPP;
5180 pst.srcInst = (Inst)DU_INST;
5181 pst.srcProcId = DU_PROC;
5182 pst.dstEnt = pst.srcEnt;
5183 pst.dstInst = pst.srcInst;
5184 pst.dstProcId = pst.srcProcId;
5186 pst.selector = ODU_SELECTOR_TC;
5189 /* Initialize the timer blocks */
5190 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2SetupTimer), 1);
5191 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.ricServiceUpdateTimer.timer), 1);
5192 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2NodeConfigUpdate.timer), 1);
5194 /* Timer Registration request to system services */
5195 if (ODU_REG_TMR_MT(pst.srcEnt, pst.srcInst, duCb.duTimersInfo.tmrRes, duActvTmr) != ROK)
5197 DU_LOG("\nERROR --> DU_APP : Failed to register timer");
5201 if(ODU_GET_MSG_BUF(DFLT_REGION, DU_POOL, &mBuf) != ROK)
5203 DU_LOG("\nERROR --> DU_APP : Memory allocation failed in duReadCfg");
5207 if (ODU_POST_TASK(&pst, mBuf) != ROK)
5209 DU_LOG("\nERROR --> DU_APP : ODU_POST_TASK failed in duReadCfg");
5216 /*******************************************************************
5218 * @brief Prints all DU Configuration
5222 * Function : printDuConfig
5225 * - Prints all DU configurations
5230 * ****************************************************************/
5231 void printDuConfig()
5233 uint8_t sliceIdx = 0, pfIdx = 0, rsrcIdx = 0, ssbMaskIdx = 0, fdmIdx = 0;
5234 uint8_t monitoringSymbIdx = 0, poIdx = 0, policyIdx = 0, memIdx = 0;
5235 __attribute__((unused)) SctpParams *sctp;
5236 __attribute__((unused)) F1EgtpParams *egtp;
5237 __attribute__((unused)) MibParams *mib;
5238 __attribute__((unused)) F1RrcVersion *f1RrcVersion;
5239 F1DuCellInfo *f1DuCellInfo;
5240 F1CellInfo *f1CellInfo;
5241 __attribute__((unused)) F1DuSysInfo *duSysInfo;
5242 __attribute__((unused)) F1BrdcstPlmnInfo *brdcstPlmnInfo;
5243 NrModeInfo *nrModeInfo;
5244 __attribute__((unused)) F1NrFddInfo *f1NrFddInfo;
5245 F1SrvdPlmn *srvdPlmn;
5246 SupportedSliceList *sliceSuppLst;
5247 MacCellCfg *macCellCfg;
5248 __attribute__((unused)) CarrierCfg *carrierCfg;
5250 PlmnInfoList *plmnInfoList;
5251 Sib1CellCfg *sib1Cfg;
5252 SchPageCfg *pageCfg;
5253 __attribute__((unused)) PdcchConfigSib1 *pdcchConfigSib1;
5254 BwpDlConfig *bwpDlCfg;
5255 __attribute__((unused)) BwpParams *bwp;
5256 PdcchConfigCommon *pdcchCfgCmn;
5257 SearchSpaceCfg *searchSpaceCfg;
5258 __attribute__((unused)) CandidatesInfo *candidateInfo;
5259 PdschConfigCommon *pdschCfgCmn;
5260 __attribute__((unused)) PdschCfgCommTimeDomRsrcAlloc *pdschCmnTimeDomRsrcAlloc;
5261 BwpUlConfig *bwpUlCfg;
5262 __attribute__((unused)) PucchConfigCommon *pucchCfgCmn;
5263 PuschConfigCommon *puschCfgCmn;
5264 __attribute__((unused)) PuschTimeDomRsrcAlloc *puschTimeDomRsrcAlloc;
5265 __attribute__((unused)) SsbCfg *ssbCfg;
5266 __attribute__((unused)) CsiRsCfg *csiRsCfg;
5268 __attribute__((unused)) PrachFdmInfo *prachFdmInfo;
5269 __attribute__((unused)) PrecodingConf *precodCfg;
5270 __attribute__((unused)) BeamformingConf *beamFormingCfg;
5271 Sib1Params *sib1Params;
5272 __attribute__((unused)) SiSchedInfo *siSchedInfo;
5273 SrvCellCfgCommSib *srvCellCfgCmnSib;
5274 DlCfgCommon *dlCfgCmn;
5275 PdcchCfgCommon *pdcchCfgCommon;
5276 PdschCfgCommon *pdschCfgCommon;
5277 __attribute__((unused)) PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc;
5278 __attribute__((unused)) BcchCfg *bcchCfg;
5279 __attribute__((unused)) PcchCfg *pcchCfg;
5280 UlCfgCommon *ulCfgCmn;
5281 RachCfgCommon *rachCfgCmn;
5282 PuschCfgCommon *puschCfgCommon;
5283 __attribute__((unused)) PuschCfgCmnTimeDomAlloc *puschCmnTimeDomRsrsAlloc;
5284 PucchCfgCommon *pucchCfgCommon;
5285 __attribute__((unused)) TddUlDlCfgCommon *tddUlDlCfgCmn;
5286 MacSliceCfgReq *macSliceCfg;
5287 MacSliceRrmPolicy *rrmPolicy;
5288 __attribute__((unused)) RrmPolicyRatio *rrmPolicyRatio;
5289 __attribute__((unused)) RrmPolicyMemberList *rrmPolicyMemberList;
5292 F1NrTddInfo *f1NrTddInfo;
5296 DU_LOG("\n ** DU CONFIGURATION ** \n");
5297 DU_LOG("DU ID %d\n", duCfgParam.duId);
5298 DU_LOG("DU Name %s\n", duCfgParam.duName);
5300 DU_LOG("\n ** Thread Affinity ** \n");
5301 DU_LOG("DU APP CORE ID %d\n", duCfgParam.threadInfo.duAppCoreId);
5302 DU_LOG("EGTP CORE ID %d\n", duCfgParam.threadInfo.egtpCoreId);
5303 DU_LOG("SCTP CORE ID %d\n", duCfgParam.threadInfo.sctpCoreId);
5304 DU_LOG("RLC-UL CORE ID %d\n", duCfgParam.threadInfo.rlcUlCoreId);
5305 DU_LOG("RLC-DL and MAC CORE ID %d\n", duCfgParam.threadInfo.rlcMacCoreId);
5306 DU_LOG("SCH CORE ID %d\n", duCfgParam.threadInfo.schCoreId);
5307 DU_LOG("Lower MAC CORE ID %d\n", duCfgParam.threadInfo.lwrMacCoreId);
5309 DU_LOG("MAX NUM DRB %d\n", duCfgParam.maxNumDrb);
5310 DU_LOG("MAX SUPPORTED UE %d\n", duCfgParam.maxSupportedUes);
5311 DU_LOG("MAX UE %d\n",duCfgParam.maxUe);
5313 sctp = &duCfgParam.sctpParams;
5314 DU_LOG("\n ** SCTP PARAMETER ** \n");
5315 DU_LOG("DU IPv4 Address present %u\n", sctp->duIpAddr.ipV4Pres);
5316 DU_LOG("DU IP Address %u\n", sctp->duIpAddr.ipV4Addr);
5317 DU_LOG("CU IPv4 Address present %u\n", sctp->cuIpAddr.ipV4Pres);
5318 DU_LOG("CU IP Address %u\n", sctp->cuIpAddr.ipV4Addr);
5319 DU_LOG("RIC IPv4 Address present %u\n", sctp->ricIpAddr.ipV4Pres);
5320 DU_LOG("RIC IP Address %u\n", sctp->ricIpAddr.ipV4Addr);
5321 DU_LOG("SCTP Port at DU for F1 Interface %d\n", sctp->duPort[F1_INTERFACE]);
5322 DU_LOG("SCTP Port at CU for F1 Interface %d\n", sctp->cuPort);
5323 DU_LOG("SCTP Port at DU for E2 Interface %d\n", sctp->duPort[E2_INTERFACE]);
5324 DU_LOG("SCTP Port at RIC for E2 Interface %d\n", sctp->ricPort);
5326 egtp = &duCfgParam.egtpParams;
5327 DU_LOG("\n ** EGTP PARAMETER ** \n");
5328 DU_LOG("DU IP Address %d\n", egtp->localIp.ipV4Addr);
5329 DU_LOG("CU IP Address %d\n", egtp->destIp.ipV4Addr);
5330 DU_LOG("EGTP Port at DU %d\n", egtp->localPort);
5331 DU_LOG("EGTP Port at CU %d\n", egtp->destPort);
5332 DU_LOG("Minimum Tunnel ID %d\n", egtp->minTunnelId);
5333 DU_LOG("Maximum Tunnel ID %d\n",egtp->maxTunnelId);
5335 mib = &duCfgParam.mibParams;
5336 DU_LOG("\n ** MIB PARAMETER ** \n");
5337 DU_LOG("System Frame Number %d\n", mib->sysFrmNum);
5338 DU_LOG("Subcarrier Spacing Common %ld\n", mib->subCarrierSpacingCommon);
5339 DU_LOG("SSB Subcarrier Offset %ld\n", mib->ssb_SubcarrierOffset);
5340 DU_LOG("DMRS Type-A Position %ld\n", mib->dmrs_TypeA_Position);
5341 DU_LOG("Control Resource Set Zero %ld\n", mib->controlResourceSetZero);
5342 DU_LOG("Search Space Zero %ld\n", mib->searchSpaceZero);
5343 DU_LOG("Cell Barred %ld\n", mib->cellBarred);
5344 DU_LOG("Intra Frequency Reselection %ld\n", mib->intraFreqReselection);
5346 duSysInfo = &duCfgParam.srvdCellLst[0].duSysInfo;
5347 DU_LOG("\n ** DU System Information ** \n");
5348 DU_LOG("MIB length %d\n", duSysInfo->mibLen);
5349 DU_LOG("MIB message %s\n", duSysInfo->mibMsg);
5350 DU_LOG("SIB1 length %d\n", duSysInfo->sib1Len);
5351 DU_LOG("SIB1 message %s\n", duSysInfo->sib1Msg);
5353 f1DuCellInfo = &duCfgParam.srvdCellLst[0].duCellInfo;
5354 DU_LOG("\n ** DU Cell Information ** \n");
5356 f1CellInfo = &f1DuCellInfo->cellInfo;
5357 DU_LOG("NR PCI %d\n", f1CellInfo->nrPci);
5358 DU_LOG("DU TAC %d\n", f1DuCellInfo->tac);
5359 DU_LOG("EPS TAC %d\n", f1DuCellInfo->epsTac);
5360 DU_LOG("Measurement Time Configuration Duration %d\n", f1DuCellInfo->measTimeCfgDuration);
5361 DU_LOG("Cell Direction %d\n", f1DuCellInfo->cellDir);
5362 DU_LOG("Cell Type %d\n", f1DuCellInfo->cellType);
5364 DU_LOG("\n ** Cell Info : NR CGI ** \n");
5365 DU_LOG("Cell Id %d\n",f1CellInfo->nrCgi.cellId);
5366 DU_LOG("PLMN : mcc[0] %d\n", f1CellInfo->nrCgi.plmn.mcc[0]);
5367 DU_LOG("PLMN : mcc[1] %d\n", f1CellInfo->nrCgi.plmn.mcc[1]);
5368 DU_LOG("PLMN : mcc[2] %d\n", f1CellInfo->nrCgi.plmn.mcc[2]);
5369 DU_LOG("PLMN : mnc[0] %d\n", f1CellInfo->nrCgi.plmn.mnc[0]);
5370 DU_LOG("PLMN : mnc[1] %d\n", f1CellInfo->nrCgi.plmn.mnc[1]);
5371 DU_LOG("PLMN : mnc[2] %d\n", f1CellInfo->nrCgi.plmn.mnc[2]);
5373 srvdPlmn = &f1CellInfo->srvdPlmn[0];
5374 DU_LOG("\n ** Cell Info : Served PLMN ** \n");
5375 DU_LOG("PLMN : mcc[0] %d\n", srvdPlmn->plmn.mcc[0]);
5376 DU_LOG("PLMN : mcc[1] %d\n", srvdPlmn->plmn.mcc[1]);
5377 DU_LOG("PLMN : mcc[2] %d\n", srvdPlmn->plmn.mcc[2]);
5378 DU_LOG("PLMN : mnc[0] %d\n", srvdPlmn->plmn.mnc[0]);
5379 DU_LOG("PLMN : mnc[1] %d\n", srvdPlmn->plmn.mnc[1]);
5380 DU_LOG("PLMN : mnc[2] %d\n", srvdPlmn->plmn.mnc[2]);
5381 DU_LOG("EXT_PLMN : mcc[0] %d\n", srvdPlmn->extPlmn.mcc[0]);
5382 DU_LOG("EXT_PLMN : mcc[1] %d\n", srvdPlmn->extPlmn.mcc[1]);
5383 DU_LOG("EXT_PLMN : mcc[2] %d\n", srvdPlmn->extPlmn.mcc[2]);
5384 DU_LOG("EXT_PLMN : mnc[0] %d\n", srvdPlmn->extPlmn.mnc[0]);
5385 DU_LOG("EXT_PLMN : mnc[1] %d\n", srvdPlmn->extPlmn.mnc[1]);
5386 DU_LOG("EXT_PLMN : mnc[2] %d\n", srvdPlmn->extPlmn.mnc[2]);
5388 sliceSuppLst = &srvdPlmn->taiSliceSuppLst;
5389 DU_LOG("\n ** Cell Info : Served PLMN : Supported Slice List ** \n");
5390 DU_LOG("Number of Slices supported %d\n", sliceSuppLst->numSupportedSlices);
5391 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
5394 DU_LOG("\tSST %d\n", (*sliceSuppLst->snssai[sliceIdx]).sst);
5395 DU_LOG("\tSD %d %d %d\n", (*sliceSuppLst->snssai[sliceIdx]).sd[0], (*sliceSuppLst->snssai[sliceIdx]).sd[1], \
5396 (*sliceSuppLst->snssai[sliceIdx]).sd[2]);
5399 brdcstPlmnInfo = &f1DuCellInfo->brdcstPlmnInfo[0];
5400 DU_LOG("\n ** DU Cell Information : Broadcast PLMN Info ** \n");
5401 DU_LOG("TAC %d\n", brdcstPlmnInfo->tac);
5402 DU_LOG("NR Cell Id %d\n", brdcstPlmnInfo->nrCellId);
5403 DU_LOG("RANAC %d\n", brdcstPlmnInfo->ranac);
5405 DU_LOG("PLMN : mcc[0] %d\n", brdcstPlmnInfo->plmn[0].mcc[0]);
5406 DU_LOG("PLMN : mcc[1] %d\n", brdcstPlmnInfo->plmn[0].mcc[1]);
5407 DU_LOG("PLMN : mcc[2] %d\n", brdcstPlmnInfo->plmn[0].mcc[2]);
5408 DU_LOG("PLMN : mnc[0] %d\n", brdcstPlmnInfo->plmn[0].mnc[0]);
5409 DU_LOG("PLMN : mnc[1] %d\n", brdcstPlmnInfo->plmn[0].mnc[1]);
5410 DU_LOG("PLMN : mnc[2] %d\n", brdcstPlmnInfo->plmn[0].mnc[2]);
5412 DU_LOG("EXT_PLMN : mcc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[0]);
5413 DU_LOG("EXT_PLMN : mcc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[1]);
5414 DU_LOG("EXT_PLMN : mcc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[2]);
5415 DU_LOG("EXT_PLMN : mnc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[0]);
5416 DU_LOG("EXT_PLMN : mnc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[1]);
5417 DU_LOG("EXT_PLMN : mnc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[2]);
5419 nrModeInfo = &f1DuCellInfo->f1Mode;
5420 f1NrFddInfo = &nrModeInfo->mode.fdd;
5421 DU_LOG("\n ** DU Cell Information : NR Mode Info ** \n");
5423 DU_LOG("\n ** NR Mode Info : FDD ** \n");
5424 DU_LOG("\n ** NR Mode Info : FDD : UL NR Frequency ** \n");
5425 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->ulNrFreqInfo.nrArfcn);
5426 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->ulNrFreqInfo.sulInfo.sulArfcn);
5427 DU_LOG("SUL : Transmission BW Subcarrier Spacing %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrScs);
5428 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrb);
5429 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].nrFreqBand);
5430 DU_LOG("SUL Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].sulBand[0]);
5432 DU_LOG("\n ** NR Mode Info : FDD : DL NR Frequency ** \n");
5433 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->dlNrFreqInfo.nrArfcn);
5434 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->dlNrFreqInfo.sulInfo.sulArfcn);
5435 DU_LOG("SUL : Transmission BW Subcarrier Sapcing %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrScs);
5436 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrb);
5437 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].nrFreqBand);
5438 DU_LOG("SUL Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].sulBand[0]);
5440 DU_LOG("\n ** NR Mode Info : FDD : UL Transmission Bandwidth ** \n");
5441 DU_LOG("Subscarrier spacing %d\n", f1NrFddInfo->ulTxBw.nrScs);
5442 DU_LOG("Number of RBs %d\n", f1NrFddInfo->ulTxBw.nrb);
5444 DU_LOG("\n ** NR Mode Info : FDD : DL Transmission Bandwidth ** \n");
5445 DU_LOG("Subcarrier Spacing %d\n", f1NrFddInfo->dlTxBw.nrScs);
5446 DU_LOG("Number of RBs %d\n", f1NrFddInfo->dlTxBw.nrb);
5450 f1NrTddInfo = &nrModeInfo ->mode.tdd;
5452 DU_LOG("\n ** NR Mode Info : TDD : NR Frequency ** \n");
5453 DU_LOG("NR ARFCN %d\n", f1NrTddInfo->nrFreqInfo.nrArfcn);
5454 DU_LOG("SUL : ARFCN %d\n",f1NrTddInfo->nrFreqInfo.sulInfo.sulArfcn);
5455 DU_LOG("SUL : Transmission BW Subscarrier Spacing %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrScs);
5456 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrb);
5457 DU_LOG("NR Frequency Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].nrFreqBand);
5458 DU_LOG("SUL Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].sulBand[0]);
5460 DU_LOG("\n ** NR Mode Info : TDD : NR Transmission Bandwidth ** \n");
5461 DU_LOG("Subcarrier Spacing %d\n", f1NrTddInfo->nrTxBw.nrScs);
5462 DU_LOG("Number of RBs %d\n", f1NrTddInfo->nrTxBw.nrb);
5465 macCellCfg = &duCfgParam.macCellCfg;
5466 DU_LOG("\n ** MAC CELL CONFIGURATION ** \n");
5467 DU_LOG("Cell Id %d\n", macCellCfg->cellId);
5469 DU_LOG("\n ** MAC Cell Configuration : Carrier Configuration ** \n");
5470 carrierCfg = &macCellCfg ->carrCfg;
5471 DU_LOG("DL Bandwidth %d\n", carrierCfg->dlBw);
5472 DU_LOG("DL ARFCN %d\n", carrierCfg->arfcnDL);
5473 DU_LOG("UL Bandwidth %d\n", carrierCfg->ulBw);
5474 DU_LOG("UL ARFCN %d\n", carrierCfg->arfcnUL);
5475 DU_LOG("Number of Transmission Antenna %d\n", carrierCfg->numTxAnt);
5476 DU_LOG("Number of Received Antenna %d\n", carrierCfg->numRxAnt);
5478 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration ** \n");
5479 cellCfg = &macCellCfg ->cellCfg;
5480 DU_LOG("Operational State %d\n", cellCfg->opState);
5481 DU_LOG("Administration State %d\n", cellCfg->adminState);
5482 DU_LOG("Cell Current State %d\n", cellCfg->cellState);
5483 DU_LOG("NR PCI %d\n", cellCfg->phyCellId);
5484 DU_LOG("TAC: %d\n", cellCfg->tac);
5485 DU_LOG("SSB Freqeuncy %d\n", cellCfg->ssbFreq);
5486 DU_LOG("Subcarrier Spacing: %d\n", cellCfg->subCarrSpacing);
5487 DU_LOG("Duplex Mode %d\n", cellCfg->dupType);
5489 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : PLMN Info List ** \n");
5490 plmnInfoList = &cellCfg ->plmnInfoList[0];
5491 DU_LOG("PLMN : mcc[0] %d\n", plmnInfoList->plmn.mcc[0]);
5492 DU_LOG("PLMN : mcc[1] %d\n", plmnInfoList->plmn.mcc[1]);
5493 DU_LOG("PLMN : mcc[2] %d\n", plmnInfoList->plmn.mcc[2]);
5494 DU_LOG("PLMN : mnc[0] %d\n", plmnInfoList->plmn.mnc[0]);
5495 DU_LOG("PLMN : mnc[1] %d\n", plmnInfoList->plmn.mnc[1]);
5496 DU_LOG("PLMN : mnc[2] %d\n", plmnInfoList->plmn.mnc[2]);
5498 DU_LOG("Number of Slice supported %d\n", plmnInfoList->suppSliceList.numSupportedSlices);
5499 for(sliceIdx = 0; sliceIdx < plmnInfoList->suppSliceList.numSupportedSlices; sliceIdx++)
5502 DU_LOG("\nSST %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sst);
5503 DU_LOG("\nSD %d %d %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[0], \
5504 (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[1],(*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[2]);
5507 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 ** \n");
5508 sib1Cfg = &cellCfg->sib1Cfg;
5509 DU_LOG("SIB1 PDU Length %d\n", sib1Cfg->sib1PduLen);
5510 DU_LOG("SIB1 PDU %s\n", sib1Cfg->sib1Pdu);
5512 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : Paging Configuration ** \n");
5513 pageCfg = &sib1Cfg->pagingCfg;
5515 DU_LOG("Number of Paging Occassion %d\n", pageCfg->numPO);
5516 if (pageCfg->poPresent == true)
5517 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : TRUE\n");
5519 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : FALSE\n");
5521 for(pfIdx = 0; pfIdx < MAX_PO_PER_PF; pfIdx++)
5523 DU_LOG("Paging Occassion at Paging Frame [%d] : %d\n", pfIdx, pageCfg->pagingOcc[pfIdx]);
5526 pdcchConfigSib1 = &sib1Cfg->pdcchCfgSib1;
5527 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : PDCCH ** \n");
5528 DU_LOG("Coreset Zero Index %d\n", pdcchConfigSib1->coresetZeroIndex);
5529 DU_LOG("Search Space Zero Index %d\n", pdcchConfigSib1->searchSpaceZeroIndex);
5531 bwpDlCfg = &cellCfg->initialDlBwp;
5532 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP Configuration ** \n");
5534 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : BWP ** \n");
5535 bwp = &bwpDlCfg->bwp;
5536 DU_LOG("First PRB %d\n", bwp->firstPrb);
5537 DU_LOG("Number of PRBs %d\n", bwp->numPrb);
5538 DU_LOG("Subcarrier Spacing %d\n", bwp->scs);
5539 DU_LOG("Cyclic Perfix %d\n", bwp->cyclicPrefix);
5541 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common ** \n");
5542 pdcchCfgCmn = &bwpDlCfg->pdcchCommon;
5543 DU_LOG("RA Search Space ID %d\n", pdcchCfgCmn->raSearchSpaceId);
5545 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common : Search Space ** \n");
5546 searchSpaceCfg = &pdcchCfgCmn->commonSearchSpace;
5547 DU_LOG("Search Space ID %d\n", searchSpaceCfg->searchSpaceId);
5548 DU_LOG("Coreset ID %d\n", searchSpaceCfg->coresetId);
5549 DU_LOG("Monitoring Slot %d\n", searchSpaceCfg->monitoringSlot);
5550 DU_LOG("Duration %d\n", searchSpaceCfg->duration);
5551 DU_LOG("Monitoring Symbol %x\n", searchSpaceCfg->monitoringSymbol);
5553 candidateInfo = &searchSpaceCfg->candidate;
5554 DU_LOG("Number of Candidates in Aggregation Level_1 %d\n", candidateInfo->aggLevel1);
5555 DU_LOG("Number of Candidates in Aggregation Level_2 %d\n", candidateInfo->aggLevel2);
5556 DU_LOG("Number of Candidates in Aggregation Level_4 %d\n", candidateInfo->aggLevel4);
5557 DU_LOG("Number of Candidates in Aggregation Level_8 %d\n", candidateInfo->aggLevel8);
5558 DU_LOG("Number of Candidates in Aggregation Level_16 %d\n", candidateInfo->aggLevel16);
5560 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDSCH Config Common ** \n");
5561 pdschCfgCmn = &bwpDlCfg->pdschCommon;
5562 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCmn->numTimeDomAlloc);
5564 for (rsrcIdx = 0; rsrcIdx < pdschCfgCmn->numTimeDomAlloc; rsrcIdx++)
5566 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
5567 pdschCmnTimeDomRsrcAlloc = &pdschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
5568 DU_LOG("\tK0 %d\n", pdschCmnTimeDomRsrcAlloc->k0);
5569 DU_LOG("\tPDSCH Mapping Type %d\n", pdschCmnTimeDomRsrcAlloc->mappingType);
5570 DU_LOG("\tPDSCH Start Symbol %d\n", pdschCmnTimeDomRsrcAlloc->startSymbol);
5571 DU_LOG("\tPDSCH Symbol Length %d\n", pdschCmnTimeDomRsrcAlloc->lengthSymbol);
5574 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP Configuration ** \n");
5575 bwpUlCfg = &cellCfg->initialUlBwp;
5577 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : BWP ** \n");
5578 DU_LOG("First PRB %d\n", bwpUlCfg->bwp.firstPrb);
5579 DU_LOG("Number of PRBs %d\n", bwpUlCfg->bwp.numPrb);
5580 DU_LOG("Subcarrier Spacing %d\n", bwpUlCfg->bwp.scs);
5581 DU_LOG("Cyclic Prefix %d\n", bwpUlCfg->bwp.cyclicPrefix);
5583 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUCCH Config Common ** \n");
5584 pucchCfgCmn = &bwpUlCfg->pucchCommon;
5585 DU_LOG("PUCCH Resource Common %d\n", pucchCfgCmn->pucchResourceCommon);
5586 DU_LOG("Group Hopping %d\n", pucchCfgCmn->pucchGroupHopping);
5588 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUSCH Config Common ** \n");
5589 puschCfgCmn = &bwpUlCfg ->puschCommon;
5590 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCmn->numTimeDomRsrcAlloc);
5591 for (rsrcIdx = 0; rsrcIdx < puschCfgCmn->numTimeDomRsrcAlloc; rsrcIdx++)
5593 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
5594 puschTimeDomRsrcAlloc = &puschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
5595 DU_LOG("\tK2 %d\n", puschTimeDomRsrcAlloc->k2);
5596 DU_LOG("\tPUSCH Mapping Type %d\n", puschTimeDomRsrcAlloc->mappingType);
5597 DU_LOG("\tPUSCH Start Symbol %d\n", puschTimeDomRsrcAlloc->startSymbol);
5598 DU_LOG("\tPUSCH Symbol Length %d\n", puschTimeDomRsrcAlloc->symbolLength);
5599 DU_LOG("\tPUSCH Start Symbol And Length %d\n", puschTimeDomRsrcAlloc->startSymbolAndLength);
5602 DU_LOG("\n ** MAC Cell Configuration : SSB Configuration** \n");
5603 ssbCfg = &macCellCfg ->ssbCfg;
5604 DU_LOG("SSB PDCH Power %d\n", ssbCfg->ssbPbchPwr);
5605 DU_LOG("Subcarrier Spacing Common %d\n", ssbCfg->scsCmn);
5606 DU_LOG("SSB Offset from Point A %d\n", ssbCfg->ssbOffsetPointA);
5607 DU_LOG("SSB Periodicity in msec %d\n", ssbCfg->ssbPeriod);
5608 DU_LOG("SSB Subcarrier Offset %d\n", ssbCfg->ssbScOffset);
5609 for (ssbMaskIdx = 0; ssbMaskIdx < SSB_MASK_SIZE; ssbMaskIdx++)
5611 DU_LOG("SSB Mask[%d] :%d\n", ssbMaskIdx, ssbCfg->ssbMask[ssbMaskIdx]);
5613 DU_LOG("Beam ID %d\n", ssbCfg->beamId[0]);
5614 DU_LOG("BETA PSS %d\n", ssbCfg->betaPss);
5615 DU_LOG("BCH Payloag Flag %d\n", ssbCfg->bchPayloadFlag);
5616 DU_LOG("MIB PDU %d %d %d \n", ssbCfg->mibPdu[0], ssbCfg->mibPdu[1], ssbCfg->mibPdu[2]);
5617 DU_LOG("DMRS Type-A Position %d\n", ssbCfg->dmrsTypeAPos);
5619 DU_LOG("\n ** MAC Cell Configuration : CSI RS Configuration ** \n");
5620 csiRsCfg = &macCellCfg->csiRsCfg;
5621 DU_LOG("Frequency Domain Allocation %s\n", csiRsCfg->csiFreqDomainAlloc);
5622 DU_LOG("Number of Ports %d\n", csiRsCfg->csiNrofPorts);
5623 DU_LOG("First OFDM Symbol in Time Domain %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain);
5624 DU_LOG("First OFDM Symbol in Timer Domain 2 %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2);
5625 DU_LOG("CDM Type %d\n", csiRsCfg->csirscdmType);
5626 DU_LOG("Density %d\n", csiRsCfg->csirsdensity);
5627 DU_LOG("Density dot 5:%d\n", csiRsCfg->csirsdensitydot5);
5628 DU_LOG("Power Control Offset %d\n", csiRsCfg->powerControlOffset);
5629 DU_LOG("Power Control Offset Search Space %d\n", csiRsCfg->powerControlOffsetSS);
5630 DU_LOG("Periodicity And Offset %d\n", csiRsCfg->periodicityAndOffset);
5632 DU_LOG("\n ** MAC Cell Configuration : PRACH Configuration ** \n");
5633 prachCfg = &macCellCfg->prachCfg;
5634 DU_LOG("PRACH Sequence Length %d\n", prachCfg->prachSeqLen);
5635 DU_LOG("Subcarrier Spacing %d\n", prachCfg->prachSubcSpacing);
5636 DU_LOG("Number of PRACH FDM %d\n", prachCfg->msg1Fdm);
5637 DU_LOG("PRACH Configuration Index %d\n", prachCfg->prachCfgIdx);
5638 DU_LOG("PRACH Restricted Set Configuration %d\n", prachCfg->prachRstSetCfg);
5639 DU_LOG("Number of SSB per RACH occassion %d\n", prachCfg->ssbPerRach);
5640 DU_LOG("Number of RA preambles %d\n", prachCfg->totalNumRaPreamble);
5641 DU_LOG("Number of Contention Based Preamble per SSB %d\n", prachCfg->numCbPreamblePerSsb);
5642 DU_LOG("PRACH Frequeny Start Offset %d\n", prachCfg->msg1FreqStart);
5643 DU_LOG("RA Contention Resolution Timer %d\n", prachCfg->raContResTmr);
5644 DU_LOG("RSRP Threshold %d\n", prachCfg->rsrpThreshSsb);
5645 DU_LOG("RA Response Window %d\n", prachCfg->raRspWindow);
5646 for(fdmIdx = 0; fdmIdx < prachCfg->msg1Fdm; fdmIdx++)
5648 prachFdmInfo = &prachCfg->fdm[fdmIdx];
5649 DU_LOG("FDM[%d]\n", fdmIdx);
5650 DU_LOG("\tRoot Sequence Index %d\n", prachFdmInfo->rootSeqIdx);
5651 DU_LOG("\tNumber of Root Sequence %d\n", prachFdmInfo->numRootSeq);
5652 DU_LOG("\tK1 %d\n", prachFdmInfo->k1);
5653 DU_LOG("\tZero Correlation Zone Configuration %d\n", prachFdmInfo->zeroCorrZoneCfg);
5657 DU_LOG("\n ** MAC Cell Configuration : TDD Configuration ** \n");
5658 tddCfg = &macCellCfg->tddCfg;
5659 DU_LOG("TDD Slot Periodicity %d\n", tddCfg->tddPeriod);
5660 DU_LOG("Number of DL Slots %d\n", tddCfg->nrOfDlSlots);
5661 DU_LOG("Number of DL Symbols %d\n", tddCfg->nrOfDlSymbols);
5662 DU_LOG("Number of UL Slots %d\n", tddCfg->nrOfUlSlots);
5663 DU_LOG("Number of UL Symbols %d\n", tddCfg->nrOfUlSymbols);
5666 DU_LOG("\n ** MAC Cell Configuration : Precoding Configuration ** \n");
5667 precodCfg = &macCellCfg->precodingConf;
5668 DU_LOG("Number of Layers %d\n", precodCfg->numLayers);
5669 DU_LOG("Number of Antenna Ports %d\n", precodCfg->numAntPorts);
5671 DU_LOG("\n ** MAC Cell Config : BEAM FORMING CFG ** \n");
5672 beamFormingCfg = &macCellCfg ->beamCfg;
5673 DU_LOG("Number of Beams %d\n", beamFormingCfg->numOfBeams);
5674 DU_LOG("Number of Tx RUs %d\n", beamFormingCfg->numTxRUs);
5675 DU_LOG("Beam Index %d\n", beamFormingCfg->beamIdx);
5676 DU_LOG("Beam Type %d\n", beamFormingCfg->beamType);
5677 DU_LOG("Beam Azimuth %d\n", beamFormingCfg->beamAzimuth);
5678 DU_LOG("Beam Tilt %d\n", beamFormingCfg->beamTilt);
5679 DU_LOG("Beam Horizontal Width %d\n", beamFormingCfg->beamHorizWidth);
5680 DU_LOG("Beam Vertical Width %d\n", beamFormingCfg->beamVertWidth);
5681 DU_LOG("Coverage Shape %d\n", beamFormingCfg->coverageShape);
5682 DU_LOG("Digitak Tilt %d\n",beamFormingCfg ->digitalTilt);
5683 DU_LOG("Digital Azimuth %d\n", beamFormingCfg->digitalAzimuth);
5685 DU_LOG("\n ** SIB1 Configuration ** \n");
5686 sib1Params = &duCfgParam.sib1Params;
5687 DU_LOG("TAC %d\n", sib1Params->tac);
5688 DU_LOG("RANAC %ld\n", sib1Params->ranac);
5689 DU_LOG("Cell ID %d\n", sib1Params->cellIdentity);
5690 DU_LOG("Cell Reserved for Operational Use %ld\n", sib1Params->cellResvdForOpUse);
5691 DU_LOG("Connection Establishment Failure Count %ld\n", sib1Params->connEstFailCnt);
5692 DU_LOG("Connection Establishment Failure Offset Valid %ld\n", sib1Params->connEstFailOffValidity);
5693 DU_LOG("Connection Establishment Failure Offset %ld\n", sib1Params->connEstFailOffset);
5694 DU_LOG("PLMN : mcc[0] %d\n", sib1Params->plmn.mcc[0]);
5695 DU_LOG("PLMN : mcc[1] %d\n", sib1Params->plmn.mcc[1]);
5696 DU_LOG("PLMN : mcc[2] %d\n", sib1Params->plmn.mcc[2]);
5697 DU_LOG("PLMN : mnc[0] %d\n", sib1Params->plmn.mnc[0]);
5698 DU_LOG("PLMN : mnc[1] %d\n", sib1Params->plmn.mnc[1]);
5699 DU_LOG("PLMN : mnc[2] %d\n", sib1Params->plmn.mnc[2]);
5701 DU_LOG("\n ** SIB1 : SI Scheduling Info ** \n");
5702 siSchedInfo = &sib1Params ->siSchedInfo;
5703 DU_LOG("Windown Length %ld\n", siSchedInfo->winLen);
5704 DU_LOG("Broadcast Status %ld\n", siSchedInfo->broadcastSta);
5705 DU_LOG("Periodicity %ld\n", siSchedInfo->preiodicity);
5706 DU_LOG("SIB Type %ld\n", siSchedInfo->sibType);
5707 DU_LOG("SIB Value Tag %ld\n", siSchedInfo->sibValTag);
5709 DU_LOG("\n ** SIB1 : Serving Cell Configuration Common SIB ** \n");
5710 srvCellCfgCmnSib = &sib1Params->srvCellCfgCommSib;
5711 DU_LOG("Subcarrier Spacing %ld\n", srvCellCfgCmnSib->scs);
5712 DU_LOG("SSB Position in Burst %d\n", srvCellCfgCmnSib->ssbPosInBurst);
5713 DU_LOG("SSB Periodicity %ld\n", srvCellCfgCmnSib->ssbPrdServingCell);
5714 DU_LOG("SS PBCH Power %ld\n", srvCellCfgCmnSib->ssPbchBlockPwr);
5716 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common ** \n");
5717 dlCfgCmn = &srvCellCfgCmnSib->dlCfg;
5718 DU_LOG("Frequency Band Indicator %ld\n", dlCfgCmn->freqBandInd);
5719 DU_LOG("Offset to Point A %ld\n", dlCfgCmn->offsetToPointA);
5720 DU_LOG("Frequency Location And Bandwidth %ld\n", dlCfgCmn->locAndBw);
5721 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsOffset);
5722 DU_LOG("Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scs);
5723 DU_LOG("Bandwidth considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsBw);
5725 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common : PDCCH Config Common ** \n");
5726 pdcchCfgCommon = &dlCfgCmn->pdcchCfg;
5727 if(pdcchCfgCommon->present)
5729 DU_LOG("Control Resource Set Zero Index %ld\n", pdcchCfgCommon->ctrlRsrcSetZero);
5730 DU_LOG("Search Space Zero Index %ld\n", pdcchCfgCommon->searchSpcZero);
5731 DU_LOG("Search Space ID %ld\n", pdcchCfgCommon->searchSpcId);
5732 DU_LOG("Control Resource Set ID %ld\n", pdcchCfgCommon->ctrlRsrcSetId);
5733 DU_LOG("Monitoring Slot Periodicity and Offset Present %d\n", pdcchCfgCommon->monitorSlotPrdAndOffPresent);
5734 DU_LOG("Monitoring Slot Periodicity and Offset %ld\n", pdcchCfgCommon->monitorSlotPrdAndOff);
5735 for (monitoringSymbIdx = 0; monitoringSymbIdx < 2; monitoringSymbIdx++)
5737 DU_LOG("Monitoring Symbols in Slot [%d] %d\n",monitoringSymbIdx, pdcchCfgCommon->monitorSymbolsInSlot[monitoringSymbIdx]);
5739 DU_LOG("Number of Candidates for Aggregation Level_1 %ld\n", pdcchCfgCommon->numCandAggLvl1);
5740 DU_LOG("Number of Candidates for Aggregation Level_2 %ld\n", pdcchCfgCommon->numCandAggLvl2);
5741 DU_LOG("Number of Candidates for Aggregation Level_4 %ld\n", pdcchCfgCommon->numCandAggLvl4);
5742 DU_LOG("Number of Candidates for Aggregation Level_8 %ld\n", pdcchCfgCommon->numCandAggLvl8);
5743 DU_LOG("Number of Candidates for Aggregation Level_16 %ld\n", pdcchCfgCommon->numCandAggLvl16);
5744 DU_LOG("Seach Space Type %d\n", pdcchCfgCommon->searchSpcType);
5745 DU_LOG("Common Search Space DCI Format %d\n", pdcchCfgCommon->commSrchSpcDciFrmt);
5746 DU_LOG("SIB1 Search Space ID %ld\n", pdcchCfgCommon->searchSpcSib1);
5747 DU_LOG("Paging Search Space ID %ld\n", pdcchCfgCommon->pagingSearchSpc);
5748 DU_LOG("RA Search Space ID %ld\n", pdcchCfgCommon->raSearchSpc);
5752 DU_LOG("PDCCH Config Common not Present");
5755 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PDSCH Config Common ** \n");
5756 pdschCfgCommon = &dlCfgCmn->pdschCfg;
5757 DU_LOG("PDSCH Config Common Present %d\n", pdschCfgCommon->present);
5758 if(pdschCfgCommon->present)
5760 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCommon->numTimeDomRsrcAlloc);
5761 for (rsrcIdx = 0; rsrcIdx < pdschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
5763 pdschTimeDomRsrcAlloc = &pdschCfgCommon->timeDomAlloc[rsrcIdx];
5764 DU_LOG("PDSCH Timer Domain Resource Allocation [%d]", rsrcIdx);
5765 DU_LOG("K0 %ld\n", pdschTimeDomRsrcAlloc->k0);
5766 DU_LOG("MappingType %ld\n", pdschTimeDomRsrcAlloc->mapType);
5767 DU_LOG("SLIV %d\n", pdschTimeDomRsrcAlloc->sliv);
5772 DU_LOG("PDSCH Config Common not Present");
5775 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : BCCH Config Common ** \n");
5776 bcchCfg = &dlCfgCmn->bcchCfg;
5777 DU_LOG("Modification Period Coefficient %ld\n", bcchCfg->modPrdCoeff);
5779 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PCCH Config Common ** \n");
5780 pcchCfg = &dlCfgCmn->pcchCfg;
5781 DU_LOG("Default Paging Cycle %d\n", pcchCfg->dfltPagingCycle);
5782 DU_LOG("Number of PF in Paging Cycle %d\n", pcchCfg->nAndPagingFrmOffsetType);
5783 DU_LOG("PF Offset %d\n", pcchCfg->pageFrameOffset);
5784 DU_LOG("NS - Number of P0 in PF %d\n", pcchCfg->ns);
5785 DU_LOG("First PDCCH Monitoring Occassion of each P0 Type %d\n", pcchCfg->firstPDCCHMontioringType);
5786 for (poIdx = 0; poIdx < MAX_PO_PER_PF; poIdx++)
5788 DU_LOG("First PDCCH Monitoring Occassion in P0 [%d] %d\n", poIdx, pcchCfg->firstPDCCHMontioringInfo[poIdx]);
5791 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common ** \n");
5792 ulCfgCmn = &srvCellCfgCmnSib->ulCfg;
5793 DU_LOG("Frequency Band Indicator %ld\n", ulCfgCmn->freqBandInd);
5794 DU_LOG("Maximum Transmission Power %ld\n", ulCfgCmn->pMax);
5795 DU_LOG("Frequency Location and Bandwidth %ld\n", ulCfgCmn->locAndBw);
5796 DU_LOG("Time Alignment Timer %ld\n", ulCfgCmn->timeAlignTimerComm);
5797 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsOffset);
5798 DU_LOG("Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scs);
5799 DU_LOG("Carrier BW considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsBw);
5801 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : RACH Config Common ** \n");
5802 rachCfgCmn = &ulCfgCmn ->rachCfg;
5803 if(rachCfgCmn->present)
5805 DU_LOG("PRACH Configuration Index %ld\n", rachCfgCmn->prachCfgIdx);
5806 DU_LOG("Number of PRACH FDM %ld\n", rachCfgCmn->msg1Fdm);
5807 DU_LOG("PRACH Frequeny Start Offset %ld\n", rachCfgCmn->msg1FreqStart);
5808 DU_LOG("Zero Correaltion Zone Configuration %ld\n", rachCfgCmn->zeroCorrZoneCfg);
5809 DU_LOG("Target Power Level of Received Preamble %ld\n", rachCfgCmn->preambleRcvdTgtPwr);
5810 DU_LOG("Maximum number of Preamble Transmission %ld\n", rachCfgCmn->preambleTransMax);
5811 DU_LOG("Power Ramping Step %ld\n", rachCfgCmn->pwrRampingStep);
5812 DU_LOG("RA Response Window %ld\n", rachCfgCmn->raRspWindow);
5813 DU_LOG("Total Number of RA Preambles %ld\n", rachCfgCmn->numRaPreamble);
5814 DU_LOG("Number of SSB per RACH Occassion %ld\n", rachCfgCmn->numSsbPerRachOcc);
5815 DU_LOG("Number of Contention Based Preamble per SSB %ld\n", rachCfgCmn->numCbPreamblePerSsb);
5816 DU_LOG("Contention Resolution Timer %ld\n", rachCfgCmn->contResTimer);
5817 DU_LOG("RSRP Threshold %ld\n", rachCfgCmn->rsrpThreshSsb);
5818 DU_LOG("Root Sequence Index Present %d\n", rachCfgCmn->rootSeqIdxPresent);
5819 DU_LOG("Root Sequence Index %ld\n", rachCfgCmn->rootSeqIdx);
5820 DU_LOG("Subcarrier Spacing %ld\n", rachCfgCmn->msg1Scs);
5821 DU_LOG("Restricted Set Configuration %ld\n", rachCfgCmn->restrictedSetCfg);
5825 DU_LOG("RACH Config Common not present\n");
5828 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUSCH Config Common ** \n");
5829 puschCfgCommon = &ulCfgCmn ->puschCfg;
5830 if(puschCfgCommon->puschCfgPresent)
5832 DU_LOG("MSG3 Delta from RACH Preamble %ld\n", puschCfgCommon->msg3DeltaPreamble);
5833 DU_LOG("P0 Nominal With Grant %ld\n", puschCfgCommon->p0NominalWithGrant);
5834 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCommon->numTimeDomRsrcAlloc);
5835 for(rsrcIdx = 0; rsrcIdx < puschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
5837 puschCmnTimeDomRsrsAlloc = &puschCfgCommon ->timeDomAllocList[rsrcIdx];
5838 DU_LOG("Time Domain Resource Alloc [%d]", rsrcIdx);
5839 DU_LOG("\tK2 %ld\n", puschCmnTimeDomRsrsAlloc->k2);
5840 DU_LOG("\tMapping Type %ld\n", puschCmnTimeDomRsrsAlloc->mapType);
5841 DU_LOG("\tSLIV %d\n", puschCmnTimeDomRsrsAlloc->sliv);
5846 DU_LOG("PUSCH Config Common not present\n");
5849 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUCCH Config Common **\n");
5850 pucchCfgCommon = &ulCfgCmn->pucchCfg;
5851 if(pucchCfgCommon->present)
5853 DU_LOG("Resource Common %ld\n", pucchCfgCommon->rsrcComm);
5854 DU_LOG("Group Hopping %ld\n", pucchCfgCommon->grpHop);
5855 DU_LOG("P0 Nominal %ld\n", pucchCfgCommon->p0Nominal);
5859 DU_LOG("PUCCH Config Common not present\n");
5862 DU_LOG("\n ** SIB1 : Serving Cell Config Common : TDD UL DL Config Common ** \n");
5863 tddUlDlCfgCmn = &srvCellCfgCmnSib->tddCfg;
5864 DU_LOG("Reference Subcarrier Spacing %ld\n", tddUlDlCfgCmn->refScs);
5865 DU_LOG("Transmission Periodicity %ld\n", tddUlDlCfgCmn->txPrd);
5866 DU_LOG("Number of DL Slots %ld\n", tddUlDlCfgCmn->numDlSlots);
5867 DU_LOG("Number of DL Symbols %ld\n", tddUlDlCfgCmn->numDlSymbols);
5868 DU_LOG("Number of UL Slots %ld\n", tddUlDlCfgCmn->numUlSlots);
5869 DU_LOG("Number of UL Symbols %ld\n", tddUlDlCfgCmn->numUlSymbols);
5871 DU_LOG("\n ** MAC SLICE CONFIG REQUEST ** \n");
5872 macSliceCfg = &duCfgParam.tempSliceCfg;
5873 DU_LOG("Number of RRM Policy %d\n",macSliceCfg->numOfRrmPolicy);
5875 for(policyIdx = 0; policyIdx < macSliceCfg->numOfRrmPolicy; policyIdx++)
5877 rrmPolicy = macSliceCfg->listOfRrmPolicy[policyIdx];
5878 DU_LOG("RRM Policy [%d]\n", policyIdx);
5879 DU_LOG("\tResource Type %d\n", rrmPolicy->resourceType);
5881 rrmPolicyRatio = &rrmPolicy ->policyRatio;
5882 DU_LOG("\tPolicy Maximum Ratio %d\n", rrmPolicyRatio->maxRatio);
5883 DU_LOG("\tPolicy Minimum Ratio %d\n", rrmPolicyRatio->minRatio);
5884 DU_LOG("\tPolicy Deidcated Ration %d\n", rrmPolicyRatio->dedicatedRatio);
5885 DU_LOG("\tNumber of RRM Policy Member %d\n", rrmPolicy->numOfRrmPolicyMem);
5887 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
5889 rrmPolicyMemberList = rrmPolicy->rRMPolicyMemberList[memIdx];
5890 DU_LOG("\tRRM Policy Member [%d]\n", memIdx);
5891 DU_LOG("\t\tPLMN : mcc[0] %d\n", rrmPolicyMemberList->plmn.mcc[0]);
5892 DU_LOG("\t\tPLMN : mcc[1] %d\n", rrmPolicyMemberList->plmn.mcc[1]);
5893 DU_LOG("\t\tPLMN : mcc[2] %d\n", rrmPolicyMemberList->plmn.mcc[2]);
5894 DU_LOG("\t\tPLMN : mnc[0] %d\n", rrmPolicyMemberList->plmn.mnc[0]);
5895 DU_LOG("\t\tPLMN : mnc[1] %d\n", rrmPolicyMemberList->plmn.mnc[1]);
5896 DU_LOG("\t\tPLMN : mnc[2] %d\n", rrmPolicyMemberList->plmn.mnc[2]);
5897 DU_LOG("\t\tSST %d\n",rrmPolicyMemberList->snssai.sst);
5898 DU_LOG("\t\tSD %d %d %d\n",rrmPolicyMemberList->snssai.sd[0],rrmPolicyMemberList->snssai.sd[1],rrmPolicyMemberList->snssai.sd[2]);
5903 /**********************************************************************
5905 **********************************************************************/