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
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
**********************************************************************/
bool ueDrxInfoPres;
SchDrxUeCb drxUeCb;
#endif
+ bool k0K1TblPrsnt;
+ SchK0K1TimingInfoTbl k0K1InfoTbl;
+ bool k2TblPrsnt;
+ SchK2TimingInfoTbl k2InfoTbl;
}SchUeCb;
/**
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);
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;
{
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;
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");
switch(pst->event)
{
case EVENT_SCH_GEN_CFG:
- {
+ {
SchProcGenCfgReq(pst, (RgMngmt *)msg);
break;
}
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);
}
}
- 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
if(dedMsg == true)
{
ueCb = &cell->ueCb[ueId-1];
- k0K1InfoTbl = &ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.k0K1InfoTbl;
+ k0K1InfoTbl = &ueCb->k0K1InfoTbl;
}
else
{
{
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;
}
}
}
{
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;
}
}
}
CELL_ACTIVE,
}MacCellState;
+/*Spec Ref: 38.331: RadioLinkMonitoringConfig*/
+typedef enum
+{
+ BeamFailure,
+ Rlf,
+ Both
+}PurposeOfFailureDet;
+
typedef struct plmnInfoList
{
Plmn plmn;
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 */
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 */
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;
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;
{
uint16_t cellId;
uint8_t ueId;
+ uint8_t beamIdx;
uint16_t crnti;
bool macCellGrpCfgPres;
MacCellGrpCfg macCellGrpCfg;
#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
#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)) \
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,
RESTART_DATA_TRANSMISSION
}SchDataTransmission;
+typedef enum
+{
+ SchBeamFailure,
+ SchRlf,
+ SchBoth
+}SchPurposeOfFailureDet;
+
+typedef enum
+{
+ CQI_PUCCH = 1,
+ CQI_PUSCH
+}CqiUlReportType;
+
/*structures*/
typedef struct timeDomainAlloc
{
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 */
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 */
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 */
}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;
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 */
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
{
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 */
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
{
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
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;
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;
#endif
}SchUeRecfgReq;
+/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.5 UE Confg Response*/
typedef struct schUeCfgRsp
{
uint16_t cellId;
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;
SchCfraResource cfraResource;
}SchRachRsrcRsp;
+/*ORAN WG8 v7.0.0, Sec 11.2.4.2.15 Rach Res Release*/
typedef struct schRachRsrcRel
{
SlotTimingInfo slotInd;
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;
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
{