+typedef struct ulCcchInd
+{
+ uint16_t cellId;
+ uint16_t crnti;
+ uint16_t ulCcchMsgLen;
+ uint8_t *ulCcchMsg;
+}UlCcchIndInfo;
+
+typedef struct dlCcchInd
+{
+ uint16_t cellId;
+ uint16_t crnti;
+ DlCcchMsgType msgType;
+ uint16_t dlCcchMsgLen;
+ uint8_t *dlCcchMsg;
+}DlCcchIndInfo;
+
+typedef struct bsrTmrCfg
+{
+ uint16_t periodicTimer;
+ uint16_t retxTimer;
+ uint16_t srDelayTimer;
+}BsrTmrCfg;
+
+
+/* Info of Scheduling Request to Add/Modify */
+typedef struct schedReqInfo
+{
+ uint8_t schedReqId;
+ SrProhibitTimer srProhibitTmr;
+ SrTransMax srTransMax;
+}SchedReqInfo;
+
+/* Scheduling Request Configuration */
+typedef struct schedReqCfg
+{
+ uint8_t addModListCount;
+ SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
+ uint8_t relListCount;
+ uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
+}SchedReqCfg;
+
+typedef struct tagInfo
+{
+ uint8_t tagId;
+ TimeAlignmentTimer timeAlignTimer;
+}TagInfo;
+
+typedef struct tagCfg
+{
+ uint8_t addModListCount;
+ TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
+ uint8_t relListCount;
+ uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
+}TagCfg;
+
+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
+ 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;
+
+/* 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;
+
+/* BWP Downlink common */
+typedef struct bwpDlCommon
+{
+}BwpDlCommon;
+
+/* Downlink BWP information */
+typedef struct dlBwpInfo
+{
+ uint8_t bwpId;
+}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;
+
+/* Uplink BWP information */
+typedef struct ulBwpInfo
+{
+ uint8_t bwpId;
+}UlBwpInfo;
+
+/* 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;
+}ServCellCfgInfo;
+
+/* Special cell configuration */
+typedef struct spCellCfg
+{
+ uint8_t servCellIdx;
+ ServCellCfgInfo servCellCfg;
+}SpCellCfg;
+
+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 duLcCfg
+{
+ LcPriority lcp; // logical Channel Prioritization
+}DlLcCfg;
+
+typedef struct lcCfg
+{
+ ConfigType configType;
+ uint8_t lcId;
+ DrbQosInfo *drbQos;
+ Snssai *snssai;
+ 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 macUeCfg