[Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-501] Ue Create and Rsp correction in DUAPP...
[o-du/l2.git] / src / cm / du_app_mac_inf.h
index 5f94ae8..558aaac 100644 (file)
@@ -86,6 +86,7 @@
 #define EVENT_MAC_DL_PCCH_IND        224
 #define EVENT_MAC_UE_RESET_REQ       225
 #define EVENT_MAC_UE_RESET_RSP       226
+#define EVENT_MAC_UE_SYNC_STATUS_IND 227
 
 #define BSR_PERIODIC_TIMER_SF_10 10
 #define BSR_RETX_TIMER_SF_320 320
@@ -100,6 +101,13 @@ typedef enum
    MAC_DU_APP_RSP_OK
 }MacRsp;
 
+typedef enum
+{
+   IN_SYNC,
+   OUT_OF_SYNC,
+   OUT_OF_SUNC_MAX_RETRIES
+}SyncStatus;
+
 typedef enum
 {
    DUP_MODE_FDD,
@@ -1450,7 +1458,7 @@ typedef struct modulationInfo
    McsTable    mcsTable;    /* MCS table */
 }ModulationInfo;
 
-typedef struct macUeCfg
+typedef struct macUeCreateReq
 {
    uint16_t               cellId;
    uint8_t                ueId;
@@ -1467,7 +1475,7 @@ typedef struct macUeCfg
    ModulationInfo         ulModInfo;    /* UL modulation info */
    uint8_t                numLcs;
    LcCfg                  lcCfgList[MAX_NUM_LC];
-}MacUeCfg;
+}MacUeCreateReq;
 
 /* UE Re-configuration */
 typedef struct macUeRecfg
@@ -1521,7 +1529,7 @@ typedef struct sCellFailInfo
    FailureCause  cause;
 }SCellFailInfo;
 
-typedef struct ueCfgRsp
+typedef struct macUeCreateRsp
 {
    uint16_t       cellId;
    uint16_t       ueId;
@@ -1534,9 +1542,9 @@ typedef struct ueCfgRsp
    SCellFailInfo  *failedSCellList;
    uint8_t        numDRBModFailed;   /* valid values : 0 to MAX_NUM_DRB */
    DRBFailInfo    *failedDRBModlist;
-}MacUeCfgRsp;
+}MacUeCreateRsp;
 
-typedef struct ueCfgRsp MacUeRecfgRsp;
+typedef struct macUeCreateRsp MacUeRecfgRsp;
 
 typedef struct rachRsrcReq
 {
@@ -1668,6 +1676,13 @@ typedef struct ueResetRsp
    CauseOfResult  status;
 }MacUeResetRsp;
 
+typedef struct ueSyncStatusInd
+{
+   uint16_t   cellId;
+   uint8_t    ueId;
+   SyncStatus status;
+}MacUeSyncStatusInd;
+
 /* Functions for CellUp Ind from MAC to DU APP*/
 typedef uint8_t (*DuMacCellUpInd) ARGS((
         Pst       *pst,
@@ -1723,12 +1738,12 @@ typedef uint8_t (*DuMacDlCcchInd) ARGS((
 /* UE create Request from DU APP to MAC*/
 typedef uint8_t (*DuMacUeCreateReq) ARGS((
         Pst           *pst,
-        MacUeCfg      *ueCfg ));
+        MacUeCreateReq      *ueCfg ));
 
 /* UE create Response from MAC to DU APP */
-typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
+typedef uint8_t (*MacDuUeCreateRspFunc) ARGS((
         Pst           *pst, 
-        MacUeCfgRsp   *cfgRsp));
+        MacUeCreateRsp   *cfgRsp));
 
 /* UE Reconfig Request from DU APP to MAC */
 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
@@ -1810,6 +1825,11 @@ typedef uint8_t (*MacDuUeResetRspFunc) ARGS((
      Pst            *pst,
      MacUeResetRsp *resetRsp));
 
+/* UE sync status indication from MAC to DU APP*/
+typedef uint8_t (*MacDuUeSyncStatusIndFunc) ARGS((
+        Pst            *pst,
+        MacUeSyncStatusInd *syncStatusInd));
+
 uint64_t ueBitMapPerCell[MAX_NUM_CELL]; /* Bit Map to store used/free UE-IDX per Cell */
 
 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
@@ -1836,13 +1856,13 @@ uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
-uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
+uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
-uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
+uint8_t MacProcUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
-uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
-uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
-uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
+uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
+uint8_t unpackDuMacUeCreateRsp(MacDuUeCreateRspFunc func, Pst *pst, Buffer *mBuf);
+uint8_t DuProcMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
@@ -1896,7 +1916,9 @@ uint8_t unpackMacUeResetReq(DuMacUeResetReq func, Pst *pst, Buffer *mBuf);
 uint8_t packDuMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp);
 uint8_t DuProcMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp);
 uint8_t unpackDuMacUeResetRsp(MacDuUeResetRspFunc func, Pst *pst, Buffer *mBuf);
-
+uint8_t packDuMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
+uint8_t DuProcMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
+uint8_t unpackDuMacUeSyncStatusInd(MacDuUeSyncStatusIndFunc func, Pst *pst, Buffer *mBuf);
 #endif