return sliv;
}
-/*******************************************************************
- *
- * @brief Configures the DU Parameters
- *
- * @details
- *
- * Function : readCfg
- *
- * Functionality:
- * - Initializes the DuCfg members.
- * - Calls readMacCfg()
- *
- * @params[in] system task ID
- * @return ROK - success
- * RFAILED - failure
- *
- * ****************************************************************/
-
-uint8_t readCfg()
-{
- CmLList *node;
- uint8_t srvdCellIdx, bandIdx, sliceIdx, plmnIdx, ranFuncIdx, eventTriggerStyleIdx, reportStyleIdx, tnlAssocIdx;
- uint8_t brdcstPlmnIdx, freqBandIdx, srvdPlmnIdx;
- MibParams mib;
- Sib1Params sib1;
- SupportedSliceList *taiSliceSuppLst;
- uint8_t measurementInfoIdx =0, measurementInfoLen=0;
- char shortName[] = SHORT_NAME;
- char serviceModelOID[]= SERVICE_MODEL_OID;
- char description[] = DESCRIPTION;
- char event_trigger_style_name[]= EVENT_TRIGGER_STYLE_NAME;
- char ric_report_style_name[]= REPORT_STYLE_NAME;
-
-#ifndef O1_ENABLE
- /* Note: Added these below variable for local testing*/
- Snssai snssai[NUM_OF_SUPPORTED_SLICE] = {{1,{2,3,4}},{5,{6,7,8}}};
-#endif
-
- duCb.e2apDb.e2TransInfo.transIdCounter = 0;
- duCb.e2apDb.numOfRanFunction = 1;
- for(ranFuncIdx =0; ranFuncIdx<duCb.e2apDb.numOfRanFunction; ranFuncIdx++)
- {
- duCb.e2apDb.ranFunction[ranFuncIdx].id = ranFuncIdx + 1;
- memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.shortName, shortName, sizeof(shortName));
- memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.serviceModelOID, serviceModelOID, sizeof(serviceModelOID));
- memcpy(&duCb.e2apDb.ranFunction[ranFuncIdx].name.description, description, sizeof(description));
- duCb.e2apDb.ranFunction[ranFuncIdx].revisionCounter = 0;
-
- duCb.e2apDb.ranFunction[ranFuncIdx].numOfEventTriggerStyleSupported = NUM_OF_EVENT_TRIGGER_STYLE_SUPPORTED;
- for(eventTriggerStyleIdx=0; eventTriggerStyleIdx<duCb.e2apDb.ranFunction[ranFuncIdx].numOfEventTriggerStyleSupported; eventTriggerStyleIdx++)
- {
- duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].styleType = EVENT_TRIGGER_STYLE_TYPE;
- duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].formatType = EVENT_TRIGGER_STYLE_FORMAT_TYPE;
- memcpy(duCb.e2apDb.ranFunction[ranFuncIdx].eventTriggerStyleList[eventTriggerStyleIdx].name, event_trigger_style_name, sizeof(event_trigger_style_name));
- }
-
- duCb.e2apDb.ranFunction[ranFuncIdx].numOfReportStyleSupported= NUM_OF_RIC_REPORT_STYLE_SUPPORTED;
- for(reportStyleIdx=0; reportStyleIdx<duCb.e2apDb.ranFunction[ranFuncIdx].numOfReportStyleSupported; reportStyleIdx++)
- {
- duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.styleType = REPORT_STYLE_TYPE;
- duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.formatType = REPORT_ACTION_FORMAT_TYPE;
- memcpy(duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].reportStyle.name, ric_report_style_name, sizeof(ric_report_style_name));
-
- for(measurementInfoIdx =0; measurementInfoIdx<NUM_OF_MEASUREMENT_INFO_SUPPORTED(CONFIG_ADD); measurementInfoIdx++)
- {
- measurementInfoLen= strlen(MEASUREMENT_TYPE_NAME[measurementInfoIdx]);
- MeasurementInfoForAction *measurementInfoForAction;
- DU_ALLOC(measurementInfoForAction, sizeof(MeasurementInfoForAction));
- if(measurementInfoForAction)
- {
- measurementInfoForAction->measurementTypeId = measurementInfoIdx+1;
- memcpy(measurementInfoForAction->measurementTypeName, MEASUREMENT_TYPE_NAME[measurementInfoIdx], measurementInfoLen+1);
- }
- DU_ALLOC(node, sizeof(CmLList));
- if(node)
- {
- node->node = (PTR) measurementInfoForAction;
- cmLListAdd2Tail(&duCb.e2apDb.ranFunction[ranFuncIdx].reportStyleList[reportStyleIdx].measurementInfoList, node);
- }
- else
- {
-
- DU_FREE(measurementInfoForAction, sizeof(MeasurementInfoForAction));
- }
- }
- }
-
- duCb.e2apDb.ranFunction[ranFuncIdx].ricIndicationHeaderFormat = RIC_INDICATION_HEADER_FORMAT;
- duCb.e2apDb.ranFunction[ranFuncIdx].ricIndicationMessageFormat = RIC_INDICATION_MESSAGE_FORMAT;
-
- cmLListInit(&duCb.e2apDb.ranFunction[ranFuncIdx].subscriptionList);
- }
- memset(duCb.e2apDb.e2TransInfo.e2InitTransaction, 0, MAX_NUM_TRANSACTION * sizeof(E2TransInfo));
- memset(duCb.e2apDb.e2TransInfo.ricInitTransaction, 0, MAX_NUM_TRANSACTION * sizeof(E2TransInfo));
-
- for(srvdCellIdx=0; srvdCellIdx<DEFAULT_CELLS; srvdCellIdx++)
- {
- memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn, 0, sizeof(Plmn));
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[0] = PLMN_MCC0;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[1] = PLMN_MCC1;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mcc[2] = PLMN_MCC2;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mnc[0] = PLMN_MNC0;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrCgi.plmn.mnc[1] = PLMN_MNC1;
-
- /*Cell ID */
- #ifdef O1_ENABLE
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrPci = cellParams.nRPCI;
- #else
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.nrPci = NR_PCI;
-#endif
- /* List of Available PLMN */
- for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
- {
- /* As per spec 38.473, Plmn identity consists of 3 digit from mcc
- * followed by either 2 digit or 3 digits of mnc */
-
- memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn, 0,\
- sizeof(Plmn));
- #ifdef O1_ENABLE
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[0] = cellParams.plmnList[srvdPlmnIdx].mcc[0];
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[1] = cellParams.plmnList[srvdPlmnIdx].mcc[1];
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[2] = cellParams.plmnList[srvdPlmnIdx].mcc[2];
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[0] = cellParams.plmnList[srvdPlmnIdx].mnc[0];
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[1] = cellParams.plmnList[srvdPlmnIdx].mnc[1];
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
- #else
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[0] = PLMN_MCC0;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[1] = PLMN_MCC1;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mcc[2] = PLMN_MCC2;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[0] = PLMN_MNC0;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].plmn.mnc[1] = PLMN_MNC1;
-#endif
- }
- /* List of Extended PLMN */
- for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
- {
- /* As per spec 38.473, Plmn identity consists of 3 digit from mcc
- * followed by either 2 digit or 3 digits of mnc */
-
- memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn, 0, sizeof(Plmn));
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[0] = PLMN_MCC0;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[1] = PLMN_MCC1;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mcc[2] = PLMN_MCC2;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mnc[0] = PLMN_MNC0;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].extPlmn.mnc[1] = PLMN_MNC1;
- }
- /* List of Supporting Slices */
- for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
- {
- taiSliceSuppLst = &duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].\
- taiSliceSuppLst;
-
- /* TODO Calculte the exact number of supported slices once will get
- * cell configuration from O1 */
- taiSliceSuppLst->numSupportedSlices = NUM_OF_SUPPORTED_SLICE;
- if(taiSliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
- {
- DU_LOG("\nERROR --> DU_APP: readCfg(): Number of supported slice [%d] is more than 1024",\
- taiSliceSuppLst->numSupportedSlices);
- return RFAILED;
- }
-
- DU_ALLOC(taiSliceSuppLst->snssai, taiSliceSuppLst->numSupportedSlices*sizeof(Snssai*));
- if(taiSliceSuppLst->snssai == NULLP)
- {
- DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
- return RFAILED;
- }
-
- for(sliceIdx=0; sliceIdx<taiSliceSuppLst->numSupportedSlices; sliceIdx++)
- {
- DU_ALLOC(taiSliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
- if(taiSliceSuppLst->snssai[sliceIdx] == NULLP)
- {
- DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
- return RFAILED;
- }
-#ifdef O1_ENABLE
- memcpy(taiSliceSuppLst->snssai[sliceIdx]->sd, cellParams.plmnList[sliceIdx].sd, \
- SD_SIZE*sizeof(uint8_t));
- taiSliceSuppLst->snssai[sliceIdx]->sst = cellParams.plmnList[sliceIdx].sst;
-#else
- memcpy(taiSliceSuppLst->snssai[sliceIdx], &snssai[sliceIdx], sizeof(Snssai));
-#endif
- }
- }
-
- /* NR Mode info */
-#ifdef NR_TDD
- /* NR TDD Mode info */
-#ifdef O1_ENABLE
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.nrArfcn = cellParams.arfcnUL;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
-#else
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.nrArfcn = NR_UL_ARFCN;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
-#endif
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrb = NRB_273;
-
- for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
- {
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[freqBandIdx].nrFreqBand =\
- NR_FREQ_BAND;
- for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
- {
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[freqBandIdx].sulBand[bandIdx]\
- = SUL_BAND;
- }
- }
-#else
- /* NR FDD Mode info */
-#ifdef O1_ENABLE
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = cellParams.arfcnUL;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = cellParams.arfcnDL;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = cellParams.arfcnSUL;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
-#else
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = NR_UL_ARFCN;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrScs = NR_SCS;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = NR_DL_ARFCN;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = NR_SCS;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrScs = NR_SCS;
-#endif
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_106;
- for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
- {
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[freqBandIdx].\
- nrFreqBand = NR_FREQ_BAND;
- for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
- {
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[freqBandIdx].\
- sulBand[bandIdx] = SUL_BAND;
- }
- }
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_106;
- for(freqBandIdx=0; freqBandIdx<MAX_NRCELL_BANDS; freqBandIdx++)
- {
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[freqBandIdx].\
- nrFreqBand = NR_FREQ_BAND;
- for(bandIdx=0; bandIdx<MAX_NRCELL_BANDS; bandIdx++)
- {
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[freqBandIdx].\
- sulBand[bandIdx] = SUL_BAND;
- }
- }
-
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.ulTxBw.nrb = NRB_106;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.f1Mode.mode.fdd.dlTxBw.nrb = NRB_106;
-#endif
-
- /*Measurement Config and Cell Config */
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.measTimeCfgDuration = TIME_CFG;
-
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellDir = DL_UL;
-
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellType=CELL_TYPE;
-
- /* Broadcast PLMN Identity */
- for(brdcstPlmnIdx=0; brdcstPlmnIdx<MAX_BPLMN_NRCELL_MINUS_1; brdcstPlmnIdx++)
- {
- for(plmnIdx=0; plmnIdx<MAX_PLMN; plmnIdx++)
- {
- memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx],\
- 0, sizeof(Plmn));
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[0] =\
- PLMN_MCC0;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[1] =\
- PLMN_MCC1;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mcc[2] =\
- PLMN_MCC2;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mnc[0] =\
- PLMN_MNC0;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].plmn[plmnIdx].mnc[1] =\
- PLMN_MNC1;
- }
- /* Extended PLMN List */
- for(plmnIdx=0; plmnIdx<MAX_PLMN; plmnIdx++)
- {
- memset(&duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
- extPlmn[plmnIdx], 0, sizeof(Plmn));
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
- extPlmn[plmnIdx].mcc[0] = PLMN_MCC0;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
- extPlmn[plmnIdx].mcc[1] = PLMN_MCC1;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
- extPlmn[plmnIdx].mcc[2] = PLMN_MCC2;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
- extPlmn[plmnIdx].mnc[0] = PLMN_MNC0;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].\
- extPlmn[plmnIdx].mnc[1] = PLMN_MNC1;
- }
-#ifdef O1_ENABLE
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.epsTac = cellParams.nRTAC; //TODO : to check and fill
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.tac = cellParams.nRTAC;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].tac = cellParams.nRTAC;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].nrCellId = cellParams.cellLocalId;
-#else
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.epsTac = DU_TAC; //TODO : to check and fill
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.tac = DU_TAC;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].tac = DU_TAC;
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].nrCellId = NR_CELL_ID;
-#endif
- duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.brdcstPlmnInfo[brdcstPlmnIdx].ranac = NR_RANAC;
- }
-
- /*gnb DU System Info mib msg*/
- BuildMibMsg();
- DU_ALLOC(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg, encBufSize);
- if(!(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg))
- {
- DU_LOG("\nERROR --> DU APP : Memory allocation failure at readCfg");
- return RFAILED;
- }
- memcpy(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibMsg, encBuf, encBufSize);
- duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.mibLen = encBufSize;
-
- /*gnb DU System Info mib msg*/
- BuildSib1Msg();
- DU_ALLOC(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg,\
- encBufSize);
- if(!(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg))
- {
- DU_LOG("\nERROR --> DU APP : Memory allocation failure at readCfg");
- return RFAILED;
- }
- memcpy(duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Msg,\
- encBuf,encBufSize);
- duCfgParam.srvdCellLst[srvdCellIdx].duSysInfo.sib1Len = encBufSize;
-
- }
-
- return ROK;
-}
-
/*******************************************************************
*
* @brief Copy Slice Cfg in temp structre in duCfgParams
return ROK;
}
-#ifdef XML_BASED_CONFIG
/*******************************************************************
*
* @brief Fill Served PLMN
uint8_t sulIdx = 0;
uint16_t sulValue = 0;
xmlNodePtr child;
- xmlNodePtr sulChild;
memset(freqBand, 0, sizeof(F1FreqBand));
cur = cur->xmlChildrenNode;
child = cur->xmlChildrenNode;
while (child != NULL)
{
- if ((!xmlStrcmp(child->name, (const xmlChar *)"LIST")) && (child->ns == ns))
+ sulIdx = 0;
+ if ((!xmlStrcmp(child->name, (const xmlChar *)"SUL_BAND")) && (child->ns == ns))
{
- sulChild = child->xmlChildrenNode;
- sulIdx = 0;
- while (sulChild != NULL)
+ sulValue = atoi((char *)xmlNodeListGetString(doc, child->xmlChildrenNode, 1));
+ if (sulIdx < MAX_NRCELL_BANDS)
+ {
+ freqBand->sulBand[sulIdx] = sulValue;
+ sulIdx++;
+ }
+ else
{
- if ((!xmlStrcmp(sulChild->name, (const xmlChar *)"SUL_BAND")) && (sulChild->ns == ns))
- {
- sulValue = atoi((char *)xmlNodeListGetString(doc, sulChild->xmlChildrenNode, 1));
- if (sulIdx < MAX_NRCELL_BANDS)
- {
- freqBand->sulBand[sulIdx] = sulValue;
- sulIdx++;
- }
- else
- {
- DU_LOG("ERROR --> DU_APP : %s : SUL_BAND array overflow\n", __func__);
- return RFAILED;
- }
- }
- sulChild = sulChild->next;
+ DU_LOG("ERROR --> DU_APP : %s : SUL_BAND array overflow\n", __func__);
+ return RFAILED;
}
}
child = child->next;
{
uint8_t idx = 0;
- xmlNodePtr child;
cur = cur->xmlChildrenNode;
while(cur != NULL)
{
- if ((!xmlStrcmp(cur->name, (const xmlChar *)"LIST")) && (cur->ns == ns))
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_FREQ_BAND")) && (cur->ns == ns))
{
- child = cur->xmlChildrenNode;
- while(child != NULL)
+ if(parseF1FreqBand(doc, ns, cur, &nrFreqInfo->freqBand[idx]) != ROK)
{
- if ((!xmlStrcmp(child->name, (const xmlChar *)"F1_FREQ_BAND")) && (child->ns == ns))
- {
- if(parseF1FreqBand(doc, ns, child, &nrFreqInfo->freqBand[idx]) != ROK)
- {
- return RFAILED;
- }
- idx++;
- }
- child = child -> next;
+ return RFAILED;
}
+ idx++;
}
-
cur = cur -> next;
}
return ROK;
cur = cur->xmlChildrenNode;
while(cur != NULL)
{
+#ifdef O1_ENABLE
+ txBw->nrScs = convertScsValToScsEnum(cellParams.ssbSubCarrierSpacing);
+#else
if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_SCS")) && (cur->ns == ns))
{
txBw->nrScs = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
}
+#endif
if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NRB")) && (cur->ns == ns))
{
cur = cur->xmlChildrenNode;
while(cur != NULL)
{
+#ifdef O1_ENABLE
+ sulInfo->sulArfcn = cellParams.arfcnSUL;
+#else
if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUL_ARFCN")) && (cur->ns == ns))
{
sulInfo->sulArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
}
+#endif
if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_TX_BW")) && (cur->ns == ns))
{
cur = cur->xmlChildrenNode;
while(cur != NULL)
{
+#if O1_ENABLE
+ nrFreqInfo->nrArfcn = cellParams.arfcnUL;
+#else
if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_ARFCN")) && (cur->ns == ns))
{
nrFreqInfo->nrArfcn = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
}
+#endif
if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SUL_INFO")) && (cur->ns == ns))
{
return ROK;
}
+#ifdef NR_TDD
/*******************************************************************
*
* @brief Fill NR TDD Info
}
return ROK;
}
+#endif
/*******************************************************************
*
strcpy((char*)modeCfg, (char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
}
+#ifndef NR_TDD
if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_FDD_INFO")) && (cur->ns == ns))
{
if(strcmp(modeCfg, "FDD") == 0)
}
}
}
-
+#else
if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_NR_TDD_INFO")) && (cur->ns == ns))
{
if(strcmp(modeCfg, "TDD") == 0)
}
}
+#endif
cur = cur -> next;
}
return ROK;
}
}
+#ifdef O1_ENABLE
+ duCellInfo->tac = cellParams.nRTAC;
+ duCellInfo->epsTac = cellParams.nRTAC;
+#else
if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
{
duCellInfo->tac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
{
duCellInfo->epsTac = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
}
+#endif
if ((!xmlStrcmp(cur->name, (const xmlChar *)"NR_MODE_INFO")) && (cur->ns == ns))
{
return RFAILED;
}
}
-
cur = cur -> next;
}
return ROK;
return ROK;
}
-#ifdef O1_ENABLED
+#ifdef O1_ENABLE
/*******************************************************************
*
* @brief Fill PLMN received from O1 interface
PLMN->mnc[2] = cellParams.plmnList[srvdPlmnIdx].mnc[2];
}
#endif
-#endif
/*******************************************************************
*
* ****************************************************************/
uint8_t parseCsiRsCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CsiRsCfg *csiRsCfg)
{
+ uint8_t csiFreqDomainAlloc=0;
memset(csiRsCfg, 0, sizeof(CsiRsCfg));
cur = cur -> xmlChildrenNode;
while(cur != NULL)
{
if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_FREQ")) && (cur->ns == ns))
{
- csiRsCfg->csiFreqDomainAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ csiFreqDomainAlloc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+ DU_ALLOC(csiRsCfg->csiFreqDomainAlloc, sizeof(uint8_t));
+ if(!csiRsCfg->csiFreqDomainAlloc)
+ {
+ DU_LOG("\nERROR --> DU APP : %s: Memory allocation failed at line %d", __func__, __LINE__);
+ return RFAILED;
+ }
+ memcpy(csiRsCfg->csiFreqDomainAlloc, &csiFreqDomainAlloc, sizeof(uint8_t));
}
if ((!xmlStrcmp(cur->name, (const xmlChar *)"CSIRS_PORTS")) && (cur->ns == ns))
{
uint8_t idx = 0;
xmlNodePtr child = NULLP;
- xmlNodePtr pdschNode = NULLP;
memset(pdschCfgCmn, 0, sizeof(PdschConfigCommon));
cur = cur -> xmlChildrenNode;
{
uint8_t rsrcIdx = 0;
xmlNodePtr child = NULLP;
- xmlNodePtr rsrcNode = NULLP;
memset(puschCfgCmn, 0, sizeof(PuschCfgCommon));
cur = cur -> xmlChildrenNode;
#ifdef O1_ENABLE
sib1Params-> tac = cellParams.nRTAC;
sib1Params->cellIdentity = CELL_IDENTITY * cellParams.cellLocalId;
- DU_LOG("\nDEBUG --> DU_APP: readCfg(): OAM CellLocalId=%d", sib1Params->cellIdentity);
+ DU_LOG("\nDEBUG --> DU_APP: parseSib1Params(): OAM CellLocalId=%d", sib1Params->cellIdentity);
#else
if ((!xmlStrcmp(cur->name, (const xmlChar *)"TAC")) && (cur->ns == ns))
{
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
* ****************************************************************/
uint8_t parseE2ConfigParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, E2apDb *e2apDb)
{
- uint8_t tnlIdx=0;
+ uint8_t tnlIdx=0,ranFuncIdx=0;
xmlNodePtr child = NULLP;
memset(e2apDb, 0, sizeof(E2apDb));
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(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;
+ cur = cur -> next;
}
return ROK;
}
duCfgParam.maxNumDrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
}
- if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE_SUPPORTED")) && (cur->ns == ns))
- {
- duCfgParam.maxSupportedUes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
- }
-
- if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE")) && (cur->ns == ns))
- {
- duCfgParam.maxUe = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
- }
-
#ifdef O1_ENABLE
if( getStartupConfig(&g_cfg) != ROK )
{
duCfgParam.egtpParams.localIp.ipV4Pres = true;
duCfgParam.egtpParams.destIp.ipV4Pres = true;
duCfgParam.egtpParams.destIp.ipV4Addr = cuIp;
- duCfgParam.egtpParams.maxTunnelId = duCfgParam.maxNumDrb * duCfgParam.maxSupportedUes;
+ duCfgParam.egtpParams.maxTunnelId = duCfgParam.maxNumDrb * MAX_NUM_UE;
}
if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIB_PARAMS")) && (cur->ns == ns))
}
}
-#ifdef XML_BASED_CONFIG
if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_SRVD_CELL_INFO")) && (cur->ns == ns))
{
if(parseF1DuServedCellInfo(doc, ns, cur, &duCfgParam.srvdCellLst[0]) != ROK)
return RFAILED;
}
}
-#endif
if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAC_CELL_CFG")) && (cur->ns == ns))
{
{
return RFAILED;
}
+ else
+ {
+ cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2SetupTimer), 1);
+ cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.ricServiceUpdateTimer.timer), 1);
+ cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2NodeConfigUpdate.timer), 1);
+ }
}
+
+ if((!xmlStrcmp(cur->name, (const xmlChar *)"GLOBAL_CFG")) && (cur->ns == ns))
+ {
+ if(parseGlobalConfigParams(doc, ns, cur) != ROK)
+ {
+ return RFAILED;
+ }
+ }
+
cur = cur -> next;
}
return ROK;
xmlDocPtr doc = NULLP;
xmlNodePtr cur = NULLP;
xmlNsPtr ns = NULLP;
+ Pst pst;
+ Buffer *mBuf;
+ /* Parse, store and print DU configurations from XML file */
doc = xmlParseFile(filename);
if(doc == NULL)
{
}
parseDuCfgParams(doc, ns, cur);
+ printDuConfig();
xmlFreeDoc(doc);
xmlCleanupParser();
- Pst pst;
- Buffer *mBuf;
-
- /* Read configs into duCfgParams */
- if(readCfg() != ROK)
- {
- DU_LOG("\nERROR --> DU_APP : Reading configuration failed");
- return RFAILED;
- }
- printDuConfig();
-
/* Fill pst structure */
memset(&(pst), 0, sizeof(Pst));
pst.srcEnt = (Ent)ENTDUAPP;
pst.selector = ODU_SELECTOR_TC;
pst.pool= DU_POOL;
- /* Initialize the timer blocks */
- cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2SetupTimer), 1);
- cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.ricServiceUpdateTimer.timer), 1);
- cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2NodeConfigUpdate.timer), 1);
/* Timer Registration request to system services */
if (ODU_REG_TMR_MT(pst.srcEnt, pst.srcInst, duCb.duTimersInfo.tmrRes, duActvTmr) != ROK)
* ****************************************************************/
void printDuConfig()
{
+
+ uint16_t ranFuncIdx;
+ uint8_t reportStyleIdx =0, eventStyleIdx=0, tnlIdx=0;
uint8_t sliceIdx = 0, pfIdx = 0, rsrcIdx = 0, ssbMaskIdx = 0, fdmIdx = 0;
uint8_t monitoringSymbIdx = 0, poIdx = 0, policyIdx = 0, memIdx = 0;
__attribute__((unused)) SctpParams *sctp;
MacSliceRrmPolicy *rrmPolicy;
__attribute__((unused)) RrmPolicyRatio *rrmPolicyRatio;
__attribute__((unused)) RrmPolicyMemberList *rrmPolicyMemberList;
-
+ CmLList *node;
+ E2apDb *e2apDb;
+ RanFunction *ranFunc;
+ CmLListCp *measurementInfoList;
+ MeasurementInfoForAction *measurementInfoForAction;
#ifdef NR_TDD
F1NrTddInfo *f1NrTddInfo;
TDDCfg *tddCfg;
DU_LOG("Lower MAC CORE ID %d\n", duCfgParam.threadInfo.lwrMacCoreId);
DU_LOG("MAX NUM DRB %d\n", duCfgParam.maxNumDrb);
- DU_LOG("MAX SUPPORTED UE %d\n", duCfgParam.maxSupportedUes);
- DU_LOG("MAX UE %d\n",duCfgParam.maxUe);
sctp = &duCfgParam.sctpParams;
DU_LOG("\n ** SCTP PARAMETER ** \n");
DU_LOG("\t\tSD %d %d %d\n",rrmPolicyMemberList->snssai.sd[0],rrmPolicyMemberList->snssai.sd[1],rrmPolicyMemberList->snssai.sd[2]);
}
}
+
+ DU_LOG("\n ** E2 configuration ** \n");
+ e2apDb = &duCb.e2apDb;
+ DU_LOG("E2 node id %lu\n", e2apDb->e2NodeId);
+ DU_LOG("Number of RAN function %d\n", e2apDb->numOfRanFunction);
+ for(ranFuncIdx=0; ranFuncIdx<e2apDb->numOfRanFunction; ranFuncIdx++)
+ {
+ ranFunc = &e2apDb->ranFunction[ranFuncIdx];
+ DU_LOG("RAN function id %d\n", ranFunc->id);
+ DU_LOG("Short Name %s\n", ranFunc->name.shortName);
+ DU_LOG("Service Model OID %s\n", ranFunc->name.serviceModelOID);
+ DU_LOG("Description %s\n", ranFunc->name.description);
+
+ DU_LOG("RevisionCounter %d\n",ranFunc->revisionCounter);
+ DU_LOG("NUM of Event Trigger Style Supported %d\n",ranFunc->numOfEventTriggerStyleSupported);
+ for(eventStyleIdx=0;eventStyleIdx<ranFunc->numOfEventTriggerStyleSupported; eventStyleIdx++)
+ {
+ DU_LOG("Style Type %d\n",ranFunc->eventTriggerStyleList[eventStyleIdx].styleType);
+ DU_LOG("Name %s\n",ranFunc->eventTriggerStyleList[eventStyleIdx].name);
+ DU_LOG("Format type %d\n",ranFunc->eventTriggerStyleList[eventStyleIdx].formatType);
+ }
+
+ DU_LOG("Num of Report Style Supported %d\n",ranFunc->numOfReportStyleSupported);
+ for(reportStyleIdx=0;reportStyleIdx<ranFunc->numOfReportStyleSupported; reportStyleIdx++)
+ {
+ DU_LOG("Style Type %d\n",ranFunc->reportStyleList[reportStyleIdx].reportStyle.styleType);
+ DU_LOG("Name %s\n",ranFunc->reportStyleList[reportStyleIdx].reportStyle.name);
+ DU_LOG("Format type %d\n",ranFunc->reportStyleList[reportStyleIdx].reportStyle.formatType);
+ measurementInfoList = &ranFunc->reportStyleList[reportStyleIdx].measurementInfoList;
+ if(measurementInfoList->count)
+ {
+ CM_LLIST_FIRST_NODE(measurementInfoList, node);
+ while(node)
+ {
+ measurementInfoForAction = (MeasurementInfoForAction*) node->node;
+ if(measurementInfoForAction)
+ {
+ DU_LOG("Measurement Type Name %s\n",measurementInfoForAction->measurementTypeName);
+ DU_LOG("Measurement Type Id %d\n",measurementInfoForAction->measurementTypeId);
+ }
+ node = node->next;
+ }
+ }
+ }
+ DU_LOG("Ric Indication header format %d\n",ranFunc->ricIndicationHeaderFormat);
+ DU_LOG("Ric indication message format %d\n",ranFunc->ricIndicationMessageFormat);
+
+ }
+ DU_LOG("Number of TNL association %d\n", e2apDb->numOfTNLAssoc);
+ for(tnlIdx=0;tnlIdx<e2apDb->numOfTNLAssoc;tnlIdx++)
+ {
+ DU_LOG("Local IPv4 Address present %u\n", e2apDb->tnlAssoc[tnlIdx].localIpAddress.ipV4Pres);
+ DU_LOG("local IP Address %u\n", e2apDb->tnlAssoc[tnlIdx].localIpAddress.ipV4Addr);
+ DU_LOG("Destination IPv4 Address present %u\n", e2apDb->tnlAssoc[tnlIdx].destIpAddress.ipV4Pres);
+ DU_LOG("Destination IP Address %u\n", e2apDb->tnlAssoc[tnlIdx].destIpAddress.ipV4Addr);
+ DU_LOG("Local port %d\n", e2apDb->tnlAssoc[tnlIdx].localPort);
+ DU_LOG("Destination port %d\n", e2apDb->tnlAssoc[tnlIdx].destPort);
+ DU_LOG("Tnl usage %d\n", e2apDb->tnlAssoc[tnlIdx].usage);
+ }
}
/**********************************************************************