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
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 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 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
364 SLOTPERIODICITYANDOFFSET_PR_SL2,
365 SLOTPERIODICITYANDOFFSET_PR_SL4,
366 SLOTPERIODICITYANDOFFSET_PR_SL5,
367 SLOTPERIODICITYANDOFFSET_PR_SL8,
368 SLOTPERIODICITYANDOFFSET_PR_SL10,
369 SLOTPERIODICITYANDOFFSET_PR_SL16,
370 SLOTPERIODICITYANDOFFSET_PR_SL20,
371 SLOTPERIODICITYANDOFFSET_PR_SL40,
372 SLOTPERIODICITYANDOFFSET_PR_SL80,
373 SLOTPERIODICITYANDOFFSET_PR_SL160,
374 SLOTPERIODICITYANDOFFSET_PR_SL320,
375 SLOTPERIODICITYANDOFFSET_PR_SL640,
376 SLOTPERIODICITYANDOFFSET_PR_SL1280,
377 SLOTPERIODICITYANDOFFSET_PR_SL2560
378 }MSlotPeriodAndOffset;
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 uint8_t numSupportedSlice; /* Total slice supporting */
649 Snssai **snssai; /* List of supporting snssai*/
652 typedef struct schPageCfg
654 uint8_t numPO; /*Derived from Ns*/
655 bool poPresent; /*Whether FirstPDCCH-MonitoringPO is present or not*/
656 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
659 typedef struct pdcchConfigSib1
661 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
662 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
665 typedef struct sib1CellCfg
667 PdcchConfigSib1 pdcchCfgSib1; /*Freq pos where UE may find SS/PBCH block with SIB1*/
670 SchPageCfg pagingCfg;
673 typedef struct bwpParams
678 uint8_t cyclicPrefix;
681 typedef struct candidatesInfo
690 typedef struct searchSpaceCfg
692 uint8_t searchSpaceId;
694 uint16_t monitoringSlot;
696 uint16_t monitoringSymbol;
697 CandidatesInfo candidate;
700 typedef struct pdcchConfigCommon
702 /* only one search space is configured during SIB1 */
703 SearchSpaceCfg commonSearchSpace;
704 uint8_t raSearchSpaceId;
707 typedef struct pdschCfgCommTimeDomRsrcAlloc
712 uint8_t lengthSymbol;
713 }PdschCfgCommTimeDomRsrcAlloc;
715 typedef struct pdschConfigCommon
717 uint8_t numTimeDomAlloc;
718 /* PDSCH time domain DL resource allocation list */
719 PdschCfgCommTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
722 typedef struct pucchConfigCommon
724 uint8_t pucchResourceCommon;
725 uint8_t pucchGroupHopping;
728 /* PUSCH Time Domain Resource Allocation */
729 typedef struct puschTimeDomRsrcAlloc
732 CommonMappingType mappingType;
734 uint8_t symbolLength;
735 uint8_t startSymbolAndLength;
736 }PuschTimeDomRsrcAlloc;
738 typedef struct puschConfigCommon
740 /* PUSCH-TimeDomainResourceAllocation info */
741 uint8_t numTimeDomRsrcAlloc;
742 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
745 typedef struct bwpDlConfig
748 PdcchConfigCommon pdcchCommon;
749 PdschConfigCommon pdschCommon;
752 typedef struct bwpUlConfig
755 // rach config common sent in PrachCfg
756 PucchConfigCommon pucchCommon;
757 PuschConfigCommon puschCommon;
761 typedef struct cellCfg
764 MacAdminState adminState;
765 MacCellState cellState;
766 PlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
767 uint32_t phyCellId; /* Physical cell id */
770 uint16_t subCarrSpacing;
771 DuplexMode dupType; /* Duplex type: TDD/FDD */
772 Sib1CellCfg sib1Cfg; /* SIB1 config */
773 BwpDlConfig initialDlBwp; /* Initial DL BWP */
774 BwpUlConfig initialUlBwp; /* Initial UL BWP */
777 typedef struct ssbCfg
779 uint32_t ssbPbchPwr; /* SSB block power */
780 uint8_t scsCmn; /* subcarrier spacing for common */
781 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
782 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
783 uint8_t ssbScOffset; /* Subcarrier Offset */
784 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
785 uint8_t beamId[NUM_SSB];
787 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
788 uint8_t mibPdu[3]; /* MIB payload */
789 uint8_t dmrsTypeAPos; /* DMRS Type A position */
792 typedef struct fdmInfo
794 uint16_t rootSeqIdx; /* Root sequence index */
795 uint8_t numRootSeq; /* Number of root sequences required for FD */
796 uint16_t k1; /* Frequency Offset for each FD */
797 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
800 typedef struct prachCfg
802 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
803 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
804 uint8_t msg1Fdm; /* Number of RACH frequency domain occasions/ PRACH FDM (1,2,4,8) */
805 uint8_t prachCfgIdx; /* PRACH Cfg Index */
806 PrachFdmInfo fdm[8]; /* FDM info */
807 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
808 uint8_t ssbPerRach; /* SSB per RACH occassion */
809 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
810 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
811 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
812 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
813 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
814 uint8_t raRspWindow; /* RA Response Window */
818 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
819 typedef struct drxOnDurationTimer
821 bool onDurationTimerValInMs;
824 uint8_t subMilliSeconds;
825 uint16_t milliSeconds;
826 }onDurationtimerValue;
829 typedef struct drxLongCycleStartOffset
831 uint16_t drxLongCycleStartOffsetChoice;
832 uint16_t drxLongCycleStartOffsetVal;
833 }DrxLongCycleStartOffset;
835 typedef struct shortDrx
837 uint16_t drxShortCycle;
838 uint8_t drxShortCycleTimer;
841 typedef struct drxCfg
843 DrxOnDurationTimer drxOnDurationTimer;
844 uint16_t drxInactivityTimer;
845 uint8_t drxHarqRttTimerDl;
846 uint8_t drxHarqRttTimerUl;
847 uint16_t drxRetransmissionTimerDl;
848 uint16_t drxRetransmissionTimerUl;
849 DrxLongCycleStartOffset drxLongCycleStartOffset;
852 uint8_t drxSlotOffset;
856 typedef struct precodingConf
859 uint16_t numAntPorts;
862 typedef struct beamformingConf
868 uint32_t beamAzimuth;
870 uint32_t beamHorizWidth;
871 uint32_t beamVertWidth;
872 uint32_t coverageShape;
873 uint32_t digitalTilt;
874 uint32_t digitalAzimuth;
877 typedef struct csiRsCfg
879 uint8_t *csiFreqDomainAlloc;
880 uint8_t csiNrofPorts;
881 uint8_t csirsfirstOFDMSymbolInTimeDomain;
882 uint8_t csirsfirstOFDMSymbolInTimeDomain2;
883 uint8_t csirscdmType;
884 uint8_t csirsdensity;
885 uint8_t csirsdensitydot5;
886 uint8_t powerControlOffset;
887 uint8_t powerControlOffsetSS;
888 uint16_t periodicityAndOffset;
891 typedef struct macCellCfg
893 uint16_t cellId; /* Cell Id */
894 CarrierCfg carrCfg; /* Carrier configuration */
895 CellCfg cellCfg; /* Cell Configuration*/
896 SsbCfg ssbCfg; /* SSB configuration */
897 CsiRsCfg csiRsCfg; /*Reference: 38.331 CSI-MeasConfig*/
898 PrachCfg prachCfg; /* PRACH Configuration */
900 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
902 PrecodingConf precodingConf;
903 BeamformingConf beamCfg;
906 typedef struct macCellCfgCfm
912 typedef struct ulCcchInd
916 uint16_t ulCcchMsgLen;
920 typedef struct dlCcchInd
924 DlCcchMsgType msgType;
925 uint16_t dlCcchMsgLen;
929 typedef struct bsrTmrCfg
931 uint16_t periodicTimer;
933 uint16_t srDelayTimer;
937 /* Info of Scheduling Request to Add/Modify */
938 typedef struct schedReqInfo
941 SrProhibitTimer srProhibitTmr;
942 SrTransMax srTransMax;
945 /* Scheduling Request Configuration */
946 typedef struct schedReqCfg
948 uint8_t addModListCount;
949 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
950 uint8_t relListCount;
951 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
954 typedef struct tagInfo
957 TimeAlignmentTimer timeAlignTimer;
960 typedef struct tagCfg
962 uint8_t addModListCount;
963 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
964 uint8_t relListCount;
965 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
968 typedef struct phrCfg
970 PhrPeriodicTimer periodicTimer;
971 PhrProhibitTimer prohibitTimer;
972 PhrTxPwrFactorChange txPowerFactor;
975 bool phrType2OtherCell;
976 PhrModeOtherCG phrOtherCG;
979 typedef struct macCellGrpCfg
981 SchedReqCfg schReqCfg;
984 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
992 typedef struct phyCellGrpCfg
994 PdschHarqAckCodebook pdschHarqAckCodebook;
998 /* Control resource set info */
999 typedef struct controlRsrcSet
1001 uint8_t cRSetId; /* Control resource set id */
1002 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1004 REGMappingType cceRegMappingType;
1005 PrecoderGranul precoderGranularity;
1006 uint16_t dmrsScramblingId;
1009 /* Search Space info */
1010 typedef struct searchSpace
1012 uint8_t searchSpaceId;
1014 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1015 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1016 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1017 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1018 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1019 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1020 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1021 SearchSpaceType searchSpaceType;
1022 uint8_t ueSpecificDciFormat;
1025 /* PDCCH cofniguration */
1026 typedef struct pdcchConfig
1028 uint8_t numCRsetToAddMod;
1029 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1030 uint8_t numCRsetToRel;
1031 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1032 uint8_t numSearchSpcToAddMod;
1033 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1034 uint8_t numSearchSpcToRel;
1035 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1038 /* PDSCH time domain resource allocation */
1039 typedef struct pdschTimeDomRsrcAlloc
1042 CommonMappingType mappingType;
1043 uint8_t startSymbol;
1044 uint8_t symbolLength;
1045 uint8_t startSymbolAndLength;
1046 }PdschTimeDomRsrcAlloc;
1049 typedef struct pdschBundling
1051 struct staticBundling
1053 BundlingSizeSet2 size;
1055 struct dynamicBundling
1057 BundlingSizeSet1 sizeSet1;
1058 BundlingSizeSet2 sizeSet2;
1062 /* DMRS downlink configuration */
1063 typedef struct dmrsDlCfg
1065 AddPosType addPos; /* DMRS additional position */
1068 /* PDSCH Configuration */
1069 typedef struct pdschConfig
1071 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1072 ResAllocType resourceAllocType;
1073 uint8_t numTimeDomRsrcAlloc;
1074 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1076 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1077 BundlingType bundlingType;
1078 PdschBundling bundlingInfo;
1081 /* Initial Downlink BWP */
1082 typedef struct initialDlBwp
1085 PdcchConfig pdcchCfg;
1087 PdschConfig pdschCfg;
1090 /*Spec 38.331 "SPS-Config'*/
1091 typedef struct spsConfig
1093 uint16_t periodicity;
1094 uint8_t numOfHqProcess;
1099 typedef uint8_t RadioLinkMonitoringRsId;
1101 typedef struct radioLinkMonRS
1103 RadioLinkMonitoringRsId radioLinkMonitoringRsId;
1104 PurposeOfFailureDet purpose;
1108 uint8_t nzpCsiRsResId;
1112 typedef struct radioLinkConfig
1114 RadioLinkMonRS failurDetResAddModList[1];
1115 RadioLinkMonitoringRsId failurDetResRelList[1];
1116 uint8_t beamFailureInstanceMaxCount;
1117 uint8_t beamFailureDetectionTimer;
1120 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1121 typedef struct bwpDlCfgDed
1123 PdcchConfig pdcchCfgDed;
1124 PdschConfig pdschCfgDed;
1125 SpsConfig spsCfgDed;
1126 RadioLinkConfig radioLnkMonCfgDed;
1129 /* Downlink BWP information */
1130 typedef struct dlBwpInfo
1133 BwpDlConfig bwpCommon;
1134 BwpDlCfgDed bwpDedicated;
1137 /* PDCCH Serving Cell configuration */
1138 typedef struct pdschServCellCfg
1140 uint8_t *maxMimoLayers;
1141 NumHarqProcForPdsch numHarqProcForPdsch;
1142 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1143 bool *codeBlkGrpFlushInd;
1144 PdschXOverhead *xOverhead;
1147 /* PUCCH Configuration */
1149 typedef struct pucchResrcSetInfo
1152 uint8_t resrcListCount;
1153 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1154 uint8_t maxPayLoadSize;
1157 typedef struct pucchResrcSetCfg
1159 uint8_t resrcSetToAddModListCount;
1160 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1161 uint8_t resrcSetToRelListCount;
1162 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1165 typedef struct pucchFormat0
1167 uint8_t initialCyclicShift;
1169 uint8_t startSymbolIdx;
1172 typedef struct pucchFormat1
1174 uint8_t initialCyclicShift;
1176 uint8_t startSymbolIdx;
1180 typedef struct pucchFormat2_3
1184 uint8_t startSymbolIdx;
1187 typedef struct pucchFormat4
1192 uint8_t startSymbolIdx;
1195 typedef struct pucchResrcInfo
1199 uint8_t intraFreqHop;
1200 uint16_t secondPrbHop;
1201 uint8_t pucchFormat;
1204 PucchFormat0 *format0;
1205 PucchFormat1 *format1;
1206 PucchFormat2_3 *format2;
1207 PucchFormat2_3 *format3;
1208 PucchFormat4 *format4;
1212 typedef struct pucchResrcCfg
1214 uint8_t resrcToAddModListCount;
1215 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1216 uint8_t resrcToRelListCount;
1217 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1220 typedef struct pucchFormatCfg
1222 bool interSlotFreqHop;
1224 uint8_t maxCodeRate;
1230 typedef struct schedReqResrcInfo
1234 uint8_t periodicity;
1239 typedef struct pucchSchedReqCfg
1241 uint8_t schedAddModListCount;
1242 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1243 uint8_t schedRelListCount;
1244 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1247 typedef struct spatialRelationInfo
1249 uint8_t spatialRelationId;
1250 uint8_t servCellIdx;
1251 uint8_t pathLossRefRSId;
1253 uint8_t closeLoopIdx;
1254 }SpatialRelationInfo;
1256 typedef struct pucchSpatialCfg
1258 uint8_t spatialAddModListCount;
1259 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1260 uint8_t spatialRelListCount;
1261 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1264 typedef struct p0PucchCfg
1270 typedef struct pathLossRefRSCfg
1272 uint8_t pathLossRefRSId;
1275 typedef struct pucchMultiCsiCfg
1277 uint8_t multiCsiResrcListCount;
1278 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1281 typedef struct pucchDlDataToUlAck
1283 uint8_t dlDataToUlAckListCount;
1284 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1285 }PucchDlDataToUlAck;
1287 typedef struct pucchPowerControl
1295 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1296 uint8_t pathLossRefRSListCount;
1297 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1300 typedef struct pucchCfg
1302 PucchResrcSetCfg *resrcSet;
1303 PucchResrcCfg *resrc;
1304 PucchFormatCfg *format1;
1305 PucchFormatCfg *format2;
1306 PucchFormatCfg *format3;
1307 PucchFormatCfg *format4;
1308 PucchSchedReqCfg *schedReq;
1309 PucchMultiCsiCfg *multiCsiCfg;
1310 PucchSpatialCfg *spatialInfo;
1311 PucchDlDataToUlAck *dlDataToUlAck;
1312 PucchPowerControl *powerControl;
1315 /* Transform precoding disabled */
1316 typedef struct transPrecodDisabled
1318 uint16_t scramblingId0;
1319 }TransPrecodDisabled;
1321 /* DMRS Uplink configuration */
1322 typedef struct dmrsUlCfg
1324 AddPosType addPos; /* DMRS additional position */
1325 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1328 /* PUSCH Configuration */
1329 typedef struct puschCfg
1331 uint8_t dataScramblingId;
1332 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1333 ResAllocType resourceAllocType;
1334 uint8_t numTimeDomRsrcAlloc;
1335 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1336 TransformPrecoder transformPrecoder;
1339 /* Initial Uplink BWP */
1340 typedef struct initialUlBwp
1348 typedef struct bwpUlCfgDed
1354 /* Uplink BWP information */
1355 typedef struct ulBwpInfo
1358 BwpUlConfig bwpCommon;
1362 typedef struct rachCfgGeneric
1364 uint8_t prachCfgIdx; /* PRACH config idx */
1365 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
1366 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
1367 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
1368 int16_t preambleRcvdTargetPower; /*Prach Target power received*/
1369 uint8_t preambleTransMax; /*Preamble Transmission Max power*/
1370 uint8_t pwrRampingStep; /*Power Ramping Step*/
1371 uint8_t raRspWindow; /* RA Response Window */
1374 typedef struct raPrioritization
1376 uint8_t powerRampingStepHighPriority;
1377 uint8_t scalingFactorBI;
1380 typedef struct bfrCsiRsRes
1384 uint8_t raPreambleIndex;
1387 typedef struct bfrSsbRes
1390 uint8_t raPreambleIndex;
1393 typedef struct prachResDedBfr
1399 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1400 typedef struct beamFailRecoveryCfg
1402 uint8_t rootSeqIndexBfr;
1403 RachCfgGeneric rachCfgBfr;
1404 uint8_t rsrpThreshSsbBfr;
1405 PrachResDedBfr candidteBeamRSList;
1406 uint8_t ssbPerachBfr;
1407 uint8_t raSsbOccMaskIndex;
1408 uint8_t recoverySearchSpaceId;
1409 RaPrioritization raPrioBfr;
1411 uint8_t msg1SubcSpacing;
1412 }BeamFailRecoveryCfg;
1414 /* Serving cell configuration */
1415 typedef struct servCellCfgInfo
1417 InitialDlBwp initDlBwp;
1418 RadioLinkConfig radioLinkMonConfig;
1419 uint8_t numDlBwpToAdd;
1420 DlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1421 uint8_t firstActvDlBwpId;
1422 uint8_t defaultDlBwpId;
1423 uint8_t *bwpInactivityTmr;
1424 PdschServCellCfg pdschServCellCfg;
1425 InitialUlBwp initUlBwp;
1426 BeamFailRecoveryCfg beamFailureRecoveryCfg;
1427 uint8_t numUlBwpToAdd;
1428 UlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1429 uint8_t firstActvUlBwpId;
1432 /* Special cell configuration */
1433 typedef struct spCellCfg
1435 uint8_t servCellIdx;
1436 ServCellCfgInfo servCellCfg;
1439 typedef struct bwpRelInfo
1444 /* Serving cell Re-configuration */
1445 typedef struct servCellRecfgInfo
1447 InitialDlBwp initDlBwp;
1448 RadioLinkConfig radioLinkMonConfig;
1449 uint8_t numDlBwpToAddOrMod;
1450 DlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1451 uint8_t numDlBwpToRel;
1452 BwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1453 uint8_t firstActvDlBwpId;
1454 uint8_t defaultDlBwpId;
1455 uint8_t *bwpInactivityTmr;
1456 PdschServCellCfg pdschServCellCfg;
1457 InitialUlBwp initUlBwp;
1458 uint8_t numUlBwpToAddOrMod;
1459 UlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1460 uint8_t numUlBwpToRel;
1461 BwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1462 uint8_t firstActvUlBwpId;
1465 /* Special cell Re-configuration */
1466 typedef struct spCellRecfg
1468 uint8_t servCellIdx;
1469 ServCellRecfgInfo servCellCfg;
1472 typedef struct ambrCfg
1474 uint32_t ulBr; /* UL Bit rate */
1477 typedef struct nonDynFiveQi
1482 uint16_t maxDataBurstVol;
1485 typedef struct dynFiveQi
1488 uint16_t packetDelayBudget;
1489 uint8_t packetErrRateScalar;
1490 uint8_t packetErrRateExp;
1492 uint8_t delayCritical;
1494 uint16_t maxDataBurstVol;
1497 typedef struct ngRanAllocAndRetPri
1499 uint8_t priorityLevel;
1500 uint8_t preEmptionCap;
1501 uint8_t preEmptionVul;
1502 }NgRanAllocAndRetPri;
1504 typedef struct grbQosInfo
1506 uint32_t maxFlowBitRateDl;
1507 uint32_t maxFlowBitRateUl;
1508 uint32_t guarFlowBitRateDl;
1509 uint32_t guarFlowBitRateUl;
1512 typedef struct drbQos
1514 QosType fiveQiType; /* Dynamic or non-dynamic */
1517 NonDynFiveQi nonDyn5Qi;
1520 NgRanAllocAndRetPri ngRanRetPri;
1521 GrbQosInfo grbQosInfo;
1522 uint16_t pduSessionId;
1523 uint32_t ulPduSessAggMaxBitRate;
1526 typedef struct ulLcCfg
1531 PBitRate pbr; // prioritisedBitRate
1532 BucketSizeDur bsd; // bucketSizeDuration
1535 typedef struct dlLcCfg
1537 LcPriority lcp; // logical Channel Prioritization
1540 typedef struct lcCfg
1550 typedef struct modulationInfo
1552 uint8_t modOrder; /* Modulation order */
1553 uint8_t mcsIndex; /* MCS Index */
1554 McsTable mcsTable; /* MCS table */
1557 typedef struct macUeCreateReq
1563 bool macCellGrpCfgPres;
1564 MacCellGrpCfg macCellGrpCfg;
1565 bool phyCellGrpCfgPres;
1566 PhyCellGrpCfg phyCellGrpCfg;
1568 SpCellCfg spCellCfg;
1570 ModulationInfo dlModInfo; /* DL modulation info */
1571 ModulationInfo ulModInfo; /* UL modulation info */
1573 LcCfg lcCfgList[MAX_NUM_LC];
1576 /* UE Re-configuration */
1577 typedef struct macUeRecfg
1583 bool macCellGrpRecfgPres;
1584 MacCellGrpCfg macCellGrpRecfg;
1585 bool phyCellGrpRecfgPres;
1586 PhyCellGrpCfg phyCellGrpRecfg;
1587 bool spCellRecfgPres;
1588 SpCellRecfg spCellRecfg;
1590 ModulationInfo dlModInfo;
1591 ModulationInfo ulModInfo;
1592 uint8_t numLcsToAdd;
1593 LcCfg lcCfgAdd[MAX_NUM_LC];
1594 uint8_t numLcsToDel;
1595 uint8_t lcIdToDel[MAX_NUM_LC];
1596 uint8_t numLcsToMod;
1597 LcCfg lcCfgMod[MAX_NUM_LC];
1598 DataTransmissionAction transmissionAction;
1600 bool drxConfigIndicatorRelease;
1604 typedef struct nrcgi
1610 typedef struct srbFailInfo
1616 typedef struct drbFailInfo
1622 typedef struct sCellFailInfo
1628 typedef struct macUeCreateRsp
1633 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1634 SRBFailInfo *failedSRBlisti;
1635 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1636 DRBFailInfo *failedDRBlist;
1637 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1638 SCellFailInfo *failedSCellList;
1639 uint8_t numDRBModFailed; /* valid values : 0 to MAX_NUM_DRB */
1640 DRBFailInfo *failedDRBModlist;
1643 typedef struct macUeCreateRsp MacUeRecfgRsp;
1645 typedef struct rachRsrcReq
1650 uint8_t ssbIdx[MAX_NUM_SSB];
1653 typedef struct macCfraSsbResource
1656 uint8_t raPreambleIdx;
1657 }MacCfraSsbResource;
1659 typedef struct macCfraResource
1662 MacCfraSsbResource ssbResource[MAX_NUM_SSB];
1665 typedef struct macRachRsrcRsp
1670 uint16_t newCrnti; /* This parameter maps to 3GPP TS 38.331 newUE-Identity */
1671 MacCfraResource cfraResource;
1674 typedef struct macRachRsrcRel
1681 typedef struct ueDelete
1688 typedef struct ueDeleteRsp
1692 CauseOfResult status;
1695 typedef struct macCellDeleteReq
1700 typedef struct macCellDeleteRsp
1703 CauseOfResult status;
1706 typedef struct macSliceCfgRsp
1710 CauseOfResult cause;
1713 typedef struct rrmPolicyRatio
1717 uint8_t dedicatedRatio;
1720 typedef struct rrmPolicyMemberList
1724 }RrmPolicyMemberList;
1726 typedef struct macSliceRrmPolicy
1728 ResourceType resourceType;
1729 uint8_t numOfRrmPolicyMem;
1730 RrmPolicyMemberList **rRMPolicyMemberList;
1731 RrmPolicyRatio policyRatio;
1734 typedef struct macSliceCfgReq
1736 uint8_t numOfRrmPolicy;
1737 MacSliceRrmPolicy **listOfRrmPolicy;
1740 /*As per ORAN-WG8, Slice Cfg and ReCfg are same structures*/
1741 typedef struct macSliceCfgReq MacSliceRecfgReq;
1742 typedef struct macSliceCfgRsp MacSliceRecfgRsp;
1744 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.17 DL PCCH Indication */
1745 typedef struct dlPcchInd
1755 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.1 Cell Start */
1756 typedef struct cellInfo
1758 SlotTimingInfo slotInfo;
1762 typedef struct cellInfo CellStartInfo;
1763 typedef struct cellInfo CellStopInfo;
1765 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.12 UE Reset Request */
1766 typedef struct ueReset
1772 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.13 UE Reset Response */
1773 typedef struct ueResetRsp
1777 CauseOfResult status;
1780 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.14 UE Sync Status Indication */
1781 typedef struct ueSyncStatusInd
1786 }MacUeSyncStatusInd;
1788 /* The following list of structures is taken from the SI-SchedulingInfo section of specification 33.331. */
1789 typedef struct sibTypeInfo
1796 typedef struct sibMappingInfo
1798 uint8_t numSibTypeInfo;
1799 SibTypeInfo sibTypeInfo[NUM_SIB];
1802 typedef struct schedulingInfo
1804 SiBroadcastStatus siBroadcastStatus;
1805 SiPeriodicity siPeriodicity;
1806 SibMappingInfo sibMappingInfo;
1809 typedef struct rachOccasionsSi
1811 RachCfgGeneric rachConfigSi;
1812 SsbPerRachOccasion ssbPerRachOccasion;
1815 typedef struct siReqRsrc
1817 uint8_t raPreambleStartIndex;
1818 uint8_t raAssociationPeriodIndex;
1819 uint8_t raSsbOccasionMaskIndex;
1822 typedef struct siRequestResource
1824 uint8_t numOfSiReqRsrc;
1825 SiReqRsrc siReqRsrc[MAX_SI_MESSAGE];
1828 typedef struct siRequestConfig
1830 RachOccasionsSi rachOccasionsSi;
1831 SiRequestPeriod siRequestPeriod;
1832 SiRequestResource siRequestResource;
1835 typedef struct schedulingInfoList
1838 SchedulingInfo schedulingInfo[MAX_SI_MESSAGE];
1839 }SchedulingInfoList;
1841 typedef struct siSchedulingInfo
1843 SchedulingInfoList schInfoList;
1844 SiWindowLength siWindowLength;
1845 SiRequestConfig siRequestConfig;
1846 SiRequestConfig siRequestConfigSUL;
1850 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.18 DL Broadcast Request */
1851 typedef struct macDlBroadcastReq
1855 SiSchedulingInfo **siSchedulingInfo;
1858 typedef struct macStatsGrpInfo
1861 uint16_t periodicity; /* In milliseconds */
1863 MacMeasurementType statsList[MAX_NUM_STATS];
1866 typedef struct macStatsReq
1868 uint64_t subscriptionId;
1869 uint8_t numStatsGroup;
1870 MacStatsGrpInfo statsGrpList[MAX_NUM_STATS_GRP];
1873 typedef struct macStatsGrpRejected
1876 CauseOfResult cause;
1877 }MacStatsGrpRejected;
1879 typedef struct macStatsRsp
1881 uint64_t subscriptionId;
1882 uint8_t numGrpAccepted;
1883 uint8_t statsGrpAcceptedList[MAX_NUM_STATS_GRP];
1884 uint8_t numGrpRejected;
1885 MacStatsGrpRejected statsGrpRejectedList[MAX_NUM_STATS_GRP];
1888 typedef struct macStats
1890 MacMeasurementType type;
1894 typedef struct macStatsInd
1896 uint64_t subscriptionId;
1899 MacStats measuredStatsList[MAX_NUM_STATS];
1902 /****************** FUNCTION POINTERS ********************************/
1904 /* DL broadcast req from DU APP to MAC*/
1905 typedef uint8_t (*DuMacDlBroadcastReq) ARGS((
1907 MacDlBroadcastReq *dlBroadcast));
1909 /* Functions for CellUp Ind from MAC to DU APP*/
1910 typedef uint8_t (*DuMacCellUpInd) ARGS((
1912 OduCellId *cellId ));
1914 /* Functions for slot Ind from MAC to DU APP*/
1915 typedef uint8_t (*DuMacSlotInd) ARGS((
1917 SlotTimingInfo *slotIndInfo));
1919 /* Functions for stop Ind from MAC to DU APP*/
1920 typedef uint8_t (*DuMacStopInd) ARGS((
1922 OduCellId *cellId ));
1924 /* Functions for mac cell start req */
1925 typedef uint8_t (*DuMacCellStart) ARGS((
1927 CellStartInfo *cellId));
1929 /* Functions for mac cell stop request */
1930 typedef uint8_t (*DuMacCellStop) ARGS((
1932 CellStopInfo *cellId ));
1934 /* Function pointers for packing macCellCfg Request and Confirm */
1935 typedef uint8_t (*packMacCellCfgReq) ARGS((
1937 MacCellCfg *macCellCfg ));
1939 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1941 MacCellCfgCfm *macCellCfgCfm ));
1943 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1945 MacCellCfg *macCellCfg));
1947 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1949 MacCellCfgCfm *macCellCfgCfm ));
1951 /* Functions for UL CCCH Ind from MAC to DU APP*/
1952 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1954 UlCcchIndInfo *ulCcchIndInfo ));
1956 /* Functions for DL CCCH Ind from DU APP to MAC*/
1957 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1959 DlCcchIndInfo *dlCcchIndInfo ));
1961 /* UE create Request from DU APP to MAC*/
1962 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1964 MacUeCreateReq *ueCfg ));
1966 /* UE create Response from MAC to DU APP */
1967 typedef uint8_t (*MacDuUeCreateRspFunc) ARGS((
1969 MacUeCreateRsp *cfgRsp));
1971 /* UE Reconfig Request from DU APP to MAC */
1972 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1974 MacUeRecfg *ueCfg ));
1976 /* UE Reconfig Response from MAC to DU APP */
1977 typedef uint8_t (*MacDuUeRecfgRspFunc) ARGS((
1979 MacUeRecfgRsp *cfgRsp));
1981 /* RACH Resource Request from DU APP to MAC */
1982 typedef uint8_t (*DuMacRachRsrcReq) ARGS((
1984 MacRachRsrcReq *rachRsrcReq));
1986 /* RACH Resource Response from MAC to DU APP */
1987 typedef uint8_t (*MacDuRachRsrcRspFunc) ARGS((
1989 MacRachRsrcRsp *rachRsrcRsp));
1991 /* RACH Resource Release from DU APP to MAC */
1992 typedef uint8_t (*DuMacRachRsrcRel) ARGS((
1994 MacRachRsrcRel *rachRsrcRel));
1996 /* UE Delete Request from DU APP to MAC*/
1997 typedef uint8_t (*DuMacUeDeleteReq) ARGS((
1999 MacUeDelete *ueDel ));
2001 /* UE Delete Response from MAC to DU APP*/
2002 typedef uint8_t (*MacDuUeDeleteRspFunc) ARGS((
2004 MacUeDeleteRsp *deleteRsp));
2006 /* Cell Delete Request from DU APP to MAC*/
2007 typedef uint8_t (*DuMacCellDeleteReq) ARGS((
2009 MacCellDeleteReq *cellDelete ));
2011 /* Cell Delete Response from MAC to DU APP*/
2012 typedef uint8_t (*MacDuCellDeleteRspFunc) ARGS((
2014 MacCellDeleteRsp *cellDeleteRsp));
2016 /* Slice Cfg Request from DU APP to MAC*/
2017 typedef uint8_t (*DuMacSliceCfgReq) ARGS((
2019 MacSliceCfgReq *CfgReq));
2021 /* Slice Cfg Response from MAC to DU APP */
2022 typedef uint8_t (*MacDuSliceCfgRspFunc) ARGS((
2024 MacSliceCfgRsp *cfgRsp));
2026 /* Slice ReReCfg Request from DU APP to MAC*/
2027 typedef uint8_t (*DuMacSliceRecfgReq) ARGS((
2029 MacSliceRecfgReq *CfgReq));
2031 /* Slice ReReCfg Response from MAC to DU APP */
2032 typedef uint8_t (*MacDuSliceRecfgRspFunc) ARGS((
2034 MacSliceRecfgRsp *cfgRsp));
2036 /* Pcch indication from DU APP to MAC*/
2037 typedef uint8_t (*DuMacDlPcchInd) ARGS((
2039 DlPcchInd *pcchInd));
2041 /* UE Reset Request from DU APP to MAC*/
2042 typedef uint8_t (*DuMacUeResetReq) ARGS((
2044 MacUeResetReq *ueReset ));
2046 /* UE Reset Response from MAC to DU APP*/
2047 typedef uint8_t (*MacDuUeResetRspFunc) ARGS((
2049 MacUeResetRsp *resetRsp));
2051 /* UE sync status indication from MAC to DU APP*/
2052 typedef uint8_t (*MacDuUeSyncStatusIndFunc) ARGS((
2054 MacUeSyncStatusInd *syncStatusInd));
2056 /* Statitics Request from DU APP to MAC */
2057 typedef uint8_t (*DuMacStatsReqFunc) ARGS((
2059 MacStatsReq *statsReq));
2061 /* Statistics Response from MAC to DU APP */
2062 typedef uint8_t (*MacDuStatsRspFunc) ARGS((
2064 MacStatsRsp *statsRsp));
2066 /* Statistics Ind from MAC to DU APP */
2067 typedef uint8_t (*MacDuStatsIndFunc) ARGS((
2069 MacStatsInd *statsInd));
2071 /******************** FUNCTION DECLARATIONS ********************************/
2072 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
2073 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
2074 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
2076 uint8_t packMacCellStart(Pst *pst, CellStartInfo *cellStartInfo);
2077 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
2078 uint8_t MacProcCellStart(Pst *pst, CellStartInfo *cellStartInfo);
2080 uint8_t packMacCellStop(Pst *pst, CellStopInfo *cellStopInfo);
2081 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
2082 uint8_t MacProcCellStop(Pst *pst, CellStopInfo *cellStopInfo);
2084 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
2085 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
2086 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
2088 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
2089 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
2090 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
2092 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
2093 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
2094 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
2095 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
2097 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
2098 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
2099 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
2101 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
2102 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
2103 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
2105 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
2106 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
2107 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
2109 uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
2110 uint8_t unpackDuMacUeCreateRsp(MacDuUeCreateRspFunc func, Pst *pst, Buffer *mBuf);
2111 uint8_t DuProcMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
2113 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
2114 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
2115 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
2117 uint8_t packDuMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp);
2118 uint8_t unpackDuMacUeRecfgRsp(MacDuUeRecfgRspFunc func, Pst *pst, Buffer *mBuf);
2119 uint8_t DuProcMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp);
2121 uint8_t packDuMacRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
2122 uint8_t unpackMacRachRsrcReq(DuMacRachRsrcReq func, Pst *pst, Buffer *mBuf);
2123 uint8_t MacProcRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
2125 uint8_t packDuMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
2126 uint8_t unpackDuMacRachRsrcRsp(MacDuRachRsrcRspFunc func, Pst *pst, Buffer *mBuf);
2127 uint8_t DuProcMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
2129 uint8_t packDuMacRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
2130 uint8_t unpackMacRachRsrcRel(DuMacRachRsrcRel func, Pst *pst, Buffer *mBuf);
2131 uint8_t MacProcRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
2133 uint8_t packDuMacUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
2134 uint8_t MacProcUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
2135 uint8_t unpackMacUeDeleteReq(DuMacUeDeleteReq func, Pst *pst, Buffer *mBuf);
2137 uint8_t packDuMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
2138 uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
2139 uint8_t unpackDuMacUeDeleteRsp(MacDuUeDeleteRspFunc func, Pst *pst, Buffer *mBuf);
2141 uint8_t packDuMacCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete);
2142 uint8_t MacProcCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete);
2143 uint8_t unpackMacCellDeleteReq(DuMacCellDeleteReq func, Pst *pst, Buffer *mBuf);
2145 uint8_t packDuMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
2146 uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
2147 uint8_t unpackDuMacCellDeleteRsp(MacDuCellDeleteRspFunc func, Pst *pst, Buffer *mBuf);
2149 uint8_t packDuMacSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
2150 uint8_t MacProcSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
2151 uint8_t unpackMacSliceCfgReq(DuMacSliceCfgReq func, Pst *pst, Buffer *mBuf);
2153 uint8_t DuProcMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
2154 uint8_t packDuMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
2155 uint8_t unpackDuMacSliceCfgRsp(MacDuSliceCfgRspFunc func, Pst *pst, Buffer *mBuf);
2157 uint8_t packDuMacSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq);
2158 uint8_t MacProcSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq);
2159 uint8_t unpackMacSliceRecfgReq(DuMacSliceRecfgReq func, Pst *pst, Buffer *mBuf);
2161 uint8_t DuProcMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp);
2162 uint8_t packDuMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp);
2163 uint8_t unpackDuMacSliceRecfgRsp(MacDuSliceRecfgRspFunc func, Pst *pst, Buffer *mBuf);
2165 uint8_t duHandleSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
2166 uint8_t packMacSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
2167 uint8_t unpackDuMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
2169 uint8_t packDuMacDlPcchInd(Pst *pst, DlPcchInd *pcchInd);
2170 uint8_t MacProcDlPcchInd(Pst *pst, DlPcchInd *pcchInd);
2171 uint8_t unpackMacDlPcchInd(DuMacDlPcchInd func, Pst *pst, Buffer *mBuf);
2173 int8_t getFreeBitFromUeBitMap(uint16_t cellId);
2174 void unsetBitInUeBitMap(uint16_t cellId, uint8_t bitPos);
2176 uint8_t packDuMacUeResetReq(Pst *pst, MacUeResetReq *ueReset);
2177 uint8_t MacProcUeResetReq(Pst *pst, MacUeResetReq *ueReset);
2178 uint8_t unpackMacUeResetReq(DuMacUeResetReq func, Pst *pst, Buffer *mBuf);
2180 uint8_t packDuMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp);
2181 uint8_t DuProcMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp);
2182 uint8_t unpackDuMacUeResetRsp(MacDuUeResetRspFunc func, Pst *pst, Buffer *mBuf);
2184 uint8_t packDuMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
2185 uint8_t DuProcMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
2186 uint8_t unpackDuMacUeSyncStatusInd(MacDuUeSyncStatusIndFunc func, Pst *pst, Buffer *mBuf);
2188 uint8_t packDuMacDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq);
2189 uint8_t MacProcDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq);
2190 uint8_t unpackMacDlBroadcastReq(DuMacDlBroadcastReq func, Pst *pst, Buffer *mBuf);
2192 uint8_t packDuMacStatsReq(Pst *pst, MacStatsReq *statsReq);
2193 uint8_t MacProcStatsReq(Pst *pst, MacStatsReq *statsReq);
2194 uint8_t unpackMacStatsReq(DuMacStatsReqFunc func, Pst *pst, Buffer *mBuf);
2196 uint8_t packDuMacStatsRsp(Pst *pst, MacStatsRsp *statsRsp);
2197 uint8_t DuProcMacStatsRsp(Pst *pst, MacStatsRsp *statsRsp);
2198 uint8_t unpackDuMacStatsRsp(MacDuStatsRspFunc func, Pst *pst, Buffer *mBuf);
2200 uint8_t packDuMacStatsInd(Pst *pst, MacStatsInd *statsRsp);
2201 uint8_t DuProcMacStatsInd(Pst *pst, MacStatsInd *statsRsp);
2202 uint8_t unpackDuMacStatsInd(MacDuStatsIndFunc func, Pst *pst, Buffer *mBuf);
2206 /**********************************************************************
2208 **********************************************************************/