X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_drx.h;h=a90e54e70e9b5bbe3fbdb80859a4afc1c59b67e4;hb=c449cf0b0cc8794c2e2d28dcc4c9bd8b9534e697;hp=c4679d109db6a733271ccc32560b75770b29b6b8;hpb=6bd517aac8dc6e3166389be3f468c58ba56d5608;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_drx.h b/src/5gnrsch/sch_drx.h index c4679d109..a90e54e70 100644 --- a/src/5gnrsch/sch_drx.h +++ b/src/5gnrsch/sch_drx.h @@ -18,19 +18,22 @@ #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 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 */ @@ -39,13 +42,19 @@ (_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);