Merge "[Epic-ID: ODUHIGH-516][Task-ID: ODUHIGH-531] RIC Subscription Modification...
[o-du/l2.git] / src / cm / du_app_mac_inf.h
index c7f88d6..9e5ee54 100644 (file)
@@ -90,6 +90,8 @@
 #define EVENT_MAC_UE_SYNC_STATUS_IND 227
 #define EVENT_MAC_DL_BROADCAST_REQ   228
 #define EVENT_MAC_STATISTICS_REQ     229
+#define EVENT_MAC_STATISTICS_RSP     230
+#define EVENT_MAC_STATISTICS_IND     231
 
 #define BSR_PERIODIC_TIMER_SF_10 10
 #define BSR_RETX_TIMER_SF_320 320
@@ -1853,18 +1855,50 @@ typedef struct macDlBroadcastReq
     SiSchedulingInfo **siSchedulingInfo;
 }MacDlBroadcastReq;
 
-typedef struct macStatsInfo
+typedef struct macStatsGrpInfo
 {
-   MacMeasurementType type;
-   uint16_t           periodicity;  /* In milliseconds */
-}MacStatsInfo;
+   uint8_t   groupId;
+   uint16_t  periodicity;  /* In milliseconds */
+   uint8_t   numStats;
+   MacMeasurementType statsList[MAX_NUM_STATS];
+}MacStatsGrpInfo;
 
 typedef struct macStatsReq
 {
-   uint8_t   numStats;
-   MacStatsInfo statsList[MAX_NUM_STATS];
+   uint64_t          subscriptionId;
+   uint8_t           numStatsGroup;
+   MacStatsGrpInfo   statsGrpList[MAX_NUM_STATS_GRP];
 }MacStatsReq;
 
+typedef struct macStatsGrpRejected
+{
+   uint8_t  groupId;
+   CauseOfResult cause;
+}MacStatsGrpRejected;
+
+typedef struct macStatsRsp
+{
+   uint64_t             subscriptionId;
+   uint8_t              numGrpAccepted;
+   uint8_t              statsGrpAcceptedList[MAX_NUM_STATS_GRP];
+   uint8_t              numGrpRejected;
+   MacStatsGrpRejected  statsGrpRejectedList[MAX_NUM_STATS_GRP];
+}MacStatsRsp;
+
+typedef struct macStats
+{
+   MacMeasurementType type;
+   double value;
+}MacStats;
+
+typedef struct macStatsInd
+{
+   uint64_t    subscriptionId;
+   uint8_t     groupId;
+   uint8_t     numStats;
+   MacStats    measuredStatsList[MAX_NUM_STATS];
+}MacStatsInd;
+
 /****************** FUNCTION POINTERS ********************************/
 
 /* DL broadcast req from DU APP to MAC*/
@@ -2024,6 +2058,16 @@ typedef uint8_t (*DuMacStatsReqFunc) ARGS((
       Pst *pst,
       MacStatsReq *statsReq));
 
+/* Statistics Response from MAC to DU APP */
+typedef uint8_t (*MacDuStatsRspFunc) ARGS((
+      Pst *pst,
+      MacStatsRsp *statsRsp));
+
+/* Statistics Ind from MAC to DU APP */
+typedef uint8_t (*MacDuStatsIndFunc) ARGS((
+      Pst *pst,
+      MacStatsInd *statsInd));
+
 /******************** FUNCTION DECLARATIONS ********************************/
 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
@@ -2149,6 +2193,13 @@ uint8_t packDuMacStatsReq(Pst *pst, MacStatsReq *statsReq);
 uint8_t MacProcStatsReq(Pst *pst, MacStatsReq *statsReq);
 uint8_t unpackMacStatsReq(DuMacStatsReqFunc func, Pst *pst, Buffer *mBuf);
 
+uint8_t packDuMacStatsRsp(Pst *pst, MacStatsRsp *statsRsp);
+uint8_t DuProcMacStatsRsp(Pst *pst, MacStatsRsp *statsRsp);
+uint8_t unpackDuMacStatsRsp(MacDuStatsRspFunc func, Pst *pst, Buffer *mBuf);
+
+uint8_t packDuMacStatsInd(Pst *pst, MacStatsInd *statsRsp);
+uint8_t DuProcMacStatsInd(Pst *pst, MacStatsInd *statsRsp);
+uint8_t unpackDuMacStatsInd(MacDuStatsIndFunc func, Pst *pst, Buffer *mBuf);
 #endif