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 Copy Slice Cfg in temp structre in duCfgParams
111 * Function : cpyRrmPolicyInDuCfgParams
114 * - Copy Slice Cfg in temp structre in duCfgParams
116 * @params[in] RrmPolicy rrmPolicy[], uint8_t policyNum, uint8_t memberList
117 * @return ROK - success
120 * ****************************************************************/
121 uint8_t cpyRrmPolicyInDuCfgParams(RrmPolicyList rrmPolicy[], uint8_t policyNum, MacSliceCfgReq *tempSliceCfg)
123 uint8_t policyIdx = 0, memberListIdx = 0;
126 tempSliceCfg->numOfRrmPolicy = policyNum;
127 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy, tempSliceCfg->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
128 if(!tempSliceCfg->listOfRrmPolicy)
130 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
134 for(policyIdx = 0; policyIdx<tempSliceCfg->numOfRrmPolicy; policyIdx++)
136 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
137 if(!tempSliceCfg->listOfRrmPolicy[policyIdx])
139 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
143 tempSliceCfg->listOfRrmPolicy[policyIdx]->resourceType = rrmPolicy[policyIdx].resourceType;
145 tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem = rrmPolicy[policyIdx].rRMMemberNum;
147 if(tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem)
149 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList,\
150 tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
152 if(!tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList)
154 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
159 for(memberListIdx = 0; memberListIdx<tempSliceCfg->listOfRrmPolicy[policyIdx]->numOfRrmPolicyMem; memberListIdx++)
161 DU_ALLOC_SHRABL_BUF(tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx], sizeof(RrmPolicyMemberList));
162 if(!tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx])
164 DU_LOG("\nERROR --> DU APP : Memory allocation failed in cpyRrmPolicyInDuCfgParams");
167 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->snssai.sd,\
168 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].sd, 3 * sizeof(uint8_t));
169 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->snssai.sst,\
170 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].sst, sizeof(uint8_t));
171 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->plmn.mcc,\
172 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].mcc, 3 * sizeof(uint8_t));
173 memcpy(&tempSliceCfg->listOfRrmPolicy[policyIdx]->rRMPolicyMemberList[memberListIdx]->plmn.mnc,\
174 &rrmPolicy[policyIdx].rRMPolicyMemberList[memberListIdx].mnc, 3 * sizeof(uint8_t));
176 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.maxRatio = rrmPolicy[policyIdx].rRMPolicyMaxRatio;
177 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.minRatio = rrmPolicy[policyIdx].rRMPolicyMinRatio;
178 tempSliceCfg->listOfRrmPolicy[policyIdx]->policyRatio.dedicatedRatio = rrmPolicy[policyIdx].rRMPolicyDedicatedRatio;
186 /*******************************************************************
188 * @brief Fill SCTP Parameters
192 * Function : parseSctpParams
194 * Functionality: Fill SCTP Parameters
196 * @params[in] XML document pointer
198 * Current node in XML
199 * Pointer to structure to be filled
200 * @return ROK - success
203 * ****************************************************************/
204 uint8_t parseSctpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SctpParams *sctp)
206 uint8_t max_du_port = 0;
207 uint16_t f1_sctp_port = 0;
208 uint16_t e2_sctp_port = 0;
210 memset(sctp, 0, sizeof(SctpParams));
211 cur = cur->xmlChildrenNode;
215 sctp->duPort[F1_INTERFACE] = g_cfg.DU_Port;
216 sctp->duPort[E2_INTERFACE] = g_cfg.RIC_Port;
217 sctp->cuPort = g_cfg.CU_Port;
218 sctp->ricPort = g_cfg.RIC_Port;
220 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_DU_PORT")) && (cur->ns == ns))
222 max_du_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
223 if (max_du_port == 2 )
225 sctp->duPort[F1_INTERFACE] = f1_sctp_port; /* DU Port idx 0 */
226 sctp->duPort[E2_INTERFACE] = e2_sctp_port; /* RIC Port idx 1 */
230 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SCTP_PORT")) && (cur->ns == ns))
232 f1_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
234 if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_SCTP_PORT")) && (cur->ns == ns))
236 e2_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
239 sctp->cuPort = f1_sctp_port;
240 sctp->ricPort = e2_sctp_port;
247 /*******************************************************************
249 * @brief Fill EGTP Parameters
253 * Function : parseEgtpParams
255 * Functionality: Fill EGTP Parmeters
257 * @params[in] XML document pointer
259 * Current node in XML
260 * Pointer to structure to be filled
261 * @return ROK - success
264 * ****************************************************************/
265 uint8_t parseEgtpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1EgtpParams *egtp)
267 memset(egtp, 0, sizeof(F1EgtpParams));
268 cur = cur->xmlChildrenNode;
271 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_F1_EGTP_PORT")) && (cur->ns == ns))
273 egtp->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
275 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEST_F1_EGTP_PORT")) && (cur->ns == ns))
277 egtp->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
279 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_TEID")) && (cur->ns == ns))
281 egtp->minTunnelId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
288 /*******************************************************************
290 * @brief Fill MIB configuration
294 * Function : parseMibParams
296 * Functionality: Fill MIB configuration
298 * @params[in] XML document pointer
300 * Current node in XML
301 * Pointer to structure to be filled
302 * @return ROK - success
305 * ****************************************************************/
306 uint8_t parseMibParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MibParams *mib)
308 memset(mib, 0, sizeof(MibParams));
309 cur = cur -> xmlChildrenNode;
312 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SYS_FRAME_NUM")) && (cur->ns == ns))
314 mib->sysFrmNum = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
316 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUB_CARR_SPACE")) && (cur->ns == ns))
318 mib->subCarrierSpacingCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
320 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFFSET")) && (cur->ns == ns))
322 mib->ssb_SubcarrierOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
324 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPEA_POSITION")) && (cur->ns == ns))
326 mib->dmrs_TypeA_Position = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
328 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
330 mib->controlResourceSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
332 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
334 mib->searchSpaceZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
336 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_BARRED")) && (cur->ns == ns))
338 mib->cellBarred = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
340 if ((!xmlStrcmp(cur->name, (const xmlChar *)"INTRA_FREQ_RESELECT")) && (cur->ns == ns))
342 mib->intraFreqReselection = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
349 /*******************************************************************
351 * @brief Fill PLMN ID
355 * Function : parsePlmn
357 * Functionality: Fill PLMN ID
359 * @params[in] XML document pointer
361 * Current node in XML
362 * Pointer to structure to be filled
363 * @return ROK - success
366 * ****************************************************************/
367 uint8_t parsePlmn(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Plmn *plmn)
369 xmlNodePtr child = NULLP;
371 memset(plmn, 0, sizeof(Plmn));
372 cur = cur->xmlChildrenNode;
375 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MCC")) && (cur->ns == ns))
377 child = cur->xmlChildrenNode;
378 while (child != NULL)
380 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MCC0")) && (child->ns == ns))
382 plmn->mcc[0] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
385 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MCC1")) && (child->ns == ns))
387 plmn->mcc[1] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
390 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MCC2")) && (child->ns == ns))
392 plmn->mcc[2] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
399 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MNC")) && (cur->ns == ns))
401 child = cur->xmlChildrenNode;
402 while (child != NULL)
404 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MNC0")) && (child->ns == ns))
406 plmn->mnc[0] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
409 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MNC1")) && (child->ns == ns))
411 plmn->mnc[1] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
414 if ((!xmlStrcmp(child->name, (const xmlChar *)"PLMN_MNC2")) && (child->ns == ns))
416 plmn->mnc[2] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
428 /*******************************************************************
434 * Function : parseNrCgi
436 * Functionality: Fill NR CGI
438 * @params[in] XML document pointer
440 * Current node in XML
441 * Pointer to structure to be filled
442 * @return ROK - success
445 * ****************************************************************/
446 uint8_t parseNrCgi(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrEcgi *nrCgi)
448 memset(nrCgi, 0, sizeof(NrEcgi));
449 cur = cur->xmlChildrenNode;
452 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
454 if(parsePlmn(doc, ns, cur, &nrCgi->plmn) != ROK)
460 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
462 nrCgi-> cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
470 /*******************************************************************
476 * Function : parseSnssai
478 * Functionality: Fill SNSSAI
480 * @params[in] XML document pointer
482 * Current node in XML
483 * Pointer to structure to be filled
484 * @return ROK - success
487 * ****************************************************************/
488 uint8_t parseSnssai(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Snssai *snssai)
493 memset(snssai, 0, sizeof(Snssai));
494 cur = cur ->xmlChildrenNode;
497 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SST")) && (cur->ns == ns))
499 snssai->sst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
502 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SD_SIZE")) && (cur->ns == ns))
504 child = cur->xmlChildrenNode;
507 if ((!xmlStrcmp(child->name, (const xmlChar *)"SD")) && (child->ns == ns))
509 snssai->sd[sdIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
512 child = child -> next;
521 /*******************************************************************
523 * @brief Fill Supported Slice List
527 * Function : parseSupportedSliceList
529 * Functionality: Fill Supported Slice List
531 * @params[in] XML document pointer
533 * Current node in XML
534 * Pointer to structure to be filled
535 * @return ROK - success
538 * ****************************************************************/
539 uint8_t parseSupportedSliceList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SupportedSliceList *sliceSuppLst)
541 uint8_t sliceIdx = 0;
542 xmlNodePtr child = NULLP;
544 memset(sliceSuppLst, 0, sizeof(SupportedSliceList));
545 cur = cur->xmlChildrenNode;
548 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SUPPORT_SLICE")) && (cur->ns == ns))
550 sliceSuppLst->numSupportedSlices = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
551 if(sliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
553 DU_LOG("\nERROR --> DU_APP: %s: Number of supported slice [%d] is more than 1024",\
554 __func__, sliceSuppLst->numSupportedSlices);
559 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI_LIST")) && (cur->ns == ns))
561 DU_ALLOC_SHRABL_BUF(sliceSuppLst->snssai, (sliceSuppLst->numSupportedSlices) * sizeof(Snssai*));
562 if (sliceSuppLst->snssai == NULLP)
564 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
568 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
570 DU_ALLOC_SHRABL_BUF(sliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
571 if (sliceSuppLst->snssai[sliceIdx] == NULLP)
573 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
579 memcpy(sliceSuppLst->snssai[sliceIdx]->sd, cellParams.plmnList[sliceIdx].sd, SD_SIZE*sizeof(uint8_t));
580 sliceSuppLst->snssai[sliceIdx]->sst = cellParams.plmnList[sliceIdx].sst;
587 child = cur->xmlChildrenNode;
588 while (child != NULL)
590 if ((!xmlStrcmp(child->name, (const xmlChar *)"SNSSAI")) && (child->ns == ns))
592 if(parseSnssai(doc, ns, child, sliceSuppLst->snssai[sliceIdx]) != ROK)
608 /*******************************************************************
610 * @brief Fill Served PLMN
614 * Function : parseF1SrvdPlmn
616 * Functionality: Fill Served PLMN
618 * @params[in] XML document pointer
620 * Current node in XML
621 * Pointer to structure to be filled
622 * @return ROK - success
625 * ****************************************************************/
626 uint8_t parseF1SrvdPlmn(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1SrvdPlmn *srvdPlmn, uint8_t srvdPlmnIdx)
628 memset(srvdPlmn, 0, sizeof(F1SrvdPlmn));
629 cur = cur->xmlChildrenNode;
633 fillPlmnFromO1(&srvdPlmn ->plmn, srvdPlmnIdx);
635 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
637 if(parsePlmn(doc, ns, cur, &srvdPlmn->plmn) != ROK)
644 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
646 if(parsePlmn(doc, ns, cur, &srvdPlmn->extPlmn) != ROK)
652 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
654 if(parseSupportedSliceList(doc, ns, cur, &srvdPlmn->taiSliceSuppLst) != ROK)
665 /*******************************************************************
667 * @brief Fill cell information
671 * Function : parseF1CellInfo
673 * Functionality: Fill cell information
675 * @params[in] XML document pointer
677 * Current node in XML
678 * Pointer to structure to be filled
679 * @return ROK - success
682 * ****************************************************************/
683 uint8_t parseF1CellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1CellInfo *f1CellInfo)
685 memset(f1CellInfo, 0, sizeof(F1CellInfo));
686 cur = cur->xmlChildrenNode;
689 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CGI")) && (cur->ns == ns))
691 if(parseNrCgi(doc, ns, cur, &f1CellInfo->nrCgi) != ROK)
698 f1CellInfo->nrPci = cellParams.nRPCI;
700 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
702 f1CellInfo->nrPci = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
706 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SRVD_PLMN")) && (cur->ns == ns))
708 if(parseF1SrvdPlmn(doc, ns, cur, &f1CellInfo->srvdPlmn[0], 0) != ROK)
719 /*******************************************************************
721 * @brief Fill Frequency Band
725 * Function : parseF1FreqBand
727 * Functionality: Fill Frequency Band
729 * @params[in] XML document pointer
731 * Current node in XML
732 * Pointer to structure to be filled
733 * @return ROK - success
736 * ****************************************************************/
737 uint8_t parseF1FreqBand(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1FreqBand *freqBand)
740 uint16_t sulValue = 0;
743 memset(freqBand, 0, sizeof(F1FreqBand));
744 cur = cur->xmlChildrenNode;
747 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
749 freqBand->nrFreqBand = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
752 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_BAND_LIST")) && (cur->ns == ns))
754 child = cur->xmlChildrenNode;
755 while (child != NULL)
758 if ((!xmlStrcmp(child->name, (const xmlChar *)"SUL_BAND")) && (child->ns == ns))
760 sulValue = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
761 if (sulIdx < MAX_NRCELL_BANDS)
763 freqBand->sulBand[sulIdx] = sulValue;
768 DU_LOG("ERROR --> DU_APP : %s : SUL_BAND array overflow\n", __func__);
780 /*******************************************************************
782 * @brief Fill Frequency Band List
786 * Function : parseF1FreqBandList
788 * Functionality: Fill Frequency Band List
790 * @params[in] XML document pointer
792 * Current node in XML
793 * Pointer to structure to be filled
794 * @return ROK - success
797 * ****************************************************************/
798 uint8_t parseF1FreqBandList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFreqInfo *nrFreqInfo)
802 cur = cur->xmlChildrenNode;
805 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_FREQ_BAND")) && (cur->ns == ns))
807 if(parseF1FreqBand(doc, ns, cur, &nrFreqInfo->freqBand[idx]) != ROK)
818 /*******************************************************************
820 * @brief Fill Transmission Bandwidth
824 * Function : parseF1TxBw
826 * Functionality: Fill Transmission Bandwidth
828 * @params[in] XML document pointer
830 * Current node in XML
831 * Pointer to structure to be filled
832 * @return ROK - success
835 * ****************************************************************/
836 uint8_t parseF1TxBw(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1TxBw *txBw)
838 memset(txBw, 0, sizeof(F1TxBw));
839 cur = cur->xmlChildrenNode;
843 txBw->nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
845 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_SCS")) && (cur->ns == ns))
847 txBw->nrScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
851 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NRB")) && (cur->ns == ns))
853 txBw->nrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
861 /*******************************************************************
863 * @brief Fill SUL Info
867 * Function : parseF1SulInfo
869 * Functionality: Fill SUL Info
871 * @params[in] XML document pointer
873 * Current node in XML
874 * Pointer to structure to be filled
875 * @return ROK - success
878 * ****************************************************************/
879 uint8_t parseF1SulInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1SulInfo *sulInfo)
881 memset(sulInfo, 0, sizeof(F1SulInfo));
882 cur = cur->xmlChildrenNode;
886 sulInfo->sulArfcn = cellParams.arfcnSUL;
888 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_ARFCN")) && (cur->ns == ns))
890 sulInfo->sulArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
894 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
896 if(parseF1TxBw(doc, ns, cur, &sulInfo->sulTxBw) != ROK)
907 /*******************************************************************
909 * @brief Fill NR Frequency Info
913 * Function : parseF1NrFreqInfo
915 * Functionality: Fill NR Frequency Info
917 * @params[in] XML document pointer
919 * Current node in XML
920 * Pointer to structure to be filled
921 * @return ROK - success
924 * ****************************************************************/
925 uint8_t parseF1NrFreqInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFreqInfo *nrFreqInfo)
927 memset(nrFreqInfo, 0, sizeof(F1NrFreqInfo));
928 cur = cur->xmlChildrenNode;
932 nrFreqInfo->nrArfcn = cellParams.arfcnUL;
934 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_ARFCN")) && (cur->ns == ns))
936 nrFreqInfo->nrArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
940 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SUL_INFO")) && (cur->ns == ns))
942 if(parseF1SulInfo(doc, ns, cur, &nrFreqInfo->sulInfo) != ROK)
948 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_FREQ_BAND_LIST")) && (cur->ns == ns))
950 if(parseF1FreqBandList(doc, ns, cur, nrFreqInfo) != ROK)
961 /*******************************************************************
963 * @brief Fill NR FDD Info
967 * Function : parseF1NrFddInfo
969 * Functionality: Fill NR FDD Info
971 * @params[in] XML document pointer
973 * Current node in XML
974 * Pointer to structure to be filled
975 * @return ROK - success
978 * ****************************************************************/
979 uint8_t parseF1NrFddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrFddInfo *fddInfo)
981 memset(fddInfo, 0, sizeof(F1NrFddInfo));
982 cur = cur->xmlChildrenNode;
985 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO_UL")) && (cur->ns == ns))
987 if(parseF1NrFreqInfo(doc, ns, cur, &fddInfo->ulNrFreqInfo) != ROK)
993 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO_DL")) && (cur->ns == ns))
995 if(parseF1NrFreqInfo(doc, ns, cur, &fddInfo->dlNrFreqInfo) != ROK)
1001 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW_UL")) && (cur->ns == ns))
1003 if(parseF1TxBw(doc, ns, cur, &fddInfo->ulTxBw) != ROK)
1009 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW_DL")) && (cur->ns == ns))
1011 if(parseF1TxBw(doc, ns, cur, &fddInfo->dlTxBw) != ROK)
1023 /*******************************************************************
1025 * @brief Fill NR TDD Info
1029 * Function : parseF1NrTddInfo
1031 * Functionality: Fill NR TDD Info
1033 * @params[in] XML document pointer
1035 * Current node in XML
1036 * Pointer to structure to be filled
1037 * @return ROK - success
1040 * ****************************************************************/
1041 uint8_t parseF1NrTddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrTddInfo *tddInfo)
1043 memset(tddInfo, 0, sizeof(F1NrTddInfo));
1044 cur = cur->xmlChildrenNode;
1047 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO")) && (cur->ns == ns))
1049 if(parseF1NrFreqInfo(doc, ns, cur, &tddInfo->nrFreqInfo) != ROK)
1055 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
1057 if(parseF1TxBw(doc, ns, cur, &tddInfo->nrTxBw) != ROK)
1069 /*******************************************************************
1071 * @brief Fill NR Mode Info
1075 * Function : parseNrModeInfo
1077 * Functionality: Fill NR Mode Info
1079 * @params[in] XML document pointer
1081 * Current node in XML
1082 * Pointer to structure to be filled
1083 * @return ROK - success
1086 * ****************************************************************/
1087 uint8_t parseNrModeInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrModeInfo *nrModeInfo)
1091 memset(nrModeInfo, 0, sizeof(NrModeInfo));
1092 cur = cur->xmlChildrenNode;
1095 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE")) && (cur->ns == ns))
1097 strcpy((char*)modeCfg, (char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1101 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FDD_INFO")) && (cur->ns == ns))
1103 if(strcmp(modeCfg, "FDD") == 0)
1105 if(parseF1NrFddInfo(doc, ns, cur, &nrModeInfo->mode.fdd) != ROK)
1112 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_TDD_INFO")) && (cur->ns == ns))
1114 if(strcmp(modeCfg, "TDD") == 0)
1116 if(parseF1NrTddInfo(doc, ns, cur, &nrModeInfo->mode.tdd) != ROK)
1129 /*******************************************************************
1131 * @brief Fill Broadcast PLMN Information
1135 * Function : parseF1BrdcstPlmnInfo
1137 * Functionality: Fill Broadcast PLMN Information
1139 * @params[in] XML document pointer
1141 * Current node in XML
1142 * Pointer to structure to be filled
1143 * @return ROK - success
1146 * ****************************************************************/
1147 uint8_t parseF1BrdcstPlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1BrdcstPlmnInfo *brdcstPlmnInfo)
1149 memset(brdcstPlmnInfo, 0, sizeof(F1BrdcstPlmnInfo));
1150 cur = cur->xmlChildrenNode;
1153 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
1155 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->plmn[0]) != ROK)
1161 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
1163 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->extPlmn[0]) != ROK)
1169 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
1171 brdcstPlmnInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1174 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CELL_ID")) && (cur->ns == ns))
1176 brdcstPlmnInfo->nrCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1179 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_RANAC")) && (cur->ns == ns))
1181 brdcstPlmnInfo->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1189 /*******************************************************************
1191 * @brief Fill DU Cell Information
1195 * Function : parseF1DuCellInfo
1197 * Functionality: Fill DU Cell Information
1199 * @params[in] XML document pointer
1201 * Current node in XML
1202 * Pointer to structure to be filled
1203 * @return ROK - success
1206 * ****************************************************************/
1207 uint8_t parseF1DuCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuCellInfo *duCellInfo)
1209 memset(duCellInfo, 0, sizeof(F1DuCellInfo));
1210 cur = cur->xmlChildrenNode;
1213 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_INFO")) && (cur->ns == ns))
1215 if(parseF1CellInfo(doc, ns, cur, &duCellInfo->cellInfo) != ROK)
1222 duCellInfo->tac = cellParams.nRTAC;
1223 duCellInfo->epsTac = cellParams.nRTAC;
1225 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
1227 duCellInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1230 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EPS_TAC")) && (cur->ns == ns))
1232 duCellInfo->epsTac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1236 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE_INFO")) && (cur->ns == ns))
1238 if(parseNrModeInfo(doc, ns, cur, &duCellInfo->f1Mode) != ROK)
1244 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_CFG")) && (cur->ns == ns))
1246 duCellInfo->measTimeCfgDuration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1249 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_DIR")) && (cur->ns == ns))
1251 duCellInfo->cellDir = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1254 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_TYPE")) && (cur->ns == ns))
1256 duCellInfo->cellType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1259 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_BRDCST_PLMN_INFO")) && (cur->ns == ns))
1261 if(parseF1BrdcstPlmnInfo(doc, ns, cur, &duCellInfo->brdcstPlmnInfo[0]) != ROK)
1271 /*******************************************************************
1273 * @brief Fill DU served cell information
1277 * Function : parseF1DuServedCellInfo
1279 * Functionality: Fill DU served cell information
1281 * @params[in] XML document pointer
1283 * Current node in XML
1284 * Pointer to structure to be filled
1285 * @return ROK - success
1288 * ****************************************************************/
1289 uint8_t parseF1DuServedCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuSrvdCellInfo *srvdCellInfo)
1291 memset(srvdCellInfo, 0, sizeof(F1DuSrvdCellInfo));
1292 cur = cur->xmlChildrenNode;
1295 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_CELL_INFO")) && (cur->ns == ns))
1297 if(parseF1DuCellInfo(doc, ns, cur, &srvdCellInfo->duCellInfo) != ROK)
1305 if(fillDuSrvdCellSysInfo(&srvdCellInfo->duSysInfo) != ROK)
1312 /*******************************************************************
1314 * @brief Fill DU Served Cell System Information
1318 * Function : fillDuSrvdCellSysInfo
1320 * Functionality: Fill DU Served Cell System Information
1322 * @params[in] Served Cell System Information
1323 * @return ROK - success
1326 * ****************************************************************/
1327 uint8_t fillDuSrvdCellSysInfo(F1DuSysInfo *sysInfo)
1329 /* GNB DU System Info MIB msg */
1331 DU_ALLOC(sysInfo->mibMsg, encBufSize);
1332 if(!(sysInfo->mibMsg))
1334 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
1337 memcpy(sysInfo->mibMsg, encBuf, encBufSize);
1338 sysInfo->mibLen = encBufSize;
1340 /* GNB DU System Info SIB1 msg */
1342 DU_ALLOC(sysInfo->sib1Msg, encBufSize);
1343 if(!(sysInfo->sib1Msg))
1345 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
1348 memcpy(sysInfo->sib1Msg, encBuf,encBufSize);
1349 sysInfo->sib1Len = encBufSize;
1355 /*******************************************************************
1357 * @brief Fill PLMN received from O1 interface
1361 * Function : fillPlmnFromO1
1363 * Functionality: Fill PLMN received from O1 interface
1365 * @params[in] XML document pointer
1367 * Current node in XML
1368 * Pointer to structure to be filled
1369 * @return ROK - success
1372 * ****************************************************************/
1373 void fillPlmnFromO1(Plmn *PLMN, uint8_t srvdPlmnIdx)
1375 PLMN->mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
1376 PLMN->mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
1377 PLMN->mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
1378 PLMN->mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
1379 PLMN->mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
1380 PLMN->mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
1384 /*******************************************************************
1386 * @brief Fill Beamforming Configuration
1390 * Function : parseBeamformingConfig
1392 * Functionality: Fill Beamforming Configuration
1394 * @params[in] XML document pointer
1396 * Current node in XML
1397 * Pointer to structure to be filled
1398 * @return ROK - success
1401 * ****************************************************************/
1402 uint8_t parseBeamformingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BeamformingConf *beamformingCfg)
1404 memset(beamformingCfg, 0, sizeof(BeamformingConf));
1405 cur = cur -> xmlChildrenNode;
1408 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_BEAMS")) && (cur->ns == ns))
1410 beamformingCfg->numOfBeams = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1413 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_RUS")) && (cur->ns == ns))
1415 beamformingCfg->numTxRUs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1418 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_IDX")) && (cur->ns == ns))
1420 beamformingCfg->beamIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1423 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TYPE")) && (cur->ns == ns))
1425 beamformingCfg->beamType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1428 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_AZIMUTH")) && (cur->ns == ns))
1430 beamformingCfg->beamAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1433 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TILT")) && (cur->ns == ns))
1435 beamformingCfg->beamTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1438 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_HORIZ_WIDTH")) && (cur->ns == ns))
1440 beamformingCfg->beamHorizWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1443 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_VERT_WIDTH")) && (cur->ns == ns))
1445 beamformingCfg->beamVertWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1448 if ((!xmlStrcmp(cur->name, (const xmlChar *)"COVER_SHAPE")) && (cur->ns == ns))
1450 beamformingCfg->coverageShape = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1453 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_TILT")) && (cur->ns == ns))
1455 beamformingCfg->digitalTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1458 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_AZIMUTH")) && (cur->ns == ns))
1460 beamformingCfg->digitalAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1468 /*******************************************************************
1470 * @brief Fill Precoding Configuration
1474 * Function : parsePrecodingConfig
1476 * Functionality: Fill Precoding Configuration
1478 * @params[in] XML document pointer
1480 * Current node in XML
1481 * Pointer to structure to be filled
1482 * @return ROK - success
1485 * ****************************************************************/
1486 uint8_t parsePrecodingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrecodingConf *precodCfg)
1488 memset(precodCfg, 0, sizeof(PrecodingConf));
1489 cur = cur -> xmlChildrenNode;
1492 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_LAYERS")) && (cur->ns == ns))
1494 precodCfg->numLayers = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1497 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ANT_PORTS")) && (cur->ns == ns))
1499 precodCfg->numAntPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1507 /*******************************************************************
1509 * @brief Fill PRACH FDM Information
1513 * Function : parsePrachFdmInfo
1515 * Functionality: Fill PRACH FDM Information
1517 * @params[in] XML document pointer
1519 * Current node in XML
1520 * Pointer to structure to be filled
1521 * @return ROK - success
1524 * ****************************************************************/
1525 uint8_t parsePrachFdmInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PrachFdmInfo *prachFdmInfo)
1527 memset(prachFdmInfo, 0, sizeof(PrachFdmInfo));
1528 cur = cur -> xmlChildrenNode;
1531 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
1533 prachFdmInfo->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1536 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ROOT_SEQ")) && (cur->ns == ns))
1538 prachFdmInfo->numRootSeq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1541 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K1")) && (cur->ns == ns))
1543 prachFdmInfo->k1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1546 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORR_ZONE_CFG")) && (cur->ns == ns))
1548 prachFdmInfo->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1556 /*******************************************************************
1558 * @brief Fill PRACH configuration
1562 * Function : parsePrachCfg
1564 * Functionality: Fill PRACH configuration
1566 * @params[in] XML document pointer
1568 * Current node in XML
1569 * Pointer to structure to be filled
1570 * @return ROK - success
1573 * ****************************************************************/
1574 uint8_t parsePrachCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrachCfg *prachCfg)
1578 uint8_t maxNumRbs = 0;
1579 uint8_t prachMaxPrb = 0;
1581 memset(prachCfg, 0, sizeof(PrachCfg));
1582 cur = cur -> xmlChildrenNode;
1585 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SEQ_LEN")) && (cur->ns == ns))
1587 prachCfg->prachSeqLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1590 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
1592 prachCfg->prachSubcSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1595 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
1597 prachCfg->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1600 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRACH_FDM")) && (cur->ns == ns))
1602 prachCfg->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1605 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FDM_LIST")) && (cur->ns == ns))
1607 child = cur->xmlChildrenNode;
1608 while(child != NULL)
1610 if ((!xmlStrcmp(child->name, (const xmlChar *)"FDM_INFO")) && (child->ns == ns))
1612 if(parsePrachFdmInfo(doc, ns, child, &prachCfg->fdm[fdmIdx]) != ROK)
1618 child = child -> next;
1622 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns == ns))
1624 prachCfg->prachRstSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1627 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PER_RACH")) && (cur->ns == ns))
1629 prachCfg->ssbPerRach = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1632 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
1634 prachCfg->totalNumRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1637 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
1639 prachCfg->numCbPreamblePerSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1642 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
1644 maxNumRbs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1647 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
1649 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1652 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
1654 prachCfg->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1657 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
1659 prachCfg->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1665 prachCfg->msg1FreqStart = maxNumRbs - prachMaxPrb;
1669 /*******************************************************************
1671 * @brief Fill CSI RS configuration
1675 * Function : parseCsiRsCfg
1677 * Functionality: Fill CSI RS configuration
1679 * @params[in] XML document pointer
1681 * Current node in XML
1682 * Pointer to structure to be filled
1683 * @return ROK - success
1686 * ****************************************************************/
1687 uint8_t parseCsiRsCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CsiRsCfg *csiRsCfg)
1689 uint8_t csiFreqDomainAlloc=0;
1690 memset(csiRsCfg, 0, sizeof(CsiRsCfg));
1691 cur = cur -> xmlChildrenNode;
1694 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_FREQ")) && (cur->ns == ns))
1696 csiFreqDomainAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1697 DU_ALLOC(csiRsCfg->csiFreqDomainAlloc, sizeof(uint8_t));
1698 if(!csiRsCfg->csiFreqDomainAlloc)
1700 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
1703 memcpy(csiRsCfg->csiFreqDomainAlloc, &csiFreqDomainAlloc, sizeof(uint8_t));
1706 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_PORTS")) && (cur->ns == ns))
1708 csiRsCfg->csiNrofPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1711 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT")) && (cur->ns == ns))
1713 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1716 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT_2")) && (cur->ns == ns))
1718 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1721 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DM_TYPE")) && (cur->ns == ns))
1723 csiRsCfg->csirscdmType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1726 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY")) && (cur->ns == ns))
1728 csiRsCfg->csirsdensity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1731 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY_DOT_5")) && (cur->ns == ns))
1733 csiRsCfg->csirsdensitydot5 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1736 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET")) && (cur->ns == ns))
1738 csiRsCfg->powerControlOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1741 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET_SS")) && (cur->ns == ns))
1743 csiRsCfg->powerControlOffsetSS = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1746 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY_OFFSET")) && (cur->ns == ns))
1748 csiRsCfg->periodicityAndOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1756 /*******************************************************************
1758 * @brief Fill SSB Configuration
1762 * Function : parseSsbCfg
1764 * Functionality: Fill SSB Configuration
1766 * @params[in] XML document pointer
1768 * Current node in XML
1769 * Pointer to structure to be filled
1770 * @return ROK - success
1773 * ****************************************************************/
1774 uint8_t parseSsbCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SsbCfg *ssbCfg)
1777 uint8_t ssbMaskIdx = 0;
1779 memset(ssbCfg, 0, sizeof( SsbCfg));
1780 cur = cur -> xmlChildrenNode;
1784 ssbCfg->scsCmn = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
1785 ssbCfg->ssbPeriod = convertSSBPeriodicityToEnum(cellParams.ssbPeriodicity);
1786 ssbCfg->ssbScOffset = cellParams.ssbOffset;
1788 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_CMN")) && (cur->ns == ns))
1790 ssbCfg->scsCmn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1793 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIOD")) && (cur->ns == ns))
1795 ssbCfg->ssbPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1798 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFFSET")) && (cur->ns == ns))
1800 ssbCfg->ssbScOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1804 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_OFFSET_PT_A")) && (cur->ns == ns))
1806 ssbCfg->ssbOffsetPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1809 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBSC_PWR")) && (cur->ns == ns))
1811 ssbCfg->ssbPbchPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1814 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_MASK_LIST")) && (cur->ns == ns))
1816 child = cur -> xmlChildrenNode;
1817 while(child != NULL)
1819 if ((!xmlStrcmp(child->name, (const xmlChar *)"SSB_MASK")) && (child->ns == ns))
1821 ssbCfg->ssbMask[ssbMaskIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1824 child = child -> next;
1828 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_ID")) && (cur->ns == ns))
1830 ssbCfg->beamId[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1833 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BETA_PSS")) && (cur->ns == ns))
1835 ssbCfg->betaPss = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1838 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCH_PAYLOAD_FLAG")) && (cur->ns == ns))
1840 ssbCfg->bchPayloadFlag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1843 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPE_A_POS")) && (cur->ns == ns))
1845 ssbCfg->dmrsTypeAPos = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1851 if(BuildMibPdu() != ROK)
1853 DU_LOG("\nERROR --> Failed to build MIB PDU");
1854 memset(&ssbCfg->mibPdu, 0, 3*sizeof(uint8_t));
1858 memcpy(&ssbCfg->mibPdu, encBuf, encBufSize);
1864 /*******************************************************************
1866 * @brief Fill Carrier Configuration
1870 * Function : parseCarrierCfg
1872 * Functionality: Fill Carrier Configuration
1874 * @params[in] XML document pointer
1876 * Current node in XML
1877 * Pointer to structure to be filled
1878 * @return ROK - success
1881 * ****************************************************************/
1882 uint8_t parseCarrierCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CarrierCfg *carrierCfg)
1884 memset(carrierCfg, 0, sizeof(CarrierCfg));
1885 cur = cur -> xmlChildrenNode;
1889 carrierCfg->dlBw = cellParams.bSChannelBwDL;
1890 carrierCfg->arfcnDL = cellParams.arfcnDL;
1891 carrierCfg->ulBw = cellParams.bSChannelBwUL;
1892 carrierCfg->arfcnUL = cellParams.arfcnUL;
1894 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_BW")) && (cur->ns == ns))
1896 carrierCfg->dlBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1899 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_DL_ARFCN")) && (cur->ns == ns))
1901 carrierCfg->arfcnDL = convertArfcnToFreqKhz(atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)));
1904 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_BW")) && (cur->ns == ns))
1906 carrierCfg->ulBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1909 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_UL_ARFCN")) && (cur->ns == ns))
1911 carrierCfg->arfcnUL = convertArfcnToFreqKhz(atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)));
1915 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_ANT")) && (cur->ns == ns))
1917 carrierCfg->numTxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1920 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RX_ANT")) && (cur->ns == ns))
1922 carrierCfg->numRxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1930 /*******************************************************************
1932 * @brief Fill PLMN Information List
1936 * Function : parsePlmnInfo
1938 * Functionality: Fill PLMN Information List
1940 * @params[in] XML document pointer
1942 * Current node in XML
1943 * Pointer to structure to be filled
1944 * @return ROK - success
1947 * ****************************************************************/
1948 uint8_t parsePlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PlmnInfoList *plmnInfoList)
1951 memset(plmnInfoList, 0, sizeof(PlmnInfoList));
1952 cur = cur -> xmlChildrenNode;
1955 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
1957 if(parsePlmn(doc, ns, cur,&plmnInfoList->plmn) != ROK)
1963 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
1965 if(parseSupportedSliceList(doc, ns, cur,&plmnInfoList -> suppSliceList) != ROK)
1976 /*******************************************************************
1978 * @brief Fill PUCCH Configuration Common
1982 * Function : parsePucchConfigCommon
1984 * Functionality: Fill PUCCH Configuration Common
1986 * @params[in] XML document pointer
1988 * Current node in XML
1989 * Pointer to structure to be filled
1990 * @return ROK - success
1993 * ****************************************************************/
1994 uint8_t parsePucchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PucchConfigCommon *pucchCfgCmn)
1996 memset(pucchCfgCmn, 0, sizeof(PucchConfigCommon));
1997 cur = cur -> xmlChildrenNode;
2000 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
2002 pucchCfgCmn->pucchResourceCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2005 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_NEITHER_HOPPING")) && (cur->ns == ns))
2007 pucchCfgCmn->pucchGroupHopping = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2015 /*******************************************************************
2017 * @brief Fill PUSCH Common Time Allocation
2021 * Function : parsePuschTimeDomRsrcAlloc
2023 * Functionality: Fill PUSCH Common Time Allocation
2025 * @params[in] XML document pointer
2027 * Current node in XML
2028 * Pointer to structure to be filled
2029 * @return ROK - success
2032 * ****************************************************************/
2033 uint8_t parsePuschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschTimeDomRsrcAlloc *puschTimeDomRsrsAlloc)
2035 memset(puschTimeDomRsrsAlloc, 0, sizeof(PuschTimeDomRsrcAlloc));
2036 cur = cur -> xmlChildrenNode;
2039 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_K2_CFG")) && (cur->ns == ns))
2041 puschTimeDomRsrsAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2044 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MAPPING_TYPE")) && (cur->ns == ns))
2046 puschTimeDomRsrsAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2049 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
2051 puschTimeDomRsrsAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2054 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
2056 puschTimeDomRsrsAlloc->symbolLength= atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2062 puschTimeDomRsrsAlloc -> startSymbolAndLength = \
2063 calcSliv(puschTimeDomRsrsAlloc->startSymbol, puschTimeDomRsrsAlloc->symbolLength);
2067 /*******************************************************************
2069 * @brief Fill PUSCH Configuration Common
2073 * Function : parsePuschConfigCommon
2075 * Functionality: Fill PUSCH Configuration Common
2077 * @params[in] XML document pointer
2079 * Current node in XML
2080 * Pointer to structure to be filled
2081 * @return ROK - success
2084 * ****************************************************************/
2085 uint8_t parsePuschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschConfigCommon *puschCfgCmn)
2088 xmlNodePtr child = NULLP;
2090 memset(puschCfgCmn, 0, sizeof(PuschConfigCommon));
2091 cur = cur -> xmlChildrenNode;
2094 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
2096 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2099 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
2101 child = cur->xmlChildrenNode;
2102 while(child != NULL)
2104 if ((!xmlStrcmp(child->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC")) && (child->ns == ns))
2106 if(parsePuschTimeDomRsrcAlloc(doc, ns, child, &puschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
2112 child = child -> next;
2120 /*******************************************************************
2122 * @brief Fill BWP Configuration
2126 * Function : parseBwp
2128 * Functionality: Fill BWP Configuration
2130 * @params[in] XML document pointer
2132 * Current node in XML
2133 * Pointer to structure to be filled
2134 * @return ROK - success
2137 * ****************************************************************/
2138 uint8_t parseBwp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpParams *bwp)
2140 memset(bwp, 0, sizeof(BwpParams));
2141 cur = cur -> xmlChildrenNode;
2144 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PRB")) && (cur->ns == ns))
2146 bwp->firstPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2149 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRB")) && (cur->ns == ns))
2151 bwp->numPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2154 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
2156 bwp->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2159 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NORMAL_CYCLIC_PREFIX")) && (cur->ns == ns))
2161 bwp->cyclicPrefix = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2169 /*******************************************************************
2171 * @brief Fill UL BWP Configuration
2175 * Function : parseBwpULConfig
2177 * Functionality: Fill UL BWP Configuration
2179 * @params[in] XML document pointer
2181 * Current node in XML
2182 * Pointer to structure to be filled
2183 * @return ROK - success
2186 * ****************************************************************/
2187 uint8_t parseBwpULConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpUlConfig *bwpUlCfg)
2189 memset(bwpUlCfg, 0, sizeof(BwpUlConfig));
2190 cur = cur -> xmlChildrenNode;
2193 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
2195 if(parseBwp(doc, ns, cur, &bwpUlCfg->bwp) != ROK)
2201 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
2203 if(parsePucchConfigCommon(doc, ns, cur, &bwpUlCfg->pucchCommon) != ROK)
2209 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
2211 if(parsePuschConfigCommon(doc, ns, cur, &bwpUlCfg->puschCommon) != ROK)
2221 /*******************************************************************
2223 * @brief Fill Page Configuration
2227 * Function : parsePageCfg
2229 * Functionality: Fill Page Configuration
2231 * @params[in] XML document pointer
2233 * Current node in XML
2234 * Pointer to structure to be filled
2235 * @return ROK - success
2238 * ****************************************************************/
2239 uint8_t parsePageCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SchPageCfg *pageCfg)
2243 memset(pageCfg, 0, sizeof(SchPageCfg));
2244 cur = cur -> xmlChildrenNode;
2247 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PO")) && (cur->ns == ns))
2249 pageCfg->numPO = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2252 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PO_PRESENT")) && (cur->ns == ns))
2254 poPresent = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
2255 if(!strcmp(poPresent, "TRUE"))
2257 pageCfg->poPresent = true;
2261 pageCfg->poPresent = false;
2265 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGING_OCC")) && (cur->ns == ns))
2267 pageCfg->pagingOcc[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2275 /*******************************************************************
2277 * @brief Fill SIB1 PDCCH Configuration
2281 * Function : parsePdcchCfgSib1
2283 * Functionality: Fill SIB1 PDCCH Configuration
2285 * @params[in] XML document pointer
2287 * Current node in XML
2288 * Pointer to structure to be filled
2289 * @return ROK - success
2292 * ****************************************************************/
2293 uint8_t parsePdcchCfgSib1(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigSib1 *pdcchConfigSib1)
2295 memset(pdcchConfigSib1, 0, sizeof(PdcchConfigSib1));
2296 cur = cur -> xmlChildrenNode;
2299 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_ZERO_INDEX")) && (cur->ns == ns))
2301 pdcchConfigSib1->coresetZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2304 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_ZERO_INDEX")) && (cur->ns == ns))
2306 pdcchConfigSib1->searchSpaceZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2314 /*******************************************************************
2316 * @brief Fill SIB1 Cell Configuration
2320 * Function : parseSib1CellCfg
2322 * Functionality: Fill SIB1 Cell Configuration
2324 * @params[in] XML document pointer
2326 * Current node in XML
2327 * Pointer to structure to be filled
2328 * @return ROK - success
2331 * ****************************************************************/
2332 uint8_t parseSib1CellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Sib1CellCfg *sib1CellCfg)
2334 memset(sib1CellCfg, 0, sizeof( Sib1CellCfg));
2335 cur = cur -> xmlChildrenNode;
2338 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_PAGE_CFG")) && (cur->ns == ns))
2340 if(parsePageCfg(doc, ns, cur, &sib1CellCfg->pagingCfg) != ROK)
2346 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CONFIG_SIB1")) && (cur->ns == ns))
2348 if(parsePdcchCfgSib1(doc, ns, cur, &sib1CellCfg->pdcchCfgSib1) != ROK)
2357 sib1CellCfg->sib1PduLen = duCfgParam.srvdCellLst[0].duSysInfo.sib1Len;
2358 if(sib1CellCfg->sib1PduLen > 0)
2360 DU_ALLOC_SHRABL_BUF(sib1CellCfg->sib1Pdu, sib1CellCfg->sib1PduLen);
2361 if(!sib1CellCfg->sib1Pdu)
2363 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
2366 memcpy(sib1CellCfg->sib1Pdu, duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg, sib1CellCfg->sib1PduLen);
2371 /*******************************************************************
2373 * @brief Fill Aggregation Level Candidates Information
2377 * Function : parseCandidateInfo
2379 * Functionality: Fill Aggregation Level Candidates Information
2381 * @params[in] XML document pointer
2383 * Current node in XML
2384 * Pointer to structure to be filled
2385 * @return ROK - success
2388 * ****************************************************************/
2389 uint8_t parseCandidateInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CandidatesInfo *candInfo)
2391 memset(candInfo, 0, sizeof(CandidatesInfo));
2392 cur = cur -> xmlChildrenNode;
2395 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL1")) && (cur->ns == ns))
2397 candInfo->aggLevel1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2400 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL2")) && (cur->ns == ns))
2402 candInfo->aggLevel2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2405 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL4")) && (cur->ns == ns))
2407 candInfo->aggLevel4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2410 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL8")) && (cur->ns == ns))
2412 candInfo->aggLevel8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2415 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL16")) && (cur->ns == ns))
2417 candInfo->aggLevel16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2425 /*******************************************************************
2427 * @brief Fill Search Space Connfiguration
2431 * Function : parseSearchSpaceCfg
2433 * Functionality: Fill Search Space Configuration
2435 * @params[in] XML document pointer
2437 * Current node in XML
2438 * Pointer to structure to be filled
2439 * @return ROK - success
2442 * ****************************************************************/
2443 uint8_t parseSearchSpaceCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SearchSpaceCfg *searchSpaceCfg)
2445 memset(searchSpaceCfg, 0, sizeof(SearchSpaceCfg));
2446 cur = cur -> xmlChildrenNode;
2449 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_1_INDEX")) && (cur->ns == ns))
2451 searchSpaceCfg->searchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2454 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
2456 searchSpaceCfg->coresetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2459 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SLOT_SL1")) && (cur->ns == ns))
2461 searchSpaceCfg->monitoringSlot = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2464 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DURATION")) && (cur->ns == ns))
2466 searchSpaceCfg->duration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2469 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SYMBOL")) && (cur->ns == ns))
2471 searchSpaceCfg->monitoringSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2474 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CANDIDATE_INFO")) && (cur->ns == ns))
2476 if(parseCandidateInfo(doc, ns, cur, &searchSpaceCfg->candidate) != ROK)
2487 /*******************************************************************
2489 * @brief Fill PDCCH Configuration Common
2493 * Function : parsePdcchCfgCommon
2495 * Functionality: Fill PDCCH Configuration Common
2497 * @params[in] XML document pointer
2499 * Current node in XML
2500 * Pointer to structure to be filled
2501 * @return ROK - success
2504 * ****************************************************************/
2505 uint8_t parsePdcchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigCommon *pdcchCfgCm)
2507 memset(pdcchCfgCm, 0, sizeof(PdcchConfigCommon));
2508 cur = cur -> xmlChildrenNode;
2511 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_CFG")) && (cur->ns == ns))
2513 if(parseSearchSpaceCfg(doc, ns, cur, &pdcchCfgCm->commonSearchSpace) != ROK)
2519 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_SEARCH_SPACE_INDEX")) && (cur->ns == ns))
2521 pdcchCfgCm->raSearchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2530 /*******************************************************************
2532 * @brief Fill PDSCH Common Time Domain Resource Allocation
2536 * Function : parsePdschCmnTimeDomRsrcAlloc
2538 * Functionality: Fill PDSCH Common Time Domain Resource Allocation
2540 * @params[in] XML document pointer
2542 * Current node in XML
2543 * Pointer to structure to be filled
2544 * @return ROK - success
2547 * ****************************************************************/
2548 uint8_t parsePdschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,\
2549 PdschCfgCommTimeDomRsrcAlloc *pdschTimeDomRsrcAlloc)
2551 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschCfgCommTimeDomRsrcAlloc));
2552 cur = cur -> xmlChildrenNode;
2555 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_K0_CFG")) && (cur->ns == ns))
2557 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2559 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_MAPPING_TYPE")) && (cur->ns == ns))
2561 pdschTimeDomRsrcAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2563 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
2565 pdschTimeDomRsrcAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2567 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
2569 pdschTimeDomRsrcAlloc->lengthSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2577 /*******************************************************************
2579 * @brief Fill PDSCH Configuration Common
2583 * Function : parsePdschConfigCommon
2585 * Functionality: Fill PDSCH Configuration Common
2587 * @params[in] XML document pointer
2589 * Current node in XML
2590 * Pointer to structure to be filled
2591 * @return ROK - success
2594 * ****************************************************************/
2595 uint8_t parsePdschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdschConfigCommon *pdschCfgCmn)
2598 xmlNodePtr child = NULLP;
2600 memset(pdschCfgCmn, 0, sizeof(PdschConfigCommon));
2601 cur = cur -> xmlChildrenNode;
2604 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
2606 pdschCfgCmn->numTimeDomAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2609 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
2611 child = cur->xmlChildrenNode;
2612 while(child != NULL)
2614 if ((!xmlStrcmp(child->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC")) && (child->ns == ns))
2616 if(parsePdschCmnTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
2622 child = child -> next;
2630 /*******************************************************************
2632 * @brief Fill DL BWP Configuration
2636 * Function : parseBwpDLConfig
2638 * Functionality: Fill DL BWP Configuration
2640 * @params[in] XML document pointer
2642 * Current node in XML
2643 * Pointer to structure to be filled
2644 * @return ROK - success
2647 * ****************************************************************/
2648 uint8_t parseBwpDLConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpDlConfig *bwpDlCfg)
2650 memset(bwpDlCfg, 0, sizeof(BwpDlConfig));
2651 cur = cur -> xmlChildrenNode;
2654 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
2656 if(parseBwp(doc, ns, cur, &bwpDlCfg->bwp) != ROK)
2662 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
2664 if(parsePdcchCfgCommon(doc, ns, cur, &bwpDlCfg->pdcchCommon) != ROK)
2670 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
2672 if(parsePdschConfigCommon(doc, ns, cur, &bwpDlCfg->pdschCommon) != ROK)
2683 /*******************************************************************
2685 * @brief Fill Cell Configuration
2689 * Function : parseCellCfg
2691 * Functionality: Fill Cell Configuration
2693 * @params[in] XML document pointer
2695 * Current node in XML
2696 * Pointer to structure to be filled
2697 * @return ROK - success
2700 * ****************************************************************/
2701 uint8_t parseCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CellCfg *cellCfg)
2703 memset(cellCfg, 0, sizeof(CellCfg));
2704 cur = cur -> xmlChildrenNode;
2708 cellCfg->opState = cellParams.operationalState;
2709 cellCfg->adminState = cellParams.administrativeState;
2710 cellCfg->cellState = cellParams.cellState;
2711 cellCfg->phyCellId = cellParams.nRPCI;
2712 cellCfg->tac = cellParams.nRTAC;
2713 cellCfg->ssbFreq = cellParams.ssbFrequency;
2715 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_OP_STATE")) && (cur->ns == ns))
2717 cellCfg->opState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2720 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_ADMIN_STATE")) && (cur->ns == ns))
2722 cellCfg->adminState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2725 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_STATE")) && (cur->ns == ns))
2727 cellCfg->cellState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2730 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
2732 cellCfg->phyCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2735 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
2737 cellCfg->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2740 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_FREQUENCY")) && (cur->ns == ns))
2742 cellCfg->ssbFreq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2746 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN_INFO")) && (cur->ns == ns))
2748 if(parsePlmnInfo(doc, ns, cur, &cellCfg->plmnInfoList[0]) != ROK)
2754 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
2756 cellCfg->subCarrSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2759 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DUPLEX_MODE")) && (cur->ns == ns))
2761 cellCfg->dupType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2764 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_CELL_CFG")) && (cur->ns == ns))
2766 if(parseSib1CellCfg(doc, ns, cur, &cellCfg->sib1Cfg) != ROK)
2772 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_DL_CFG")) && (cur->ns == ns))
2774 if(parseBwpDLConfig(doc, ns, cur, &cellCfg->initialDlBwp) != ROK)
2780 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_UL_CFG")) && (cur->ns == ns))
2782 if(parseBwpULConfig(doc, ns, cur, &cellCfg->initialUlBwp) != ROK)
2793 /*******************************************************************
2795 * @brief Fill TDD slot configuration
2799 * Function : parseTddCfg
2801 * Functionality: Fill TDD slot configuration
2803 * @params[in] XML document pointer
2805 * Current node in XML
2806 * Pointer to structure to be filled
2807 * @return ROK - success
2810 * ****************************************************************/
2811 uint8_t parseTddCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TDDCfg *tddCfg)
2813 memset(tddCfg, 0, sizeof(TDDCfg));
2814 cur = cur -> xmlChildrenNode;
2817 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_PERIODICITY")) && (cur->ns == ns))
2819 tddCfg->tddPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2822 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
2824 tddCfg->nrOfDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2827 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
2829 tddCfg->nrOfDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2832 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
2834 tddCfg->nrOfUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2837 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
2839 tddCfg->nrOfUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2848 /*******************************************************************
2850 * @brief Fill MAC Cell Configuration
2854 * Function : parseMacCellCfg
2856 * Functionality: Fill MAC Cell Configuration
2858 * @params[in] XML document pointer
2860 * Current node in XML
2861 * Pointer to structure to be filled
2862 * @return ROK - success
2865 * ****************************************************************/
2866 uint8_t parseMacCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacCellCfg *macCellCfg)
2868 memset(macCellCfg, 0, sizeof(MacCellCfg));
2869 cur = cur -> xmlChildrenNode;
2873 macCellCfg->cellId = cellParams.cellLocalId;
2875 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
2877 macCellCfg->cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2881 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CARRIER_CFG")) && (cur->ns == ns))
2883 if(parseCarrierCfg(doc, ns, cur, &macCellCfg->carrCfg) != ROK)
2889 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_CFG")) && (cur->ns == ns))
2891 if(parseCellCfg(doc, ns, cur, &macCellCfg->cellCfg) != ROK)
2897 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_CFG")) && (cur->ns == ns))
2899 if(parseSsbCfg(doc, ns, cur, &macCellCfg->ssbCfg) != ROK)
2905 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_CFG")) && (cur->ns == ns))
2907 if(parseCsiRsCfg(doc, ns, cur, &macCellCfg->csiRsCfg) != ROK)
2913 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CFG")) && (cur->ns == ns))
2915 if(parsePrachCfg(doc, ns, cur, &macCellCfg->prachCfg) != ROK)
2922 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_CFG")) && (cur->ns == ns))
2924 if(parseTddCfg(doc, ns, cur, &macCellCfg->tddCfg) != ROK)
2931 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRE_CODE_CFG")) && (cur->ns == ns))
2933 if(parsePrecodingConfig(doc, ns, cur, &macCellCfg->precodingConf) != ROK)
2939 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_FORM_CFG")) && (cur->ns == ns))
2941 if(parseBeamformingConfig(doc, ns, cur, &macCellCfg->beamCfg) != ROK)
2952 /*******************************************************************
2954 * @brief Fill PUSCH Configuration Common Time Domain
2955 * Resource Allocation
2959 * Function : parsePuschCmnTimeDomRsrcAlloc
2961 * Functionality: Fill PUSCH Configuration Common Time Domain
2962 * Resource Allocation
2964 * @params[in] XML document pointer
2966 * Current node in XML
2967 * Pointer to structure to be filled
2968 * @return ROK - success
2971 * ****************************************************************/
2972 uint8_t parsePuschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCmnTimeDomAlloc *puschCmnTimeDomAlloc)
2974 uint16_t startSymbol;
2977 memset(puschCmnTimeDomAlloc, 0, sizeof(PuschCfgCmnTimeDomAlloc));
2978 cur = cur -> xmlChildrenNode;
2981 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K2")) && (cur->ns == ns))
2983 puschCmnTimeDomAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2985 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
2987 puschCmnTimeDomAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2989 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
2991 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2993 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
2995 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2999 puschCmnTimeDomAlloc->sliv = calcSliv(startSymbol, lenSymbol);
3003 /*******************************************************************
3005 * @brief Fill PUSCH Configuration Common
3009 * Function : parsePuschCfgCommon
3011 * Functionality: Fill PUSCH Configuration Common
3013 * @params[in] XML document pointer
3015 * Current node in XML
3016 * Pointer to structure to be filled
3017 * @return ROK - success
3020 * ****************************************************************/
3021 uint8_t parsePuschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCommon *puschCfgCmn)
3023 uint8_t rsrcIdx = 0;
3024 xmlNodePtr child = NULLP;
3026 memset(puschCfgCmn, 0, sizeof(PuschCfgCommon));
3027 cur = cur -> xmlChildrenNode;
3030 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_PRESENT")) && (cur->ns == ns))
3032 puschCfgCmn->puschCfgPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3035 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MSG3_DELTA_PREAMBLE")) && (cur->ns == ns))
3037 puschCfgCmn->msg3DeltaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3040 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_P0_NOMINAL_WITH_GRANT")) && (cur->ns == ns))
3042 puschCfgCmn->p0NominalWithGrant = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3045 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
3047 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3050 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
3052 child = cur->xmlChildrenNode;
3053 while (child != NULL)
3055 if ((!xmlStrcmp(child->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC")) && (child->ns == ns))
3057 if(parsePuschCmnTimeDomRsrcAlloc(doc, ns, child, &puschCfgCmn->timeDomAllocList[rsrcIdx]) != ROK)
3063 child = child->next;
3071 /*******************************************************************
3073 * @brief Fill PUCCH Configuration Common
3077 * Function : parsePucchCfgCommon
3079 * Functionality: Fill PUCCH Configuration Common
3081 * @params[in] XML document pointer
3083 * Current node in XML
3084 * Pointer to structure to be filled
3085 * @return ROK - success
3088 * ****************************************************************/
3089 uint8_t parsePucchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PucchCfgCommon *pucchCfgCmn)
3091 memset(pucchCfgCmn, 0, sizeof(PucchCfgCommon));
3092 cur = cur -> xmlChildrenNode;
3095 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3097 pucchCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3100 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
3102 pucchCfgCmn->rsrcComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3105 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GRP_HOP")) && (cur->ns == ns))
3107 pucchCfgCmn->grpHop = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3110 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_P0_NOMINAL")) && (cur->ns == ns))
3112 pucchCfgCmn->p0Nominal = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3120 /*******************************************************************
3122 * @brief Fill RACH Configuration Common
3126 * Function : parseRachCfgCommon
3128 * Functionality: Fill RACH Configuration Common
3130 * @params[in] XML document pointer
3132 * Current node in XML
3133 * Pointer to structure to be filled
3134 * @return ROK - success
3137 * ****************************************************************/
3138 uint8_t parseRachCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RachCfgCommon *rachCfgCmn)
3143 memset(rachCfgCmn, 0, sizeof(RachCfgCommon));
3144 cur = cur -> xmlChildrenNode;
3147 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3149 rachCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3152 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
3154 rachCfgCmn->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3157 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MSG_1_FDM")) && (cur->ns == ns))
3159 rachCfgCmn->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3162 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
3164 maxNumRb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3166 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
3168 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3171 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORRELATION_ZONE_CFG")) && (cur->ns == ns))
3173 rachCfgCmn->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3176 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_PREAMBLE_RCVD_TGT_PWR")) && (cur->ns == ns))
3178 rachCfgCmn->preambleRcvdTgtPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3181 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PREAMBLE_TRANS_MAX")) && (cur->ns == ns))
3183 rachCfgCmn->preambleTransMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3186 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PWR_RAMPING_STEP")) && (cur->ns == ns))
3188 rachCfgCmn->pwrRampingStep = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3191 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
3193 rachCfgCmn->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3196 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
3198 rachCfgCmn->numRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3201 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SSB_PER_RACH_OCC")) && (cur->ns == ns))
3203 rachCfgCmn->numSsbPerRachOcc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3206 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
3208 rachCfgCmn->numCbPreamblePerSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3211 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONT_RES_TIMER")) && (cur->ns == ns))
3213 rachCfgCmn->contResTimer = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3216 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
3218 rachCfgCmn->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3221 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX_PRESENT")) && (cur->ns == ns))
3223 rachCfgCmn->rootSeqIdxPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3226 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
3228 rachCfgCmn->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3231 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SUBCARRIER_SPACING")) && (cur->ns == ns))
3233 rachCfgCmn->msg1Scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3236 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns== ns))
3238 rachCfgCmn->restrictedSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3244 rachCfgCmn->msg1FreqStart = ((maxNumRb) - (prachMaxPrb));
3248 /*******************************************************************
3250 * @brief Fill SCS Specific Carrier
3254 * Function : parseScsSpecCarrier
3256 * Functionality: Fill SCS Specific Carrier
3258 * @params[in] XML document pointer
3260 * Current node in XML
3261 * Pointer to structure to be filled
3262 * @return ROK - success
3265 * ****************************************************************/
3266 uint8_t parseScsSpecCarrier(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ScsSpecCarrier *scsSpecCrr)
3268 memset(scsSpecCrr, 0, sizeof(ScsSpecCarrier));
3271 scsSpecCrr->scsOffset = cellParams.ssbOffset;
3272 scsSpecCrr->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
3273 scsSpecCrr->scsBw = cellParams.bSChannelBwUL;
3275 cur = cur -> xmlChildrenNode;
3278 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SUBCARRIER_OFFSET")) && (cur->ns == ns))
3280 scsSpecCrr->scsOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3283 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3285 scsSpecCrr->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3288 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_BW")) && (cur->ns == ns))
3290 scsSpecCrr->scsBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3298 /*******************************************************************
3300 * @brief Fill UL Config Common
3304 * Function : parseUlCfgCommon
3306 * Functionality: Fill UL Config Common
3308 * @params[in] XML document pointer
3310 * Current node in XML
3311 * Pointer to structure to be filled
3312 * @return ROK - success
3315 * ****************************************************************/
3316 uint8_t parseUlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,UlCfgCommon *ulCfgCmn)
3318 memset(ulCfgCmn, 0, sizeof(UlCfgCommon));
3319 cur = cur -> xmlChildrenNode;
3322 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
3324 ulCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3327 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_P_MAX")) && (cur->ns == ns))
3329 ulCfgCmn->pMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3332 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
3334 ulCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3337 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_ALLIGN_TIMER_COMM")) && (cur->ns == ns))
3339 ulCfgCmn->timeAlignTimerComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3342 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
3344 if(parseScsSpecCarrier(doc, ns, cur, &ulCfgCmn->ulScsCarrier) != ROK)
3350 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RACH_CFG_COMMON")) && (cur->ns == ns))
3352 if(parseRachCfgCommon(doc, ns, cur, &ulCfgCmn->rachCfg) != ROK)
3358 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
3360 if(parsePuschCfgCommon(doc, ns, cur, &ulCfgCmn->puschCfg) != ROK)
3366 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
3368 if(parsePucchCfgCommon(doc, ns, cur, &ulCfgCmn->pucchCfg) != ROK)
3379 /*******************************************************************
3381 * @brief Fill TDD UL DL Configuration Common
3385 * Function : parseTddUlDlCfgCommon
3387 * Functionality: Fill TDD UL DL Configuration Common
3389 * @params[in] XML document pointer
3391 * Current node in XML
3392 * Pointer to structure to be filled
3393 * @return ROK - success
3396 * ****************************************************************/
3397 uint8_t parseTddUlDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TddUlDlCfgCommon *tddUlDlCfgCmn)
3399 memset(tddUlDlCfgCmn, 0, sizeof(TddUlDlCfgCommon));
3400 cur = cur -> xmlChildrenNode;
3403 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REF_SCS")) && (cur->ns == ns))
3405 tddUlDlCfgCmn->refScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3408 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TX_PRD")) && (cur->ns == ns))
3410 tddUlDlCfgCmn->txPrd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3413 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
3415 tddUlDlCfgCmn->numDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3418 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
3420 tddUlDlCfgCmn->numDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3423 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
3425 tddUlDlCfgCmn->numUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3428 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
3430 tddUlDlCfgCmn->numUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3438 /*******************************************************************
3440 * @brief Fill PCCH Configuration
3444 * Function : parsePcchCfg
3446 * Functionality: Fill PCCH Configuration
3448 * @params[in] XML document pointer
3450 * Current node in XML
3451 * Pointer to structure to be filled
3452 * @return ROK - success
3455 * ****************************************************************/
3456 uint8_t parsePcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PcchCfg *pcchCfg)
3458 xmlNodePtr child = NULLP;
3461 memset(pcchCfg, 0, sizeof(PcchCfg));
3462 cur = cur -> xmlChildrenNode;
3465 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEFAULT_PAGING_CYCLE")) && (cur->ns == ns))
3467 pcchCfg->dfltPagingCycle = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3470 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAND_PAGING_FRAME_OFFSET")) && (cur->ns == ns))
3472 pcchCfg->nAndPagingFrmOffsetType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3475 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGE_FRAME_OFFSET")) && (cur->ns == ns))
3477 pcchCfg->pageFrameOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3480 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NS")) && (cur->ns == ns))
3482 pcchCfg->ns = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3485 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_TYPE")) && (cur->ns == ns))
3487 pcchCfg->firstPDCCHMontioringType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3490 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_LIST")) && (cur->ns == ns))
3492 child = cur->xmlChildrenNode;
3493 while (child != NULL)
3495 if ((!xmlStrcmp(child->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_INFO")) && (child->ns == ns))
3497 pcchCfg->firstPDCCHMontioringInfo[idx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
3500 child = child->next;
3508 /*******************************************************************
3510 * @brief Fill PDSCH Time Domain Resource Allocation
3514 * Function : parsePdschTimeDomRsrcAlloc
3516 * Functionality: Fill PDSCH Time Domain Resource Allocation
3518 * @params[in] XML document pointer
3520 * Current node in XML
3521 * Pointer to structure to be filled
3522 * @return ROK - success
3525 * ****************************************************************/
3526 uint8_t parsePdschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc)
3528 uint16_t startSymbol;
3531 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschTimeDomainRsrcAlloc));
3532 cur = cur -> xmlChildrenNode;
3535 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K0")) && (cur->ns == ns))
3537 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3540 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
3542 pdschTimeDomRsrcAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3545 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
3547 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3550 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3552 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3557 pdschTimeDomRsrcAlloc->sliv = calcSliv(startSymbol, lenSymbol);
3561 /*******************************************************************
3563 * @brief Fill PDSCH Configuration Common
3567 * Function : parsePdschCfgCommon
3569 * Functionality: Fill PDSCH Configuration Common
3571 * @params[in] XML document pointer
3573 * Current node in XML
3574 * Pointer to structure to be filled
3575 * @return ROK - success
3578 * ****************************************************************/
3579 uint8_t parsePdschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschCfgCommon *pdschCfgCmn)
3582 xmlNodePtr child = NULLP;
3584 memset(pdschCfgCmn, 0, sizeof(PdschCfgCommon));
3585 cur = cur -> xmlChildrenNode;
3588 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3590 pdschCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3593 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRS_ALLOC")) && (cur->ns == ns))
3595 pdschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3598 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
3600 child = cur->xmlChildrenNode;
3601 while (child != NULL)
3603 if ((!xmlStrcmp(child->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC")) && (child->ns == ns))
3605 if(parsePdschTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomAlloc[idx]) != ROK)
3611 child = child->next;
3619 /*******************************************************************
3621 * @brief Fill BCCH Configuration
3625 * Function : parseBcchCfg
3627 * Functionality: Fill BCCH Configuration
3629 * @params[in] XML document pointer
3631 * Current node in XML
3632 * Pointer to structure to be filled
3633 * @return ROK - success
3636 * ****************************************************************/
3637 uint8_t parseBcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BcchCfg *bcchCfg)
3639 memset(bcchCfg, 0, sizeof(BcchCfg));
3640 cur = cur -> xmlChildrenNode;
3643 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MOB_PRD_COEFF")) && (cur->ns == ns))
3645 bcchCfg->modPrdCoeff = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3652 /*******************************************************************
3654 * @brief Fill PDCCH Configuration Common
3658 * Function : parsePdcchConfigCommon
3660 * Functionality: Fill PDCCH Configuration Common
3662 * @params[in] XML document pointer
3664 * Current node in XML
3665 * Pointer to structure to be filled
3666 * @return ROK - success
3669 * ****************************************************************/
3670 uint8_t parsePdcchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdcchCfgCommon *pdccgCfgCmn)
3673 xmlNodePtr child = NULLP;
3675 memset(pdccgCfgCmn, 0, sizeof( PdcchCfgCommon));
3676 cur = cur -> xmlChildrenNode;
3679 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3681 pdccgCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3684 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
3686 pdccgCfgCmn->ctrlRsrcSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3689 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
3691 pdccgCfgCmn->searchSpcZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3694 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID")) && (cur->ns == ns))
3696 pdccgCfgCmn->searchSpcId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3699 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CTRL_RSRC_SET_ID")) && (cur->ns == ns))
3701 pdccgCfgCmn->ctrlRsrcSetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3704 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_SLOT_PERIOD_OFFSET_PRESENT")) && (cur->ns == ns))
3706 pdccgCfgCmn->monitorSlotPrdAndOffPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3709 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_LIST")) && (cur->ns == ns))
3711 child = cur->xmlChildrenNode;
3714 if ((!xmlStrcmp(child->name, (const xmlChar *)"MONITOR_SYMBOL_IN_SLOT")) && (child->ns == ns))
3716 pdccgCfgCmn->monitorSymbolsInSlot[idx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
3719 child = child->next;
3723 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_1")) && (cur->ns == ns))
3725 pdccgCfgCmn->numCandAggLvl1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3728 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_2")) && (cur->ns == ns))
3730 pdccgCfgCmn->numCandAggLvl2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3733 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_4")) && (cur->ns == ns))
3735 pdccgCfgCmn->numCandAggLvl4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3738 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_8")) && (cur->ns == ns))
3740 pdccgCfgCmn->numCandAggLvl8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3743 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_16")) && (cur->ns == ns))
3745 pdccgCfgCmn->numCandAggLvl16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3748 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_TYPE")) && (cur->ns == ns))
3750 pdccgCfgCmn->searchSpcType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3753 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_DCI_FORMAT")) && (cur->ns == ns))
3755 pdccgCfgCmn->commSrchSpcDciFrmt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3758 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_SIB1")) && (cur->ns == ns))
3760 pdccgCfgCmn->searchSpcSib1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3763 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_PAGING")) && (cur->ns == ns))
3765 pdccgCfgCmn->pagingSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3768 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_RA")) && (cur->ns == ns))
3770 pdccgCfgCmn->raSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3778 /*******************************************************************
3780 * @brief Fill DL Configuration Common
3784 * Function : parseDlCfgCommon
3786 * Functionality: Fill DL Configuration Common
3788 * @params[in] XML document pointer
3790 * Current node in XML
3791 * Pointer to structure to be filled
3792 * @return ROK - success
3795 * ****************************************************************/
3796 uint8_t parseDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,DlCfgCommon *dlCfgCmn)
3798 memset(dlCfgCmn, 0, sizeof(DlCfgCommon));
3799 cur = cur -> xmlChildrenNode;
3802 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
3804 dlCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3807 if ((!xmlStrcmp(cur->name, (const xmlChar *)"OFFSET_TO_POINT_A")) && (cur->ns == ns))
3809 dlCfgCmn->offsetToPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3812 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
3814 dlCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3817 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
3819 if(parseScsSpecCarrier(doc, ns, cur, &dlCfgCmn->dlScsCarrier) != ROK)
3825 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
3827 if(parsePdcchConfigCommon(doc, ns, cur, &dlCfgCmn->pdcchCfg) != ROK)
3833 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
3835 if(parsePdschCfgCommon(doc, ns, cur, &dlCfgCmn->pdschCfg) != ROK)
3841 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCCH_CFG")) && (cur->ns == ns))
3843 if(parseBcchCfg(doc, ns, cur, &dlCfgCmn->bcchCfg) != ROK)
3849 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PCCH_CFG")) && (cur->ns == ns))
3851 if(parsePcchCfg(doc, ns, cur, &dlCfgCmn->pcchCfg) != ROK)
3860 /*******************************************************************
3862 * @brief Fill Serving Cell Config Common SIB
3866 * Function : parseSrvCellCfgCmnSib
3868 * Functionality: Fill Serving Cell Config Common SIB
3870 * @params[in] XML document pointer
3872 * Current node in XML
3873 * Pointer to structure to be filled
3874 * @return ROK - success
3877 * ****************************************************************/
3878 uint8_t parseSrvCellCfgCmnSib(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SrvCellCfgCommSib *srvCellCfgCmnSib)
3880 memset(srvCellCfgCmnSib, 0, sizeof(SrvCellCfgCommSib));
3881 cur = cur -> xmlChildrenNode;
3885 srvCellCfgCmnSib->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
3887 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3889 srvCellCfgCmnSib->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3892 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_POS_INBURST")) && (cur->ns == ns))
3894 srvCellCfgCmnSib->ssbPosInBurst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3897 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIODICITY")) && (cur->ns == ns))
3899 srvCellCfgCmnSib->ssbPrdServingCell = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3902 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBCH_PWR")) && (cur->ns == ns))
3904 srvCellCfgCmnSib->ssPbchBlockPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3907 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_CFG_COMMON")) && (cur->ns == ns))
3909 if(parseDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->dlCfg) != ROK)
3915 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_CFG_COMMON")) && (cur->ns == ns))
3917 if(parseUlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->ulCfg) != ROK)
3923 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_UL_DL_CFG_COMMON")) && (cur->ns == ns))
3925 if(parseTddUlDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->tddCfg) != ROK)
3936 /*******************************************************************
3938 * @brief Fill SI Scheduling Information
3942 * Function : parseSiSchedInfo
3944 * Functionality: Fill SI Scheduling Information
3946 * @params[in] XML document pointer
3948 * Current node in XML
3949 * Pointer to structure to be filled
3950 * @return ROK - success
3953 * ****************************************************************/
3954 uint8_t parseSiSchedInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SiSchedInfo *siSchedInfo)
3956 memset(siSchedInfo, 0, sizeof(SiSchedInfo));
3957 cur = cur -> xmlChildrenNode;
3960 if ((!xmlStrcmp(cur->name, (const xmlChar *)"WIN_LEN")) && (cur->ns == ns))
3962 siSchedInfo->winLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3965 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BROADCAST_STATUS")) && (cur->ns == ns))
3967 siSchedInfo->broadcastSta = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3970 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY")) && (cur->ns == ns))
3972 siSchedInfo->preiodicity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3975 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB_TYPE")) && (cur->ns == ns))
3977 siSchedInfo->sibType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3980 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_VALUE_TAG")) && (cur->ns == ns))
3982 siSchedInfo->sibValTag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3990 /*******************************************************************
3992 * @brief Fill SIB1 Parameters
3996 * Function : parseSib1Params
3998 * Functionality: Fill SIB1 Parameters
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 parseSib1Params(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,Sib1Params *sib1Params)
4010 memset(sib1Params, 0, sizeof(Sib1Params));
4011 cur = cur -> xmlChildrenNode;
4015 sib1Params-> tac = cellParams.nRTAC;
4016 sib1Params->cellIdentity = CELL_IDENTITY * cellParams.cellLocalId;
4017 DU_LOG("\nDEBUG --> DU_APP: parseSib1Params(): OAM CellLocalId=%d", sib1Params->cellIdentity);
4019 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
4021 sib1Params-> tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4024 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_IDENTITY")) && (cur->ns == ns))
4026 sib1Params->cellIdentity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4030 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
4032 if(parsePlmn(doc, ns, cur, &sib1Params->plmn) != ROK)
4038 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RANAC")) && (cur->ns == ns))
4040 sib1Params->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4043 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_RESVD_OPUSE")) && (cur->ns == ns))
4045 sib1Params->cellResvdForOpUse = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4048 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_CNT")) && (cur->ns == ns))
4050 sib1Params->connEstFailCnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4053 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFF_VALID")) && (cur->ns == ns))
4055 sib1Params->connEstFailOffValidity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4058 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFFSET")) && (cur->ns == ns))
4060 sib1Params->connEstFailOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4063 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SI_SHED_INFO")) && (cur->ns == ns))
4065 if(parseSiSchedInfo(doc, ns, cur, &sib1Params->siSchedInfo) != ROK)
4071 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SRV_CELL_CFG_COM_SIB")) && (cur->ns == ns))
4073 if(parseSrvCellCfgCmnSib(doc, ns, cur, &sib1Params->srvCellCfgCommSib) != ROK)
4085 /*******************************************************************
4087 * @brief Fill RRM Policy List
4091 * Function : parseRrmPolicyList
4093 * Functionality: Fill RRM Policy List
4095 * @params[in] XML document pointer
4097 * Current node in XML
4098 * Pointer to structure to be filled
4099 * @return ROK - success
4102 * ****************************************************************/
4103 uint8_t parseRrmPolicyList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,RrmPolicyMemberList *rrmPolicyMemberList)
4105 memset(rrmPolicyMemberList, 0, sizeof(RrmPolicyMemberList));
4106 cur = cur->xmlChildrenNode;
4109 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
4111 if(parsePlmn(doc, ns, cur, &rrmPolicyMemberList->plmn) != ROK)
4117 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI")) && (cur->ns == ns))
4119 if(parseSnssai(doc, ns, cur, &rrmPolicyMemberList->snssai) != ROK)
4130 /*******************************************************************
4132 * @brief Fill RRM Policy Ratio
4136 * Function : parseRrmPolicyRatio
4138 * Functionality: Fill RRM Policy Ratio
4140 * @params[in] XML document pointer
4142 * Current node in XML
4143 * Pointer to structure to be filled
4144 * @return ROK - success
4147 * ****************************************************************/
4148 uint8_t parseRrmPolicyRatio(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RrmPolicyRatio *rrmPolicyRatio)
4150 memset(rrmPolicyRatio, 0, sizeof(RrmPolicyRatio));
4151 cur = cur -> xmlChildrenNode;
4154 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_RATIO")) && (cur->ns == ns))
4156 rrmPolicyRatio->maxRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4159 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_RATIO")) && (cur->ns == ns))
4161 rrmPolicyRatio->minRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4164 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEDICATED_RATIO")) && (cur->ns == ns))
4166 rrmPolicyRatio->dedicatedRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4174 /*******************************************************************
4176 * @brief Fill MAC Slice RRM Policy
4180 * Function : parseMacSliceRrmPolicy
4182 * Functionality: Fill MAC Slice RRM Policy
4184 * @params[in] XML document pointer
4186 * Current node in XML
4187 * Pointer to structure to be filled
4188 * @return ROK - success
4191 * ****************************************************************/
4192 uint8_t parseMacSliceRrmPolicy(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MacSliceRrmPolicy *rrmPolicy)
4196 memset(rrmPolicy, 0, sizeof(MacSliceRrmPolicy));
4197 cur = cur -> xmlChildrenNode;
4200 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RESOURCE_TYPE")) && (cur->ns == ns))
4202 rrmPolicy->resourceType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4205 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRM_POLICY_MEMBER")) && (cur->ns == ns))
4207 rrmPolicy->numOfRrmPolicyMem = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4210 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_MEMBER_LIST")) && (cur->ns == ns))
4212 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList,\
4213 rrmPolicy->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
4215 if(!rrmPolicy->rRMPolicyMemberList)
4217 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
4221 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
4223 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList[memIdx], sizeof(RrmPolicyMemberList));
4224 if (rrmPolicy->rRMPolicyMemberList[memIdx] == NULLP)
4226 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4230 if(parseRrmPolicyList(doc, ns, cur, rrmPolicy->rRMPolicyMemberList[memIdx]) != ROK)
4237 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_RATIO")) && (cur->ns == ns))
4239 if(parseRrmPolicyRatio(doc, ns, cur, &rrmPolicy->policyRatio) != ROK)
4250 /*******************************************************************
4252 * @brief Fill MAC Slice Configuration
4256 * Function : parseMacSliceCfgReq
4258 * Functionality: Fill MAC Slice Configuration
4260 * @params[in] XML document pointer
4262 * Current node in XML
4263 * Pointer to structure to be filled
4264 * @return ROK - success
4267 * ****************************************************************/
4268 uint8_t parseMacSliceCfgReq(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacSliceCfgReq *macSliceCfgReq)
4270 uint8_t policyIdx = 0;
4271 memset(macSliceCfgReq, 0, sizeof(MacSliceCfgReq));
4272 cur = cur -> xmlChildrenNode;
4275 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRM_POLICY")) && (cur->ns == ns))
4277 macSliceCfgReq->numOfRrmPolicy = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4280 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_SLICE_RRM_POLICY")) && (cur->ns == ns))
4282 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy, macSliceCfgReq->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
4283 if(!macSliceCfgReq->listOfRrmPolicy)
4285 DU_LOG("\nERROR --> DU APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4289 for(policyIdx = 0; policyIdx < macSliceCfgReq->numOfRrmPolicy; policyIdx++)
4291 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
4292 if (macSliceCfgReq->listOfRrmPolicy[policyIdx] == NULLP)
4294 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4297 if(parseMacSliceRrmPolicy(doc, ns, cur, macSliceCfgReq->listOfRrmPolicy[policyIdx]) != ROK)
4309 #ifdef THREAD_AFFINITY
4310 /*******************************************************************
4312 * @brief Set thread affinity to the core configured via XML file
4316 * Function : parseThreadAffinity
4318 * Functionality: Set thread affinity to the core configured
4321 * @params[in] XML document pointer
4323 * Current node in XML
4324 * Thread information
4325 * @return ROK - success
4328 * ****************************************************************/
4329 uint8_t parseThreadAffinity(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ThreadInfo *threads)
4331 cur = cur -> xmlChildrenNode;
4334 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_APP_CORE")) && (cur->ns == ns))
4336 threads->duAppCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4337 #ifdef INTEL_THREAD_AFFINITY
4338 ODU_SET_THREAD_AFFINITY(&threads->duAppSTskId, SS_AFFINITY_MODE_EXCL, threads->duAppCoreId, 0);
4342 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP_CORE")) && (cur->ns == ns))
4344 threads->egtpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4345 #ifdef INTEL_THREAD_AFFINITY
4346 ODU_SET_THREAD_AFFINITY(&threads->egtpSTskId, SS_AFFINITY_MODE_EXCL, threads->egtpCoreId, 0);
4350 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_MAC_CORE")) && (cur->ns == ns))
4352 threads->rlcMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4353 #ifdef INTEL_THREAD_AFFINITY
4354 ODU_SET_THREAD_AFFINITY(&threads->rlcMacSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcMacCoreId, 0);
4358 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_UL_CORE")) && (cur->ns == ns))
4360 threads->rlcUlCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4361 #ifdef INTEL_THREAD_AFFINITY
4362 ODU_SET_THREAD_AFFINITY(&threads->rlcUlSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcUlCoreId, 0);
4366 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_CORE")) && (cur->ns == ns))
4368 threads->schCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4369 #ifdef INTEL_THREAD_AFFINITY
4370 ODU_SET_THREAD_AFFINITY(&threads->schSTskId, SS_AFFINITY_MODE_EXCL, threads->schCoreId, 0);
4374 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP_CORE")) && (cur->ns == ns))
4376 threads->sctpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4377 #ifdef INTEL_THREAD_AFFINITY
4378 ODU_SET_THREAD_AFFINITY(&threads->sctpSTskId, SS_AFFINITY_MODE_EXCL, threads->sctpCoreId, 0);
4382 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOWER_MAC_CORE")) && (cur->ns == ns))
4384 threads->lwrMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4385 #ifdef INTEL_THREAD_AFFINITY
4386 ODU_SET_THREAD_AFFINITY(&threads->lwrMacSTskId, SS_AFFINITY_MODE_EXCL, threads->lwrMacCoreId, 0);
4396 /*******************************************************************
4398 * @brief Fill tmrTqCp
4402 * Function : parseTmrTqCp
4404 * Functionality: Fill tmrTqCp
4406 * @params[in] XML document pointer
4408 * Current node in XML
4409 * Pointer to structure to be filled
4410 * @return ROK - success
4413 * ****************************************************************/
4414 uint8_t parseTmrTqCp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmTqCp *tmrTqCp)
4416 memset(tmrTqCp, 0, sizeof(CmTqCp));
4417 cur = cur ->xmlChildrenNode;
4420 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_LEN")) && (cur->ns == ns))
4422 tmrTqCp->tmrLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4429 /*******************************************************************
4431 * @brief Fill DU timer Parameters
4435 * Function : parseDuTimerParams
4437 * Functionality: Fill DU timer Parmeters
4439 * @params[in] XML document pointer
4441 * Current node in XML
4442 * Pointer to structure to be filled
4443 * @return ROK - success
4446 * ****************************************************************/
4447 uint8_t parseDuTimerParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, DuTimers *duTimers)
4449 memset(duTimers, 0, sizeof(DuTimers));
4451 cur = cur->xmlChildrenNode;
4454 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_TQ_CP")) && (cur->ns == ns))
4456 if(parseTmrTqCp(doc, ns, cur, &duTimers->tmrTqCp) != ROK)
4462 /* Initialzie the timer queue */
4463 memset(&(duTimers->tmrTq), 0, sizeof(CmTqType) * duTimers->tmrTqCp.tmrLen);
4467 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_RESOLUTION")) && (cur->ns == ns))
4469 duTimers->tmrRes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4476 /*******************************************************************
4478 * @brief Fill TNL assoc
4482 * Function : parseTnlAssoc
4484 * Functionality: Fill TNL assoc
4486 * @params[in] XML document pointer
4488 * Current node in XML
4489 * Pointer to structure to be filled
4490 * @return ROK - success
4493 * ****************************************************************/
4494 uint8_t parseTnlAssoc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TNLAssociation *tnlAssoc)
4501 memset(tnlAssoc, 0, sizeof(TNLAssociation));
4502 cur = cur ->xmlChildrenNode;
4505 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_IP")) && (cur->ns == ns))
4507 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4508 cmInetAddr(duIpV4Addr, &(duIp));
4509 tnlAssoc->localIpAddress.ipV4Pres = true;
4510 tnlAssoc->localIpAddress.ipV4Addr = duIp;
4513 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_PORT")) && (cur->ns == ns))
4515 tnlAssoc->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4518 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_IP")) && (cur->ns == ns))
4520 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4521 cmInetAddr(ricIpV4Addr, &(ricIp));
4522 tnlAssoc->destIpAddress.ipV4Pres = true;
4523 tnlAssoc->destIpAddress.ipV4Addr = ricIp;
4526 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_PORT")) && (cur->ns == ns))
4528 tnlAssoc->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4531 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ASSOC_USAGE")) && (cur->ns == ns))
4533 tnlAssoc->usage = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4540 /*******************************************************************
4542 * @brief Fill ric style parmeters
4546 * Function : parseRicStyle
4548 * Functionality: Fill ric style parmeters
4550 * @params[in] XML document pointer
4552 * Current node in XML
4553 * Pointer to structure to be filled
4554 * @return ROK - success
4557 * ****************************************************************/
4558 uint8_t parseRicStyle(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RicStyle *ricStyle)
4561 memset(ricStyle, 0, sizeof(RicStyle));
4563 cur = cur->xmlChildrenNode;
4566 if ((!xmlStrcmp(cur->name, (const xmlChar *)"STYLE_TYPE")) && (cur->ns == ns))
4568 ricStyle->styleType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4571 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAME")) && (cur->ns == ns))
4573 tempName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4574 strcpy((char*)ricStyle->name, tempName);
4577 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FORMAT_TYPE")) && (cur->ns == ns))
4579 ricStyle->formatType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4586 /*******************************************************************
4588 * @brief Fill measurement info parameters
4592 * Function : parseMeasurementInfo
4594 * Functionality: Fill measurement info parmeters
4596 * @params[in] XML document pointer
4598 * Current node in XML
4599 * Pointer to structure to be filled
4600 * @return ROK - success
4603 * ****************************************************************/
4604 uint8_t parseMeasurementInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmLListCp *measurementInfoList)
4608 MeasurementInfoForAction *measurementInfoForAction;
4610 DU_ALLOC(measurementInfoForAction, sizeof(MeasurementInfoForAction));
4611 if(!measurementInfoForAction)
4616 cur = cur->xmlChildrenNode;
4619 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ID")) && (cur->ns == ns))
4621 measurementInfoForAction->measurementTypeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4624 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAME")) && (cur->ns == ns))
4626 tempName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4627 strcpy((char*)measurementInfoForAction->measurementTypeName, tempName);
4633 DU_ALLOC(node, sizeof(CmLList));
4636 node->node = (PTR) measurementInfoForAction;
4637 cmLListAdd2Tail(measurementInfoList, node);
4641 DU_FREE(measurementInfoForAction, sizeof(MeasurementInfoForAction));
4648 /*******************************************************************
4650 * @brief Fill report style parameters
4654 * Function : parseReportStyle
4656 * Functionality: Fill report style parmeters
4658 * @params[in] XML document pointer
4660 * Current node in XML
4661 * Pointer to structure to be filled
4662 * @return ROK - success
4665 * ****************************************************************/
4666 uint8_t parseReportStyle(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RicReportStyle *ricReportStyle)
4668 xmlNodePtr child = NULLP;
4669 memset(ricReportStyle, 0, sizeof(RicReportStyle));
4671 cur = cur->xmlChildrenNode;
4674 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_STYLE")) && (cur->ns == ns))
4676 if(parseRicStyle(doc, ns, cur, &ricReportStyle->reportStyle) != ROK)
4682 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MEASUREMENT_INFO_LIST")) && (cur->ns == ns))
4684 child = cur->xmlChildrenNode;
4685 while(child != NULL)
4687 if ((!xmlStrcmp(child->name, (const xmlChar *)"MEASUREMENT_INFO")) && (child->ns == ns))
4689 if(parseMeasurementInfo(doc, ns, child, &ricReportStyle->measurementInfoList) != ROK)
4694 child = child -> next;
4703 /*******************************************************************
4705 * @brief Fill RAN function name parameters
4709 * Function : parseRanFuncName
4711 * Functionality: Fill RAN function name parmeters
4713 * @params[in] XML document pointer
4715 * Current node in XML
4716 * Pointer to structure to be filled
4717 * @return ROK - success
4720 * ****************************************************************/
4721 uint8_t parseRanFuncName(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RanFunctionName *ranFunctionName)
4723 char *tempShortName;
4724 char *tempServiceModelOid;
4725 char *tempDiscription;
4727 memset(ranFunctionName, 0, sizeof(RanFunctionName));
4729 cur = cur->xmlChildrenNode;
4732 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SHORT_NAME")) && (cur->ns == ns))
4734 tempShortName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4735 strcpy((char*)ranFunctionName->shortName, tempShortName);
4738 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEVICE_MODEL_OID")) && (cur->ns == ns))
4740 tempServiceModelOid =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4741 strcpy((char*)ranFunctionName->serviceModelOID, tempServiceModelOid);
4744 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESCRIPTION")) && (cur->ns == ns))
4746 tempDiscription =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4747 strcpy((char*)ranFunctionName->description, tempDiscription);
4754 /*******************************************************************
4756 * @brief Fill RAN function parameters
4760 * Function : parseRanFunctionParams
4762 * Functionality: Fill RAN function parmeters
4764 * @params[in] XML document pointer
4766 * Current node in XML
4767 * Pointer to structure to be filled
4768 * @return ROK - success
4771 * ****************************************************************/
4772 uint8_t parseRanFunctionParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RanFunction *ranFunction)
4774 xmlNodePtr child = NULLP;
4775 uint8_t eventTriggerStyleIdx=0, reportStyleIdx=0;
4777 memset(ranFunction, 0, sizeof(RanFunction));
4779 cur = cur->xmlChildrenNode;
4783 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ID")) && (cur->ns == ns))
4785 ranFunction->id = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4788 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RAN_FUNCTION_NAME")) && (cur->ns == ns))
4790 if(parseRanFuncName(doc, ns, cur, &ranFunction->name) != ROK)
4796 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REVISION_COUNTER")) && (cur->ns == ns))
4798 ranFunction->revisionCounter = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4801 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_EVENT_TRIGGER_STYLE_SUPPORTED")) && (cur->ns == ns))
4803 ranFunction->numOfEventTriggerStyleSupported = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4807 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EVENT_TRIGGERED_STYLE_LIST")) && (cur->ns == ns))
4809 child = cur->xmlChildrenNode;
4810 while(child != NULL)
4812 if ((!xmlStrcmp(child->name, (const xmlChar *)"EVENT_TRIGGERED_STYLE")) && (child->ns == ns))
4814 if(parseRicStyle(doc, ns, child,&ranFunction->eventTriggerStyleList[eventTriggerStyleIdx]) != ROK)
4818 eventTriggerStyleIdx++;
4821 child = child -> next;
4827 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_REPORT_STYLE_SUPPORTED")) && (cur->ns == ns))
4829 ranFunction->numOfReportStyleSupported = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4832 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REPORT_STYLE_SUPPORTED_LIST")) && (cur->ns == ns))
4834 child = cur->xmlChildrenNode;
4835 while(child != NULL)
4837 if ((!xmlStrcmp(child->name, (const xmlChar *)"REPORT_STYLE")) && (child->ns == ns))
4839 if(parseReportStyle(doc, ns, child,&ranFunction->reportStyleList[reportStyleIdx]) != ROK)
4846 child = child -> next;
4851 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_INDICATION_HEADER_FORMAT")) && (cur->ns == ns))
4853 ranFunction->ricIndicationHeaderFormat = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4856 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_INDICATION_MESSAGE_FORMAT")) && (cur->ns == ns))
4858 ranFunction->ricIndicationMessageFormat = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4865 /*******************************************************************
4867 * @brief Fill E2 config Parameters
4871 * Function : parseE2ConfigParams
4873 * Functionality: Fill E2 config Parmeters
4875 * @params[in] XML document pointer
4877 * Current node in XML
4878 * Pointer to structure to be filled
4879 * @return ROK - success
4882 * ****************************************************************/
4883 uint8_t parseE2ConfigParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, E2apDb *e2apDb)
4885 uint8_t tnlIdx=0,ranFuncIdx=0;
4886 xmlNodePtr child = NULLP;
4888 memset(e2apDb, 0, sizeof(E2apDb));
4889 cur = cur->xmlChildrenNode;
4892 if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_NODE_ID")) && (cur->ns == ns))
4894 e2apDb->e2NodeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4897 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_TNL_ASSOC")) && (cur->ns == ns))
4899 e2apDb->numOfTNLAssoc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4902 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TNL_ASSOC_LIST")) && (cur->ns == ns))
4904 child = cur->xmlChildrenNode;
4905 while(child != NULL)
4907 if ((!xmlStrcmp(child->name, (const xmlChar *)"TNL_ASSOC")) && (child->ns == ns))
4909 if(parseTnlAssoc(doc, ns, child,&e2apDb->tnlAssoc[tnlIdx]) != ROK)
4916 child = child -> next;
4920 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_RAN_FUNCTION")) && (cur->ns == ns))
4922 e2apDb->numOfRanFunction = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4925 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RAN_FUNCTION_LIST")) && (cur->ns == ns))
4927 child = cur->xmlChildrenNode;
4928 while(child != NULL)
4930 if ((!xmlStrcmp(child->name, (const xmlChar *)"RAN_FUNCTION")) && (child->ns == ns))
4932 if(parseRanFunctionParams(doc, ns, child,&e2apDb->ranFunction[ranFuncIdx]) != ROK)
4936 cmLListInit(&e2apDb->ranFunction[ranFuncIdx].subscriptionList);
4940 child = child -> next;
4949 /*******************************************************************
4951 * @brief Fill Global config Parameters
4955 * Function : parseGlobalConfigParams
4957 * Functionality: Fill Global config Parmeters
4959 * @params[in] XML document pointer
4961 * Current node in XML
4962 * Pointer to structure to be filled
4963 * @return ROK - success
4966 * ****************************************************************/
4967 uint8_t parseGlobalConfigParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
4970 memset(&gConfigInfo, 0, sizeof(GConfiguration));
4971 cur = cur->xmlChildrenNode;
4975 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RADIO_FRAME_DURATION")) && (cur->ns == ns))
4977 gConfigInfo.gRadioFrameDuration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4980 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ODU_UE_THROUGHPUT_PRINT_TIME_INTERVAL")) && (cur->ns == ns))
4982 gConfigInfo.gUeThrptTimeIntervl = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4985 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ODU_SNSSAI_THROUGHPUT_PRINT_TIME_INTERVAL")) && (cur->ns == ns))
4987 gConfigInfo.gSnssaiThrptTimeIntervl = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4990 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PHY_DELTA_DL")) && (cur->ns == ns))
4992 gConfigInfo.gPhyDeltaDl = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4995 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PHY_DELTA_UL")) && (cur->ns == ns))
4997 gConfigInfo.gPhyDeltaUl = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5004 /*******************************************************************
5006 * @brief Fill DU Config Parmeters
5010 * Function : parseDuCfgParams
5014 * @params[in] XML document pointer
5016 * Current node in XML
5017 * @return ROK - success
5020 * ****************************************************************/
5021 uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
5023 char *tempDuName = "";
5031 cur = cur->xmlChildrenNode;
5034 if ((!xmlStrcmp(cur->name, (const xmlChar *)"THREAD_AFFINITY")) && (cur->ns == ns))
5036 #ifdef THREAD_AFFINITY
5037 if(parseThreadAffinity(doc, ns, cur, &duCfgParam.threadInfo) != ROK)
5044 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GNB_ID")) && (cur->ns == ns))
5046 duCb.gnbId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5049 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_ID")) && (cur->ns == ns))
5051 duCfgParam.duId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5054 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_NAME")) && (cur->ns == ns))
5056 tempDuName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5057 DU_ALLOC(duCfgParam.duName, strlen(tempDuName));
5058 if(!duCfgParam.duName)
5060 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
5063 strcpy((char*)duCfgParam.duName, tempDuName);
5066 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_DRB")) && (cur->ns == ns))
5068 duCfgParam.maxNumDrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5072 if( getStartupConfig(&g_cfg) != ROK )
5076 cmInetAddr((S8*)g_cfg.DU_IPV4_Addr, &duIp);
5077 cmInetAddr((S8*)g_cfg.CU_IPV4_Addr, &cuIp);
5078 cmInetAddr((S8*)g_cfg.RIC_IPV4_Addr, &ricIp);
5081 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_IP_V4_ADDR")) && (cur->ns == ns))
5083 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5084 cmInetAddr(duIpV4Addr, &(duIp));
5087 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CU_IP_V4_ADDR")) && (cur->ns == ns))
5089 cuIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5090 cmInetAddr(cuIpV4Addr, &(cuIp));
5093 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_IP_V4_ADDR")) && (cur->ns == ns))
5095 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5096 cmInetAddr(ricIpV4Addr, &(ricIp));
5100 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP")) && (cur->ns == ns))
5102 if(parseSctpParams(doc, ns, cur, &duCfgParam.sctpParams) != ROK)
5106 duCfgParam.sctpParams.duIpAddr.ipV4Pres = true;
5107 duCfgParam.sctpParams.duIpAddr.ipV4Addr = duIp;
5108 duCfgParam.sctpParams.cuIpAddr.ipV4Pres = true;
5109 duCfgParam.sctpParams.cuIpAddr.ipV4Addr = cuIp;
5110 duCfgParam.sctpParams.ricIpAddr.ipV4Pres = true;
5111 duCfgParam.sctpParams.ricIpAddr.ipV4Addr = ricIp;
5114 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP")) && (cur->ns == ns))
5116 if(parseEgtpParams(doc, ns, cur, &duCfgParam.egtpParams) != ROK)
5120 duCfgParam.egtpParams.localIp.ipV4Addr = duIp;
5121 duCfgParam.egtpParams.localIp.ipV4Pres = true;
5122 duCfgParam.egtpParams.destIp.ipV4Pres = true;
5123 duCfgParam.egtpParams.destIp.ipV4Addr = cuIp;
5124 duCfgParam.egtpParams.maxTunnelId = duCfgParam.maxNumDrb * MAX_NUM_UE;
5127 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIB_PARAMS")) && (cur->ns == ns))
5129 if(parseMibParams(doc, ns, cur, &duCfgParam.mibParams) != ROK)
5135 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_PARAMS")) && (cur->ns == ns))
5137 if(parseSib1Params(doc, ns, cur, &duCfgParam.sib1Params) != ROK)
5143 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_SRVD_CELL_INFO")) && (cur->ns == ns))
5145 if(parseF1DuServedCellInfo(doc, ns, cur, &duCfgParam.srvdCellLst[0]) != ROK)
5151 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_CFG")) && (cur->ns == ns))
5153 if(parseMacCellCfg(doc, ns, cur, &duCfgParam.macCellCfg) != ROK)
5160 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SLICE_CFG")) && (cur->ns == ns))
5162 if(parseMacSliceCfgReq(doc, ns, cur, &duCfgParam.tempSliceCfg) != ROK)
5169 if((!xmlStrcmp(cur->name, (const xmlChar *)"DU_TIMER_INFO")) && (cur->ns == ns))
5171 if(parseDuTimerParams(doc, ns, cur, &duCb.duTimersInfo) != ROK)
5177 if((!xmlStrcmp(cur->name, (const xmlChar *)"E2AP_CFG")) && (cur->ns == ns))
5179 if(parseE2ConfigParams(doc, ns, cur, &duCb.e2apDb) != ROK)
5185 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2SetupTimer), 1);
5186 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.ricServiceUpdateTimer.timer), 1);
5187 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2NodeConfigUpdate.timer), 1);
5191 if((!xmlStrcmp(cur->name, (const xmlChar *)"GLOBAL_CFG")) && (cur->ns == ns))
5193 if(parseGlobalConfigParams(doc, ns, cur) != ROK)
5204 /*******************************************************************
5206 * @brief Reads config and posts message to du_app on completion
5210 * Function : duReadCfg
5213 * - Reads configuration from xml file and stores in DB
5214 * - Post to du_app for further processing
5217 * @return ROK - success
5220 * ****************************************************************/
5223 const char *filename = "../build/config/odu_config.xml";
5224 xmlDocPtr doc = NULLP;
5225 xmlNodePtr cur = NULLP;
5226 xmlNsPtr ns = NULLP;
5230 /* Parse, store and print DU configurations from XML file */
5231 doc = xmlParseFile(filename);
5234 DU_LOG("\nERROR --> DU_APP: Failed to parse the XML file");
5238 cur = xmlDocGetRootElement(doc);
5239 ns = xmlSearchNsByHref(doc, cur, (const xmlChar *)"urn:o-ran:odu:configuration");
5242 DU_LOG("\nERROR --> DU_APP: XML Namespace not found.\n");
5248 parseDuCfgParams(doc, ns, cur);
5254 /* Fill pst structure */
5255 memset(&(pst), 0, sizeof(Pst));
5256 pst.srcEnt = (Ent)ENTDUAPP;
5257 pst.srcInst = (Inst)DU_INST;
5258 pst.srcProcId = DU_PROC;
5259 pst.dstEnt = pst.srcEnt;
5260 pst.dstInst = pst.srcInst;
5261 pst.dstProcId = pst.srcProcId;
5263 pst.selector = ODU_SELECTOR_TC;
5267 /* Timer Registration request to system services */
5268 if (ODU_REG_TMR_MT(pst.srcEnt, pst.srcInst, duCb.duTimersInfo.tmrRes, duActvTmr) != ROK)
5270 DU_LOG("\nERROR --> DU_APP : Failed to register timer");
5274 if(ODU_GET_MSG_BUF(DFLT_REGION, DU_POOL, &mBuf) != ROK)
5276 DU_LOG("\nERROR --> DU_APP : Memory allocation failed in duReadCfg");
5280 if (ODU_POST_TASK(&pst, mBuf) != ROK)
5282 DU_LOG("\nERROR --> DU_APP : ODU_POST_TASK failed in duReadCfg");
5289 /*******************************************************************
5291 * @brief Prints all DU Configuration
5295 * Function : printDuConfig
5298 * - Prints all DU configurations
5303 * ****************************************************************/
5304 void printDuConfig()
5307 uint16_t ranFuncIdx;
5308 uint8_t reportStyleIdx =0, eventStyleIdx=0, tnlIdx=0;
5309 uint8_t sliceIdx = 0, pfIdx = 0, rsrcIdx = 0, ssbMaskIdx = 0, fdmIdx = 0;
5310 uint8_t monitoringSymbIdx = 0, poIdx = 0, policyIdx = 0, memIdx = 0;
5311 __attribute__((unused)) SctpParams *sctp;
5312 __attribute__((unused)) F1EgtpParams *egtp;
5313 __attribute__((unused)) MibParams *mib;
5314 __attribute__((unused)) F1RrcVersion *f1RrcVersion;
5315 F1DuCellInfo *f1DuCellInfo;
5316 F1CellInfo *f1CellInfo;
5317 __attribute__((unused)) F1DuSysInfo *duSysInfo;
5318 __attribute__((unused)) F1BrdcstPlmnInfo *brdcstPlmnInfo;
5319 NrModeInfo *nrModeInfo;
5320 __attribute__((unused)) F1NrFddInfo *f1NrFddInfo;
5321 F1SrvdPlmn *srvdPlmn;
5322 SupportedSliceList *sliceSuppLst;
5323 MacCellCfg *macCellCfg;
5324 __attribute__((unused)) CarrierCfg *carrierCfg;
5326 PlmnInfoList *plmnInfoList;
5327 Sib1CellCfg *sib1Cfg;
5328 SchPageCfg *pageCfg;
5329 __attribute__((unused)) PdcchConfigSib1 *pdcchConfigSib1;
5330 BwpDlConfig *bwpDlCfg;
5331 __attribute__((unused)) BwpParams *bwp;
5332 PdcchConfigCommon *pdcchCfgCmn;
5333 SearchSpaceCfg *searchSpaceCfg;
5334 __attribute__((unused)) CandidatesInfo *candidateInfo;
5335 PdschConfigCommon *pdschCfgCmn;
5336 __attribute__((unused)) PdschCfgCommTimeDomRsrcAlloc *pdschCmnTimeDomRsrcAlloc;
5337 BwpUlConfig *bwpUlCfg;
5338 __attribute__((unused)) PucchConfigCommon *pucchCfgCmn;
5339 PuschConfigCommon *puschCfgCmn;
5340 __attribute__((unused)) PuschTimeDomRsrcAlloc *puschTimeDomRsrcAlloc;
5341 __attribute__((unused)) SsbCfg *ssbCfg;
5342 __attribute__((unused)) CsiRsCfg *csiRsCfg;
5344 __attribute__((unused)) PrachFdmInfo *prachFdmInfo;
5345 __attribute__((unused)) PrecodingConf *precodCfg;
5346 __attribute__((unused)) BeamformingConf *beamFormingCfg;
5347 Sib1Params *sib1Params;
5348 __attribute__((unused)) SiSchedInfo *siSchedInfo;
5349 SrvCellCfgCommSib *srvCellCfgCmnSib;
5350 DlCfgCommon *dlCfgCmn;
5351 PdcchCfgCommon *pdcchCfgCommon;
5352 PdschCfgCommon *pdschCfgCommon;
5353 __attribute__((unused)) PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc;
5354 __attribute__((unused)) BcchCfg *bcchCfg;
5355 __attribute__((unused)) PcchCfg *pcchCfg;
5356 UlCfgCommon *ulCfgCmn;
5357 RachCfgCommon *rachCfgCmn;
5358 PuschCfgCommon *puschCfgCommon;
5359 __attribute__((unused)) PuschCfgCmnTimeDomAlloc *puschCmnTimeDomRsrsAlloc;
5360 PucchCfgCommon *pucchCfgCommon;
5361 __attribute__((unused)) TddUlDlCfgCommon *tddUlDlCfgCmn;
5362 MacSliceCfgReq *macSliceCfg;
5363 MacSliceRrmPolicy *rrmPolicy;
5364 __attribute__((unused)) RrmPolicyRatio *rrmPolicyRatio;
5365 __attribute__((unused)) RrmPolicyMemberList *rrmPolicyMemberList;
5368 RanFunction *ranFunc;
5369 CmLListCp *measurementInfoList;
5370 MeasurementInfoForAction *measurementInfoForAction;
5372 F1NrTddInfo *f1NrTddInfo;
5376 DU_LOG("\n ** DU CONFIGURATION ** \n");
5377 DU_LOG("DU ID %d\n", duCfgParam.duId);
5378 DU_LOG("DU Name %s\n", duCfgParam.duName);
5380 DU_LOG("\n ** Thread Affinity ** \n");
5381 DU_LOG("DU APP CORE ID %d\n", duCfgParam.threadInfo.duAppCoreId);
5382 DU_LOG("EGTP CORE ID %d\n", duCfgParam.threadInfo.egtpCoreId);
5383 DU_LOG("SCTP CORE ID %d\n", duCfgParam.threadInfo.sctpCoreId);
5384 DU_LOG("RLC-UL CORE ID %d\n", duCfgParam.threadInfo.rlcUlCoreId);
5385 DU_LOG("RLC-DL and MAC CORE ID %d\n", duCfgParam.threadInfo.rlcMacCoreId);
5386 DU_LOG("SCH CORE ID %d\n", duCfgParam.threadInfo.schCoreId);
5387 DU_LOG("Lower MAC CORE ID %d\n", duCfgParam.threadInfo.lwrMacCoreId);
5389 DU_LOG("MAX NUM DRB %d\n", duCfgParam.maxNumDrb);
5391 sctp = &duCfgParam.sctpParams;
5392 DU_LOG("\n ** SCTP PARAMETER ** \n");
5393 DU_LOG("DU IPv4 Address present %u\n", sctp->duIpAddr.ipV4Pres);
5394 DU_LOG("DU IP Address %u\n", sctp->duIpAddr.ipV4Addr);
5395 DU_LOG("CU IPv4 Address present %u\n", sctp->cuIpAddr.ipV4Pres);
5396 DU_LOG("CU IP Address %u\n", sctp->cuIpAddr.ipV4Addr);
5397 DU_LOG("RIC IPv4 Address present %u\n", sctp->ricIpAddr.ipV4Pres);
5398 DU_LOG("RIC IP Address %u\n", sctp->ricIpAddr.ipV4Addr);
5399 DU_LOG("SCTP Port at DU for F1 Interface %d\n", sctp->duPort[F1_INTERFACE]);
5400 DU_LOG("SCTP Port at CU for F1 Interface %d\n", sctp->cuPort);
5401 DU_LOG("SCTP Port at DU for E2 Interface %d\n", sctp->duPort[E2_INTERFACE]);
5402 DU_LOG("SCTP Port at RIC for E2 Interface %d\n", sctp->ricPort);
5404 egtp = &duCfgParam.egtpParams;
5405 DU_LOG("\n ** EGTP PARAMETER ** \n");
5406 DU_LOG("DU IP Address %d\n", egtp->localIp.ipV4Addr);
5407 DU_LOG("CU IP Address %d\n", egtp->destIp.ipV4Addr);
5408 DU_LOG("EGTP Port at DU %d\n", egtp->localPort);
5409 DU_LOG("EGTP Port at CU %d\n", egtp->destPort);
5410 DU_LOG("Minimum Tunnel ID %d\n", egtp->minTunnelId);
5411 DU_LOG("Maximum Tunnel ID %d\n",egtp->maxTunnelId);
5413 mib = &duCfgParam.mibParams;
5414 DU_LOG("\n ** MIB PARAMETER ** \n");
5415 DU_LOG("System Frame Number %d\n", mib->sysFrmNum);
5416 DU_LOG("Subcarrier Spacing Common %ld\n", mib->subCarrierSpacingCommon);
5417 DU_LOG("SSB Subcarrier Offset %ld\n", mib->ssb_SubcarrierOffset);
5418 DU_LOG("DMRS Type-A Position %ld\n", mib->dmrs_TypeA_Position);
5419 DU_LOG("Control Resource Set Zero %ld\n", mib->controlResourceSetZero);
5420 DU_LOG("Search Space Zero %ld\n", mib->searchSpaceZero);
5421 DU_LOG("Cell Barred %ld\n", mib->cellBarred);
5422 DU_LOG("Intra Frequency Reselection %ld\n", mib->intraFreqReselection);
5424 duSysInfo = &duCfgParam.srvdCellLst[0].duSysInfo;
5425 DU_LOG("\n ** DU System Information ** \n");
5426 DU_LOG("MIB length %d\n", duSysInfo->mibLen);
5427 DU_LOG("MIB message %s\n", duSysInfo->mibMsg);
5428 DU_LOG("SIB1 length %d\n", duSysInfo->sib1Len);
5429 DU_LOG("SIB1 message %s\n", duSysInfo->sib1Msg);
5431 f1DuCellInfo = &duCfgParam.srvdCellLst[0].duCellInfo;
5432 DU_LOG("\n ** DU Cell Information ** \n");
5434 f1CellInfo = &f1DuCellInfo->cellInfo;
5435 DU_LOG("NR PCI %d\n", f1CellInfo->nrPci);
5436 DU_LOG("DU TAC %d\n", f1DuCellInfo->tac);
5437 DU_LOG("EPS TAC %d\n", f1DuCellInfo->epsTac);
5438 DU_LOG("Measurement Time Configuration Duration %d\n", f1DuCellInfo->measTimeCfgDuration);
5439 DU_LOG("Cell Direction %d\n", f1DuCellInfo->cellDir);
5440 DU_LOG("Cell Type %d\n", f1DuCellInfo->cellType);
5442 DU_LOG("\n ** Cell Info : NR CGI ** \n");
5443 DU_LOG("Cell Id %d\n",f1CellInfo->nrCgi.cellId);
5444 DU_LOG("PLMN : mcc[0] %d\n", f1CellInfo->nrCgi.plmn.mcc[0]);
5445 DU_LOG("PLMN : mcc[1] %d\n", f1CellInfo->nrCgi.plmn.mcc[1]);
5446 DU_LOG("PLMN : mcc[2] %d\n", f1CellInfo->nrCgi.plmn.mcc[2]);
5447 DU_LOG("PLMN : mnc[0] %d\n", f1CellInfo->nrCgi.plmn.mnc[0]);
5448 DU_LOG("PLMN : mnc[1] %d\n", f1CellInfo->nrCgi.plmn.mnc[1]);
5449 DU_LOG("PLMN : mnc[2] %d\n", f1CellInfo->nrCgi.plmn.mnc[2]);
5451 srvdPlmn = &f1CellInfo->srvdPlmn[0];
5452 DU_LOG("\n ** Cell Info : Served PLMN ** \n");
5453 DU_LOG("PLMN : mcc[0] %d\n", srvdPlmn->plmn.mcc[0]);
5454 DU_LOG("PLMN : mcc[1] %d\n", srvdPlmn->plmn.mcc[1]);
5455 DU_LOG("PLMN : mcc[2] %d\n", srvdPlmn->plmn.mcc[2]);
5456 DU_LOG("PLMN : mnc[0] %d\n", srvdPlmn->plmn.mnc[0]);
5457 DU_LOG("PLMN : mnc[1] %d\n", srvdPlmn->plmn.mnc[1]);
5458 DU_LOG("PLMN : mnc[2] %d\n", srvdPlmn->plmn.mnc[2]);
5459 DU_LOG("EXT_PLMN : mcc[0] %d\n", srvdPlmn->extPlmn.mcc[0]);
5460 DU_LOG("EXT_PLMN : mcc[1] %d\n", srvdPlmn->extPlmn.mcc[1]);
5461 DU_LOG("EXT_PLMN : mcc[2] %d\n", srvdPlmn->extPlmn.mcc[2]);
5462 DU_LOG("EXT_PLMN : mnc[0] %d\n", srvdPlmn->extPlmn.mnc[0]);
5463 DU_LOG("EXT_PLMN : mnc[1] %d\n", srvdPlmn->extPlmn.mnc[1]);
5464 DU_LOG("EXT_PLMN : mnc[2] %d\n", srvdPlmn->extPlmn.mnc[2]);
5466 sliceSuppLst = &srvdPlmn->taiSliceSuppLst;
5467 DU_LOG("\n ** Cell Info : Served PLMN : Supported Slice List ** \n");
5468 DU_LOG("Number of Slices supported %d\n", sliceSuppLst->numSupportedSlices);
5469 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
5472 DU_LOG("\tSST %d\n", (*sliceSuppLst->snssai[sliceIdx]).sst);
5473 DU_LOG("\tSD %d %d %d\n", (*sliceSuppLst->snssai[sliceIdx]).sd[0], (*sliceSuppLst->snssai[sliceIdx]).sd[1], \
5474 (*sliceSuppLst->snssai[sliceIdx]).sd[2]);
5477 brdcstPlmnInfo = &f1DuCellInfo->brdcstPlmnInfo[0];
5478 DU_LOG("\n ** DU Cell Information : Broadcast PLMN Info ** \n");
5479 DU_LOG("TAC %d\n", brdcstPlmnInfo->tac);
5480 DU_LOG("NR Cell Id %d\n", brdcstPlmnInfo->nrCellId);
5481 DU_LOG("RANAC %d\n", brdcstPlmnInfo->ranac);
5483 DU_LOG("PLMN : mcc[0] %d\n", brdcstPlmnInfo->plmn[0].mcc[0]);
5484 DU_LOG("PLMN : mcc[1] %d\n", brdcstPlmnInfo->plmn[0].mcc[1]);
5485 DU_LOG("PLMN : mcc[2] %d\n", brdcstPlmnInfo->plmn[0].mcc[2]);
5486 DU_LOG("PLMN : mnc[0] %d\n", brdcstPlmnInfo->plmn[0].mnc[0]);
5487 DU_LOG("PLMN : mnc[1] %d\n", brdcstPlmnInfo->plmn[0].mnc[1]);
5488 DU_LOG("PLMN : mnc[2] %d\n", brdcstPlmnInfo->plmn[0].mnc[2]);
5490 DU_LOG("EXT_PLMN : mcc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[0]);
5491 DU_LOG("EXT_PLMN : mcc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[1]);
5492 DU_LOG("EXT_PLMN : mcc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[2]);
5493 DU_LOG("EXT_PLMN : mnc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[0]);
5494 DU_LOG("EXT_PLMN : mnc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[1]);
5495 DU_LOG("EXT_PLMN : mnc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[2]);
5497 nrModeInfo = &f1DuCellInfo->f1Mode;
5498 f1NrFddInfo = &nrModeInfo->mode.fdd;
5499 DU_LOG("\n ** DU Cell Information : NR Mode Info ** \n");
5501 DU_LOG("\n ** NR Mode Info : FDD ** \n");
5502 DU_LOG("\n ** NR Mode Info : FDD : UL NR Frequency ** \n");
5503 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->ulNrFreqInfo.nrArfcn);
5504 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->ulNrFreqInfo.sulInfo.sulArfcn);
5505 DU_LOG("SUL : Transmission BW Subcarrier Spacing %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrScs);
5506 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrb);
5507 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].nrFreqBand);
5508 DU_LOG("SUL Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].sulBand[0]);
5510 DU_LOG("\n ** NR Mode Info : FDD : DL NR Frequency ** \n");
5511 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->dlNrFreqInfo.nrArfcn);
5512 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->dlNrFreqInfo.sulInfo.sulArfcn);
5513 DU_LOG("SUL : Transmission BW Subcarrier Sapcing %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrScs);
5514 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrb);
5515 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].nrFreqBand);
5516 DU_LOG("SUL Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].sulBand[0]);
5518 DU_LOG("\n ** NR Mode Info : FDD : UL Transmission Bandwidth ** \n");
5519 DU_LOG("Subscarrier spacing %d\n", f1NrFddInfo->ulTxBw.nrScs);
5520 DU_LOG("Number of RBs %d\n", f1NrFddInfo->ulTxBw.nrb);
5522 DU_LOG("\n ** NR Mode Info : FDD : DL Transmission Bandwidth ** \n");
5523 DU_LOG("Subcarrier Spacing %d\n", f1NrFddInfo->dlTxBw.nrScs);
5524 DU_LOG("Number of RBs %d\n", f1NrFddInfo->dlTxBw.nrb);
5528 f1NrTddInfo = &nrModeInfo ->mode.tdd;
5530 DU_LOG("\n ** NR Mode Info : TDD : NR Frequency ** \n");
5531 DU_LOG("NR ARFCN %d\n", f1NrTddInfo->nrFreqInfo.nrArfcn);
5532 DU_LOG("SUL : ARFCN %d\n",f1NrTddInfo->nrFreqInfo.sulInfo.sulArfcn);
5533 DU_LOG("SUL : Transmission BW Subscarrier Spacing %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrScs);
5534 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrb);
5535 DU_LOG("NR Frequency Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].nrFreqBand);
5536 DU_LOG("SUL Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].sulBand[0]);
5538 DU_LOG("\n ** NR Mode Info : TDD : NR Transmission Bandwidth ** \n");
5539 DU_LOG("Subcarrier Spacing %d\n", f1NrTddInfo->nrTxBw.nrScs);
5540 DU_LOG("Number of RBs %d\n", f1NrTddInfo->nrTxBw.nrb);
5543 macCellCfg = &duCfgParam.macCellCfg;
5544 DU_LOG("\n ** MAC CELL CONFIGURATION ** \n");
5545 DU_LOG("Cell Id %d\n", macCellCfg->cellId);
5547 DU_LOG("\n ** MAC Cell Configuration : Carrier Configuration ** \n");
5548 carrierCfg = &macCellCfg ->carrCfg;
5549 DU_LOG("DL Bandwidth %d\n", carrierCfg->dlBw);
5550 DU_LOG("DL ARFCN %d\n", carrierCfg->arfcnDL);
5551 DU_LOG("UL Bandwidth %d\n", carrierCfg->ulBw);
5552 DU_LOG("UL ARFCN %d\n", carrierCfg->arfcnUL);
5553 DU_LOG("Number of Transmission Antenna %d\n", carrierCfg->numTxAnt);
5554 DU_LOG("Number of Received Antenna %d\n", carrierCfg->numRxAnt);
5556 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration ** \n");
5557 cellCfg = &macCellCfg ->cellCfg;
5558 DU_LOG("Operational State %d\n", cellCfg->opState);
5559 DU_LOG("Administration State %d\n", cellCfg->adminState);
5560 DU_LOG("Cell Current State %d\n", cellCfg->cellState);
5561 DU_LOG("NR PCI %d\n", cellCfg->phyCellId);
5562 DU_LOG("TAC: %d\n", cellCfg->tac);
5563 DU_LOG("SSB Freqeuncy %d\n", cellCfg->ssbFreq);
5564 DU_LOG("Subcarrier Spacing: %d\n", cellCfg->subCarrSpacing);
5565 DU_LOG("Duplex Mode %d\n", cellCfg->dupType);
5567 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : PLMN Info List ** \n");
5568 plmnInfoList = &cellCfg ->plmnInfoList[0];
5569 DU_LOG("PLMN : mcc[0] %d\n", plmnInfoList->plmn.mcc[0]);
5570 DU_LOG("PLMN : mcc[1] %d\n", plmnInfoList->plmn.mcc[1]);
5571 DU_LOG("PLMN : mcc[2] %d\n", plmnInfoList->plmn.mcc[2]);
5572 DU_LOG("PLMN : mnc[0] %d\n", plmnInfoList->plmn.mnc[0]);
5573 DU_LOG("PLMN : mnc[1] %d\n", plmnInfoList->plmn.mnc[1]);
5574 DU_LOG("PLMN : mnc[2] %d\n", plmnInfoList->plmn.mnc[2]);
5576 DU_LOG("Number of Slice supported %d\n", plmnInfoList->suppSliceList.numSupportedSlices);
5577 for(sliceIdx = 0; sliceIdx < plmnInfoList->suppSliceList.numSupportedSlices; sliceIdx++)
5580 DU_LOG("\nSST %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sst);
5581 DU_LOG("\nSD %d %d %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[0], \
5582 (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[1],(*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[2]);
5585 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 ** \n");
5586 sib1Cfg = &cellCfg->sib1Cfg;
5587 DU_LOG("SIB1 PDU Length %d\n", sib1Cfg->sib1PduLen);
5588 DU_LOG("SIB1 PDU %s\n", sib1Cfg->sib1Pdu);
5590 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : Paging Configuration ** \n");
5591 pageCfg = &sib1Cfg->pagingCfg;
5593 DU_LOG("Number of Paging Occassion %d\n", pageCfg->numPO);
5594 if (pageCfg->poPresent == true)
5595 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : TRUE\n");
5597 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : FALSE\n");
5599 for(pfIdx = 0; pfIdx < MAX_PO_PER_PF; pfIdx++)
5601 DU_LOG("Paging Occassion at Paging Frame [%d] : %d\n", pfIdx, pageCfg->pagingOcc[pfIdx]);
5604 pdcchConfigSib1 = &sib1Cfg->pdcchCfgSib1;
5605 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : PDCCH ** \n");
5606 DU_LOG("Coreset Zero Index %d\n", pdcchConfigSib1->coresetZeroIndex);
5607 DU_LOG("Search Space Zero Index %d\n", pdcchConfigSib1->searchSpaceZeroIndex);
5609 bwpDlCfg = &cellCfg->initialDlBwp;
5610 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP Configuration ** \n");
5612 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : BWP ** \n");
5613 bwp = &bwpDlCfg->bwp;
5614 DU_LOG("First PRB %d\n", bwp->firstPrb);
5615 DU_LOG("Number of PRBs %d\n", bwp->numPrb);
5616 DU_LOG("Subcarrier Spacing %d\n", bwp->scs);
5617 DU_LOG("Cyclic Perfix %d\n", bwp->cyclicPrefix);
5619 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common ** \n");
5620 pdcchCfgCmn = &bwpDlCfg->pdcchCommon;
5621 DU_LOG("RA Search Space ID %d\n", pdcchCfgCmn->raSearchSpaceId);
5623 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common : Search Space ** \n");
5624 searchSpaceCfg = &pdcchCfgCmn->commonSearchSpace;
5625 DU_LOG("Search Space ID %d\n", searchSpaceCfg->searchSpaceId);
5626 DU_LOG("Coreset ID %d\n", searchSpaceCfg->coresetId);
5627 DU_LOG("Monitoring Slot %d\n", searchSpaceCfg->monitoringSlot);
5628 DU_LOG("Duration %d\n", searchSpaceCfg->duration);
5629 DU_LOG("Monitoring Symbol %x\n", searchSpaceCfg->monitoringSymbol);
5631 candidateInfo = &searchSpaceCfg->candidate;
5632 DU_LOG("Number of Candidates in Aggregation Level_1 %d\n", candidateInfo->aggLevel1);
5633 DU_LOG("Number of Candidates in Aggregation Level_2 %d\n", candidateInfo->aggLevel2);
5634 DU_LOG("Number of Candidates in Aggregation Level_4 %d\n", candidateInfo->aggLevel4);
5635 DU_LOG("Number of Candidates in Aggregation Level_8 %d\n", candidateInfo->aggLevel8);
5636 DU_LOG("Number of Candidates in Aggregation Level_16 %d\n", candidateInfo->aggLevel16);
5638 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDSCH Config Common ** \n");
5639 pdschCfgCmn = &bwpDlCfg->pdschCommon;
5640 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCmn->numTimeDomAlloc);
5642 for (rsrcIdx = 0; rsrcIdx < pdschCfgCmn->numTimeDomAlloc; rsrcIdx++)
5644 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
5645 pdschCmnTimeDomRsrcAlloc = &pdschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
5646 DU_LOG("\tK0 %d\n", pdschCmnTimeDomRsrcAlloc->k0);
5647 DU_LOG("\tPDSCH Mapping Type %d\n", pdschCmnTimeDomRsrcAlloc->mappingType);
5648 DU_LOG("\tPDSCH Start Symbol %d\n", pdschCmnTimeDomRsrcAlloc->startSymbol);
5649 DU_LOG("\tPDSCH Symbol Length %d\n", pdschCmnTimeDomRsrcAlloc->lengthSymbol);
5652 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP Configuration ** \n");
5653 bwpUlCfg = &cellCfg->initialUlBwp;
5655 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : BWP ** \n");
5656 DU_LOG("First PRB %d\n", bwpUlCfg->bwp.firstPrb);
5657 DU_LOG("Number of PRBs %d\n", bwpUlCfg->bwp.numPrb);
5658 DU_LOG("Subcarrier Spacing %d\n", bwpUlCfg->bwp.scs);
5659 DU_LOG("Cyclic Prefix %d\n", bwpUlCfg->bwp.cyclicPrefix);
5661 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUCCH Config Common ** \n");
5662 pucchCfgCmn = &bwpUlCfg->pucchCommon;
5663 DU_LOG("PUCCH Resource Common %d\n", pucchCfgCmn->pucchResourceCommon);
5664 DU_LOG("Group Hopping %d\n", pucchCfgCmn->pucchGroupHopping);
5666 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUSCH Config Common ** \n");
5667 puschCfgCmn = &bwpUlCfg ->puschCommon;
5668 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCmn->numTimeDomRsrcAlloc);
5669 for (rsrcIdx = 0; rsrcIdx < puschCfgCmn->numTimeDomRsrcAlloc; rsrcIdx++)
5671 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
5672 puschTimeDomRsrcAlloc = &puschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
5673 DU_LOG("\tK2 %d\n", puschTimeDomRsrcAlloc->k2);
5674 DU_LOG("\tPUSCH Mapping Type %d\n", puschTimeDomRsrcAlloc->mappingType);
5675 DU_LOG("\tPUSCH Start Symbol %d\n", puschTimeDomRsrcAlloc->startSymbol);
5676 DU_LOG("\tPUSCH Symbol Length %d\n", puschTimeDomRsrcAlloc->symbolLength);
5677 DU_LOG("\tPUSCH Start Symbol And Length %d\n", puschTimeDomRsrcAlloc->startSymbolAndLength);
5680 DU_LOG("\n ** MAC Cell Configuration : SSB Configuration** \n");
5681 ssbCfg = &macCellCfg ->ssbCfg;
5682 DU_LOG("SSB PDCH Power %d\n", ssbCfg->ssbPbchPwr);
5683 DU_LOG("Subcarrier Spacing Common %d\n", ssbCfg->scsCmn);
5684 DU_LOG("SSB Offset from Point A %d\n", ssbCfg->ssbOffsetPointA);
5685 DU_LOG("SSB Periodicity in msec %d\n", ssbCfg->ssbPeriod);
5686 DU_LOG("SSB Subcarrier Offset %d\n", ssbCfg->ssbScOffset);
5687 for (ssbMaskIdx = 0; ssbMaskIdx < SSB_MASK_SIZE; ssbMaskIdx++)
5689 DU_LOG("SSB Mask[%d] :%d\n", ssbMaskIdx, ssbCfg->ssbMask[ssbMaskIdx]);
5691 DU_LOG("Beam ID %d\n", ssbCfg->beamId[0]);
5692 DU_LOG("BETA PSS %d\n", ssbCfg->betaPss);
5693 DU_LOG("BCH Payloag Flag %d\n", ssbCfg->bchPayloadFlag);
5694 DU_LOG("MIB PDU %d %d %d \n", ssbCfg->mibPdu[0], ssbCfg->mibPdu[1], ssbCfg->mibPdu[2]);
5695 DU_LOG("DMRS Type-A Position %d\n", ssbCfg->dmrsTypeAPos);
5697 DU_LOG("\n ** MAC Cell Configuration : CSI RS Configuration ** \n");
5698 csiRsCfg = &macCellCfg->csiRsCfg;
5699 DU_LOG("Frequency Domain Allocation %s\n", csiRsCfg->csiFreqDomainAlloc);
5700 DU_LOG("Number of Ports %d\n", csiRsCfg->csiNrofPorts);
5701 DU_LOG("First OFDM Symbol in Time Domain %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain);
5702 DU_LOG("First OFDM Symbol in Timer Domain 2 %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2);
5703 DU_LOG("CDM Type %d\n", csiRsCfg->csirscdmType);
5704 DU_LOG("Density %d\n", csiRsCfg->csirsdensity);
5705 DU_LOG("Density dot 5:%d\n", csiRsCfg->csirsdensitydot5);
5706 DU_LOG("Power Control Offset %d\n", csiRsCfg->powerControlOffset);
5707 DU_LOG("Power Control Offset Search Space %d\n", csiRsCfg->powerControlOffsetSS);
5708 DU_LOG("Periodicity And Offset %d\n", csiRsCfg->periodicityAndOffset);
5710 DU_LOG("\n ** MAC Cell Configuration : PRACH Configuration ** \n");
5711 prachCfg = &macCellCfg->prachCfg;
5712 DU_LOG("PRACH Sequence Length %d\n", prachCfg->prachSeqLen);
5713 DU_LOG("Subcarrier Spacing %d\n", prachCfg->prachSubcSpacing);
5714 DU_LOG("Number of PRACH FDM %d\n", prachCfg->msg1Fdm);
5715 DU_LOG("PRACH Configuration Index %d\n", prachCfg->prachCfgIdx);
5716 DU_LOG("PRACH Restricted Set Configuration %d\n", prachCfg->prachRstSetCfg);
5717 DU_LOG("Number of SSB per RACH occassion %d\n", prachCfg->ssbPerRach);
5718 DU_LOG("Number of RA preambles %d\n", prachCfg->totalNumRaPreamble);
5719 DU_LOG("Number of Contention Based Preamble per SSB %d\n", prachCfg->numCbPreamblePerSsb);
5720 DU_LOG("PRACH Frequeny Start Offset %d\n", prachCfg->msg1FreqStart);
5721 DU_LOG("RA Contention Resolution Timer %d\n", prachCfg->raContResTmr);
5722 DU_LOG("RSRP Threshold %d\n", prachCfg->rsrpThreshSsb);
5723 DU_LOG("RA Response Window %d\n", prachCfg->raRspWindow);
5724 for(fdmIdx = 0; fdmIdx < prachCfg->msg1Fdm; fdmIdx++)
5726 prachFdmInfo = &prachCfg->fdm[fdmIdx];
5727 DU_LOG("FDM[%d]\n", fdmIdx);
5728 DU_LOG("\tRoot Sequence Index %d\n", prachFdmInfo->rootSeqIdx);
5729 DU_LOG("\tNumber of Root Sequence %d\n", prachFdmInfo->numRootSeq);
5730 DU_LOG("\tK1 %d\n", prachFdmInfo->k1);
5731 DU_LOG("\tZero Correlation Zone Configuration %d\n", prachFdmInfo->zeroCorrZoneCfg);
5735 DU_LOG("\n ** MAC Cell Configuration : TDD Configuration ** \n");
5736 tddCfg = &macCellCfg->tddCfg;
5737 DU_LOG("TDD Slot Periodicity %d\n", tddCfg->tddPeriod);
5738 DU_LOG("Number of DL Slots %d\n", tddCfg->nrOfDlSlots);
5739 DU_LOG("Number of DL Symbols %d\n", tddCfg->nrOfDlSymbols);
5740 DU_LOG("Number of UL Slots %d\n", tddCfg->nrOfUlSlots);
5741 DU_LOG("Number of UL Symbols %d\n", tddCfg->nrOfUlSymbols);
5744 DU_LOG("\n ** MAC Cell Configuration : Precoding Configuration ** \n");
5745 precodCfg = &macCellCfg->precodingConf;
5746 DU_LOG("Number of Layers %d\n", precodCfg->numLayers);
5747 DU_LOG("Number of Antenna Ports %d\n", precodCfg->numAntPorts);
5749 DU_LOG("\n ** MAC Cell Config : BEAM FORMING CFG ** \n");
5750 beamFormingCfg = &macCellCfg ->beamCfg;
5751 DU_LOG("Number of Beams %d\n", beamFormingCfg->numOfBeams);
5752 DU_LOG("Number of Tx RUs %d\n", beamFormingCfg->numTxRUs);
5753 DU_LOG("Beam Index %d\n", beamFormingCfg->beamIdx);
5754 DU_LOG("Beam Type %d\n", beamFormingCfg->beamType);
5755 DU_LOG("Beam Azimuth %d\n", beamFormingCfg->beamAzimuth);
5756 DU_LOG("Beam Tilt %d\n", beamFormingCfg->beamTilt);
5757 DU_LOG("Beam Horizontal Width %d\n", beamFormingCfg->beamHorizWidth);
5758 DU_LOG("Beam Vertical Width %d\n", beamFormingCfg->beamVertWidth);
5759 DU_LOG("Coverage Shape %d\n", beamFormingCfg->coverageShape);
5760 DU_LOG("Digitak Tilt %d\n",beamFormingCfg ->digitalTilt);
5761 DU_LOG("Digital Azimuth %d\n", beamFormingCfg->digitalAzimuth);
5763 DU_LOG("\n ** SIB1 Configuration ** \n");
5764 sib1Params = &duCfgParam.sib1Params;
5765 DU_LOG("TAC %d\n", sib1Params->tac);
5766 DU_LOG("RANAC %ld\n", sib1Params->ranac);
5767 DU_LOG("Cell ID %d\n", sib1Params->cellIdentity);
5768 DU_LOG("Cell Reserved for Operational Use %ld\n", sib1Params->cellResvdForOpUse);
5769 DU_LOG("Connection Establishment Failure Count %ld\n", sib1Params->connEstFailCnt);
5770 DU_LOG("Connection Establishment Failure Offset Valid %ld\n", sib1Params->connEstFailOffValidity);
5771 DU_LOG("Connection Establishment Failure Offset %ld\n", sib1Params->connEstFailOffset);
5772 DU_LOG("PLMN : mcc[0] %d\n", sib1Params->plmn.mcc[0]);
5773 DU_LOG("PLMN : mcc[1] %d\n", sib1Params->plmn.mcc[1]);
5774 DU_LOG("PLMN : mcc[2] %d\n", sib1Params->plmn.mcc[2]);
5775 DU_LOG("PLMN : mnc[0] %d\n", sib1Params->plmn.mnc[0]);
5776 DU_LOG("PLMN : mnc[1] %d\n", sib1Params->plmn.mnc[1]);
5777 DU_LOG("PLMN : mnc[2] %d\n", sib1Params->plmn.mnc[2]);
5779 DU_LOG("\n ** SIB1 : SI Scheduling Info ** \n");
5780 siSchedInfo = &sib1Params ->siSchedInfo;
5781 DU_LOG("Windown Length %ld\n", siSchedInfo->winLen);
5782 DU_LOG("Broadcast Status %ld\n", siSchedInfo->broadcastSta);
5783 DU_LOG("Periodicity %ld\n", siSchedInfo->preiodicity);
5784 DU_LOG("SIB Type %ld\n", siSchedInfo->sibType);
5785 DU_LOG("SIB Value Tag %ld\n", siSchedInfo->sibValTag);
5787 DU_LOG("\n ** SIB1 : Serving Cell Configuration Common SIB ** \n");
5788 srvCellCfgCmnSib = &sib1Params->srvCellCfgCommSib;
5789 DU_LOG("Subcarrier Spacing %ld\n", srvCellCfgCmnSib->scs);
5790 DU_LOG("SSB Position in Burst %d\n", srvCellCfgCmnSib->ssbPosInBurst);
5791 DU_LOG("SSB Periodicity %ld\n", srvCellCfgCmnSib->ssbPrdServingCell);
5792 DU_LOG("SS PBCH Power %ld\n", srvCellCfgCmnSib->ssPbchBlockPwr);
5794 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common ** \n");
5795 dlCfgCmn = &srvCellCfgCmnSib->dlCfg;
5796 DU_LOG("Frequency Band Indicator %ld\n", dlCfgCmn->freqBandInd);
5797 DU_LOG("Offset to Point A %ld\n", dlCfgCmn->offsetToPointA);
5798 DU_LOG("Frequency Location And Bandwidth %ld\n", dlCfgCmn->locAndBw);
5799 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsOffset);
5800 DU_LOG("Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scs);
5801 DU_LOG("Bandwidth considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsBw);
5803 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common : PDCCH Config Common ** \n");
5804 pdcchCfgCommon = &dlCfgCmn->pdcchCfg;
5805 if(pdcchCfgCommon->present)
5807 DU_LOG("Control Resource Set Zero Index %ld\n", pdcchCfgCommon->ctrlRsrcSetZero);
5808 DU_LOG("Search Space Zero Index %ld\n", pdcchCfgCommon->searchSpcZero);
5809 DU_LOG("Search Space ID %ld\n", pdcchCfgCommon->searchSpcId);
5810 DU_LOG("Control Resource Set ID %ld\n", pdcchCfgCommon->ctrlRsrcSetId);
5811 DU_LOG("Monitoring Slot Periodicity and Offset Present %d\n", pdcchCfgCommon->monitorSlotPrdAndOffPresent);
5812 DU_LOG("Monitoring Slot Periodicity and Offset %ld\n", pdcchCfgCommon->monitorSlotPrdAndOff);
5813 for (monitoringSymbIdx = 0; monitoringSymbIdx < 2; monitoringSymbIdx++)
5815 DU_LOG("Monitoring Symbols in Slot [%d] %d\n",monitoringSymbIdx, pdcchCfgCommon->monitorSymbolsInSlot[monitoringSymbIdx]);
5817 DU_LOG("Number of Candidates for Aggregation Level_1 %ld\n", pdcchCfgCommon->numCandAggLvl1);
5818 DU_LOG("Number of Candidates for Aggregation Level_2 %ld\n", pdcchCfgCommon->numCandAggLvl2);
5819 DU_LOG("Number of Candidates for Aggregation Level_4 %ld\n", pdcchCfgCommon->numCandAggLvl4);
5820 DU_LOG("Number of Candidates for Aggregation Level_8 %ld\n", pdcchCfgCommon->numCandAggLvl8);
5821 DU_LOG("Number of Candidates for Aggregation Level_16 %ld\n", pdcchCfgCommon->numCandAggLvl16);
5822 DU_LOG("Seach Space Type %d\n", pdcchCfgCommon->searchSpcType);
5823 DU_LOG("Common Search Space DCI Format %d\n", pdcchCfgCommon->commSrchSpcDciFrmt);
5824 DU_LOG("SIB1 Search Space ID %ld\n", pdcchCfgCommon->searchSpcSib1);
5825 DU_LOG("Paging Search Space ID %ld\n", pdcchCfgCommon->pagingSearchSpc);
5826 DU_LOG("RA Search Space ID %ld\n", pdcchCfgCommon->raSearchSpc);
5830 DU_LOG("PDCCH Config Common not Present");
5833 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PDSCH Config Common ** \n");
5834 pdschCfgCommon = &dlCfgCmn->pdschCfg;
5835 DU_LOG("PDSCH Config Common Present %d\n", pdschCfgCommon->present);
5836 if(pdschCfgCommon->present)
5838 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCommon->numTimeDomRsrcAlloc);
5839 for (rsrcIdx = 0; rsrcIdx < pdschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
5841 pdschTimeDomRsrcAlloc = &pdschCfgCommon->timeDomAlloc[rsrcIdx];
5842 DU_LOG("PDSCH Timer Domain Resource Allocation [%d]", rsrcIdx);
5843 DU_LOG("K0 %ld\n", pdschTimeDomRsrcAlloc->k0);
5844 DU_LOG("MappingType %ld\n", pdschTimeDomRsrcAlloc->mapType);
5845 DU_LOG("SLIV %d\n", pdschTimeDomRsrcAlloc->sliv);
5850 DU_LOG("PDSCH Config Common not Present");
5853 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : BCCH Config Common ** \n");
5854 bcchCfg = &dlCfgCmn->bcchCfg;
5855 DU_LOG("Modification Period Coefficient %ld\n", bcchCfg->modPrdCoeff);
5857 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PCCH Config Common ** \n");
5858 pcchCfg = &dlCfgCmn->pcchCfg;
5859 DU_LOG("Default Paging Cycle %d\n", pcchCfg->dfltPagingCycle);
5860 DU_LOG("Number of PF in Paging Cycle %d\n", pcchCfg->nAndPagingFrmOffsetType);
5861 DU_LOG("PF Offset %d\n", pcchCfg->pageFrameOffset);
5862 DU_LOG("NS - Number of P0 in PF %d\n", pcchCfg->ns);
5863 DU_LOG("First PDCCH Monitoring Occassion of each P0 Type %d\n", pcchCfg->firstPDCCHMontioringType);
5864 for (poIdx = 0; poIdx < MAX_PO_PER_PF; poIdx++)
5866 DU_LOG("First PDCCH Monitoring Occassion in P0 [%d] %d\n", poIdx, pcchCfg->firstPDCCHMontioringInfo[poIdx]);
5869 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common ** \n");
5870 ulCfgCmn = &srvCellCfgCmnSib->ulCfg;
5871 DU_LOG("Frequency Band Indicator %ld\n", ulCfgCmn->freqBandInd);
5872 DU_LOG("Maximum Transmission Power %ld\n", ulCfgCmn->pMax);
5873 DU_LOG("Frequency Location and Bandwidth %ld\n", ulCfgCmn->locAndBw);
5874 DU_LOG("Time Alignment Timer %ld\n", ulCfgCmn->timeAlignTimerComm);
5875 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsOffset);
5876 DU_LOG("Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scs);
5877 DU_LOG("Carrier BW considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsBw);
5879 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : RACH Config Common ** \n");
5880 rachCfgCmn = &ulCfgCmn ->rachCfg;
5881 if(rachCfgCmn->present)
5883 DU_LOG("PRACH Configuration Index %ld\n", rachCfgCmn->prachCfgIdx);
5884 DU_LOG("Number of PRACH FDM %ld\n", rachCfgCmn->msg1Fdm);
5885 DU_LOG("PRACH Frequeny Start Offset %ld\n", rachCfgCmn->msg1FreqStart);
5886 DU_LOG("Zero Correaltion Zone Configuration %ld\n", rachCfgCmn->zeroCorrZoneCfg);
5887 DU_LOG("Target Power Level of Received Preamble %ld\n", rachCfgCmn->preambleRcvdTgtPwr);
5888 DU_LOG("Maximum number of Preamble Transmission %ld\n", rachCfgCmn->preambleTransMax);
5889 DU_LOG("Power Ramping Step %ld\n", rachCfgCmn->pwrRampingStep);
5890 DU_LOG("RA Response Window %ld\n", rachCfgCmn->raRspWindow);
5891 DU_LOG("Total Number of RA Preambles %ld\n", rachCfgCmn->numRaPreamble);
5892 DU_LOG("Number of SSB per RACH Occassion %ld\n", rachCfgCmn->numSsbPerRachOcc);
5893 DU_LOG("Number of Contention Based Preamble per SSB %ld\n", rachCfgCmn->numCbPreamblePerSsb);
5894 DU_LOG("Contention Resolution Timer %ld\n", rachCfgCmn->contResTimer);
5895 DU_LOG("RSRP Threshold %ld\n", rachCfgCmn->rsrpThreshSsb);
5896 DU_LOG("Root Sequence Index Present %d\n", rachCfgCmn->rootSeqIdxPresent);
5897 DU_LOG("Root Sequence Index %ld\n", rachCfgCmn->rootSeqIdx);
5898 DU_LOG("Subcarrier Spacing %ld\n", rachCfgCmn->msg1Scs);
5899 DU_LOG("Restricted Set Configuration %ld\n", rachCfgCmn->restrictedSetCfg);
5903 DU_LOG("RACH Config Common not present\n");
5906 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUSCH Config Common ** \n");
5907 puschCfgCommon = &ulCfgCmn ->puschCfg;
5908 if(puschCfgCommon->puschCfgPresent)
5910 DU_LOG("MSG3 Delta from RACH Preamble %ld\n", puschCfgCommon->msg3DeltaPreamble);
5911 DU_LOG("P0 Nominal With Grant %ld\n", puschCfgCommon->p0NominalWithGrant);
5912 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCommon->numTimeDomRsrcAlloc);
5913 for(rsrcIdx = 0; rsrcIdx < puschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
5915 puschCmnTimeDomRsrsAlloc = &puschCfgCommon ->timeDomAllocList[rsrcIdx];
5916 DU_LOG("Time Domain Resource Alloc [%d]", rsrcIdx);
5917 DU_LOG("\tK2 %ld\n", puschCmnTimeDomRsrsAlloc->k2);
5918 DU_LOG("\tMapping Type %ld\n", puschCmnTimeDomRsrsAlloc->mapType);
5919 DU_LOG("\tSLIV %d\n", puschCmnTimeDomRsrsAlloc->sliv);
5924 DU_LOG("PUSCH Config Common not present\n");
5927 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUCCH Config Common **\n");
5928 pucchCfgCommon = &ulCfgCmn->pucchCfg;
5929 if(pucchCfgCommon->present)
5931 DU_LOG("Resource Common %ld\n", pucchCfgCommon->rsrcComm);
5932 DU_LOG("Group Hopping %ld\n", pucchCfgCommon->grpHop);
5933 DU_LOG("P0 Nominal %ld\n", pucchCfgCommon->p0Nominal);
5937 DU_LOG("PUCCH Config Common not present\n");
5940 DU_LOG("\n ** SIB1 : Serving Cell Config Common : TDD UL DL Config Common ** \n");
5941 tddUlDlCfgCmn = &srvCellCfgCmnSib->tddCfg;
5942 DU_LOG("Reference Subcarrier Spacing %ld\n", tddUlDlCfgCmn->refScs);
5943 DU_LOG("Transmission Periodicity %ld\n", tddUlDlCfgCmn->txPrd);
5944 DU_LOG("Number of DL Slots %ld\n", tddUlDlCfgCmn->numDlSlots);
5945 DU_LOG("Number of DL Symbols %ld\n", tddUlDlCfgCmn->numDlSymbols);
5946 DU_LOG("Number of UL Slots %ld\n", tddUlDlCfgCmn->numUlSlots);
5947 DU_LOG("Number of UL Symbols %ld\n", tddUlDlCfgCmn->numUlSymbols);
5949 DU_LOG("\n ** MAC SLICE CONFIG REQUEST ** \n");
5950 macSliceCfg = &duCfgParam.tempSliceCfg;
5951 DU_LOG("Number of RRM Policy %d\n",macSliceCfg->numOfRrmPolicy);
5953 for(policyIdx = 0; policyIdx < macSliceCfg->numOfRrmPolicy; policyIdx++)
5955 rrmPolicy = macSliceCfg->listOfRrmPolicy[policyIdx];
5956 DU_LOG("RRM Policy [%d]\n", policyIdx);
5957 DU_LOG("\tResource Type %d\n", rrmPolicy->resourceType);
5959 rrmPolicyRatio = &rrmPolicy ->policyRatio;
5960 DU_LOG("\tPolicy Maximum Ratio %d\n", rrmPolicyRatio->maxRatio);
5961 DU_LOG("\tPolicy Minimum Ratio %d\n", rrmPolicyRatio->minRatio);
5962 DU_LOG("\tPolicy Deidcated Ration %d\n", rrmPolicyRatio->dedicatedRatio);
5963 DU_LOG("\tNumber of RRM Policy Member %d\n", rrmPolicy->numOfRrmPolicyMem);
5965 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
5967 rrmPolicyMemberList = rrmPolicy->rRMPolicyMemberList[memIdx];
5968 DU_LOG("\tRRM Policy Member [%d]\n", memIdx);
5969 DU_LOG("\t\tPLMN : mcc[0] %d\n", rrmPolicyMemberList->plmn.mcc[0]);
5970 DU_LOG("\t\tPLMN : mcc[1] %d\n", rrmPolicyMemberList->plmn.mcc[1]);
5971 DU_LOG("\t\tPLMN : mcc[2] %d\n", rrmPolicyMemberList->plmn.mcc[2]);
5972 DU_LOG("\t\tPLMN : mnc[0] %d\n", rrmPolicyMemberList->plmn.mnc[0]);
5973 DU_LOG("\t\tPLMN : mnc[1] %d\n", rrmPolicyMemberList->plmn.mnc[1]);
5974 DU_LOG("\t\tPLMN : mnc[2] %d\n", rrmPolicyMemberList->plmn.mnc[2]);
5975 DU_LOG("\t\tSST %d\n",rrmPolicyMemberList->snssai.sst);
5976 DU_LOG("\t\tSD %d %d %d\n",rrmPolicyMemberList->snssai.sd[0],rrmPolicyMemberList->snssai.sd[1],rrmPolicyMemberList->snssai.sd[2]);
5980 DU_LOG("\n ** E2 configuration ** \n");
5981 e2apDb = &duCb.e2apDb;
5982 DU_LOG("E2 node id %lu\n", e2apDb->e2NodeId);
5983 DU_LOG("Number of RAN function %d\n", e2apDb->numOfRanFunction);
5984 for(ranFuncIdx=0; ranFuncIdx<e2apDb->numOfRanFunction; ranFuncIdx++)
5986 ranFunc = &e2apDb->ranFunction[ranFuncIdx];
5987 DU_LOG("RAN function id %d\n", ranFunc->id);
5988 DU_LOG("Short Name %s\n", ranFunc->name.shortName);
5989 DU_LOG("Service Model OID %s\n", ranFunc->name.serviceModelOID);
5990 DU_LOG("Description %s\n", ranFunc->name.description);
5992 DU_LOG("RevisionCounter %d\n",ranFunc->revisionCounter);
5993 DU_LOG("NUM of Event Trigger Style Supported %d\n",ranFunc->numOfEventTriggerStyleSupported);
5994 for(eventStyleIdx=0;eventStyleIdx<ranFunc->numOfEventTriggerStyleSupported; eventStyleIdx++)
5996 DU_LOG("Style Type %d\n",ranFunc->eventTriggerStyleList[eventStyleIdx].styleType);
5997 DU_LOG("Name %s\n",ranFunc->eventTriggerStyleList[eventStyleIdx].name);
5998 DU_LOG("Format type %d\n",ranFunc->eventTriggerStyleList[eventStyleIdx].formatType);
6001 DU_LOG("Num of Report Style Supported %d\n",ranFunc->numOfReportStyleSupported);
6002 for(reportStyleIdx=0;reportStyleIdx<ranFunc->numOfReportStyleSupported; reportStyleIdx++)
6004 DU_LOG("Style Type %d\n",ranFunc->reportStyleList[reportStyleIdx].reportStyle.styleType);
6005 DU_LOG("Name %s\n",ranFunc->reportStyleList[reportStyleIdx].reportStyle.name);
6006 DU_LOG("Format type %d\n",ranFunc->reportStyleList[reportStyleIdx].reportStyle.formatType);
6007 measurementInfoList = &ranFunc->reportStyleList[reportStyleIdx].measurementInfoList;
6008 if(measurementInfoList->count)
6010 CM_LLIST_FIRST_NODE(measurementInfoList, node);
6013 measurementInfoForAction = (MeasurementInfoForAction*) node->node;
6014 if(measurementInfoForAction)
6016 DU_LOG("Measurement Type Name %s\n",measurementInfoForAction->measurementTypeName);
6017 DU_LOG("Measurement Type Id %d\n",measurementInfoForAction->measurementTypeId);
6023 DU_LOG("Ric Indication header format %d\n",ranFunc->ricIndicationHeaderFormat);
6024 DU_LOG("Ric indication message format %d\n",ranFunc->ricIndicationMessageFormat);
6027 DU_LOG("Number of TNL association %d\n", e2apDb->numOfTNLAssoc);
6028 for(tnlIdx=0;tnlIdx<e2apDb->numOfTNLAssoc;tnlIdx++)
6030 DU_LOG("Local IPv4 Address present %u\n", e2apDb->tnlAssoc[tnlIdx].localIpAddress.ipV4Pres);
6031 DU_LOG("local IP Address %u\n", e2apDb->tnlAssoc[tnlIdx].localIpAddress.ipV4Addr);
6032 DU_LOG("Destination IPv4 Address present %u\n", e2apDb->tnlAssoc[tnlIdx].destIpAddress.ipV4Pres);
6033 DU_LOG("Destination IP Address %u\n", e2apDb->tnlAssoc[tnlIdx].destIpAddress.ipV4Addr);
6034 DU_LOG("Local port %d\n", e2apDb->tnlAssoc[tnlIdx].localPort);
6035 DU_LOG("Destination port %d\n", e2apDb->tnlAssoc[tnlIdx].destPort);
6036 DU_LOG("Tnl usage %d\n", e2apDb->tnlAssoc[tnlIdx].usage);
6040 /**********************************************************************
6042 **********************************************************************/