X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fdu_app_mac_inf.h;h=dc13eab9b607e2f80c736afa3bb0c062ced3684b;hb=a6ec34e2927a6167f62cf18fe60c46113bcfc019;hp=7cb7897006bdc280611a264558712d518ee13cf4;hpb=47a15faec02b721d3e466815eb388fea0a209e3c;p=o-du%2Fl2.git diff --git a/src/cm/du_app_mac_inf.h b/src/cm/du_app_mac_inf.h index 7cb789700..dc13eab9b 100644 --- a/src/cm/du_app_mac_inf.h +++ b/src/cm/du_app_mac_inf.h @@ -89,6 +89,13 @@ #define EVENT_MAC_UE_RESET_RSP 226 #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 EVENT_MAC_STATS_DELETE_REQ 232 +#define EVENT_MAC_STATS_DELETE_RSP 233 +#define EVENT_MAC_STATISTICS_MODIFY_REQ 234 +#define EVENT_MAC_STATISTICS_MODIFY_RSP 235 #define BSR_PERIODIC_TIMER_SF_10 10 #define BSR_RETX_TIMER_SF_320 320 @@ -97,6 +104,10 @@ #define PAGING_SCHED_DELTA 4 #define MAX_PLMN 2 +/********************* Global Variable ********************/ +uint64_t ueBitMapPerCell[MAX_NUM_CELL]; /* Bit Map to store used/free UE-IDX per Cell */ + +/********************* Interface structure definition ********************/ typedef enum { SIB_TYPE2, @@ -353,22 +364,22 @@ typedef enum typedef enum { - SLOTPERIODICITYANDOFFSET_PR_SL1 = 1, - SLOTPERIODICITYANDOFFSET_PR_SL2, - SLOTPERIODICITYANDOFFSET_PR_SL4, - SLOTPERIODICITYANDOFFSET_PR_SL5, - SLOTPERIODICITYANDOFFSET_PR_SL8, - SLOTPERIODICITYANDOFFSET_PR_SL10, - SLOTPERIODICITYANDOFFSET_PR_SL16, - SLOTPERIODICITYANDOFFSET_PR_SL20, - SLOTPERIODICITYANDOFFSET_PR_SL40, - SLOTPERIODICITYANDOFFSET_PR_SL80, - SLOTPERIODICITYANDOFFSET_PR_SL160, - SLOTPERIODICITYANDOFFSET_PR_SL320, - SLOTPERIODICITYANDOFFSET_PR_SL640, - SLOTPERIODICITYANDOFFSET_PR_SL1280, - SLOTPERIODICITYANDOFFSET_PR_SL2560 -}MSlotPeriodAndOffset; + SLOTPERIODICITY_PR_SL1 = 1, + SLOTPERIODICITY_PR_SL2, + SLOTPERIODICITY_PR_SL4, + SLOTPERIODICITY_PR_SL5, + SLOTPERIODICITY_PR_SL8, + SLOTPERIODICITY_PR_SL10, + SLOTPERIODICITY_PR_SL16, + SLOTPERIODICITY_PR_SL20, + SLOTPERIODICITY_PR_SL40, + SLOTPERIODICITY_PR_SL80, + SLOTPERIODICITY_PR_SL160, + SLOTPERIODICITY_PR_SL320, + SLOTPERIODICITY_PR_SL640, + SLOTPERIODICITY_PR_SL1280, + SLOTPERIODICITY_PR_SL2560 +}MSlotPeriodicity; typedef enum { @@ -578,6 +589,13 @@ typedef enum RESTART_TRANSMISSION }DataTransmissionAction; +/* Performance measurements from 3GPP TS 28.552 Release 15 */ +typedef enum +{ + MAC_DL_TOTAL_PRB_USAGE, + MAC_UL_TOTAL_PRB_USAGE +}MacMeasurementType; + typedef struct failureCause { CauseGrp type; @@ -593,9 +611,9 @@ typedef struct failureCause typedef struct carrierCfg { uint32_t dlBw; /* DL bandwidth */ - uint32_t dlFreq; /* Absolute frequency of DL point A in KHz */ + uint32_t arfcnDL; /* Absolute frequency Number of DL */ uint32_t ulBw; /* UL bandwidth */ - uint32_t ulFreq; /* Absolute frequency of UL point A in KHz */ + uint32_t arfcnUL; /* Absolute frequency Number of UL */ uint16_t numTxAnt; /* Number of Tx antennas */ uint16_t numRxAnt; /* Number of Rx antennas */ }CarrierCfg; @@ -631,8 +649,7 @@ typedef enum typedef struct plmnInfoList { Plmn plmn; - uint8_t numSupportedSlice; /* Total slice supporting */ - Snssai **snssai; /* List of supporting snssai*/ + SupportedSliceList suppSliceList; }PlmnInfoList; typedef struct schPageCfg @@ -992,6 +1009,12 @@ typedef struct controlRsrcSet uint16_t dmrsScramblingId; }ControlRsrcSet; +typedef struct mSlotPeriodAndOffset +{ + MSlotPeriodicity mSlotPeriodicity; + uint16_t mSlotOffset; +}MSlotPeriodAndOffset; + /* Search Space info */ typedef struct searchSpace { @@ -1841,6 +1864,78 @@ typedef struct macDlBroadcastReq SiSchedulingInfo **siSchedulingInfo; }MacDlBroadcastReq; +typedef struct macStatsGrpInfo +{ + uint8_t groupId; + uint16_t periodicity; /* In milliseconds */ + uint8_t numStats; + MacMeasurementType statsList[MAX_NUM_STATS]; +}MacStatsGrpInfo; + +typedef struct macStatsReq +{ + 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; + +typedef struct macStatsDeleteReq +{ + uint64_t subscriptionId; + uint8_t numStatsGroupToBeDeleted; + uint8_t statsGrpIdToBeDelList[MAX_NUM_STATS_GRP]; +}MacStatsDeleteReq; + +typedef struct macStatsDeleteInfo +{ + uint8_t groupId; + MacRsp statsGrpDelRsp; + CauseOfResult statsGrpDelCause; +}MacStatsDeleteInfo; + +typedef struct macStatsDeleteRsp +{ + uint64_t subscriptionId; /* subscription Id */ + MacRsp 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; /* number of actions to deleted */ + MacStatsDeleteInfo statsGrpDelInfo[MAX_NUM_STATS_GRP]; /*list of the deletion statuses for specific actions */ +}MacStatsDeleteRsp; + +typedef struct macStatsReq MacStatsModificationReq; +typedef struct macStatsRsp MacStatsModificationRsp; + +/****************** FUNCTION POINTERS ********************************/ + /* DL broadcast req from DU APP to MAC*/ typedef uint8_t (*DuMacDlBroadcastReq) ARGS(( Pst *pst, @@ -1993,98 +2088,191 @@ 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 */ - +/* Statitics Request from DU APP to MAC */ +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)); + +/* Statitics Delete Request from DU APP to MAC */ +typedef uint8_t (*DuMacStatsDeleteReqFunc) ARGS(( + Pst *pst, + MacStatsDeleteReq *statsDeleteReq)); + +/* Statistics Delete Response from MAC to DU APP */ +typedef uint8_t (*MacDuStatsDeleteRspFunc) ARGS(( + Pst *pst, + MacStatsDeleteRsp *statsDeleteRsp)); + +/* Statitics Modification Request from DU APP to MAC */ +typedef uint8_t (*DuMacStatsModificationReqFunc) ARGS(( + Pst *pst, + MacStatsModificationReq *statsModificationReq)); + +/* Statistics Modification Response from MAC to DU APP */ +typedef uint8_t (*MacDuStatsModificationRspFunc) ARGS(( + Pst *pst, + MacStatsModificationRsp *statsModificationRsp)); + +/******************** FUNCTION DECLARATIONS ********************************/ uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId); uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf); uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId); + uint8_t packMacCellStart(Pst *pst, CellStartInfo *cellStartInfo); uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf); uint8_t MacProcCellStart(Pst *pst, CellStartInfo *cellStartInfo); + uint8_t packMacCellStop(Pst *pst, CellStopInfo *cellStopInfo); uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf); uint8_t MacProcCellStop(Pst *pst, CellStopInfo *cellStopInfo); + uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg); uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf); uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg); + uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm); uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf); uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm); + uint8_t packMacStopInd(Pst *pst, OduCellId *cellId); uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf); uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId); +uint8_t sendStopIndMacToDuApp(uint16_t cellId); + uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo); uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf); 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, MacUeCreateReq *ueCfg); uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf); uint8_t MacProcUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg); -uint8_t sendStopIndMacToDuApp(uint16_t cellId); + 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); + uint8_t packDuMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp); uint8_t unpackDuMacUeRecfgRsp(MacDuUeRecfgRspFunc func, Pst *pst, Buffer *mBuf); uint8_t DuProcMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp); + uint8_t packDuMacRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq); uint8_t unpackMacRachRsrcReq(DuMacRachRsrcReq func, Pst *pst, Buffer *mBuf); 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); + uint8_t packDuMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp); uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp); uint8_t unpackDuMacUeDeleteRsp(MacDuUeDeleteRspFunc func, Pst *pst, Buffer *mBuf); + uint8_t packDuMacCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete); uint8_t MacProcCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete); uint8_t unpackMacCellDeleteReq(DuMacCellDeleteReq func, Pst *pst, Buffer *mBuf); + uint8_t packDuMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp); uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp); uint8_t unpackDuMacCellDeleteRsp(MacDuCellDeleteRspFunc func, Pst *pst, Buffer *mBuf); + uint8_t packDuMacSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq); uint8_t MacProcSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq); uint8_t unpackMacSliceCfgReq(DuMacSliceCfgReq func, Pst *pst, Buffer *mBuf); + uint8_t DuProcMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp); uint8_t packDuMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp); uint8_t unpackDuMacSliceCfgRsp(MacDuSliceCfgRspFunc func, Pst *pst, Buffer *mBuf); + uint8_t packDuMacSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq); uint8_t MacProcSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq); uint8_t unpackMacSliceRecfgReq(DuMacSliceRecfgReq func, Pst *pst, Buffer *mBuf); + uint8_t DuProcMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp); uint8_t packDuMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp); uint8_t unpackDuMacSliceRecfgRsp(MacDuSliceRecfgRspFunc func, Pst *pst, Buffer *mBuf); + 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, DlPcchInd *pcchInd); uint8_t MacProcDlPcchInd(Pst *pst, DlPcchInd *pcchInd); uint8_t unpackMacDlPcchInd(DuMacDlPcchInd func, Pst *pst, Buffer *mBuf); + int8_t getFreeBitFromUeBitMap(uint16_t cellId); void unsetBitInUeBitMap(uint16_t cellId, uint8_t bitPos); + uint8_t packDuMacUeResetReq(Pst *pst, MacUeResetReq *ueReset); uint8_t MacProcUeResetReq(Pst *pst, MacUeResetReq *ueReset); 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); + uint8_t packDuMacDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq); uint8_t MacProcDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq); uint8_t unpackMacDlBroadcastReq(DuMacDlBroadcastReq func, Pst *pst, Buffer *mBuf); + +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); + +uint8_t packDuMacStatsDeleteReq(Pst *pst, MacStatsDeleteReq *statsDeleteReq); +uint8_t MacProcStatsDeleteReq(Pst *pst, MacStatsDeleteReq *statsDeleteReq); +uint8_t unpackMacStatsDeleteReq(DuMacStatsDeleteReqFunc func, Pst *pst, Buffer *mBuf); + +uint8_t packDuMacStatsDeleteRsp(Pst *pst, MacStatsDeleteRsp *statsDeleteRsp); +uint8_t DuProcMacStatsDeleteRsp(Pst *pst, MacStatsDeleteRsp *statsDeleteRsp); +uint8_t unpackDuMacStatsDeleteRsp(MacDuStatsDeleteRspFunc func, Pst *pst, Buffer *mBuf); + +uint8_t packDuMacStatsModificationReq(Pst *pst, MacStatsModificationReq *statsModificationReq); +uint8_t MacProcStatsModificationReq(Pst *pst, MacStatsModificationReq *statsModificationReq); +uint8_t unpackMacStatsModificationReq(DuMacStatsModificationReqFunc func, Pst *pst, Buffer *mBuf); + +uint8_t packDuMacStatsModificationRsp(Pst *pst, MacStatsModificationRsp *statsModificationRsp); +uint8_t DuProcMacStatsModificationRsp(Pst *pst, MacStatsModificationRsp *statsModificationRsp); +uint8_t unpackDuMacStatsModificationRsp(MacDuStatsModificationRspFunc func, Pst *pst, Buffer *mBuf); + + #endif