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)
1022 /*******************************************************************
1024 * @brief Fill NR TDD Info
1028 * Function : parseF1NrTddInfo
1030 * Functionality: Fill NR TDD Info
1032 * @params[in] XML document pointer
1034 * Current node in XML
1035 * Pointer to structure to be filled
1036 * @return ROK - success
1039 * ****************************************************************/
1040 uint8_t parseF1NrTddInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1NrTddInfo *tddInfo)
1042 memset(tddInfo, 0, sizeof(F1NrTddInfo));
1043 cur = cur->xmlChildrenNode;
1046 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FREQ_INFO")) && (cur->ns == ns))
1048 if(parseF1NrFreqInfo(doc, ns, cur, &tddInfo->nrFreqInfo) != ROK)
1054 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
1056 if(parseF1TxBw(doc, ns, cur, &tddInfo->nrTxBw) != ROK)
1067 /*******************************************************************
1069 * @brief Fill NR Mode Info
1073 * Function : parseNrModeInfo
1075 * Functionality: Fill NR Mode Info
1077 * @params[in] XML document pointer
1079 * Current node in XML
1080 * Pointer to structure to be filled
1081 * @return ROK - success
1084 * ****************************************************************/
1085 uint8_t parseNrModeInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, NrModeInfo *nrModeInfo)
1089 memset(nrModeInfo, 0, sizeof(NrModeInfo));
1090 cur = cur->xmlChildrenNode;
1093 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE")) && (cur->ns == ns))
1095 strcpy((char*)modeCfg, (char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1098 if(strcmp(modeCfg, "FDD") == 0)
1100 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FDD_INFO")) && (cur->ns == ns))
1102 if(parseF1NrFddInfo(doc, ns, cur, &nrModeInfo->mode.fdd) != ROK)
1110 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_TDD_INFO")) && (cur->ns == ns))
1112 if(parseF1NrTddInfo(doc, ns, cur, &nrModeInfo->mode.tdd) != ROK)
1124 /*******************************************************************
1126 * @brief Fill Broadcast PLMN Information
1130 * Function : parseF1BrdcstPlmnInfo
1132 * Functionality: Fill Broadcast PLMN Information
1134 * @params[in] XML document pointer
1136 * Current node in XML
1137 * Pointer to structure to be filled
1138 * @return ROK - success
1141 * ****************************************************************/
1142 uint8_t parseF1BrdcstPlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1BrdcstPlmnInfo *brdcstPlmnInfo)
1144 memset(brdcstPlmnInfo, 0, sizeof(F1BrdcstPlmnInfo));
1145 cur = cur->xmlChildrenNode;
1148 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
1150 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->plmn[0]) != ROK)
1156 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_PLMN")) && (cur->ns == ns))
1158 if(parsePlmn(doc, ns, cur, &brdcstPlmnInfo->extPlmn[0]) != ROK)
1164 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
1166 brdcstPlmnInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1169 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_CELL_ID")) && (cur->ns == ns))
1171 brdcstPlmnInfo->nrCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1174 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_RANAC")) && (cur->ns == ns))
1176 brdcstPlmnInfo->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1184 /*******************************************************************
1186 * @brief Fill DU Cell Information
1190 * Function : parseF1DuCellInfo
1192 * Functionality: Fill DU Cell Information
1194 * @params[in] XML document pointer
1196 * Current node in XML
1197 * Pointer to structure to be filled
1198 * @return ROK - success
1201 * ****************************************************************/
1202 uint8_t parseF1DuCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuCellInfo *duCellInfo)
1204 memset(duCellInfo, 0, sizeof(F1DuCellInfo));
1205 cur = cur->xmlChildrenNode;
1208 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_INFO")) && (cur->ns == ns))
1210 if(parseF1CellInfo(doc, ns, cur, &duCellInfo->cellInfo) != ROK)
1217 duCellInfo->tac = cellParams.nRTAC;
1218 duCellInfo->epsTac = cellParams.nRTAC;
1220 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
1222 duCellInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1225 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EPS_TAC")) && (cur->ns == ns))
1227 duCellInfo->epsTac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1231 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE_INFO")) && (cur->ns == ns))
1233 if(parseNrModeInfo(doc, ns, cur, &duCellInfo->f1Mode) != ROK)
1239 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_CFG")) && (cur->ns == ns))
1241 duCellInfo->measTimeCfgDuration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1244 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_DIR")) && (cur->ns == ns))
1246 duCellInfo->cellDir = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1249 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_CELL_TYPE")) && (cur->ns == ns))
1251 duCellInfo->cellType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1254 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_BRDCST_PLMN_INFO")) && (cur->ns == ns))
1256 if(parseF1BrdcstPlmnInfo(doc, ns, cur, &duCellInfo->brdcstPlmnInfo[0]) != ROK)
1266 /*******************************************************************
1268 * @brief Fill DU served cell information
1272 * Function : parseF1DuServedCellInfo
1274 * Functionality: Fill DU served cell information
1276 * @params[in] XML document pointer
1278 * Current node in XML
1279 * Pointer to structure to be filled
1280 * @return ROK - success
1283 * ****************************************************************/
1284 uint8_t parseF1DuServedCellInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1DuSrvdCellInfo *srvdCellInfo)
1286 memset(srvdCellInfo, 0, sizeof(F1DuSrvdCellInfo));
1287 cur = cur->xmlChildrenNode;
1290 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_CELL_INFO")) && (cur->ns == ns))
1292 if(parseF1DuCellInfo(doc, ns, cur, &srvdCellInfo->duCellInfo) != ROK)
1300 if(fillDuSrvdCellSysInfo(&srvdCellInfo->duSysInfo) != ROK)
1307 /*******************************************************************
1309 * @brief Fill DU Served Cell System Information
1313 * Function : fillDuSrvdCellSysInfo
1315 * Functionality: Fill DU Served Cell System Information
1317 * @params[in] Served Cell System Information
1318 * @return ROK - success
1321 * ****************************************************************/
1322 uint8_t fillDuSrvdCellSysInfo(F1DuSysInfo *sysInfo)
1324 /* GNB DU System Info MIB msg */
1326 DU_ALLOC(sysInfo->mibMsg, encBufSize);
1327 if(!(sysInfo->mibMsg))
1329 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
1332 memcpy(sysInfo->mibMsg, encBuf, encBufSize);
1333 sysInfo->mibLen = encBufSize;
1335 /* GNB DU System Info SIB1 msg */
1337 DU_ALLOC(sysInfo->sib1Msg, encBufSize);
1338 if(!(sysInfo->sib1Msg))
1340 DU_LOG("\nERROR --> DU APP : %s : Memory allocation failure at line %d", __func__, __LINE__);
1343 memcpy(sysInfo->sib1Msg, encBuf,encBufSize);
1344 sysInfo->sib1Len = encBufSize;
1350 /*******************************************************************
1352 * @brief Fill PLMN received from O1 interface
1356 * Function : fillPlmnFromO1
1358 * Functionality: Fill PLMN received from O1 interface
1360 * @params[in] XML document pointer
1362 * Current node in XML
1363 * Pointer to structure to be filled
1364 * @return ROK - success
1367 * ****************************************************************/
1368 void fillPlmnFromO1(Plmn *PLMN, uint8_t srvdPlmnIdx)
1370 PLMN->mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
1371 PLMN->mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
1372 PLMN->mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
1373 PLMN->mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
1374 PLMN->mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
1375 PLMN->mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
1379 /*******************************************************************
1381 * @brief Fill Beamforming Configuration
1385 * Function : parseBeamformingConfig
1387 * Functionality: Fill Beamforming Configuration
1389 * @params[in] XML document pointer
1391 * Current node in XML
1392 * Pointer to structure to be filled
1393 * @return ROK - success
1396 * ****************************************************************/
1397 uint8_t parseBeamformingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BeamformingConf *beamformingCfg)
1399 memset(beamformingCfg, 0, sizeof(BeamformingConf));
1400 cur = cur -> xmlChildrenNode;
1403 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_BEAMS")) && (cur->ns == ns))
1405 beamformingCfg->numOfBeams = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1408 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_RUS")) && (cur->ns == ns))
1410 beamformingCfg->numTxRUs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1413 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_IDX")) && (cur->ns == ns))
1415 beamformingCfg->beamIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1418 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TYPE")) && (cur->ns == ns))
1420 beamformingCfg->beamType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1423 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_AZIMUTH")) && (cur->ns == ns))
1425 beamformingCfg->beamAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1428 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_TILT")) && (cur->ns == ns))
1430 beamformingCfg->beamTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1433 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_HORIZ_WIDTH")) && (cur->ns == ns))
1435 beamformingCfg->beamHorizWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1438 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_VERT_WIDTH")) && (cur->ns == ns))
1440 beamformingCfg->beamVertWidth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1443 if ((!xmlStrcmp(cur->name, (const xmlChar *)"COVER_SHAPE")) && (cur->ns == ns))
1445 beamformingCfg->coverageShape = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1448 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_TILT")) && (cur->ns == ns))
1450 beamformingCfg->digitalTilt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1453 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DIGI_AZIMUTH")) && (cur->ns == ns))
1455 beamformingCfg->digitalAzimuth = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1463 /*******************************************************************
1465 * @brief Fill Precoding Configuration
1469 * Function : parsePrecodingConfig
1471 * Functionality: Fill Precoding Configuration
1473 * @params[in] XML document pointer
1475 * Current node in XML
1476 * Pointer to structure to be filled
1477 * @return ROK - success
1480 * ****************************************************************/
1481 uint8_t parsePrecodingConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrecodingConf *precodCfg)
1483 memset(precodCfg, 0, sizeof(PrecodingConf));
1484 cur = cur -> xmlChildrenNode;
1487 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_LAYERS")) && (cur->ns == ns))
1489 precodCfg->numLayers = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1492 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ANT_PORTS")) && (cur->ns == ns))
1494 precodCfg->numAntPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1502 /*******************************************************************
1504 * @brief Fill PRACH FDM Information
1508 * Function : parsePrachFdmInfo
1510 * Functionality: Fill PRACH FDM Information
1512 * @params[in] XML document pointer
1514 * Current node in XML
1515 * Pointer to structure to be filled
1516 * @return ROK - success
1519 * ****************************************************************/
1520 uint8_t parsePrachFdmInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PrachFdmInfo *prachFdmInfo)
1522 memset(prachFdmInfo, 0, sizeof(PrachFdmInfo));
1523 cur = cur -> xmlChildrenNode;
1526 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
1528 prachFdmInfo->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1531 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_ROOT_SEQ")) && (cur->ns == ns))
1533 prachFdmInfo->numRootSeq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1536 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K1")) && (cur->ns == ns))
1538 prachFdmInfo->k1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1541 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORR_ZONE_CFG")) && (cur->ns == ns))
1543 prachFdmInfo->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1551 /*******************************************************************
1553 * @brief Fill PRACH configuration
1557 * Function : parsePrachCfg
1559 * Functionality: Fill PRACH configuration
1561 * @params[in] XML document pointer
1563 * Current node in XML
1564 * Pointer to structure to be filled
1565 * @return ROK - success
1568 * ****************************************************************/
1569 uint8_t parsePrachCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PrachCfg *prachCfg)
1573 uint8_t maxNumRbs = 0;
1574 uint8_t prachMaxPrb = 0;
1576 memset(prachCfg, 0, sizeof(PrachCfg));
1577 cur = cur -> xmlChildrenNode;
1580 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SEQ_LEN")) && (cur->ns == ns))
1582 prachCfg->prachSeqLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1585 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
1587 prachCfg->prachSubcSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1590 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
1592 prachCfg->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1595 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRACH_FDM")) && (cur->ns == ns))
1597 prachCfg->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1600 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FDM_LIST")) && (cur->ns == ns))
1602 child = cur->xmlChildrenNode;
1603 while(child != NULL)
1605 if ((!xmlStrcmp(child->name, (const xmlChar *)"FDM_INFO")) && (child->ns == ns))
1607 if(parsePrachFdmInfo(doc, ns, child, &prachCfg->fdm[fdmIdx]) != ROK)
1613 child = child -> next;
1617 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns == ns))
1619 prachCfg->prachRstSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1622 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PER_RACH")) && (cur->ns == ns))
1624 prachCfg->ssbPerRach = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1627 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
1629 prachCfg->totalNumRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1632 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
1634 prachCfg->numCbPreamblePerSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1637 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
1639 maxNumRbs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1642 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
1644 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1647 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
1649 prachCfg->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1652 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
1654 prachCfg->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1660 prachCfg->msg1FreqStart = maxNumRbs - prachMaxPrb;
1664 /*******************************************************************
1666 * @brief Fill CSI RS configuration
1670 * Function : parseCsiRsCfg
1672 * Functionality: Fill CSI RS configuration
1674 * @params[in] XML document pointer
1676 * Current node in XML
1677 * Pointer to structure to be filled
1678 * @return ROK - success
1681 * ****************************************************************/
1682 uint8_t parseCsiRsCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CsiRsCfg *csiRsCfg)
1684 uint8_t csiFreqDomainAlloc=0;
1685 memset(csiRsCfg, 0, sizeof(CsiRsCfg));
1686 cur = cur -> xmlChildrenNode;
1689 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_FREQ")) && (cur->ns == ns))
1691 csiFreqDomainAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1692 DU_ALLOC(csiRsCfg->csiFreqDomainAlloc, sizeof(uint8_t));
1693 if(!csiRsCfg->csiFreqDomainAlloc)
1695 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
1698 memcpy(csiRsCfg->csiFreqDomainAlloc, &csiFreqDomainAlloc, sizeof(uint8_t));
1701 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_PORTS")) && (cur->ns == ns))
1703 csiRsCfg->csiNrofPorts = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1706 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT")) && (cur->ns == ns))
1708 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1711 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_OFDM_PORT_2")) && (cur->ns == ns))
1713 csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1716 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DM_TYPE")) && (cur->ns == ns))
1718 csiRsCfg->csirscdmType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1721 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY")) && (cur->ns == ns))
1723 csiRsCfg->csirsdensity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1726 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_DENSITY_DOT_5")) && (cur->ns == ns))
1728 csiRsCfg->csirsdensitydot5 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1731 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET")) && (cur->ns == ns))
1733 csiRsCfg->powerControlOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1736 if ((!xmlStrcmp(cur->name, (const xmlChar *)"POWER_CONTROL_OFFSET_SS")) && (cur->ns == ns))
1738 csiRsCfg->powerControlOffsetSS = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1741 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY_OFFSET")) && (cur->ns == ns))
1743 csiRsCfg->periodicityAndOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1751 /*******************************************************************
1753 * @brief Fill SSB Configuration
1757 * Function : parseSsbCfg
1759 * Functionality: Fill SSB Configuration
1761 * @params[in] XML document pointer
1763 * Current node in XML
1764 * Pointer to structure to be filled
1765 * @return ROK - success
1768 * ****************************************************************/
1769 uint8_t parseSsbCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SsbCfg *ssbCfg)
1772 uint8_t ssbMaskIdx = 0;
1774 memset(ssbCfg, 0, sizeof( SsbCfg));
1775 cur = cur -> xmlChildrenNode;
1779 ssbCfg->scsCmn = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
1780 ssbCfg->ssbPeriod = convertSSBPeriodicityToEnum(cellParams.ssbPeriodicity);
1781 ssbCfg->ssbScOffset = cellParams.ssbOffset;
1783 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_CMN")) && (cur->ns == ns))
1785 ssbCfg->scsCmn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1788 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIOD")) && (cur->ns == ns))
1790 ssbCfg->ssbPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1793 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SC_OFFSET")) && (cur->ns == ns))
1795 ssbCfg->ssbScOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1799 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_OFFSET_PT_A")) && (cur->ns == ns))
1801 ssbCfg->ssbOffsetPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1804 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBSC_PWR")) && (cur->ns == ns))
1806 ssbCfg->ssbPbchPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1809 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_MASK_LIST")) && (cur->ns == ns))
1811 child = cur -> xmlChildrenNode;
1812 while(child != NULL)
1814 if ((!xmlStrcmp(child->name, (const xmlChar *)"SSB_MASK")) && (child->ns == ns))
1816 ssbCfg->ssbMask[ssbMaskIdx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
1819 child = child -> next;
1823 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_ID")) && (cur->ns == ns))
1825 ssbCfg->beamId[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1828 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BETA_PSS")) && (cur->ns == ns))
1830 ssbCfg->betaPss = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1833 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCH_PAYLOAD_FLAG")) && (cur->ns == ns))
1835 ssbCfg->bchPayloadFlag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1838 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DMRS_TYPE_A_POS")) && (cur->ns == ns))
1840 ssbCfg->dmrsTypeAPos = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1846 if(BuildMibPdu() != ROK)
1848 DU_LOG("\nERROR --> Failed to build MIB PDU");
1849 memset(&ssbCfg->mibPdu, 0, 3*sizeof(uint8_t));
1853 memcpy(&ssbCfg->mibPdu, encBuf, encBufSize);
1859 /*******************************************************************
1861 * @brief Fill Carrier Configuration
1865 * Function : parseCarrierCfg
1867 * Functionality: Fill Carrier Configuration
1869 * @params[in] XML document pointer
1871 * Current node in XML
1872 * Pointer to structure to be filled
1873 * @return ROK - success
1876 * ****************************************************************/
1877 uint8_t parseCarrierCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CarrierCfg *carrierCfg)
1879 memset(carrierCfg, 0, sizeof(CarrierCfg));
1880 cur = cur -> xmlChildrenNode;
1884 carrierCfg->dlBw = cellParams.bSChannelBwDL;
1885 carrierCfg->arfcnDL = cellParams.arfcnDL;
1886 carrierCfg->ulBw = cellParams.bSChannelBwUL;
1887 carrierCfg->arfcnUL = cellParams.arfcnUL;
1889 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_BW")) && (cur->ns == ns))
1891 carrierCfg->dlBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1894 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_DL_ARFCN")) && (cur->ns == ns))
1896 carrierCfg->arfcnDL = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1899 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_BW")) && (cur->ns == ns))
1901 carrierCfg->ulBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1904 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_UL_ARFCN")) && (cur->ns == ns))
1906 carrierCfg->arfcnUL = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1910 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TX_ANT")) && (cur->ns == ns))
1912 carrierCfg->numTxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1915 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RX_ANT")) && (cur->ns == ns))
1917 carrierCfg->numRxAnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
1925 /*******************************************************************
1927 * @brief Fill PLMN Information List
1931 * Function : parsePlmnInfo
1933 * Functionality: Fill PLMN Information List
1935 * @params[in] XML document pointer
1937 * Current node in XML
1938 * Pointer to structure to be filled
1939 * @return ROK - success
1942 * ****************************************************************/
1943 uint8_t parsePlmnInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PlmnInfoList *plmnInfoList)
1946 memset(plmnInfoList, 0, sizeof(PlmnInfoList));
1947 cur = cur -> xmlChildrenNode;
1950 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
1952 if(parsePlmn(doc, ns, cur,&plmnInfoList->plmn) != ROK)
1958 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SLICE_SUPP_LST")) && (cur->ns == ns))
1960 if(parseSupportedSliceList(doc, ns, cur,&plmnInfoList -> suppSliceList) != ROK)
1971 /*******************************************************************
1973 * @brief Fill PUCCH Configuration Common
1977 * Function : parsePucchConfigCommon
1979 * Functionality: Fill PUCCH Configuration Common
1981 * @params[in] XML document pointer
1983 * Current node in XML
1984 * Pointer to structure to be filled
1985 * @return ROK - success
1988 * ****************************************************************/
1989 uint8_t parsePucchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PucchConfigCommon *pucchCfgCmn)
1991 memset(pucchCfgCmn, 0, sizeof(PucchConfigCommon));
1992 cur = cur -> xmlChildrenNode;
1995 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
1997 pucchCfgCmn->pucchResourceCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2000 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_NEITHER_HOPPING")) && (cur->ns == ns))
2002 pucchCfgCmn->pucchGroupHopping = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2010 /*******************************************************************
2012 * @brief Fill PUSCH Common Time Allocation
2016 * Function : parsePuschTimeDomRsrcAlloc
2018 * Functionality: Fill PUSCH Common Time Allocation
2020 * @params[in] XML document pointer
2022 * Current node in XML
2023 * Pointer to structure to be filled
2024 * @return ROK - success
2027 * ****************************************************************/
2028 uint8_t parsePuschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschTimeDomRsrcAlloc *puschTimeDomRsrsAlloc)
2030 memset(puschTimeDomRsrsAlloc, 0, sizeof(PuschTimeDomRsrcAlloc));
2031 cur = cur -> xmlChildrenNode;
2034 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_K2_CFG")) && (cur->ns == ns))
2036 puschTimeDomRsrsAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2039 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MAPPING_TYPE")) && (cur->ns == ns))
2041 puschTimeDomRsrsAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2044 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
2046 puschTimeDomRsrsAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2049 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
2051 puschTimeDomRsrsAlloc->symbolLength= atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2057 puschTimeDomRsrsAlloc -> startSymbolAndLength = \
2058 calcSliv(puschTimeDomRsrsAlloc->startSymbol, puschTimeDomRsrsAlloc->symbolLength);
2062 /*******************************************************************
2064 * @brief Fill PUSCH Configuration Common
2068 * Function : parsePuschConfigCommon
2070 * Functionality: Fill PUSCH Configuration Common
2072 * @params[in] XML document pointer
2074 * Current node in XML
2075 * Pointer to structure to be filled
2076 * @return ROK - success
2079 * ****************************************************************/
2080 uint8_t parsePuschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschConfigCommon *puschCfgCmn)
2083 xmlNodePtr child = NULLP;
2085 memset(puschCfgCmn, 0, sizeof(PuschConfigCommon));
2086 cur = cur -> xmlChildrenNode;
2089 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
2091 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2094 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
2096 child = cur->xmlChildrenNode;
2097 while(child != NULL)
2099 if ((!xmlStrcmp(child->name, (const xmlChar *)"PUSCH_COMM_TIME_ALLOC")) && (child->ns == ns))
2101 if(parsePuschTimeDomRsrcAlloc(doc, ns, child, &puschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
2107 child = child -> next;
2115 /*******************************************************************
2117 * @brief Fill BWP Configuration
2121 * Function : parseBwp
2123 * Functionality: Fill BWP Configuration
2125 * @params[in] XML document pointer
2127 * Current node in XML
2128 * Pointer to structure to be filled
2129 * @return ROK - success
2132 * ****************************************************************/
2133 uint8_t parseBwp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpParams *bwp)
2135 memset(bwp, 0, sizeof(BwpParams));
2136 cur = cur -> xmlChildrenNode;
2139 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PRB")) && (cur->ns == ns))
2141 bwp->firstPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2144 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PRB")) && (cur->ns == ns))
2146 bwp->numPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2149 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
2151 bwp->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2154 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NORMAL_CYCLIC_PREFIX")) && (cur->ns == ns))
2156 bwp->cyclicPrefix = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2164 /*******************************************************************
2166 * @brief Fill UL BWP Configuration
2170 * Function : parseBwpULConfig
2172 * Functionality: Fill UL BWP Configuration
2174 * @params[in] XML document pointer
2176 * Current node in XML
2177 * Pointer to structure to be filled
2178 * @return ROK - success
2181 * ****************************************************************/
2182 uint8_t parseBwpULConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpUlConfig *bwpUlCfg)
2184 memset(bwpUlCfg, 0, sizeof(BwpUlConfig));
2185 cur = cur -> xmlChildrenNode;
2188 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
2190 if(parseBwp(doc, ns, cur, &bwpUlCfg->bwp) != ROK)
2196 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
2198 if(parsePucchConfigCommon(doc, ns, cur, &bwpUlCfg->pucchCommon) != ROK)
2204 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
2206 if(parsePuschConfigCommon(doc, ns, cur, &bwpUlCfg->puschCommon) != ROK)
2216 /*******************************************************************
2218 * @brief Fill Page Configuration
2222 * Function : parsePageCfg
2224 * Functionality: Fill Page Configuration
2226 * @params[in] XML document pointer
2228 * Current node in XML
2229 * Pointer to structure to be filled
2230 * @return ROK - success
2233 * ****************************************************************/
2234 uint8_t parsePageCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SchPageCfg *pageCfg)
2238 memset(pageCfg, 0, sizeof(SchPageCfg));
2239 cur = cur -> xmlChildrenNode;
2242 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_PO")) && (cur->ns == ns))
2244 pageCfg->numPO = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2247 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PO_PRESENT")) && (cur->ns == ns))
2249 poPresent = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
2250 if(!strcmp(poPresent, "TRUE"))
2252 pageCfg->poPresent = true;
2256 pageCfg->poPresent = false;
2260 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGING_OCC")) && (cur->ns == ns))
2262 pageCfg->pagingOcc[0] = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2270 /*******************************************************************
2272 * @brief Fill SIB1 PDCCH Configuration
2276 * Function : parsePdcchCfgSib1
2278 * Functionality: Fill SIB1 PDCCH Configuration
2280 * @params[in] XML document pointer
2282 * Current node in XML
2283 * Pointer to structure to be filled
2284 * @return ROK - success
2287 * ****************************************************************/
2288 uint8_t parsePdcchCfgSib1(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigSib1 *pdcchConfigSib1)
2290 memset(pdcchConfigSib1, 0, sizeof(PdcchConfigSib1));
2291 cur = cur -> xmlChildrenNode;
2294 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_ZERO_INDEX")) && (cur->ns == ns))
2296 pdcchConfigSib1->coresetZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2299 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_ZERO_INDEX")) && (cur->ns == ns))
2301 pdcchConfigSib1->searchSpaceZeroIndex = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2309 /*******************************************************************
2311 * @brief Fill SIB1 Cell Configuration
2315 * Function : parseSib1CellCfg
2317 * Functionality: Fill SIB1 Cell Configuration
2319 * @params[in] XML document pointer
2321 * Current node in XML
2322 * Pointer to structure to be filled
2323 * @return ROK - success
2326 * ****************************************************************/
2327 uint8_t parseSib1CellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Sib1CellCfg *sib1CellCfg)
2329 memset(sib1CellCfg, 0, sizeof( Sib1CellCfg));
2330 cur = cur -> xmlChildrenNode;
2333 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_PAGE_CFG")) && (cur->ns == ns))
2335 if(parsePageCfg(doc, ns, cur, &sib1CellCfg->pagingCfg) != ROK)
2341 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CONFIG_SIB1")) && (cur->ns == ns))
2343 if(parsePdcchCfgSib1(doc, ns, cur, &sib1CellCfg->pdcchCfgSib1) != ROK)
2352 sib1CellCfg->sib1PduLen = duCfgParam.srvdCellLst[0].duSysInfo.sib1Len;
2353 if(sib1CellCfg->sib1PduLen > 0)
2355 DU_ALLOC_SHRABL_BUF(sib1CellCfg->sib1Pdu, sib1CellCfg->sib1PduLen);
2356 if(!sib1CellCfg->sib1Pdu)
2358 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
2361 memcpy(sib1CellCfg->sib1Pdu, duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg, sib1CellCfg->sib1PduLen);
2366 /*******************************************************************
2368 * @brief Fill Aggregation Level Candidates Information
2372 * Function : parseCandidateInfo
2374 * Functionality: Fill Aggregation Level Candidates Information
2376 * @params[in] XML document pointer
2378 * Current node in XML
2379 * Pointer to structure to be filled
2380 * @return ROK - success
2383 * ****************************************************************/
2384 uint8_t parseCandidateInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CandidatesInfo *candInfo)
2386 memset(candInfo, 0, sizeof(CandidatesInfo));
2387 cur = cur -> xmlChildrenNode;
2390 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL1")) && (cur->ns == ns))
2392 candInfo->aggLevel1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2395 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL2")) && (cur->ns == ns))
2397 candInfo->aggLevel2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2400 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL4")) && (cur->ns == ns))
2402 candInfo->aggLevel4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2405 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL8")) && (cur->ns == ns))
2407 candInfo->aggLevel8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2410 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL16")) && (cur->ns == ns))
2412 candInfo->aggLevel16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2420 /*******************************************************************
2422 * @brief Fill Search Space Connfiguration
2426 * Function : parseSearchSpaceCfg
2428 * Functionality: Fill Search Space Configuration
2430 * @params[in] XML document pointer
2432 * Current node in XML
2433 * Pointer to structure to be filled
2434 * @return ROK - success
2437 * ****************************************************************/
2438 uint8_t parseSearchSpaceCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SearchSpaceCfg *searchSpaceCfg)
2440 memset(searchSpaceCfg, 0, sizeof(SearchSpaceCfg));
2441 cur = cur -> xmlChildrenNode;
2444 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_1_INDEX")) && (cur->ns == ns))
2446 searchSpaceCfg->searchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2449 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
2451 searchSpaceCfg->coresetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2454 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SLOT_SL1")) && (cur->ns == ns))
2456 searchSpaceCfg->monitoringSlot = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2459 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DURATION")) && (cur->ns == ns))
2461 searchSpaceCfg->duration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2464 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SYMBOL")) && (cur->ns == ns))
2466 searchSpaceCfg->monitoringSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2469 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CANDIDATE_INFO")) && (cur->ns == ns))
2471 if(parseCandidateInfo(doc, ns, cur, &searchSpaceCfg->candidate) != ROK)
2482 /*******************************************************************
2484 * @brief Fill PDCCH Configuration Common
2488 * Function : parsePdcchCfgCommon
2490 * Functionality: Fill PDCCH Configuration Common
2492 * @params[in] XML document pointer
2494 * Current node in XML
2495 * Pointer to structure to be filled
2496 * @return ROK - success
2499 * ****************************************************************/
2500 uint8_t parsePdcchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigCommon *pdcchCfgCm)
2502 memset(pdcchCfgCm, 0, sizeof(PdcchConfigCommon));
2503 cur = cur -> xmlChildrenNode;
2506 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_CFG")) && (cur->ns == ns))
2508 if(parseSearchSpaceCfg(doc, ns, cur, &pdcchCfgCm->commonSearchSpace) != ROK)
2514 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_SEARCH_SPACE_INDEX")) && (cur->ns == ns))
2516 pdcchCfgCm->raSearchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2525 /*******************************************************************
2527 * @brief Fill PDSCH Common Time Domain Resource Allocation
2531 * Function : parsePdschCmnTimeDomRsrcAlloc
2533 * Functionality: Fill PDSCH Common Time Domain Resource Allocation
2535 * @params[in] XML document pointer
2537 * Current node in XML
2538 * Pointer to structure to be filled
2539 * @return ROK - success
2542 * ****************************************************************/
2543 uint8_t parsePdschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,\
2544 PdschCfgCommTimeDomRsrcAlloc *pdschTimeDomRsrcAlloc)
2546 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschCfgCommTimeDomRsrcAlloc));
2547 cur = cur -> xmlChildrenNode;
2550 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_K0_CFG")) && (cur->ns == ns))
2552 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2554 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_MAPPING_TYPE")) && (cur->ns == ns))
2556 pdschTimeDomRsrcAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2558 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
2560 pdschTimeDomRsrcAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2562 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
2564 pdschTimeDomRsrcAlloc->lengthSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2572 /*******************************************************************
2574 * @brief Fill PDSCH Configuration Common
2578 * Function : parsePdschConfigCommon
2580 * Functionality: Fill PDSCH Configuration Common
2582 * @params[in] XML document pointer
2584 * Current node in XML
2585 * Pointer to structure to be filled
2586 * @return ROK - success
2589 * ****************************************************************/
2590 uint8_t parsePdschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdschConfigCommon *pdschCfgCmn)
2593 xmlNodePtr child = NULLP;
2595 memset(pdschCfgCmn, 0, sizeof(PdschConfigCommon));
2596 cur = cur -> xmlChildrenNode;
2599 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
2601 pdschCfgCmn->numTimeDomAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2604 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
2606 child = cur->xmlChildrenNode;
2607 while(child != NULL)
2609 if ((!xmlStrcmp(child->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC")) && (child->ns == ns))
2611 if(parsePdschCmnTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
2617 child = child -> next;
2625 /*******************************************************************
2627 * @brief Fill DL BWP Configuration
2631 * Function : parseBwpDLConfig
2633 * Functionality: Fill DL BWP Configuration
2635 * @params[in] XML document pointer
2637 * Current node in XML
2638 * Pointer to structure to be filled
2639 * @return ROK - success
2642 * ****************************************************************/
2643 uint8_t parseBwpDLConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpDlConfig *bwpDlCfg)
2645 memset(bwpDlCfg, 0, sizeof(BwpDlConfig));
2646 cur = cur -> xmlChildrenNode;
2649 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
2651 if(parseBwp(doc, ns, cur, &bwpDlCfg->bwp) != ROK)
2657 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
2659 if(parsePdcchCfgCommon(doc, ns, cur, &bwpDlCfg->pdcchCommon) != ROK)
2665 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
2667 if(parsePdschConfigCommon(doc, ns, cur, &bwpDlCfg->pdschCommon) != ROK)
2678 /*******************************************************************
2680 * @brief Fill Cell Configuration
2684 * Function : parseCellCfg
2686 * Functionality: Fill Cell Configuration
2688 * @params[in] XML document pointer
2690 * Current node in XML
2691 * Pointer to structure to be filled
2692 * @return ROK - success
2695 * ****************************************************************/
2696 uint8_t parseCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CellCfg *cellCfg)
2698 memset(cellCfg, 0, sizeof(CellCfg));
2699 cur = cur -> xmlChildrenNode;
2703 cellCfg->opState = cellParams.operationalState;
2704 cellCfg->adminState = cellParams.administrativeState;
2705 cellCfg->cellState = cellParams.cellState;
2706 cellCfg->phyCellId = cellParams.nRPCI;
2707 cellCfg->tac = cellParams.nRTAC;
2708 cellCfg->ssbFreq = cellParams.ssbFrequency;
2710 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_OP_STATE")) && (cur->ns == ns))
2712 cellCfg->opState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2715 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_ADMIN_STATE")) && (cur->ns == ns))
2717 cellCfg->adminState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2720 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_STATE")) && (cur->ns == ns))
2722 cellCfg->cellState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2725 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
2727 cellCfg->phyCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2730 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
2732 cellCfg->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2735 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_FREQUENCY")) && (cur->ns == ns))
2737 cellCfg->ssbFreq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2741 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN_INFO")) && (cur->ns == ns))
2743 if(parsePlmnInfo(doc, ns, cur, &cellCfg->plmnInfoList[0]) != ROK)
2749 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
2751 cellCfg->subCarrSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2754 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DUPLEX_MODE")) && (cur->ns == ns))
2756 cellCfg->dupType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2759 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_CELL_CFG")) && (cur->ns == ns))
2761 if(parseSib1CellCfg(doc, ns, cur, &cellCfg->sib1Cfg) != ROK)
2767 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_DL_CFG")) && (cur->ns == ns))
2769 if(parseBwpDLConfig(doc, ns, cur, &cellCfg->initialDlBwp) != ROK)
2775 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_UL_CFG")) && (cur->ns == ns))
2777 if(parseBwpULConfig(doc, ns, cur, &cellCfg->initialUlBwp) != ROK)
2788 /*******************************************************************
2790 * @brief Fill TDD slot configuration
2794 * Function : parseTddCfg
2796 * Functionality: Fill TDD slot configuration
2798 * @params[in] XML document pointer
2800 * Current node in XML
2801 * Pointer to structure to be filled
2802 * @return ROK - success
2805 * ****************************************************************/
2806 uint8_t parseTddCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TDDCfg *tddCfg)
2808 memset(tddCfg, 0, sizeof(TDDCfg));
2809 cur = cur -> xmlChildrenNode;
2812 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_PERIODICITY")) && (cur->ns == ns))
2814 tddCfg->tddPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2817 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
2819 tddCfg->nrOfDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2822 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
2824 tddCfg->nrOfDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2827 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
2829 tddCfg->nrOfUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2832 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
2834 tddCfg->nrOfUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2843 /*******************************************************************
2845 * @brief Fill MAC Cell Configuration
2849 * Function : parseMacCellCfg
2851 * Functionality: Fill MAC Cell Configuration
2853 * @params[in] XML document pointer
2855 * Current node in XML
2856 * Pointer to structure to be filled
2857 * @return ROK - success
2860 * ****************************************************************/
2861 uint8_t parseMacCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacCellCfg *macCellCfg)
2863 memset(macCellCfg, 0, sizeof(MacCellCfg));
2864 cur = cur -> xmlChildrenNode;
2868 macCellCfg->cellId = cellParams.cellLocalId;
2870 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
2872 macCellCfg->cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2876 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CARRIER_CFG")) && (cur->ns == ns))
2878 if(parseCarrierCfg(doc, ns, cur, &macCellCfg->carrCfg) != ROK)
2884 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_CFG")) && (cur->ns == ns))
2886 if(parseCellCfg(doc, ns, cur, &macCellCfg->cellCfg) != ROK)
2892 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_CFG")) && (cur->ns == ns))
2894 if(parseSsbCfg(doc, ns, cur, &macCellCfg->ssbCfg) != ROK)
2900 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_CFG")) && (cur->ns == ns))
2902 if(parseCsiRsCfg(doc, ns, cur, &macCellCfg->csiRsCfg) != ROK)
2908 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CFG")) && (cur->ns == ns))
2910 if(parsePrachCfg(doc, ns, cur, &macCellCfg->prachCfg) != ROK)
2917 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_CFG")) && (cur->ns == ns))
2919 if(parseTddCfg(doc, ns, cur, &macCellCfg->tddCfg) != ROK)
2926 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRE_CODE_CFG")) && (cur->ns == ns))
2928 if(parsePrecodingConfig(doc, ns, cur, &macCellCfg->precodingConf) != ROK)
2934 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_FORM_CFG")) && (cur->ns == ns))
2936 if(parseBeamformingConfig(doc, ns, cur, &macCellCfg->beamCfg) != ROK)
2947 /*******************************************************************
2949 * @brief Fill PUSCH Configuration Common Time Domain
2950 * Resource Allocation
2954 * Function : parsePuschCmnTimeDomRsrcAlloc
2956 * Functionality: Fill PUSCH Configuration Common Time Domain
2957 * Resource Allocation
2959 * @params[in] XML document pointer
2961 * Current node in XML
2962 * Pointer to structure to be filled
2963 * @return ROK - success
2966 * ****************************************************************/
2967 uint8_t parsePuschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCmnTimeDomAlloc *puschCmnTimeDomAlloc)
2969 uint16_t startSymbol;
2972 memset(puschCmnTimeDomAlloc, 0, sizeof(PuschCfgCmnTimeDomAlloc));
2973 cur = cur -> xmlChildrenNode;
2976 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K2")) && (cur->ns == ns))
2978 puschCmnTimeDomAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2980 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
2982 puschCmnTimeDomAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2984 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
2986 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2988 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
2990 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
2994 puschCmnTimeDomAlloc->sliv = calcSliv(startSymbol, lenSymbol);
2998 /*******************************************************************
3000 * @brief Fill PUSCH Configuration Common
3004 * Function : parsePuschCfgCommon
3006 * Functionality: Fill PUSCH Configuration Common
3008 * @params[in] XML document pointer
3010 * Current node in XML
3011 * Pointer to structure to be filled
3012 * @return ROK - success
3015 * ****************************************************************/
3016 uint8_t parsePuschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCommon *puschCfgCmn)
3018 uint8_t rsrcIdx = 0;
3019 xmlNodePtr child = NULLP;
3021 memset(puschCfgCmn, 0, sizeof(PuschCfgCommon));
3022 cur = cur -> xmlChildrenNode;
3025 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_PRESENT")) && (cur->ns == ns))
3027 puschCfgCmn->puschCfgPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3030 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MSG3_DELTA_PREAMBLE")) && (cur->ns == ns))
3032 puschCfgCmn->msg3DeltaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3035 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_P0_NOMINAL_WITH_GRANT")) && (cur->ns == ns))
3037 puschCfgCmn->p0NominalWithGrant = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3040 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
3042 puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3045 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
3047 child = cur->xmlChildrenNode;
3048 while (child != NULL)
3050 if ((!xmlStrcmp(child->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC")) && (child->ns == ns))
3052 if(parsePuschCmnTimeDomRsrcAlloc(doc, ns, child, &puschCfgCmn->timeDomAllocList[rsrcIdx]) != ROK)
3058 child = child->next;
3066 /*******************************************************************
3068 * @brief Fill PUCCH Configuration Common
3072 * Function : parsePucchCfgCommon
3074 * Functionality: Fill PUCCH Configuration Common
3076 * @params[in] XML document pointer
3078 * Current node in XML
3079 * Pointer to structure to be filled
3080 * @return ROK - success
3083 * ****************************************************************/
3084 uint8_t parsePucchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PucchCfgCommon *pucchCfgCmn)
3086 memset(pucchCfgCmn, 0, sizeof(PucchCfgCommon));
3087 cur = cur -> xmlChildrenNode;
3090 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3092 pucchCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3095 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
3097 pucchCfgCmn->rsrcComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3100 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GRP_HOP")) && (cur->ns == ns))
3102 pucchCfgCmn->grpHop = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3105 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_P0_NOMINAL")) && (cur->ns == ns))
3107 pucchCfgCmn->p0Nominal = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3115 /*******************************************************************
3117 * @brief Fill RACH Configuration Common
3121 * Function : parseRachCfgCommon
3123 * Functionality: Fill RACH Configuration Common
3125 * @params[in] XML document pointer
3127 * Current node in XML
3128 * Pointer to structure to be filled
3129 * @return ROK - success
3132 * ****************************************************************/
3133 uint8_t parseRachCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RachCfgCommon *rachCfgCmn)
3138 memset(rachCfgCmn, 0, sizeof(RachCfgCommon));
3139 cur = cur -> xmlChildrenNode;
3142 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3144 rachCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3147 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
3149 rachCfgCmn->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3152 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MSG_1_FDM")) && (cur->ns == ns))
3154 rachCfgCmn->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3157 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
3159 maxNumRb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3161 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
3163 prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3166 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORRELATION_ZONE_CFG")) && (cur->ns == ns))
3168 rachCfgCmn->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3171 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_PREAMBLE_RCVD_TGT_PWR")) && (cur->ns == ns))
3173 rachCfgCmn->preambleRcvdTgtPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3176 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PREAMBLE_TRANS_MAX")) && (cur->ns == ns))
3178 rachCfgCmn->preambleTransMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3181 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PWR_RAMPING_STEP")) && (cur->ns == ns))
3183 rachCfgCmn->pwrRampingStep = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3186 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
3188 rachCfgCmn->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3191 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
3193 rachCfgCmn->numRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3196 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SSB_PER_RACH_OCC")) && (cur->ns == ns))
3198 rachCfgCmn->numSsbPerRachOcc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3201 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
3203 rachCfgCmn->numCbPreamblePerSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3206 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONT_RES_TIMER")) && (cur->ns == ns))
3208 rachCfgCmn->contResTimer = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3211 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
3213 rachCfgCmn->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3216 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX_PRESENT")) && (cur->ns == ns))
3218 rachCfgCmn->rootSeqIdxPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3221 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
3223 rachCfgCmn->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3226 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SUBCARRIER_SPACING")) && (cur->ns == ns))
3228 rachCfgCmn->msg1Scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3231 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns== ns))
3233 rachCfgCmn->restrictedSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3239 rachCfgCmn->msg1FreqStart = ((maxNumRb) - (prachMaxPrb));
3243 /*******************************************************************
3245 * @brief Fill SCS Specific Carrier
3249 * Function : parseScsSpecCarrier
3251 * Functionality: Fill SCS Specific Carrier
3253 * @params[in] XML document pointer
3255 * Current node in XML
3256 * Pointer to structure to be filled
3257 * @return ROK - success
3260 * ****************************************************************/
3261 uint8_t parseScsSpecCarrier(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ScsSpecCarrier *scsSpecCrr)
3263 memset(scsSpecCrr, 0, sizeof(ScsSpecCarrier));
3266 scsSpecCrr->scsOffset = cellParams.ssbOffset;
3267 scsSpecCrr->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
3268 scsSpecCrr->scsBw = cellParams.bSChannelBwUL;
3270 cur = cur -> xmlChildrenNode;
3273 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SUBCARRIER_OFFSET")) && (cur->ns == ns))
3275 scsSpecCrr->scsOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3278 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3280 scsSpecCrr->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3283 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_BW")) && (cur->ns == ns))
3285 scsSpecCrr->scsBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3293 /*******************************************************************
3295 * @brief Fill UL Config Common
3299 * Function : parseUlCfgCommon
3301 * Functionality: Fill UL Config Common
3303 * @params[in] XML document pointer
3305 * Current node in XML
3306 * Pointer to structure to be filled
3307 * @return ROK - success
3310 * ****************************************************************/
3311 uint8_t parseUlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,UlCfgCommon *ulCfgCmn)
3313 memset(ulCfgCmn, 0, sizeof(UlCfgCommon));
3314 cur = cur -> xmlChildrenNode;
3317 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
3319 ulCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3322 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_P_MAX")) && (cur->ns == ns))
3324 ulCfgCmn->pMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3327 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
3329 ulCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3332 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_ALLIGN_TIMER_COMM")) && (cur->ns == ns))
3334 ulCfgCmn->timeAlignTimerComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3337 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
3339 if(parseScsSpecCarrier(doc, ns, cur, &ulCfgCmn->ulScsCarrier) != ROK)
3345 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RACH_CFG_COMMON")) && (cur->ns == ns))
3347 if(parseRachCfgCommon(doc, ns, cur, &ulCfgCmn->rachCfg) != ROK)
3353 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
3355 if(parsePuschCfgCommon(doc, ns, cur, &ulCfgCmn->puschCfg) != ROK)
3361 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
3363 if(parsePucchCfgCommon(doc, ns, cur, &ulCfgCmn->pucchCfg) != ROK)
3374 /*******************************************************************
3376 * @brief Fill TDD UL DL Configuration Common
3380 * Function : parseTddUlDlCfgCommon
3382 * Functionality: Fill TDD UL DL Configuration Common
3384 * @params[in] XML document pointer
3386 * Current node in XML
3387 * Pointer to structure to be filled
3388 * @return ROK - success
3391 * ****************************************************************/
3392 uint8_t parseTddUlDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TddUlDlCfgCommon *tddUlDlCfgCmn)
3394 memset(tddUlDlCfgCmn, 0, sizeof(TddUlDlCfgCommon));
3395 cur = cur -> xmlChildrenNode;
3398 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REF_SCS")) && (cur->ns == ns))
3400 tddUlDlCfgCmn->refScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3403 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TX_PRD")) && (cur->ns == ns))
3405 tddUlDlCfgCmn->txPrd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3408 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
3410 tddUlDlCfgCmn->numDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3413 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
3415 tddUlDlCfgCmn->numDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3418 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
3420 tddUlDlCfgCmn->numUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3423 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
3425 tddUlDlCfgCmn->numUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3433 /*******************************************************************
3435 * @brief Fill PCCH Configuration
3439 * Function : parsePcchCfg
3441 * Functionality: Fill PCCH Configuration
3443 * @params[in] XML document pointer
3445 * Current node in XML
3446 * Pointer to structure to be filled
3447 * @return ROK - success
3450 * ****************************************************************/
3451 uint8_t parsePcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PcchCfg *pcchCfg)
3453 xmlNodePtr child = NULLP;
3456 memset(pcchCfg, 0, sizeof(PcchCfg));
3457 cur = cur -> xmlChildrenNode;
3460 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEFAULT_PAGING_CYCLE")) && (cur->ns == ns))
3462 pcchCfg->dfltPagingCycle = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3465 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAND_PAGING_FRAME_OFFSET")) && (cur->ns == ns))
3467 pcchCfg->nAndPagingFrmOffsetType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3470 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGE_FRAME_OFFSET")) && (cur->ns == ns))
3472 pcchCfg->pageFrameOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3475 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NS")) && (cur->ns == ns))
3477 pcchCfg->ns = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3480 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_TYPE")) && (cur->ns == ns))
3482 pcchCfg->firstPDCCHMontioringType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3485 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_LIST")) && (cur->ns == ns))
3487 child = cur->xmlChildrenNode;
3488 while (child != NULL)
3490 if ((!xmlStrcmp(child->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_INFO")) && (child->ns == ns))
3492 pcchCfg->firstPDCCHMontioringInfo[idx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
3495 child = child->next;
3503 /*******************************************************************
3505 * @brief Fill PDSCH Time Domain Resource Allocation
3509 * Function : parsePdschTimeDomRsrcAlloc
3511 * Functionality: Fill PDSCH Time Domain Resource Allocation
3513 * @params[in] XML document pointer
3515 * Current node in XML
3516 * Pointer to structure to be filled
3517 * @return ROK - success
3520 * ****************************************************************/
3521 uint8_t parsePdschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc)
3523 uint16_t startSymbol;
3526 memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschTimeDomainRsrcAlloc));
3527 cur = cur -> xmlChildrenNode;
3530 if ((!xmlStrcmp(cur->name, (const xmlChar *)"K0")) && (cur->ns == ns))
3532 pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3535 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
3537 pdschTimeDomRsrcAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3540 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
3542 startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3545 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
3547 lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3552 pdschTimeDomRsrcAlloc->sliv = calcSliv(startSymbol, lenSymbol);
3556 /*******************************************************************
3558 * @brief Fill PDSCH Configuration Common
3562 * Function : parsePdschCfgCommon
3564 * Functionality: Fill PDSCH Configuration Common
3566 * @params[in] XML document pointer
3568 * Current node in XML
3569 * Pointer to structure to be filled
3570 * @return ROK - success
3573 * ****************************************************************/
3574 uint8_t parsePdschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschCfgCommon *pdschCfgCmn)
3577 xmlNodePtr child = NULLP;
3579 memset(pdschCfgCmn, 0, sizeof(PdschCfgCommon));
3580 cur = cur -> xmlChildrenNode;
3583 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3585 pdschCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3588 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRS_ALLOC")) && (cur->ns == ns))
3590 pdschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3593 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
3595 child = cur->xmlChildrenNode;
3596 while (child != NULL)
3598 if ((!xmlStrcmp(child->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC")) && (child->ns == ns))
3600 if(parsePdschTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomAlloc[idx]) != ROK)
3606 child = child->next;
3614 /*******************************************************************
3616 * @brief Fill BCCH Configuration
3620 * Function : parseBcchCfg
3622 * Functionality: Fill BCCH Configuration
3624 * @params[in] XML document pointer
3626 * Current node in XML
3627 * Pointer to structure to be filled
3628 * @return ROK - success
3631 * ****************************************************************/
3632 uint8_t parseBcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BcchCfg *bcchCfg)
3634 memset(bcchCfg, 0, sizeof(BcchCfg));
3635 cur = cur -> xmlChildrenNode;
3638 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MOB_PRD_COEFF")) && (cur->ns == ns))
3640 bcchCfg->modPrdCoeff = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3647 /*******************************************************************
3649 * @brief Fill PDCCH Configuration Common
3653 * Function : parsePdcchConfigCommon
3655 * Functionality: Fill PDCCH Configuration Common
3657 * @params[in] XML document pointer
3659 * Current node in XML
3660 * Pointer to structure to be filled
3661 * @return ROK - success
3664 * ****************************************************************/
3665 uint8_t parsePdcchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdcchCfgCommon *pdccgCfgCmn)
3668 xmlNodePtr child = NULLP;
3670 memset(pdccgCfgCmn, 0, sizeof( PdcchCfgCommon));
3671 cur = cur -> xmlChildrenNode;
3674 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
3676 pdccgCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3679 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
3681 pdccgCfgCmn->ctrlRsrcSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3684 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
3686 pdccgCfgCmn->searchSpcZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3689 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID")) && (cur->ns == ns))
3691 pdccgCfgCmn->searchSpcId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3694 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CTRL_RSRC_SET_ID")) && (cur->ns == ns))
3696 pdccgCfgCmn->ctrlRsrcSetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3699 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_SLOT_PERIOD_OFFSET_PRESENT")) && (cur->ns == ns))
3701 pdccgCfgCmn->monitorSlotPrdAndOffPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3704 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_LIST")) && (cur->ns == ns))
3706 child = cur->xmlChildrenNode;
3709 if ((!xmlStrcmp(child->name, (const xmlChar *)"MONITOR_SYMBOL_IN_SLOT")) && (child->ns == ns))
3711 pdccgCfgCmn->monitorSymbolsInSlot[idx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
3714 child = child->next;
3718 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_1")) && (cur->ns == ns))
3720 pdccgCfgCmn->numCandAggLvl1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3723 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_2")) && (cur->ns == ns))
3725 pdccgCfgCmn->numCandAggLvl2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3728 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_4")) && (cur->ns == ns))
3730 pdccgCfgCmn->numCandAggLvl4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3733 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_8")) && (cur->ns == ns))
3735 pdccgCfgCmn->numCandAggLvl8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3738 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_16")) && (cur->ns == ns))
3740 pdccgCfgCmn->numCandAggLvl16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3743 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_TYPE")) && (cur->ns == ns))
3745 pdccgCfgCmn->searchSpcType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3748 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_DCI_FORMAT")) && (cur->ns == ns))
3750 pdccgCfgCmn->commSrchSpcDciFrmt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3753 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_SIB1")) && (cur->ns == ns))
3755 pdccgCfgCmn->searchSpcSib1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3758 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_PAGING")) && (cur->ns == ns))
3760 pdccgCfgCmn->pagingSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3763 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_RA")) && (cur->ns == ns))
3765 pdccgCfgCmn->raSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3773 /*******************************************************************
3775 * @brief Fill DL Configuration Common
3779 * Function : parseDlCfgCommon
3781 * Functionality: Fill DL Configuration Common
3783 * @params[in] XML document pointer
3785 * Current node in XML
3786 * Pointer to structure to be filled
3787 * @return ROK - success
3790 * ****************************************************************/
3791 uint8_t parseDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,DlCfgCommon *dlCfgCmn)
3793 memset(dlCfgCmn, 0, sizeof(DlCfgCommon));
3794 cur = cur -> xmlChildrenNode;
3797 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
3799 dlCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3802 if ((!xmlStrcmp(cur->name, (const xmlChar *)"OFFSET_TO_POINT_A")) && (cur->ns == ns))
3804 dlCfgCmn->offsetToPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3807 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
3809 dlCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3812 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
3814 if(parseScsSpecCarrier(doc, ns, cur, &dlCfgCmn->dlScsCarrier) != ROK)
3820 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
3822 if(parsePdcchConfigCommon(doc, ns, cur, &dlCfgCmn->pdcchCfg) != ROK)
3828 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
3830 if(parsePdschCfgCommon(doc, ns, cur, &dlCfgCmn->pdschCfg) != ROK)
3836 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCCH_CFG")) && (cur->ns == ns))
3838 if(parseBcchCfg(doc, ns, cur, &dlCfgCmn->bcchCfg) != ROK)
3844 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PCCH_CFG")) && (cur->ns == ns))
3846 if(parsePcchCfg(doc, ns, cur, &dlCfgCmn->pcchCfg) != ROK)
3855 /*******************************************************************
3857 * @brief Fill Serving Cell Config Common SIB
3861 * Function : parseSrvCellCfgCmnSib
3863 * Functionality: Fill Serving Cell Config Common SIB
3865 * @params[in] XML document pointer
3867 * Current node in XML
3868 * Pointer to structure to be filled
3869 * @return ROK - success
3872 * ****************************************************************/
3873 uint8_t parseSrvCellCfgCmnSib(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SrvCellCfgCommSib *srvCellCfgCmnSib)
3875 memset(srvCellCfgCmnSib, 0, sizeof(SrvCellCfgCommSib));
3876 cur = cur -> xmlChildrenNode;
3880 srvCellCfgCmnSib->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
3882 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
3884 srvCellCfgCmnSib->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3887 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_POS_INBURST")) && (cur->ns == ns))
3889 srvCellCfgCmnSib->ssbPosInBurst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3892 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIODICITY")) && (cur->ns == ns))
3894 srvCellCfgCmnSib->ssbPrdServingCell = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3897 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBCH_PWR")) && (cur->ns == ns))
3899 srvCellCfgCmnSib->ssPbchBlockPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3902 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_CFG_COMMON")) && (cur->ns == ns))
3904 if(parseDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->dlCfg) != ROK)
3910 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_CFG_COMMON")) && (cur->ns == ns))
3912 if(parseUlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->ulCfg) != ROK)
3918 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_UL_DL_CFG_COMMON")) && (cur->ns == ns))
3920 if(parseTddUlDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->tddCfg) != ROK)
3931 /*******************************************************************
3933 * @brief Fill SI Scheduling Information
3937 * Function : parseSiSchedInfo
3939 * Functionality: Fill SI Scheduling Information
3941 * @params[in] XML document pointer
3943 * Current node in XML
3944 * Pointer to structure to be filled
3945 * @return ROK - success
3948 * ****************************************************************/
3949 uint8_t parseSiSchedInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SiSchedInfo *siSchedInfo)
3951 memset(siSchedInfo, 0, sizeof(SiSchedInfo));
3952 cur = cur -> xmlChildrenNode;
3955 if ((!xmlStrcmp(cur->name, (const xmlChar *)"WIN_LEN")) && (cur->ns == ns))
3957 siSchedInfo->winLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3960 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BROADCAST_STATUS")) && (cur->ns == ns))
3962 siSchedInfo->broadcastSta = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3965 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY")) && (cur->ns == ns))
3967 siSchedInfo->preiodicity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3970 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB_TYPE")) && (cur->ns == ns))
3972 siSchedInfo->sibType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3975 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_VALUE_TAG")) && (cur->ns == ns))
3977 siSchedInfo->sibValTag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
3985 /*******************************************************************
3987 * @brief Fill SIB1 Parameters
3991 * Function : parseSib1Params
3993 * Functionality: Fill SIB1 Parameters
3995 * @params[in] XML document pointer
3997 * Current node in XML
3998 * Pointer to structure to be filled
3999 * @return ROK - success
4002 * ****************************************************************/
4003 uint8_t parseSib1Params(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,Sib1Params *sib1Params)
4005 memset(sib1Params, 0, sizeof(Sib1Params));
4006 cur = cur -> xmlChildrenNode;
4010 sib1Params-> tac = cellParams.nRTAC;
4011 sib1Params->cellIdentity = CELL_IDENTITY * cellParams.cellLocalId;
4012 DU_LOG("\nDEBUG --> DU_APP: parseSib1Params(): OAM CellLocalId=%d", sib1Params->cellIdentity);
4014 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
4016 sib1Params-> tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4019 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_IDENTITY")) && (cur->ns == ns))
4021 sib1Params->cellIdentity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4025 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
4027 if(parsePlmn(doc, ns, cur, &sib1Params->plmn) != ROK)
4033 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RANAC")) && (cur->ns == ns))
4035 sib1Params->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4038 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_RESVD_OPUSE")) && (cur->ns == ns))
4040 sib1Params->cellResvdForOpUse = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4043 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_CNT")) && (cur->ns == ns))
4045 sib1Params->connEstFailCnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4048 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFF_VALID")) && (cur->ns == ns))
4050 sib1Params->connEstFailOffValidity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4053 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFFSET")) && (cur->ns == ns))
4055 sib1Params->connEstFailOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4058 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SI_SHED_INFO")) && (cur->ns == ns))
4060 if(parseSiSchedInfo(doc, ns, cur, &sib1Params->siSchedInfo) != ROK)
4066 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SRV_CELL_CFG_COM_SIB")) && (cur->ns == ns))
4068 if(parseSrvCellCfgCmnSib(doc, ns, cur, &sib1Params->srvCellCfgCommSib) != ROK)
4080 /*******************************************************************
4082 * @brief Fill RRM Policy List
4086 * Function : parseRrmPolicyList
4088 * Functionality: Fill RRM Policy List
4090 * @params[in] XML document pointer
4092 * Current node in XML
4093 * Pointer to structure to be filled
4094 * @return ROK - success
4097 * ****************************************************************/
4098 uint8_t parseRrmPolicyList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,RrmPolicyMemberList *rrmPolicyMemberList)
4100 memset(rrmPolicyMemberList, 0, sizeof(RrmPolicyMemberList));
4101 cur = cur->xmlChildrenNode;
4104 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
4106 if(parsePlmn(doc, ns, cur, &rrmPolicyMemberList->plmn) != ROK)
4112 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI")) && (cur->ns == ns))
4114 if(parseSnssai(doc, ns, cur, &rrmPolicyMemberList->snssai) != ROK)
4125 /*******************************************************************
4127 * @brief Fill RRM Policy Ratio
4131 * Function : parseRrmPolicyRatio
4133 * Functionality: Fill RRM Policy Ratio
4135 * @params[in] XML document pointer
4137 * Current node in XML
4138 * Pointer to structure to be filled
4139 * @return ROK - success
4142 * ****************************************************************/
4143 uint8_t parseRrmPolicyRatio(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RrmPolicyRatio *rrmPolicyRatio)
4145 memset(rrmPolicyRatio, 0, sizeof(RrmPolicyRatio));
4146 cur = cur -> xmlChildrenNode;
4149 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_RATIO")) && (cur->ns == ns))
4151 rrmPolicyRatio->maxRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4154 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_RATIO")) && (cur->ns == ns))
4156 rrmPolicyRatio->minRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4159 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEDICATED_RATIO")) && (cur->ns == ns))
4161 rrmPolicyRatio->dedicatedRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4169 /*******************************************************************
4171 * @brief Fill MAC Slice RRM Policy
4175 * Function : parseMacSliceRrmPolicy
4177 * Functionality: Fill MAC Slice RRM Policy
4179 * @params[in] XML document pointer
4181 * Current node in XML
4182 * Pointer to structure to be filled
4183 * @return ROK - success
4186 * ****************************************************************/
4187 uint8_t parseMacSliceRrmPolicy(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MacSliceRrmPolicy *rrmPolicy)
4191 memset(rrmPolicy, 0, sizeof(MacSliceRrmPolicy));
4192 cur = cur -> xmlChildrenNode;
4195 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RESOURCE_TYPE")) && (cur->ns == ns))
4197 rrmPolicy->resourceType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4200 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRM_POLICY_MEMBER")) && (cur->ns == ns))
4202 rrmPolicy->numOfRrmPolicyMem = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4205 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_MEMBER_LIST")) && (cur->ns == ns))
4207 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList,\
4208 rrmPolicy->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
4210 if(!rrmPolicy->rRMPolicyMemberList)
4212 DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
4216 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
4218 DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList[memIdx], sizeof(RrmPolicyMemberList));
4219 if (rrmPolicy->rRMPolicyMemberList[memIdx] == NULLP)
4221 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4225 if(parseRrmPolicyList(doc, ns, cur, rrmPolicy->rRMPolicyMemberList[memIdx]) != ROK)
4232 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_RATIO")) && (cur->ns == ns))
4234 if(parseRrmPolicyRatio(doc, ns, cur, &rrmPolicy->policyRatio) != ROK)
4245 /*******************************************************************
4247 * @brief Fill MAC Slice Configuration
4251 * Function : parseMacSliceCfgReq
4253 * Functionality: Fill MAC Slice Configuration
4255 * @params[in] XML document pointer
4257 * Current node in XML
4258 * Pointer to structure to be filled
4259 * @return ROK - success
4262 * ****************************************************************/
4263 uint8_t parseMacSliceCfgReq(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacSliceCfgReq *macSliceCfgReq)
4265 uint8_t policyIdx = 0;
4266 memset(macSliceCfgReq, 0, sizeof(MacSliceCfgReq));
4267 cur = cur -> xmlChildrenNode;
4270 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRM_POLICY")) && (cur->ns == ns))
4272 macSliceCfgReq->numOfRrmPolicy = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4275 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_SLICE_RRM_POLICY")) && (cur->ns == ns))
4277 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy, macSliceCfgReq->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
4278 if(!macSliceCfgReq->listOfRrmPolicy)
4280 DU_LOG("\nERROR --> DU APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4284 for(policyIdx = 0; policyIdx < macSliceCfgReq->numOfRrmPolicy; policyIdx++)
4286 DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
4287 if (macSliceCfgReq->listOfRrmPolicy[policyIdx] == NULLP)
4289 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
4292 if(parseMacSliceRrmPolicy(doc, ns, cur, macSliceCfgReq->listOfRrmPolicy[policyIdx]) != ROK)
4304 /*******************************************************************
4306 * @brief Set thread affinity to the core configured via XML file
4310 * Function : parseThreadAffinity
4312 * Functionality: Set thread affinity to the core configured
4315 * @params[in] XML document pointer
4317 * Current node in XML
4318 * Thread information
4319 * @return ROK - success
4322 * ****************************************************************/
4323 uint8_t parseThreadAffinity(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ThreadInfo *threads)
4325 cur = cur -> xmlChildrenNode;
4328 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_APP_CORE")) && (cur->ns == ns))
4330 threads->duAppCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4331 #ifdef THREAD_AFFINITY
4332 ODU_SET_THREAD_AFFINITY(&threads->duAppSTskId, SS_AFFINITY_MODE_EXCL, threads->duAppCoreId, 0);
4336 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP_CORE")) && (cur->ns == ns))
4338 threads->egtpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4339 #ifdef THREAD_AFFINITY
4340 ODU_SET_THREAD_AFFINITY(&threads->egtpSTskId, SS_AFFINITY_MODE_EXCL, threads->egtpCoreId, 0);
4344 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_MAC_CORE")) && (cur->ns == ns))
4346 threads->rlcMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4347 #ifdef THREAD_AFFINITY
4348 ODU_SET_THREAD_AFFINITY(&threads->rlcMacSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcMacCoreId, 0);
4352 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_UL_CORE")) && (cur->ns == ns))
4354 threads->rlcUlCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4355 #ifdef THREAD_AFFINITY
4356 ODU_SET_THREAD_AFFINITY(&threads->rlcUlSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcUlCoreId, 0);
4360 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_CORE")) && (cur->ns == ns))
4362 threads->schCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4363 #ifdef THREAD_AFFINITY
4364 ODU_SET_THREAD_AFFINITY(&threads->schSTskId, SS_AFFINITY_MODE_EXCL, threads->schCoreId, 0);
4368 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP_CORE")) && (cur->ns == ns))
4370 threads->sctpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4371 #ifdef THREAD_AFFINITY
4372 ODU_SET_THREAD_AFFINITY(&threads->sctpSTskId, SS_AFFINITY_MODE_EXCL, threads->sctpCoreId, 0);
4376 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOWER_MAC_CORE")) && (cur->ns == ns))
4378 threads->lwrMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4379 #ifdef THREAD_AFFINITY
4380 ODU_SET_THREAD_AFFINITY(&threads->lwrMacSTskId, SS_AFFINITY_MODE_EXCL, threads->lwrMacCoreId, 0);
4389 /*******************************************************************
4391 * @brief Fill tmrTqCp
4395 * Function : parseTmrTqCp
4397 * Functionality: Fill tmrTqCp
4399 * @params[in] XML document pointer
4401 * Current node in XML
4402 * Pointer to structure to be filled
4403 * @return ROK - success
4406 * ****************************************************************/
4407 uint8_t parseTmrTqCp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmTqCp *tmrTqCp)
4409 memset(tmrTqCp, 0, sizeof(CmTqCp));
4410 cur = cur ->xmlChildrenNode;
4413 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_LEN")) && (cur->ns == ns))
4415 tmrTqCp->tmrLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4422 /*******************************************************************
4424 * @brief Fill DU timer Parameters
4428 * Function : parseDuTimerParams
4430 * Functionality: Fill DU timer Parmeters
4432 * @params[in] XML document pointer
4434 * Current node in XML
4435 * Pointer to structure to be filled
4436 * @return ROK - success
4439 * ****************************************************************/
4440 uint8_t parseDuTimerParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, DuTimers *duTimers)
4442 memset(duTimers, 0, sizeof(DuTimers));
4444 cur = cur->xmlChildrenNode;
4447 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_TQ_CP")) && (cur->ns == ns))
4449 if(parseTmrTqCp(doc, ns, cur, &duTimers->tmrTqCp) != ROK)
4455 /* Initialzie the timer queue */
4456 memset(&(duTimers->tmrTq), 0, sizeof(CmTqType) * duTimers->tmrTqCp.tmrLen);
4460 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_RESOLUTION")) && (cur->ns == ns))
4462 duTimers->tmrRes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4469 /*******************************************************************
4471 * @brief Fill TNL assoc
4475 * Function : parseTnlAssoc
4477 * Functionality: Fill TNL assoc
4479 * @params[in] XML document pointer
4481 * Current node in XML
4482 * Pointer to structure to be filled
4483 * @return ROK - success
4486 * ****************************************************************/
4487 uint8_t parseTnlAssoc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TNLAssociation *tnlAssoc)
4494 memset(tnlAssoc, 0, sizeof(TNLAssociation));
4495 cur = cur ->xmlChildrenNode;
4498 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_IP")) && (cur->ns == ns))
4500 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4501 cmInetAddr(duIpV4Addr, &(duIp));
4502 tnlAssoc->localIpAddress.ipV4Pres = true;
4503 tnlAssoc->localIpAddress.ipV4Addr = duIp;
4506 if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_PORT")) && (cur->ns == ns))
4508 tnlAssoc->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4511 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_IP")) && (cur->ns == ns))
4513 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4514 cmInetAddr(ricIpV4Addr, &(ricIp));
4515 tnlAssoc->destIpAddress.ipV4Pres = true;
4516 tnlAssoc->destIpAddress.ipV4Addr = ricIp;
4519 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_PORT")) && (cur->ns == ns))
4521 tnlAssoc->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4524 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ASSOC_USAGE")) && (cur->ns == ns))
4526 tnlAssoc->usage = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4533 /*******************************************************************
4535 * @brief Fill ric style parmeters
4539 * Function : parseRicStyle
4541 * Functionality: Fill ric style parmeters
4543 * @params[in] XML document pointer
4545 * Current node in XML
4546 * Pointer to structure to be filled
4547 * @return ROK - success
4550 * ****************************************************************/
4551 uint8_t parseRicStyle(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RicStyle *ricStyle)
4554 memset(ricStyle, 0, sizeof(RicStyle));
4556 cur = cur->xmlChildrenNode;
4559 if ((!xmlStrcmp(cur->name, (const xmlChar *)"STYLE_TYPE")) && (cur->ns == ns))
4561 ricStyle->styleType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4564 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAME")) && (cur->ns == ns))
4566 tempName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4567 strcpy((char*)ricStyle->name, tempName);
4570 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FORMAT_TYPE")) && (cur->ns == ns))
4572 ricStyle->formatType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4579 /*******************************************************************
4581 * @brief Fill measurement info parameters
4585 * Function : parseMeasurementInfo
4587 * Functionality: Fill measurement info parmeters
4589 * @params[in] XML document pointer
4591 * Current node in XML
4592 * Pointer to structure to be filled
4593 * @return ROK - success
4596 * ****************************************************************/
4597 uint8_t parseMeasurementInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmLListCp *measurementInfoList)
4601 MeasurementInfoForAction *measurementInfoForAction;
4603 DU_ALLOC(measurementInfoForAction, sizeof(MeasurementInfoForAction));
4604 if(!measurementInfoForAction)
4609 cur = cur->xmlChildrenNode;
4612 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ID")) && (cur->ns == ns))
4614 measurementInfoForAction->measurementTypeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4617 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAME")) && (cur->ns == ns))
4619 tempName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4620 strcpy((char*)measurementInfoForAction->measurementTypeName, tempName);
4626 DU_ALLOC(node, sizeof(CmLList));
4629 node->node = (PTR) measurementInfoForAction;
4630 cmLListAdd2Tail(measurementInfoList, node);
4634 DU_FREE(measurementInfoForAction, sizeof(MeasurementInfoForAction));
4641 /*******************************************************************
4643 * @brief Fill report style parameters
4647 * Function : parseReportStyle
4649 * Functionality: Fill report style parmeters
4651 * @params[in] XML document pointer
4653 * Current node in XML
4654 * Pointer to structure to be filled
4655 * @return ROK - success
4658 * ****************************************************************/
4659 uint8_t parseReportStyle(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RicReportStyle *ricReportStyle)
4661 xmlNodePtr child = NULLP;
4662 memset(ricReportStyle, 0, sizeof(RicReportStyle));
4664 cur = cur->xmlChildrenNode;
4667 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_STYLE")) && (cur->ns == ns))
4669 if(parseRicStyle(doc, ns, cur, &ricReportStyle->reportStyle) != ROK)
4675 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MEASUREMENT_INFO_LIST")) && (cur->ns == ns))
4677 child = cur->xmlChildrenNode;
4678 while(child != NULL)
4680 if ((!xmlStrcmp(child->name, (const xmlChar *)"MEASUREMENT_INFO")) && (child->ns == ns))
4682 if(parseMeasurementInfo(doc, ns, child, &ricReportStyle->measurementInfoList) != ROK)
4687 child = child -> next;
4696 /*******************************************************************
4698 * @brief Fill RAN function name parameters
4702 * Function : parseRanFuncName
4704 * Functionality: Fill RAN function name parmeters
4706 * @params[in] XML document pointer
4708 * Current node in XML
4709 * Pointer to structure to be filled
4710 * @return ROK - success
4713 * ****************************************************************/
4714 uint8_t parseRanFuncName(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RanFunctionName *ranFunctionName)
4716 char *tempShortName;
4717 char *tempServiceModelOid;
4718 char *tempDiscription;
4720 memset(ranFunctionName, 0, sizeof(RanFunctionName));
4722 cur = cur->xmlChildrenNode;
4725 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SHORT_NAME")) && (cur->ns == ns))
4727 tempShortName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4728 strcpy((char*)ranFunctionName->shortName, tempShortName);
4731 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEVICE_MODEL_OID")) && (cur->ns == ns))
4733 tempServiceModelOid =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4734 strcpy((char*)ranFunctionName->serviceModelOID, tempServiceModelOid);
4737 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESCRIPTION")) && (cur->ns == ns))
4739 tempDiscription =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
4740 strcpy((char*)ranFunctionName->description, tempDiscription);
4747 /*******************************************************************
4749 * @brief Fill RAN function parameters
4753 * Function : parseRanFunctionParams
4755 * Functionality: Fill RAN function parmeters
4757 * @params[in] XML document pointer
4759 * Current node in XML
4760 * Pointer to structure to be filled
4761 * @return ROK - success
4764 * ****************************************************************/
4765 uint8_t parseRanFunctionParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RanFunction *ranFunction)
4767 xmlNodePtr child = NULLP;
4768 uint8_t eventTriggerStyleIdx=0, reportStyleIdx=0;
4770 memset(ranFunction, 0, sizeof(RanFunction));
4772 cur = cur->xmlChildrenNode;
4776 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ID")) && (cur->ns == ns))
4778 ranFunction->id = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4781 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RAN_FUNCTION_NAME")) && (cur->ns == ns))
4783 if(parseRanFuncName(doc, ns, cur, &ranFunction->name) != ROK)
4789 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REVISION_COUNTER")) && (cur->ns == ns))
4791 ranFunction->revisionCounter = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4794 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_EVENT_TRIGGER_STYLE_SUPPORTED")) && (cur->ns == ns))
4796 ranFunction->numOfEventTriggerStyleSupported = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4800 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EVENT_TRIGGERED_STYLE_LIST")) && (cur->ns == ns))
4802 child = cur->xmlChildrenNode;
4803 while(child != NULL)
4805 if ((!xmlStrcmp(child->name, (const xmlChar *)"EVENT_TRIGGERED_STYLE")) && (child->ns == ns))
4807 if(parseRicStyle(doc, ns, child,&ranFunction->eventTriggerStyleList[eventTriggerStyleIdx]) != ROK)
4811 eventTriggerStyleIdx++;
4814 child = child -> next;
4820 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_REPORT_STYLE_SUPPORTED")) && (cur->ns == ns))
4822 ranFunction->numOfReportStyleSupported = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4825 if ((!xmlStrcmp(cur->name, (const xmlChar *)"REPORT_STYLE_SUPPORTED_LIST")) && (cur->ns == ns))
4827 child = cur->xmlChildrenNode;
4828 while(child != NULL)
4830 if ((!xmlStrcmp(child->name, (const xmlChar *)"REPORT_STYLE")) && (child->ns == ns))
4832 if(parseReportStyle(doc, ns, child,&ranFunction->reportStyleList[reportStyleIdx]) != ROK)
4839 child = child -> next;
4844 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_INDICATION_HEADER_FORMAT")) && (cur->ns == ns))
4846 ranFunction->ricIndicationHeaderFormat = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4849 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_INDICATION_MESSAGE_FORMAT")) && (cur->ns == ns))
4851 ranFunction->ricIndicationMessageFormat = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4858 /*******************************************************************
4860 * @brief Fill E2 config Parameters
4864 * Function : parseE2ConfigParams
4866 * Functionality: Fill E2 config Parmeters
4868 * @params[in] XML document pointer
4870 * Current node in XML
4871 * Pointer to structure to be filled
4872 * @return ROK - success
4875 * ****************************************************************/
4876 uint8_t parseE2ConfigParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, E2apDb *e2apDb)
4878 uint8_t tnlIdx=0,ranFuncIdx=0;
4879 xmlNodePtr child = NULLP;
4881 memset(e2apDb, 0, sizeof(E2apDb));
4882 cur = cur->xmlChildrenNode;
4885 if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_NODE_ID")) && (cur->ns == ns))
4887 e2apDb->e2NodeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4890 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_TNL_ASSOC")) && (cur->ns == ns))
4892 e2apDb->numOfTNLAssoc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4895 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TNL_ASSOC_LIST")) && (cur->ns == ns))
4897 child = cur->xmlChildrenNode;
4898 while(child != NULL)
4900 if ((!xmlStrcmp(child->name, (const xmlChar *)"TNL_ASSOC")) && (child->ns == ns))
4902 if(parseTnlAssoc(doc, ns, child,&e2apDb->tnlAssoc[tnlIdx]) != ROK)
4909 child = child -> next;
4913 if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_RAN_FUNCTION")) && (cur->ns == ns))
4915 e2apDb->numOfRanFunction = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4918 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RAN_FUNCTION_LIST")) && (cur->ns == ns))
4920 child = cur->xmlChildrenNode;
4921 while(child != NULL)
4923 if ((!xmlStrcmp(child->name, (const xmlChar *)"RAN_FUNCTION")) && (child->ns == ns))
4925 if(parseRanFunctionParams(doc, ns, child,&e2apDb->ranFunction[ranFuncIdx]) != ROK)
4929 cmLListInit(&e2apDb->ranFunction[ranFuncIdx].subscriptionList);
4933 child = child -> next;
4942 /*******************************************************************
4944 * @brief Fill Global config Parameters
4948 * Function : parseGlobalConfigParams
4950 * Functionality: Fill Global config Parmeters
4952 * @params[in] XML document pointer
4954 * Current node in XML
4955 * Pointer to structure to be filled
4956 * @return ROK - success
4959 * ****************************************************************/
4960 uint8_t parseGlobalConfigParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
4963 memset(&gConfigInfo, 0, sizeof(GConfiguration));
4964 cur = cur->xmlChildrenNode;
4968 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RADIO_FRAME_DURATION")) && (cur->ns == ns))
4970 gConfigInfo.gRadioFrameDuration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4973 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ODU_UE_THROUGHPUT_PRINT_TIME_INTERVAL")) && (cur->ns == ns))
4975 gConfigInfo.gUeThrptTimeIntervl = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4978 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ODU_SNSSAI_THROUGHPUT_PRINT_TIME_INTERVAL")) && (cur->ns == ns))
4980 gConfigInfo.gSnssaiThrptTimeIntervl = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4983 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PHY_DELTA_DL")) && (cur->ns == ns))
4985 gConfigInfo.gPhyDeltaDl = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4988 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PHY_DELTA_UL")) && (cur->ns == ns))
4990 gConfigInfo.gPhyDeltaUl = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
4997 /*******************************************************************
4999 * @brief Free the memory allocate for slice supported list
5003 * Function : parseDuCfgParams
5005 * Functionality: Free the memory allocate for slice supported list
5009 * ****************************************************************/
5010 void freeSliceSuppLst(SupportedSliceList *sliceSuppLst)
5014 if(sliceSuppLst->numSupportedSlices&&sliceSuppLst->snssai)
5016 for(sliceIdx=0;sliceIdx<sliceSuppLst->numSupportedSlices;sliceIdx++)
5018 if(sliceSuppLst->snssai)
5020 if(sliceSuppLst->snssai[sliceIdx])
5022 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, sliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
5024 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, \
5025 sliceSuppLst->snssai, (sliceSuppLst->numSupportedSlices) * sizeof(Snssai*));
5031 /*******************************************************************
5033 * @brief Free the memory allocate in parseDuCfgParams
5037 * Function : parseDuCfgParams
5039 * Functionality: Free the memory allocate in parseDuCfgParams
5043 * ****************************************************************/
5044 void freeDuCfgParams()
5046 uint8_t ranFuncIdx=0,reportStyleIdx=0;
5047 uint8_t policyIdx = 0,memIdx=0;
5048 MacSliceRrmPolicy *rrmPolicy =NULLP;
5049 MacSliceCfgReq *macSliceCfgReq=NULLP;
5050 F1DuSysInfo *sysInfo;
5052 RanFunction *ranFunction;
5053 RicReportStyle *ricReportStyle;
5054 CmLListCp *measurementInfoList;
5055 CmLList *measInfoNode = NULLP;
5057 if(duCfgParam.duName)
5059 DU_FREE(duCfgParam.duName, strlen(duCfgParam.duName));
5062 freeSliceSuppLst(&duCfgParam.macCellCfg.cellCfg.plmnInfoList[0].suppSliceList);
5063 csiRsCfg=&duCfgParam.macCellCfg.csiRsCfg;
5064 if(csiRsCfg->csiFreqDomainAlloc)
5066 DU_FREE(csiRsCfg->csiFreqDomainAlloc, sizeof(uint8_t));
5068 if(duCfgParam.macCellCfg.cellCfg.sib1Cfg.sib1Pdu)
5070 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, \
5071 duCfgParam.macCellCfg.cellCfg.sib1Cfg.sib1Pdu, duCfgParam.macCellCfg.cellCfg.sib1Cfg.sib1PduLen);
5074 if(duCb.e2apDb.numOfRanFunction)
5076 for(ranFuncIdx=0;ranFuncIdx<duCb.e2apDb.numOfRanFunction;ranFuncIdx++)
5078 ranFunction=&duCb.e2apDb.ranFunction[ranFuncIdx];
5079 for(reportStyleIdx=0;reportStyleIdx<ranFunction->numOfReportStyleSupported;reportStyleIdx++)
5081 ricReportStyle=&ranFunction->reportStyleList[reportStyleIdx];
5082 measurementInfoList=&ricReportStyle->measurementInfoList;
5083 CM_LLIST_FIRST_NODE(measurementInfoList, measInfoNode);
5086 MeasurementInfoForAction *measurementInfoForAction;
5087 measurementInfoForAction= (MeasurementInfoForAction*)measInfoNode->node;
5088 cmLListDelFrm(measurementInfoList, measInfoNode);
5089 DU_FREE(measurementInfoForAction, sizeof(MeasurementInfoForAction));
5090 DU_FREE(measInfoNode, sizeof(CmLList));
5091 CM_LLIST_FIRST_NODE(measurementInfoList, measInfoNode);
5097 freeSliceSuppLst(&duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].taiSliceSuppLst);
5098 sysInfo=&duCfgParam.srvdCellLst[0].duSysInfo;
5101 DU_FREE(sysInfo->mibMsg, sysInfo->mibLen);
5103 if(sysInfo->sib1Msg)
5105 DU_FREE(sysInfo->sib1Msg, sysInfo->sib1Len);
5108 macSliceCfgReq=&duCfgParam.tempSliceCfg;
5109 if(macSliceCfgReq->listOfRrmPolicy)
5111 for(policyIdx = 0; policyIdx < macSliceCfgReq->numOfRrmPolicy; policyIdx++)
5113 if (macSliceCfgReq->listOfRrmPolicy[policyIdx])
5115 rrmPolicy=macSliceCfgReq->listOfRrmPolicy[policyIdx];
5116 if(rrmPolicy->rRMPolicyMemberList)
5118 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
5120 if (rrmPolicy->rRMPolicyMemberList[memIdx])
5122 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL,\
5123 rrmPolicy->rRMPolicyMemberList[memIdx], sizeof(RrmPolicyMemberList));
5126 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL,rrmPolicy->rRMPolicyMemberList,\
5127 rrmPolicy->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
5130 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, \
5131 macSliceCfgReq->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
5134 DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, \
5135 macSliceCfgReq->listOfRrmPolicy, macSliceCfgReq->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
5140 /*******************************************************************
5142 * @brief Fill DU Config Parmeters
5146 * Function : parseDuCfgParams
5150 * @params[in] XML document pointer
5152 * Current node in XML
5153 * @return ROK - success
5156 * ****************************************************************/
5157 uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
5160 char *tempDuName = "";
5168 cur = cur->xmlChildrenNode;
5171 if ((!xmlStrcmp(cur->name, (const xmlChar *)"THREAD_AFFINITY")) && (cur->ns == ns))
5173 if(parseThreadAffinity(doc, ns, cur, &duCfgParam.threadInfo) != ROK)
5180 if ((!xmlStrcmp(cur->name, (const xmlChar *)"GNB_ID")) && (cur->ns == ns))
5182 duCb.gnbId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5185 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_ID")) && (cur->ns == ns))
5187 duCfgParam.duId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5190 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_NAME")) && (cur->ns == ns))
5192 tempDuName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5193 DU_ALLOC(duCfgParam.duName, strlen(tempDuName));
5194 if(!duCfgParam.duName)
5196 DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
5200 strcpy((char*)duCfgParam.duName, tempDuName);
5203 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_DRB")) && (cur->ns == ns))
5205 duCfgParam.maxNumDrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
5209 if( getStartupConfig(&g_cfg) != ROK )
5213 cmInetAddr((S8*)g_cfg.DU_IPV4_Addr, &duIp);
5214 cmInetAddr((S8*)g_cfg.CU_IPV4_Addr, &cuIp);
5215 cmInetAddr((S8*)g_cfg.RIC_IPV4_Addr, &ricIp);
5218 if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_IP_V4_ADDR")) && (cur->ns == ns))
5220 duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5221 cmInetAddr(duIpV4Addr, &(duIp));
5224 if ((!xmlStrcmp(cur->name, (const xmlChar *)"CU_IP_V4_ADDR")) && (cur->ns == ns))
5226 cuIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5227 cmInetAddr(cuIpV4Addr, &(cuIp));
5230 if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_IP_V4_ADDR")) && (cur->ns == ns))
5232 ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
5233 cmInetAddr(ricIpV4Addr, &(ricIp));
5237 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP")) && (cur->ns == ns))
5239 if(parseSctpParams(doc, ns, cur, &duCfgParam.sctpParams) != ROK)
5244 duCfgParam.sctpParams.duIpAddr.ipV4Pres = true;
5245 duCfgParam.sctpParams.duIpAddr.ipV4Addr = duIp;
5246 duCfgParam.sctpParams.cuIpAddr.ipV4Pres = true;
5247 duCfgParam.sctpParams.cuIpAddr.ipV4Addr = cuIp;
5248 duCfgParam.sctpParams.ricIpAddr.ipV4Pres = true;
5249 duCfgParam.sctpParams.ricIpAddr.ipV4Addr = ricIp;
5252 if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP")) && (cur->ns == ns))
5254 if(parseEgtpParams(doc, ns, cur, &duCfgParam.egtpParams) != ROK)
5259 duCfgParam.egtpParams.localIp.ipV4Addr = duIp;
5260 duCfgParam.egtpParams.localIp.ipV4Pres = true;
5261 duCfgParam.egtpParams.destIp.ipV4Pres = true;
5262 duCfgParam.egtpParams.destIp.ipV4Addr = cuIp;
5263 duCfgParam.egtpParams.maxTunnelId = duCfgParam.maxNumDrb * MAX_NUM_UE;
5266 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIB_PARAMS")) && (cur->ns == ns))
5268 if(parseMibParams(doc, ns, cur, &duCfgParam.mibParams) != ROK)
5275 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_PARAMS")) && (cur->ns == ns))
5277 if(parseSib1Params(doc, ns, cur, &duCfgParam.sib1Params) != ROK)
5284 if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_SRVD_CELL_INFO")) && (cur->ns == ns))
5286 if(parseF1DuServedCellInfo(doc, ns, cur, &duCfgParam.srvdCellLst[0]) != ROK)
5293 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_CFG")) && (cur->ns == ns))
5295 if(parseMacCellCfg(doc, ns, cur, &duCfgParam.macCellCfg) != ROK)
5303 if ((!xmlStrcmp(cur->name, (const xmlChar *)"SLICE_CFG")) && (cur->ns == ns))
5305 if(parseMacSliceCfgReq(doc, ns, cur, &duCfgParam.tempSliceCfg) != ROK)
5313 if((!xmlStrcmp(cur->name, (const xmlChar *)"DU_TIMER_INFO")) && (cur->ns == ns))
5315 if(parseDuTimerParams(doc, ns, cur, &duCb.duTimersInfo) != ROK)
5322 if((!xmlStrcmp(cur->name, (const xmlChar *)"E2AP_CFG")) && (cur->ns == ns))
5324 if(parseE2ConfigParams(doc, ns, cur, &duCb.e2apDb) != ROK)
5331 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2SetupTimer), 1);
5332 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.ricServiceUpdateTimer.timer), 1);
5333 cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2NodeConfigUpdate.timer), 1);
5337 if((!xmlStrcmp(cur->name, (const xmlChar *)"GLOBAL_CFG")) && (cur->ns == ns))
5339 if(parseGlobalConfigParams(doc, ns, cur) != ROK)
5356 /*******************************************************************
5358 * @brief Reads config and posts message to du_app on completion
5362 * Function : duReadCfg
5365 * - Reads configuration from xml file and stores in DB
5366 * - Post to du_app for further processing
5369 * @return ROK - success
5372 * ****************************************************************/
5376 const char *filename = "../build/config/tdd_odu_config.xml";
5378 const char *filename = "../build/config/fdd_odu_config.xml";
5380 xmlDocPtr doc = NULLP;
5381 xmlNodePtr cur = NULLP;
5382 xmlNsPtr ns = NULLP;
5386 /* Parse, store and print DU configurations from XML file */
5387 doc = xmlParseFile(filename);
5390 DU_LOG("\nERROR --> DU_APP: Failed to parse the XML file");
5394 cur = xmlDocGetRootElement(doc);
5395 ns = xmlSearchNsByHref(doc, cur, (const xmlChar *)"urn:o-ran:odu:configuration");
5398 DU_LOG("\nERROR --> DU_APP: XML Namespace not found.\n");
5404 parseDuCfgParams(doc, ns, cur);
5410 /* Fill pst structure */
5411 memset(&(pst), 0, sizeof(Pst));
5412 pst.srcEnt = (Ent)ENTDUAPP;
5413 pst.srcInst = (Inst)DU_INST;
5414 pst.srcProcId = DU_PROC;
5415 pst.dstEnt = pst.srcEnt;
5416 pst.dstInst = pst.srcInst;
5417 pst.dstProcId = pst.srcProcId;
5419 pst.selector = ODU_SELECTOR_TC;
5423 /* Timer Registration request to system services */
5424 if (ODU_REG_TMR_MT(pst.srcEnt, pst.srcInst, duCb.duTimersInfo.tmrRes, duActvTmr) != ROK)
5426 DU_LOG("\nERROR --> DU_APP : Failed to register timer");
5430 if(ODU_GET_MSG_BUF(DFLT_REGION, DU_POOL, &mBuf) != ROK)
5432 DU_LOG("\nERROR --> DU_APP : Memory allocation failed in duReadCfg");
5436 if (ODU_POST_TASK(&pst, mBuf) != ROK)
5438 DU_LOG("\nERROR --> DU_APP : ODU_POST_TASK failed in duReadCfg");
5445 /*******************************************************************
5447 * @brief Prints all DU Configuration
5451 * Function : printDuConfig
5454 * - Prints all DU configurations
5459 * ****************************************************************/
5460 void printDuConfig()
5463 uint16_t ranFuncIdx;
5464 uint8_t reportStyleIdx =0, eventStyleIdx=0, tnlIdx=0;
5465 uint8_t sliceIdx = 0, pfIdx = 0, rsrcIdx = 0, ssbMaskIdx = 0, fdmIdx = 0;
5466 uint8_t monitoringSymbIdx = 0, poIdx = 0, policyIdx = 0, memIdx = 0;
5467 __attribute__((unused)) SctpParams *sctp;
5468 __attribute__((unused)) F1EgtpParams *egtp;
5469 __attribute__((unused)) MibParams *mib;
5470 __attribute__((unused)) F1RrcVersion *f1RrcVersion;
5471 F1DuCellInfo *f1DuCellInfo;
5472 F1CellInfo *f1CellInfo;
5473 __attribute__((unused)) F1DuSysInfo *duSysInfo;
5474 __attribute__((unused)) F1BrdcstPlmnInfo *brdcstPlmnInfo;
5475 NrModeInfo *nrModeInfo;
5476 __attribute__((unused)) F1NrFddInfo *f1NrFddInfo;
5477 F1SrvdPlmn *srvdPlmn;
5478 SupportedSliceList *sliceSuppLst;
5479 MacCellCfg *macCellCfg;
5480 __attribute__((unused)) CarrierCfg *carrierCfg;
5482 PlmnInfoList *plmnInfoList;
5483 Sib1CellCfg *sib1Cfg;
5484 SchPageCfg *pageCfg;
5485 __attribute__((unused)) PdcchConfigSib1 *pdcchConfigSib1;
5486 BwpDlConfig *bwpDlCfg;
5487 __attribute__((unused)) BwpParams *bwp;
5488 PdcchConfigCommon *pdcchCfgCmn;
5489 SearchSpaceCfg *searchSpaceCfg;
5490 __attribute__((unused)) CandidatesInfo *candidateInfo;
5491 PdschConfigCommon *pdschCfgCmn;
5492 __attribute__((unused)) PdschCfgCommTimeDomRsrcAlloc *pdschCmnTimeDomRsrcAlloc;
5493 BwpUlConfig *bwpUlCfg;
5494 __attribute__((unused)) PucchConfigCommon *pucchCfgCmn;
5495 PuschConfigCommon *puschCfgCmn;
5496 __attribute__((unused)) PuschTimeDomRsrcAlloc *puschTimeDomRsrcAlloc;
5497 __attribute__((unused)) SsbCfg *ssbCfg;
5498 __attribute__((unused)) CsiRsCfg *csiRsCfg;
5500 __attribute__((unused)) PrachFdmInfo *prachFdmInfo;
5501 __attribute__((unused)) PrecodingConf *precodCfg;
5502 __attribute__((unused)) BeamformingConf *beamFormingCfg;
5503 Sib1Params *sib1Params;
5504 __attribute__((unused)) SiSchedInfo *siSchedInfo;
5505 SrvCellCfgCommSib *srvCellCfgCmnSib;
5506 DlCfgCommon *dlCfgCmn;
5507 PdcchCfgCommon *pdcchCfgCommon;
5508 PdschCfgCommon *pdschCfgCommon;
5509 __attribute__((unused)) PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc;
5510 __attribute__((unused)) BcchCfg *bcchCfg;
5511 __attribute__((unused)) PcchCfg *pcchCfg;
5512 UlCfgCommon *ulCfgCmn;
5513 RachCfgCommon *rachCfgCmn;
5514 PuschCfgCommon *puschCfgCommon;
5515 __attribute__((unused)) PuschCfgCmnTimeDomAlloc *puschCmnTimeDomRsrsAlloc;
5516 PucchCfgCommon *pucchCfgCommon;
5517 __attribute__((unused)) TddUlDlCfgCommon *tddUlDlCfgCmn;
5518 MacSliceCfgReq *macSliceCfg;
5519 MacSliceRrmPolicy *rrmPolicy;
5520 __attribute__((unused)) RrmPolicyRatio *rrmPolicyRatio;
5521 __attribute__((unused)) RrmPolicyMemberList *rrmPolicyMemberList;
5524 RanFunction *ranFunc;
5525 CmLListCp *measurementInfoList;
5526 MeasurementInfoForAction *measurementInfoForAction;
5528 F1NrTddInfo *f1NrTddInfo;
5532 DU_LOG("\n ** DU CONFIGURATION ** \n");
5533 DU_LOG("DU ID %d\n", duCfgParam.duId);
5534 DU_LOG("DU Name %s\n", duCfgParam.duName);
5536 DU_LOG("\n ** Thread Affinity ** \n");
5537 DU_LOG("DU APP CORE ID %d\n", duCfgParam.threadInfo.duAppCoreId);
5538 DU_LOG("EGTP CORE ID %d\n", duCfgParam.threadInfo.egtpCoreId);
5539 DU_LOG("SCTP CORE ID %d\n", duCfgParam.threadInfo.sctpCoreId);
5540 DU_LOG("RLC-UL CORE ID %d\n", duCfgParam.threadInfo.rlcUlCoreId);
5541 DU_LOG("RLC-DL and MAC CORE ID %d\n", duCfgParam.threadInfo.rlcMacCoreId);
5542 DU_LOG("SCH CORE ID %d\n", duCfgParam.threadInfo.schCoreId);
5543 DU_LOG("Lower MAC CORE ID %d\n", duCfgParam.threadInfo.lwrMacCoreId);
5545 DU_LOG("MAX NUM DRB %d\n", duCfgParam.maxNumDrb);
5547 sctp = &duCfgParam.sctpParams;
5548 DU_LOG("\n ** SCTP PARAMETER ** \n");
5549 DU_LOG("DU IPv4 Address present %u\n", sctp->duIpAddr.ipV4Pres);
5550 DU_LOG("DU IP Address %u\n", sctp->duIpAddr.ipV4Addr);
5551 DU_LOG("CU IPv4 Address present %u\n", sctp->cuIpAddr.ipV4Pres);
5552 DU_LOG("CU IP Address %u\n", sctp->cuIpAddr.ipV4Addr);
5553 DU_LOG("RIC IPv4 Address present %u\n", sctp->ricIpAddr.ipV4Pres);
5554 DU_LOG("RIC IP Address %u\n", sctp->ricIpAddr.ipV4Addr);
5555 DU_LOG("SCTP Port at DU for F1 Interface %d\n", sctp->duPort[F1_INTERFACE]);
5556 DU_LOG("SCTP Port at CU for F1 Interface %d\n", sctp->cuPort);
5557 DU_LOG("SCTP Port at DU for E2 Interface %d\n", sctp->duPort[E2_INTERFACE]);
5558 DU_LOG("SCTP Port at RIC for E2 Interface %d\n", sctp->ricPort);
5560 egtp = &duCfgParam.egtpParams;
5561 DU_LOG("\n ** EGTP PARAMETER ** \n");
5562 DU_LOG("DU IP Address %d\n", egtp->localIp.ipV4Addr);
5563 DU_LOG("CU IP Address %d\n", egtp->destIp.ipV4Addr);
5564 DU_LOG("EGTP Port at DU %d\n", egtp->localPort);
5565 DU_LOG("EGTP Port at CU %d\n", egtp->destPort);
5566 DU_LOG("Minimum Tunnel ID %d\n", egtp->minTunnelId);
5567 DU_LOG("Maximum Tunnel ID %d\n",egtp->maxTunnelId);
5569 mib = &duCfgParam.mibParams;
5570 DU_LOG("\n ** MIB PARAMETER ** \n");
5571 DU_LOG("System Frame Number %d\n", mib->sysFrmNum);
5572 DU_LOG("Subcarrier Spacing Common %ld\n", mib->subCarrierSpacingCommon);
5573 DU_LOG("SSB Subcarrier Offset %ld\n", mib->ssb_SubcarrierOffset);
5574 DU_LOG("DMRS Type-A Position %ld\n", mib->dmrs_TypeA_Position);
5575 DU_LOG("Control Resource Set Zero %ld\n", mib->controlResourceSetZero);
5576 DU_LOG("Search Space Zero %ld\n", mib->searchSpaceZero);
5577 DU_LOG("Cell Barred %ld\n", mib->cellBarred);
5578 DU_LOG("Intra Frequency Reselection %ld\n", mib->intraFreqReselection);
5580 duSysInfo = &duCfgParam.srvdCellLst[0].duSysInfo;
5581 DU_LOG("\n ** DU System Information ** \n");
5582 DU_LOG("MIB length %d\n", duSysInfo->mibLen);
5583 DU_LOG("MIB message %s\n", duSysInfo->mibMsg);
5584 DU_LOG("SIB1 length %d\n", duSysInfo->sib1Len);
5585 DU_LOG("SIB1 message %s\n", duSysInfo->sib1Msg);
5587 f1DuCellInfo = &duCfgParam.srvdCellLst[0].duCellInfo;
5588 DU_LOG("\n ** DU Cell Information ** \n");
5590 f1CellInfo = &f1DuCellInfo->cellInfo;
5591 DU_LOG("NR PCI %d\n", f1CellInfo->nrPci);
5592 DU_LOG("DU TAC %d\n", f1DuCellInfo->tac);
5593 DU_LOG("EPS TAC %d\n", f1DuCellInfo->epsTac);
5594 DU_LOG("Measurement Time Configuration Duration %d\n", f1DuCellInfo->measTimeCfgDuration);
5595 DU_LOG("Cell Direction %d\n", f1DuCellInfo->cellDir);
5596 DU_LOG("Cell Type %d\n", f1DuCellInfo->cellType);
5598 DU_LOG("\n ** Cell Info : NR CGI ** \n");
5599 DU_LOG("Cell Id %d\n",f1CellInfo->nrCgi.cellId);
5600 DU_LOG("PLMN : mcc[0] %d\n", f1CellInfo->nrCgi.plmn.mcc[0]);
5601 DU_LOG("PLMN : mcc[1] %d\n", f1CellInfo->nrCgi.plmn.mcc[1]);
5602 DU_LOG("PLMN : mcc[2] %d\n", f1CellInfo->nrCgi.plmn.mcc[2]);
5603 DU_LOG("PLMN : mnc[0] %d\n", f1CellInfo->nrCgi.plmn.mnc[0]);
5604 DU_LOG("PLMN : mnc[1] %d\n", f1CellInfo->nrCgi.plmn.mnc[1]);
5605 DU_LOG("PLMN : mnc[2] %d\n", f1CellInfo->nrCgi.plmn.mnc[2]);
5607 srvdPlmn = &f1CellInfo->srvdPlmn[0];
5608 DU_LOG("\n ** Cell Info : Served PLMN ** \n");
5609 DU_LOG("PLMN : mcc[0] %d\n", srvdPlmn->plmn.mcc[0]);
5610 DU_LOG("PLMN : mcc[1] %d\n", srvdPlmn->plmn.mcc[1]);
5611 DU_LOG("PLMN : mcc[2] %d\n", srvdPlmn->plmn.mcc[2]);
5612 DU_LOG("PLMN : mnc[0] %d\n", srvdPlmn->plmn.mnc[0]);
5613 DU_LOG("PLMN : mnc[1] %d\n", srvdPlmn->plmn.mnc[1]);
5614 DU_LOG("PLMN : mnc[2] %d\n", srvdPlmn->plmn.mnc[2]);
5615 DU_LOG("EXT_PLMN : mcc[0] %d\n", srvdPlmn->extPlmn.mcc[0]);
5616 DU_LOG("EXT_PLMN : mcc[1] %d\n", srvdPlmn->extPlmn.mcc[1]);
5617 DU_LOG("EXT_PLMN : mcc[2] %d\n", srvdPlmn->extPlmn.mcc[2]);
5618 DU_LOG("EXT_PLMN : mnc[0] %d\n", srvdPlmn->extPlmn.mnc[0]);
5619 DU_LOG("EXT_PLMN : mnc[1] %d\n", srvdPlmn->extPlmn.mnc[1]);
5620 DU_LOG("EXT_PLMN : mnc[2] %d\n", srvdPlmn->extPlmn.mnc[2]);
5622 sliceSuppLst = &srvdPlmn->taiSliceSuppLst;
5623 DU_LOG("\n ** Cell Info : Served PLMN : Supported Slice List ** \n");
5624 DU_LOG("Number of Slices supported %d\n", sliceSuppLst->numSupportedSlices);
5625 for (sliceIdx = 0; sliceIdx < sliceSuppLst->numSupportedSlices; sliceIdx++)
5628 DU_LOG("\tSST %d\n", (*sliceSuppLst->snssai[sliceIdx]).sst);
5629 DU_LOG("\tSD %d %d %d\n", (*sliceSuppLst->snssai[sliceIdx]).sd[0], (*sliceSuppLst->snssai[sliceIdx]).sd[1], \
5630 (*sliceSuppLst->snssai[sliceIdx]).sd[2]);
5633 brdcstPlmnInfo = &f1DuCellInfo->brdcstPlmnInfo[0];
5634 DU_LOG("\n ** DU Cell Information : Broadcast PLMN Info ** \n");
5635 DU_LOG("TAC %d\n", brdcstPlmnInfo->tac);
5636 DU_LOG("NR Cell Id %d\n", brdcstPlmnInfo->nrCellId);
5637 DU_LOG("RANAC %d\n", brdcstPlmnInfo->ranac);
5639 DU_LOG("PLMN : mcc[0] %d\n", brdcstPlmnInfo->plmn[0].mcc[0]);
5640 DU_LOG("PLMN : mcc[1] %d\n", brdcstPlmnInfo->plmn[0].mcc[1]);
5641 DU_LOG("PLMN : mcc[2] %d\n", brdcstPlmnInfo->plmn[0].mcc[2]);
5642 DU_LOG("PLMN : mnc[0] %d\n", brdcstPlmnInfo->plmn[0].mnc[0]);
5643 DU_LOG("PLMN : mnc[1] %d\n", brdcstPlmnInfo->plmn[0].mnc[1]);
5644 DU_LOG("PLMN : mnc[2] %d\n", brdcstPlmnInfo->plmn[0].mnc[2]);
5646 DU_LOG("EXT_PLMN : mcc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[0]);
5647 DU_LOG("EXT_PLMN : mcc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[1]);
5648 DU_LOG("EXT_PLMN : mcc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mcc[2]);
5649 DU_LOG("EXT_PLMN : mnc[0] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[0]);
5650 DU_LOG("EXT_PLMN : mnc[1] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[1]);
5651 DU_LOG("EXT_PLMN : mnc[2] %d\n", brdcstPlmnInfo->extPlmn[0].mnc[2]);
5653 nrModeInfo = &f1DuCellInfo->f1Mode;
5654 f1NrFddInfo = &nrModeInfo->mode.fdd;
5655 DU_LOG("\n ** DU Cell Information : NR Mode Info ** \n");
5657 DU_LOG("\n ** NR Mode Info : FDD ** \n");
5658 DU_LOG("\n ** NR Mode Info : FDD : UL NR Frequency ** \n");
5659 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->ulNrFreqInfo.nrArfcn);
5660 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->ulNrFreqInfo.sulInfo.sulArfcn);
5661 DU_LOG("SUL : Transmission BW Subcarrier Spacing %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrScs);
5662 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->ulNrFreqInfo.sulInfo.sulTxBw.nrb);
5663 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].nrFreqBand);
5664 DU_LOG("SUL Band %d\n", f1NrFddInfo->ulNrFreqInfo.freqBand[0].sulBand[0]);
5666 DU_LOG("\n ** NR Mode Info : FDD : DL NR Frequency ** \n");
5667 DU_LOG("NR ARFCN %d\n", f1NrFddInfo->dlNrFreqInfo.nrArfcn);
5668 DU_LOG("SUL : ARFCN %d\n",f1NrFddInfo->dlNrFreqInfo.sulInfo.sulArfcn);
5669 DU_LOG("SUL : Transmission BW Subcarrier Sapcing %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrScs);
5670 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrFddInfo->dlNrFreqInfo.sulInfo.sulTxBw.nrb);
5671 DU_LOG("NR Frequency Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].nrFreqBand);
5672 DU_LOG("SUL Band %d\n", f1NrFddInfo->dlNrFreqInfo.freqBand[0].sulBand[0]);
5674 DU_LOG("\n ** NR Mode Info : FDD : UL Transmission Bandwidth ** \n");
5675 DU_LOG("Subscarrier spacing %d\n", f1NrFddInfo->ulTxBw.nrScs);
5676 DU_LOG("Number of RBs %d\n", f1NrFddInfo->ulTxBw.nrb);
5678 DU_LOG("\n ** NR Mode Info : FDD : DL Transmission Bandwidth ** \n");
5679 DU_LOG("Subcarrier Spacing %d\n", f1NrFddInfo->dlTxBw.nrScs);
5680 DU_LOG("Number of RBs %d\n", f1NrFddInfo->dlTxBw.nrb);
5684 f1NrTddInfo = &nrModeInfo ->mode.tdd;
5686 DU_LOG("\n ** NR Mode Info : TDD : NR Frequency ** \n");
5687 DU_LOG("NR ARFCN %d\n", f1NrTddInfo->nrFreqInfo.nrArfcn);
5688 DU_LOG("SUL : ARFCN %d\n",f1NrTddInfo->nrFreqInfo.sulInfo.sulArfcn);
5689 DU_LOG("SUL : Transmission BW Subscarrier Spacing %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrScs);
5690 DU_LOG("SUL : Number of RBs in Transmission BW %d\n", f1NrTddInfo->nrFreqInfo.sulInfo.sulTxBw.nrb);
5691 DU_LOG("NR Frequency Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].nrFreqBand);
5692 DU_LOG("SUL Band %d\n", f1NrTddInfo->nrFreqInfo.freqBand[0].sulBand[0]);
5694 DU_LOG("\n ** NR Mode Info : TDD : NR Transmission Bandwidth ** \n");
5695 DU_LOG("Subcarrier Spacing %d\n", f1NrTddInfo->nrTxBw.nrScs);
5696 DU_LOG("Number of RBs %d\n", f1NrTddInfo->nrTxBw.nrb);
5699 macCellCfg = &duCfgParam.macCellCfg;
5700 DU_LOG("\n ** MAC CELL CONFIGURATION ** \n");
5701 DU_LOG("Cell Id %d\n", macCellCfg->cellId);
5703 DU_LOG("\n ** MAC Cell Configuration : Carrier Configuration ** \n");
5704 carrierCfg = &macCellCfg ->carrCfg;
5705 DU_LOG("DL Bandwidth %d\n", carrierCfg->dlBw);
5706 DU_LOG("DL ARFCN %d\n", carrierCfg->arfcnDL);
5707 DU_LOG("UL Bandwidth %d\n", carrierCfg->ulBw);
5708 DU_LOG("UL ARFCN %d\n", carrierCfg->arfcnUL);
5709 DU_LOG("Number of Transmission Antenna %d\n", carrierCfg->numTxAnt);
5710 DU_LOG("Number of Received Antenna %d\n", carrierCfg->numRxAnt);
5712 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration ** \n");
5713 cellCfg = &macCellCfg ->cellCfg;
5714 DU_LOG("Operational State %d\n", cellCfg->opState);
5715 DU_LOG("Administration State %d\n", cellCfg->adminState);
5716 DU_LOG("Cell Current State %d\n", cellCfg->cellState);
5717 DU_LOG("NR PCI %d\n", cellCfg->phyCellId);
5718 DU_LOG("TAC: %d\n", cellCfg->tac);
5719 DU_LOG("SSB Freqeuncy %d\n", cellCfg->ssbFreq);
5720 DU_LOG("Subcarrier Spacing: %d\n", cellCfg->subCarrSpacing);
5721 DU_LOG("Duplex Mode %d\n", cellCfg->dupType);
5723 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : PLMN Info List ** \n");
5724 plmnInfoList = &cellCfg ->plmnInfoList[0];
5725 DU_LOG("PLMN : mcc[0] %d\n", plmnInfoList->plmn.mcc[0]);
5726 DU_LOG("PLMN : mcc[1] %d\n", plmnInfoList->plmn.mcc[1]);
5727 DU_LOG("PLMN : mcc[2] %d\n", plmnInfoList->plmn.mcc[2]);
5728 DU_LOG("PLMN : mnc[0] %d\n", plmnInfoList->plmn.mnc[0]);
5729 DU_LOG("PLMN : mnc[1] %d\n", plmnInfoList->plmn.mnc[1]);
5730 DU_LOG("PLMN : mnc[2] %d\n", plmnInfoList->plmn.mnc[2]);
5732 DU_LOG("Number of Slice supported %d\n", plmnInfoList->suppSliceList.numSupportedSlices);
5733 for(sliceIdx = 0; sliceIdx < plmnInfoList->suppSliceList.numSupportedSlices; sliceIdx++)
5736 DU_LOG("\nSST %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sst);
5737 DU_LOG("\nSD %d %d %d\n", (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[0], \
5738 (*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[1],(*plmnInfoList->suppSliceList.snssai[sliceIdx]).sd[2]);
5741 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 ** \n");
5742 sib1Cfg = &cellCfg->sib1Cfg;
5743 DU_LOG("SIB1 PDU Length %d\n", sib1Cfg->sib1PduLen);
5744 DU_LOG("SIB1 PDU %s\n", sib1Cfg->sib1Pdu);
5746 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : Paging Configuration ** \n");
5747 pageCfg = &sib1Cfg->pagingCfg;
5749 DU_LOG("Number of Paging Occassion %d\n", pageCfg->numPO);
5750 if (pageCfg->poPresent == true)
5751 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : TRUE\n");
5753 DU_LOG("FirstPDCCH-Monitoring Paging Occassion present : FALSE\n");
5755 for(pfIdx = 0; pfIdx < MAX_PO_PER_PF; pfIdx++)
5757 DU_LOG("Paging Occassion at Paging Frame [%d] : %d\n", pfIdx, pageCfg->pagingOcc[pfIdx]);
5760 pdcchConfigSib1 = &sib1Cfg->pdcchCfgSib1;
5761 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : SIB1 : PDCCH ** \n");
5762 DU_LOG("Coreset Zero Index %d\n", pdcchConfigSib1->coresetZeroIndex);
5763 DU_LOG("Search Space Zero Index %d\n", pdcchConfigSib1->searchSpaceZeroIndex);
5765 bwpDlCfg = &cellCfg->initialDlBwp;
5766 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP Configuration ** \n");
5768 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : BWP ** \n");
5769 bwp = &bwpDlCfg->bwp;
5770 DU_LOG("First PRB %d\n", bwp->firstPrb);
5771 DU_LOG("Number of PRBs %d\n", bwp->numPrb);
5772 DU_LOG("Subcarrier Spacing %d\n", bwp->scs);
5773 DU_LOG("Cyclic Perfix %d\n", bwp->cyclicPrefix);
5775 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common ** \n");
5776 pdcchCfgCmn = &bwpDlCfg->pdcchCommon;
5777 DU_LOG("RA Search Space ID %d\n", pdcchCfgCmn->raSearchSpaceId);
5779 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDCCH Config Common : Search Space ** \n");
5780 searchSpaceCfg = &pdcchCfgCmn->commonSearchSpace;
5781 DU_LOG("Search Space ID %d\n", searchSpaceCfg->searchSpaceId);
5782 DU_LOG("Coreset ID %d\n", searchSpaceCfg->coresetId);
5783 DU_LOG("Monitoring Slot %d\n", searchSpaceCfg->monitoringSlot);
5784 DU_LOG("Duration %d\n", searchSpaceCfg->duration);
5785 DU_LOG("Monitoring Symbol %x\n", searchSpaceCfg->monitoringSymbol);
5787 candidateInfo = &searchSpaceCfg->candidate;
5788 DU_LOG("Number of Candidates in Aggregation Level_1 %d\n", candidateInfo->aggLevel1);
5789 DU_LOG("Number of Candidates in Aggregation Level_2 %d\n", candidateInfo->aggLevel2);
5790 DU_LOG("Number of Candidates in Aggregation Level_4 %d\n", candidateInfo->aggLevel4);
5791 DU_LOG("Number of Candidates in Aggregation Level_8 %d\n", candidateInfo->aggLevel8);
5792 DU_LOG("Number of Candidates in Aggregation Level_16 %d\n", candidateInfo->aggLevel16);
5794 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : DL BWP : PDSCH Config Common ** \n");
5795 pdschCfgCmn = &bwpDlCfg->pdschCommon;
5796 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCmn->numTimeDomAlloc);
5798 for (rsrcIdx = 0; rsrcIdx < pdschCfgCmn->numTimeDomAlloc; rsrcIdx++)
5800 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
5801 pdschCmnTimeDomRsrcAlloc = &pdschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
5802 DU_LOG("\tK0 %d\n", pdschCmnTimeDomRsrcAlloc->k0);
5803 DU_LOG("\tPDSCH Mapping Type %d\n", pdschCmnTimeDomRsrcAlloc->mappingType);
5804 DU_LOG("\tPDSCH Start Symbol %d\n", pdschCmnTimeDomRsrcAlloc->startSymbol);
5805 DU_LOG("\tPDSCH Symbol Length %d\n", pdschCmnTimeDomRsrcAlloc->lengthSymbol);
5808 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP Configuration ** \n");
5809 bwpUlCfg = &cellCfg->initialUlBwp;
5811 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : BWP ** \n");
5812 DU_LOG("First PRB %d\n", bwpUlCfg->bwp.firstPrb);
5813 DU_LOG("Number of PRBs %d\n", bwpUlCfg->bwp.numPrb);
5814 DU_LOG("Subcarrier Spacing %d\n", bwpUlCfg->bwp.scs);
5815 DU_LOG("Cyclic Prefix %d\n", bwpUlCfg->bwp.cyclicPrefix);
5817 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUCCH Config Common ** \n");
5818 pucchCfgCmn = &bwpUlCfg->pucchCommon;
5819 DU_LOG("PUCCH Resource Common %d\n", pucchCfgCmn->pucchResourceCommon);
5820 DU_LOG("Group Hopping %d\n", pucchCfgCmn->pucchGroupHopping);
5822 DU_LOG("\n ** MAC Cell Configuration : Cell Configuration : UL BWP : PUSCH Config Common ** \n");
5823 puschCfgCmn = &bwpUlCfg ->puschCommon;
5824 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCmn->numTimeDomRsrcAlloc);
5825 for (rsrcIdx = 0; rsrcIdx < puschCfgCmn->numTimeDomRsrcAlloc; rsrcIdx++)
5827 DU_LOG("Time Domain Resource Allocation Idx %d\n", rsrcIdx);
5828 puschTimeDomRsrcAlloc = &puschCfgCmn->timeDomRsrcAllocList[rsrcIdx];
5829 DU_LOG("\tK2 %d\n", puschTimeDomRsrcAlloc->k2);
5830 DU_LOG("\tPUSCH Mapping Type %d\n", puschTimeDomRsrcAlloc->mappingType);
5831 DU_LOG("\tPUSCH Start Symbol %d\n", puschTimeDomRsrcAlloc->startSymbol);
5832 DU_LOG("\tPUSCH Symbol Length %d\n", puschTimeDomRsrcAlloc->symbolLength);
5833 DU_LOG("\tPUSCH Start Symbol And Length %d\n", puschTimeDomRsrcAlloc->startSymbolAndLength);
5836 DU_LOG("\n ** MAC Cell Configuration : SSB Configuration** \n");
5837 ssbCfg = &macCellCfg ->ssbCfg;
5838 DU_LOG("SSB PDCH Power %d\n", ssbCfg->ssbPbchPwr);
5839 DU_LOG("Subcarrier Spacing Common %d\n", ssbCfg->scsCmn);
5840 DU_LOG("SSB Offset from Point A %d\n", ssbCfg->ssbOffsetPointA);
5841 DU_LOG("SSB Periodicity in msec %d\n", ssbCfg->ssbPeriod);
5842 DU_LOG("SSB Subcarrier Offset %d\n", ssbCfg->ssbScOffset);
5843 for (ssbMaskIdx = 0; ssbMaskIdx < SSB_MASK_SIZE; ssbMaskIdx++)
5845 DU_LOG("SSB Mask[%d] :%d\n", ssbMaskIdx, ssbCfg->ssbMask[ssbMaskIdx]);
5847 DU_LOG("Beam ID %d\n", ssbCfg->beamId[0]);
5848 DU_LOG("BETA PSS %d\n", ssbCfg->betaPss);
5849 DU_LOG("BCH Payloag Flag %d\n", ssbCfg->bchPayloadFlag);
5850 DU_LOG("MIB PDU %d %d %d \n", ssbCfg->mibPdu[0], ssbCfg->mibPdu[1], ssbCfg->mibPdu[2]);
5851 DU_LOG("DMRS Type-A Position %d\n", ssbCfg->dmrsTypeAPos);
5853 DU_LOG("\n ** MAC Cell Configuration : CSI RS Configuration ** \n");
5854 csiRsCfg = &macCellCfg->csiRsCfg;
5855 DU_LOG("Frequency Domain Allocation %s\n", csiRsCfg->csiFreqDomainAlloc);
5856 DU_LOG("Number of Ports %d\n", csiRsCfg->csiNrofPorts);
5857 DU_LOG("First OFDM Symbol in Time Domain %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain);
5858 DU_LOG("First OFDM Symbol in Timer Domain 2 %d\n", csiRsCfg->csirsfirstOFDMSymbolInTimeDomain2);
5859 DU_LOG("CDM Type %d\n", csiRsCfg->csirscdmType);
5860 DU_LOG("Density %d\n", csiRsCfg->csirsdensity);
5861 DU_LOG("Density dot 5:%d\n", csiRsCfg->csirsdensitydot5);
5862 DU_LOG("Power Control Offset %d\n", csiRsCfg->powerControlOffset);
5863 DU_LOG("Power Control Offset Search Space %d\n", csiRsCfg->powerControlOffsetSS);
5864 DU_LOG("Periodicity And Offset %d\n", csiRsCfg->periodicityAndOffset);
5866 DU_LOG("\n ** MAC Cell Configuration : PRACH Configuration ** \n");
5867 prachCfg = &macCellCfg->prachCfg;
5868 DU_LOG("PRACH Sequence Length %d\n", prachCfg->prachSeqLen);
5869 DU_LOG("Subcarrier Spacing %d\n", prachCfg->prachSubcSpacing);
5870 DU_LOG("Number of PRACH FDM %d\n", prachCfg->msg1Fdm);
5871 DU_LOG("PRACH Configuration Index %d\n", prachCfg->prachCfgIdx);
5872 DU_LOG("PRACH Restricted Set Configuration %d\n", prachCfg->prachRstSetCfg);
5873 DU_LOG("Number of SSB per RACH occassion %d\n", prachCfg->ssbPerRach);
5874 DU_LOG("Number of RA preambles %d\n", prachCfg->totalNumRaPreamble);
5875 DU_LOG("Number of Contention Based Preamble per SSB %d\n", prachCfg->numCbPreamblePerSsb);
5876 DU_LOG("PRACH Frequeny Start Offset %d\n", prachCfg->msg1FreqStart);
5877 DU_LOG("RA Contention Resolution Timer %d\n", prachCfg->raContResTmr);
5878 DU_LOG("RSRP Threshold %d\n", prachCfg->rsrpThreshSsb);
5879 DU_LOG("RA Response Window %d\n", prachCfg->raRspWindow);
5880 for(fdmIdx = 0; fdmIdx < prachCfg->msg1Fdm; fdmIdx++)
5882 prachFdmInfo = &prachCfg->fdm[fdmIdx];
5883 DU_LOG("FDM[%d]\n", fdmIdx);
5884 DU_LOG("\tRoot Sequence Index %d\n", prachFdmInfo->rootSeqIdx);
5885 DU_LOG("\tNumber of Root Sequence %d\n", prachFdmInfo->numRootSeq);
5886 DU_LOG("\tK1 %d\n", prachFdmInfo->k1);
5887 DU_LOG("\tZero Correlation Zone Configuration %d\n", prachFdmInfo->zeroCorrZoneCfg);
5891 DU_LOG("\n ** MAC Cell Configuration : TDD Configuration ** \n");
5892 tddCfg = &macCellCfg->tddCfg;
5893 DU_LOG("TDD Slot Periodicity %d\n", tddCfg->tddPeriod);
5894 DU_LOG("Number of DL Slots %d\n", tddCfg->nrOfDlSlots);
5895 DU_LOG("Number of DL Symbols %d\n", tddCfg->nrOfDlSymbols);
5896 DU_LOG("Number of UL Slots %d\n", tddCfg->nrOfUlSlots);
5897 DU_LOG("Number of UL Symbols %d\n", tddCfg->nrOfUlSymbols);
5900 DU_LOG("\n ** MAC Cell Configuration : Precoding Configuration ** \n");
5901 precodCfg = &macCellCfg->precodingConf;
5902 DU_LOG("Number of Layers %d\n", precodCfg->numLayers);
5903 DU_LOG("Number of Antenna Ports %d\n", precodCfg->numAntPorts);
5905 DU_LOG("\n ** MAC Cell Config : BEAM FORMING CFG ** \n");
5906 beamFormingCfg = &macCellCfg ->beamCfg;
5907 DU_LOG("Number of Beams %d\n", beamFormingCfg->numOfBeams);
5908 DU_LOG("Number of Tx RUs %d\n", beamFormingCfg->numTxRUs);
5909 DU_LOG("Beam Index %d\n", beamFormingCfg->beamIdx);
5910 DU_LOG("Beam Type %d\n", beamFormingCfg->beamType);
5911 DU_LOG("Beam Azimuth %d\n", beamFormingCfg->beamAzimuth);
5912 DU_LOG("Beam Tilt %d\n", beamFormingCfg->beamTilt);
5913 DU_LOG("Beam Horizontal Width %d\n", beamFormingCfg->beamHorizWidth);
5914 DU_LOG("Beam Vertical Width %d\n", beamFormingCfg->beamVertWidth);
5915 DU_LOG("Coverage Shape %d\n", beamFormingCfg->coverageShape);
5916 DU_LOG("Digitak Tilt %d\n",beamFormingCfg ->digitalTilt);
5917 DU_LOG("Digital Azimuth %d\n", beamFormingCfg->digitalAzimuth);
5919 DU_LOG("\n ** SIB1 Configuration ** \n");
5920 sib1Params = &duCfgParam.sib1Params;
5921 DU_LOG("TAC %d\n", sib1Params->tac);
5922 DU_LOG("RANAC %ld\n", sib1Params->ranac);
5923 DU_LOG("Cell ID %d\n", sib1Params->cellIdentity);
5924 DU_LOG("Cell Reserved for Operational Use %ld\n", sib1Params->cellResvdForOpUse);
5925 DU_LOG("Connection Establishment Failure Count %ld\n", sib1Params->connEstFailCnt);
5926 DU_LOG("Connection Establishment Failure Offset Valid %ld\n", sib1Params->connEstFailOffValidity);
5927 DU_LOG("Connection Establishment Failure Offset %ld\n", sib1Params->connEstFailOffset);
5928 DU_LOG("PLMN : mcc[0] %d\n", sib1Params->plmn.mcc[0]);
5929 DU_LOG("PLMN : mcc[1] %d\n", sib1Params->plmn.mcc[1]);
5930 DU_LOG("PLMN : mcc[2] %d\n", sib1Params->plmn.mcc[2]);
5931 DU_LOG("PLMN : mnc[0] %d\n", sib1Params->plmn.mnc[0]);
5932 DU_LOG("PLMN : mnc[1] %d\n", sib1Params->plmn.mnc[1]);
5933 DU_LOG("PLMN : mnc[2] %d\n", sib1Params->plmn.mnc[2]);
5935 DU_LOG("\n ** SIB1 : SI Scheduling Info ** \n");
5936 siSchedInfo = &sib1Params ->siSchedInfo;
5937 DU_LOG("Windown Length %ld\n", siSchedInfo->winLen);
5938 DU_LOG("Broadcast Status %ld\n", siSchedInfo->broadcastSta);
5939 DU_LOG("Periodicity %ld\n", siSchedInfo->preiodicity);
5940 DU_LOG("SIB Type %ld\n", siSchedInfo->sibType);
5941 DU_LOG("SIB Value Tag %ld\n", siSchedInfo->sibValTag);
5943 DU_LOG("\n ** SIB1 : Serving Cell Configuration Common SIB ** \n");
5944 srvCellCfgCmnSib = &sib1Params->srvCellCfgCommSib;
5945 DU_LOG("Subcarrier Spacing %ld\n", srvCellCfgCmnSib->scs);
5946 DU_LOG("SSB Position in Burst %d\n", srvCellCfgCmnSib->ssbPosInBurst);
5947 DU_LOG("SSB Periodicity %ld\n", srvCellCfgCmnSib->ssbPrdServingCell);
5948 DU_LOG("SS PBCH Power %ld\n", srvCellCfgCmnSib->ssPbchBlockPwr);
5950 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common ** \n");
5951 dlCfgCmn = &srvCellCfgCmnSib->dlCfg;
5952 DU_LOG("Frequency Band Indicator %ld\n", dlCfgCmn->freqBandInd);
5953 DU_LOG("Offset to Point A %ld\n", dlCfgCmn->offsetToPointA);
5954 DU_LOG("Frequency Location And Bandwidth %ld\n", dlCfgCmn->locAndBw);
5955 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsOffset);
5956 DU_LOG("Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scs);
5957 DU_LOG("Bandwidth considering Subcarrier Spacing %ld\n", dlCfgCmn->dlScsCarrier.scsBw);
5959 DU_LOG("\n ** SIB1 : Serving Cell Config Common SIB : DL Config Common : PDCCH Config Common ** \n");
5960 pdcchCfgCommon = &dlCfgCmn->pdcchCfg;
5961 if(pdcchCfgCommon->present)
5963 DU_LOG("Control Resource Set Zero Index %ld\n", pdcchCfgCommon->ctrlRsrcSetZero);
5964 DU_LOG("Search Space Zero Index %ld\n", pdcchCfgCommon->searchSpcZero);
5965 DU_LOG("Search Space ID %ld\n", pdcchCfgCommon->searchSpcId);
5966 DU_LOG("Control Resource Set ID %ld\n", pdcchCfgCommon->ctrlRsrcSetId);
5967 DU_LOG("Monitoring Slot Periodicity and Offset Present %d\n", pdcchCfgCommon->monitorSlotPrdAndOffPresent);
5968 DU_LOG("Monitoring Slot Periodicity and Offset %ld\n", pdcchCfgCommon->monitorSlotPrdAndOff);
5969 for (monitoringSymbIdx = 0; monitoringSymbIdx < 2; monitoringSymbIdx++)
5971 DU_LOG("Monitoring Symbols in Slot [%d] %d\n",monitoringSymbIdx, pdcchCfgCommon->monitorSymbolsInSlot[monitoringSymbIdx]);
5973 DU_LOG("Number of Candidates for Aggregation Level_1 %ld\n", pdcchCfgCommon->numCandAggLvl1);
5974 DU_LOG("Number of Candidates for Aggregation Level_2 %ld\n", pdcchCfgCommon->numCandAggLvl2);
5975 DU_LOG("Number of Candidates for Aggregation Level_4 %ld\n", pdcchCfgCommon->numCandAggLvl4);
5976 DU_LOG("Number of Candidates for Aggregation Level_8 %ld\n", pdcchCfgCommon->numCandAggLvl8);
5977 DU_LOG("Number of Candidates for Aggregation Level_16 %ld\n", pdcchCfgCommon->numCandAggLvl16);
5978 DU_LOG("Seach Space Type %d\n", pdcchCfgCommon->searchSpcType);
5979 DU_LOG("Common Search Space DCI Format %d\n", pdcchCfgCommon->commSrchSpcDciFrmt);
5980 DU_LOG("SIB1 Search Space ID %ld\n", pdcchCfgCommon->searchSpcSib1);
5981 DU_LOG("Paging Search Space ID %ld\n", pdcchCfgCommon->pagingSearchSpc);
5982 DU_LOG("RA Search Space ID %ld\n", pdcchCfgCommon->raSearchSpc);
5986 DU_LOG("PDCCH Config Common not Present");
5989 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PDSCH Config Common ** \n");
5990 pdschCfgCommon = &dlCfgCmn->pdschCfg;
5991 DU_LOG("PDSCH Config Common Present %d\n", pdschCfgCommon->present);
5992 if(pdschCfgCommon->present)
5994 DU_LOG("Number of Time Domain Resource Allocation %d\n", pdschCfgCommon->numTimeDomRsrcAlloc);
5995 for (rsrcIdx = 0; rsrcIdx < pdschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
5997 pdschTimeDomRsrcAlloc = &pdschCfgCommon->timeDomAlloc[rsrcIdx];
5998 DU_LOG("PDSCH Timer Domain Resource Allocation [%d]", rsrcIdx);
5999 DU_LOG("K0 %ld\n", pdschTimeDomRsrcAlloc->k0);
6000 DU_LOG("MappingType %ld\n", pdschTimeDomRsrcAlloc->mapType);
6001 DU_LOG("SLIV %d\n", pdschTimeDomRsrcAlloc->sliv);
6006 DU_LOG("PDSCH Config Common not Present");
6009 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : BCCH Config Common ** \n");
6010 bcchCfg = &dlCfgCmn->bcchCfg;
6011 DU_LOG("Modification Period Coefficient %ld\n", bcchCfg->modPrdCoeff);
6013 DU_LOG("\n ** SIB1 : Serving Cell Config Common : DL Config Common : PCCH Config Common ** \n");
6014 pcchCfg = &dlCfgCmn->pcchCfg;
6015 DU_LOG("Default Paging Cycle %d\n", pcchCfg->dfltPagingCycle);
6016 DU_LOG("Number of PF in Paging Cycle %d\n", pcchCfg->nAndPagingFrmOffsetType);
6017 DU_LOG("PF Offset %d\n", pcchCfg->pageFrameOffset);
6018 DU_LOG("NS - Number of P0 in PF %d\n", pcchCfg->ns);
6019 DU_LOG("First PDCCH Monitoring Occassion of each P0 Type %d\n", pcchCfg->firstPDCCHMontioringType);
6020 for (poIdx = 0; poIdx < MAX_PO_PER_PF; poIdx++)
6022 DU_LOG("First PDCCH Monitoring Occassion in P0 [%d] %d\n", poIdx, pcchCfg->firstPDCCHMontioringInfo[poIdx]);
6025 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common ** \n");
6026 ulCfgCmn = &srvCellCfgCmnSib->ulCfg;
6027 DU_LOG("Frequency Band Indicator %ld\n", ulCfgCmn->freqBandInd);
6028 DU_LOG("Maximum Transmission Power %ld\n", ulCfgCmn->pMax);
6029 DU_LOG("Frequency Location and Bandwidth %ld\n", ulCfgCmn->locAndBw);
6030 DU_LOG("Time Alignment Timer %ld\n", ulCfgCmn->timeAlignTimerComm);
6031 DU_LOG("Offset to Point A considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsOffset);
6032 DU_LOG("Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scs);
6033 DU_LOG("Carrier BW considering Subcarrier Spacing %ld\n", ulCfgCmn->ulScsCarrier.scsBw);
6035 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : RACH Config Common ** \n");
6036 rachCfgCmn = &ulCfgCmn ->rachCfg;
6037 if(rachCfgCmn->present)
6039 DU_LOG("PRACH Configuration Index %ld\n", rachCfgCmn->prachCfgIdx);
6040 DU_LOG("Number of PRACH FDM %ld\n", rachCfgCmn->msg1Fdm);
6041 DU_LOG("PRACH Frequeny Start Offset %ld\n", rachCfgCmn->msg1FreqStart);
6042 DU_LOG("Zero Correaltion Zone Configuration %ld\n", rachCfgCmn->zeroCorrZoneCfg);
6043 DU_LOG("Target Power Level of Received Preamble %ld\n", rachCfgCmn->preambleRcvdTgtPwr);
6044 DU_LOG("Maximum number of Preamble Transmission %ld\n", rachCfgCmn->preambleTransMax);
6045 DU_LOG("Power Ramping Step %ld\n", rachCfgCmn->pwrRampingStep);
6046 DU_LOG("RA Response Window %ld\n", rachCfgCmn->raRspWindow);
6047 DU_LOG("Total Number of RA Preambles %ld\n", rachCfgCmn->numRaPreamble);
6048 DU_LOG("Number of SSB per RACH Occassion %ld\n", rachCfgCmn->numSsbPerRachOcc);
6049 DU_LOG("Number of Contention Based Preamble per SSB %ld\n", rachCfgCmn->numCbPreamblePerSsb);
6050 DU_LOG("Contention Resolution Timer %ld\n", rachCfgCmn->contResTimer);
6051 DU_LOG("RSRP Threshold %ld\n", rachCfgCmn->rsrpThreshSsb);
6052 DU_LOG("Root Sequence Index Present %d\n", rachCfgCmn->rootSeqIdxPresent);
6053 DU_LOG("Root Sequence Index %ld\n", rachCfgCmn->rootSeqIdx);
6054 DU_LOG("Subcarrier Spacing %ld\n", rachCfgCmn->msg1Scs);
6055 DU_LOG("Restricted Set Configuration %ld\n", rachCfgCmn->restrictedSetCfg);
6059 DU_LOG("RACH Config Common not present\n");
6062 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUSCH Config Common ** \n");
6063 puschCfgCommon = &ulCfgCmn ->puschCfg;
6064 if(puschCfgCommon->puschCfgPresent)
6066 DU_LOG("MSG3 Delta from RACH Preamble %ld\n", puschCfgCommon->msg3DeltaPreamble);
6067 DU_LOG("P0 Nominal With Grant %ld\n", puschCfgCommon->p0NominalWithGrant);
6068 DU_LOG("Number of Time Domain Resource Allocation %d\n", puschCfgCommon->numTimeDomRsrcAlloc);
6069 for(rsrcIdx = 0; rsrcIdx < puschCfgCommon->numTimeDomRsrcAlloc; rsrcIdx++)
6071 puschCmnTimeDomRsrsAlloc = &puschCfgCommon ->timeDomAllocList[rsrcIdx];
6072 DU_LOG("Time Domain Resource Alloc [%d]", rsrcIdx);
6073 DU_LOG("\tK2 %ld\n", puschCmnTimeDomRsrsAlloc->k2);
6074 DU_LOG("\tMapping Type %ld\n", puschCmnTimeDomRsrsAlloc->mapType);
6075 DU_LOG("\tSLIV %d\n", puschCmnTimeDomRsrsAlloc->sliv);
6080 DU_LOG("PUSCH Config Common not present\n");
6083 DU_LOG("\n ** SIB1 : Serving Cell Config Common : UL Config Common : PUCCH Config Common **\n");
6084 pucchCfgCommon = &ulCfgCmn->pucchCfg;
6085 if(pucchCfgCommon->present)
6087 DU_LOG("Resource Common %ld\n", pucchCfgCommon->rsrcComm);
6088 DU_LOG("Group Hopping %ld\n", pucchCfgCommon->grpHop);
6089 DU_LOG("P0 Nominal %ld\n", pucchCfgCommon->p0Nominal);
6093 DU_LOG("PUCCH Config Common not present\n");
6096 DU_LOG("\n ** SIB1 : Serving Cell Config Common : TDD UL DL Config Common ** \n");
6097 tddUlDlCfgCmn = &srvCellCfgCmnSib->tddCfg;
6098 DU_LOG("Reference Subcarrier Spacing %ld\n", tddUlDlCfgCmn->refScs);
6099 DU_LOG("Transmission Periodicity %ld\n", tddUlDlCfgCmn->txPrd);
6100 DU_LOG("Number of DL Slots %ld\n", tddUlDlCfgCmn->numDlSlots);
6101 DU_LOG("Number of DL Symbols %ld\n", tddUlDlCfgCmn->numDlSymbols);
6102 DU_LOG("Number of UL Slots %ld\n", tddUlDlCfgCmn->numUlSlots);
6103 DU_LOG("Number of UL Symbols %ld\n", tddUlDlCfgCmn->numUlSymbols);
6105 DU_LOG("\n ** MAC SLICE CONFIG REQUEST ** \n");
6106 macSliceCfg = &duCfgParam.tempSliceCfg;
6107 DU_LOG("Number of RRM Policy %d\n",macSliceCfg->numOfRrmPolicy);
6109 for(policyIdx = 0; policyIdx < macSliceCfg->numOfRrmPolicy; policyIdx++)
6111 rrmPolicy = macSliceCfg->listOfRrmPolicy[policyIdx];
6112 DU_LOG("RRM Policy [%d]\n", policyIdx);
6113 DU_LOG("\tResource Type %d\n", rrmPolicy->resourceType);
6115 rrmPolicyRatio = &rrmPolicy ->policyRatio;
6116 DU_LOG("\tPolicy Maximum Ratio %d\n", rrmPolicyRatio->maxRatio);
6117 DU_LOG("\tPolicy Minimum Ratio %d\n", rrmPolicyRatio->minRatio);
6118 DU_LOG("\tPolicy Deidcated Ration %d\n", rrmPolicyRatio->dedicatedRatio);
6119 DU_LOG("\tNumber of RRM Policy Member %d\n", rrmPolicy->numOfRrmPolicyMem);
6121 for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
6123 rrmPolicyMemberList = rrmPolicy->rRMPolicyMemberList[memIdx];
6124 DU_LOG("\tRRM Policy Member [%d]\n", memIdx);
6125 DU_LOG("\t\tPLMN : mcc[0] %d\n", rrmPolicyMemberList->plmn.mcc[0]);
6126 DU_LOG("\t\tPLMN : mcc[1] %d\n", rrmPolicyMemberList->plmn.mcc[1]);
6127 DU_LOG("\t\tPLMN : mcc[2] %d\n", rrmPolicyMemberList->plmn.mcc[2]);
6128 DU_LOG("\t\tPLMN : mnc[0] %d\n", rrmPolicyMemberList->plmn.mnc[0]);
6129 DU_LOG("\t\tPLMN : mnc[1] %d\n", rrmPolicyMemberList->plmn.mnc[1]);
6130 DU_LOG("\t\tPLMN : mnc[2] %d\n", rrmPolicyMemberList->plmn.mnc[2]);
6131 DU_LOG("\t\tSST %d\n",rrmPolicyMemberList->snssai.sst);
6132 DU_LOG("\t\tSD %d %d %d\n",rrmPolicyMemberList->snssai.sd[0],rrmPolicyMemberList->snssai.sd[1],rrmPolicyMemberList->snssai.sd[2]);
6136 DU_LOG("\n ** E2 configuration ** \n");
6137 e2apDb = &duCb.e2apDb;
6138 DU_LOG("E2 node id %lu\n", e2apDb->e2NodeId);
6139 DU_LOG("Number of RAN function %d\n", e2apDb->numOfRanFunction);
6140 for(ranFuncIdx=0; ranFuncIdx<e2apDb->numOfRanFunction; ranFuncIdx++)
6142 ranFunc = &e2apDb->ranFunction[ranFuncIdx];
6143 DU_LOG("RAN function id %d\n", ranFunc->id);
6144 DU_LOG("Short Name %s\n", ranFunc->name.shortName);
6145 DU_LOG("Service Model OID %s\n", ranFunc->name.serviceModelOID);
6146 DU_LOG("Description %s\n", ranFunc->name.description);
6148 DU_LOG("RevisionCounter %d\n",ranFunc->revisionCounter);
6149 DU_LOG("NUM of Event Trigger Style Supported %d\n",ranFunc->numOfEventTriggerStyleSupported);
6150 for(eventStyleIdx=0;eventStyleIdx<ranFunc->numOfEventTriggerStyleSupported; eventStyleIdx++)
6152 DU_LOG("Style Type %d\n",ranFunc->eventTriggerStyleList[eventStyleIdx].styleType);
6153 DU_LOG("Name %s\n",ranFunc->eventTriggerStyleList[eventStyleIdx].name);
6154 DU_LOG("Format type %d\n",ranFunc->eventTriggerStyleList[eventStyleIdx].formatType);
6157 DU_LOG("Num of Report Style Supported %d\n",ranFunc->numOfReportStyleSupported);
6158 for(reportStyleIdx=0;reportStyleIdx<ranFunc->numOfReportStyleSupported; reportStyleIdx++)
6160 DU_LOG("Style Type %d\n",ranFunc->reportStyleList[reportStyleIdx].reportStyle.styleType);
6161 DU_LOG("Name %s\n",ranFunc->reportStyleList[reportStyleIdx].reportStyle.name);
6162 DU_LOG("Format type %d\n",ranFunc->reportStyleList[reportStyleIdx].reportStyle.formatType);
6163 measurementInfoList = &ranFunc->reportStyleList[reportStyleIdx].measurementInfoList;
6164 if(measurementInfoList->count)
6166 CM_LLIST_FIRST_NODE(measurementInfoList, node);
6169 measurementInfoForAction = (MeasurementInfoForAction*) node->node;
6170 if(measurementInfoForAction)
6172 DU_LOG("Measurement Type Name %s\n",measurementInfoForAction->measurementTypeName);
6173 DU_LOG("Measurement Type Id %d\n",measurementInfoForAction->measurementTypeId);
6179 DU_LOG("Ric Indication header format %d\n",ranFunc->ricIndicationHeaderFormat);
6180 DU_LOG("Ric indication message format %d\n",ranFunc->ricIndicationMessageFormat);
6183 DU_LOG("Number of TNL association %d\n", e2apDb->numOfTNLAssoc);
6184 for(tnlIdx=0;tnlIdx<e2apDb->numOfTNLAssoc;tnlIdx++)
6186 DU_LOG("Local IPv4 Address present %u\n", e2apDb->tnlAssoc[tnlIdx].localIpAddress.ipV4Pres);
6187 DU_LOG("local IP Address %u\n", e2apDb->tnlAssoc[tnlIdx].localIpAddress.ipV4Addr);
6188 DU_LOG("Destination IPv4 Address present %u\n", e2apDb->tnlAssoc[tnlIdx].destIpAddress.ipV4Pres);
6189 DU_LOG("Destination IP Address %u\n", e2apDb->tnlAssoc[tnlIdx].destIpAddress.ipV4Addr);
6190 DU_LOG("Local port %d\n", e2apDb->tnlAssoc[tnlIdx].localPort);
6191 DU_LOG("Destination port %d\n", e2apDb->tnlAssoc[tnlIdx].destPort);
6192 DU_LOG("Tnl usage %d\n", e2apDb->tnlAssoc[tnlIdx].usage);
6196 /**********************************************************************
6198 **********************************************************************/