+typedef struct phrCfg
+{
+ PhrPeriodicTimer periodicTimer;
+ PhrProhibitTimer prohibitTimer;
+ PhrTxPwrFactorChange txPowerFactor;
+ bool multiplePHR;
+ bool dummy;
+ bool phrType2OtherCell;
+ PhrModeOtherCG phrOtherCG;
+}PhrCfg;
+
+typedef struct macCellGrpCfg
+{
+ SchedReqCfg schReqCfg;
+ TagCfg tagCfg;
+ BsrTmrCfg bsrTmrCfg;
+ bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
+ PhrCfg phrCfg;
+#ifdef NR_DRX
+ bool drxCfgPresent;
+ DrxCfg drxCfg;
+#endif
+}MacCellGrpCfg;
+
+typedef struct phyCellGrpCfg
+{
+ PdschHarqAckCodebook pdschHarqAckCodebook;
+ uint8_t pNrFr1;
+}PhyCellGrpCfg;
+
+/* Control resource set info */
+typedef struct controlRsrcSet
+{
+ uint8_t cRSetId; /* Control resource set id */
+ uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
+ uint8_t duration;
+ REGMappingType cceRegMappingType;
+ PrecoderGranul precoderGranularity;
+ uint16_t dmrsScramblingId;
+}ControlRsrcSet;
+
+typedef struct mSlotPeriodAndOffset
+{
+ MSlotPeriodicity mSlotPeriodicity;
+ uint16_t mSlotOffset;
+}MSlotPeriodAndOffset;
+
+/* Search Space info */
+typedef struct searchSpace
+{
+ uint8_t searchSpaceId;
+ uint8_t cRSetId;
+ MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
+ uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
+ AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
+ AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
+ AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
+ AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
+ AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
+ SearchSpaceType searchSpaceType;
+ uint8_t ueSpecificDciFormat;
+}SearchSpace;
+
+/* PDCCH cofniguration */
+typedef struct pdcchConfig
+{
+ uint8_t numCRsetToAddMod;
+ ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
+ uint8_t numCRsetToRel;
+ uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
+ uint8_t numSearchSpcToAddMod;
+ SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
+ uint8_t numSearchSpcToRel;
+ uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
+}PdcchConfig;
+
+/* PDSCH time domain resource allocation */
+typedef struct pdschTimeDomRsrcAlloc
+{
+ uint8_t *k0;
+ CommonMappingType mappingType;
+ uint8_t startSymbol;
+ uint8_t symbolLength;
+ uint8_t startSymbolAndLength;
+}PdschTimeDomRsrcAlloc;
+
+
+typedef struct pdschBundling
+{
+ struct staticBundling
+ {
+ BundlingSizeSet2 size;
+ }StaticBundling;
+ struct dynamicBundling
+ {
+ BundlingSizeSet1 sizeSet1;
+ BundlingSizeSet2 sizeSet2;
+ }DynamicBundling;
+}PdschBundling;
+
+/* DMRS downlink configuration */
+typedef struct dmrsDlCfg
+{
+ AddPosType addPos; /* DMRS additional position */
+}DmrsDlCfg;
+
+/* PDSCH Configuration */
+typedef struct pdschConfig
+{
+ DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
+ ResAllocType resourceAllocType;
+ uint8_t numTimeDomRsrcAlloc;
+ PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
+ RBGSize rbgSize;
+ CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
+ BundlingType bundlingType;
+ PdschBundling bundlingInfo;
+}PdschConfig;
+
+/* Initial Downlink BWP */
+typedef struct initialDlBwp
+{
+ bool pdcchPresent;
+ PdcchConfig pdcchCfg;
+ bool pdschPresent;
+ PdschConfig pdschCfg;
+}InitialDlBwp;
+
+/*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
+{
+ 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 */
+typedef struct pdschServCellCfg
+{
+ uint8_t *maxMimoLayers;
+ NumHarqProcForPdsch numHarqProcForPdsch;
+ MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
+ bool *codeBlkGrpFlushInd;
+ PdschXOverhead *xOverhead;
+}PdschServCellCfg;
+
+/* PUCCH Configuration */
+
+typedef struct pucchResrcSetInfo
+{
+ uint8_t resrcSetId;
+ uint8_t resrcListCount;
+ uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
+ uint8_t maxPayLoadSize;
+}PucchResrcSetInfo;
+
+typedef struct pucchResrcSetCfg
+{
+ uint8_t resrcSetToAddModListCount;
+ PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
+ uint8_t resrcSetToRelListCount;
+ uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
+}PucchResrcSetCfg;
+
+typedef struct pucchFormat0
+{
+ uint8_t initialCyclicShift;
+ uint8_t numSymbols;
+ uint8_t startSymbolIdx;
+}PucchFormat0;
+
+typedef struct pucchFormat1
+{
+ uint8_t initialCyclicShift;
+ uint8_t numSymbols;
+ uint8_t startSymbolIdx;
+ uint8_t timeDomOCC;
+}PucchFormat1;
+
+typedef struct pucchFormat2_3
+{
+ uint8_t numPrbs;
+ uint8_t numSymbols;
+ uint8_t startSymbolIdx;
+}PucchFormat2_3;
+
+typedef struct pucchFormat4
+{
+ uint8_t numSymbols;
+ uint8_t occLen;
+ uint8_t occIdx;
+ uint8_t startSymbolIdx;
+}PucchFormat4;
+
+typedef struct pucchResrcInfo
+{
+ uint8_t resrcId;
+ uint16_t startPrb;
+ uint8_t intraFreqHop;
+ uint16_t secondPrbHop;
+ uint8_t pucchFormat;
+ union
+ {
+ PucchFormat0 *format0;
+ PucchFormat1 *format1;
+ PucchFormat2_3 *format2;
+ PucchFormat2_3 *format3;
+ PucchFormat4 *format4;
+ }PucchFormat;
+}PucchResrcInfo;
+
+typedef struct pucchResrcCfg
+{
+ uint8_t resrcToAddModListCount;
+ PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
+ uint8_t resrcToRelListCount;
+ uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
+}PucchResrcCfg;
+
+typedef struct pucchFormatCfg
+{
+ bool interSlotFreqHop;
+ bool addDmrs;
+ uint8_t maxCodeRate;
+ uint8_t numSlots;
+ bool pi2BPSK;
+ bool harqAckCSI;
+}PucchFormatCfg;
+
+typedef struct schedReqResrcInfo
+{
+ uint8_t resrcId;
+ uint8_t requestId;
+ uint8_t periodicity;
+ uint16_t offset;
+ uint8_t resrc;
+}SchedReqResrcInfo;
+
+typedef struct pucchSchedReqCfg
+{
+ uint8_t schedAddModListCount;
+ SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
+ uint8_t schedRelListCount;
+ uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
+}PucchSchedReqCfg;
+
+typedef struct spatialRelationInfo
+{
+ uint8_t spatialRelationId;
+ uint8_t servCellIdx;
+ uint8_t pathLossRefRSId;
+ uint8_t p0PucchId;
+ uint8_t closeLoopIdx;
+}SpatialRelationInfo;
+
+typedef struct pucchSpatialCfg
+{
+ uint8_t spatialAddModListCount;
+ SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
+ uint8_t spatialRelListCount;
+ uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
+}PucchSpatialCfg;
+
+typedef struct p0PucchCfg
+{
+ uint8_t p0PucchId;
+ int p0PucchVal;
+}P0PucchCfg;
+
+typedef struct pathLossRefRSCfg
+{
+ uint8_t pathLossRefRSId;
+}PathLossRefRSCfg;
+
+typedef struct pucchMultiCsiCfg
+{
+ uint8_t multiCsiResrcListCount;
+ uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
+}PucchMultiCsiCfg;
+
+typedef struct pucchDlDataToUlAck
+{
+ uint8_t dlDataToUlAckListCount;
+ uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
+}PucchDlDataToUlAck;
+
+typedef struct pucchPowerControl
+{
+ int deltaF_Format0;
+ int deltaF_Format1;
+ int deltaF_Format2;
+ int deltaF_Format3;
+ int deltaF_Format4;
+ uint8_t p0SetCount;
+ P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
+ uint8_t pathLossRefRSListCount;
+ PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
+}PucchPowerControl;
+
+typedef struct pucchCfg
+{
+ PucchResrcSetCfg *resrcSet;
+ PucchResrcCfg *resrc;
+ PucchFormatCfg *format1;
+ PucchFormatCfg *format2;
+ PucchFormatCfg *format3;
+ PucchFormatCfg *format4;
+ PucchSchedReqCfg *schedReq;
+ PucchMultiCsiCfg *multiCsiCfg;
+ PucchSpatialCfg *spatialInfo;
+ PucchDlDataToUlAck *dlDataToUlAck;
+ PucchPowerControl *powerControl;
+}PucchCfg;
+
+/* Transform precoding disabled */
+typedef struct transPrecodDisabled
+{
+ uint16_t scramblingId0;
+}TransPrecodDisabled;
+
+/* DMRS Uplink configuration */
+typedef struct dmrsUlCfg
+{
+ AddPosType addPos; /* DMRS additional position */
+ TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
+}DmrsUlCfg;
+
+/* PUSCH Configuration */
+typedef struct puschCfg
+{
+ uint8_t dataScramblingId;
+ DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
+ ResAllocType resourceAllocType;
+ uint8_t numTimeDomRsrcAlloc;
+ PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
+ TransformPrecoder transformPrecoder;
+}PuschCfg;
+
+/* Initial Uplink BWP */
+typedef struct initialUlBwp
+{
+ bool pucchPresent;
+ PucchCfg pucchCfg;
+ bool puschPresent;
+ PuschCfg puschCfg;
+}InitialUlBwp;
+
+typedef struct bwpUlCfgDed
+{
+ PucchCfg pucchCfg;
+ PuschCfg puschCfg;
+}BwpUlCfgDed;
+
+/* Uplink BWP information */
+typedef struct ulBwpInfo
+{
+ 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;
+ 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 */
+typedef struct spCellCfg
+{
+ uint8_t servCellIdx;
+ 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;
+ BwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
+ uint8_t firstActvDlBwpId;
+ uint8_t defaultDlBwpId;
+ uint8_t *bwpInactivityTmr;
+ PdschServCellCfg pdschServCellCfg;
+ InitialUlBwp initUlBwp;
+ uint8_t numUlBwpToAddOrMod;
+ UlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
+ uint8_t numUlBwpToRel;
+ BwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
+ uint8_t firstActvUlBwpId;
+}ServCellRecfgInfo;
+
+/* Special cell Re-configuration */
+typedef struct spCellRecfg
+{
+ uint8_t servCellIdx;
+ ServCellRecfgInfo servCellCfg;
+}SpCellRecfg;
+
+typedef struct ambrCfg
+{
+ uint32_t ulBr; /* UL Bit rate */
+}AmbrCfg;
+
+typedef struct nonDynFiveQi
+{
+ uint16_t fiveQi;
+ uint8_t priorLevel;
+ uint16_t avgWindow;
+ uint16_t maxDataBurstVol;
+}NonDynFiveQi;
+
+typedef struct dynFiveQi
+{
+ uint8_t priorLevel;
+ uint16_t packetDelayBudget;
+ uint8_t packetErrRateScalar;
+ uint8_t packetErrRateExp;
+ uint16_t fiveQi;
+ uint8_t delayCritical;
+ uint16_t avgWindow;
+ uint16_t maxDataBurstVol;
+}DynFiveQi;
+
+typedef struct ngRanAllocAndRetPri
+{
+ uint8_t priorityLevel;
+ uint8_t preEmptionCap;
+ uint8_t preEmptionVul;
+}NgRanAllocAndRetPri;
+
+typedef struct grbQosInfo
+{
+ uint32_t maxFlowBitRateDl;
+ uint32_t maxFlowBitRateUl;
+ uint32_t guarFlowBitRateDl;
+ uint32_t guarFlowBitRateUl;
+}GrbQosInfo;
+
+typedef struct drbQos
+{
+ QosType fiveQiType; /* Dynamic or non-dynamic */
+ union
+ {
+ NonDynFiveQi nonDyn5Qi;
+ DynFiveQi dyn5Qi;
+ }u;
+ NgRanAllocAndRetPri ngRanRetPri;
+ GrbQosInfo grbQosInfo;
+ uint16_t pduSessionId;
+ uint32_t ulPduSessAggMaxBitRate;
+}DrbQosInfo;
+
+typedef struct ulLcCfg
+{
+ uint8_t priority;
+ uint8_t lcGroup;
+ uint8_t schReqId;
+ PBitRate pbr; // prioritisedBitRate
+ BucketSizeDur bsd; // bucketSizeDuration
+}UlLcCfg;
+
+typedef struct dlLcCfg
+{
+ LcPriority lcp; // logical Channel Prioritization
+}DlLcCfg;
+
+typedef struct lcCfg
+{
+ uint8_t lcId;
+ Snssai *snssai;
+ DrbQosInfo *drbQos;
+ bool ulLcCfgPres;
+ UlLcCfg ulLcCfg;
+ DlLcCfg dlLcCfg;
+}LcCfg;
+
+typedef struct modulationInfo
+{
+ uint8_t modOrder; /* Modulation order */
+ uint8_t mcsIndex; /* MCS Index */
+ McsTable mcsTable; /* MCS table */
+}ModulationInfo;
+
+typedef struct macUeCreateReq
+{
+ uint16_t cellId;
+ uint8_t ueId;
+ uint8_t beamIdx;
+ uint16_t crnti;
+ bool macCellGrpCfgPres;
+ MacCellGrpCfg macCellGrpCfg;
+ bool phyCellGrpCfgPres;
+ PhyCellGrpCfg phyCellGrpCfg;
+ bool spCellCfgPres;
+ SpCellCfg spCellCfg;
+ AmbrCfg *ambrCfg;
+ ModulationInfo dlModInfo; /* DL modulation info */
+ ModulationInfo ulModInfo; /* UL modulation info */
+ uint8_t numLcs;
+ LcCfg lcCfgList[MAX_NUM_LC];
+}MacUeCreateReq;
+
+/* UE Re-configuration */
+typedef struct macUeRecfg
+{
+ uint16_t cellId;
+ uint8_t ueId;
+ uint8_t beamIdx;
+ uint16_t crnti;
+ bool macCellGrpRecfgPres;
+ MacCellGrpCfg macCellGrpRecfg;
+ bool phyCellGrpRecfgPres;
+ PhyCellGrpCfg phyCellGrpRecfg;
+ bool spCellRecfgPres;
+ SpCellRecfg spCellRecfg;
+ AmbrCfg *ambrRecfg;
+ ModulationInfo dlModInfo;
+ ModulationInfo ulModInfo;
+ uint8_t numLcsToAdd;
+ LcCfg lcCfgAdd[MAX_NUM_LC];
+ uint8_t numLcsToDel;
+ uint8_t lcIdToDel[MAX_NUM_LC];
+ uint8_t numLcsToMod;
+ LcCfg lcCfgMod[MAX_NUM_LC];
+ DataTransmissionAction transmissionAction;
+#ifdef NR_DRX
+ bool drxConfigIndicatorRelease;
+#endif
+}MacUeRecfg;
+
+typedef struct nrcgi
+{
+ Plmn plmn;
+ uint16_t cellId;
+}Nrcgi;
+
+typedef struct srbFailInfo
+{
+ uint8_t srbId;
+ FailureCause cause;
+}SRBFailInfo;
+
+typedef struct drbFailInfo
+{
+ uint8_t drbId;
+ FailureCause cause;
+}DRBFailInfo;
+
+typedef struct sCellFailInfo
+{
+ Nrcgi nrcgi;
+ FailureCause cause;
+}SCellFailInfo;
+
+typedef struct macUeCreateRsp
+{
+ uint16_t cellId;
+ uint16_t ueId;
+ MacRsp result;
+ uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
+ SRBFailInfo *failedSRBlisti;
+ uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
+ DRBFailInfo *failedDRBlist;
+ uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
+ SCellFailInfo *failedSCellList;
+ uint8_t numDRBModFailed; /* valid values : 0 to MAX_NUM_DRB */
+ DRBFailInfo *failedDRBModlist;
+}MacUeCreateRsp;
+
+typedef struct macUeCreateRsp MacUeRecfgRsp;
+
+typedef struct rachRsrcReq
+{
+ uint16_t cellId;
+ uint16_t ueId;
+ uint8_t numSsb;
+ uint8_t ssbIdx[MAX_NUM_SSB];
+}MacRachRsrcReq;
+
+typedef struct macCfraSsbResource
+{
+ uint8_t ssbIdx;
+ uint8_t raPreambleIdx;
+}MacCfraSsbResource;
+
+typedef struct macCfraResource
+{
+ uint8_t numSsb;
+ MacCfraSsbResource ssbResource[MAX_NUM_SSB];
+}MacCfraResource;
+
+typedef struct macRachRsrcRsp
+{
+ uint16_t cellId;
+ uint16_t ueId;
+ MacRsp result;
+ uint16_t newCrnti; /* This parameter maps to 3GPP TS 38.331 newUE-Identity */
+ MacCfraResource cfraResource;
+}MacRachRsrcRsp;
+
+typedef struct macRachRsrcRel
+{
+ uint16_t cellId;
+ uint16_t ueId;
+ uint16_t crnti;
+}MacRachRsrcRel;
+
+typedef struct ueDelete
+{
+ uint16_t cellId;
+ uint8_t ueId;
+ uint16_t crnti;
+}MacUeDelete;
+
+typedef struct ueDeleteRsp
+{
+ uint16_t cellId;
+ uint8_t ueId;
+ CauseOfResult status;
+}MacUeDeleteRsp;
+
+typedef struct macCellDeleteReq
+{
+ uint16_t cellId;
+}MacCellDeleteReq;
+
+typedef struct macCellDeleteRsp
+{
+ uint16_t cellId;
+ CauseOfResult status;
+}MacCellDeleteRsp;
+
+typedef struct macSliceCfgRsp
+{
+ Snssai snssai;
+ MacRsp rsp;
+ CauseOfResult cause;
+}MacSliceCfgRsp;
+
+typedef struct rrmPolicyRatio
+{
+ uint8_t maxRatio;
+ uint8_t minRatio;
+ uint8_t dedicatedRatio;
+}RrmPolicyRatio;
+
+typedef struct rrmPolicyMemberList
+{
+ Plmn plmn;
+ Snssai snssai;
+}RrmPolicyMemberList;
+
+typedef struct macSliceRrmPolicy
+{
+ ResourceType resourceType;
+ uint8_t numOfRrmPolicyMem;
+ RrmPolicyMemberList **rRMPolicyMemberList;
+ RrmPolicyRatio policyRatio;
+}MacSliceRrmPolicy;
+
+typedef struct macSliceCfgReq
+{
+ uint8_t numOfRrmPolicy;
+ MacSliceRrmPolicy **listOfRrmPolicy;
+}MacSliceCfgReq;
+
+/*As per ORAN-WG8, Slice Cfg and ReCfg are same structures*/
+typedef struct macSliceCfgReq MacSliceRecfgReq;
+typedef struct macSliceCfgRsp MacSliceRecfgRsp;
+
+/* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.17 DL PCCH Indication */
+typedef struct dlPcchInd
+{
+ uint16_t cellId;
+ uint16_t pf;
+ uint8_t i_s;
+ uint16_t pduLen;
+ uint8_t *pcchPdu;
+}DlPcchInd;
+
+
+/* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.1 Cell Start */
+typedef struct cellInfo
+{
+ SlotTimingInfo slotInfo;
+ uint16_t cellId;
+}CellInfo;
+
+typedef struct cellInfo CellStartInfo;
+typedef struct cellInfo CellStopInfo;
+
+/* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.12 UE Reset Request */
+typedef struct ueReset
+{
+ uint16_t cellId;
+ uint8_t ueId;
+}MacUeResetReq;
+
+/* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.13 UE Reset Response */
+typedef struct ueResetRsp
+{
+ uint16_t cellId;
+ uint8_t ueId;
+ CauseOfResult status;
+}MacUeResetRsp;
+
+/* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.14 UE Sync Status Indication */
+typedef struct ueSyncStatusInd
+{
+ uint16_t cellId;
+ uint8_t ueId;
+ SyncStatus status;
+}MacUeSyncStatusInd;
+
+/* The following list of structures is taken from the SI-SchedulingInfo section of specification 33.331. */
+typedef struct sibTypeInfo
+{
+ SibType sibType;
+ uint8_t valueTag;
+ bool areaScope;
+}SibTypeInfo;
+
+typedef struct sibMappingInfo
+{
+ uint8_t numSibTypeInfo;
+ SibTypeInfo sibTypeInfo[NUM_SIB];
+}SibMappingInfo;
+
+typedef struct schedulingInfo
+{
+ SiBroadcastStatus siBroadcastStatus;
+ SiPeriodicity siPeriodicity;
+ SibMappingInfo sibMappingInfo;
+}SchedulingInfo;
+
+typedef struct rachOccasionsSi
+{
+ RachCfgGeneric rachConfigSi;
+ SsbPerRachOccasion ssbPerRachOccasion;
+}RachOccasionsSi;
+
+typedef struct siReqRsrc
+{
+ uint8_t raPreambleStartIndex;
+ uint8_t raAssociationPeriodIndex;
+ uint8_t raSsbOccasionMaskIndex;
+}SiReqRsrc;
+
+typedef struct siRequestResource
+{
+ uint8_t numOfSiReqRsrc;
+ SiReqRsrc siReqRsrc[MAX_SI_MESSAGE];
+}SiRequestResource;
+
+typedef struct siRequestConfig
+{
+ RachOccasionsSi rachOccasionsSi;
+ SiRequestPeriod siRequestPeriod;
+ SiRequestResource siRequestResource;
+}SiRequestConfig;
+
+typedef struct schedulingInfoList
+{
+ uint8_t numSchInfo;
+ SchedulingInfo schedulingInfo[MAX_SI_MESSAGE];
+}SchedulingInfoList;
+
+typedef struct siSchedulingInfo
+{
+ SchedulingInfoList schInfoList;
+ SiWindowLength siWindowLength;
+ SiRequestConfig siRequestConfig;
+ SiRequestConfig siRequestConfigSUL;
+ uint8_t *siAreaID;
+}SiSchedulingInfo;
+
+/* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.18 DL Broadcast Request */
+typedef struct macDlBroadcastReq
+{
+ uint16_t cellId;
+ uint8_t numSiBlock;
+ 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,
+ MacDlBroadcastReq *dlBroadcast));
+
+/* Functions for CellUp Ind from MAC to DU APP*/
+typedef uint8_t (*DuMacCellUpInd) ARGS((
+ Pst *pst,
+ OduCellId *cellId ));
+
+/* Functions for slot Ind from MAC to DU APP*/
+typedef uint8_t (*DuMacSlotInd) ARGS((
+ Pst *pst,
+ SlotTimingInfo *slotIndInfo));
+
+/* Functions for stop Ind from MAC to DU APP*/
+typedef uint8_t (*DuMacStopInd) ARGS((
+ Pst *pst,
+ OduCellId *cellId ));
+
+/* Functions for mac cell start req */
+typedef uint8_t (*DuMacCellStart) ARGS((
+ Pst *pst,
+ CellStartInfo *cellId));
+
+/* Functions for mac cell stop request */
+typedef uint8_t (*DuMacCellStop) ARGS((
+ Pst *pst,
+ CellStopInfo *cellId ));
+
+/* Function pointers for packing macCellCfg Request and Confirm */
+typedef uint8_t (*packMacCellCfgReq) ARGS((
+ Pst *pst,
+ MacCellCfg *macCellCfg ));
+
+typedef uint8_t (*packMacCellCfgConfirm) ARGS((
+ Pst *pst,
+ MacCellCfgCfm *macCellCfgCfm ));
+
+typedef uint8_t (*DuMacCellCfgReq) ARGS((
+ Pst *pst,
+ MacCellCfg *macCellCfg));
+
+typedef uint8_t (*DuMacCellCfgCfm) ARGS((
+ Pst *pst,
+ MacCellCfgCfm *macCellCfgCfm ));