[Epic-ID: ODUHIGH-462][Task-ID: ODUHIGH-472] Implementation of DL Harq Rtt timer...
[o-du/l2.git] / src / 5gnrsch / sch_drx.h
index c4679d1..d4c9d99 100644 (file)
 
 #define SCH_DRX_INVALID_DISTANCE -1
 #define SCH_DRX_INVALID_INDEX 0xFFFFFF 
-#define SCH_DRX_MAX_DELTA 1
+#define SCH_DRX_MAX_DELTA 3
 #define SCH_DRX_TMRS_EXP_DELTA 1
+#define SCH_DRX_DL_HARQ_BITMASK  0x000001
+#define SCH_DRX_UL_HARQ_BITMASK  0x000001
+#define UE_ACTIVE_FOR_ONDURATION 1
+#define UE_ACTIVE_FOR_INACTIVE_TIMER 2
+#define UE_ACTIVE_FOR_SR 4
 
 /** @brief Macro to convert milli second to slots */
-#define SCH_CNVRT_MS_TO_SLOT(_numSlot, _numMs, _mu)\
+#define SCH_CNVRT_MS_TO_SLOT(_numSlot, _timeInMs, _mu)\
 {\
-   _numSlot = _numMs * (1 << _mu);\
+   _numSlot = _timeInMs * (1 << _mu);\
 }
 
 /** @brief Macro to convert number symbols to slots */
 #define SCH_CNVRT_SYMBL_TO_SLOT(_numSlot, _numSymbl)\
 {\
-   _numSlot = _numSymbl/14; \
+   _numSlot = _numSymbl/MAX_SYMB_PER_SLOT; \
 }
 
 /**  @brief Macro to find the slot difference */
 (_newTime.sfn*_numOfSlotsPerRadioFrame+_newTime.slot) - (_oldTime.sfn*_numOfSlotsPerRadioFrame+_oldTime.slot) : \
 (_newTime.sfn*_numOfSlotsPerRadioFrame+_newTime.slot) + (1024*_numOfSlotsPerRadioFrame - (_oldTime.sfn*_numOfSlotsPerRadioFrame+_oldTime.slot)))
 
+/** @brief Macro to used calculate timer index */
+#define SCH_CALCULATE_TIMER_INDEX(_numSlots, _timerIndx)\
+{\
+   _timerIndx = _numSlots % MAX_DRX_SIZE; \
+}
+
 void schInitDrxUeCb(SchUeCb *ueCb);
 void schFillDrxUeCb(uint8_t numerology, SchDrxCfg drxCfg, SchDrxUeCb *drxUeCb);
 void schDeleteUeDrxInfo(SchCellCb  *cell, SchUeCb *ueCb);
 void schHandleStartDrxTimer(SchCellCb  *cell);
 void schHdlDrxInActvStrtTmr(SchCellCb  *cell,  SchUeCb *ueCb, uint8_t delta);
 void schInitDrxHarqCb(SchDrxHarqCb *hqCb);
-void schAddUeInOndurationAndShortCycleList(SchCellCb *cell, SchUeCb *ueCb, uint8_t delta);
+void schAddUeInOndurationList(SchCellCb *cell, SchUeCb *ueCb, uint8_t delta);
 void schDrxUeReCfgTimer(SchCellCb *cell, SchUeCb *ueCb);
 void schHdlDrxShortCycleExpiryTimer(SchCellCb  *cell);
 void schHdlDrxOnDurExpiryTimer(SchCellCb  *cell);
 void schHandleExpiryDrxTimer(SchCellCb  *cell);
+void schDrxStrtDlHqRttTmr(SchDlHqProcCb *hqP);
+void schDrxStopDlHqRetxTmr(SchCellCb  *cell, SchUeCb *uecb, SchDlHqProcCb **hqP);
 /**********************************************************************
   End of file
  **********************************************************************/