[JIRA ID- ODUHIGH-462] [ISSUE ID ODUHIGH-477] Adding support for drx configuration...
[o-du/l2.git] / src / cm / du_app_mac_inf.h
index 4815b4c..9020815 100644 (file)
@@ -82,6 +82,8 @@
 #define EVENT_MAC_SLOT_IND           220
 #define EVENT_MAC_RACH_RESOURCE_REQ  221
 #define EVENT_MAC_RACH_RESOURCE_RSP  222
+#define EVENT_MAC_RACH_RESOURCE_REL  223
+#define EVENT_MAC_DL_PCCH_IND        224
 
 #define BSR_PERIODIC_TIMER_SF_10 10
 #define BSR_RETX_TIMER_SF_320 320
@@ -103,7 +105,7 @@ typedef enum
 
 typedef enum
 {
-   SUCCESS,
+   DEL_SUCCESSFUL,
    CELLID_INVALID,
    UEID_INVALID
 }UeDeleteStatus;
@@ -697,6 +699,45 @@ typedef struct plmnInfoList
    Snssai         **snssai;         /* List of supporting snssai*/
 }PlmnInfoList;
 
+#ifdef NR_DRX
+/* The following list of structures is taken from the DRX-Config section of specification 33.331. */
+typedef struct drxOnDurationTimer
+{
+   bool  onDurationTimerValInMs;
+   union
+   {
+      uint8_t  subMilliSeconds;
+      uint16_t milliSeconds;
+   }onDurationtimerValue;
+}DrxOnDurationTimer;
+
+typedef struct drxLongCycleStartOffset
+{
+   uint16_t drxLongCycleStartOffsetChoice;
+   uint16_t drxLongCycleStartOffsetVal;
+}DrxLongCycleStartOffset;
+
+typedef struct shortDrx
+{
+   uint16_t   drxShortCycle;
+   uint8_t    drxShortCycleTimer;
+}ShortDrx;
+
+typedef struct drxCfg
+{
+   DrxOnDurationTimer       drxOnDurationTimer;   
+   uint16_t                 drxInactivityTimer;
+   uint8_t                  drxHarqRttTimerDl;
+   uint8_t                  drxHarqRttTimerUl;
+   uint16_t                 drxRetransmissionTimerDl;
+   uint16_t                 drxRetransmissionTimerUl;
+   DrxLongCycleStartOffset  drxLongCycleStartOffset;
+   bool                     shortDrxPres;
+   ShortDrx                 shortDrx;
+   uint8_t                  drxSlotOffset;
+}DrxCfg;
+#endif
+
 typedef struct macCellCfg
 {
    uint16_t       cellId;           /* Cell Id */
@@ -801,6 +842,9 @@ typedef struct macCellGrpCfg
    BsrTmrCfg   bsrTmrCfg;
    bool        phrCfgSetupPres;   /* true/false: phrCfgSetup/phrCfgRelease */
    PhrCfg      phrCfg;
+#ifdef NR_DRX
+   DrxCfg      drxCfg;
+#endif
 }MacCellGrpCfg;
 
 typedef struct phyCellGrpCfg
@@ -1324,6 +1368,13 @@ typedef struct macRachRsrcRsp
    MacCfraResource  cfraResource;
 }MacRachRsrcRsp;
 
+typedef struct macRachRsrcRel
+{
+   uint16_t cellId;
+   uint16_t ueId;
+   uint16_t crnti;
+}MacRachRsrcRel;
+
 typedef struct ueDelete
 {
     uint16_t cellId;
@@ -1381,14 +1432,14 @@ typedef struct macSliceCfgRsp
    MacSliceRsp  **listOfSliceCfgRsp;
 }MacSliceCfgRsp;
 
-typedef struct macPageReq
+typedef struct macPcchInd
 {
    uint16_t  cellId;
    uint16_t  pf;
    uint8_t   i_s;
    uint16_t  pduLen;
-   uint8_t  *pagePdu;
-}MacPageReq;
+   uint8_t  *pcchPdu;
+}MacPcchInd;
 
 /* Functions for CellUp Ind from MAC to DU APP*/
 typedef uint8_t (*DuMacCellUpInd) ARGS((
@@ -1452,21 +1503,26 @@ typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
         Pst           *pst, 
         MacUeCfgRsp   *cfgRsp));
 
-/* UE Reconfig Request from DU APP to MAC*/
+/* UE Reconfig Request from DU APP to MAC */
 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
         Pst           *pst,
         MacUeCfg      *ueCfg ));
 
-/* RACH Resource Request from DU APP to MAC*/
+/* RACH Resource Request from DU APP to MAC */
 typedef uint8_t (*DuMacRachRsrcReq) ARGS((
     Pst            *pst,
     MacRachRsrcReq *rachRsrcReq));
 
-/* RACH Resource Response from MAC to DU APP*/
+/* RACH Resource Response from MAC to DU APP */
 typedef uint8_t (*MacDuRachRsrcRspFunc) ARGS((
     Pst            *pst,
     MacRachRsrcRsp *rachRsrcRsp));
 
+/* RACH Resource Release from DU APP to MAC */
+typedef uint8_t (*DuMacRachRsrcRel) ARGS((
+    Pst            *pst,
+    MacRachRsrcRel *rachRsrcRel));
+
 /* UE Delete Request from DU APP to MAC*/
 typedef uint8_t (*DuMacUeDeleteReq) ARGS((
      Pst           *pst,
@@ -1507,6 +1563,11 @@ typedef uint8_t (*MacDuSliceReCfgRspFunc) ARGS((
         Pst           *pst,
         MacSliceCfgRsp   *cfgRsp));
 
+/* Pcch indication from DU APP to MAC*/
+typedef uint8_t (*DuMacDlPcchInd) ARGS((
+     Pst        *pst,
+     MacPcchInd *pcchInd));
+
 uint64_t ueBitMapPerCell[MAX_NUM_CELL]; /* Bit Map to store used/free UE-IDX per Cell */
 
 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
@@ -1549,6 +1610,9 @@ uint8_t MacProcRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
 uint8_t packDuMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
 uint8_t unpackDuMacRachRsrcRsp(MacDuRachRsrcRspFunc func, Pst *pst, Buffer *mBuf);
 uint8_t DuProcMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
+uint8_t packDuMacRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
+uint8_t unpackMacRachRsrcRel(DuMacRachRsrcRel func, Pst *pst, Buffer *mBuf);
+uint8_t MacProcRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
 uint8_t packDuMacUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
 uint8_t MacProcUeDeleteReq(Pst *pst,  MacUeDelete *ueDelete);
 uint8_t unpackMacUeDeleteReq(DuMacUeDeleteReq func, Pst *pst, Buffer *mBuf);
@@ -1576,6 +1640,9 @@ uint8_t unpackDuMacSliceReCfgRsp(MacDuSliceReCfgRspFunc func, Pst *pst, Buffer *
 uint8_t duHandleSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
 uint8_t packMacSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
 uint8_t unpackDuMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
+uint8_t packDuMacDlPcchInd(Pst *pst, MacPcchInd *pcchInd);
+uint8_t MacProcDlPcchInd(Pst *pst, MacPcchInd *pcchInd);
+uint8_t unpackMacDlPcchInd(DuMacDlPcchInd func, Pst *pst, Buffer *mBuf);
 int8_t getFreeBitFromUeBitMap(uint16_t cellId);
 void unsetBitInUeBitMap(uint16_t cellId, uint8_t bitPos);
 #endif