1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /* Defines APIs exchanged between du_app and cl module of MAC */
23 #define NUM_NUMEROLOGY 5 /* Number of numerology */
24 #define MAX_SI_MESSAGE 32 /* As per 138 331 V15.3, RRC Multiplicity and type constraint definitions maxSI-Message = 32 */
25 #define NUM_SIB 32 /* As per 138 331 V15.3, RRC Multiplicity and type constraint definitions maxSIB = 32 */
26 #define NUM_SSB 1 /* max value is 64 */
27 #define SSB_MASK_SIZE 1 /* SSB mask size is 32bit for sub6 */
28 #define SIB1_REPETITION_PERIOD 20
29 #define CORESET_1_INDEX 1
30 #define CORESET_2_INDEX 2
31 #define CORESET_3_INDEX 3
32 #define CORESET_4_INDEX 4
33 #define SEARCHSPACE_0_INDEX 0
34 #define SEARCHSPACE_2_INDEX 2
35 #define SEARCHSPACE_3_INDEX 3
36 #define SEARCHSPACE_4_INDEX 4
38 /* Macro for Ue Context */
39 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
40 #define MAC_NUM_TAGS 4 /* Max number of timing advance groups */
41 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
42 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
43 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
44 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
45 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
46 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
47 #define MAX_NUM_SCELL 32
49 /* PUCCH Configuration Macro */
50 #define MAX_NUM_PUCCH_RESRC 128
51 #define MAX_NUM_PUCCH_RESRC_SET 4
52 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
53 #define MAX_NUM_SPATIAL_RELATIONS 8
54 #define MAX_NUM_PUCCH_P0_PER_SET 8
55 #define MAX_NUM_PATH_LOSS_REF_RS 4
56 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
59 #define EVENT_MAC_CELL_CONFIG_REQ 200
60 #define EVENT_MAC_CELL_CONFIG_CFM 201
61 #define EVENT_MAC_CELL_START 202
62 #define EVENT_MAC_CELL_STOP 203
63 #define EVENT_MAC_CELL_UP_IND 204
64 #define EVENT_MAC_STOP_IND 205
65 #define EVENT_MAC_UL_CCCH_IND 206
66 #define EVENT_MAC_DL_CCCH_IND 207
67 #define EVENT_MAC_UE_CREATE_REQ 208
68 #define EVENT_MAC_UE_CREATE_RSP 209
69 #define EVENT_MAC_UE_RECONFIG_REQ 210
70 #define EVENT_MAC_UE_RECONFIG_RSP 211
71 #define EVENT_MAC_UE_DELETE_REQ 212
72 #define EVENT_MAC_UE_DELETE_RSP 213
73 #define EVENT_MAC_CELL_DELETE_REQ 214
74 #define EVENT_MAC_CELL_DELETE_RSP 215
75 #define EVENT_MAC_SLICE_CFG_REQ 216
76 #define EVENT_MAC_SLICE_CFG_RSP 217
77 #define EVENT_MAC_SLICE_RECFG_REQ 218
78 #define EVENT_MAC_SLICE_RECFG_RSP 219
79 #define EVENT_MAC_SLOT_IND 220
80 #define EVENT_MAC_RACH_RESOURCE_REQ 221
81 #define EVENT_MAC_RACH_RESOURCE_RSP 222
82 #define EVENT_MAC_RACH_RESOURCE_REL 223
83 #define EVENT_MAC_DL_PCCH_IND 224
84 #define EVENT_MAC_UE_RESET_REQ 225
85 #define EVENT_MAC_UE_RESET_RSP 226
86 #define EVENT_MAC_UE_SYNC_STATUS_IND 227
87 #define EVENT_MAC_DL_BROADCAST_REQ 228
88 #define EVENT_MAC_STATISTICS_REQ 229
89 #define EVENT_MAC_STATISTICS_RSP 230
90 #define EVENT_MAC_STATISTICS_IND 231
91 #define EVENT_MAC_STATS_DELETE_REQ 232
92 #define EVENT_MAC_STATS_DELETE_RSP 233
93 #define EVENT_MAC_STATISTICS_MODIFY_REQ 234
94 #define EVENT_MAC_STATISTICS_MODIFY_RSP 235
96 #define BSR_PERIODIC_TIMER_SF_10 10
97 #define BSR_RETX_TIMER_SF_320 320
98 #define BSR_SR_DELAY_TMR_2560 2560
100 #define PAGING_SCHED_DELTA 4
103 /********************* Global Variable ********************/
104 extern uint64_t ueBitMapPerCell[MAX_NUM_CELL]; /* Bit Map to store used/free UE-IDX per Cell */
106 /********************* Interface structure definition ********************/
122 SSB_PER_RACH_OCCASION_ONE_EIGHTH,
123 SSB_PER_RACH_OCCASION_ONE_FOURTH,
124 SSB_PER_RACH_OCCASION_ONE_HALF,
125 SSB_PER_RACH_OCCASION_ONE,
126 SSB_PER_RACH_OCCASION_TWO,
127 SSB_PER_RACH_OCCASION_FOUR,
128 SSB_PER_RACH_OCCASION_EIGHT,
129 SSB_PER_RACH_OCCASION_SIXTEEN
184 OUT_OF_SUNC_MAX_RETRIES
195 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
196 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
197 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
209 RESTRICTED_SET_TYPE_A,
210 RESTRICTED_SET_TYPE_B
242 /* Enums for Ue Create Request */
244 /* SR PROHIBIT TIMER */
271 TIME_ALIGNMENT_TIMER_MS_500,
272 TIME_ALIGNMENT_TIMER_MS_750,
273 TIME_ALIGNMENT_TIMER_MS_1280,
274 TIME_ALIGNMENT_TIMER_MS_1920,
275 TIME_ALIGNMENT_TIMER_MS_2560,
276 TIME_ALIGNMENT_TIMER_MS_5120,
277 TIME_ALIGNMENT_TIMER_MS_10240,
278 TIME_ALIGNMENT_TIMER_INFINITY
283 PHR_PERIODIC_TIMER_SF_10,
284 PHR_PERIODIC_TIMER_SF_20,
285 PHR_PERIODIC_TIMER_SF_50,
286 PHR_PERIODIC_TIMER_SF_100,
287 PHR_PERIODIC_TIMER_SF_200,
288 PHR_PERIODIC_TIMER_SF_500,
289 PHR_PERIODIC_TIMER_SF_1000,
290 PHR_PERIODIC_TIMER_INFINITY
295 PHR_PROHIBIT_TIMER_SF_0,
296 PHR_PROHIBIT_TIMER_SF_10,
297 PHR_PROHIBIT_TIMER_SF_20,
298 PHR_PROHIBIT_TIMER_SF_50,
299 PHR_PROHIBIT_TIMER_SF_100,
300 PHR_PROHIBIT_TIMER_SF_200,
301 PHR_PROHIBIT_TIMER_SF_500,
302 PHR_PROHIBIT_TIMER_SF_1000
307 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
308 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
309 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
310 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
311 }PhrTxPwrFactorChange;
315 PHR_MODE_OTHER_CG_REAL,
316 PHR_MODE_OTHER_CG_VIRTUAL
321 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
322 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
323 }PdschHarqAckCodebook;
327 NUM_HARQ_PROC_FOR_PDSCH_N_2,
328 NUM_HARQ_PROC_FOR_PDSCH_N_4,
329 NUM_HARQ_PROC_FOR_PDSCH_N_6,
330 NUM_HARQ_PROC_FOR_PDSCH_N_10,
331 NUM_HARQ_PROC_FOR_PDSCH_N_16
332 }NumHarqProcForPdsch;
336 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
337 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
338 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
339 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
351 TRANSFORM_PRECODER_ENABLED,
352 TRANSFORM_PRECODER_DISABLED
357 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
358 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
363 SLOTPERIODICITY_PR_SL1 = 1,
364 SLOTPERIODICITY_PR_SL2,
365 SLOTPERIODICITY_PR_SL4,
366 SLOTPERIODICITY_PR_SL5,
367 SLOTPERIODICITY_PR_SL8,
368 SLOTPERIODICITY_PR_SL10,
369 SLOTPERIODICITY_PR_SL16,
370 SLOTPERIODICITY_PR_SL20,
371 SLOTPERIODICITY_PR_SL40,
372 SLOTPERIODICITY_PR_SL80,
373 SLOTPERIODICITY_PR_SL160,
374 SLOTPERIODICITY_PR_SL320,
375 SLOTPERIODICITY_PR_SL640,
376 SLOTPERIODICITY_PR_SL1280,
377 SLOTPERIODICITY_PR_SL2560
388 SEARCHSPACETYPE_PR_COMMON = 1,
389 SEARCHSPACETYPE_PR_UE_SPECIFIC
400 AGGREGATIONLEVEL_N0 = 0,
401 AGGREGATIONLEVEL_N1 = 1,
402 AGGREGATIONLEVEL_N2 = 2,
403 AGGREGATIONLEVEL_N3 = 3,
404 AGGREGATIONLEVEL_N4 = 4,
405 AGGREGATIONLEVEL_N5 = 5,
406 AGGREGATIONLEVEL_N6 = 6,
407 AGGREGATIONLEVEL_N8 = 7
412 ADDITIONALPOSITION_POS0,
413 ADDITIONALPOSITION_POS1,
414 ADDITIONALPOSITION_POS3
425 RESOURCEALLOCATION_TYPE0,
426 RESOURCEALLOCATION_TYPE1,
427 RESOURCEALLOCATION_DYNAMICSWITCH
438 CODEWORDS_SCHED_BY_DCI_N1,
439 CODEWORDS_SCHED_BY_DCI_N2
444 TYPE_STATIC_BUNDLING = 1,
445 TYPE_DYNAMIC_BUNDLING
458 SET1_SIZE_N2_WIDEBAND,
459 SET1_SIZE_N4_WIDEBAND
513 TRANSPORT_LAYER_FAIL,
520 UNSPECIFIED_RADIO_NW_CAUSE,
522 UNKNOWN_GNB_CU_UE_F1AP_ID,
523 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
524 UNKNOWN_GNB_DU_UE_F1AP_ID,
525 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
526 UNKNOWN_UE_F1AP_ID_PAIR,
527 INCONSISTENT_UE_F1AP_ID_PAIR,
528 INTERACTION_WITH_OTHER_PROCEDURE,
530 ACTION_REQUIRED_FOR_RADIO_REASONS,
531 RADIO_RESOURCES_UNAVAILABLE,
537 RESOURCES_UNAVAILABLE_FOR_SLICE
542 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
543 TRANSPORT_RESOURCE_UNAVAILABLE
548 TRANSFER_SYNTAX_ERROR,
549 ABSTRACT_SYNTAX_ERROR_REJECT,
550 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
551 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
553 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
554 UNSPECIFIED_PROTOCOL_CAUSE
559 CONTROL_PROCESSING_OVERLOAD,
561 PLANE_PROCESSING_RESOURCES,
563 INTERVENTION_BY_O_AND_M,
564 UNSPECIFIED_MISC_CAUSE
571 MCS_TABLE_QAM64_LOW_SE
578 RSRC_RRC_CONNECTED_USERS
583 TRANSMISSION_ALLOWED,
586 }DataTransmissionAction;
588 /* Performance measurements from 3GPP TS 28.552 Release 15 */
591 MAC_DL_TOTAL_PRB_USAGE,
592 MAC_UL_TOTAL_PRB_USAGE
595 typedef struct failureCause
600 RadioNwLyrCause radioNwResult;
601 TransLyrCause transportResult;
602 ProtCause protcolResult;
603 MiscFailCause miscResult;
607 typedef struct carrierCfg
609 uint32_t dlBw; /* DL bandwidth */
610 uint32_t arfcnDL; /* Absolute frequency Number of DL */
611 uint32_t ulBw; /* UL bandwidth */
612 uint32_t arfcnUL; /* Absolute frequency Number of UL */
613 uint16_t numTxAnt; /* Number of Tx antennas */
614 uint16_t numRxAnt; /* Number of Rx antennas */
637 /*Spec Ref: 38.331: RadioLinkMonitoringConfig*/
643 }PurposeOfFailureDet;
645 typedef struct plmnInfoList
648 SupportedSliceList suppSliceList;
651 typedef struct schPageCfg
653 uint8_t numPO; /*Derived from Ns*/
654 bool poPresent; /*Whether FirstPDCCH-MonitoringPO is present or not*/
655 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
658 typedef struct pdcchConfigSib1
660 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
661 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
664 typedef struct sib1CellCfg
666 PdcchConfigSib1 pdcchCfgSib1; /*Freq pos where UE may find SS/PBCH block with SIB1*/
669 SchPageCfg pagingCfg;
672 typedef struct bwpParams
677 uint8_t cyclicPrefix;
680 typedef struct candidatesInfo
689 typedef struct searchSpaceCfg
691 uint8_t searchSpaceId;
693 uint16_t monitoringSlot;
695 uint16_t monitoringSymbol;
696 CandidatesInfo candidate;
699 typedef struct pdcchConfigCommon
701 /* only one search space is configured during SIB1 */
702 SearchSpaceCfg commonSearchSpace;
703 uint8_t raSearchSpaceId;
706 typedef struct pdschCfgCommTimeDomRsrcAlloc
711 uint8_t lengthSymbol;
712 }PdschCfgCommTimeDomRsrcAlloc;
714 typedef struct pdschConfigCommon
716 uint8_t numTimeDomAlloc;
717 /* PDSCH time domain DL resource allocation list */
718 PdschCfgCommTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
721 typedef struct pucchConfigCommon
723 uint8_t pucchResourceCommon;
724 uint8_t pucchGroupHopping;
727 /* PUSCH Time Domain Resource Allocation */
728 typedef struct puschTimeDomRsrcAlloc
731 CommonMappingType mappingType;
733 uint8_t symbolLength;
734 uint8_t startSymbolAndLength;
735 }PuschTimeDomRsrcAlloc;
737 typedef struct puschConfigCommon
739 /* PUSCH-TimeDomainResourceAllocation info */
740 uint8_t numTimeDomRsrcAlloc;
741 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
744 typedef struct bwpDlConfig
747 PdcchConfigCommon pdcchCommon;
748 PdschConfigCommon pdschCommon;
751 typedef struct bwpUlConfig
754 // rach config common sent in PrachCfg
755 PucchConfigCommon pucchCommon;
756 PuschConfigCommon puschCommon;
760 typedef struct cellCfg
763 MacAdminState adminState;
764 MacCellState cellState;
765 PlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
766 uint32_t phyCellId; /* Physical cell id */
769 uint16_t subCarrSpacing;
770 DuplexMode dupType; /* Duplex type: TDD/FDD */
771 Sib1CellCfg sib1Cfg; /* SIB1 config */
772 BwpDlConfig initialDlBwp; /* Initial DL BWP */
773 BwpUlConfig initialUlBwp; /* Initial UL BWP */
776 typedef struct ssbCfg
778 uint32_t ssbPbchPwr; /* SSB block power */
779 uint8_t scsCmn; /* subcarrier spacing for common */
780 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
781 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
782 uint8_t ssbScOffset; /* Subcarrier Offset */
783 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
784 uint8_t beamId[NUM_SSB];
786 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
787 uint8_t mibPdu[3]; /* MIB payload */
788 uint8_t dmrsTypeAPos; /* DMRS Type A position */
791 typedef struct fdmInfo
793 uint16_t rootSeqIdx; /* Root sequence index */
794 uint8_t numRootSeq; /* Number of root sequences required for FD */
795 uint16_t k1; /* Frequency Offset for each FD */
796 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
799 typedef struct prachCfg
801 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
802 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
803 uint8_t msg1Fdm; /* Number of RACH frequency domain occasions/ PRACH FDM (1,2,4,8) */
804 uint8_t prachCfgIdx; /* PRACH Cfg Index */
805 PrachFdmInfo fdm[8]; /* FDM info */
806 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
807 uint8_t ssbPerRach; /* SSB per RACH occassion */
808 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
809 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
810 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
811 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
812 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
813 uint8_t raRspWindow; /* RA Response Window */
817 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
818 typedef struct drxOnDurationTimer
820 bool onDurationTimerValInMs;
823 uint8_t subMilliSeconds;
824 uint16_t milliSeconds;
825 }onDurationtimerValue;
828 typedef struct drxLongCycleStartOffset
830 uint16_t drxLongCycleStartOffsetChoice;
831 uint16_t drxLongCycleStartOffsetVal;
832 }DrxLongCycleStartOffset;
834 typedef struct shortDrx
836 uint16_t drxShortCycle;
837 uint8_t drxShortCycleTimer;
840 typedef struct drxCfg
842 DrxOnDurationTimer drxOnDurationTimer;
843 uint16_t drxInactivityTimer;
844 uint8_t drxHarqRttTimerDl;
845 uint8_t drxHarqRttTimerUl;
846 uint16_t drxRetransmissionTimerDl;
847 uint16_t drxRetransmissionTimerUl;
848 DrxLongCycleStartOffset drxLongCycleStartOffset;
851 uint8_t drxSlotOffset;
855 typedef struct precodingConf
858 uint16_t numAntPorts;
861 typedef struct beamformingConf
867 uint32_t beamAzimuth;
869 uint32_t beamHorizWidth;
870 uint32_t beamVertWidth;
871 uint32_t coverageShape;
872 uint32_t digitalTilt;
873 uint32_t digitalAzimuth;
876 typedef struct csiRsCfg
878 uint8_t *csiFreqDomainAlloc;
879 uint8_t csiNrofPorts;
880 uint8_t csirsfirstOFDMSymbolInTimeDomain;
881 uint8_t csirsfirstOFDMSymbolInTimeDomain2;
882 uint8_t csirscdmType;
883 uint8_t csirsdensity;
884 uint8_t csirsdensitydot5;
885 uint8_t powerControlOffset;
886 uint8_t powerControlOffsetSS;
887 uint16_t periodicityAndOffset;
890 typedef struct macCellCfg
892 uint16_t cellId; /* Cell Id */
893 CarrierCfg carrCfg; /* Carrier configuration */
894 CellCfg cellCfg; /* Cell Configuration*/
895 SsbCfg ssbCfg; /* SSB configuration */
896 CsiRsCfg csiRsCfg; /*Reference: 38.331 CSI-RS-ResourceMapping */
897 PrachCfg prachCfg; /* PRACH Configuration */
899 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
901 PrecodingConf precodingConf;
902 BeamformingConf beamCfg;
905 typedef struct macCellCfgCfm
911 typedef struct ulCcchInd
915 uint16_t ulCcchMsgLen;
919 typedef struct dlCcchInd
923 DlCcchMsgType msgType;
924 uint16_t dlCcchMsgLen;
928 typedef struct bsrTmrCfg
930 uint16_t periodicTimer;
932 uint16_t srDelayTimer;
936 /* Info of Scheduling Request to Add/Modify */
937 typedef struct schedReqInfo
940 SrProhibitTimer srProhibitTmr;
941 SrTransMax srTransMax;
944 /* Scheduling Request Configuration */
945 typedef struct schedReqCfg
947 uint8_t addModListCount;
948 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
949 uint8_t relListCount;
950 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
953 typedef struct tagInfo
956 TimeAlignmentTimer timeAlignTimer;
959 typedef struct tagCfg
961 uint8_t addModListCount;
962 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
963 uint8_t relListCount;
964 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
967 typedef struct phrCfg
969 PhrPeriodicTimer periodicTimer;
970 PhrProhibitTimer prohibitTimer;
971 PhrTxPwrFactorChange txPowerFactor;
974 bool phrType2OtherCell;
975 PhrModeOtherCG phrOtherCG;
978 typedef struct macCellGrpCfg
980 SchedReqCfg schReqCfg;
983 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
991 typedef struct phyCellGrpCfg
993 PdschHarqAckCodebook pdschHarqAckCodebook;
997 /* Control resource set info */
998 typedef struct controlRsrcSet
1000 uint8_t cRSetId; /* Control resource set id */
1001 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1003 REGMappingType cceRegMappingType;
1004 PrecoderGranul precoderGranularity;
1005 uint16_t dmrsScramblingId;
1008 typedef struct mSlotPeriodAndOffset
1010 MSlotPeriodicity mSlotPeriodicity;
1011 uint16_t mSlotOffset;
1012 }MSlotPeriodAndOffset;
1014 /* Search Space info */
1015 typedef struct searchSpace
1017 uint8_t searchSpaceId;
1019 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1020 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1021 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1022 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1023 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1024 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1025 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1026 SearchSpaceType searchSpaceType;
1027 uint8_t ueSpecificDciFormat;
1030 /* PDCCH cofniguration */
1031 typedef struct pdcchConfig
1033 uint8_t numCRsetToAddMod;
1034 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1035 uint8_t numCRsetToRel;
1036 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1037 uint8_t numSearchSpcToAddMod;
1038 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1039 uint8_t numSearchSpcToRel;
1040 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1043 /* PDSCH time domain resource allocation */
1044 typedef struct pdschTimeDomRsrcAlloc
1047 CommonMappingType mappingType;
1048 uint8_t startSymbol;
1049 uint8_t symbolLength;
1050 uint8_t startSymbolAndLength;
1051 }PdschTimeDomRsrcAlloc;
1054 typedef struct pdschBundling
1056 struct staticBundling
1058 BundlingSizeSet2 size;
1060 struct dynamicBundling
1062 BundlingSizeSet1 sizeSet1;
1063 BundlingSizeSet2 sizeSet2;
1067 /* DMRS downlink configuration */
1068 typedef struct dmrsDlCfg
1070 AddPosType addPos; /* DMRS additional position */
1073 /* PDSCH Configuration */
1074 typedef struct pdschConfig
1076 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1077 ResAllocType resourceAllocType;
1078 uint8_t numTimeDomRsrcAlloc;
1079 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1081 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1082 BundlingType bundlingType;
1083 PdschBundling bundlingInfo;
1086 /* Initial Downlink BWP */
1087 typedef struct initialDlBwp
1090 PdcchConfig pdcchCfg;
1092 PdschConfig pdschCfg;
1095 /*Spec 38.331 "SPS-Config'*/
1096 typedef struct spsConfig
1098 uint16_t periodicity;
1099 uint8_t numOfHqProcess;
1104 typedef uint8_t RadioLinkMonitoringRsId;
1106 typedef struct radioLinkMonRS
1108 RadioLinkMonitoringRsId radioLinkMonitoringRsId;
1109 PurposeOfFailureDet purpose;
1113 uint8_t nzpCsiRsResId;
1117 typedef struct radioLinkConfig
1119 RadioLinkMonRS failurDetResAddModList[1];
1120 RadioLinkMonitoringRsId failurDetResRelList[1];
1121 uint8_t beamFailureInstanceMaxCount;
1122 uint8_t beamFailureDetectionTimer;
1125 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1126 typedef struct bwpDlCfgDed
1128 PdcchConfig pdcchCfgDed;
1129 PdschConfig pdschCfgDed;
1130 SpsConfig spsCfgDed;
1131 RadioLinkConfig radioLnkMonCfgDed;
1134 /* Downlink BWP information */
1135 typedef struct dlBwpInfo
1138 BwpDlConfig bwpCommon;
1139 BwpDlCfgDed bwpDedicated;
1142 /* PDCCH Serving Cell configuration */
1143 typedef struct pdschServCellCfg
1145 uint8_t *maxMimoLayers;
1146 NumHarqProcForPdsch numHarqProcForPdsch;
1147 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1148 bool *codeBlkGrpFlushInd;
1149 PdschXOverhead *xOverhead;
1152 /* PUCCH Configuration */
1154 typedef struct pucchResrcSetInfo
1157 uint8_t resrcListCount;
1158 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1159 uint8_t maxPayLoadSize;
1162 typedef struct pucchResrcSetCfg
1164 uint8_t resrcSetToAddModListCount;
1165 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1166 uint8_t resrcSetToRelListCount;
1167 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1170 typedef struct pucchFormat0
1172 uint8_t initialCyclicShift;
1174 uint8_t startSymbolIdx;
1177 typedef struct pucchFormat1
1179 uint8_t initialCyclicShift;
1181 uint8_t startSymbolIdx;
1185 typedef struct pucchFormat2_3
1189 uint8_t startSymbolIdx;
1192 typedef struct pucchFormat4
1197 uint8_t startSymbolIdx;
1200 typedef struct pucchResrcInfo
1204 uint8_t intraFreqHop;
1205 uint16_t secondPrbHop;
1206 uint8_t pucchFormat;
1209 PucchFormat0 *format0;
1210 PucchFormat1 *format1;
1211 PucchFormat2_3 *format2;
1212 PucchFormat2_3 *format3;
1213 PucchFormat4 *format4;
1217 typedef struct pucchResrcCfg
1219 uint8_t resrcToAddModListCount;
1220 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1221 uint8_t resrcToRelListCount;
1222 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1225 typedef struct pucchFormatCfg
1227 bool interSlotFreqHop;
1229 uint8_t maxCodeRate;
1235 typedef struct schedReqResrcInfo
1239 uint8_t periodicity;
1244 typedef struct pucchSchedReqCfg
1246 uint8_t schedAddModListCount;
1247 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1248 uint8_t schedRelListCount;
1249 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1252 typedef struct spatialRelationInfo
1254 uint8_t spatialRelationId;
1255 uint8_t servCellIdx;
1256 uint8_t pathLossRefRSId;
1258 uint8_t closeLoopIdx;
1259 }SpatialRelationInfo;
1261 typedef struct pucchSpatialCfg
1263 uint8_t spatialAddModListCount;
1264 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1265 uint8_t spatialRelListCount;
1266 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1269 typedef struct p0PucchCfg
1275 typedef struct pathLossRefRSCfg
1277 uint8_t pathLossRefRSId;
1280 typedef struct pucchMultiCsiCfg
1282 uint8_t multiCsiResrcListCount;
1283 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1286 typedef struct pucchDlDataToUlAck
1288 uint8_t dlDataToUlAckListCount;
1289 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1290 }PucchDlDataToUlAck;
1292 typedef struct pucchPowerControl
1300 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1301 uint8_t pathLossRefRSListCount;
1302 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1305 typedef struct pucchCfg
1307 PucchResrcSetCfg *resrcSet;
1308 PucchResrcCfg *resrc;
1309 PucchFormatCfg *format1;
1310 PucchFormatCfg *format2;
1311 PucchFormatCfg *format3;
1312 PucchFormatCfg *format4;
1313 PucchSchedReqCfg *schedReq;
1314 PucchMultiCsiCfg *multiCsiCfg;
1315 PucchSpatialCfg *spatialInfo;
1316 PucchDlDataToUlAck *dlDataToUlAck;
1317 PucchPowerControl *powerControl;
1320 /* Transform precoding disabled */
1321 typedef struct transPrecodDisabled
1323 uint16_t scramblingId0;
1324 }TransPrecodDisabled;
1326 /* DMRS Uplink configuration */
1327 typedef struct dmrsUlCfg
1329 AddPosType addPos; /* DMRS additional position */
1330 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1333 /* PUSCH Configuration */
1334 typedef struct puschCfg
1336 uint8_t dataScramblingId;
1337 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1338 ResAllocType resourceAllocType;
1339 uint8_t numTimeDomRsrcAlloc;
1340 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1341 TransformPrecoder transformPrecoder;
1344 /* Initial Uplink BWP */
1345 typedef struct initialUlBwp
1353 typedef struct bwpUlCfgDed
1359 /* Uplink BWP information */
1360 typedef struct ulBwpInfo
1363 BwpUlConfig bwpCommon;
1367 typedef struct rachCfgGeneric
1369 uint8_t prachCfgIdx; /* PRACH config idx */
1370 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
1371 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
1372 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
1373 int16_t preambleRcvdTargetPower; /*Prach Target power received*/
1374 uint8_t preambleTransMax; /*Preamble Transmission Max power*/
1375 uint8_t pwrRampingStep; /*Power Ramping Step*/
1376 uint8_t raRspWindow; /* RA Response Window */
1379 typedef struct raPrioritization
1381 uint8_t powerRampingStepHighPriority;
1382 uint8_t scalingFactorBI;
1385 typedef struct bfrCsiRsRes
1389 uint8_t raPreambleIndex;
1392 typedef struct bfrSsbRes
1395 uint8_t raPreambleIndex;
1398 typedef struct prachResDedBfr
1404 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1405 typedef struct beamFailRecoveryCfg
1407 uint8_t rootSeqIndexBfr;
1408 RachCfgGeneric rachCfgBfr;
1409 uint8_t rsrpThreshSsbBfr;
1410 PrachResDedBfr candidteBeamRSList;
1411 uint8_t ssbPerachBfr;
1412 uint8_t raSsbOccMaskIndex;
1413 uint8_t recoverySearchSpaceId;
1414 RaPrioritization raPrioBfr;
1416 uint8_t msg1SubcSpacing;
1417 }BeamFailRecoveryCfg;
1419 /* Serving cell configuration */
1420 typedef struct servCellCfgInfo
1422 InitialDlBwp initDlBwp;
1423 RadioLinkConfig radioLinkMonConfig;
1424 uint8_t numDlBwpToAdd;
1425 DlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1426 uint8_t firstActvDlBwpId;
1427 uint8_t defaultDlBwpId;
1428 uint8_t *bwpInactivityTmr;
1429 PdschServCellCfg pdschServCellCfg;
1430 InitialUlBwp initUlBwp;
1431 BeamFailRecoveryCfg beamFailureRecoveryCfg;
1432 uint8_t numUlBwpToAdd;
1433 UlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1434 uint8_t firstActvUlBwpId;
1437 /* Special cell configuration */
1438 typedef struct spCellCfg
1440 uint8_t servCellIdx;
1441 ServCellCfgInfo servCellCfg;
1444 typedef struct bwpRelInfo
1449 /* Serving cell Re-configuration */
1450 typedef struct servCellRecfgInfo
1452 InitialDlBwp initDlBwp;
1453 RadioLinkConfig radioLinkMonConfig;
1454 uint8_t numDlBwpToAddOrMod;
1455 DlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1456 uint8_t numDlBwpToRel;
1457 BwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1458 uint8_t firstActvDlBwpId;
1459 uint8_t defaultDlBwpId;
1460 uint8_t *bwpInactivityTmr;
1461 PdschServCellCfg pdschServCellCfg;
1462 InitialUlBwp initUlBwp;
1463 uint8_t numUlBwpToAddOrMod;
1464 UlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1465 uint8_t numUlBwpToRel;
1466 BwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1467 uint8_t firstActvUlBwpId;
1470 /* Special cell Re-configuration */
1471 typedef struct spCellRecfg
1473 uint8_t servCellIdx;
1474 ServCellRecfgInfo servCellCfg;
1477 typedef struct ambrCfg
1479 uint32_t ulBr; /* UL Bit rate */
1482 typedef struct nonDynFiveQi
1487 uint16_t maxDataBurstVol;
1490 typedef struct dynFiveQi
1493 uint16_t packetDelayBudget;
1494 uint8_t packetErrRateScalar;
1495 uint8_t packetErrRateExp;
1497 uint8_t delayCritical;
1499 uint16_t maxDataBurstVol;
1502 typedef struct ngRanAllocAndRetPri
1504 uint8_t priorityLevel;
1505 uint8_t preEmptionCap;
1506 uint8_t preEmptionVul;
1507 }NgRanAllocAndRetPri;
1509 typedef struct grbQosInfo
1511 uint32_t maxFlowBitRateDl;
1512 uint32_t maxFlowBitRateUl;
1513 uint32_t guarFlowBitRateDl;
1514 uint32_t guarFlowBitRateUl;
1517 typedef struct drbQos
1519 QosType fiveQiType; /* Dynamic or non-dynamic */
1522 NonDynFiveQi nonDyn5Qi;
1525 NgRanAllocAndRetPri ngRanRetPri;
1526 GrbQosInfo grbQosInfo;
1527 uint16_t pduSessionId;
1528 uint32_t ulPduSessAggMaxBitRate;
1531 typedef struct ulLcCfg
1536 PBitRate pbr; // prioritisedBitRate
1537 BucketSizeDur bsd; // bucketSizeDuration
1540 typedef struct dlLcCfg
1542 LcPriority lcp; // logical Channel Prioritization
1545 typedef struct lcCfg
1555 typedef struct modulationInfo
1557 uint8_t modOrder; /* Modulation order */
1558 uint8_t mcsIndex; /* MCS Index */
1559 McsTable mcsTable; /* MCS table */
1562 typedef struct macUeCreateReq
1568 bool macCellGrpCfgPres;
1569 MacCellGrpCfg macCellGrpCfg;
1570 bool phyCellGrpCfgPres;
1571 PhyCellGrpCfg phyCellGrpCfg;
1573 SpCellCfg spCellCfg;
1575 ModulationInfo dlModInfo; /* DL modulation info */
1576 ModulationInfo ulModInfo; /* UL modulation info */
1578 LcCfg lcCfgList[MAX_NUM_LC];
1581 /* UE Re-configuration */
1582 typedef struct macUeRecfg
1588 bool macCellGrpRecfgPres;
1589 MacCellGrpCfg macCellGrpRecfg;
1590 bool phyCellGrpRecfgPres;
1591 PhyCellGrpCfg phyCellGrpRecfg;
1592 bool spCellRecfgPres;
1593 SpCellRecfg spCellRecfg;
1595 ModulationInfo dlModInfo;
1596 ModulationInfo ulModInfo;
1597 uint8_t numLcsToAdd;
1598 LcCfg lcCfgAdd[MAX_NUM_LC];
1599 uint8_t numLcsToDel;
1600 uint8_t lcIdToDel[MAX_NUM_LC];
1601 uint8_t numLcsToMod;
1602 LcCfg lcCfgMod[MAX_NUM_LC];
1603 DataTransmissionAction transmissionAction;
1605 bool drxConfigIndicatorRelease;
1609 typedef struct nrcgi
1615 typedef struct srbFailInfo
1621 typedef struct drbFailInfo
1627 typedef struct sCellFailInfo
1633 typedef struct macUeCreateRsp
1638 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1639 SRBFailInfo *failedSRBlisti;
1640 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1641 DRBFailInfo *failedDRBlist;
1642 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1643 SCellFailInfo *failedSCellList;
1644 uint8_t numDRBModFailed; /* valid values : 0 to MAX_NUM_DRB */
1645 DRBFailInfo *failedDRBModlist;
1648 typedef struct macUeCreateRsp MacUeRecfgRsp;
1650 typedef struct rachRsrcReq
1655 uint8_t ssbIdx[MAX_NUM_SSB];
1658 typedef struct macCfraSsbResource
1661 uint8_t raPreambleIdx;
1662 }MacCfraSsbResource;
1664 typedef struct macCfraResource
1667 MacCfraSsbResource ssbResource[MAX_NUM_SSB];
1670 typedef struct macRachRsrcRsp
1675 uint16_t newCrnti; /* This parameter maps to 3GPP TS 38.331 newUE-Identity */
1676 MacCfraResource cfraResource;
1679 typedef struct macRachRsrcRel
1686 typedef struct ueDelete
1693 typedef struct ueDeleteRsp
1697 CauseOfResult status;
1700 typedef struct macCellDeleteReq
1705 typedef struct macCellDeleteRsp
1708 CauseOfResult status;
1711 typedef struct macSliceCfgRsp
1715 CauseOfResult cause;
1718 typedef struct rrmPolicyRatio
1722 uint8_t dedicatedRatio;
1725 typedef struct rrmPolicyMemberList
1729 }RrmPolicyMemberList;
1731 typedef struct macSliceRrmPolicy
1733 ResourceType resourceType;
1734 uint8_t numOfRrmPolicyMem;
1735 RrmPolicyMemberList **rRMPolicyMemberList;
1736 RrmPolicyRatio policyRatio;
1739 typedef struct macSliceCfgReq
1741 uint8_t numOfRrmPolicy;
1742 MacSliceRrmPolicy **listOfRrmPolicy;
1745 /*As per ORAN-WG8, Slice Cfg and ReCfg are same structures*/
1746 typedef struct macSliceCfgReq MacSliceRecfgReq;
1747 typedef struct macSliceCfgRsp MacSliceRecfgRsp;
1749 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.17 DL PCCH Indication */
1750 typedef struct dlPcchInd
1760 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.1 Cell Start */
1761 typedef struct cellInfo
1763 SlotTimingInfo slotInfo;
1767 typedef struct cellInfo CellStartInfo;
1768 typedef struct cellInfo CellStopInfo;
1770 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.12 UE Reset Request */
1771 typedef struct ueReset
1777 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.13 UE Reset Response */
1778 typedef struct ueResetRsp
1782 CauseOfResult status;
1785 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.14 UE Sync Status Indication */
1786 typedef struct ueSyncStatusInd
1791 }MacUeSyncStatusInd;
1793 /* The following list of structures is taken from the SI-SchedulingInfo section of specification 33.331. */
1794 typedef struct sibTypeInfo
1801 typedef struct sibMappingInfo
1803 uint8_t numSibTypeInfo;
1804 SibTypeInfo sibTypeInfo[NUM_SIB];
1807 typedef struct schedulingInfo
1809 SiBroadcastStatus siBroadcastStatus;
1810 SiPeriodicity siPeriodicity;
1811 SibMappingInfo sibMappingInfo;
1814 typedef struct rachOccasionsSi
1816 RachCfgGeneric rachConfigSi;
1817 SsbPerRachOccasion ssbPerRachOccasion;
1820 typedef struct siReqRsrc
1822 uint8_t raPreambleStartIndex;
1823 uint8_t raAssociationPeriodIndex;
1824 uint8_t raSsbOccasionMaskIndex;
1827 typedef struct siRequestResource
1829 uint8_t numOfSiReqRsrc;
1830 SiReqRsrc siReqRsrc[MAX_SI_MESSAGE];
1833 typedef struct siRequestConfig
1835 RachOccasionsSi rachOccasionsSi;
1836 SiRequestPeriod siRequestPeriod;
1837 SiRequestResource siRequestResource;
1840 typedef struct schedulingInfoList
1843 SchedulingInfo schedulingInfo[MAX_SI_MESSAGE];
1844 }SchedulingInfoList;
1846 typedef struct siSchedulingInfo
1848 SchedulingInfoList schInfoList;
1849 SiWindowLength siWindowLength;
1850 SiRequestConfig siRequestConfig;
1851 SiRequestConfig siRequestConfigSUL;
1855 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.18 DL Broadcast Request */
1856 typedef struct macDlBroadcastReq
1860 SiSchedulingInfo **siSchedulingInfo;
1863 typedef struct macStatsGrpInfo
1866 uint16_t periodicity; /* In milliseconds */
1868 MacMeasurementType statsList[MAX_NUM_STATS];
1871 typedef struct macStatsReq
1873 uint64_t subscriptionId;
1874 uint8_t numStatsGroup;
1875 MacStatsGrpInfo statsGrpList[MAX_NUM_STATS_GRP];
1878 typedef struct macStatsGrpRejected
1881 CauseOfResult cause;
1882 }MacStatsGrpRejected;
1884 typedef struct macStatsRsp
1886 uint64_t subscriptionId;
1887 uint8_t numGrpAccepted;
1888 uint8_t statsGrpAcceptedList[MAX_NUM_STATS_GRP];
1889 uint8_t numGrpRejected;
1890 MacStatsGrpRejected statsGrpRejectedList[MAX_NUM_STATS_GRP];
1893 typedef struct macStats
1895 MacMeasurementType type;
1899 typedef struct macStatsInd
1901 uint64_t subscriptionId;
1904 MacStats measuredStatsList[MAX_NUM_STATS];
1907 typedef struct macStatsDeleteReq
1909 uint64_t subscriptionId;
1910 uint8_t numStatsGroupToBeDeleted;
1911 uint8_t statsGrpIdToBeDelList[MAX_NUM_STATS_GRP];
1914 typedef struct macStatsDeleteInfo
1917 MacRsp statsGrpDelRsp;
1918 CauseOfResult statsGrpDelCause;
1919 }MacStatsDeleteInfo;
1921 typedef struct macStatsDeleteRsp
1923 uint64_t subscriptionId; /* subscription Id */
1924 MacRsp subsDelRsp; /* deletion status of all statsGrp with given subscriptionId */
1925 CauseOfResult subsDelCause; /* cause of failure in deletion of all statsGrp with given subscriptionId */
1926 uint8_t numStatsGroupDeleted; /* number of actions to deleted */
1927 MacStatsDeleteInfo statsGrpDelInfo[MAX_NUM_STATS_GRP]; /*list of the deletion statuses for specific actions */
1930 typedef struct macStatsReq MacStatsModificationReq;
1931 typedef struct macStatsRsp MacStatsModificationRsp;
1933 /****************** FUNCTION POINTERS ********************************/
1935 /* DL broadcast req from DU APP to MAC*/
1936 typedef uint8_t (*DuMacDlBroadcastReq) ARGS((
1938 MacDlBroadcastReq *dlBroadcast));
1940 /* Functions for CellUp Ind from MAC to DU APP*/
1941 typedef uint8_t (*DuMacCellUpInd) ARGS((
1943 OduCellId *cellId ));
1945 /* Functions for slot Ind from MAC to DU APP*/
1946 typedef uint8_t (*DuMacSlotInd) ARGS((
1948 SlotTimingInfo *slotIndInfo));
1950 /* Functions for stop Ind from MAC to DU APP*/
1951 typedef uint8_t (*DuMacStopInd) ARGS((
1953 OduCellId *cellId ));
1955 /* Functions for mac cell start req */
1956 typedef uint8_t (*DuMacCellStart) ARGS((
1958 CellStartInfo *cellId));
1960 /* Functions for mac cell stop request */
1961 typedef uint8_t (*DuMacCellStop) ARGS((
1963 CellStopInfo *cellId ));
1965 /* Function pointers for packing macCellCfg Request and Confirm */
1966 typedef uint8_t (*packMacCellCfgReq) ARGS((
1968 MacCellCfg *macCellCfg ));
1970 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1972 MacCellCfgCfm *macCellCfgCfm ));
1974 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1976 MacCellCfg *macCellCfg));
1978 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1980 MacCellCfgCfm *macCellCfgCfm ));
1982 /* Functions for UL CCCH Ind from MAC to DU APP*/
1983 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1985 UlCcchIndInfo *ulCcchIndInfo ));
1987 /* Functions for DL CCCH Ind from DU APP to MAC*/
1988 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1990 DlCcchIndInfo *dlCcchIndInfo ));
1992 /* UE create Request from DU APP to MAC*/
1993 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1995 MacUeCreateReq *ueCfg ));
1997 /* UE create Response from MAC to DU APP */
1998 typedef uint8_t (*MacDuUeCreateRspFunc) ARGS((
2000 MacUeCreateRsp *cfgRsp));
2002 /* UE Reconfig Request from DU APP to MAC */
2003 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
2005 MacUeRecfg *ueCfg ));
2007 /* UE Reconfig Response from MAC to DU APP */
2008 typedef uint8_t (*MacDuUeRecfgRspFunc) ARGS((
2010 MacUeRecfgRsp *cfgRsp));
2012 /* RACH Resource Request from DU APP to MAC */
2013 typedef uint8_t (*DuMacRachRsrcReq) ARGS((
2015 MacRachRsrcReq *rachRsrcReq));
2017 /* RACH Resource Response from MAC to DU APP */
2018 typedef uint8_t (*MacDuRachRsrcRspFunc) ARGS((
2020 MacRachRsrcRsp *rachRsrcRsp));
2022 /* RACH Resource Release from DU APP to MAC */
2023 typedef uint8_t (*DuMacRachRsrcRel) ARGS((
2025 MacRachRsrcRel *rachRsrcRel));
2027 /* UE Delete Request from DU APP to MAC*/
2028 typedef uint8_t (*DuMacUeDeleteReq) ARGS((
2030 MacUeDelete *ueDel ));
2032 /* UE Delete Response from MAC to DU APP*/
2033 typedef uint8_t (*MacDuUeDeleteRspFunc) ARGS((
2035 MacUeDeleteRsp *deleteRsp));
2037 /* Cell Delete Request from DU APP to MAC*/
2038 typedef uint8_t (*DuMacCellDeleteReq) ARGS((
2040 MacCellDeleteReq *cellDelete ));
2042 /* Cell Delete Response from MAC to DU APP*/
2043 typedef uint8_t (*MacDuCellDeleteRspFunc) ARGS((
2045 MacCellDeleteRsp *cellDeleteRsp));
2047 /* Slice Cfg Request from DU APP to MAC*/
2048 typedef uint8_t (*DuMacSliceCfgReq) ARGS((
2050 MacSliceCfgReq *CfgReq));
2052 /* Slice Cfg Response from MAC to DU APP */
2053 typedef uint8_t (*MacDuSliceCfgRspFunc) ARGS((
2055 MacSliceCfgRsp *cfgRsp));
2057 /* Slice ReReCfg Request from DU APP to MAC*/
2058 typedef uint8_t (*DuMacSliceRecfgReq) ARGS((
2060 MacSliceRecfgReq *CfgReq));
2062 /* Slice ReReCfg Response from MAC to DU APP */
2063 typedef uint8_t (*MacDuSliceRecfgRspFunc) ARGS((
2065 MacSliceRecfgRsp *cfgRsp));
2067 /* Pcch indication from DU APP to MAC*/
2068 typedef uint8_t (*DuMacDlPcchInd) ARGS((
2070 DlPcchInd *pcchInd));
2072 /* UE Reset Request from DU APP to MAC*/
2073 typedef uint8_t (*DuMacUeResetReq) ARGS((
2075 MacUeResetReq *ueReset ));
2077 /* UE Reset Response from MAC to DU APP*/
2078 typedef uint8_t (*MacDuUeResetRspFunc) ARGS((
2080 MacUeResetRsp *resetRsp));
2082 /* UE sync status indication from MAC to DU APP*/
2083 typedef uint8_t (*MacDuUeSyncStatusIndFunc) ARGS((
2085 MacUeSyncStatusInd *syncStatusInd));
2087 /* Statitics Request from DU APP to MAC */
2088 typedef uint8_t (*DuMacStatsReqFunc) ARGS((
2090 MacStatsReq *statsReq));
2092 /* Statistics Response from MAC to DU APP */
2093 typedef uint8_t (*MacDuStatsRspFunc) ARGS((
2095 MacStatsRsp *statsRsp));
2097 /* Statistics Ind from MAC to DU APP */
2098 typedef uint8_t (*MacDuStatsIndFunc) ARGS((
2100 MacStatsInd *statsInd));
2102 /* Statitics Delete Request from DU APP to MAC */
2103 typedef uint8_t (*DuMacStatsDeleteReqFunc) ARGS((
2105 MacStatsDeleteReq *statsDeleteReq));
2107 /* Statistics Delete Response from MAC to DU APP */
2108 typedef uint8_t (*MacDuStatsDeleteRspFunc) ARGS((
2110 MacStatsDeleteRsp *statsDeleteRsp));
2112 /* Statitics Modification Request from DU APP to MAC */
2113 typedef uint8_t (*DuMacStatsModificationReqFunc) ARGS((
2115 MacStatsModificationReq *statsModificationReq));
2117 /* Statistics Modification Response from MAC to DU APP */
2118 typedef uint8_t (*MacDuStatsModificationRspFunc) ARGS((
2120 MacStatsModificationRsp *statsModificationRsp));
2122 /******************** FUNCTION DECLARATIONS ********************************/
2123 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
2124 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
2125 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
2127 uint8_t packMacCellStart(Pst *pst, CellStartInfo *cellStartInfo);
2128 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
2129 uint8_t MacProcCellStart(Pst *pst, CellStartInfo *cellStartInfo);
2131 uint8_t packMacCellStop(Pst *pst, CellStopInfo *cellStopInfo);
2132 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
2133 uint8_t MacProcCellStop(Pst *pst, CellStopInfo *cellStopInfo);
2135 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
2136 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
2137 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
2139 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
2140 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
2141 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
2143 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
2144 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
2145 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
2146 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
2148 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
2149 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
2150 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
2152 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
2153 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
2154 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
2156 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
2157 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
2158 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
2160 uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
2161 uint8_t unpackDuMacUeCreateRsp(MacDuUeCreateRspFunc func, Pst *pst, Buffer *mBuf);
2162 uint8_t DuProcMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
2164 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
2165 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
2166 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
2168 uint8_t packDuMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp);
2169 uint8_t unpackDuMacUeRecfgRsp(MacDuUeRecfgRspFunc func, Pst *pst, Buffer *mBuf);
2170 uint8_t DuProcMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp);
2172 uint8_t packDuMacRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
2173 uint8_t unpackMacRachRsrcReq(DuMacRachRsrcReq func, Pst *pst, Buffer *mBuf);
2174 uint8_t MacProcRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
2176 uint8_t packDuMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
2177 uint8_t unpackDuMacRachRsrcRsp(MacDuRachRsrcRspFunc func, Pst *pst, Buffer *mBuf);
2178 uint8_t DuProcMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
2180 uint8_t packDuMacRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
2181 uint8_t unpackMacRachRsrcRel(DuMacRachRsrcRel func, Pst *pst, Buffer *mBuf);
2182 uint8_t MacProcRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
2184 uint8_t packDuMacUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
2185 uint8_t MacProcUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
2186 uint8_t unpackMacUeDeleteReq(DuMacUeDeleteReq func, Pst *pst, Buffer *mBuf);
2188 uint8_t packDuMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
2189 uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
2190 uint8_t unpackDuMacUeDeleteRsp(MacDuUeDeleteRspFunc func, Pst *pst, Buffer *mBuf);
2192 uint8_t packDuMacCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete);
2193 uint8_t MacProcCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete);
2194 uint8_t unpackMacCellDeleteReq(DuMacCellDeleteReq func, Pst *pst, Buffer *mBuf);
2196 uint8_t packDuMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
2197 uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
2198 uint8_t unpackDuMacCellDeleteRsp(MacDuCellDeleteRspFunc func, Pst *pst, Buffer *mBuf);
2200 uint8_t packDuMacSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
2201 uint8_t MacProcSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
2202 uint8_t unpackMacSliceCfgReq(DuMacSliceCfgReq func, Pst *pst, Buffer *mBuf);
2204 uint8_t DuProcMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
2205 uint8_t packDuMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
2206 uint8_t unpackDuMacSliceCfgRsp(MacDuSliceCfgRspFunc func, Pst *pst, Buffer *mBuf);
2208 uint8_t packDuMacSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq);
2209 uint8_t MacProcSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq);
2210 uint8_t unpackMacSliceRecfgReq(DuMacSliceRecfgReq func, Pst *pst, Buffer *mBuf);
2212 uint8_t DuProcMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp);
2213 uint8_t packDuMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp);
2214 uint8_t unpackDuMacSliceRecfgRsp(MacDuSliceRecfgRspFunc func, Pst *pst, Buffer *mBuf);
2216 uint8_t duHandleSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
2217 uint8_t packMacSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
2218 uint8_t unpackDuMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
2220 uint8_t packDuMacDlPcchInd(Pst *pst, DlPcchInd *pcchInd);
2221 uint8_t MacProcDlPcchInd(Pst *pst, DlPcchInd *pcchInd);
2222 uint8_t unpackMacDlPcchInd(DuMacDlPcchInd func, Pst *pst, Buffer *mBuf);
2224 int8_t getFreeBitFromUeBitMap(uint16_t cellId);
2225 void unsetBitInUeBitMap(uint16_t cellId, uint8_t bitPos);
2227 uint8_t packDuMacUeResetReq(Pst *pst, MacUeResetReq *ueReset);
2228 uint8_t MacProcUeResetReq(Pst *pst, MacUeResetReq *ueReset);
2229 uint8_t unpackMacUeResetReq(DuMacUeResetReq func, Pst *pst, Buffer *mBuf);
2231 uint8_t packDuMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp);
2232 uint8_t DuProcMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp);
2233 uint8_t unpackDuMacUeResetRsp(MacDuUeResetRspFunc func, Pst *pst, Buffer *mBuf);
2235 uint8_t packDuMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
2236 uint8_t DuProcMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
2237 uint8_t unpackDuMacUeSyncStatusInd(MacDuUeSyncStatusIndFunc func, Pst *pst, Buffer *mBuf);
2239 uint8_t packDuMacDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq);
2240 uint8_t MacProcDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq);
2241 uint8_t unpackMacDlBroadcastReq(DuMacDlBroadcastReq func, Pst *pst, Buffer *mBuf);
2243 uint8_t packDuMacStatsReq(Pst *pst, MacStatsReq *statsReq);
2244 uint8_t MacProcStatsReq(Pst *pst, MacStatsReq *statsReq);
2245 uint8_t unpackMacStatsReq(DuMacStatsReqFunc func, Pst *pst, Buffer *mBuf);
2247 uint8_t packDuMacStatsRsp(Pst *pst, MacStatsRsp *statsRsp);
2248 uint8_t DuProcMacStatsRsp(Pst *pst, MacStatsRsp *statsRsp);
2249 uint8_t unpackDuMacStatsRsp(MacDuStatsRspFunc func, Pst *pst, Buffer *mBuf);
2251 uint8_t packDuMacStatsInd(Pst *pst, MacStatsInd *statsRsp);
2252 uint8_t DuProcMacStatsInd(Pst *pst, MacStatsInd *statsRsp);
2253 uint8_t unpackDuMacStatsInd(MacDuStatsIndFunc func, Pst *pst, Buffer *mBuf);
2255 uint8_t packDuMacStatsDeleteReq(Pst *pst, MacStatsDeleteReq *statsDeleteReq);
2256 uint8_t MacProcStatsDeleteReq(Pst *pst, MacStatsDeleteReq *statsDeleteReq);
2257 uint8_t unpackMacStatsDeleteReq(DuMacStatsDeleteReqFunc func, Pst *pst, Buffer *mBuf);
2259 uint8_t packDuMacStatsDeleteRsp(Pst *pst, MacStatsDeleteRsp *statsDeleteRsp);
2260 uint8_t DuProcMacStatsDeleteRsp(Pst *pst, MacStatsDeleteRsp *statsDeleteRsp);
2261 uint8_t unpackDuMacStatsDeleteRsp(MacDuStatsDeleteRspFunc func, Pst *pst, Buffer *mBuf);
2263 uint8_t packDuMacStatsModificationReq(Pst *pst, MacStatsModificationReq *statsModificationReq);
2264 uint8_t MacProcStatsModificationReq(Pst *pst, MacStatsModificationReq *statsModificationReq);
2265 uint8_t unpackMacStatsModificationReq(DuMacStatsModificationReqFunc func, Pst *pst, Buffer *mBuf);
2267 uint8_t packDuMacStatsModificationRsp(Pst *pst, MacStatsModificationRsp *statsModificationRsp);
2268 uint8_t DuProcMacStatsModificationRsp(Pst *pst, MacStatsModificationRsp *statsModificationRsp);
2269 uint8_t unpackDuMacStatsModificationRsp(MacDuStatsModificationRspFunc func, Pst *pst, Buffer *mBuf);
2275 /**********************************************************************
2277 **********************************************************************/