CI: Add silent cmake SonarCloud scan
[o-du/l2.git] / src / cm / mac_sch_interface.h
index 58f894a..d6d42b7 100644 (file)
 #define EVENT_STATISTICS_REQ_TO_SCH  35
 #define EVENT_STATISTICS_RSP_TO_MAC  36
 #define EVENT_STATISTICS_IND_TO_MAC  37
+#define EVENT_STATISTICS_DELETE_REQ_TO_SCH  38
+#define EVENT_STATISTICS_DELETE_RSP_TO_MAC  39
+#define EVENT_STATISTICS_MODIFY_REQ_TO_SCH  40
+#define EVENT_STATISTICS_MODIFY_RSP_TO_MAC  41
 
 /*macros*/
 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
 #define MAX_PHR_REPORT 1 /*TODO: Range of PHR reports in multiple PHR.*/
 #define MAX_FAILURE_DET_RESOURCES 10 /*Spec 38.331 'maxNrofFailureDetectionResources'*/
 
+/*As per SCF222_5GFAPI, 'MaxDciPerSlot' defines this value but this parameter value is missing in Spec.*/
+#ifdef INTEL_FAPI
+   #define MAX_NUM_PDCCH 1
+#else
+   #define MAX_NUM_PDCCH 2 
+#endif
+
 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr, numOfSlot)          \
 {                                                          \
    if ((crntTime.slot + incr) > (numOfSlot - 1))           \
@@ -288,22 +299,22 @@ typedef enum
 
 typedef enum
 {
-   SLOT_PERIODICITY_AND_OFFSET_SL_1 = 1,
-   SLOT_PERIODICITY_AND_OFFSET_SL_2,
-   SLOT_PERIODICITY_AND_OFFSET_SL_4,
-   SLOT_PERIODICITY_AND_OFFSET_SL_5,
-   SLOT_PERIODICITY_AND_OFFSET_SL_8,
-   SLOT_PERIODICITY_AND_OFFSET_SL_10,
-   SLOT_PERIODICITY_AND_OFFSET_SL_16,
-   SLOT_PERIODICITY_AND_OFFSET_SL_20,
-   SLOT_PERIODICITY_AND_OFFSET_SL_40,
-   SLOT_PERIODICITY_AND_OFFSET_SL_80,
-   SLOT_PERIODICITY_AND_OFFSET_SL_160,
-   SLOT_PERIODICITY_AND_OFFSET_SL_320,
-   SLOT_PERIODICITY_AND_OFFSET_SL_640,
-   SLOT_PERIODICITY_AND_OFFSET_SL_1280,
-   SLOT_PERIODICITY_AND_OFFSET_SL_2560
-}SchMSlotPeriodAndOffset;
+   SLOT_PERIODICITY_SL_1 = 1,
+   SLOT_PERIODICITY_SL_2,
+   SLOT_PERIODICITY_SL_4,
+   SLOT_PERIODICITY_SL_5,
+   SLOT_PERIODICITY_SL_8,
+   SLOT_PERIODICITY_SL_10,
+   SLOT_PERIODICITY_SL_16,
+   SLOT_PERIODICITY_SL_20,
+   SLOT_PERIODICITY_SL_40,
+   SLOT_PERIODICITY_SL_80,
+   SLOT_PERIODICITY_SL_160,
+   SLOT_PERIODICITY_SL_320,
+   SLOT_PERIODICITY_SL_640,
+   SLOT_PERIODICITY_SL_1280,
+   SLOT_PERIODICITY_SL_2560
+}SchMSlotPeriodicity;
 
 typedef enum
 {
@@ -613,7 +624,7 @@ typedef struct pdcchCfg
    /* coreset-0 configuration */
    CoresetCfg coresetCfg;
    uint16_t   numDlDci;
-   DlDCI      dci; /* as of now its only one DCI, later it will be numDlCi */
+   DlDCI      dci[MAX_NUM_PDCCH]; 
 } PdcchCfg;
 /* end of SIB1 PDCCH structures */
 
