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_0_INDEX 0
30 #define CORESET_1_INDEX 1
31 #define CORESET_2_INDEX 2
32 #define CORESET_3_INDEX 3
33 #define CORESET_4_INDEX 4
34 #define SEARCHSPACE_0_INDEX 0
35 #define SEARCHSPACE_1_INDEX 1
36 #define SEARCHSPACE_2_INDEX 2
37 #define SEARCHSPACE_3_INDEX 3
38 #define SEARCHSPACE_4_INDEX 4
39 #define SS_MONITORING_SLOT_SL1 0 /* all slots */
40 #define SS_MONITORING_SYMBOL 0x2000; /* symbol-0, set 14th bit */
42 /* Macro for Ue Context */
43 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
44 #define MAC_NUM_TAGS 4 /* Max number of timing advance groups */
45 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
46 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
47 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
48 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
49 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
50 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
51 #define MAX_NUM_SCELL 32
53 /* PUCCH Configuration Macro */
54 #define MAX_NUM_PUCCH_RESRC 128
55 #define MAX_NUM_PUCCH_RESRC_SET 4
56 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
57 #define MAX_NUM_SPATIAL_RELATIONS 8
58 #define MAX_NUM_PUCCH_P0_PER_SET 8
59 #define MAX_NUM_PATH_LOSS_REF_RS 4
60 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
63 #define EVENT_MAC_CELL_CONFIG_REQ 200
64 #define EVENT_MAC_CELL_CONFIG_CFM 201
65 #define EVENT_MAC_CELL_START 202
66 #define EVENT_MAC_CELL_STOP 203
67 #define EVENT_MAC_CELL_UP_IND 204
68 #define EVENT_MAC_STOP_IND 205
69 #define EVENT_MAC_UL_CCCH_IND 206
70 #define EVENT_MAC_DL_CCCH_IND 207
71 #define EVENT_MAC_UE_CREATE_REQ 208
72 #define EVENT_MAC_UE_CREATE_RSP 209
73 #define EVENT_MAC_UE_RECONFIG_REQ 210
74 #define EVENT_MAC_UE_RECONFIG_RSP 211
75 #define EVENT_MAC_UE_DELETE_REQ 212
76 #define EVENT_MAC_UE_DELETE_RSP 213
77 #define EVENT_MAC_CELL_DELETE_REQ 214
78 #define EVENT_MAC_CELL_DELETE_RSP 215
79 #define EVENT_MAC_SLICE_CFG_REQ 216
80 #define EVENT_MAC_SLICE_CFG_RSP 217
81 #define EVENT_MAC_SLICE_RECFG_REQ 218
82 #define EVENT_MAC_SLICE_RECFG_RSP 219
83 #define EVENT_MAC_SLOT_IND 220
84 #define EVENT_MAC_RACH_RESOURCE_REQ 221
85 #define EVENT_MAC_RACH_RESOURCE_RSP 222
86 #define EVENT_MAC_RACH_RESOURCE_REL 223
87 #define EVENT_MAC_DL_PCCH_IND 224
88 #define EVENT_MAC_UE_RESET_REQ 225
89 #define EVENT_MAC_UE_RESET_RSP 226
90 #define EVENT_MAC_UE_SYNC_STATUS_IND 227
91 #define EVENT_MAC_DL_BROADCAST_REQ 228
92 #define EVENT_MAC_STATISTICS_REQ 229
93 #define EVENT_MAC_STATISTICS_RSP 230
94 #define EVENT_MAC_STATISTICS_IND 231
95 #define EVENT_MAC_STATS_DELETE_REQ 232
96 #define EVENT_MAC_STATS_DELETE_RSP 233
97 #define EVENT_MAC_STATISTICS_MODIFY_REQ 234
98 #define EVENT_MAC_STATISTICS_MODIFY_RSP 235
100 #define BSR_PERIODIC_TIMER_SF_10 10
101 #define BSR_RETX_TIMER_SF_320 320
102 #define BSR_SR_DELAY_TMR_2560 2560
104 #define PAGING_SCHED_DELTA 4
107 /********************* Global Variable ********************/
108 uint64_t ueBitMapPerCell[MAX_NUM_CELL]; /* Bit Map to store used/free UE-IDX per Cell */
110 /********************* Interface structure definition ********************/
126 SSB_PER_RACH_OCCASION_ONE_EIGHTH,
127 SSB_PER_RACH_OCCASION_ONE_FOURTH,
128 SSB_PER_RACH_OCCASION_ONE_HALF,
129 SSB_PER_RACH_OCCASION_ONE,
130 SSB_PER_RACH_OCCASION_TWO,
131 SSB_PER_RACH_OCCASION_FOUR,
132 SSB_PER_RACH_OCCASION_EIGHT,
133 SSB_PER_RACH_OCCASION_SIXTEEN
188 OUT_OF_SUNC_MAX_RETRIES
199 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
200 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
201 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
213 RESTRICTED_SET_TYPE_A,
214 RESTRICTED_SET_TYPE_B
246 /* Enums for Ue Create Request */
248 /* SR PROHIBIT TIMER */
275 TIME_ALIGNMENT_TIMER_MS_500,
276 TIME_ALIGNMENT_TIMER_MS_750,
277 TIME_ALIGNMENT_TIMER_MS_1280,
278 TIME_ALIGNMENT_TIMER_MS_1920,
279 TIME_ALIGNMENT_TIMER_MS_2560,
280 TIME_ALIGNMENT_TIMER_MS_5120,
281 TIME_ALIGNMENT_TIMER_MS_10240,
282 TIME_ALIGNMENT_TIMER_INFINITY
287 PHR_PERIODIC_TIMER_SF_10,
288 PHR_PERIODIC_TIMER_SF_20,
289 PHR_PERIODIC_TIMER_SF_50,
290 PHR_PERIODIC_TIMER_SF_100,
291 PHR_PERIODIC_TIMER_SF_200,
292 PHR_PERIODIC_TIMER_SF_500,
293 PHR_PERIODIC_TIMER_SF_1000,
294 PHR_PERIODIC_TIMER_INFINITY
299 PHR_PROHIBIT_TIMER_SF_0,
300 PHR_PROHIBIT_TIMER_SF_10,
301 PHR_PROHIBIT_TIMER_SF_20,
302 PHR_PROHIBIT_TIMER_SF_50,
303 PHR_PROHIBIT_TIMER_SF_100,
304 PHR_PROHIBIT_TIMER_SF_200,
305 PHR_PROHIBIT_TIMER_SF_500,
306 PHR_PROHIBIT_TIMER_SF_1000
311 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
312 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
313 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
314 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
315 }PhrTxPwrFactorChange;
319 PHR_MODE_OTHER_CG_REAL,
320 PHR_MODE_OTHER_CG_VIRTUAL
325 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
326 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
327 }PdschHarqAckCodebook;
331 NUM_HARQ_PROC_FOR_PDSCH_N_2,
332 NUM_HARQ_PROC_FOR_PDSCH_N_4,
333 NUM_HARQ_PROC_FOR_PDSCH_N_6,
334 NUM_HARQ_PROC_FOR_PDSCH_N_10,
335 NUM_HARQ_PROC_FOR_PDSCH_N_16
336 }NumHarqProcForPdsch;
340 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
341 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
342 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
343 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
355 TRANSFORM_PRECODER_ENABLED,
356 TRANSFORM_PRECODER_DISABLED
361 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
362 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
367 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
368 SLOTPERIODICITYANDOFFSET_PR_SL2,
369 SLOTPERIODICITYANDOFFSET_PR_SL4,
370 SLOTPERIODICITYANDOFFSET_PR_SL5,
371 SLOTPERIODICITYANDOFFSET_PR_SL8,
372 SLOTPERIODICITYANDOFFSET_PR_SL10,
373 SLOTPERIODICITYANDOFFSET_PR_SL16,
374 SLOTPERIODICITYANDOFFSET_PR_SL20,
375 SLOTPERIODICITYANDOFFSET_PR_SL40,
376 SLOTPERIODICITYANDOFFSET_PR_SL80,
377 SLOTPERIODICITYANDOFFSET_PR_SL160,
378 SLOTPERIODICITYANDOFFSET_PR_SL320,
379 SLOTPERIODICITYANDOFFSET_PR_SL640,
380 SLOTPERIODICITYANDOFFSET_PR_SL1280,
381 SLOTPERIODICITYANDOFFSET_PR_SL2560
382 }MSlotPeriodAndOffset;
392 SEARCHSPACETYPE_PR_COMMON = 1,
393 SEARCHSPACETYPE_PR_UE_SPECIFIC
404 AGGREGATIONLEVEL_N0 = 0,
405 AGGREGATIONLEVEL_N1 = 1,
406 AGGREGATIONLEVEL_N2 = 2,
407 AGGREGATIONLEVEL_N3 = 3,
408 AGGREGATIONLEVEL_N4 = 4,
409 AGGREGATIONLEVEL_N5 = 5,
410 AGGREGATIONLEVEL_N6 = 6,
411 AGGREGATIONLEVEL_N8 = 7
416 ADDITIONALPOSITION_POS0,
417 ADDITIONALPOSITION_POS1,
418 ADDITIONALPOSITION_POS3
429 RESOURCEALLOCATION_TYPE0,
430 RESOURCEALLOCATION_TYPE1,
431 RESOURCEALLOCATION_DYNAMICSWITCH
442 CODEWORDS_SCHED_BY_DCI_N1,
443 CODEWORDS_SCHED_BY_DCI_N2
448 TYPE_STATIC_BUNDLING = 1,
449 TYPE_DYNAMIC_BUNDLING
462 SET1_SIZE_N2_WIDEBAND,
463 SET1_SIZE_N4_WIDEBAND
517 TRANSPORT_LAYER_FAIL,
524 UNSPECIFIED_RADIO_NW_CAUSE,
526 UNKNOWN_GNB_CU_UE_F1AP_ID,
527 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
528 UNKNOWN_GNB_DU_UE_F1AP_ID,
529 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
530 UNKNOWN_UE_F1AP_ID_PAIR,
531 INCONSISTENT_UE_F1AP_ID_PAIR,
532 INTERACTION_WITH_OTHER_PROCEDURE,
534 ACTION_REQUIRED_FOR_RADIO_REASONS,
535 RADIO_RESOURCES_UNAVAILABLE,
541 RESOURCES_UNAVAILABLE_FOR_SLICE
546 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
547 TRANSPORT_RESOURCE_UNAVAILABLE
552 TRANSFER_SYNTAX_ERROR,
553 ABSTRACT_SYNTAX_ERROR_REJECT,
554 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
555 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
557 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
558 UNSPECIFIED_PROTOCOL_CAUSE
563 CONTROL_PROCESSING_OVERLOAD,
565 PLANE_PROCESSING_RESOURCES,
567 INTERVENTION_BY_O_AND_M,
568 UNSPECIFIED_MISC_CAUSE
575 MCS_TABLE_QAM64_LOW_SE
582 RSRC_RRC_CONNECTED_USERS
587 TRANSMISSION_ALLOWED,
590 }DataTransmissionAction;
592 /* Performance measurements from 3GPP TS 28.552 Release 15 */
595 MAC_DL_TOTAL_PRB_USAGE,
596 MAC_UL_TOTAL_PRB_USAGE
599 typedef struct failureCause
604 RadioNwLyrCause radioNwResult;
605 TransLyrCause transportResult;
606 ProtCause protcolResult;
607 MiscFailCause miscResult;
611 typedef struct carrierCfg
613 uint32_t dlBw; /* DL bandwidth */
614 uint32_t arfcnDL; /* Absolute frequency Number of DL */
615 uint32_t ulBw; /* UL bandwidth */
616 uint32_t arfcnUL; /* Absolute frequency Number of UL */
617 uint16_t numTxAnt; /* Number of Tx antennas */
618 uint16_t numRxAnt; /* Number of Rx antennas */
641 /*Spec Ref: 38.331: RadioLinkMonitoringConfig*/
647 }PurposeOfFailureDet;
649 typedef struct plmnInfoList
652 uint8_t numSupportedSlice; /* Total slice supporting */
653 Snssai **snssai; /* List of supporting snssai*/
656 typedef struct schPageCfg
658 uint8_t numPO; /*Derived from Ns*/
659 bool poPresent; /*Whether FirstPDCCH-MonitoringPO is present or not*/
660 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
663 typedef struct pdcchConfigSib1
665 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
666 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
669 typedef struct sib1CellCfg
671 PdcchConfigSib1 pdcchCfgSib1; /*Freq pos where UE may find SS/PBCH block with SIB1*/
674 SchPageCfg pagingCfg;
677 typedef struct bwpParams
682 uint8_t cyclicPrefix;
685 typedef struct candidatesInfo
694 typedef struct searchSpaceCfg
696 uint8_t searchSpaceId;
698 uint16_t monitoringSlot;
700 uint16_t monitoringSymbol;
701 CandidatesInfo candidate;
704 typedef struct pdcchConfigCommon
706 /* only one search space is configured during SIB1 */
707 SearchSpaceCfg commonSearchSpace;
708 uint8_t raSearchSpaceId;
711 typedef struct pdschCfgCommTimeDomRsrcAlloc
716 uint8_t lengthSymbol;
717 }PdschCfgCommTimeDomRsrcAlloc;
719 typedef struct pdschConfigCommon
721 uint8_t numTimeDomAlloc;
722 /* PDSCH time domain DL resource allocation list */
723 PdschCfgCommTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
726 typedef struct pucchConfigCommon
728 uint8_t pucchResourceCommon;
729 uint8_t pucchGroupHopping;
732 /* PUSCH Time Domain Resource Allocation */
733 typedef struct puschTimeDomRsrcAlloc
736 CommonMappingType mappingType;
738 uint8_t symbolLength;
739 uint8_t startSymbolAndLength;
740 }PuschTimeDomRsrcAlloc;
742 typedef struct puschConfigCommon
744 /* PUSCH-TimeDomainResourceAllocation info */
745 uint8_t numTimeDomRsrcAlloc;
746 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
749 typedef struct bwpDlConfig
752 PdcchConfigCommon pdcchCommon;
753 PdschConfigCommon pdschCommon;
756 typedef struct bwpUlConfig
759 // rach config common sent in PrachCfg
760 PucchConfigCommon pucchCommon;
761 PuschConfigCommon puschCommon;
765 typedef struct cellCfg
768 MacAdminState adminState;
769 MacCellState cellState;
770 PlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
771 uint32_t phyCellId; /* Physical cell id */
774 uint16_t subCarrSpacing;
775 DuplexMode dupType; /* Duplex type: TDD/FDD */
776 Sib1CellCfg sib1Cfg; /* SIB1 config */
777 BwpDlConfig initialDlBwp; /* Initial DL BWP */
778 BwpUlConfig initialUlBwp; /* Initial UL BWP */
781 typedef struct ssbCfg
783 uint32_t ssbPbchPwr; /* SSB block power */
784 uint8_t scsCmn; /* subcarrier spacing for common */
785 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
786 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
787 uint8_t ssbScOffset; /* Subcarrier Offset */
788 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
789 uint8_t beamId[NUM_SSB];
791 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
792 uint8_t mibPdu[3]; /* MIB payload */
793 uint8_t dmrsTypeAPos; /* DMRS Type A position */
796 typedef struct fdmInfo
798 uint16_t rootSeqIdx; /* Root sequence index */
799 uint8_t numRootSeq; /* Number of root sequences required for FD */
800 uint16_t k1; /* Frequency Offset for each FD */
801 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
804 typedef struct prachCfg
806 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
807 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
808 uint8_t msg1Fdm; /* Number of RACH frequency domain occasions/ PRACH FDM (1,2,4,8) */
809 uint8_t prachCfgIdx; /* PRACH Cfg Index */
810 PrachFdmInfo fdm[8]; /* FDM info */
811 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
812 uint8_t ssbPerRach; /* SSB per RACH occassion */
813 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
814 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
815 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
816 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
817 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
818 uint8_t raRspWindow; /* RA Response Window */
822 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
823 typedef struct drxOnDurationTimer
825 bool onDurationTimerValInMs;
828 uint8_t subMilliSeconds;
829 uint16_t milliSeconds;
830 }onDurationtimerValue;
833 typedef struct drxLongCycleStartOffset
835 uint16_t drxLongCycleStartOffsetChoice;
836 uint16_t drxLongCycleStartOffsetVal;
837 }DrxLongCycleStartOffset;
839 typedef struct shortDrx
841 uint16_t drxShortCycle;
842 uint8_t drxShortCycleTimer;
845 typedef struct drxCfg
847 DrxOnDurationTimer drxOnDurationTimer;
848 uint16_t drxInactivityTimer;
849 uint8_t drxHarqRttTimerDl;
850 uint8_t drxHarqRttTimerUl;
851 uint16_t drxRetransmissionTimerDl;
852 uint16_t drxRetransmissionTimerUl;
853 DrxLongCycleStartOffset drxLongCycleStartOffset;
856 uint8_t drxSlotOffset;
860 typedef struct precodingConf
863 uint16_t numAntPorts;
866 typedef struct beamformingConf
872 uint32_t beamAzimuth;
874 uint32_t beamHorizWidth;
875 uint32_t beamVertWidth;
876 uint32_t coverageShape;
877 uint32_t digitalTilt;
878 uint32_t digitalAzimuth;
881 typedef struct csiRsCfg
883 uint8_t *csiFreqDomainAlloc;
884 uint8_t csiNrofPorts;
885 uint8_t csirsfirstOFDMSymbolInTimeDomain;
886 uint8_t csirsfirstOFDMSymbolInTimeDomain2;
887 uint8_t csirscdmType;
888 uint8_t csirsdensity;
889 uint8_t csirsdensitydot5;
890 uint8_t powerControlOffset;
891 uint8_t powerControlOffsetSS;
892 uint16_t periodicityAndOffset;
895 typedef struct macCellCfg
897 uint16_t cellId; /* Cell Id */
898 CarrierCfg carrCfg; /* Carrier configuration */
899 CellCfg cellCfg; /* Cell Configuration*/
900 SsbCfg ssbCfg; /* SSB configuration */
901 CsiRsCfg csiRsCfg; /*Reference: 38.331 CSI-MeasConfig*/
902 PrachCfg prachCfg; /* PRACH Configuration */
904 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
906 PrecodingConf precodingConf;
907 BeamformingConf beamCfg;
910 typedef struct macCellCfgCfm
916 typedef struct ulCcchInd
920 uint16_t ulCcchMsgLen;
924 typedef struct dlCcchInd
928 DlCcchMsgType msgType;
929 uint16_t dlCcchMsgLen;
933 typedef struct bsrTmrCfg
935 uint16_t periodicTimer;
937 uint16_t srDelayTimer;
941 /* Info of Scheduling Request to Add/Modify */
942 typedef struct schedReqInfo
945 SrProhibitTimer srProhibitTmr;
946 SrTransMax srTransMax;
949 /* Scheduling Request Configuration */
950 typedef struct schedReqCfg
952 uint8_t addModListCount;
953 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
954 uint8_t relListCount;
955 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
958 typedef struct tagInfo
961 TimeAlignmentTimer timeAlignTimer;
964 typedef struct tagCfg
966 uint8_t addModListCount;
967 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
968 uint8_t relListCount;
969 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
972 typedef struct phrCfg
974 PhrPeriodicTimer periodicTimer;
975 PhrProhibitTimer prohibitTimer;
976 PhrTxPwrFactorChange txPowerFactor;
979 bool phrType2OtherCell;
980 PhrModeOtherCG phrOtherCG;
983 typedef struct macCellGrpCfg
985 SchedReqCfg schReqCfg;
988 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
996 typedef struct phyCellGrpCfg
998 PdschHarqAckCodebook pdschHarqAckCodebook;
1002 /* Control resource set info */
1003 typedef struct controlRsrcSet
1005 uint8_t cRSetId; /* Control resource set id */
1006 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1008 REGMappingType cceRegMappingType;
1009 PrecoderGranul precoderGranularity;
1010 uint16_t dmrsScramblingId;
1013 /* Search Space info */
1014 typedef struct searchSpace
1016 uint8_t searchSpaceId;
1018 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1019 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1020 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1021 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1022 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1023 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1024 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1025 SearchSpaceType searchSpaceType;
1026 uint8_t ueSpecificDciFormat;
1029 /* PDCCH cofniguration */
1030 typedef struct pdcchConfig
1032 uint8_t numCRsetToAddMod;
1033 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1034 uint8_t numCRsetToRel;
1035 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1036 uint8_t numSearchSpcToAddMod;
1037 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1038 uint8_t numSearchSpcToRel;
1039 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1042 /* PDSCH time domain resource allocation */
1043 typedef struct pdschTimeDomRsrcAlloc
1046 CommonMappingType mappingType;
1047 uint8_t startSymbol;
1048 uint8_t symbolLength;
1049 uint8_t startSymbolAndLength;
1050 }PdschTimeDomRsrcAlloc;
1053 typedef struct pdschBundling
1055 struct staticBundling
1057 BundlingSizeSet2 size;
1059 struct dynamicBundling
1061 BundlingSizeSet1 sizeSet1;
1062 BundlingSizeSet2 sizeSet2;
1066 /* DMRS downlink configuration */
1067 typedef struct dmrsDlCfg
1069 AddPosType addPos; /* DMRS additional position */
1072 /* PDSCH Configuration */
1073 typedef struct pdschConfig
1075 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1076 ResAllocType resourceAllocType;
1077 uint8_t numTimeDomRsrcAlloc;
1078 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1080 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1081 BundlingType bundlingType;
1082 PdschBundling bundlingInfo;
1085 /* Initial Downlink BWP */
1086 typedef struct initialDlBwp
1089 PdcchConfig pdcchCfg;
1091 PdschConfig pdschCfg;
1094 /*Spec 38.331 "SPS-Config'*/
1095 typedef struct spsConfig
1097 uint16_t periodicity;
1098 uint8_t numOfHqProcess;
1103 typedef uint8_t RadioLinkMonitoringRsId;
1105 typedef struct radioLinkMonRS
1107 RadioLinkMonitoringRsId radioLinkMonitoringRsId;
1108 PurposeOfFailureDet purpose;
1112 uint8_t nzpCsiRsResId;
1116 typedef struct radioLinkConfig
1118 RadioLinkMonRS failurDetResAddModList[1];
1119 RadioLinkMonitoringRsId failurDetResRelList[1];
1120 uint8_t beamFailureInstanceMaxCount;
1121 uint8_t beamFailureDetectionTimer;
1124 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1125 typedef struct bwpDlCfgDed
1127 PdcchConfig pdcchCfgDed;
1128 PdschConfig pdschCfgDed;
1129 SpsConfig spsCfgDed;
1130 RadioLinkConfig radioLnkMonCfgDed;
1133 /* Downlink BWP information */
1134 typedef struct dlBwpInfo
1137 BwpDlConfig bwpCommon;
1138 BwpDlCfgDed bwpDedicated;
1141 /* PDCCH Serving Cell configuration */
1142 typedef struct pdschServCellCfg
1144 uint8_t *maxMimoLayers;
1145 NumHarqProcForPdsch numHarqProcForPdsch;
1146 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1147 bool *codeBlkGrpFlushInd;
1148 PdschXOverhead *xOverhead;
1151 /* PUCCH Configuration */
1153 typedef struct pucchResrcSetInfo
1156 uint8_t resrcListCount;
1157 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1158 uint8_t maxPayLoadSize;
1161 typedef struct pucchResrcSetCfg
1163 uint8_t resrcSetToAddModListCount;
1164 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1165 uint8_t resrcSetToRelListCount;
1166 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1169 typedef struct pucchFormat0
1171 uint8_t initialCyclicShift;
1173 uint8_t startSymbolIdx;
1176 typedef struct pucchFormat1
1178 uint8_t initialCyclicShift;
1180 uint8_t startSymbolIdx;
1184 typedef struct pucchFormat2_3
1188 uint8_t startSymbolIdx;
1191 typedef struct pucchFormat4
1196 uint8_t startSymbolIdx;
1199 typedef struct pucchResrcInfo
1203 uint8_t intraFreqHop;
1204 uint16_t secondPrbHop;
1205 uint8_t pucchFormat;
1208 PucchFormat0 *format0;
1209 PucchFormat1 *format1;
1210 PucchFormat2_3 *format2;
1211 PucchFormat2_3 *format3;
1212 PucchFormat4 *format4;
1216 typedef struct pucchResrcCfg
1218 uint8_t resrcToAddModListCount;
1219 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1220 uint8_t resrcToRelListCount;
1221 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1224 typedef struct pucchFormatCfg
1226 bool interSlotFreqHop;
1228 uint8_t maxCodeRate;
1234 typedef struct schedReqResrcInfo
1238 uint8_t periodicity;
1243 typedef struct pucchSchedReqCfg
1245 uint8_t schedAddModListCount;
1246 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1247 uint8_t schedRelListCount;
1248 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1251 typedef struct spatialRelationInfo
1253 uint8_t spatialRelationId;
1254 uint8_t servCellIdx;
1255 uint8_t pathLossRefRSId;
1257 uint8_t closeLoopIdx;
1258 }SpatialRelationInfo;
1260 typedef struct pucchSpatialCfg
1262 uint8_t spatialAddModListCount;
1263 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1264 uint8_t spatialRelListCount;
1265 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1268 typedef struct p0PucchCfg
1274 typedef struct pathLossRefRSCfg
1276 uint8_t pathLossRefRSId;
1279 typedef struct pucchMultiCsiCfg
1281 uint8_t multiCsiResrcListCount;
1282 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1285 typedef struct pucchDlDataToUlAck
1287 uint8_t dlDataToUlAckListCount;
1288 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1289 }PucchDlDataToUlAck;
1291 typedef struct pucchPowerControl
1299 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1300 uint8_t pathLossRefRSListCount;
1301 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1304 typedef struct pucchCfg
1306 PucchResrcSetCfg *resrcSet;
1307 PucchResrcCfg *resrc;
1308 PucchFormatCfg *format1;
1309 PucchFormatCfg *format2;
1310 PucchFormatCfg *format3;
1311 PucchFormatCfg *format4;
1312 PucchSchedReqCfg *schedReq;
1313 PucchMultiCsiCfg *multiCsiCfg;
1314 PucchSpatialCfg *spatialInfo;
1315 PucchDlDataToUlAck *dlDataToUlAck;
1316 PucchPowerControl *powerControl;
1319 /* Transform precoding disabled */
1320 typedef struct transPrecodDisabled
1322 uint16_t scramblingId0;
1323 }TransPrecodDisabled;
1325 /* DMRS Uplink configuration */
1326 typedef struct dmrsUlCfg
1328 AddPosType addPos; /* DMRS additional position */
1329 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1332 /* PUSCH Configuration */
1333 typedef struct puschCfg
1335 uint8_t dataScramblingId;
1336 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1337 ResAllocType resourceAllocType;
1338 uint8_t numTimeDomRsrcAlloc;
1339 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1340 TransformPrecoder transformPrecoder;
1343 /* Initial Uplink BWP */
1344 typedef struct initialUlBwp
1352 typedef struct bwpUlCfgDed
1358 /* Uplink BWP information */
1359 typedef struct ulBwpInfo
1362 BwpUlConfig bwpCommon;
1366 typedef struct rachCfgGeneric
1368 uint8_t prachCfgIdx; /* PRACH config idx */
1369 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
1370 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
1371 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
1372 int16_t preambleRcvdTargetPower; /*Prach Target power received*/
1373 uint8_t preambleTransMax; /*Preamble Transmission Max power*/
1374 uint8_t pwrRampingStep; /*Power Ramping Step*/
1375 uint8_t raRspWindow; /* RA Response Window */
1378 typedef struct raPrioritization
1380 uint8_t powerRampingStepHighPriority;
1381 uint8_t scalingFactorBI;
1384 typedef struct bfrCsiRsRes
1388 uint8_t raPreambleIndex;
1391 typedef struct bfrSsbRes
1394 uint8_t raPreambleIndex;
1397 typedef struct prachResDedBfr
1403 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1404 typedef struct beamFailRecoveryCfg
1406 uint8_t rootSeqIndexBfr;
1407 RachCfgGeneric rachCfgBfr;
1408 uint8_t rsrpThreshSsbBfr;
1409 PrachResDedBfr candidteBeamRSList;
1410 uint8_t ssbPerachBfr;
1411 uint8_t raSsbOccMaskIndex;
1412 uint8_t recoverySearchSpaceId;
1413 RaPrioritization raPrioBfr;
1415 uint8_t msg1SubcSpacing;
1416 }BeamFailRecoveryCfg;
1418 /* Serving cell configuration */
1419 typedef struct servCellCfgInfo
1421 InitialDlBwp initDlBwp;
1422 RadioLinkConfig radioLinkMonConfig;
1423 uint8_t numDlBwpToAdd;
1424 DlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1425 uint8_t firstActvDlBwpId;
1426 uint8_t defaultDlBwpId;
1427 uint8_t *bwpInactivityTmr;
1428 PdschServCellCfg pdschServCellCfg;
1429 InitialUlBwp initUlBwp;
1430 BeamFailRecoveryCfg beamFailureRecoveryCfg;
1431 uint8_t numUlBwpToAdd;
1432 UlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1433 uint8_t firstActvUlBwpId;
1436 /* Special cell configuration */
1437 typedef struct spCellCfg
1439 uint8_t servCellIdx;
1440 ServCellCfgInfo servCellCfg;
1443 typedef struct bwpRelInfo
1448 /* Serving cell Re-configuration */
1449 typedef struct servCellRecfgInfo
1451 InitialDlBwp initDlBwp;
1452 RadioLinkConfig radioLinkMonConfig;
1453 uint8_t numDlBwpToAddOrMod;
1454 DlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1455 uint8_t numDlBwpToRel;
1456 BwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1457 uint8_t firstActvDlBwpId;
1458 uint8_t defaultDlBwpId;
1459 uint8_t *bwpInactivityTmr;
1460 PdschServCellCfg pdschServCellCfg;
1461 InitialUlBwp initUlBwp;
1462 uint8_t numUlBwpToAddOrMod;
1463 UlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1464 uint8_t numUlBwpToRel;
1465 BwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1466 uint8_t firstActvUlBwpId;
1469 /* Special cell Re-configuration */
1470 typedef struct spCellRecfg
1472 uint8_t servCellIdx;
1473 ServCellRecfgInfo servCellCfg;
1476 typedef struct ambrCfg
1478 uint32_t ulBr; /* UL Bit rate */
1481 typedef struct nonDynFiveQi
1486 uint16_t maxDataBurstVol;
1489 typedef struct dynFiveQi
1492 uint16_t packetDelayBudget;
1493 uint8_t packetErrRateScalar;
1494 uint8_t packetErrRateExp;
1496 uint8_t delayCritical;
1498 uint16_t maxDataBurstVol;
1501 typedef struct ngRanAllocAndRetPri
1503 uint8_t priorityLevel;
1504 uint8_t preEmptionCap;
1505 uint8_t preEmptionVul;
1506 }NgRanAllocAndRetPri;
1508 typedef struct grbQosInfo
1510 uint32_t maxFlowBitRateDl;
1511 uint32_t maxFlowBitRateUl;
1512 uint32_t guarFlowBitRateDl;
1513 uint32_t guarFlowBitRateUl;
1516 typedef struct drbQos
1518 QosType fiveQiType; /* Dynamic or non-dynamic */
1521 NonDynFiveQi nonDyn5Qi;
1524 NgRanAllocAndRetPri ngRanRetPri;
1525 GrbQosInfo grbQosInfo;
1526 uint16_t pduSessionId;
1527 uint32_t ulPduSessAggMaxBitRate;
1530 typedef struct ulLcCfg
1535 PBitRate pbr; // prioritisedBitRate
1536 BucketSizeDur bsd; // bucketSizeDuration
1539 typedef struct dlLcCfg
1541 LcPriority lcp; // logical Channel Prioritization
1544 typedef struct lcCfg
1554 typedef struct modulationInfo
1556 uint8_t modOrder; /* Modulation order */
1557 uint8_t mcsIndex; /* MCS Index */
1558 McsTable mcsTable; /* MCS table */
1561 typedef struct macUeCreateReq
1567 bool macCellGrpCfgPres;
1568 MacCellGrpCfg macCellGrpCfg;
1569 bool phyCellGrpCfgPres;
1570 PhyCellGrpCfg phyCellGrpCfg;
1572 SpCellCfg spCellCfg;
1574 ModulationInfo dlModInfo; /* DL modulation info */
1575 ModulationInfo ulModInfo; /* UL modulation info */
1577 LcCfg lcCfgList[MAX_NUM_LC];
1580 /* UE Re-configuration */
1581 typedef struct macUeRecfg
1587 bool macCellGrpRecfgPres;
1588 MacCellGrpCfg macCellGrpRecfg;
1589 bool phyCellGrpRecfgPres;
1590 PhyCellGrpCfg phyCellGrpRecfg;
1591 bool spCellRecfgPres;
1592 SpCellRecfg spCellRecfg;
1594 ModulationInfo dlModInfo;
1595 ModulationInfo ulModInfo;
1596 uint8_t numLcsToAdd;
1597 LcCfg lcCfgAdd[MAX_NUM_LC];
1598 uint8_t numLcsToDel;
1599 uint8_t lcIdToDel[MAX_NUM_LC];
1600 uint8_t numLcsToMod;
1601 LcCfg lcCfgMod[MAX_NUM_LC];
1602 DataTransmissionAction transmissionAction;
1604 bool drxConfigIndicatorRelease;
1608 typedef struct nrcgi
1614 typedef struct srbFailInfo
1620 typedef struct drbFailInfo
1626 typedef struct sCellFailInfo
1632 typedef struct macUeCreateRsp
1637 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1638 SRBFailInfo *failedSRBlisti;
1639 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1640 DRBFailInfo *failedDRBlist;
1641 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1642 SCellFailInfo *failedSCellList;
1643 uint8_t numDRBModFailed; /* valid values : 0 to MAX_NUM_DRB */
1644 DRBFailInfo *failedDRBModlist;
1647 typedef struct macUeCreateRsp MacUeRecfgRsp;
1649 typedef struct rachRsrcReq
1654 uint8_t ssbIdx[MAX_NUM_SSB];
1657 typedef struct macCfraSsbResource
1660 uint8_t raPreambleIdx;
1661 }MacCfraSsbResource;
1663 typedef struct macCfraResource
1666 MacCfraSsbResource ssbResource[MAX_NUM_SSB];
1669 typedef struct macRachRsrcRsp
1674 uint16_t newCrnti; /* This parameter maps to 3GPP TS 38.331 newUE-Identity */
1675 MacCfraResource cfraResource;
1678 typedef struct macRachRsrcRel
1685 typedef struct ueDelete
1692 typedef struct ueDeleteRsp
1696 CauseOfResult status;
1699 typedef struct macCellDeleteReq
1704 typedef struct macCellDeleteRsp
1707 CauseOfResult status;
1710 typedef struct macSliceCfgRsp
1714 CauseOfResult cause;
1717 typedef struct rrmPolicyRatio
1721 uint8_t dedicatedRatio;
1724 typedef struct rrmPolicyMemberList
1728 }RrmPolicyMemberList;
1730 typedef struct macSliceRrmPolicy
1732 ResourceType resourceType;
1733 uint8_t numOfRrmPolicyMem;
1734 RrmPolicyMemberList **rRMPolicyMemberList;
1735 RrmPolicyRatio policyRatio;
1738 typedef struct macSliceCfgReq
1740 uint8_t numOfRrmPolicy;
1741 MacSliceRrmPolicy **listOfRrmPolicy;
1744 /*As per ORAN-WG8, Slice Cfg and ReCfg are same structures*/
1745 typedef struct macSliceCfgReq MacSliceRecfgReq;
1746 typedef struct macSliceCfgRsp MacSliceRecfgRsp;
1748 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.17 DL PCCH Indication */
1749 typedef struct dlPcchInd
1759 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.1 Cell Start */
1760 typedef struct cellInfo
1762 SlotTimingInfo slotInfo;
1766 typedef struct cellInfo CellStartInfo;
1767 typedef struct cellInfo CellStopInfo;
1769 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.12 UE Reset Request */
1770 typedef struct ueReset
1776 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.13 UE Reset Response */
1777 typedef struct ueResetRsp
1781 CauseOfResult status;
1784 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.14 UE Sync Status Indication */
1785 typedef struct ueSyncStatusInd
1790 }MacUeSyncStatusInd;
1792 /* The following list of structures is taken from the SI-SchedulingInfo section of specification 33.331. */
1793 typedef struct sibTypeInfo
1800 typedef struct sibMappingInfo
1802 uint8_t numSibTypeInfo;
1803 SibTypeInfo sibTypeInfo[NUM_SIB];
1806 typedef struct schedulingInfo
1808 SiBroadcastStatus siBroadcastStatus;
1809 SiPeriodicity siPeriodicity;
1810 SibMappingInfo sibMappingInfo;
1813 typedef struct rachOccasionsSi
1815 RachCfgGeneric rachConfigSi;
1816 SsbPerRachOccasion ssbPerRachOccasion;
1819 typedef struct siReqRsrc
1821 uint8_t raPreambleStartIndex;
1822 uint8_t raAssociationPeriodIndex;
1823 uint8_t raSsbOccasionMaskIndex;
1826 typedef struct siRequestResource
1828 uint8_t numOfSiReqRsrc;
1829 SiReqRsrc siReqRsrc[MAX_SI_MESSAGE];
1832 typedef struct siRequestConfig
1834 RachOccasionsSi rachOccasionsSi;
1835 SiRequestPeriod siRequestPeriod;
1836 SiRequestResource siRequestResource;
1839 typedef struct schedulingInfoList
1842 SchedulingInfo schedulingInfo[MAX_SI_MESSAGE];
1843 }SchedulingInfoList;
1845 typedef struct siSchedulingInfo
1847 SchedulingInfoList schInfoList;
1848 SiWindowLength siWindowLength;
1849 SiRequestConfig siRequestConfig;
1850 SiRequestConfig siRequestConfigSUL;
1854 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.18 DL Broadcast Request */
1855 typedef struct macDlBroadcastReq
1859 SiSchedulingInfo **siSchedulingInfo;
1862 typedef struct macStatsGrpInfo
1865 uint16_t periodicity; /* In milliseconds */
1867 MacMeasurementType statsList[MAX_NUM_STATS];
1870 typedef struct macStatsReq
1872 uint64_t subscriptionId;
1873 uint8_t numStatsGroup;
1874 MacStatsGrpInfo statsGrpList[MAX_NUM_STATS_GRP];
1877 typedef struct macStatsGrpRejected
1880 CauseOfResult cause;
1881 }MacStatsGrpRejected;
1883 typedef struct macStatsRsp
1885 uint64_t subscriptionId;
1886 uint8_t numGrpAccepted;
1887 uint8_t statsGrpAcceptedList[MAX_NUM_STATS_GRP];
1888 uint8_t numGrpRejected;
1889 MacStatsGrpRejected statsGrpRejectedList[MAX_NUM_STATS_GRP];
1892 typedef struct macStats
1894 MacMeasurementType type;
1898 typedef struct macStatsInd
1900 uint64_t subscriptionId;
1903 MacStats measuredStatsList[MAX_NUM_STATS];
1906 typedef struct macStatsDeleteReq
1908 uint64_t subscriptionId;
1909 uint8_t numStatsGroupToBeDeleted;
1910 uint8_t statsGrpIdToBeDelList[MAX_NUM_STATS_GRP];
1913 typedef struct macStatsDeleteInfo
1916 MacRsp statsGrpDelRsp;
1917 CauseOfResult statsGrpDelCause;
1918 }MacStatsDeleteInfo;
1920 typedef struct macStatsDeleteRsp
1922 uint64_t subscriptionId; /* subscription Id */
1923 MacRsp subsDelRsp; /* deletion status of all statsGrp with given subscriptionId */
1924 CauseOfResult subsDelCause; /* cause of failure in deletion of all statsGrp with given subscriptionId */
1925 uint8_t numStatsGroupDeleted; /* number of actions to deleted */
1926 MacStatsDeleteInfo statsGrpDelInfo[MAX_NUM_STATS_GRP]; /*list of the deletion statuses for specific actions */
1929 typedef struct macStatsReq MacStatsModificationReq;
1930 typedef struct macStatsRsp MacStatsModificationRsp;
1932 /****************** FUNCTION POINTERS ********************************/
1934 /* DL broadcast req from DU APP to MAC*/
1935 typedef uint8_t (*DuMacDlBroadcastReq) ARGS((
1937 MacDlBroadcastReq *dlBroadcast));
1939 /* Functions for CellUp Ind from MAC to DU APP*/
1940 typedef uint8_t (*DuMacCellUpInd) ARGS((
1942 OduCellId *cellId ));
1944 /* Functions for slot Ind from MAC to DU APP*/
1945 typedef uint8_t (*DuMacSlotInd) ARGS((
1947 SlotTimingInfo *slotIndInfo));
1949 /* Functions for stop Ind from MAC to DU APP*/
1950 typedef uint8_t (*DuMacStopInd) ARGS((
1952 OduCellId *cellId ));
1954 /* Functions for mac cell start req */
1955 typedef uint8_t (*DuMacCellStart) ARGS((
1957 CellStartInfo *cellId));
1959 /* Functions for mac cell stop request */
1960 typedef uint8_t (*DuMacCellStop) ARGS((
1962 CellStopInfo *cellId ));
1964 /* Function pointers for packing macCellCfg Request and Confirm */
1965 typedef uint8_t (*packMacCellCfgReq) ARGS((
1967 MacCellCfg *macCellCfg ));
1969 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1971 MacCellCfgCfm *macCellCfgCfm ));
1973 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1975 MacCellCfg *macCellCfg));
1977 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1979 MacCellCfgCfm *macCellCfgCfm ));
1981 /* Functions for UL CCCH Ind from MAC to DU APP*/
1982 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1984 UlCcchIndInfo *ulCcchIndInfo ));
1986 /* Functions for DL CCCH Ind from DU APP to MAC*/
1987 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1989 DlCcchIndInfo *dlCcchIndInfo ));
1991 /* UE create Request from DU APP to MAC*/
1992 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1994 MacUeCreateReq *ueCfg ));
1996 /* UE create Response from MAC to DU APP */
1997 typedef uint8_t (*MacDuUeCreateRspFunc) ARGS((
1999 MacUeCreateRsp *cfgRsp));
2001 /* UE Reconfig Request from DU APP to MAC */
2002 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
2004 MacUeRecfg *ueCfg ));
2006 /* UE Reconfig Response from MAC to DU APP */
2007 typedef uint8_t (*MacDuUeRecfgRspFunc) ARGS((
2009 MacUeRecfgRsp *cfgRsp));
2011 /* RACH Resource Request from DU APP to MAC */
2012 typedef uint8_t (*DuMacRachRsrcReq) ARGS((
2014 MacRachRsrcReq *rachRsrcReq));
2016 /* RACH Resource Response from MAC to DU APP */
2017 typedef uint8_t (*MacDuRachRsrcRspFunc) ARGS((
2019 MacRachRsrcRsp *rachRsrcRsp));
2021 /* RACH Resource Release from DU APP to MAC */
2022 typedef uint8_t (*DuMacRachRsrcRel) ARGS((
2024 MacRachRsrcRel *rachRsrcRel));
2026 /* UE Delete Request from DU APP to MAC*/
2027 typedef uint8_t (*DuMacUeDeleteReq) ARGS((
2029 MacUeDelete *ueDel ));
2031 /* UE Delete Response from MAC to DU APP*/
2032 typedef uint8_t (*MacDuUeDeleteRspFunc) ARGS((
2034 MacUeDeleteRsp *deleteRsp));
2036 /* Cell Delete Request from DU APP to MAC*/
2037 typedef uint8_t (*DuMacCellDeleteReq) ARGS((
2039 MacCellDeleteReq *cellDelete ));
2041 /* Cell Delete Response from MAC to DU APP*/
2042 typedef uint8_t (*MacDuCellDeleteRspFunc) ARGS((
2044 MacCellDeleteRsp *cellDeleteRsp));
2046 /* Slice Cfg Request from DU APP to MAC*/
2047 typedef uint8_t (*DuMacSliceCfgReq) ARGS((
2049 MacSliceCfgReq *CfgReq));
2051 /* Slice Cfg Response from MAC to DU APP */
2052 typedef uint8_t (*MacDuSliceCfgRspFunc) ARGS((
2054 MacSliceCfgRsp *cfgRsp));
2056 /* Slice ReReCfg Request from DU APP to MAC*/
2057 typedef uint8_t (*DuMacSliceRecfgReq) ARGS((
2059 MacSliceRecfgReq *CfgReq));
2061 /* Slice ReReCfg Response from MAC to DU APP */
2062 typedef uint8_t (*MacDuSliceRecfgRspFunc) ARGS((
2064 MacSliceRecfgRsp *cfgRsp));
2066 /* Pcch indication from DU APP to MAC*/
2067 typedef uint8_t (*DuMacDlPcchInd) ARGS((
2069 DlPcchInd *pcchInd));
2071 /* UE Reset Request from DU APP to MAC*/
2072 typedef uint8_t (*DuMacUeResetReq) ARGS((
2074 MacUeResetReq *ueReset ));
2076 /* UE Reset Response from MAC to DU APP*/
2077 typedef uint8_t (*MacDuUeResetRspFunc) ARGS((
2079 MacUeResetRsp *resetRsp));
2081 /* UE sync status indication from MAC to DU APP*/
2082 typedef uint8_t (*MacDuUeSyncStatusIndFunc) ARGS((
2084 MacUeSyncStatusInd *syncStatusInd));
2086 /* Statitics Request from DU APP to MAC */
2087 typedef uint8_t (*DuMacStatsReqFunc) ARGS((
2089 MacStatsReq *statsReq));
2091 /* Statistics Response from MAC to DU APP */
2092 typedef uint8_t (*MacDuStatsRspFunc) ARGS((
2094 MacStatsRsp *statsRsp));
2096 /* Statistics Ind from MAC to DU APP */
2097 typedef uint8_t (*MacDuStatsIndFunc) ARGS((
2099 MacStatsInd *statsInd));
2101 /* Statitics Delete Request from DU APP to MAC */
2102 typedef uint8_t (*DuMacStatsDeleteReqFunc) ARGS((
2104 MacStatsDeleteReq *statsDeleteReq));
2106 /* Statistics Delete Response from MAC to DU APP */
2107 typedef uint8_t (*MacDuStatsDeleteRspFunc) ARGS((
2109 MacStatsDeleteRsp *statsDeleteRsp));
2111 /* Statitics Modification Request from DU APP to MAC */
2112 typedef uint8_t (*DuMacStatsModificationReqFunc) ARGS((
2114 MacStatsModificationReq *statsModificationReq));
2116 /* Statistics Modification Response from MAC to DU APP */
2117 typedef uint8_t (*MacDuStatsModificationRspFunc) ARGS((
2119 MacStatsModificationRsp *statsModificationRsp));
2121 /******************** FUNCTION DECLARATIONS ********************************/
2122 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
2123 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
2124 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
2126 uint8_t packMacCellStart(Pst *pst, CellStartInfo *cellStartInfo);
2127 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
2128 uint8_t MacProcCellStart(Pst *pst, CellStartInfo *cellStartInfo);
2130 uint8_t packMacCellStop(Pst *pst, CellStopInfo *cellStopInfo);
2131 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
2132 uint8_t MacProcCellStop(Pst *pst, CellStopInfo *cellStopInfo);
2134 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
2135 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
2136 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
2138 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
2139 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
2140 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
2142 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
2143 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
2144 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
2145 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
2147 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
2148 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
2149 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
2151 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
2152 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
2153 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
2155 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
2156 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
2157 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
2159 uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
2160 uint8_t unpackDuMacUeCreateRsp(MacDuUeCreateRspFunc func, Pst *pst, Buffer *mBuf);
2161 uint8_t DuProcMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
2163 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
2164 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
2165 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
2167 uint8_t packDuMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp);
2168 uint8_t unpackDuMacUeRecfgRsp(MacDuUeRecfgRspFunc func, Pst *pst, Buffer *mBuf);
2169 uint8_t DuProcMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp);
2171 uint8_t packDuMacRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
2172 uint8_t unpackMacRachRsrcReq(DuMacRachRsrcReq func, Pst *pst, Buffer *mBuf);
2173 uint8_t MacProcRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
2175 uint8_t packDuMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
2176 uint8_t unpackDuMacRachRsrcRsp(MacDuRachRsrcRspFunc func, Pst *pst, Buffer *mBuf);
2177 uint8_t DuProcMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
2179 uint8_t packDuMacRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
2180 uint8_t unpackMacRachRsrcRel(DuMacRachRsrcRel func, Pst *pst, Buffer *mBuf);
2181 uint8_t MacProcRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
2183 uint8_t packDuMacUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
2184 uint8_t MacProcUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
2185 uint8_t unpackMacUeDeleteReq(DuMacUeDeleteReq func, Pst *pst, Buffer *mBuf);
2187 uint8_t packDuMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
2188 uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
2189 uint8_t unpackDuMacUeDeleteRsp(MacDuUeDeleteRspFunc func, Pst *pst, Buffer *mBuf);
2191 uint8_t packDuMacCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete);
2192 uint8_t MacProcCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete);
2193 uint8_t unpackMacCellDeleteReq(DuMacCellDeleteReq func, Pst *pst, Buffer *mBuf);
2195 uint8_t packDuMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
2196 uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
2197 uint8_t unpackDuMacCellDeleteRsp(MacDuCellDeleteRspFunc func, Pst *pst, Buffer *mBuf);
2199 uint8_t packDuMacSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
2200 uint8_t MacProcSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
2201 uint8_t unpackMacSliceCfgReq(DuMacSliceCfgReq func, Pst *pst, Buffer *mBuf);
2203 uint8_t DuProcMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
2204 uint8_t packDuMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
2205 uint8_t unpackDuMacSliceCfgRsp(MacDuSliceCfgRspFunc func, Pst *pst, Buffer *mBuf);
2207 uint8_t packDuMacSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq);
2208 uint8_t MacProcSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq);
2209 uint8_t unpackMacSliceRecfgReq(DuMacSliceRecfgReq func, Pst *pst, Buffer *mBuf);
2211 uint8_t DuProcMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp);
2212 uint8_t packDuMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp);
2213 uint8_t unpackDuMacSliceRecfgRsp(MacDuSliceRecfgRspFunc func, Pst *pst, Buffer *mBuf);
2215 uint8_t duHandleSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
2216 uint8_t packMacSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
2217 uint8_t unpackDuMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
2219 uint8_t packDuMacDlPcchInd(Pst *pst, DlPcchInd *pcchInd);
2220 uint8_t MacProcDlPcchInd(Pst *pst, DlPcchInd *pcchInd);
2221 uint8_t unpackMacDlPcchInd(DuMacDlPcchInd func, Pst *pst, Buffer *mBuf);
2223 int8_t getFreeBitFromUeBitMap(uint16_t cellId);
2224 void unsetBitInUeBitMap(uint16_t cellId, uint8_t bitPos);
2226 uint8_t packDuMacUeResetReq(Pst *pst, MacUeResetReq *ueReset);
2227 uint8_t MacProcUeResetReq(Pst *pst, MacUeResetReq *ueReset);
2228 uint8_t unpackMacUeResetReq(DuMacUeResetReq func, Pst *pst, Buffer *mBuf);
2230 uint8_t packDuMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp);
2231 uint8_t DuProcMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp);
2232 uint8_t unpackDuMacUeResetRsp(MacDuUeResetRspFunc func, Pst *pst, Buffer *mBuf);
2234 uint8_t packDuMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
2235 uint8_t DuProcMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
2236 uint8_t unpackDuMacUeSyncStatusInd(MacDuUeSyncStatusIndFunc func, Pst *pst, Buffer *mBuf);
2238 uint8_t packDuMacDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq);
2239 uint8_t MacProcDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq);
2240 uint8_t unpackMacDlBroadcastReq(DuMacDlBroadcastReq func, Pst *pst, Buffer *mBuf);
2242 uint8_t packDuMacStatsReq(Pst *pst, MacStatsReq *statsReq);
2243 uint8_t MacProcStatsReq(Pst *pst, MacStatsReq *statsReq);
2244 uint8_t unpackMacStatsReq(DuMacStatsReqFunc func, Pst *pst, Buffer *mBuf);
2246 uint8_t packDuMacStatsRsp(Pst *pst, MacStatsRsp *statsRsp);
2247 uint8_t DuProcMacStatsRsp(Pst *pst, MacStatsRsp *statsRsp);
2248 uint8_t unpackDuMacStatsRsp(MacDuStatsRspFunc func, Pst *pst, Buffer *mBuf);
2250 uint8_t packDuMacStatsInd(Pst *pst, MacStatsInd *statsRsp);
2251 uint8_t DuProcMacStatsInd(Pst *pst, MacStatsInd *statsRsp);
2252 uint8_t unpackDuMacStatsInd(MacDuStatsIndFunc func, Pst *pst, Buffer *mBuf);
2254 uint8_t packDuMacStatsDeleteReq(Pst *pst, MacStatsDeleteReq *statsDeleteReq);
2255 uint8_t MacProcStatsDeleteReq(Pst *pst, MacStatsDeleteReq *statsDeleteReq);
2256 uint8_t unpackMacStatsDeleteReq(DuMacStatsDeleteReqFunc func, Pst *pst, Buffer *mBuf);
2258 uint8_t packDuMacStatsDeleteRsp(Pst *pst, MacStatsDeleteRsp *statsDeleteRsp);
2259 uint8_t DuProcMacStatsDeleteRsp(Pst *pst, MacStatsDeleteRsp *statsDeleteRsp);
2260 uint8_t unpackDuMacStatsDeleteRsp(MacDuStatsDeleteRspFunc func, Pst *pst, Buffer *mBuf);
2262 uint8_t packDuMacStatsModificationReq(Pst *pst, MacStatsModificationReq *statsModificationReq);
2263 uint8_t MacProcStatsModificationReq(Pst *pst, MacStatsModificationReq *statsModificationReq);
2264 uint8_t unpackMacStatsModificationReq(DuMacStatsModificationReqFunc func, Pst *pst, Buffer *mBuf);
2266 uint8_t packDuMacStatsModificationRsp(Pst *pst, MacStatsModificationRsp *statsModificationRsp);
2267 uint8_t DuProcMacStatsModificationRsp(Pst *pst, MacStatsModificationRsp *statsModificationRsp);
2268 uint8_t unpackDuMacStatsModificationRsp(MacDuStatsModificationRspFunc func, Pst *pst, Buffer *mBuf);
2274 /**********************************************************************
2276 **********************************************************************/