Merge "[Epic-ID: ODUHIGH-556][Task-ID: ODUHIGH-570] UL Candidate Sel and Res Alloc...
[o-du/l2.git] / src / 5gnrsch / sch.h
index 199e8fe..81fbc04 100644 (file)
@@ -88,6 +88,8 @@
 /*3GPP 38.211 Table 7.3.2.1-1*/
 #define MAX_NUM_AGG_LVL 5
 
+#define PUCCH_RES_IND 0
+
 typedef struct schDlHqProcCb SchDlHqProcCb;
 typedef struct schUlHqEnt SchUlHqEnt;
 typedef struct schRaReq SchRaReq;
@@ -250,7 +252,7 @@ struct schDlHqProcCb
    SchDlHqEnt        *hqEnt;
    uint8_t           maxHqTxPerHqP;
    CmLList           dlHqEntLnk;
-   CmLList           ulSlotLnk;
+   CmLList           dlSlotLnk;
    SchDlHqTbCb       tbInfo[2];
    uint8_t           k1;
    void              *schSpcDlHqProcCb;  /*!< Scheduler specific HARQ Proc CB */
@@ -360,13 +362,10 @@ typedef struct schRaCb
 typedef struct schUlSlotInfo
 {
    SchPrbAlloc  prbAlloc;         /*!< PRB allocated/available per symbol */
-   uint8_t      puschCurrentPrb;  /*!< Current PRB for PUSCH allocation */
-   bool         puschPres;        /*!< PUSCH presence field */
-   SchPuschInfo *schPuschInfo;    /*!< PUSCH info */
-   bool         pucchPres;        /*!< PUCCH presence field */
-   SchPucchInfo schPucchInfo;     /*!< PUCCH info */
-   uint8_t      pucchUe;          /*!< Store UE id for which PUCCH is scheduled */
-   uint8_t      puschUe;          /*!< Store UE id for which PUSCH is scheduled */
+   bool         puschPres;
+   SchPuschInfo *schPuschInfo[MAX_NUM_UE];    /*!< PUSCH info */
+   bool         pucchPres;
+   SchPucchInfo schPucchInfo[MAX_NUM_UE];     /*!< PUCCH info */
 }SchUlSlotInfo;
 
 /**
@@ -796,7 +795,7 @@ uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst);
 bool schCheckPrachOcc(SchCellCb *cell, SlotTimingInfo prachOccasionTimingInfo);
 uint8_t schCalcPrachNumRb(SchCellCb *cell);
 void schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotTimingInfo prachOccasionTimingInfo);
-uint16_t schAllocPucchResource(SchCellCb *cell, SlotTimingInfo pucchTime, uint16_t crnti,SchUeCb *ueCb, bool isRetx, SchDlHqProcCb *hqP);
+uint8_t schAllocPucchResource(SchCellCb *cell, uint8_t ueId, SlotTimingInfo pucchTime, SchUeCb *ueCb, SchDlHqProcCb *hqP, SchPdcchAllocInfo *pdcchAllocInfo);
 uint8_t schFillUlDci(SchUeCb *ueCb, SchPuschInfo *puschInfo, DciInfo *dciInfo, bool isRetx, SchUlHqProcCb *hqP);
 uint8_t schFillPuschAlloc(SchUeCb *ueCb, SlotTimingInfo puschTime, uint32_t tbSize,
                             uint8_t startSymb, uint8_t symbLen, uint16_t startPrb, bool isRetx, SchUlHqProcCb *hqP);
@@ -842,7 +841,7 @@ void schUpdateHarqFdbk(SchUeCb *ueCb, uint8_t numHarq, uint8_t *harqPayload,Slot
 
 /* Round Robbin Scheduler funtions*/
 uint8_t schFillUlDciForMsg3Retx(SchRaCb *raCb, SchPuschInfo *puschInfo, DciInfo *dciInfo);
-bool schGetMsg3K2(SchCellCb *cell, SchUlHqProcCb* msg3HqProc, uint16_t dlTime, SlotTimingInfo *msg3Time, bool isRetx);
+bool schGetMsg3K2(SchCellCb *cell, uint8_t ueId, SchUlHqProcCb* msg3HqProc, uint16_t dlTime, SlotTimingInfo *msg3Time, bool isRetx);
 void schMsg4Complete(SchUeCb *ueCb);
 
 /* Statistics Function */