# See the License for the specific language governing permissions and #
# limitations under the License. #
################################################################################
# See the License for the specific language governing permissions and #
# limitations under the License. #
################################################################################
#include "SI-SchedulingInfo.h"
#include "ConnEstFailureControl.h"
#include "PLMN-IdentityInfo.h"
#include "SI-SchedulingInfo.h"
#include "ConnEstFailureControl.h"
#include "PLMN-IdentityInfo.h"
* 2 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
* 3 DL DL DL DL DL DL DL DL DL DL GD GD GD UL
* 4 UL UL UL UL UL UL UL UL UL UL UL UL UL UL
* 2 DL DL DL DL DL DL DL DL DL DL DL DL DL DL
* 3 DL DL DL DL DL DL DL DL DL DL GD GD GD UL
* 4 UL UL UL UL UL UL UL UL UL UL UL UL UL UL
/* DL carrier configuration */
duCfgParam.macCellCfg.dlCarrCfg.pres = TRUE;
duCfgParam.macCellCfg.dlCarrCfg.bw = BANDWIDTH;
/* DL carrier configuration */
duCfgParam.macCellCfg.dlCarrCfg.pres = TRUE;
duCfgParam.macCellCfg.dlCarrCfg.bw = BANDWIDTH;
duCfgParam.macCellCfg.dlCarrCfg.k0[0] = 1;
duCfgParam.macCellCfg.dlCarrCfg.k0[1] = 1;
duCfgParam.macCellCfg.dlCarrCfg.k0[2] = 1;
duCfgParam.macCellCfg.dlCarrCfg.k0[0] = 1;
duCfgParam.macCellCfg.dlCarrCfg.k0[1] = 1;
duCfgParam.macCellCfg.dlCarrCfg.k0[2] = 1;
duCfgParam.macCellCfg.ulCarrCfg.k0[0] = 1;
duCfgParam.macCellCfg.ulCarrCfg.k0[1] = 1;
duCfgParam.macCellCfg.ulCarrCfg.k0[2] = 1;
duCfgParam.macCellCfg.ulCarrCfg.k0[0] = 1;
duCfgParam.macCellCfg.ulCarrCfg.k0[1] = 1;
duCfgParam.macCellCfg.ulCarrCfg.k0[2] = 1;
duCfgParam.macCellCfg.ssbCfg.scsCmn = SUBCARRIER_SPACING;
duCfgParam.macCellCfg.ssbCfg.ssbOffsetPointA = OFFSET_TO_POINT_A;
duCfgParam.macCellCfg.ssbCfg.betaPss = BETA_PSS;
duCfgParam.macCellCfg.ssbCfg.scsCmn = SUBCARRIER_SPACING;
duCfgParam.macCellCfg.ssbCfg.ssbOffsetPointA = OFFSET_TO_POINT_A;
duCfgParam.macCellCfg.ssbCfg.betaPss = BETA_PSS;
duCfgParam.macCellCfg.ssbCfg.ssbScOffset = SSB_SUBCARRIER_OFFSET;
duCfgParam.macCellCfg.ssbCfg.ssbMask[0] = 1; /* only one SSB is transmitted */
duCfgParam.macCellCfg.ssbCfg.ssbMask[1] = 0;
if(BuildMibPdu() != ROK)
duCfgParam.macCellCfg.ssbCfg.ssbScOffset = SSB_SUBCARRIER_OFFSET;
duCfgParam.macCellCfg.ssbCfg.ssbMask[0] = 1; /* only one SSB is transmitted */
duCfgParam.macCellCfg.ssbCfg.ssbMask[1] = 0;
if(BuildMibPdu() != ROK)
- {
- DU_LOG("\nFailed to build MIB PDU");
- memset(&duCfgParam.macCellCfg.ssbCfg.mibPdu, 0, 3*sizeof(uint8_t));
+ {
+ DU_LOG("\nFailed to build MIB PDU");
+ memset(&duCfgParam.macCellCfg.ssbCfg.mibPdu, 0, 3*sizeof(uint8_t));
+ }
+ else
+ {
+ for(uint8_t idx=0; idx<encBufSize; idx++)
+ {
+ duCfgParam.macCellCfg.ssbCfg.mibPdu[idx]=encBuf[idx];
+ }
duCfgParam.macCellCfg.ssbCfg.multCarrBand = SSB_MULT_CARRIER_BAND;
duCfgParam.macCellCfg.ssbCfg.multCellCarr = MULT_CELL_CARRIER;
/* PRACH configuration */
duCfgParam.macCellCfg.prachCfg.pres = TRUE;
duCfgParam.macCellCfg.ssbCfg.multCarrBand = SSB_MULT_CARRIER_BAND;
duCfgParam.macCellCfg.ssbCfg.multCellCarr = MULT_CELL_CARRIER;
/* PRACH configuration */
duCfgParam.macCellCfg.prachCfg.pres = TRUE;
duCfgParam.macCellCfg.prachCfg.prachSeqLen = PRACH_SEQ_LEN;
duCfgParam.macCellCfg.prachCfg.prachSubcSpacing = PRACH_SUBCARRIER_SPACING;
duCfgParam.macCellCfg.prachCfg.prachRstSetCfg = PRACH_RESTRICTED_SET_CFG;
duCfgParam.macCellCfg.prachCfg.msg1Fdm = NUM_PRACH_FDM;
duCfgParam.macCellCfg.prachCfg.prachSeqLen = PRACH_SEQ_LEN;
duCfgParam.macCellCfg.prachCfg.prachSubcSpacing = PRACH_SUBCARRIER_SPACING;
duCfgParam.macCellCfg.prachCfg.prachRstSetCfg = PRACH_RESTRICTED_SET_CFG;
duCfgParam.macCellCfg.prachCfg.msg1Fdm = NUM_PRACH_FDM;
duCfgParam.macCellCfg.prachCfg.fdm[0].rootSeqIdx = ROOT_SEQ_IDX;
duCfgParam.macCellCfg.prachCfg.fdm[0].numRootSeq = NUM_ROOT_SEQ;
duCfgParam.macCellCfg.prachCfg.fdm[0].k1 = 1;
duCfgParam.macCellCfg.prachCfg.fdm[0].zeroCorrZoneCfg = ZERO_CORRELATION_ZONE_CFG;
duCfgParam.macCellCfg.prachCfg.fdm[0].numUnusedRootSeq = NUM_UNUSED_ROOT_SEQ;
duCfgParam.macCellCfg.prachCfg.fdm[0].rootSeqIdx = ROOT_SEQ_IDX;
duCfgParam.macCellCfg.prachCfg.fdm[0].numRootSeq = NUM_ROOT_SEQ;
duCfgParam.macCellCfg.prachCfg.fdm[0].k1 = 1;
duCfgParam.macCellCfg.prachCfg.fdm[0].zeroCorrZoneCfg = ZERO_CORRELATION_ZONE_CFG;
duCfgParam.macCellCfg.prachCfg.fdm[0].numUnusedRootSeq = NUM_UNUSED_ROOT_SEQ;
- if(duCfgParam.macCellCfg.prachCfg.fdm[0].numUnusedRootSeq != 0)
+ if(duCfgParam.macCellCfg.prachCfg.fdm[0].numUnusedRootSeq != 0)
+ {
+ DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq,
+ NUM_UNUSED_ROOT_SEQ * sizeof(uint8_t));
+ if(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq == NULLP)
- DU_ALLOC(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq,
- NUM_UNUSED_ROOT_SEQ * sizeof(U8));
- if(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq == NULLP)
- {
- DU_LOG("\nDU_APP : Memory allocation failed");
- RETVALUE(RFAILED);
- }
- *(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq) = UNUSED_ROOT_SEQ;
+ DU_LOG("\nDU_APP : Memory allocation failed");
+ return RFAILED;
duCfgParam.macCellCfg.prachCfg.ssbPerRach = SSB_PER_RACH;
duCfgParam.macCellCfg.prachCfg.prachMultCarrBand = PRACH_MULT_CARRIER_BAND;
duCfgParam.macCellCfg.prachCfg.raContResTmr = RA_CONT_RES_TIMER;
duCfgParam.macCellCfg.prachCfg.ssbPerRach = SSB_PER_RACH;
duCfgParam.macCellCfg.prachCfg.prachMultCarrBand = PRACH_MULT_CARRIER_BAND;
duCfgParam.macCellCfg.prachCfg.raContResTmr = RA_CONT_RES_TIMER;
duCfgParam.macCellCfg.sib1Cfg.sib1NewTxPeriod = SIB1_NEW_TX_PERIOD;
duCfgParam.macCellCfg.sib1Cfg.sib1RepetitionPeriod = SIB1_REPETITION_PERIOD;
duCfgParam.macCellCfg.sib1Cfg.coresetZeroIndex = CORESET_0_INDEX;
duCfgParam.macCellCfg.sib1Cfg.sib1NewTxPeriod = SIB1_NEW_TX_PERIOD;
duCfgParam.macCellCfg.sib1Cfg.sib1RepetitionPeriod = SIB1_REPETITION_PERIOD;
duCfgParam.macCellCfg.sib1Cfg.coresetZeroIndex = CORESET_0_INDEX;
duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.searchSpaceId = SEARCHSPACE_1_INDEX;
duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.coresetId = CORESET_0_INDEX;
duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSlot =
duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.searchSpaceId = SEARCHSPACE_1_INDEX;
duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.coresetId = CORESET_0_INDEX;
duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSlot =
- duCfgParam.macCellCfg.initialDlBwp.pdschCommon.mappingType =
- PDSCH_MAPPING_TYPE_A;
- duCfgParam.macCellCfg.initialDlBwp.pdschCommon.startSymbol =
- PDSCH_START_SYMBOL;
- duCfgParam.macCellCfg.initialDlBwp.pdschCommon.lengthSymbol =
- PDSCH_LENGTH_SYMBOL;
- /* ra-searchSpace ID is set to 1 */
+ duCfgParam.macCellCfg.initialDlBwp.pdschCommon.mappingType =
+ PDSCH_MAPPING_TYPE_A;
+ duCfgParam.macCellCfg.initialDlBwp.pdschCommon.startSymbol =
+ PDSCH_START_SYMBOL;
+ duCfgParam.macCellCfg.initialDlBwp.pdschCommon.lengthSymbol =
+ PDSCH_LENGTH_SYMBOL;
+ /* ra-searchSpace ID is set to 1 */
/* fill Intial UL BWP */
duCfgParam.macCellCfg.initialUlBwp.bwp.firstPrb = 0;
duCfgParam.macCellCfg.initialUlBwp.bwp.numPrb = TOTAL_PRB_BW; /* configured to total BW */
duCfgParam.macCellCfg.initialUlBwp.bwp.scs = SUBCARRIER_SPACING; /* numerology is 0, 15Khz */
duCfgParam.macCellCfg.initialUlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX;
duCfgParam.macCellCfg.initialUlBwp.puschCommon.k2 = PUSCH_K2;
/* fill Intial UL BWP */
duCfgParam.macCellCfg.initialUlBwp.bwp.firstPrb = 0;
duCfgParam.macCellCfg.initialUlBwp.bwp.numPrb = TOTAL_PRB_BW; /* configured to total BW */
duCfgParam.macCellCfg.initialUlBwp.bwp.scs = SUBCARRIER_SPACING; /* numerology is 0, 15Khz */
duCfgParam.macCellCfg.initialUlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX;
duCfgParam.macCellCfg.initialUlBwp.puschCommon.k2 = PUSCH_K2;
- duCfgParam.macCellCfg.initialUlBwp.puschCommon.mappingType =
- PUSCH_MAPPING_TYPE_A;
- duCfgParam.macCellCfg.initialUlBwp.puschCommon.startSymbol =
- PUSCH_START_SYMBOL;
- duCfgParam.macCellCfg.initialUlBwp.puschCommon.lengthSymbol =
- PUSCH_LENGTH_SYMBOL;
+ duCfgParam.macCellCfg.initialUlBwp.puschCommon.mappingType =
+ PUSCH_MAPPING_TYPE_A;
+ duCfgParam.macCellCfg.initialUlBwp.puschCommon.startSymbol =
+ PUSCH_START_SYMBOL;
+ duCfgParam.macCellCfg.initialUlBwp.puschCommon.lengthSymbol =
+ PUSCH_LENGTH_SYMBOL;
+
+ duCfgParam.macCellCfg.dmrsTypeAPos = DMRS_TYPE_A_POS;
+ /* fill PUCCH config common */
+ duCfgParam.macCellCfg.initialUlBwp.pucchCommon.pucchResourceCommon = PUCCH_RSRC_COMMON;
+ duCfgParam.macCellCfg.initialUlBwp.pucchCommon.pucchGroupHopping = PUCCH_GROUP_HOPPING;
-*
-* @brief Configures the DU Parameters
-*
-* @details
-*
-* Function : fillDuPort
-*
-* Functionality:
-* - fills the DU Ports.
-*
-* @params[in] duPort array to be filled
-* @return ROK - success
-* RFAILED - failure
-*
-* ****************************************************************/
-S16 fillDuPort(U16 *duPort)
+ *
+ * @brief Configures the DU Parameters
+ *
+ * @details
+ *
+ * Function : fillDuPort
+ *
+ * Functionality:
+ * - fills the DU Ports.
+ *
+ * @params[in] duPort array to be filled
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t fillDuPort(uint16_t *duPort)
-*
-* @brief Configures the DU Parameters
-*
-* @details
-*
-* Function : calcSliv
-*
-* Functionality:
-* - calculate SLIV value from start and length field
-*
-* @params[in] start symbol
-* @params[in] length of symbols
-* @return SLIV value
-*
-* ****************************************************************/
+ *
+ * @brief Configures the DU Parameters
+ *
+ * @details
+ *
+ * Function : calcSliv
+ *
+ * Functionality:
+ * - calculate SLIV value from start and length field
+ *
+ * @params[in] start symbol
+ * @params[in] length of symbols
+ * @return SLIV value
+ *
+ * ****************************************************************/
- if((lengthSymbol-1) <= 7)
- {
- sliv = 14 * (lengthSymbol-1) + startSymbol;
- }
- else
- {
- sliv = 14 * (14-lengthSymbol+1) + (14-1-startSymbol);
- }
- return sliv;
+ if((lengthSymbol-1) <= 7)
+ {
+ sliv = NUM_SYMBOLS_PER_SLOT * (lengthSymbol-1) + startSymbol;
+ }
+ else
+ {
+ sliv = NUM_SYMBOLS_PER_SLOT * (NUM_SYMBOLS_PER_SLOT - lengthSymbol + 1) \
+ + (NUM_SYMBOLS_PER_SLOT - 1 - startSymbol);
+ }
+ return sliv;
srvCellCfgComm->dlCfg.dlScsCarrier.scs = SUBCARRIER_SPACING;
srvCellCfgComm->dlCfg.dlScsCarrier.scsBw = SCS_CARRIER_BANDWIDTH;
srvCellCfgComm->dlCfg.locAndBw = FREQ_LOC_BW;
srvCellCfgComm->dlCfg.dlScsCarrier.scs = SUBCARRIER_SPACING;
srvCellCfgComm->dlCfg.dlScsCarrier.scsBw = SCS_CARRIER_BANDWIDTH;
srvCellCfgComm->dlCfg.locAndBw = FREQ_LOC_BW;
/* Configuring PDCCH Config Common For SIB1 */
pdcchCfg.present = BWP_DownlinkCommon__pdcch_ConfigCommon_PR_setup;
pdcchCfg.ctrlRsrcSetZero = PDCCH_CTRL_RSRC_SET_ZERO;
/* Configuring PDCCH Config Common For SIB1 */
pdcchCfg.present = BWP_DownlinkCommon__pdcch_ConfigCommon_PR_setup;
pdcchCfg.ctrlRsrcSetZero = PDCCH_CTRL_RSRC_SET_ZERO;
pdcchCfg.monitorSlotPrdAndOffPresent = \
SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1;
//pdcchCfg.monitorSlotPrdAndOff = \
pdcchCfg.monitorSlotPrdAndOffPresent = \
SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1;
//pdcchCfg.monitorSlotPrdAndOff = \
pdcchCfg.monitorSymbolsInSlot[0] = 128;
pdcchCfg.monitorSymbolsInSlot[1] = 0;
pdcchCfg.numCandAggLvl1 = SearchSpace__nrofCandidates__aggregationLevel1_n8;
pdcchCfg.monitorSymbolsInSlot[0] = 128;
pdcchCfg.monitorSymbolsInSlot[1] = 0;
pdcchCfg.numCandAggLvl1 = SearchSpace__nrofCandidates__aggregationLevel1_n8;
Sib1Params sib1;
cmInetAddr((S8*)DU_IP_V4_ADDR, &ipv4_du);
cmInetAddr((S8*)CU_IP_V4_ADDR, &ipv4_cu);
Sib1Params sib1;
cmInetAddr((S8*)DU_IP_V4_ADDR, &ipv4_du);
cmInetAddr((S8*)CU_IP_V4_ADDR, &ipv4_cu);
- cmInetAddr((S8*)RIC_IP_V4_ADDR, &ipv4_ric);
- fillDuPort(duCfgParam.sctpParams.duPort);
+ cmInetAddr((S8*)RIC_IP_V4_ADDR, &ipv4_ric);
+ fillDuPort(duCfgParam.sctpParams.duPort);
- mib.sysFrmNum = SYS_FRAME_NUM;
- mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs15or60;
- mib.ssb_SubcarrierOffset = SSB_SC_OFFSET;
- mib.dmrs_TypeA_Position = MIB__dmrs_TypeA_Position_pos2;
- mib.controlResourceSetZero = CORESET_ZERO;
- mib.searchSpaceZero = SEARCH_SPACE_ZERO;
- mib.cellBarred = MIB__cellBarred_barred;
- mib.intraFreqReselection =
- MIB__intraFreqReselection_notAllowed;
- duCfgParam.mibParams = mib;
+ mib.sysFrmNum = SYS_FRAME_NUM;
+ mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs15or60;
+ mib.ssb_SubcarrierOffset = SSB_SC_OFFSET;
+ mib.dmrs_TypeA_Position = MIB__dmrs_TypeA_Position_pos2;
+ mib.controlResourceSetZero = CORESET_ZERO;
+ mib.searchSpaceZero = SEARCH_SPACE_ZERO;
+ mib.cellBarred = MIB__cellBarred_barred;
+ mib.intraFreqReselection =
+ MIB__intraFreqReselection_notAllowed;
+ duCfgParam.mibParams = mib;
- sib1.plmn.mcc[0] = PLMN_MCC0;
- sib1.plmn.mcc[1] = PLMN_MCC1;
- sib1.plmn.mcc[2] = PLMN_MCC2;
- sib1.plmn.mnc[0] = PLMN_MNC0;
- sib1.plmn.mnc[1] = PLMN_MNC1;
- sib1.plmn.mnc[2] = PLMN_MNC2;
- sib1.tac = DU_TAC;
- sib1.ranac = DU_RANAC;
- sib1.cellIdentity = CELL_IDENTITY;
- sib1.cellResvdForOpUse =\
- PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved;
+ sib1.plmn.mcc[0] = PLMN_MCC0;
+ sib1.plmn.mcc[1] = PLMN_MCC1;
+ sib1.plmn.mcc[2] = PLMN_MCC2;
+ sib1.plmn.mnc[0] = PLMN_MNC0;
+ sib1.plmn.mnc[1] = PLMN_MNC1;
+ sib1.plmn.mnc[2] = PLMN_MNC2;
+ sib1.tac = DU_TAC;
+ sib1.ranac = DU_RANAC;
+ sib1.cellIdentity = CELL_IDENTITY;
+ sib1.cellResvdForOpUse =\
+ PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved;
sib1.connEstFailCnt = ConnEstFailureControl__connEstFailCount_n3;
sib1.connEstFailOffValidity =\
ConnEstFailureControl__connEstFailOffsetValidity_s120;
sib1.connEstFailCnt = ConnEstFailureControl__connEstFailCount_n3;
sib1.connEstFailOffValidity =\
ConnEstFailureControl__connEstFailOffsetValidity_s120;
- duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.plmn[j].mcc[0] = PLMN_MCC0;
- duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.plmn[j].mcc[1] = PLMN_MCC1;
- duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.plmn[j].mcc[2] = PLMN_MCC2;
- duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.plmn[j].mnc[0] = PLMN_MNC0;
- duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.plmn[j].mnc[1] = PLMN_MNC1;
- duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.plmn[j].mnc[2] = PLMN_MNC2;
+ duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.plmn[j].mcc[0] = PLMN_MCC0;
+ duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.plmn[j].mcc[1] = PLMN_MCC1;
+ duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.plmn[j].mcc[2] = PLMN_MCC2;
+ duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.plmn[j].mnc[0] = PLMN_MNC0;
+ duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.plmn[j].mnc[1] = PLMN_MNC1;
+ duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.plmn[j].mnc[2] = PLMN_MNC2;
- duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.extPlmn[j].mcc[0] = PLMN_MCC0;
- duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.extPlmn[j].mcc[1] = PLMN_MCC1;
- duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.extPlmn[j].mcc[2] = PLMN_MCC2;
- duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.extPlmn[j].mnc[0] = PLMN_MNC0;
- duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.extPlmn[j].mnc[1] = PLMN_MNC1;
- duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.extPlmn[j].mnc[2] = PLMN_MNC2;
+ duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.extPlmn[j].mcc[0] = PLMN_MCC0;
+ duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.extPlmn[j].mcc[1] = PLMN_MCC1;
+ duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.extPlmn[j].mcc[2] = PLMN_MCC2;
+ duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.extPlmn[j].mnc[0] = PLMN_MNC0;
+ duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.extPlmn[j].mnc[1] = PLMN_MNC1;
+ duCfgParam.srvdCellLst[i].duCellInfo.cellInfo.extPlmn[j].mnc[2] = PLMN_MNC2;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = SCS_120;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_66;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = SCS_120;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_66;
- duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[j].nrFreqBand = NR_FREQ_BAND;
- for(k=0;k<MAXNRCELLBANDS;k++)
- {
- duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[j].sulBand[k] = SUL_BAND;
- }
+ duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[j].nrFreqBand = NR_FREQ_BAND;
+ for(k=0;k<MAXNRCELLBANDS;k++)
+ {
+ duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[j].sulBand[k] = SUL_BAND;
+ }
- duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[j].nrFreqBand = NR_FREQ_BAND;
- for(k=0;k<MAXNRCELLBANDS;k++)
- {
- duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[j].sulBand[k] = SUL_BAND;
- }
+ duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[j].nrFreqBand = NR_FREQ_BAND;
+ for(k=0;k<MAXNRCELLBANDS;k++)
+ {
+ duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[j].sulBand[k] = SUL_BAND;
+ }
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = SCS_120;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_66;
for(j=0;j<MAXNRCELLBANDS;j++)
{
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = SCS_120;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_66;
for(j=0;j<MAXNRCELLBANDS;j++)
{
- duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[j].nrFreqBand = NR_FREQ_BAND;
- for(k=0;k<MAXNRCELLBANDS;k++)
- {
- duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[j].sulBand[k] = SUL_BAND;
- }
+ duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[j].nrFreqBand = NR_FREQ_BAND;
+ for(k=0;k<MAXNRCELLBANDS;k++)
+ {
+ duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.freqBand[j].sulBand[k] = SUL_BAND;
+ }
- for(k=0;k<MAX_PLMN;k++)
- {
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].plmn[k].mcc[0] = PLMN_MCC0;
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].plmn[k].mcc[1] = PLMN_MCC1;
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].plmn[k].mcc[2] = PLMN_MCC2;
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].plmn[k].mnc[0] = PLMN_MNC0;
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].plmn[k].mnc[1] = PLMN_MNC1;
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].plmn[k].mnc[2] = PLMN_MNC2;
- }
- /* Extended PLMN List */
- for(k=0;k<MAX_PLMN;k++)
- {
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].extPlmn[k].mcc[0] = PLMN_MCC0;
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].extPlmn[k].mcc[1] = PLMN_MCC1;
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].extPlmn[k].mcc[2] = PLMN_MCC2;
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].extPlmn[k].mnc[0] = PLMN_MNC0;
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].extPlmn[k].mnc[1] = PLMN_MNC1;
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].extPlmn[k].mnc[2] = PLMN_MNC2;
- }
-
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].tac = DU_TAC;
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].nrCellId = NR_CELL_ID;
- duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].ranac = NR_RANAC;
+ for(k=0;k<MAX_PLMN;k++)
+ {
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].plmn[k].mcc[0] = PLMN_MCC0;
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].plmn[k].mcc[1] = PLMN_MCC1;
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].plmn[k].mcc[2] = PLMN_MCC2;
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].plmn[k].mnc[0] = PLMN_MNC0;
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].plmn[k].mnc[1] = PLMN_MNC1;
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].plmn[k].mnc[2] = PLMN_MNC2;
+ }
+ /* Extended PLMN List */
+ for(k=0;k<MAX_PLMN;k++)
+ {
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].extPlmn[k].mcc[0] = PLMN_MCC0;
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].extPlmn[k].mcc[1] = PLMN_MCC1;
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].extPlmn[k].mcc[2] = PLMN_MCC2;
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].extPlmn[k].mnc[0] = PLMN_MNC0;
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].extPlmn[k].mnc[1] = PLMN_MNC1;
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].extPlmn[k].mnc[2] = PLMN_MNC2;
+ }
+
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].tac = DU_TAC;
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].nrCellId = NR_CELL_ID;
+ duCfgParam.srvdCellLst[i].duCellInfo.brdcstPlmnInfo[j].ranac = NR_RANAC;
- BuildMibMsg();
- DU_ALLOC(duCfgParam.srvdCellLst[i].duSysInfo.mibMsg,\
- strlen(encBuf));
- if(!(duCfgParam.srvdCellLst[i].duSysInfo.mibMsg))
- {
- DU_LOG("\nDU_APP: Memory allocation failure");
- return RFAILED;
- }
+ BuildMibMsg();
+ DU_ALLOC(duCfgParam.srvdCellLst[i].duSysInfo.mibMsg,\
+ strlen(encBuf));
+ if(!(duCfgParam.srvdCellLst[i].duSysInfo.mibMsg))
+ {
+ DU_LOG("\nDU_APP: Memory allocation failure");
+ return RFAILED;
+ }
strcpy((char *)duCfgParam.srvdCellLst[i].duSysInfo.mibMsg, encBuf);
duCfgParam.srvdCellLst[i].duSysInfo.mibLen = encBufSize;
/*gnb DU System Info mib msg*/
BuildSib1Msg();
strcpy((char *)duCfgParam.srvdCellLst[i].duSysInfo.mibMsg, encBuf);
duCfgParam.srvdCellLst[i].duSysInfo.mibLen = encBufSize;
/*gnb DU System Info mib msg*/
BuildSib1Msg();
- DU_ALLOC(duCfgParam.srvdCellLst[i].duSysInfo.sib1Msg,\
- encBufSize);
- if(!(duCfgParam.srvdCellLst[i].duSysInfo.sib1Msg))
- {
- DU_LOG("\nDU_APP: Memory allocation failure");
- return RFAILED;
- }
- memcpy(duCfgParam.srvdCellLst[i].duSysInfo.sib1Msg,\
- encBuf,encBufSize);
- duCfgParam.srvdCellLst[i].duSysInfo.sib1Len = encBufSize;
+ DU_ALLOC(duCfgParam.srvdCellLst[i].duSysInfo.sib1Msg,\
+ encBufSize);
+ if(!(duCfgParam.srvdCellLst[i].duSysInfo.sib1Msg))
+ {
+ DU_LOG("\nDU_APP: Memory allocation failure");
+ return RFAILED;
+ }
+ memcpy(duCfgParam.srvdCellLst[i].duSysInfo.sib1Msg,\
+ encBuf,encBufSize);
+ duCfgParam.srvdCellLst[i].duSysInfo.sib1Len = encBufSize;
-/*******************************************************************
- *
- * @brief Converts bit strings to integer
- *
- * @details
- *
- * Function : bitStringToInt
- *
- * Functionality:
- * - Converts ASN bit string format IEs to integer type
- *
- * @params[in] void
- * @return ROK - success
- * RFAILED - failure
- *
- * ****************************************************************/
-S16 bitStringToInt(BIT_STRING_t *bitString, U16 *val)
-{
- U16 idx;
- if(bitString->buf == NULL || bitString->size <= 0)
- {
- DU_LOG("\nDU_APP : Bit string is empty");
- return RFAILED;
- }
-
- for(idx=0; idx< bitString->size-1; idx++)
- {
- *val |= bitString->buf[idx];
- *val <<= 8;
- }
-
- *val |= bitString->buf[idx];
- *val >>= bitString->bits_unused;
-
- return ROK;
-}
-
-