+ case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms128:
+ {
+ drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms128;
+ break;
+ }
+ case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms160:
+ {
+ drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms160;
+ break;
+ }
+ case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms256:
+ {
+ drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms256;
+ break;
+ }
+ case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms320:
+ {
+ drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms320;
+ break;
+ }
+ case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms512:
+ {
+ drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms512;
+ break;
+ }
+ case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms640:
+ {
+ drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms640;
+ break;
+ }
+ case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms1024:
+ {
+ drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms1024;
+ break;
+ }
+ case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms1280:
+ {
+ drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms1280;
+ break;
+ }
+ case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms2048:
+ {
+ drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms2048;
+ break;
+ }
+ case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms2560:
+ {
+ drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms2560;
+ break;
+ }
+ case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms5120:
+ {
+ drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms5120;
+ break;
+ }
+ case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms10240:
+ {
+ drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms10240;
+ break;
+ }
+ default :
+ break;
+ }
+}
+
+/*******************************************************************
+ *
+ * @brief Fills drx configuration structure with the help of drx_ConfigRrc
+ *which recive from CU or storedDrxCfg which is already stored
+ *
+ * @details
+ *
+ * Function : extractDrxConfiguration
+ *
+ * Functionality: Fills Reconfig Cell group Info received by CU
+ *
+ * @params[in] cuMacCellGrpDrxConfig = MAC_CellGroupConfig__drx_ConfigRrc information which
+ * is send by CU, which we have stored in F1UeContextSetupDb
+ * DrxCfg * drxCfg = Used to Store the information,
+ * which needs to send in other layer, as well as this can be
+ * the variable which stores the information in DuCb,
+ * DrxCfg *storedDrxCfg = Null in case of sending the
+ * information to other layer else it will have the drx information
+ * stored in the copyOfmacUeCfg which we have stored in F1UeContextSetupDb.
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void extractDrxConfiguration(struct MAC_CellGroupConfig__drx_ConfigRrc *cuMacCellGrpDrxConfig, DrxCfg * drxCfg, DrxCfg *storedDrxCfg)
+{
+ struct DRX_ConfigRrc *cuDrxConfig;
+
+ if(storedDrxCfg)
+ {
+ memcpy(drxCfg, storedDrxCfg, sizeof(DrxCfg));
+ }
+ else
+ {
+ if(cuMacCellGrpDrxConfig)
+ {
+ switch(cuMacCellGrpDrxConfig->present)
+ {
+ case MAC_CellGroupConfig__drx_ConfigRrc_PR_NOTHING:
+ break;
+
+ case MAC_CellGroupConfig__drx_ConfigRrc_PR_setup:
+ {
+ cuDrxConfig = cuMacCellGrpDrxConfig->choice.setup;
+ if(cuDrxConfig)
+ {
+ switch(cuDrxConfig->drx_onDurationTimer.present)
+ {
+ case DRX_ConfigRrc__drx_onDurationTimer_PR_NOTHING:
+ break;
+ case DRX_ConfigRrc__drx_onDurationTimer_PR_milliSeconds:
+ {
+ drxCfg->drxOnDurationTimer.onDurationTimerValInMs = true;
+ drxCfg->drxOnDurationTimer.onDurationtimerValue.milliSeconds=convertOnDurationTimerMilliSecondsEnumToValue(cuDrxConfig->\
+ drx_onDurationTimer.choice.milliSeconds);
+ break;
+ }
+ case DRX_ConfigRrc__drx_onDurationTimer_PR_subMilliSeconds:
+ {
+ drxCfg->drxOnDurationTimer.onDurationTimerValInMs = false;
+ drxCfg->drxOnDurationTimer.onDurationtimerValue.subMilliSeconds = cuDrxConfig->drx_onDurationTimer.choice.subMilliSeconds;
+ break;
+ }
+ }
+ }
+ fillLongCycleOffsetValueInUeDb(&drxCfg->drxLongCycleStartOffset, &cuDrxConfig->drx_LongCycleStartOffset);
+ drxCfg->drxInactivityTimer = convertDrxInactivityTimerEnumToValue(cuDrxConfig->drx_InactivityTimer);
+ drxCfg->drxHarqRttTimerDl = cuDrxConfig->drx_HARQ_RTT_TimerDL;
+ drxCfg->drxHarqRttTimerUl = cuDrxConfig->drx_HARQ_RTT_TimerUL;
+ drxCfg->drxRetransmissionTimerDl = convertDrxRetransmissionTimerDlEnumToValue(cuDrxConfig->drx_RetransmissionTimerDL);
+ drxCfg->drxRetransmissionTimerUl = convertDrxRetransmissionTimerUlEnumToValue(cuDrxConfig->drx_RetransmissionTimerUL);
+ drxCfg->drxSlotOffset = cuDrxConfig->drx_SlotOffset;
+ if(cuDrxConfig->shortDRX)
+ {
+ drxCfg->shortDrxPres=true;
+ drxCfg->shortDrx.drxShortCycle = convertShortDrxCycleLengthEnumToValue(cuDrxConfig->shortDRX->drx_ShortCycle);
+ drxCfg->shortDrx.drxShortCycleTimer = cuDrxConfig->shortDRX->drx_ShortCycleTimer;
+ }
+ else
+ drxCfg->shortDrxPres=false;
+
+ break;
+ }
+
+ case MAC_CellGroupConfig__drx_ConfigRrc_PR_release:
+ break;
+ }
+ }
+ }
+}
+#endif
+
+/*******************************************************************
+ *
+ * @brief Fills Reconfig Cell group Info received by CU
+ *
+ * @details
+ *
+ * Function : extractUeRecfgCellInfo
+ *
+ * Functionality: Fills Reconfig Cell group Info received by CU
+ *
+ * @params[in] CellGroupConfigRrc_t *cellGrp = CellGroupConfigRrc_t information which
+ * is send by CU, which we have stored in F1UeContextSetupDb
+ * DuMacUeCfg *MacUeCfg = Used to Store the information,
+ * which needs to send in other layer, as well as this can be
+ * the variable which stores the information in DuCb,
+ * DuMacUeCfg *storedMacUeCfg = Null in case of sending the
+ * information to other layer else it will have copyOfmacUeCfg
+ * which we have stored in F1UeContextSetupDb.
+ *
+ * @return ROK/RFAILED
+ *
+ * ****************************************************************/
+uint8_t extractUeRecfgCellInfo(CellGroupConfigRrc_t *cellGrp, DuMacUeCfg *macUeCfg, DuMacUeCfg *storedMacUeCfg)
+{
+ uint8_t ret = ROK;
+ MAC_CellGroupConfig_t *macCellGroup = NULLP;
+ PhysicalCellGroupConfig_t *phyCellGrpCfg = NULLP;
+ SpCellConfig_t *spcellCfg = NULLP;
+ ServingCellConfig_t *servCellCfg = NULLP;
+
+ if(cellGrp)
+ {
+ /* Fill MacCell Group Reconfig */
+ if(cellGrp->mac_CellGroupConfig)
+ {
+ macUeCfg->macCellGrpCfgPres = true;
+ macCellGroup = ((MAC_CellGroupConfig_t *)(cellGrp->mac_CellGroupConfig));
+
+#ifdef NR_DRX
+ if(macCellGroup->drx_ConfigRrc)
+ {
+ if(storedMacUeCfg)
+ {
+ if(!storedMacUeCfg->macCellGrpCfgPres)
+ {
+ extractDrxConfiguration(macCellGroup->drx_ConfigRrc, &macUeCfg->macCellGrpCfg.drxCfg,NULL);
+ }
+ else
+ {
+ extractDrxConfiguration(macCellGroup->drx_ConfigRrc, &macUeCfg->macCellGrpCfg.drxCfg, &storedMacUeCfg->macCellGrpCfg.drxCfg);
+ }
+ }
+ else
+ {
+ extractDrxConfiguration(macCellGroup->drx_ConfigRrc, &macUeCfg->macCellGrpCfg.drxCfg,NULL);
+ }
+ }
+#endif
+
+ if(macCellGroup->schedulingRequestConfig)
+ {
+ extractSchReqReConfig(macCellGroup->schedulingRequestConfig, &macUeCfg->macCellGrpCfg.schReqCfg);
+ }
+ if(macCellGroup->tag_Config)
+ {
+ extractTagReconfig(macCellGroup->tag_Config, &macUeCfg->macCellGrpCfg.tagCfg);
+ }
+ if(macCellGroup->bsr_Config)
+ {
+ macUeCfg->macCellGrpCfg.bsrTmrCfg.periodicTimer = macCellGroup->bsr_Config->periodicBSR_Timer;
+ macUeCfg->macCellGrpCfg.bsrTmrCfg.retxTimer = macCellGroup->bsr_Config->retxBSR_Timer;
+ if(macCellGroup->bsr_Config->logicalChannelSR_DelayTimer)
+ {
+ macUeCfg->macCellGrpCfg.bsrTmrCfg.srDelayTimer =\
+ *(macCellGroup->bsr_Config->logicalChannelSR_DelayTimer);
+ }
+ }
+ if(macCellGroup->phr_Config)
+ {
+ if(macCellGroup->phr_Config->present == MAC_CellGroupConfig__phr_Config_PR_setup)
+ {
+ macUeCfg->macCellGrpCfg.phrCfgSetupPres = true;
+ if(macCellGroup->phr_Config->choice.setup)
+ {
+ macUeCfg->macCellGrpCfg.phrCfg.periodicTimer = \
+ macCellGroup->phr_Config->choice.setup->phr_PeriodicTimer;
+ macUeCfg->macCellGrpCfg.phrCfg.prohibitTimer = \
+ macCellGroup->phr_Config->choice.setup->phr_ProhibitTimer;
+ macUeCfg->macCellGrpCfg.phrCfg.txPowerFactor = \
+ macCellGroup->phr_Config->choice.setup->phr_Tx_PowerFactorChange;
+ macUeCfg->macCellGrpCfg.phrCfg.multiplePHR = \
+ macCellGroup->phr_Config->choice.setup->multiplePHR;
+ macUeCfg->macCellGrpCfg.phrCfg.dummy = \
+ macCellGroup->phr_Config->choice.setup->dummy;
+ macUeCfg->macCellGrpCfg.phrCfg.phrType2OtherCell = \
+ macCellGroup->phr_Config->choice.setup->phr_Type2OtherCell;
+ macUeCfg->macCellGrpCfg.phrCfg.phrOtherCG = \
+ macCellGroup->phr_Config->choice.setup->phr_ModeOtherCG;
+ }
+ }
+ }
+ }
+ /* Fill Physical Cell Group Reconfig */
+ if(cellGrp->physicalCellGroupConfig)
+ {
+ macUeCfg->phyCellGrpCfgPres = true;
+ phyCellGrpCfg = ((PhysicalCellGroupConfig_t *)(cellGrp->physicalCellGroupConfig));
+ if(phyCellGrpCfg->p_NR_FR1)
+ {
+ if(*(phyCellGrpCfg->p_NR_FR1) != macUeCfg->phyCellGrpCfg.pNrFr1)
+ macUeCfg->phyCellGrpCfg.pNrFr1 = *(phyCellGrpCfg->p_NR_FR1);
+ }
+ macUeCfg->phyCellGrpCfg.pdschHarqAckCodebook = phyCellGrpCfg->pdsch_HARQ_ACK_Codebook;
+ }
+ /* Fill SpCell Reconfig */
+ if(cellGrp->spCellConfig)
+ {
+ macUeCfg->spCellCfgPres = true;
+ spcellCfg = ((SpCellConfig_t *)(cellGrp->spCellConfig));
+ if(spcellCfg->servCellIndex)
+ {
+ macUeCfg->spCellCfg.servCellIdx = *(spcellCfg->servCellIndex);
+ }
+ /* Fill Serving cell Reconfig info */
+ if(cellGrp->spCellConfig->spCellConfigDedicated)
+ {
+ servCellCfg = ((ServingCellConfig_t *)(cellGrp->spCellConfig->spCellConfigDedicated));
+ if(storedMacUeCfg)
+ {
+ if(!storedMacUeCfg->spCellCfgPres)
+ ret = extractSpCellDedicatedCfg(servCellCfg, &macUeCfg->spCellCfg.servCellCfg, NULL);
+ else
+ ret = extractSpCellDedicatedCfg(servCellCfg, &macUeCfg->spCellCfg.servCellCfg,\
+ &storedMacUeCfg->spCellCfg.servCellCfg);
+ }
+ else
+ {
+ ret = extractSpCellDedicatedCfg(servCellCfg, &macUeCfg->spCellCfg.servCellCfg, NULL);
+ }
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed at extractSpCellDedicatedCfg()");
+ }
+ }
+ }