@@ -778,8 +789,7 @@ typedef struct schBwpUlCfg
 typedef struct schPlmnInfoList
 {
    Plmn           plmn;
-   uint8_t        numSliceSupport; /* Total slice supporting */
-   Snssai         **snssai;         /* List of supporting snssai*/
+   SupportedSliceList suppSliceList;
 }SchPlmnInfoList;
 
 #ifdef NR_DRX
@@ -1279,6 +1289,7 @@ typedef struct tbInfo
 typedef struct schPuschInfo
 {
    uint8_t          harqProcId;   /* HARQ Process ID */
+   uint16_t         crnti;
    FreqDomainAlloc  fdAlloc;      /* Freq domain allocation */
    TimeDomainAlloc  tdAlloc;      /* Time domain allocation */
    TbInfo           tbInfo;       /* TB info */
@@ -1323,6 +1334,7 @@ typedef struct schPucchFormatCfg
 
 typedef struct schPucchInfo
 {
+   uint16_t         crnti;
    FreqDomainRsrc   fdAlloc;      
    TimeDomainAlloc  tdAlloc;      
    uint8_t          srFlag;
@@ -1343,6 +1355,7 @@ typedef struct schPucchInfo
 typedef struct schPuschUci
 {
    uint8_t          harqProcId;   /* HARQ Process ID */
+   uint16_t         crnti;
    FreqDomainAlloc  fdAlloc;      /* Freq domain allocation */
    TimeDomainAlloc  tdAlloc;      /* Time domain allocation */
    TbInfo           tbInfo;       /* TB information */
@@ -1354,13 +1367,12 @@ typedef struct schPuschUci
 typedef struct ulSchedInfo
 {
    uint16_t         cellId;         /* Cell Id */
-   uint16_t         crnti;          /* CRNI */
    SlotTimingInfo   slotIndInfo;    /* Slot Info: sfn, slot number */
    uint8_t          dataType;       /* Type of info being scheduled */
    SchPrachInfo     prachSchInfo;   /* Prach scheduling info */
-   SchPuschInfo     schPuschInfo;   /* Pusch scheduling info */
-   SchPuschUci      schPuschUci;    /* Pusch Uci */
-   SchPucchInfo     schPucchInfo;   /* Pucch and Uci scheduling info */
+   SchPuschInfo     schPuschInfo[MAX_NUM_UE];   /* Pusch scheduling info */
+   SchPuschUci      schPuschUci[MAX_NUM_UE];    /* Pusch Uci */
+   SchPucchInfo     schPucchInfo[MAX_NUM_UE];   /* Pucch and Uci scheduling info */
 }UlSchedInfo;
 
 /* Info of Scheduling Request to Add/Modify */
@@ -1438,6 +1450,13 @@ typedef struct schControlRsrcSet
    uint16_t            dmrsScramblingId;
 }SchControlRsrcSet;
 
+/*Slot Perioicity and Offset*/
+typedef struct schMSlotPeriodAndOffset
+{
+   SchMSlotPeriodicity  mSlotPeriodicity;
+   uint16_t             mSlotOffset;
+}SchMSlotPeriodAndOffset;
+
 /* Search Space info */
 typedef struct schSearchSpace
 {
@@ -1972,7 +1991,6 @@ typedef struct schModulationInfo
 typedef struct schUeCfgReq
 {
    uint16_t           cellId;
-   uint8_t            ueId;
    uint8_t            beamIdx; 
    uint16_t           crnti;
    bool               macCellGrpCfgPres;
@@ -1992,7 +2010,6 @@ typedef struct schUeCfgReq
 typedef struct schUeRecfgReq
 {
    uint16_t         cellId;
-   uint8_t          ueId;
    uint8_t          beamIdx;
    uint16_t         crnti;
    bool             macCellGrpRecfgPres;
@@ -2021,7 +2038,6 @@ typedef struct schUeCfgRsp
 {
    uint16_t   cellId;
    uint8_t    beamIdx;
-   uint16_t   ueId;
    uint16_t   crnti;
    SchMacRsp  rsp;
    CauseOfResult cause;
@@ -2248,30 +2264,79 @@ typedef struct schRlsHqInfo
    SchUeHqInfo  *ueHqInfo;
 }SchRlsHqInfo;
 
-typedef struct schStatsInfo
+/* Statistics Request from MAC to SCH */
+typedef struct schStatsGrpInfo
 {
-   SchMeasurementType type;
-   uint16_t           periodicity;  /* In milliseconds */
-}SchStatsInfo;
+   uint8_t   groupId;
+   uint16_t  periodicity;  /* In milliseconds */
+   uint8_t   numStats;
+   SchMeasurementType statsList[MAX_NUM_STATS];
+}SchStatsGrpInfo;
 
 typedef struct schStatsReq
 {
-   uint8_t   numStats;
-   SchStatsInfo statsList[MAX_NUM_STATS];
+   uint64_t  subscriptionId;
+   uint8_t   numStatsGroup;
+   SchStatsGrpInfo   statsGrpList[MAX_NUM_STATS_GRP];
 }SchStatsReq;
 
-typedef struct schStatsRsp
+typedef struct schStatsReq SchStatsModificationReq;
+typedef struct schStatsRsp SchStatsModificationRsp;
+
+/* Statistics Response from SCH to MAC */
+typedef struct schStatsGrpRejected
 {
-   SchMacRsp rsp; 
+   uint8_t   groupId;
    CauseOfResult cause;
+}SchStatsGrpRejected;
+
+typedef struct schStatsRsp
+{
+   uint64_t             subscriptionId;
+   uint8_t              numGrpAccepted;
+   uint8_t              statsGrpAcceptedList[MAX_NUM_STATS_GRP];
+   uint8_t              numGrpRejected;
+   SchStatsGrpRejected  statsGrpRejectedList[MAX_NUM_STATS_GRP];
 }SchStatsRsp;
 
-typedef struct schStatsInd
+/* Statistics Indication from SCH to MAC */
+typedef struct schStats
 {
    SchMeasurementType type;
    double value;
+}SchStats;
+
+typedef struct schStatsInd
+{
+   uint64_t    subscriptionId;
+   uint8_t     groupId;
+   uint8_t     numStats;
+   SchStats    measuredStatsList[MAX_NUM_STATS];
 }SchStatsInd;
 
+typedef struct schStatsDeleteReq
+{
+   uint64_t  subscriptionId;
+   uint8_t   numStatsGroupToBeDeleted;
+   uint8_t   statsGrpIdToBeDelList[MAX_NUM_STATS_GRP];
+}SchStatsDeleteReq;
+
+typedef struct statsDeleteResult
+{
+   uint8_t       groupId;
+   SchMacRsp     statsGrpDelRsp;
+   CauseOfResult statsGrpDelCause;
+}StatsDeleteResult;
+
+typedef struct schStatsDeleteRsp
+{
+   uint64_t          subscriptionId; /* subscription Id */
+   SchMacRsp         subsDelRsp;    /* deletion status of all statsGrp with given subscriptionId */
+   CauseOfResult     subsDelCause;  /* cause of failure in deletion of all statsGrp with given subscriptionId*/
+   uint8_t           numStatsGroupDeleted; /* num of action deleted */ 
+   StatsDeleteResult statsGrpDelInfo[MAX_NUM_STATS_GRP]; /* list of the deletion status for specific actions */
+}SchStatsDeleteRsp;
+
 /* function declarations */
 uint8_t MacMessageRouter(Pst *pst, void *msg);
 uint8_t SchMessageRouter(Pst *pst, void *msg);