+ memcpy(sib1CellCfg->sib1Pdu, duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg, sib1CellCfg->sib1PduLen);
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill Aggregation Level Candidates Information
+ *
+ * @details
+ *
+ * Function : parseCandidateInfo
+ *
+ * Functionality: Fill Aggregation Level Candidates Information
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseCandidateInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CandidatesInfo *candInfo)
+{
+ memset(candInfo, 0, sizeof(CandidatesInfo));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL1")) && (cur->ns == ns))
+ {
+ candInfo->aggLevel1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL2")) && (cur->ns == ns))
+ {
+ candInfo->aggLevel2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL4")) && (cur->ns == ns))
+ {
+ candInfo->aggLevel4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL8")) && (cur->ns == ns))
+ {
+ candInfo->aggLevel8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"AGG_LEVEL16")) && (cur->ns == ns))
+ {
+ candInfo->aggLevel16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill Search Space Connfiguration
+ *
+ * @details
+ *
+ * Function : parseSearchSpaceCfg
+ *
+ * Functionality: Fill Search Space Configuration
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseSearchSpaceCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SearchSpaceCfg *searchSpaceCfg)
+{
+ memset(searchSpaceCfg, 0, sizeof(SearchSpaceCfg));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_1_INDEX")) && (cur->ns == ns))
+ {
+ searchSpaceCfg->searchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
+ {
+ searchSpaceCfg->coresetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SLOT_SL1")) && (cur->ns == ns))
+ {
+ searchSpaceCfg->monitoringSlot = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"DURATION")) && (cur->ns == ns))
+ {
+ searchSpaceCfg->duration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SS_MONITORING_SYMBOL")) && (cur->ns == ns))
+ {
+ searchSpaceCfg->monitoringSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CANDIDATE_INFO")) && (cur->ns == ns))
+ {
+ if(parseCandidateInfo(doc, ns, cur, &searchSpaceCfg->candidate) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill PDCCH Configuration Common
+ *
+ * @details
+ *
+ * Function : parsePdcchCfgCommon
+ *
+ * Functionality: Fill PDCCH Configuration Common
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parsePdcchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdcchConfigCommon *pdcchCfgCm)
+{
+ memset(pdcchCfgCm, 0, sizeof(PdcchConfigCommon));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_CFG")) && (cur->ns == ns))
+ {
+ if(parseSearchSpaceCfg(doc, ns, cur, &pdcchCfgCm->commonSearchSpace) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_SEARCH_SPACE_INDEX")) && (cur->ns == ns))
+ {
+ pdcchCfgCm->raSearchSpaceId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ cur = cur -> next;
+ }
+
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill PDSCH Common Time Domain Resource Allocation
+ *
+ * @details
+ *
+ * Function : parsePdschCmnTimeDomRsrcAlloc
+ *
+ * Functionality: Fill PDSCH Common Time Domain Resource Allocation
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parsePdschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,\
+ PdschCfgCommTimeDomRsrcAlloc *pdschTimeDomRsrcAlloc)
+{
+ memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschCfgCommTimeDomRsrcAlloc));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_K0_CFG")) && (cur->ns == ns))
+ {
+ pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_MAPPING_TYPE")) && (cur->ns == ns))
+ {
+ pdschTimeDomRsrcAlloc->mappingType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
+ {
+ pdschTimeDomRsrcAlloc->startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
+ {
+ pdschTimeDomRsrcAlloc->lengthSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill PDSCH Configuration Common
+ *
+ * @details
+ *
+ * Function : parsePdschConfigCommon
+ *
+ * Functionality: Fill PDSCH Configuration Common
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parsePdschConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdschConfigCommon *pdschCfgCmn)
+{
+ uint8_t idx = 0;
+ xmlNodePtr child = NULLP;
+
+ memset(pdschCfgCmn, 0, sizeof(PdschConfigCommon));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
+ {
+ pdschCfgCmn->numTimeDomAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC_LIST")) && (cur->ns == ns))
+ {
+ child = cur->xmlChildrenNode;
+ while(child != NULL)
+ {
+ if ((!xmlStrcmp(child->name, (const xmlChar *)"PDSCH_COMM_TIME_ALLOC")) && (child->ns == ns))
+ {
+ if(parsePdschCmnTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomRsrcAllocList[idx]) != ROK)
+ {
+ return RFAILED;
+ }
+ idx++;
+ }
+ child = child -> next;
+ }
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill DL BWP Configuration
+ *
+ * @details
+ *
+ * Function : parseBwpDLConfig
+ *
+ * Functionality: Fill DL BWP Configuration
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseBwpDLConfig(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,BwpDlConfig *bwpDlCfg)
+{
+ memset(bwpDlCfg, 0, sizeof(BwpDlConfig));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_PARAMS")) && (cur->ns == ns))
+ {
+ if(parseBwp(doc, ns, cur, &bwpDlCfg->bwp) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
+ {
+ if(parsePdcchCfgCommon(doc, ns, cur, &bwpDlCfg->pdcchCommon) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
+ {
+ if(parsePdschConfigCommon(doc, ns, cur, &bwpDlCfg->pdschCommon) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill Cell Configuration
+ *
+ * @details
+ *
+ * Function : parseCellCfg
+ *
+ * Functionality: Fill Cell Configuration
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,CellCfg *cellCfg)
+{
+ memset(cellCfg, 0, sizeof(CellCfg));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+#ifdef O1_ENABLE
+ cellCfg->opState = cellParams.operationalState;
+ cellCfg->adminState = cellParams.administrativeState;
+ cellCfg->cellState = cellParams.cellState;
+ cellCfg->phyCellId = cellParams.nRPCI;
+ cellCfg->tac = cellParams.nRTAC;
+ cellCfg->ssbFreq = cellParams.ssbFrequency;
+#else
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_OP_STATE")) && (cur->ns == ns))
+ {
+ cellCfg->opState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_ADMIN_STATE")) && (cur->ns == ns))
+ {
+ cellCfg->adminState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_STATE")) && (cur->ns == ns))
+ {
+ cellCfg->cellState = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_PCI")) && (cur->ns == ns))
+ {
+ cellCfg->phyCellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
+ {
+ cellCfg->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_FREQUENCY")) && (cur->ns == ns))
+ {
+ cellCfg->ssbFreq = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+#endif
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN_INFO")) && (cur->ns == ns))
+ {
+ if(parsePlmnInfo(doc, ns, cur, &cellCfg->plmnInfoList[0]) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
+ {
+ cellCfg->subCarrSpacing = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"DUPLEX_MODE")) && (cur->ns == ns))
+ {
+ cellCfg->dupType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_CELL_CFG")) && (cur->ns == ns))
+ {
+ if(parseSib1CellCfg(doc, ns, cur, &cellCfg->sib1Cfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_DL_CFG")) && (cur->ns == ns))
+ {
+ if(parseBwpDLConfig(doc, ns, cur, &cellCfg->initialDlBwp) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"BWP_UL_CFG")) && (cur->ns == ns))
+ {
+ if(parseBwpULConfig(doc, ns, cur, &cellCfg->initialUlBwp) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+#ifdef NR_TDD
+/*******************************************************************
+ *
+ * @brief Fill TDD slot configuration
+ *
+ * @details
+ *
+ * Function : parseTddCfg
+ *
+ * Functionality: Fill TDD slot configuration
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseTddCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TDDCfg *tddCfg)
+{
+ memset(tddCfg, 0, sizeof(TDDCfg));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_PERIODICITY")) && (cur->ns == ns))
+ {
+ tddCfg->tddPeriod = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
+ {
+ tddCfg->nrOfDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
+ {
+ tddCfg->nrOfDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
+ {
+ tddCfg->nrOfUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
+ {
+ tddCfg->nrOfUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+#endif
+
+/*******************************************************************
+ *
+ * @brief Fill MAC Cell Configuration
+ *
+ * @details
+ *
+ * Function : parseMacCellCfg
+ *
+ * Functionality: Fill MAC Cell Configuration
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseMacCellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacCellCfg *macCellCfg)
+{
+ memset(macCellCfg, 0, sizeof(MacCellCfg));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+#ifdef O1_ENABLE
+ macCellCfg->cellId = cellParams.cellLocalId;
+#else
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_ID")) && (cur->ns == ns))
+ {
+ macCellCfg->cellId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+#endif
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CARRIER_CFG")) && (cur->ns == ns))
+ {
+ if(parseCarrierCfg(doc, ns, cur, &macCellCfg->carrCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_CFG")) && (cur->ns == ns))
+ {
+ if(parseCellCfg(doc, ns, cur, &macCellCfg->cellCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_CFG")) && (cur->ns == ns))
+ {
+ if(parseSsbCfg(doc, ns, cur, &macCellCfg->ssbCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_CFG")) && (cur->ns == ns))
+ {
+ if(parseCsiRsCfg(doc, ns, cur, &macCellCfg->csiRsCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CFG")) && (cur->ns == ns))
+ {
+ if(parsePrachCfg(doc, ns, cur, &macCellCfg->prachCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+#ifdef NR_TDD
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_CFG")) && (cur->ns == ns))
+ {
+ if(parseTddCfg(doc, ns, cur, &macCellCfg->tddCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+#endif
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRE_CODE_CFG")) && (cur->ns == ns))
+ {
+ if(parsePrecodingConfig(doc, ns, cur, &macCellCfg->precodingConf) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEAM_FORM_CFG")) && (cur->ns == ns))
+ {
+ if(parseBeamformingConfig(doc, ns, cur, &macCellCfg->beamCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill PUSCH Configuration Common Time Domain
+ * Resource Allocation
+ *
+ * @details
+ *
+ * Function : parsePuschCmnTimeDomRsrcAlloc
+ *
+ * Functionality: Fill PUSCH Configuration Common Time Domain
+ * Resource Allocation
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parsePuschCmnTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCmnTimeDomAlloc *puschCmnTimeDomAlloc)
+{
+ uint16_t startSymbol;
+ uint16_t lenSymbol;
+
+ memset(puschCmnTimeDomAlloc, 0, sizeof(PuschCfgCmnTimeDomAlloc));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"K2")) && (cur->ns == ns))
+ {
+ puschCmnTimeDomAlloc->k2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
+ {
+ puschCmnTimeDomAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_START_SYMBOL")) && (cur->ns == ns))
+ {
+ startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
+ {
+ lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ cur = cur -> next;
+ }
+ puschCmnTimeDomAlloc->sliv = calcSliv(startSymbol, lenSymbol);
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill PUSCH Configuration Common
+ *
+ * @details
+ *
+ * Function : parsePuschCfgCommon
+ *
+ * Functionality: Fill PUSCH Configuration Common
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parsePuschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PuschCfgCommon *puschCfgCmn)
+{
+ uint8_t rsrcIdx = 0;
+ xmlNodePtr child = NULLP;
+
+ memset(puschCfgCmn, 0, sizeof(PuschCfgCommon));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_PRESENT")) && (cur->ns == ns))
+ {
+ puschCfgCmn->puschCfgPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_MSG3_DELTA_PREAMBLE")) && (cur->ns == ns))
+ {
+ puschCfgCmn->msg3DeltaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_P0_NOMINAL_WITH_GRANT")) && (cur->ns == ns))
+ {
+ puschCfgCmn->p0NominalWithGrant = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRC_ALLOC")) && (cur->ns == ns))
+ {
+ puschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
+ {
+ child = cur->xmlChildrenNode;
+ while (child != NULL)
+ {
+ if ((!xmlStrcmp(child->name, (const xmlChar *)"PUSCH_TIME_DOM_RSRC_ALLOC")) && (child->ns == ns))
+ {
+ if(parsePuschCmnTimeDomRsrcAlloc(doc, ns, child, &puschCfgCmn->timeDomAllocList[rsrcIdx]) != ROK)
+ {
+ return RFAILED;
+ }
+ rsrcIdx++;
+ }
+ child = child->next;
+ }
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill PUCCH Configuration Common
+ *
+ * @details
+ *
+ * Function : parsePucchCfgCommon
+ *
+ * Functionality: Fill PUCCH Configuration Common
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parsePucchCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PucchCfgCommon *pucchCfgCmn)
+{
+ memset(pucchCfgCmn, 0, sizeof(PucchCfgCommon));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
+ {
+ pucchCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_RSRC_COMMON")) && (cur->ns == ns))
+ {
+ pucchCfgCmn->rsrcComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"GRP_HOP")) && (cur->ns == ns))
+ {
+ pucchCfgCmn->grpHop = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_P0_NOMINAL")) && (cur->ns == ns))
+ {
+ pucchCfgCmn->p0Nominal = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill RACH Configuration Common
+ *
+ * @details
+ *
+ * Function : parseRachCfgCommon
+ *
+ * Functionality: Fill RACH Configuration Common
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseRachCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RachCfgCommon *rachCfgCmn)
+{
+ long maxNumRb;
+ long prachMaxPrb;
+
+ memset(rachCfgCmn, 0, sizeof(RachCfgCommon));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
+ {
+ rachCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_CONFIG_IDX")) && (cur->ns == ns))
+ {
+ rachCfgCmn->prachCfgIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MSG_1_FDM")) && (cur->ns == ns))
+ {
+ rachCfgCmn->msg1Fdm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_RB")) && (cur->ns == ns))
+ {
+ maxNumRb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_MAX_PRB")) && (cur->ns == ns))
+ {
+ prachMaxPrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"ZERO_CORRELATION_ZONE_CFG")) && (cur->ns == ns))
+ {
+ rachCfgCmn->zeroCorrZoneCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_PREAMBLE_RCVD_TGT_PWR")) && (cur->ns == ns))
+ {
+ rachCfgCmn->preambleRcvdTgtPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PREAMBLE_TRANS_MAX")) && (cur->ns == ns))
+ {
+ rachCfgCmn->preambleTransMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PWR_RAMPING_STEP")) && (cur->ns == ns))
+ {
+ rachCfgCmn->pwrRampingStep = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RA_RSP_WINDOW")) && (cur->ns == ns))
+ {
+ rachCfgCmn->raRspWindow = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RA_PREAMBLE")) && (cur->ns == ns))
+ {
+ rachCfgCmn->numRaPreamble = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_SSB_PER_RACH_OCC")) && (cur->ns == ns))
+ {
+ rachCfgCmn->numSsbPerRachOcc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CB_PREAMBLE_PER_SSB")) && (cur->ns == ns))
+ {
+ rachCfgCmn->numCbPreamblePerSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONT_RES_TIMER")) && (cur->ns == ns))
+ {
+ rachCfgCmn->contResTimer = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RSRP_THRESHOLD_SSB")) && (cur->ns == ns))
+ {
+ rachCfgCmn->rsrpThreshSsb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX_PRESENT")) && (cur->ns == ns))
+ {
+ rachCfgCmn->rootSeqIdxPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOT_SEQ_IDX")) && (cur->ns == ns))
+ {
+ rachCfgCmn->rootSeqIdx = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_SUBCARRIER_SPACING")) && (cur->ns == ns))
+ {
+ rachCfgCmn->msg1Scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRACH_RESTRICTED_SET_CFG")) && (cur->ns== ns))
+ {
+ rachCfgCmn->restrictedSetCfg = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ cur = cur -> next;
+ }
+
+ rachCfgCmn->msg1FreqStart = ((maxNumRb) - (prachMaxPrb));
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill SCS Specific Carrier
+ *
+ * @details
+ *
+ * Function : parseScsSpecCarrier
+ *
+ * Functionality: Fill SCS Specific Carrier
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseScsSpecCarrier(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ScsSpecCarrier *scsSpecCrr)
+{
+ memset(scsSpecCrr, 0, sizeof(ScsSpecCarrier));
+
+#ifdef O1_ENABLE
+ scsSpecCrr->scsOffset = cellParams.ssbOffset;
+ scsSpecCrr->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
+ scsSpecCrr->scsBw = cellParams.bSChannelBwUL;
+#else
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_SUBCARRIER_OFFSET")) && (cur->ns == ns))
+ {
+ scsSpecCrr->scsOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
+ {
+ scsSpecCrr->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_BW")) && (cur->ns == ns))
+ {
+ scsSpecCrr->scsBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ cur = cur -> next;
+ }
+#endif
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill UL Config Common
+ *
+ * @details
+ *
+ * Function : parseUlCfgCommon
+ *
+ * Functionality: Fill UL Config Common
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseUlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,UlCfgCommon *ulCfgCmn)
+{
+ memset(ulCfgCmn, 0, sizeof(UlCfgCommon));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
+ {
+ ulCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_P_MAX")) && (cur->ns == ns))
+ {
+ ulCfgCmn->pMax = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
+ {
+ ulCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIME_ALLIGN_TIMER_COMM")) && (cur->ns == ns))
+ {
+ ulCfgCmn->timeAlignTimerComm = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
+ {
+ if(parseScsSpecCarrier(doc, ns, cur, &ulCfgCmn->ulScsCarrier) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RACH_CFG_COMMON")) && (cur->ns == ns))
+ {
+ if(parseRachCfgCommon(doc, ns, cur, &ulCfgCmn->rachCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUSCH_CFG_COMMON")) && (cur->ns == ns))
+ {
+ if(parsePuschCfgCommon(doc, ns, cur, &ulCfgCmn->puschCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_CFG_COMMON")) && (cur->ns == ns))
+ {
+ if(parsePucchCfgCommon(doc, ns, cur, &ulCfgCmn->pucchCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill TDD UL DL Configuration Common
+ *
+ * @details
+ *
+ * Function : parseTddUlDlCfgCommon
+ *
+ * Functionality: Fill TDD UL DL Configuration Common
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseTddUlDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TddUlDlCfgCommon *tddUlDlCfgCmn)
+{
+ memset(tddUlDlCfgCmn, 0, sizeof(TddUlDlCfgCommon));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"REF_SCS")) && (cur->ns == ns))
+ {
+ tddUlDlCfgCmn->refScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"TX_PRD")) && (cur->ns == ns))
+ {
+ tddUlDlCfgCmn->txPrd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SLOTS")) && (cur->ns == ns))
+ {
+ tddUlDlCfgCmn->numDlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_DL_SYMBOLS")) && (cur->ns == ns))
+ {
+ tddUlDlCfgCmn->numDlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SLOTS")) && (cur->ns == ns))
+ {
+ tddUlDlCfgCmn->numUlSlots = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_UL_SYMBOLS")) && (cur->ns == ns))
+ {
+ tddUlDlCfgCmn->numUlSymbols = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill PCCH Configuration
+ *
+ * @details
+ *
+ * Function : parsePcchCfg
+ *
+ * Functionality: Fill PCCH Configuration
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parsePcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PcchCfg *pcchCfg)
+{
+ xmlNodePtr child = NULLP;
+ uint8_t idx = 0;
+
+ memset(pcchCfg, 0, sizeof(PcchCfg));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEFAULT_PAGING_CYCLE")) && (cur->ns == ns))
+ {
+ pcchCfg->dfltPagingCycle = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAND_PAGING_FRAME_OFFSET")) && (cur->ns == ns))
+ {
+ pcchCfg->nAndPagingFrmOffsetType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PAGE_FRAME_OFFSET")) && (cur->ns == ns))
+ {
+ pcchCfg->pageFrameOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NS")) && (cur->ns == ns))
+ {
+ pcchCfg->ns = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_TYPE")) && (cur->ns == ns))
+ {
+ pcchCfg->firstPDCCHMontioringType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"FIRST_PDCCH_LIST")) && (cur->ns == ns))
+ {
+ child = cur->xmlChildrenNode;
+ while (child != NULL)
+ {
+ if ((!xmlStrcmp(child->name, (const xmlChar *)"FIRST_PDCCH_MONITORING_INFO")) && (child->ns == ns))
+ {
+ pcchCfg->firstPDCCHMontioringInfo[idx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
+ idx++;
+ }
+ child = child->next;
+ }
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill PDSCH Time Domain Resource Allocation
+ *
+ * @details
+ *
+ * Function : parsePdschTimeDomRsrcAlloc
+ *
+ * Functionality: Fill PDSCH Time Domain Resource Allocation
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parsePdschTimeDomRsrcAlloc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschTimeDomainRsrcAlloc *pdschTimeDomRsrcAlloc)
+{
+ uint16_t startSymbol;
+ uint16_t lenSymbol;
+
+ memset(pdschTimeDomRsrcAlloc, 0, sizeof(PdschTimeDomainRsrcAlloc));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"K0")) && (cur->ns == ns))
+ {
+ pdschTimeDomRsrcAlloc->k0 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAP_TYPE")) && (cur->ns == ns))
+ {
+ pdschTimeDomRsrcAlloc->mapType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_START_SYMBOL")) && (cur->ns == ns))
+ {
+ startSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_LENGTH_SYMBOL")) && (cur->ns == ns))
+ {
+ lenSymbol = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ cur = cur -> next;
+ }
+ pdschTimeDomRsrcAlloc->sliv = calcSliv(startSymbol, lenSymbol);
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill PDSCH Configuration Common
+ *
+ * @details
+ *
+ * Function : parsePdschCfgCommon
+ *
+ * Functionality: Fill PDSCH Configuration Common
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parsePdschCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,PdschCfgCommon *pdschCfgCmn)
+{
+ uint8_t idx = 0;
+ xmlNodePtr child = NULLP;
+
+ memset(pdschCfgCmn, 0, sizeof(PdschCfgCommon));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
+ {
+ pdschCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_TIME_DOM_RSRS_ALLOC")) && (cur->ns == ns))
+ {
+ pdschCfgCmn->numTimeDomRsrcAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC_LIST")) && (cur->ns == ns))
+ {
+ child = cur->xmlChildrenNode;
+ while (child != NULL)
+ {
+ if ((!xmlStrcmp(child->name, (const xmlChar *)"PDSCH_TIME_DOM_RSRC_ALLOC")) && (child->ns == ns))
+ {
+ if(parsePdschTimeDomRsrcAlloc(doc, ns, child, &pdschCfgCmn->timeDomAlloc[idx]) != ROK)
+ {
+ return RFAILED;
+ }
+ idx++;
+ }
+ child = child->next;
+ }
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill BCCH Configuration
+ *
+ * @details
+ *
+ * Function : parseBcchCfg
+ *
+ * Functionality: Fill BCCH Configuration
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseBcchCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, BcchCfg *bcchCfg)
+{
+ memset(bcchCfg, 0, sizeof(BcchCfg));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MOB_PRD_COEFF")) && (cur->ns == ns))
+ {
+ bcchCfg->modPrdCoeff = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill PDCCH Configuration Common
+ *
+ * @details
+ *
+ * Function : parsePdcchConfigCommon
+ *
+ * Functionality: Fill PDCCH Configuration Common
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parsePdcchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, PdcchCfgCommon *pdccgCfgCmn)
+{
+ uint8_t idx = 0;
+ xmlNodePtr child = NULLP;
+
+ memset(pdccgCfgCmn, 0, sizeof( PdcchCfgCommon));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PRESENT")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->present = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CORESET_0_INDEX")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->ctrlRsrcSetZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCHSPACE_0_INDEX")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->searchSpcZero = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->searchSpcId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CTRL_RSRC_SET_ID")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->ctrlRsrcSetId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_SLOT_PERIOD_OFFSET_PRESENT")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->monitorSlotPrdAndOffPresent = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MONITOR_LIST")) && (cur->ns == ns))
+ {
+ child = cur->xmlChildrenNode;
+ while (child)
+ {
+ if ((!xmlStrcmp(child->name, (const xmlChar *)"MONITOR_SYMBOL_IN_SLOT")) && (child->ns == ns))
+ {
+ pdccgCfgCmn->monitorSymbolsInSlot[idx] = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
+ idx++;
+ }
+ child = child->next;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_1")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->numCandAggLvl1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_2")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->numCandAggLvl2 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_4")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->numCandAggLvl4 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_8")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->numCandAggLvl8 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_CANDIDATE_AGG_LVL_16")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->numCandAggLvl16 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEARCH_SPACE_TYPE")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->searchSpcType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_DCI_FORMAT")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->commSrchSpcDciFrmt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_SIB1")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->searchSpcSib1 = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_PAGING")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->pagingSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_SEARCH_SPACE_ID_RA")) && (cur->ns == ns))
+ {
+ pdccgCfgCmn->raSearchSpc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill DL Configuration Common
+ *
+ * @details
+ *
+ * Function : parseDlCfgCommon
+ *
+ * Functionality: Fill DL Configuration Common
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseDlCfgCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,DlCfgCommon *dlCfgCmn)
+{
+ memset(dlCfgCmn, 0, sizeof(DlCfgCommon));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_FREQ_BAND")) && (cur->ns == ns))
+ {
+ dlCfgCmn->freqBandInd = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"OFFSET_TO_POINT_A")) && (cur->ns == ns))
+ {
+ dlCfgCmn->offsetToPointA = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"FREQ_LOC_BW")) && (cur->ns == ns))
+ {
+ dlCfgCmn->locAndBw = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCS_SPEC_CARRIER")) && (cur->ns == ns))
+ {
+ if(parseScsSpecCarrier(doc, ns, cur, &dlCfgCmn->dlScsCarrier) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDCCH_CFG_COMMON")) && (cur->ns == ns))
+ {
+ if(parsePdcchConfigCommon(doc, ns, cur, &dlCfgCmn->pdcchCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PDSCH_CFG_COMMON")) && (cur->ns == ns))
+ {
+ if(parsePdschCfgCommon(doc, ns, cur, &dlCfgCmn->pdschCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"BCCH_CFG")) && (cur->ns == ns))
+ {
+ if(parseBcchCfg(doc, ns, cur, &dlCfgCmn->bcchCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PCCH_CFG")) && (cur->ns == ns))
+ {
+ if(parsePcchCfg(doc, ns, cur, &dlCfgCmn->pcchCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+/*******************************************************************
+ *
+ * @brief Fill Serving Cell Config Common SIB
+ *
+ * @details
+ *
+ * Function : parseSrvCellCfgCmnSib
+ *
+ * Functionality: Fill Serving Cell Config Common SIB
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseSrvCellCfgCmnSib(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SrvCellCfgCommSib *srvCellCfgCmnSib)
+{
+ memset(srvCellCfgCmnSib, 0, sizeof(SrvCellCfgCommSib));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+#ifdef O1_ENABLE
+ srvCellCfgCmnSib->scs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
+#else
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_SCS")) && (cur->ns == ns))
+ {
+ srvCellCfgCmnSib->scs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+#endif
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_POS_INBURST")) && (cur->ns == ns))
+ {
+ srvCellCfgCmnSib->ssbPosInBurst = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PERIODICITY")) && (cur->ns == ns))
+ {
+ srvCellCfgCmnSib->ssbPrdServingCell = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SSB_PBCH_PWR")) && (cur->ns == ns))
+ {
+ srvCellCfgCmnSib->ssPbchBlockPwr = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"DL_CFG_COMMON")) && (cur->ns == ns))
+ {
+ if(parseDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->dlCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"UL_CFG_COMMON")) && (cur->ns == ns))
+ {
+ if(parseUlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->ulCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"TDD_UL_DL_CFG_COMMON")) && (cur->ns == ns))
+ {
+ if(parseTddUlDlCfgCommon(doc, ns, cur, &srvCellCfgCmnSib->tddCfg) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill SI Scheduling Information
+ *
+ * @details
+ *
+ * Function : parseSiSchedInfo
+ *
+ * Functionality: Fill SI Scheduling Information
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseSiSchedInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,SiSchedInfo *siSchedInfo)
+{
+ memset(siSchedInfo, 0, sizeof(SiSchedInfo));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"WIN_LEN")) && (cur->ns == ns))
+ {
+ siSchedInfo->winLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"BROADCAST_STATUS")) && (cur->ns == ns))
+ {
+ siSchedInfo->broadcastSta = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PERIODICITY")) && (cur->ns == ns))
+ {
+ siSchedInfo->preiodicity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB_TYPE")) && (cur->ns == ns))
+ {
+ siSchedInfo->sibType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SIB1_VALUE_TAG")) && (cur->ns == ns))
+ {
+ siSchedInfo->sibValTag = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill SIB1 Parameters
+ *
+ * @details
+ *
+ * Function : parseSib1Params
+ *
+ * Functionality: Fill SIB1 Parameters
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseSib1Params(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,Sib1Params *sib1Params)
+{
+ memset(sib1Params, 0, sizeof(Sib1Params));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+#ifdef O1_ENABLE
+ sib1Params-> tac = cellParams.nRTAC;
+ sib1Params->cellIdentity = CELL_IDENTITY * cellParams.cellLocalId;
+ DU_LOG("\nDEBUG --> DU_APP: parseSib1Params(): OAM CellLocalId=%d", sib1Params->cellIdentity);
+#else
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
+ {
+ sib1Params-> tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_IDENTITY")) && (cur->ns == ns))
+ {
+ sib1Params->cellIdentity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+#endif
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
+ {
+ if(parsePlmn(doc, ns, cur, &sib1Params->plmn) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RANAC")) && (cur->ns == ns))
+ {
+ sib1Params->ranac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CELL_RESVD_OPUSE")) && (cur->ns == ns))
+ {
+ sib1Params->cellResvdForOpUse = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_CNT")) && (cur->ns == ns))
+ {
+ sib1Params->connEstFailCnt = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFF_VALID")) && (cur->ns == ns))
+ {
+ sib1Params->connEstFailOffValidity = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"CONN_EST_FAIL_OFFSET")) && (cur->ns == ns))
+ {
+ sib1Params->connEstFailOffset = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SI_SHED_INFO")) && (cur->ns == ns))
+ {
+ if(parseSiSchedInfo(doc, ns, cur, &sib1Params->siSchedInfo) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SRV_CELL_CFG_COM_SIB")) && (cur->ns == ns))
+ {
+ if(parseSrvCellCfgCmnSib(doc, ns, cur, &sib1Params->srvCellCfgCommSib) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+#ifndef O1_ENABLE
+/*******************************************************************
+ *
+ * @brief Fill RRM Policy List
+ *
+ * @details
+ *
+ * Function : parseRrmPolicyList
+ *
+ * Functionality: Fill RRM Policy List
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseRrmPolicyList(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,RrmPolicyMemberList *rrmPolicyMemberList)
+{
+ memset(rrmPolicyMemberList, 0, sizeof(RrmPolicyMemberList));
+ cur = cur->xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PLMN")) && (cur->ns == ns))
+ {
+ if(parsePlmn(doc, ns, cur, &rrmPolicyMemberList->plmn) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SNSSAI")) && (cur->ns == ns))
+ {
+ if(parseSnssai(doc, ns, cur, &rrmPolicyMemberList->snssai) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill RRM Policy Ratio
+ *
+ * @details
+ *
+ * Function : parseRrmPolicyRatio
+ *
+ * Functionality: Fill RRM Policy Ratio
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseRrmPolicyRatio(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RrmPolicyRatio *rrmPolicyRatio)
+{
+ memset(rrmPolicyRatio, 0, sizeof(RrmPolicyRatio));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_RATIO")) && (cur->ns == ns))
+ {
+ rrmPolicyRatio->maxRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIN_RATIO")) && (cur->ns == ns))
+ {
+ rrmPolicyRatio->minRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"DEDICATED_RATIO")) && (cur->ns == ns))
+ {
+ rrmPolicyRatio->dedicatedRatio = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill MAC Slice RRM Policy
+ *
+ * @details
+ *
+ * Function : parseMacSliceRrmPolicy
+ *
+ * Functionality: Fill MAC Slice RRM Policy
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseMacSliceRrmPolicy(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MacSliceRrmPolicy *rrmPolicy)
+{
+ uint8_t memIdx = 0;
+
+ memset(rrmPolicy, 0, sizeof(MacSliceRrmPolicy));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RESOURCE_TYPE")) && (cur->ns == ns))
+ {
+ rrmPolicy->resourceType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRM_POLICY_MEMBER")) && (cur->ns == ns))
+ {
+ rrmPolicy->numOfRrmPolicyMem = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_MEMBER_LIST")) && (cur->ns == ns))
+ {
+ DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList,\
+ rrmPolicy->numOfRrmPolicyMem * sizeof(RrmPolicyMemberList*));
+
+ if(!rrmPolicy->rRMPolicyMemberList)
+ {
+ DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
+ return RFAILED;
+ }
+
+ for(memIdx = 0; memIdx < rrmPolicy->numOfRrmPolicyMem; memIdx++)
+ {
+ DU_ALLOC_SHRABL_BUF(rrmPolicy->rRMPolicyMemberList[memIdx], sizeof(RrmPolicyMemberList));
+ if (rrmPolicy->rRMPolicyMemberList[memIdx] == NULLP)
+ {
+ DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
+ return RFAILED;
+ }
+
+ if(parseRrmPolicyList(doc, ns, cur, rrmPolicy->rRMPolicyMemberList[memIdx]) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RRM_POLICY_RATIO")) && (cur->ns == ns))
+ {
+ if(parseRrmPolicyRatio(doc, ns, cur, &rrmPolicy->policyRatio) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill MAC Slice Configuration
+ *
+ * @details
+ *
+ * Function : parseMacSliceCfgReq
+ *
+ * Functionality: Fill MAC Slice Configuration
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseMacSliceCfgReq(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacSliceCfgReq *macSliceCfgReq)
+{
+ uint8_t policyIdx = 0;
+ memset(macSliceCfgReq, 0, sizeof(MacSliceCfgReq));
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_RRM_POLICY")) && (cur->ns == ns))
+ {
+ macSliceCfgReq->numOfRrmPolicy = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_SLICE_RRM_POLICY")) && (cur->ns == ns))
+ {
+ DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy, macSliceCfgReq->numOfRrmPolicy * sizeof(MacSliceRrmPolicy*));
+ if(!macSliceCfgReq->listOfRrmPolicy)
+ {
+ DU_LOG("\nERROR --> DU APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
+ return RFAILED;
+ }
+
+ for(policyIdx = 0; policyIdx < macSliceCfgReq->numOfRrmPolicy; policyIdx++)
+ {
+ DU_ALLOC_SHRABL_BUF(macSliceCfgReq->listOfRrmPolicy[policyIdx], sizeof(MacSliceRrmPolicy));
+ if (macSliceCfgReq->listOfRrmPolicy[policyIdx] == NULLP)
+ {
+ DU_LOG("\nERROR --> DU_APP: %s: Memory allocation failed at line %d", __func__, __LINE__);
+ }
+
+ if(parseMacSliceRrmPolicy(doc, ns, cur, macSliceCfgReq->listOfRrmPolicy[policyIdx]) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+#endif
+
+#ifdef THREAD_AFFINITY
+/*******************************************************************
+ *
+ * @brief Set thread affinity to the core configured via XML file
+ *
+ * @details
+ *
+ * Function : parseThreadAffinity
+ *
+ * Functionality: Set thread affinity to the core configured
+ * via XML file
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Thread information
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseThreadAffinity(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ThreadInfo *threads)
+{
+ cur = cur -> xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_APP_CORE")) && (cur->ns == ns))
+ {
+ threads->duAppCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ ODU_SET_THREAD_AFFINITY(&threads->duAppSTskId, SS_AFFINITY_MODE_EXCL, threads->duAppCoreId, 0);
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP_CORE")) && (cur->ns == ns))
+ {
+ threads->egtpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ ODU_SET_THREAD_AFFINITY(&threads->egtpSTskId, SS_AFFINITY_MODE_EXCL, threads->egtpCoreId, 0);
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_MAC_CORE")) && (cur->ns == ns))
+ {
+ threads->rlcMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ ODU_SET_THREAD_AFFINITY(&threads->rlcMacSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcMacCoreId, 0);
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_UL_CORE")) && (cur->ns == ns))
+ {
+ threads->rlcUlCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ ODU_SET_THREAD_AFFINITY(&threads->rlcUlSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcUlCoreId, 0);
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_CORE")) && (cur->ns == ns))
+ {
+ threads->schCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ ODU_SET_THREAD_AFFINITY(&threads->schSTskId, SS_AFFINITY_MODE_EXCL, threads->schCoreId, 0);
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP_CORE")) && (cur->ns == ns))
+ {
+ threads->sctpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ ODU_SET_THREAD_AFFINITY(&threads->sctpSTskId, SS_AFFINITY_MODE_EXCL, threads->sctpCoreId, 0);
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOWER_MAC_CORE")) && (cur->ns == ns))
+ {
+ threads->lwrMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ ODU_SET_THREAD_AFFINITY(&threads->lwrMacSTskId, SS_AFFINITY_MODE_EXCL, threads->lwrMacCoreId, 0);
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+#endif
+
+/*******************************************************************
+ *
+ * @brief Fill tmrTqCp
+ *
+ * @details
+ *
+ * Function : parseTmrTqCp
+ *
+ * Functionality: Fill tmrTqCp
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseTmrTqCp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmTqCp *tmrTqCp)
+{
+ memset(tmrTqCp, 0, sizeof(CmTqCp));
+ cur = cur ->xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_LEN")) && (cur->ns == ns))
+ {
+ tmrTqCp->tmrLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill DU timer Parameters
+ *
+ * @details
+ *
+ * Function : parseDuTimerParams
+ *
+ * Functionality: Fill DU timer Parmeters
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseDuTimerParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, DuTimers *duTimers)
+{
+ memset(duTimers, 0, sizeof(DuTimers));
+
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_TQ_CP")) && (cur->ns == ns))
+ {
+ if(parseTmrTqCp(doc, ns, cur, &duTimers->tmrTqCp) != ROK)
+ {
+ return RFAILED;
+ }
+ else
+ {
+ /* Initialzie the timer queue */
+ memset(&(duTimers->tmrTq), 0, sizeof(CmTqType) * duTimers->tmrTqCp.tmrLen);
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_RESOLUTION")) && (cur->ns == ns))
+ {
+ duTimers->tmrRes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill TNL assoc
+ *
+ * @details
+ *
+ * Function : parseTnlAssoc
+ *
+ * Functionality: Fill TNL assoc
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseTnlAssoc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TNLAssociation *tnlAssoc)
+{
+ char *duIpV4Addr;
+ char *ricIpV4Addr;
+ CmInetIpAddr duIp;
+ CmInetIpAddr ricIp;
+
+ memset(tnlAssoc, 0, sizeof(TNLAssociation));
+ cur = cur ->xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_IP")) && (cur->ns == ns))
+ {
+ duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ cmInetAddr(duIpV4Addr, &(duIp));
+ tnlAssoc->localIpAddress.ipV4Pres = true;
+ tnlAssoc->localIpAddress.ipV4Addr = duIp;
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_PORT")) && (cur->ns == ns))
+ {
+ tnlAssoc->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_IP")) && (cur->ns == ns))
+ {
+ ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ cmInetAddr(ricIpV4Addr, &(ricIp));
+ tnlAssoc->destIpAddress.ipV4Pres = true;
+ tnlAssoc->destIpAddress.ipV4Addr = ricIp;
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_PORT")) && (cur->ns == ns))
+ {
+ tnlAssoc->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"ASSOC_USAGE")) && (cur->ns == ns))
+ {
+ tnlAssoc->usage = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill ric style parmeters
+ *
+ * @details
+ *
+ * Function : parseRicStyle
+ *
+ * Functionality: Fill ric style parmeters
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseRicStyle(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RicStyle *ricStyle)
+{
+ char *tempName;
+ memset(ricStyle, 0, sizeof(RicStyle));
+
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"STYLE_TYPE")) && (cur->ns == ns))
+ {
+ ricStyle->styleType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAME")) && (cur->ns == ns))
+ {
+ tempName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ strcpy((char*)ricStyle->name, tempName);
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"FORMAT_TYPE")) && (cur->ns == ns))
+ {
+ ricStyle->formatType = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill measurement info parameters
+ *
+ * @details
+ *
+ * Function : parseMeasurementInfo
+ *
+ * Functionality: Fill measurement info parmeters
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseMeasurementInfo(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmLListCp *measurementInfoList)
+{
+ CmLList *node;
+ char *tempName;
+ MeasurementInfoForAction *measurementInfoForAction;
+
+ DU_ALLOC(measurementInfoForAction, sizeof(MeasurementInfoForAction));
+ if(!measurementInfoForAction)
+ {
+ return RFAILED;
+ }
+
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"ID")) && (cur->ns == ns))
+ {
+ measurementInfoForAction->measurementTypeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAME")) && (cur->ns == ns))
+ {
+ tempName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ strcpy((char*)measurementInfoForAction->measurementTypeName, tempName);
+ }
+
+ cur = cur -> next;
+ }
+
+ DU_ALLOC(node, sizeof(CmLList));
+ if(node)
+ {
+ node->node = (PTR) measurementInfoForAction;
+ cmLListAdd2Tail(measurementInfoList, node);
+ }
+ else
+ {
+ DU_FREE(measurementInfoForAction, sizeof(MeasurementInfoForAction));
+ return RFAILED;
+ }
+
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill report style parameters
+ *
+ * @details
+ *
+ * Function : parseReportStyle
+ *
+ * Functionality: Fill report style parmeters
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseReportStyle(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RicReportStyle *ricReportStyle)
+{
+ xmlNodePtr child = NULLP;
+ memset(ricReportStyle, 0, sizeof(RicReportStyle));
+
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_STYLE")) && (cur->ns == ns))
+ {
+ if(parseRicStyle(doc, ns, cur, &ricReportStyle->reportStyle) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"MEASUREMENT_INFO_LIST")) && (cur->ns == ns))
+ {
+ child = cur->xmlChildrenNode;
+ while(child != NULL)
+ {
+ if ((!xmlStrcmp(child->name, (const xmlChar *)"MEASUREMENT_INFO")) && (child->ns == ns))
+ {
+ if(parseMeasurementInfo(doc, ns, child, &ricReportStyle->measurementInfoList) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+ child = child -> next;
+ }
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill RAN function name parameters
+ *
+ * @details
+ *
+ * Function : parseRanFuncName
+ *
+ * Functionality: Fill RAN function name parmeters
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseRanFuncName(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RanFunctionName *ranFunctionName)
+{
+ char *tempShortName;
+ char *tempServiceModelOid;
+ char *tempDiscription;
+
+ memset(ranFunctionName, 0, sizeof(RanFunctionName));
+
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SHORT_NAME")) && (cur->ns == ns))
+ {
+ tempShortName =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ strcpy((char*)ranFunctionName->shortName, tempShortName);
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"SEVICE_MODEL_OID")) && (cur->ns == ns))
+ {
+ tempServiceModelOid =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ strcpy((char*)ranFunctionName->serviceModelOID, tempServiceModelOid);
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESCRIPTION")) && (cur->ns == ns))
+ {
+ tempDiscription =(char*) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ strcpy((char*)ranFunctionName->description, tempDiscription);
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill RAN function parameters
+ *
+ * @details
+ *
+ * Function : parseRanFunctionParams
+ *
+ * Functionality: Fill RAN function parmeters
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseRanFunctionParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, RanFunction *ranFunction)
+{
+ xmlNodePtr child = NULLP;
+ uint8_t eventTriggerStyleIdx=0, reportStyleIdx=0;
+
+ memset(ranFunction, 0, sizeof(RanFunction));
+
+ cur = cur->xmlChildrenNode;
+
+ while (cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"ID")) && (cur->ns == ns))
+ {
+ ranFunction->id = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RAN_FUNCTION_NAME")) && (cur->ns == ns))
+ {
+ if(parseRanFuncName(doc, ns, cur, &ranFunction->name) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"REVISION_COUNTER")) && (cur->ns == ns))
+ {
+ ranFunction->revisionCounter = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_EVENT_TRIGGER_STYLE_SUPPORTED")) && (cur->ns == ns))
+ {
+ ranFunction->numOfEventTriggerStyleSupported = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"EVENT_TRIGGERED_STYLE_LIST")) && (cur->ns == ns))
+ {
+ child = cur->xmlChildrenNode;
+ while(child != NULL)
+ {
+ if ((!xmlStrcmp(child->name, (const xmlChar *)"EVENT_TRIGGERED_STYLE")) && (child->ns == ns))
+ {
+ if(parseRicStyle(doc, ns, child,&ranFunction->eventTriggerStyleList[eventTriggerStyleIdx]) != ROK)
+ {
+ return RFAILED;
+ }
+ eventTriggerStyleIdx++;
+
+ }
+ child = child -> next;
+ }
+
+ }
+
+ child = NULLP;
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_REPORT_STYLE_SUPPORTED")) && (cur->ns == ns))
+ {
+ ranFunction->numOfReportStyleSupported = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"REPORT_STYLE_SUPPORTED_LIST")) && (cur->ns == ns))
+ {
+ child = cur->xmlChildrenNode;
+ while(child != NULL)
+ {
+ if ((!xmlStrcmp(child->name, (const xmlChar *)"REPORT_STYLE")) && (child->ns == ns))
+ {
+ if(parseReportStyle(doc, ns, child,&ranFunction->reportStyleList[reportStyleIdx]) != ROK)
+ {
+ return RFAILED;
+ }
+ reportStyleIdx++;
+
+ }
+ child = child -> next;
+ }
+
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_INDICATION_HEADER_FORMAT")) && (cur->ns == ns))
+ {
+ ranFunction->ricIndicationHeaderFormat = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RIC_INDICATION_MESSAGE_FORMAT")) && (cur->ns == ns))
+ {
+ ranFunction->ricIndicationMessageFormat = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill E2 config Parameters
+ *
+ * @details
+ *
+ * Function : parseE2ConfigParams
+ *
+ * Functionality: Fill E2 config Parmeters
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseE2ConfigParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, E2apDb *e2apDb)
+{
+ uint8_t tnlIdx=0,ranFuncIdx=0;
+ xmlNodePtr child = NULLP;
+
+ memset(e2apDb, 0, sizeof(E2apDb));
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_NODE_ID")) && (cur->ns == ns))
+ {
+ e2apDb->e2NodeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_TNL_ASSOC")) && (cur->ns == ns))
+ {
+ e2apDb->numOfTNLAssoc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"TNL_ASSOC_LIST")) && (cur->ns == ns))
+ {
+ child = cur->xmlChildrenNode;
+ while(child != NULL)
+ {
+ if ((!xmlStrcmp(child->name, (const xmlChar *)"TNL_ASSOC")) && (child->ns == ns))
+ {
+ if(parseTnlAssoc(doc, ns, child,&e2apDb->tnlAssoc[tnlIdx]) != ROK)
+ {
+ return RFAILED;
+ }
+ tnlIdx++;
+
+ }
+ child = child -> next;
+ }
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_RAN_FUNCTION")) && (cur->ns == ns))
+ {
+ e2apDb->numOfRanFunction = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RAN_FUNCTION_LIST")) && (cur->ns == ns))
+ {
+ child = cur->xmlChildrenNode;
+ while(child != NULL)
+ {
+ if ((!xmlStrcmp(child->name, (const xmlChar *)"RAN_FUNCTION")) && (child->ns == ns))
+ {
+ if(parseRanFunctionParams(doc, ns, child,&e2apDb->ranFunction[ranFuncIdx]) != ROK)
+ {
+ return RFAILED;
+ }
+ cmLListInit(&e2apDb->ranFunction[ranFuncIdx].subscriptionList);
+ ranFuncIdx++;
+
+ }
+ child = child -> next;
+ }
+ }
+
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill Global config Parameters
+ *
+ * @details
+ *
+ * Function : parseGlobalConfigParams
+ *
+ * Functionality: Fill Global config Parmeters
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * Pointer to structure to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseGlobalConfigParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
+{
+
+ memset(&gConfigInfo, 0, sizeof(GConfiguration));
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL)
+ {
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"RADIO_FRAME_DURATION")) && (cur->ns == ns))
+ {
+ gConfigInfo.gRadioFrameDuration = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"ODU_UE_THROUGHPUT_PRINT_TIME_INTERVAL")) && (cur->ns == ns))
+ {
+ gConfigInfo.gUeThrptTimeIntervl = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"ODU_SNSSAI_THROUGHPUT_PRINT_TIME_INTERVAL")) && (cur->ns == ns))
+ {
+ gConfigInfo.gSnssaiThrptTimeIntervl = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PHY_DELTA_DL")) && (cur->ns == ns))
+ {
+ gConfigInfo.gPhyDeltaDl = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"PHY_DELTA_UL")) && (cur->ns == ns))
+ {
+ gConfigInfo.gPhyDeltaUl = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+ cur = cur -> next;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fill DU Config Parmeters
+ *
+ * @details
+ *
+ * Function : parseDuCfgParams
+ *
+ * Functionality:
+ *
+ * @params[in] XML document pointer
+ * XML namespace
+ * Current node in XML
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
+{
+ char *tempDuName = "";
+ char *duIpV4Addr;
+ char *cuIpV4Addr;
+ char *ricIpV4Addr;
+ CmInetIpAddr duIp;
+ CmInetIpAddr cuIp;
+ CmInetIpAddr ricIp;
+
+ cur = cur->xmlChildrenNode;
+ while(cur != NULL)
+ {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"THREAD_AFFINITY")) && (cur->ns == ns))
+ {
+#ifdef THREAD_AFFINITY
+ if(parseThreadAffinity(doc, ns, cur, &duCfgParam.threadInfo) != ROK)
+ {
+ return RFAILED;
+ }
+#endif
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"GNB_ID")) && (cur->ns == ns))
+ {
+ duCb.gnbId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_ID")) && (cur->ns == ns))
+ {
+ duCfgParam.duId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ }