From 9625bef129812dfbc9b0a55ee52395c2fa7fbd93 Mon Sep 17 00:00:00 2001 From: "lal.harshita" Date: Tue, 14 Mar 2023 10:23:50 +0530 Subject: [PATCH] [Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-501] WG8 Alignment | Added Skeleton for UL CQI, DL CQI and PHR between MAC and SCH Signed-off-by: lal.harshita Change-Id: I0c28dcb254ae3a5b881306ca7de6138547d2de7b --- src/5gnrmac/mac_msg_hdl.c | 72 +++++++ src/5gnrsch/sch.c | 195 +++++++++++++++++ src/5gnrsch/sch.h | 7 + src/5gnrsch/sch_common.c | 6 +- src/5gnrsch/sch_msg_router.c | 31 ++- src/5gnrsch/sch_slot_ind.c | 4 +- src/5gnrsch/sch_ue_mgr.c | 16 +- src/cm/du_app_mac_inf.h | 147 +++++++++++-- src/cm/mac_sch_interface.h | 497 ++++++++++++++++++++++++++++++------------- 9 files changed, 797 insertions(+), 178 deletions(-) diff --git a/src/5gnrmac/mac_msg_hdl.c b/src/5gnrmac/mac_msg_hdl.c index 6939b8c3b..d36792a55 100644 --- a/src/5gnrmac/mac_msg_hdl.c +++ b/src/5gnrmac/mac_msg_hdl.c @@ -86,6 +86,78 @@ uint8_t sendCrcIndMacToSch(CrcIndInfo *crcInd) return(SchMessageRouter(&pst, (void *)crcInd)); } +/******************************************************************* + * + * @brief Sends UL CQI Indication to SCH + * + * @details + * + * Function : sendUlCqiIndMacToSch + * + * Functionality: + * Sends Ul Cqi Indication to SCH + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + ****************************************************************/ +uint8_t sendUlCqiIndMacToSch(SchUlCqiInd *ulCqiInd) +{ + Pst pst; + + FILL_PST_MAC_TO_SCH(pst, EVENT_UL_CQI_TO_SCH); + return(SchMessageRouter(&pst, (void *)ulCqiInd)); +} + +/******************************************************************* + * + * @brief Sends DL CQI Indication to SCH + * + * @details + * + * Function : sendDlCqiIndMacToSch + * + * Functionality: + * Sends Dl Cqi Indication to SCH + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + ****************************************************************/ +uint8_t sendDlCqiIndMacToSch(SchDlCqiInd *dlCqiInd) +{ + Pst pst; + + FILL_PST_MAC_TO_SCH(pst, EVENT_DL_CQI_TO_SCH); + return(SchMessageRouter(&pst, (void *)dlCqiInd)); +} + +/******************************************************************* + * + * @brief Sends Power Headroom Indication to SCH + * + * @details + * + * Function : sendPhrIndToSch + * + * Functionality: + * Sends Phr Indication to SCH + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + ****************************************************************/ +uint8_t sendPhrIndToSch(SchPwrHeadroomInd *macPhrInd) +{ + Pst pst; + + FILL_PST_MAC_TO_SCH(pst, EVENT_PHR_IND_TO_SCH); + return(SchMessageRouter(&pst, (void *)macPhrInd)); +} + /******************************************************************* * * @brief Processes CRC Indication from PHY diff --git a/src/5gnrsch/sch.c b/src/5gnrsch/sch.c index cc2af0e97..7edd709a0 100644 --- a/src/5gnrsch/sch.c +++ b/src/5gnrsch/sch.c @@ -2334,6 +2334,201 @@ RgMngmt *cfm return; } +/******************************************************************* + * + * @brief Processes DL CQI ind from MAC + * + * @details + * + * Function : SchProcDlCqiInd + * + * Functionality: + * Processes DL CQI ind from MAC + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t SchProcDlCqiInd(Pst *pst, SchDlCqiInd *dlCqiInd) +{ + uint8_t ret = ROK; + uint16_t ueId = 0, cellIdx = 0; + SchUeCb *ueCb = NULLP; + SchCellCb *cell = NULLP; + Inst inst = pst->dstInst-SCH_INST_START; + + if(!dlCqiInd) + { + DU_LOG("\nERROR --> SCH : SchProcDlCqiInd(): CQI Ind is empty"); + ret = RFAILED; + } + else + { + GET_CELL_IDX(dlCqiInd->cellId, cellIdx); + cell = schCb[inst].cells[cellIdx]; + if(cell == NULLP) + { + DU_LOG("\nERROR --> SCH : SchProcDlCqiInd(): cell Id[%d] not found", dlCqiInd->cellId); + ret = RFAILED; + } + else + { + if(cell->cellId == dlCqiInd->cellId) + { + GET_UE_ID(dlCqiInd->crnti, ueId); + ueCb = &cell->ueCb[ueId-1]; + if(ueCb->crnti != dlCqiInd->crnti) + { + DU_LOG("\nERROR --> SCH : SchProcDlCqiInd(): UeCb for received crnti[%d] not found", dlCqiInd->crnti); + ret = RFAILED; + } + else + { + /*TODO: complete the processing of DL CQI Ind*/ + } + } + else + { + DU_LOG("\nERROR --> SCH : SchProcDlCqiInd(): Received cell Id[%d] from MAC is not matching with CellID[%d] in SCH Cb",\ + dlCqiInd->cellId, cell->cellId); + ret = RFAILED; + } + } + } + return ret; +} + +/******************************************************************* + * + * @brief Processes UL CQI ind from MAC + * + * @details + * + * Function : SchProcUlCqiInd + * + * Functionality: + * Processes UL CQI ind from MAC + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t SchProcUlCqiInd(Pst *pst, SchUlCqiInd *ulCqiInd) +{ + uint8_t ret = ROK; + uint16_t ueId = 0, cellIdx = 0; + SchUeCb *ueCb = NULLP; + SchCellCb *cell = NULLP; + Inst inst = pst->dstInst-SCH_INST_START; + + if(!ulCqiInd) + { + DU_LOG("\nERROR --> SCH : SchProcUlCqiInd(): CQI Ind is empty"); + ret = RFAILED; + } + else + { + GET_CELL_IDX(ulCqiInd->cellId, cellIdx); + cell = schCb[inst].cells[cellIdx]; + if(cell == NULLP) + { + DU_LOG("\nERROR --> SCH : SchProcUlCqiInd(): cell Id[%d] not found", ulCqiInd->cellId); + ret = RFAILED; + } + else + { + if(cell->cellId == ulCqiInd->cellId) + { + GET_UE_ID(ulCqiInd->crnti, ueId); + ueCb = &cell->ueCb[ueId-1]; + if(ueCb->crnti != ulCqiInd->crnti) + { + DU_LOG("\nERROR --> SCH : SchProcUlCqiInd(): UeCb for received crnti[%d] not found",ulCqiInd->crnti); + ret = RFAILED; + } + else + { + /*TODO: complete the processing of UL CQI Ind*/ + } + } + else + { + DU_LOG("\nERROR --> SCH : SchProcUlCqiInd(): Received cell Id[%d] from MAC is not matching with CellId[%d] in SCH Cb",\ + ulCqiInd->cellId, cell->cellId); + ret = RFAILED; + } + } + } + return ret; +} + +/******************************************************************* + * + * @brief Processes PHR ind from MAC + * + * @details + * + * Function : SchProcPhrInd + * + * Functionality: + * Processes PHR ind from MAC + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t SchProcPhrInd(Pst *pst, SchPwrHeadroomInd *schPhrInd) +{ + uint8_t ret = ROK; + uint16_t ueId = 0, cellIdx = 0; + SchUeCb *ueCb = NULLP; + SchCellCb *cell = NULLP; + Inst inst = pst->dstInst-SCH_INST_START; + + if(!schPhrInd) + { + DU_LOG("\nERROR --> SCH : SchProcPhrInd(): PHR is empty"); + ret = RFAILED; + } + else + { + GET_CELL_IDX(schPhrInd->cellId, cellIdx); + cell = schCb[inst].cells[cellIdx]; + if(cell == NULLP) + { + DU_LOG("\nERROR --> SCH : schProcPhrInd(): cell Id[%d] is not found", schPhrInd->cellId); + ret = RFAILED; + } + else + { + if(cell->cellId == schPhrInd->cellId) + { + GET_UE_ID(schPhrInd->crnti, ueId); + ueCb = &cell->ueCb[ueId-1]; + if(ueCb->crnti != schPhrInd->crnti) + { + DU_LOG("\nERROR --> SCH : SchProcPhrInd(): UeCb for received crnti[%d] not found",schPhrInd->crnti); + ret = RFAILED; + } + else + { + /*TODO: complete the processing of PHR Ind*/ + } + } + else + { + DU_LOG("\nERROR --> SCH : SchProcPhrInd(): Mismatch between Received cell Id[%d] from MAC and CellID[%d] in SCH CB ",\ + schPhrInd->cellId, cell->cellId); + ret = RFAILED; + } + } + } + return ret; +} + /********************************************************************** End of file **********************************************************************/ diff --git a/src/5gnrsch/sch.h b/src/5gnrsch/sch.h index dda54989e..379bb270e 100644 --- a/src/5gnrsch/sch.h +++ b/src/5gnrsch/sch.h @@ -491,6 +491,10 @@ typedef struct schUeCb bool ueDrxInfoPres; SchDrxUeCb drxUeCb; #endif + bool k0K1TblPrsnt; + SchK0K1TimingInfoTbl k0K1InfoTbl; + bool k2TblPrsnt; + SchK2TimingInfoTbl k2InfoTbl; }SchUeCb; /** @@ -680,6 +684,9 @@ uint8_t SchProcCellCfgReq(Pst *pst, SchCellCfg *schCellCfg); uint8_t SchProcSlotInd(Pst *pst, SlotTimingInfo *slotInd); uint8_t SchProcRachInd(Pst *pst, RachIndInfo *rachInd); uint8_t SchProcCrcInd(Pst *pst, CrcIndInfo *crcInd); +uint8_t SchProcUlCqiInd(Pst *pst, SchUlCqiInd *ulCqiInd); +uint8_t SchProcDlCqiInd(Pst *pst, SchDlCqiInd *dlCqiInd); +uint8_t SchProcPhrInd(Pst *pst, SchPwrHeadroomInd *schPhrInd); uint8_t SchProcDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo); uint8_t SchAddUeConfigReq(Pst *pst, SchUeCfgReq *ueCfgToSch); uint8_t SchProcBsr(Pst *pst, UlBufferStatusRptInd *bsrInd); diff --git a/src/5gnrsch/sch_common.c b/src/5gnrsch/sch_common.c index f86c20ae6..c2f25cf5e 100644 --- a/src/5gnrsch/sch_common.c +++ b/src/5gnrsch/sch_common.c @@ -1983,8 +1983,8 @@ bool schProcessSrOrBsrReq(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId if(schGetSlotSymbFrmt(dciTime.slot, cell->slotFrmtBitMap) == DL_SLOT) #endif { - if(ueCb->ueCfg.spCellCfg.servCellRecfg.initUlBwp.k2TblPrsnt) - k2InfoTbl = &ueCb->ueCfg.spCellCfg.servCellRecfg.initUlBwp.k2InfoTbl; + if(ueCb->k2TblPrsnt) + k2InfoTbl = &ueCb->k2InfoTbl; else k2InfoTbl = &cell->k2InfoTbl; @@ -1992,7 +1992,7 @@ bool schProcessSrOrBsrReq(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId { k2Index = k2InfoTbl->k2TimingInfo[dciTime.slot].k2Indexes[k2TblIdx]; - if(!ueCb->ueCfg.spCellCfg.servCellRecfg.initUlBwp.k2TblPrsnt) + if(!ueCb->k2TblPrsnt) { k2Val = cell->cellCfg.ulCfgCommon.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[k2Index].k2; startSymb = cell->cellCfg.ulCfgCommon.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[k2Index].startSymbol; diff --git a/src/5gnrsch/sch_msg_router.c b/src/5gnrsch/sch_msg_router.c index c4385ee4c..edb21b881 100755 --- a/src/5gnrsch/sch_msg_router.c +++ b/src/5gnrsch/sch_msg_router.c @@ -102,6 +102,20 @@ void callFlowSchMsgRouter(Pst *pst) strcpy(message,"EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH"); break; } + case EVENT_UL_CQI_TO_SCH: + { + strcpy(message,"EVENT_UL_CQI_TO_SCH"); + break; + } + case EVENT_DL_CQI_TO_SCH: + { + strcpy(message,"EVENT_DL_CQI_TO_SCH"); + break; + } + case EVENT_PHR_IND_TO_SCH + { + strcpy(message,"EVENT_PHR_IND_TO_SCH"); + } case EVENT_RACH_IND_TO_SCH: { strcpy(message,"EVENT_RACH_IND_TO_SCH"); @@ -179,7 +193,7 @@ uint8_t SchMessageRouter(Pst *pst, void *msg) switch(pst->event) { case EVENT_SCH_GEN_CFG: - { + { SchProcGenCfgReq(pst, (RgMngmt *)msg); break; } @@ -213,6 +227,21 @@ uint8_t SchMessageRouter(Pst *pst, void *msg) SchModUeConfigReq(pst, (SchUeRecfgReq *)msg); break; } + case EVENT_UL_CQI_TO_SCH: + { + SchProcUlCqiInd(pst, (SchUlCqiInd *)msg); + break; + } + case EVENT_DL_CQI_TO_SCH: + { + SchProcDlCqiInd(pst, (SchDlCqiInd *)msg); + break; + } + case EVENT_PHR_IND_TO_SCH: + { + SchProcPhrInd(pst, (SchPwrHeadroomInd *)msg); + break; + } case EVENT_RACH_IND_TO_SCH: { SchProcRachInd(pst, (RachIndInfo *)msg); diff --git a/src/5gnrsch/sch_slot_ind.c b/src/5gnrsch/sch_slot_ind.c index 74574ebd9..00ea9b933 100644 --- a/src/5gnrsch/sch_slot_ind.c +++ b/src/5gnrsch/sch_slot_ind.c @@ -111,7 +111,7 @@ bool schFillBoGrantDlSchedInfo(SchCellCb *cell, SlotTimingInfo currTime, uint8_t } } - if(findValidK0K1Value(cell, currTime, ueId, ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.k0K1TblPrsnt,\ + if(findValidK0K1Value(cell, currTime, ueId, ueCb->k0K1TblPrsnt,\ &pdschStartSymbol, &pdschNumSymbols, &pdcchTime, &pdschTime, &pucchTime, isRetx, *hqP) != true ) { /* If a valid combination of slots to scheduled PDCCH, PDSCH and PUCCH is @@ -436,7 +436,7 @@ bool findValidK0K1Value(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId, if(dedMsg == true) { ueCb = &cell->ueCb[ueId-1]; - k0K1InfoTbl = &ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.k0K1InfoTbl; + k0K1InfoTbl = &ueCb->k0K1InfoTbl; } else { diff --git a/src/5gnrsch/sch_ue_mgr.c b/src/5gnrsch/sch_ue_mgr.c index d28babbb3..f6b49fac3 100644 --- a/src/5gnrsch/sch_ue_mgr.c +++ b/src/5gnrsch/sch_ue_mgr.c @@ -374,14 +374,14 @@ uint8_t fillSchUeCbFrmCfgReq(Inst inst, SchUeCb *ueCb, SchUeCfgReq *ueCfg) { if(dlDataToUlAck) { - BuildK0K1Table(ueCb->cellCb, &ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.k0K1InfoTbl, false, pdschCfg,\ + BuildK0K1Table(ueCb->cellCb, &ueCb->k0K1InfoTbl, false, pdschCfg,\ ueCfg->spCellCfg.servCellCfg.initDlBwp.pdschCfg, dlDataToUlAck->dlDataToUlAckListCount,\ dlDataToUlAck->dlDataToUlAckList); - ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.k0K1TblPrsnt = true; + ueCb->k0K1TblPrsnt = true; BuildK2InfoTable(ueCb->cellCb, ueCfg->spCellCfg.servCellCfg.initUlBwp.puschCfg.timeDomRsrcAllocList,\ ueCfg->spCellCfg.servCellCfg.initUlBwp.puschCfg.numTimeDomRsrcAlloc,\ - NULLP, &ueCb->ueCfg.spCellCfg.servCellRecfg.initUlBwp.k2InfoTbl); - ueCb->ueCfg.spCellCfg.servCellRecfg.initUlBwp.k2TblPrsnt = true; + NULLP, &ueCb->k2InfoTbl); + ueCb->k2TblPrsnt = true; } } } @@ -552,14 +552,14 @@ uint8_t fillSchUeCbFrmRecfgReq(Inst inst, SchUeCb *ueCb, SchUeRecfgReq *ueRecfg) { if(dlDataToUlAck) { - BuildK0K1Table(ueCb->cellCb, &ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.k0K1InfoTbl, false, pdschCfg,\ + BuildK0K1Table(ueCb->cellCb, &ueCb->k0K1InfoTbl, false, pdschCfg,\ ueRecfg->spCellRecfg.servCellRecfg.initDlBwp.pdschCfg, dlDataToUlAck->dlDataToUlAckListCount,\ dlDataToUlAck->dlDataToUlAckList); - ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.k0K1TblPrsnt = true; + ueCb->k0K1TblPrsnt = true; BuildK2InfoTable(ueCb->cellCb, ueRecfg->spCellRecfg.servCellRecfg.initUlBwp.puschCfg.timeDomRsrcAllocList,\ ueRecfg->spCellRecfg.servCellRecfg.initUlBwp.puschCfg.numTimeDomRsrcAlloc,\ - NULLP, &ueCb->ueCfg.spCellCfg.servCellRecfg.initUlBwp.k2InfoTbl); - ueCb->ueCfg.spCellCfg.servCellRecfg.initUlBwp.k2TblPrsnt = true; + NULLP, &ueCb->k2InfoTbl); + ueCb->k2TblPrsnt = true; } } } diff --git a/src/cm/du_app_mac_inf.h b/src/cm/du_app_mac_inf.h index 998de688d..1cfa22353 100644 --- a/src/cm/du_app_mac_inf.h +++ b/src/cm/du_app_mac_inf.h @@ -562,6 +562,14 @@ typedef enum CELL_ACTIVE, }MacCellState; +/*Spec Ref: 38.331: RadioLinkMonitoringConfig*/ +typedef enum +{ + BeamFailure, + Rlf, + Both +}PurposeOfFailureDet; + typedef struct plmnInfoList { Plmn plmn; @@ -994,15 +1002,51 @@ typedef struct initialDlBwp PdschConfig pdschCfg; }InitialDlBwp; -/* BWP Downlink common */ -typedef struct bwpDlCommon +/*Spec 38.331 "SPS-Config'*/ +typedef struct spsConfig +{ + uint16_t periodicity; + uint8_t numOfHqProcess; + uint8_t n1PucchAN; + McsTable mcsTable; +}SpsConfig; + +typedef uint8_t RadioLinkMonitoringRsId; + +typedef struct radioLinkMonRS +{ + RadioLinkMonitoringRsId radioLinkMonitoringRsId; + PurposeOfFailureDet purpose; + union + { + uint8_t ssbIndx; + uint8_t nzpCsiRsResId; + }detectionRes; +}RadioLinkMonRS; + +typedef struct radioLinkConfig { -}BwpDlCommon; + RadioLinkMonRS failurDetResAddModList[1]; + RadioLinkMonitoringRsId failurDetResRelList[1]; + uint8_t beamFailureInstanceMaxCount; + uint8_t beamFailureDetectionTimer; +}RadioLinkConfig; + +/* Spec 38.331, 'BWP-DownlinkDedicated'*/ +typedef struct bwpDlCfgDed +{ + PdcchConfig pdcchCfgDed; + PdschConfig pdschCfgDed; + SpsConfig spsCfgDed; + RadioLinkConfig radioLnkMonCfgDed; +}BwpDlCfgDed; /* Downlink BWP information */ typedef struct dlBwpInfo { uint8_t bwpId; + BwpDlConfig bwpCommon; + BwpDlCfgDed bwpDedicated; }DlBwpInfo; /* PDCCH Serving Cell configuration */ @@ -1216,26 +1260,88 @@ typedef struct initialUlBwp PuschCfg puschCfg; }InitialUlBwp; +typedef struct bwpUlCfgDed +{ + PucchCfg pucchCfg; + PuschCfg puschCfg; +}BwpUlCfgDed; + /* Uplink BWP information */ typedef struct ulBwpInfo { - uint8_t bwpId; + uint8_t bwpId; + BwpUlConfig bwpCommon; + BwpUlCfgDed bwpDed; }UlBwpInfo; +typedef struct rachCfgGeneric +{ + uint8_t prachCfgIdx; /* PRACH config idx */ + uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */ + uint16_t msg1FreqStart; /* Msg1-FrequencyStart */ + uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */ + int16_t preambleRcvdTargetPower; /*Prach Target power received*/ + uint8_t preambleTransMax; /*Preamble Transmission Max power*/ + uint8_t pwrRampingStep; /*Power Ramping Step*/ + uint8_t raRspWindow; /* RA Response Window */ +}RachCfgGeneric; + +typedef struct raPrioritization +{ + uint8_t powerRampingStepHighPriority; + uint8_t scalingFactorBI; +}RaPrioritization; + +typedef struct bfrCsiRsRes +{ + uint8_t csrRsIndex; + uint8_t raOccList; + uint8_t raPreambleIndex; +}BfrCsiRsRes; + +typedef struct bfrSsbRes +{ + uint16_t ssbIndex; + uint8_t raPreambleIndex; +}BfrSsbRes; + +typedef struct prachResDedBfr +{ + BfrSsbRes ssb; + BfrCsiRsRes csiRs; +}PrachResDedBfr; + +/*Spec 38.331 'BeamFailureRecoveryConfig' */ +typedef struct beamFailRecoveryCfg +{ + uint8_t rootSeqIndexBfr; + RachCfgGeneric rachCfgBfr; + uint8_t rsrpThreshSsbBfr; + PrachResDedBfr candidteBeamRSList; + uint8_t ssbPerachBfr; + uint8_t raSsbOccMaskIndex; + uint8_t recoverySearchSpaceId; + RaPrioritization raPrioBfr; + uint16_t bfrTimer; + uint8_t msg1SubcSpacing; +}BeamFailRecoveryCfg; + /* Serving cell configuration */ typedef struct servCellCfgInfo { - InitialDlBwp initDlBwp; - uint8_t numDlBwpToAdd; - DlBwpInfo dlBwpToAddList[MAX_NUM_BWP]; - uint8_t firstActvDlBwpId; - uint8_t defaultDlBwpId; - uint8_t *bwpInactivityTmr; - PdschServCellCfg pdschServCellCfg; - InitialUlBwp initUlBwp; - uint8_t numUlBwpToAdd; - UlBwpInfo ulBwpToAddList[MAX_NUM_BWP]; - uint8_t firstActvUlBwpId; + InitialDlBwp initDlBwp; + RadioLinkConfig radioLinkMonConfig; + uint8_t numDlBwpToAdd; + DlBwpInfo dlBwpToAddList[MAX_NUM_BWP]; + uint8_t firstActvDlBwpId; + uint8_t defaultDlBwpId; + uint8_t *bwpInactivityTmr; + PdschServCellCfg pdschServCellCfg; + InitialUlBwp initUlBwp; + BeamFailRecoveryCfg beamFailureRecoveryCfg; + uint8_t numUlBwpToAdd; + UlBwpInfo ulBwpToAddList[MAX_NUM_BWP]; + uint8_t firstActvUlBwpId; }ServCellCfgInfo; /* Special cell configuration */ @@ -1245,14 +1351,20 @@ typedef struct spCellCfg ServCellCfgInfo servCellCfg; }SpCellCfg; +typedef struct bwpRelInfo +{ + uint8_t bwpId; +}BwpRelInfo; + /* Serving cell Re-configuration */ typedef struct servCellRecfgInfo { InitialDlBwp initDlBwp; + RadioLinkConfig radioLinkMonConfig; uint8_t numDlBwpToAddOrMod; DlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP]; uint8_t numDlBwpToRel; - DlBwpInfo dlBwpToRelList[MAX_NUM_BWP]; + BwpRelInfo dlBwpToRelList[MAX_NUM_BWP]; uint8_t firstActvDlBwpId; uint8_t defaultDlBwpId; uint8_t *bwpInactivityTmr; @@ -1261,7 +1373,7 @@ typedef struct servCellRecfgInfo uint8_t numUlBwpToAddOrMod; UlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP]; uint8_t numUlBwpToRel; - UlBwpInfo ulBwpToRelList[MAX_NUM_BWP]; + BwpRelInfo ulBwpToRelList[MAX_NUM_BWP]; uint8_t firstActvUlBwpId; }ServCellRecfgInfo; @@ -1361,6 +1473,7 @@ typedef struct macUeCfg { uint16_t cellId; uint8_t ueId; + uint8_t beamIdx; uint16_t crnti; bool macCellGrpCfgPres; MacCellGrpCfg macCellGrpCfg; diff --git a/src/cm/mac_sch_interface.h b/src/cm/mac_sch_interface.h index 3870988de..fd9554b04 100644 --- a/src/cm/mac_sch_interface.h +++ b/src/cm/mac_sch_interface.h @@ -48,6 +48,9 @@ #define EVENT_DL_PAGING_ALLOC 29 #define EVENT_DL_REL_HQ_PROC 30 #define EVENT_DL_HARQ_IND_TO_SCH 31 +#define EVENT_DL_CQI_TO_SCH 32 +#define EVENT_UL_CQI_TO_SCH 33 +#define EVENT_PHR_IND_TO_SCH 34 /*macros*/ #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */ #define SCH_SSB_MASK_SIZE 1 @@ -109,6 +112,9 @@ #define MAX_PLMN 2 #define DL_DMRS_SYMBOL_POS 4 /* Bitmap value 00000000000100 i.e. using 3rd symbol for PDSCH DMRS */ +#define MAX_PHR_REPORT 1 /*TODO: Range of PHR reports in multiple PHR.*/ +#define MAX_FAILURE_DET_RESOURCES 10 /*Spec 38.331 'maxNrofFailureDetectionResources'*/ + #define ADD_DELTA_TO_TIME(crntTime, toFill, incr, numOfSlot) \ { \ if ((crntTime.slot + incr) > (numOfSlot - 1)) \ @@ -410,6 +416,18 @@ typedef enum LONG_TRUNCATED_BSR }BsrType; +typedef enum +{ + SINGLE_ENTRY_PHR, + MULTIPLE_ENTRY_PHR +}PhrType; + +typedef enum +{ + PH_TYPE_1, + PH_TYPE_2 +}PhType; + typedef enum { FORMAT0_0, @@ -440,6 +458,19 @@ typedef enum RESTART_DATA_TRANSMISSION }SchDataTransmission; +typedef enum +{ + SchBeamFailure, + SchRlf, + SchBoth +}SchPurposeOfFailureDet; + +typedef enum +{ + CQI_PUCCH = 1, + CQI_PUSCH +}CqiUlReportType; + /*structures*/ typedef struct timeDomainAlloc { @@ -866,7 +897,7 @@ typedef struct schUlCfgCommon uint16_t schTimeAlignTimer; }SchUlCfgCommon; -/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.3.2.1*/ +/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.1 Cell Conf Request*/ typedef struct schCellCfg { uint16_t cellId; /* Cell Id */ @@ -898,6 +929,7 @@ typedef struct schCellCfg uint16_t sib1PduLen; }SchCellCfg; +/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.1 Cell Config Response*/ typedef struct schCellCfgCfm { uint16_t cellId; /* Cell Id */ @@ -905,6 +937,52 @@ typedef struct schCellCfgCfm SchFailureCause cause; }SchCellCfgCfm; +/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.2 Cell Del Req*/ +typedef struct schCellDeleteReq +{ + uint16_t cellId; +}SchCellDeleteReq; + +/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.2 Cell Del Response*/ +typedef struct schCellDeleteRsp +{ + uint16_t cellId; + SchMacRsp rsp; + SchFailureCause cause; +}SchCellDeleteRsp; + +/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.3*/ +typedef struct schRrmPolicyRatio +{ + uint8_t maxRatio; + uint8_t minRatio; + uint8_t dedicatedRatio; +}SchRrmPolicyRatio; + +typedef struct schRrmPolicyOfSlice +{ + Snssai snssai; + SchRrmPolicyRatio rrmPolicyRatioInfo; +}SchRrmPolicyOfSlice; + +typedef struct schSliceCfgReq +{ + uint8_t numOfConfiguredSlice; + SchRrmPolicyOfSlice **listOfSlices; +}SchSliceCfgReq; + +/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.3 Slice Cfg Response*/ +typedef struct schSliceCfgRsp +{ + Snssai snssai; + SchMacRsp rsp; + RspCause cause; +}SchSliceCfgRsp; + +/*As per ORAN-WG8 V7.0.0 Sec 11.2.4.3.4 , Slice Cfg and Recfg are same structures*/ +typedef struct schSliceCfgReq SchSliceRecfgReq; +typedef struct schSliceCfgRsp SchSliceRecfgRsp; + typedef struct ssbInfo { uint8_t ssbIdx; /* SSB Index */ @@ -1130,7 +1208,7 @@ typedef struct dlSchedInfo }DlSchedInfo; -/*Reference: O-RAN.WG8.AAD.v7.0.0, Sec 11.2.3.3.13 Downlink Paging Allocation*/ +/*Reference: O-RAN.WG8.AAD.v7.0.0, Sec 11.2.4.3.13 Downlink Paging Allocation*/ typedef struct interleaved_t { uint8_t regBundleSize; @@ -1285,6 +1363,7 @@ typedef struct schPuschUci CsiInfo csiInfo; /* Csi information*/ }SchPuschUci; +/* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.9 UL Scheduling Information */ typedef struct ulSchedInfo { uint16_t cellId; /* Cell Id */ @@ -1297,42 +1376,6 @@ typedef struct ulSchedInfo SchPucchInfo schPucchInfo; /* Pucch and Uci scheduling info */ }UlSchedInfo; -typedef struct rachIndInfo -{ - uint16_t cellId; - uint16_t crnti; - SlotTimingInfo timingInfo; - uint8_t slotIdx; - uint8_t symbolIdx; - uint8_t freqIdx; - uint8_t preambleIdx; - uint16_t timingAdv; -}RachIndInfo; - - -typedef struct crcIndInfo -{ - uint16_t cellId; - uint16_t crnti; - SlotTimingInfo timingInfo; - uint16_t numCrcInd; - uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS]; -}CrcIndInfo; - -typedef struct boInfo -{ - uint8_t lcId; - uint32_t dataVolume; -}BOInfo; - -typedef struct dlRlcBOInfo -{ - uint16_t cellId; - uint16_t crnti; - uint8_t lcId; - uint32_t dataVolume; -}DlRlcBoInfo; - /* Info of Scheduling Request to Add/Modify */ typedef struct schSchedReqInfo { @@ -1486,19 +1529,54 @@ typedef struct schInitalDlBwp SchPdcchConfig pdcchCfg; bool pdschCfgPres; SchPdschConfig pdschCfg; - bool k0K1TblPrsnt; - SchK0K1TimingInfoTbl k0K1InfoTbl; }SchInitalDlBwp; -/* BWP Downlink common */ -typedef struct schBwpDlCommon +/*Spec 38.331 'RadioLinkMonitoringConfig'*/ +typedef uint8_t SchRadioLinkMonitoringRsId; + +typedef struct schRadioLinkMonRS +{ + SchRadioLinkMonitoringRsId radioLinkMonitoringRsId; + SchPurposeOfFailureDet purpose; + union + { + uint8_t ssbIndx; + uint8_t nzpCsiRsResId; + }SchDetectionRes; +}SchRadioLinkMonRS; + +typedef struct schRadioLinkConfig +{ + SchRadioLinkMonRS failurDetResAddModList[MAX_FAILURE_DET_RESOURCES]; + SchRadioLinkMonitoringRsId failurDetResRelList[MAX_FAILURE_DET_RESOURCES]; + uint8_t beamFailureInstanceMaxCount; + uint8_t beamFailureDetectionTimer; +}SchRadioLinkConfig; + +/*Spec 38.331 "SPS-Config'*/ +typedef struct schSpsConfig { -}SchBwpDlCommon; + uint16_t periodicity; + uint8_t numOfHqProcess; + uint8_t n1PucchAN; + SchMcsTable mcsTable; +}SchSpsConfig; + +/* Spec 38.331, 'BWP-DownlinkDedicated'*/ +typedef struct schBwpDlCfgDed +{ + SchPdcchConfig pdcchCfgDed; + SchPdschConfig pdschCfgDed; + SchSpsConfig spsCfgDed; + SchRadioLinkConfig radioLnkMonCfgDed; +}SchBwpDlCfgDed; -/* Downlink BWP information */ +/* Spec 38.331, 'BWP-Downlink' Downlink BWP information */ typedef struct schDlBwpInfo { uint8_t bwpId; + SchBwpDlCfg bwpCommon; + SchBwpDlCfgDed bwpDedicated; }SchDlBwpInfo; /* PDCCH Serving Cell configuration */ @@ -1511,6 +1589,46 @@ typedef struct schPdschServCellCfg SchPdschXOverhead *xOverhead; }SchPdschServCellCfg; +typedef struct schRaPrioritization +{ + uint8_t powerRampingStepHighPriority; + uint8_t scalingFactorBI; +}SchRaPrioritization; + +typedef struct schBfrCsiRsRes +{ + uint8_t csrRsIndex; + uint8_t raOccList; + uint8_t raPreambleIndex; +}SchBfrCsiRsRes; + +typedef struct schBfrSsbRes +{ + uint16_t ssbIndex; + uint8_t raPreambleIndex; +}SchBfrSsbRes; + +typedef struct schPrachResDedBfr +{ + SchBfrSsbRes ssb; + SchBfrCsiRsRes csiRs; +}SchPrachResDedBfr; + +/*Spec 38.331 'BeamFailureRecoveryConfig' */ +typedef struct schBeamFailRecoveryCfg +{ + uint8_t rootSeqIndexBfr; + SchRachCfgGeneric rachCfgBfr; + uint8_t rsrpThreshSsbBfr; /* RSRP Threshold SSB */ + SchPrachResDedBfr candidateBeamRSList; + uint8_t ssbPerRachBfr; /* SSB per RACH occassion */ + uint8_t raSsbOccMaskIndex; + uint8_t recoverySearchSpaceId; + SchRaPrioritization raPrioBfr; + uint16_t bfrTimer; + uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */ +}SchBeamFailRecoveryCfg; + /* PUCCH Configuration */ typedef struct schPucchResrcSetInfo { @@ -1699,50 +1817,65 @@ typedef struct schInitialUlBwp SchPucchCfg pucchCfg; bool puschCfgPres; SchPuschCfg puschCfg; - bool k2TblPrsnt; - SchK2TimingInfoTbl k2InfoTbl; }SchInitialUlBwp; +typedef struct schBwpCfgDedicated +{ + SchPucchCfg pucchCfg; + SchPuschCfg puschCfg; +}SchBwpCfgDedicated; + /* Uplink BWP information */ typedef struct schUlBwpInfo { - uint8_t bwpId; + uint8_t bwpId; + SchBwpUlCfg bwpCommon; + SchBwpCfgDedicated bwpDed; }SchUlBwpInfo; +typedef struct schBwpRelInfo +{ + uint8_t bwpId; +}SchBwpRelInfo; + /* Serving cell configuration */ typedef struct schServCellRecfgInfo { - SchInitalDlBwp initDlBwp; - uint8_t numDlBwpToAddOrMod; - SchDlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP]; - uint8_t numDlBwpToRel; - SchDlBwpInfo dlBwpToRelList[MAX_NUM_BWP]; - uint8_t firstActvDlBwpId; - uint8_t defaultDlBwpId; - uint8_t *bwpInactivityTmr; - SchPdschServCellCfg pdschServCellCfg; - SchInitialUlBwp initUlBwp; - uint8_t numUlBwpToAddOrMod; - SchUlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP]; - uint8_t numUlBwpToRel; - SchUlBwpInfo ulBwpToRelList[MAX_NUM_BWP]; - uint8_t firstActvUlBwpId; + SchInitalDlBwp initDlBwp; + SchRadioLinkConfig radioLinkMonConfig; + uint8_t numDlBwpToAddOrMod; + SchDlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP]; + uint8_t numDlBwpToRel; + SchBwpRelInfo dlBwpToRelList[MAX_NUM_BWP]; + uint8_t firstActvDlBwpId; + uint8_t defaultDlBwpId; + uint8_t *bwpInactivityTmr; + SchPdschServCellCfg pdschServCellCfg; + SchInitialUlBwp initUlBwp; + SchBeamFailRecoveryCfg beamFailureRecoveryCfg; + uint8_t numUlBwpToAddOrMod; + SchUlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP]; + uint8_t numUlBwpToRel; + SchBwpRelInfo ulBwpToRelList[MAX_NUM_BWP]; + uint8_t firstActvUlBwpId; }SchServCellRecfgInfo; /* Serving cell configuration */ typedef struct schServCellCfgInfo { SchInitalDlBwp initDlBwp; + SchRadioLinkConfig radioLinkMonConfig; uint8_t numDlBwpToAdd; SchDlBwpInfo dlBwpToAddList[MAX_NUM_BWP]; uint8_t firstActvDlBwpId; uint8_t defaultDlBwpId; uint8_t *bwpInactivityTmr; - SchPdschServCellCfg pdschServCellCfg; - SchInitialUlBwp initUlBwp; - uint8_t numUlBwpToAdd; - SchUlBwpInfo ulBwpToAddList[MAX_NUM_BWP]; - uint8_t firstActvUlBwpId; + SchPdschServCellCfg pdschServCellCfg; + SchInitialUlBwp initUlBwp; + SchBeamFailRecoveryCfg beamFailureRecoveryCfg; + uint8_t numUlBwpToAdd; + SchUlBwpInfo ulBwpToAddList[MAX_NUM_BWP]; + uint8_t firstActvUlBwpId; }SchServCellCfgInfo; typedef struct schNonDynFiveQi @@ -1848,18 +1981,18 @@ typedef struct schModulationInfo SchMcsTable mcsTable; }SchModulationInfo; -/* UE configuration */ +/*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.5' UE Configuration Request*/ typedef struct schUeCfgReq { - uint16_t cellId; - uint8_t ueId; - uint8_t beamIdx; - uint16_t crnti; - bool macCellGrpCfgPres; + uint16_t cellId; + uint8_t ueId; + uint8_t beamIdx; + uint16_t crnti; + bool macCellGrpCfgPres; SchMacCellGrpCfg macCellGrpCfg; - bool phyCellGrpCfgPres; + bool phyCellGrpCfgPres; SchPhyCellGrpCfg phyCellGrpCfg; - bool spCellCfgPres; + bool spCellCfgPres; SchSpCellCfg spCellCfg; SchAmbrCfg *ambrCfg; SchModulationInfo dlModInfo; @@ -1868,7 +2001,7 @@ typedef struct schUeCfgReq SchLcCfg schLcCfg[MAX_NUM_LC]; }SchUeCfgReq; -/* UE Re-configuration */ +/*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.6' UE Reconfiguration Request*/ typedef struct schUeRecfgReq { uint16_t cellId; @@ -1896,6 +2029,7 @@ typedef struct schUeRecfgReq #endif }SchUeRecfgReq; +/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.5 UE Confg Response*/ typedef struct schUeCfgRsp { uint16_t cellId; @@ -1906,9 +2040,105 @@ typedef struct schUeCfgRsp SchFailureCause cause; }SchUeCfgRsp; -/*As per WG8, UE ReCFG and UECFG have same structure definition*/ +/*As per WG8 V7.0.0 Sec 11.2.4.3.6, UE ReCFG and UECFG have same structure definition*/ typedef struct schUeCfgRsp SchUeRecfgRsp; +/*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.7' Delete UE Request*/ +typedef struct schUeDelete +{ + uint16_t cellId; + uint16_t crnti; +}SchUeDelete; + +/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.7*/ +typedef struct schUeDeleteRsp +{ + uint16_t cellId; + uint16_t crnti; + SchMacRsp rsp; + ErrorCause cause; +}SchUeDeleteRsp; + +/*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.8' DL HARQ Indication*/ +typedef struct dlHarqInd +{ + uint16_t cellId; + uint16_t crnti; + SlotTimingInfo slotInd; + uint8_t numHarq; + uint8_t harqPayload[MAX_HARQ_BITS_IN_BYTES]; +}DlHarqInd; + +/*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.9' UL HARQ (CRC) Indication*/ +typedef struct crcIndInfo +{ + uint16_t cellId; + uint16_t crnti; + SlotTimingInfo timingInfo; + uint16_t numCrcInd; + uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS]; +}CrcIndInfo; + +/*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.10' UL Channel Quality Indication*/ +typedef struct ulCqiReport +{ + CqiUlReportType reportType; + uint16_t ulCqi; + uint8_t timingAdv; +}UlCqiReport; + +typedef struct schUlCqiInd +{ + uint16_t cellId; + uint16_t crnti; + SlotTimingInfo timingInfo; + uint8_t numUlCqiReported; + UlCqiReport ulCqiRpt; +}SchUlCqiInd; + +/*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.11' DL Channel Quality Indication*/ +typedef struct dlCqiReport +{ + uint8_t reportType; /*Bitmap for CQI, PMI, RI, CRI report*/ + uint16_t cqi; + uint16_t pmi; + uint16_t cri; + uint16_t ri; +}DlCqiReport; + +typedef struct schDlCqiInd +{ + uint16_t cellId; + uint16_t crnti; + SlotTimingInfo timingInfo; + uint8_t numDlCqiReported; + DlCqiReport dlCqiRpt; +}SchDlCqiInd; + +/*Spec O-RAN WG8 v7.0.0, '11.2.4.2.12' Rach Ind contents*/ +typedef struct rachIndInfo +{ + uint16_t cellId; + uint16_t crnti; + SlotTimingInfo timingInfo; + uint8_t slotIdx; + uint8_t symbolIdx; + uint8_t freqIdx; + uint8_t preambleIdx; + uint16_t timingAdv; +}RachIndInfo; + +/*Spec O-RAN WG8 v7.0.0, '11.2.4.2.13' Paging Ind contents*/ +typedef struct schPageInd +{ + uint16_t cellId; + uint16_t pf; + uint8_t i_s; + uint16_t pduLen; + uint8_t *pagePdu; +}SchPageInd; + +/*ORAN WG8 v7.0.0, Sec 11.2.4.2.14 Rach Res Request*/ typedef struct schRachRsrcReq { SlotTimingInfo slotInd; @@ -1938,6 +2168,7 @@ typedef struct schRachRsrcRsp SchCfraResource cfraResource; }SchRachRsrcRsp; +/*ORAN WG8 v7.0.0, Sec 11.2.4.2.15 Rach Res Release*/ typedef struct schRachRsrcRel { SlotTimingInfo slotInd; @@ -1946,33 +2177,26 @@ typedef struct schRachRsrcRel SchCfraResource cfraResource; }SchRachRsrcRel; -typedef struct schUeDelete -{ - uint16_t cellId; - uint16_t crnti; -}SchUeDelete; - -typedef struct schUeDeleteRsp -{ - uint16_t cellId; - uint16_t crnti; - SchMacRsp rsp; - ErrorCause cause; -}SchUeDeleteRsp; - -typedef struct schCellDeleteReq +/*O-RAN WG* v7.0.0 Sec 11.2.4.2.16 DL RLC Buffer Status Information*/ +typedef struct dlRlcBOInfo { - uint16_t cellId; -}SchCellDeleteReq; - + uint16_t cellId; + uint16_t crnti; + uint8_t lcId; + uint32_t dataVolume; +}DlRlcBoInfo; -typedef struct schCellDeleteRsp +/*O-RAN WG8 v7.0.0 Sec 11.2.4.2.17 Scheduling Request Indication*/ +typedef struct srUciIndInfo { - uint16_t cellId; - SchMacRsp rsp; - SchFailureCause cause; -}SchCellDeleteRsp; + uint16_t cellId; + uint16_t crnti; + SlotTimingInfo slotInd; + uint8_t numSrBits; + uint8_t srPayload[MAX_SR_BITS_IN_BYTES]; +}SrUciIndInfo; +/*O-RAN WG* v7.0.0 Sec 11.2.4.2.18 UL RLC Buffer Status Information*/ typedef struct dataVolInfo { uint8_t lcgId; @@ -1988,62 +2212,41 @@ typedef struct ulBufferStatusRptInd DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS]; }UlBufferStatusRptInd; -typedef struct srUciIndInfo +/**O-RAN WG* v7.0.0 Sec 11.2.4.2.19 Power Headroom Indication*/ +typedef struct phrData /*Spec 38.321 Sec 6.1.3.8*/ { - uint16_t cellId; - uint16_t crnti; - SlotTimingInfo slotInd; - uint8_t numSrBits; - uint8_t srPayload[MAX_SR_BITS_IN_BYTES]; -}SrUciIndInfo; + uint8_t phr; + uint8_t pcmax_f_c; +}PhrData; -typedef struct dlHarqInd +typedef struct singlePhrInfo { - uint16_t cellId; - uint16_t crnti; - SlotTimingInfo slotInd; - uint8_t numHarq; - uint8_t harqPayload[MAX_HARQ_BITS_IN_BYTES]; -}DlHarqInd; + PhrData phrData; +}SinglePhrInfo; -typedef struct schRrmPolicyRatio +typedef struct multiPhr { - uint8_t maxRatio; - uint8_t minRatio; - uint8_t dedicatedRatio; -}SchRrmPolicyRatio; - -typedef struct schRrmPolicyOfSlice -{ - Snssai snssai; - SchRrmPolicyRatio rrmPolicyRatioInfo; -}SchRrmPolicyOfSlice; + PhType phType; + PhrData phrData; +}MultiPhr; -typedef struct schSliceCfgReq -{ - uint8_t numOfConfiguredSlice; - SchRrmPolicyOfSlice **listOfSlices; -}SchSliceCfgReq; - -typedef struct schSliceCfgRsp +typedef struct multiplePhrInfo /*Spec 38.321 Sec 6.1.3.9*/ { - Snssai snssai; - SchMacRsp rsp; - RspCause cause; -}SchSliceCfgRsp; - -/*As per ORAN-WG8, Slice Cfg and Recfg are same structures*/ -typedef struct schSliceCfgReq SchSliceRecfgReq; -typedef struct schSliceCfgRsp SchSliceRecfgRsp; + uint8_t numPhrReported; + MultiPhr multiPhrStat[MAX_PHR_REPORT]; +}MultiplePhrInfo; -typedef struct schPageInd +typedef struct schPwrHeadroomInd { - uint16_t cellId; - uint16_t pf; - uint8_t i_s; - uint16_t pduLen; - uint8_t *pagePdu; -}SchPageInd; + uint16_t cellId; + uint16_t crnti; + PhrType phrType; + union + { + SinglePhrInfo singlePhr; + MultiplePhrInfo multiPhr; + }phrInfo; +}SchPwrHeadroomInd; typedef struct schUeHqInfo { -- 2.16.6