[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-425] Changes in Ue Context Modification
[o-du/l2.git] / src / cm / mac_sch_interface.h
index 8603891..0bb6dac 100644 (file)
  *******************************************************************************/
 
 /* events */
-#define EVENT_SCH_CELL_CFG           1
-#define EVENT_SCH_CELL_CFG_CFM       2
-#define EVENT_DL_SCH_INFO            3 
-#define EVENT_UL_SCH_INFO            4 
-#define EVENT_RACH_IND_TO_SCH        5
-#define EVENT_CRC_IND_TO_SCH         6
-#define EVENT_DL_RLC_BO_INFO_TO_SCH  7
-#define EVENT_ADD_UE_CONFIG_REQ_TO_SCH   8
-#define EVENT_UE_CONFIG_RSP_TO_MAC   9
-#define EVENT_SLOT_IND_TO_SCH        10
-#define EVENT_SHORT_BSR              11
-#define EVENT_UCI_IND_TO_SCH         12
-#define EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH 13
-#define EVENT_UE_RECONFIG_RSP_TO_MAC 14
-#define EVENT_UE_DELETE_REQ_TO_SCH   15
-#define EVENT_UE_DELETE_RSP_TO_MAC   16
-#define EVENT_CELL_DELETE_REQ_TO_SCH   17
-#define EVENT_CELL_DELETE_RSP_TO_MAC   18
-#define EVENT_LONG_BSR              19
-#define EVENT_SLICE_CFG_REQ_TO_SCH  20
-#define EVENT_SLICE_CFG_RSP_TO_MAC  21
-#define EVENT_SLICE_RECFG_REQ_TO_SCH  22
-#define EVENT_SLICE_RECFG_RSP_TO_MAC  23
+#define EVENT_SCH_GEN_CFG            1
+#define EVENT_SCH_CELL_CFG           2
+#define EVENT_SCH_CELL_CFG_CFM       3
+#define EVENT_DL_SCH_INFO            4 
+#define EVENT_UL_SCH_INFO            5 
+#define EVENT_RACH_IND_TO_SCH        6
+#define EVENT_CRC_IND_TO_SCH         7
+#define EVENT_DL_RLC_BO_INFO_TO_SCH  8
+#define EVENT_ADD_UE_CONFIG_REQ_TO_SCH   9
+#define EVENT_UE_CONFIG_RSP_TO_MAC   10
+#define EVENT_SLOT_IND_TO_SCH        11
+#define EVENT_SHORT_BSR              12
+#define EVENT_UCI_IND_TO_SCH         13
+#define EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH 14
+#define EVENT_UE_RECONFIG_RSP_TO_MAC 15
+#define EVENT_UE_DELETE_REQ_TO_SCH   16
+#define EVENT_UE_DELETE_RSP_TO_MAC   17
+#define EVENT_CELL_DELETE_REQ_TO_SCH 18
+#define EVENT_CELL_DELETE_RSP_TO_MAC 19
+#define EVENT_LONG_BSR               20
+#define EVENT_SLICE_CFG_REQ_TO_SCH   21
+#define EVENT_SLICE_CFG_RSP_TO_MAC   22
+#define EVENT_SLICE_RECFG_REQ_TO_SCH 23
+#define EVENT_SLICE_RECFG_RSP_TO_MAC 24
 
 /*macros*/
 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
@@ -166,7 +167,7 @@ typedef enum
 {
    NOT_APPLICABLE,
    INVALID_CELLID,
-   INVALID_UEIDX
+   INVALID_UEID
 }ErrorCause;
 
 typedef enum
@@ -427,6 +428,13 @@ typedef enum
    BOTH
 }DlPduType;
 
+typedef enum
+{
+   DATA_TRANSMISSION_ALLOWED,
+   STOP_DATA_TRANSMISSION,
+   RESTART_DATA_TRANSMISSION
+}SchDataTransmission;
+
 /*structures*/
 typedef struct timeDomainAlloc
 {
@@ -449,6 +457,10 @@ typedef struct
    SchSSBPeriod   ssbPeriod;        /* SSB Periodicity in msec */
    uint8_t     ssbSubcOffset;    /* Subcarrier Offset(Kssb) */
    uint32_t    nSSBMask[SCH_SSB_MASK_SIZE];      /* Bitmap for actually transmitted SSB. */
+   
+   /*Ref:Spec 38.331 "ssb-PositionsInBurst", Value 0 in Bitmap => corresponding SS/PBCH block is not transmitted
+    *value 1 => corresponding SS/PBCH block is transmitted*/
+   uint8_t     totNumSsb;       /*S = Total Number of Actual SSB transmitted*/
 }SchSsbCfg;
 
 typedef struct bwpCfg
@@ -582,6 +594,13 @@ typedef struct pdcchCfg
 } PdcchCfg;
 /* end of SIB1 PDCCH structures */
 
+typedef struct pageCfg
+{
+   uint8_t  numPO;                    /*Derived from Ns*/
+   bool     poPresent;                /*FirstPDCCH-MonitoringPO is present or not*/
+   uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
+}PageCfg;
+
 typedef struct
 {
    /* parameters recieved from DU-APP */
@@ -592,10 +611,11 @@ typedef struct
    uint16_t sib1Mcs;
 
    /* parameters derived in scheduler */
-   uint8_t n0;
-   BwpCfg bwp;
-   PdcchCfg sib1PdcchCfg;
-   PdschCfg sib1PdschCfg;
+   uint8_t   n0;
+   BwpCfg    bwp;
+   PdcchCfg  sib1PdcchCfg;
+   PdschCfg  sib1PdschCfg;
+   PageCfg   pageCfg;         /*Config of Paging*/
 }SchSib1Cfg;
 
 typedef struct schRachCfg
@@ -760,7 +780,7 @@ typedef struct schCellCfg
    SchPlmnInfoList plmnInfoList;     /* Consits of PlmnId and Snssai list */
 #ifdef NR_TDD
    TDDCfg         tddCfg;           /* TDD Cfg */ 
-#endif   
+#endif  
 }SchCellCfg;
 
 typedef struct schCellCfgCfm
@@ -1552,6 +1572,7 @@ typedef struct schModulationInfo
 typedef struct schUeCfg
 {
    uint16_t        cellId;
+   uint8_t         duUeF1apId;
    uint16_t        crnti;
    bool macCellGrpCfgPres;
    SchMacCellGrpCfg   macCellGrpCfg;
@@ -1564,12 +1585,13 @@ typedef struct schUeCfg
    SchModulationInfo  ulModInfo;
    uint8_t            numLcs;
    SchLcCfg           schLcCfg[MAX_NUM_LC];
+   SchDataTransmission dataTransmissionInfo;
 }SchUeCfg;
 
 typedef struct schUeCfgRsp
 {
-   uint16_t   ueId;
    uint16_t   cellId;
+   uint16_t   duUeF1apId;
    uint16_t   crnti;
    SchMacRsp  rsp;
    SchFailureCause cause;