8d29801701f3c0c10ba80d93b08a1274e50d51fe
[o-du/l2.git] / src / cm / du_app_mac_inf.h
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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  *******************************************************************************/
18
19 /* Defines APIs exchanged between du_app and cl module of MAC */
20 #ifndef __MACINT_H__
21 #define __MACINT_H__
22
23 #define NUM_NUMEROLOGY 5  /* Number of numerology */
24
25 #define NUM_SSB         1       /* max value is 64 */
26 #define SSB_MASK_SIZE   1       /* SSB mask size is 32bit for sub6 */
27 #define SIB1_REPETITION_PERIOD   20
28 #define CORESET_0_INDEX      0
29 #define CORESET_1_INDEX      1
30 #define CORESET_2_INDEX      2
31 #define CORESET_3_INDEX      3
32 #define CORESET_4_INDEX      4
33 #define SEARCHSPACE_0_INDEX   0
34 #define SEARCHSPACE_1_INDEX   1
35 #define SEARCHSPACE_2_INDEX   2
36 #define SEARCHSPACE_3_INDEX   3
37 #define SEARCHSPACE_4_INDEX   4
38 #define SS_MONITORING_SLOT_SL1   0 /* all slots */
39 #define SS_MONITORING_SYMBOL     0x2000; /* symbol-0, set 14th bit */
40
41 /* Macro for Ue Context */
42 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8   /* Max number of scheduling request config per cell group */
43 #define MAC_NUM_TAGS 4                  /* Max number of timing advance groups */
44 #define MAX_NUM_BWP  4                  /* Max number of BWP per serving cell */
45 #define MAX_NUM_CRSET  3                /* Max number of control resource set in add/modify/release list */
46 #define MAX_NUM_SEARCH_SPC  10          /* Max number of search space in add/modify/release list */
47 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2  /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
48 #define MAX_NUM_DL_ALLOC 16             /* Max number of pdsch time domain downlink allocation */
49 #define MAX_NUM_UL_ALLOC 16             /* Max number of pusch time domain uplink allocation */
50 #define MAX_NUM_SCELL  32
51
52 /* PUCCH Configuration Macro */
53 #define MAX_NUM_PUCCH_RESRC 128
54 #define MAX_NUM_PUCCH_RESRC_SET 4
55 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
56 #define MAX_NUM_SPATIAL_RELATIONS 8
57 #define MAX_NUM_PUCCH_P0_PER_SET 8
58 #define MAX_NUM_PATH_LOSS_REF_RS 4
59 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
60
61 /* Event IDs */
62 #define EVENT_MAC_CELL_CONFIG_REQ    200
63 #define EVENT_MAC_CELL_CONFIG_CFM    201
64 #define EVENT_MAC_CELL_START         202
65 #define EVENT_MAC_CELL_STOP          203
66 #define EVENT_MAC_CELL_UP_IND        204
67 #define EVENT_MAC_STOP_IND           205
68 #define EVENT_MAC_UL_CCCH_IND        206
69 #define EVENT_MAC_DL_CCCH_IND        207
70 #define EVENT_MAC_UE_CREATE_REQ      208
71 #define EVENT_MAC_UE_CREATE_RSP      209
72 #define EVENT_MAC_UE_RECONFIG_REQ    210
73 #define EVENT_MAC_UE_RECONFIG_RSP    211
74 #define EVENT_MAC_UE_DELETE_REQ      212
75 #define EVENT_MAC_UE_DELETE_RSP      213
76 #define EVENT_MAC_CELL_DELETE_REQ    214
77 #define EVENT_MAC_CELL_DELETE_RSP    215
78 #define EVENT_MAC_SLICE_CFG_REQ      216
79 #define EVENT_MAC_SLICE_CFG_RSP      217
80 #define EVENT_MAC_SLICE_RECFG_REQ    218
81 #define EVENT_MAC_SLICE_RECFG_RSP    219
82 #define EVENT_MAC_SLOT_IND           220
83 #define EVENT_MAC_RACH_RESOURCE_REQ  221
84 #define EVENT_MAC_RACH_RESOURCE_RSP  222
85 #define EVENT_MAC_RACH_RESOURCE_REL  223
86 #define EVENT_MAC_DL_PCCH_IND        224
87
88 #define BSR_PERIODIC_TIMER_SF_10 10
89 #define BSR_RETX_TIMER_SF_320 320
90 #define BSR_SR_DELAY_TMR_2560 2560
91
92 #define PAGING_SCHED_DELTA  4
93 #define MAX_PLMN 2
94
95 typedef enum
96 {
97    MAC_DU_APP_RSP_NOK,
98    MAC_DU_APP_RSP_OK
99 }MacRsp;
100
101 typedef enum
102 {
103    SLICE_PRESENT,
104    SLICE_NOT_PRESENT
105 }RspReason;
106
107 typedef enum
108 {
109    DEL_SUCCESSFUL,
110    CELLID_INVALID,
111    UEID_INVALID
112 }UeDeleteStatus;
113
114 typedef enum
115 {
116    SUCCESSFUL_RSP,
117    CELL_ID_INVALID
118 }CellDeleteStatus;
119
120 typedef enum
121 {
122    DUP_MODE_FDD,
123    DUP_MODE_TDD
124 }DuplexMode;
125
126 typedef enum
127 {
128    MAC_GEN_FULL_PBCH_PAYLD,   /* MAC generated the full PBCH Payload */
129    PHY_GEN_TIMING_PBCH_BIT,   /* PHY generates the timing PBCH bits */
130    PHY_GEN_FULL_PBCH_PAYLD    /* PHY generates full PBCH payload */
131 }BchPduOpt;
132
133 typedef enum
134 {
135    LONG_SEQUENCE,
136    SHORT_SEQUENCE
137 }PrachSeqLen;
138
139 typedef enum
140 {
141    UNRESTRICTED,
142    RESTRICTED_SET_TYPE_A,
143    RESTRICTED_SET_TYPE_B
144 }RstSetCfg;
145
146 typedef enum
147 {
148    DONT_REPORT_RSSI,
149    RSSI_UNIT_DBM,
150    RSSI_UNIT_DBFS
151 }RSSIMeasUnit;
152
153 typedef enum
154 {
155    BETA_PSS_0DB,
156    BETA_PSS_3DB
157 }BetaPss;
158
159 typedef enum 
160 {
161    SSB_PRDCTY_MS_5,
162    SSB_PRDCTY_MS_10,
163    SSB_PRDCTY_MS_20,
164    SSB_PRDCTY_MS_40,
165    SSB_PRDCTY_MS_80,
166    SSB_PRDCTY_MS_160
167 }SSBPeriod;
168
169 typedef enum
170 {
171    RRC_REJECT,
172    RRC_SETUP
173 }DlCcchMsgType;
174
175 /* Enums for Ue Create Request */
176
177 /* SR PROHIBIT TIMER */
178 typedef enum
179 {
180    SR_PROHIBIT_MS_1,
181    SR_PROHIBIT_MS_2,
182    SR_PROHIBIT_MS_4,
183    SR_PROHIBIT_MS_8,
184    SR_PROHIBIT_MS_16,
185    SR_PROHIBIT_MS_32,
186    SR_PROHIBIT_MS_64,
187    SR_PROHIBIT_MS_128
188 }SrProhibitTimer;
189
190 typedef enum
191 {
192    SR_TRANS_MAX_N_4,
193    SR_TRANS_MAX_N_8,
194    SR_TRANS_MAX_N_16,
195    SR_TRANS_MAX_N_32,
196    SR_TRANS_MAX_N_64,
197    SR_TRANS_MAX_spare3,
198    SR_TRANS_MAX_spare2,
199    SR_TRANS_MAX_spare1
200 }SrTransMax;
201
202 typedef enum
203 {
204    TIME_ALIGNMENT_TIMER_MS_500,
205    TIME_ALIGNMENT_TIMER_MS_750,
206    TIME_ALIGNMENT_TIMER_MS_1280,
207    TIME_ALIGNMENT_TIMER_MS_1920,
208    TIME_ALIGNMENT_TIMER_MS_2560,
209    TIME_ALIGNMENT_TIMER_MS_5120,
210    TIME_ALIGNMENT_TIMER_MS_10240,
211    TIME_ALIGNMENT_TIMER_INFINITY
212 }TimeAlignmentTimer;
213
214 typedef enum
215 {
216    PHR_PERIODIC_TIMER_SF_10,
217    PHR_PERIODIC_TIMER_SF_20,
218    PHR_PERIODIC_TIMER_SF_50,
219    PHR_PERIODIC_TIMER_SF_100,
220    PHR_PERIODIC_TIMER_SF_200,
221    PHR_PERIODIC_TIMER_SF_500,
222    PHR_PERIODIC_TIMER_SF_1000,
223    PHR_PERIODIC_TIMER_INFINITY
224 }PhrPeriodicTimer;
225
226 typedef enum
227 {
228    PHR_PROHIBIT_TIMER_SF_0,
229    PHR_PROHIBIT_TIMER_SF_10,
230    PHR_PROHIBIT_TIMER_SF_20,
231    PHR_PROHIBIT_TIMER_SF_50,
232    PHR_PROHIBIT_TIMER_SF_100,
233    PHR_PROHIBIT_TIMER_SF_200,
234    PHR_PROHIBIT_TIMER_SF_500,
235    PHR_PROHIBIT_TIMER_SF_1000
236 }PhrProhibitTimer;
237
238 typedef enum
239 {
240    PHR_TX_PWR_FACTOR_CHANGE_DB_1,
241    PHR_TX_PWR_FACTOR_CHANGE_DB_3,
242    PHR_TX_PWR_FACTOR_CHANGE_DB_6,
243    PHR_TX_PWR_FACTOR_CHANGE_INFINITY
244 }PhrTxPwrFactorChange;
245
246 typedef enum
247 {
248    PHR_MODE_OTHER_CG_REAL,
249    PHR_MODE_OTHER_CG_VIRTUAL
250 }PhrModeOtherCG;
251
252 typedef enum
253 {
254    PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
255    PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
256 }PdschHarqAckCodebook;
257
258 typedef enum
259 {
260    NUM_HARQ_PROC_FOR_PDSCH_N_2,
261    NUM_HARQ_PROC_FOR_PDSCH_N_4,
262    NUM_HARQ_PROC_FOR_PDSCH_N_6,
263    NUM_HARQ_PROC_FOR_PDSCH_N_10,
264    NUM_HARQ_PROC_FOR_PDSCH_N_16
265 }NumHarqProcForPdsch;
266
267 typedef enum
268 {
269    MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
270    MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
271    MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
272    MAX_CODE_BLOCK_GROUP_PER_TB_N_8
273 }MaxCodeBlkGrpPerTB;
274
275 typedef enum
276 {
277    PDSCH_X_OVERHEAD_6,
278    PDSCH_X_OVERHEAD_12,
279    PDSCH_X_OVERHEAD_18
280 }PdschXOverhead;
281
282 typedef enum
283 {
284    TRANSFORM_PRECODER_ENABLED,
285    TRANSFORM_PRECODER_DISABLED
286 }TransformPrecoder;
287
288 typedef enum 
289 {
290    CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
291    CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
292 }REGMappingType;
293
294 typedef enum
295 {
296    SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
297    SLOTPERIODICITYANDOFFSET_PR_SL2,
298    SLOTPERIODICITYANDOFFSET_PR_SL4,
299    SLOTPERIODICITYANDOFFSET_PR_SL5,
300    SLOTPERIODICITYANDOFFSET_PR_SL8,
301    SLOTPERIODICITYANDOFFSET_PR_SL10,
302    SLOTPERIODICITYANDOFFSET_PR_SL16,
303    SLOTPERIODICITYANDOFFSET_PR_SL20,
304    SLOTPERIODICITYANDOFFSET_PR_SL40,
305    SLOTPERIODICITYANDOFFSET_PR_SL80,
306    SLOTPERIODICITYANDOFFSET_PR_SL160,
307    SLOTPERIODICITYANDOFFSET_PR_SL320,
308    SLOTPERIODICITYANDOFFSET_PR_SL640,
309    SLOTPERIODICITYANDOFFSET_PR_SL1280,
310    SLOTPERIODICITYANDOFFSET_PR_SL2560
311 }MSlotPeriodAndOffset;
312
313 typedef enum
314 {
315    SAMEASREG_BUNDLE,
316    ALL_CONTIGUOUS_RBS
317 }PrecoderGranul;
318
319 typedef enum
320 {
321    SEARCHSPACETYPE_PR_COMMON = 1,
322    SEARCHSPACETYPE_PR_UE_SPECIFIC
323 }SearchSpaceType;
324
325 typedef enum
326 {
327    QOS_NON_DYNAMIC = 1,
328    QOS_DYNAMIC
329 }QosType;
330
331 typedef enum
332 {
333    AGGREGATIONLEVEL_N0  = 0,  
334    AGGREGATIONLEVEL_N1  = 1,
335    AGGREGATIONLEVEL_N2  = 2,
336    AGGREGATIONLEVEL_N3  = 3,
337    AGGREGATIONLEVEL_N4  = 4,
338    AGGREGATIONLEVEL_N5  = 5,
339    AGGREGATIONLEVEL_N6  = 6,
340    AGGREGATIONLEVEL_N8  = 7
341 }AggrLevel;
342
343 typedef enum
344 {
345    ADDITIONALPOSITION_POS0,
346    ADDITIONALPOSITION_POS1,
347    ADDITIONALPOSITION_POS3
348 }AddPosType;
349
350 typedef enum
351 {
352    MAPPING_TYPEA,
353    MAPPING_TYPEB
354 }CommonMappingType;
355
356 typedef enum
357 {
358    RESOURCEALLOCATION_TYPE0,
359    RESOURCEALLOCATION_TYPE1,
360    RESOURCEALLOCATION_DYNAMICSWITCH
361 }ResAllocType;
362
363 typedef enum
364 {
365    RBG_SIZE_CONFIG1,
366    RBG_SIZE_CONFIG2
367 }RBGSize;
368
369 typedef enum
370 {
371    CODEWORDS_SCHED_BY_DCI_N1,
372    CODEWORDS_SCHED_BY_DCI_N2
373 }CodeWordsSchedDci;
374
375 typedef enum
376 {
377    TYPE_STATIC_BUNDLING = 1,
378    TYPE_DYNAMIC_BUNDLING
379 }BundlingType;
380
381 typedef enum
382 {
383    SET2_SIZE_N4,
384    SET2_SIZE_WIDEBAND
385 }BundlingSizeSet2;
386
387 typedef enum
388 {
389    SET1_SIZE_N4,
390    SET1_SIZE_WIDEBAND,
391    SET1_SIZE_N2_WIDEBAND,
392    SET1_SIZE_N4_WIDEBAND
393 }BundlingSizeSet1;
394
395 typedef enum
396 {
397    LC_PRIORITY_1 = 1,
398    LC_PRIORITY_2,
399    LC_PRIORITY_3
400 }LcPriority;
401
402 typedef enum
403 {
404   PBR_KBPS_0,
405   PBR_KBPS_8,
406   PBR_KBPS_16,
407   PBR_KBPS_32,
408   PBR_KBPS_64,
409   PBR_KBPS_128,
410   PBR_KBPS_256,
411   PBR_KBPS_512,
412   PBR_KBPS_1024,
413   PBR_KBPS_2048,
414   PBR_KBPS_4096,
415   PBR_KBPS_8192,
416   PBR_KBPS_16384,
417   PBR_KBPS_32768,
418   PBR_KBPS_65536,
419   PBR_KBPS_INFINITY
420 }PBitRate;
421
422 typedef enum
423 {
424    BSD_MS_5,
425    BSD_MS_10,
426    BSD_MS_20,
427    BSD_MS_50,
428    BSD_MS_100,
429    BSD_MS_150,
430    BSD_MS_300,
431    BSD_MS_500,
432    BSD_MS_1000,
433    BSD_SPARE_7,
434    BSD_SPARE_6,
435    BSD_SPARE_5,
436    BSD_SPARE_4,
437    BSD_SPARE_3,
438    BSD_SPARE_2,
439    BSD_SPARE_1
440
441 }BucketSizeDur;
442
443 typedef enum
444 {
445    RADIO_NW_LAYER_FAIL,
446    TRANSPORT_LAYER_FAIL,
447    PROTOCOL_FAIL,
448    MISCELLANEOUS
449 }CauseGrp;
450
451 typedef enum
452 {
453    UNSPECIFIED_RADIO_NW_CAUSE,
454    RL_FAIL_RLC,
455    UNKNOWN_GNB_CU_UE_F1AP_ID,
456    ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
457    UNKNOWN_GNB_DU_UE_F1AP_ID,
458    ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
459    UNKNOWN_UE_F1AP_ID_PAIR,
460    INCONSISTENT_UE_F1AP_ID_PAIR,
461    INTERACTION_WITH_OTHER_PROCEDURE,
462    UNSUPPORTED_QCI,
463    ACTION_REQUIRED_FOR_RADIO_REASONS,
464    RADIO_RESOURCES_UNAVAILABLE,
465    CANCELLED_PROCEDURE,
466    RELEASE_NORMAL,
467    CELL_UNAVAILABLE,
468    OTHER_RL_FAILURE,
469    UE_REJECTION,
470    RESOURCES_UNAVAILABLE_FOR_SLICE
471 }RadioNwLyrCause;
472
473 typedef enum
474 {
475    UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
476    TRANSPORT_RESOURCE_UNAVAILABLE
477 }TransLyrCause;
478
479 typedef enum
480 {
481    TRANSFER_SYNTAX_ERROR,
482    ABSTRACT_SYNTAX_ERROR_REJECT,
483    ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
484    INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
485    SEMANTIC_ERR,
486    ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
487    UNSPECIFIED_PROTOCOL_CAUSE
488 }ProtCause;
489
490 typedef enum
491 {
492    CONTROL_PROCESSING_OVERLOAD,
493    NOT_ENOUGH_USER,
494    PLANE_PROCESSING_RESOURCES,
495    HARDWARE_FAIL,
496    INTERVENTION_BY_O_AND_M,
497    UNSPECIFIED_MISC_CAUSE
498 }MiscFailCause;
499
500 typedef enum
501 {
502    MCS_TABLE_QAM64,
503    MCS_TABLE_QAM256,
504    MCS_TABLE_QAM64_LOW_SE
505 }McsTable;
506
507 typedef enum
508 {
509    RSRC_PRB,
510    RSRC_DRB,
511    RSRC_RRC_CONNECTED_USERS
512 }ResourceType;
513
514 typedef enum
515 {
516    TRANSMISSION_ALLOWED,
517    STOP_TRANSMISSION,
518    RESTART_TRANSMISSION
519 }DataTransmissionAction;
520
521 typedef struct failureCause
522 {
523    CauseGrp   type;
524    union
525    {
526       RadioNwLyrCause   radioNwCause;
527       TransLyrCause     transportCause;
528       ProtCause         protcolCause;
529       MiscFailCause     miscCause;
530    }u;
531 }FailureCause;
532
533 typedef struct carrierCfg
534 {
535    uint32_t   dlBw;                   /* DL bandwidth */
536    uint32_t   dlFreq;                 /* Absolute frequency of DL point A in KHz */
537    uint32_t   ulBw;                   /* UL bandwidth */
538    uint32_t   ulFreq;                 /* Absolute frequency of UL point A in KHz */
539    uint16_t   numTxAnt;               /* Number of Tx antennas */
540    uint16_t   numRxAnt;               /* Number of Rx antennas */
541 }CarrierCfg;
542
543 typedef enum
544 {
545    OP_DISABLED,     
546    OP_ENABLED,     
547 }MacOpState;
548
549 typedef enum
550 {
551    ADMIN_LOCKED,     
552    ADMIN_UNLOCKED,  
553    ADMIN_SHUTTING_DOWN, 
554 }MacAdminState;
555
556 typedef enum
557 {
558    CELL_IDLE,
559    CELL_INACTIVE,
560    CELL_ACTIVE,
561 }MacCellState;
562
563 typedef struct plmnInfoList
564 {
565    Plmn           plmn;
566    uint8_t        numSupportedSlice; /* Total slice supporting */
567    Snssai         **snssai;         /* List of supporting snssai*/
568 }PlmnInfoList;
569
570 typedef struct schPageCfg
571 {
572   uint8_t  numPO;                    /*Derived from Ns*/
573   bool     poPresent;                /*Whether FirstPDCCH-MonitoringPO is present or not*/
574   uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
575 }SchPageCfg;
576
577 typedef struct pdcchConfigSib1
578 {
579    uint8_t coresetZeroIndex;     /* derived from 4 LSB of pdcchSib1 present in MIB */
580    uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
581 }PdcchConfigSib1;
582
583 typedef struct sib1CellCfg
584 {
585    PdcchConfigSib1  pdcchCfgSib1;  /*Freq pos where UE may find SS/PBCH block with SIB1*/
586    uint8_t          *sib1Pdu;
587    uint16_t         sib1PduLen;
588    SchPageCfg       pagingCfg;
589 } Sib1CellCfg; 
590
591
592 typedef struct cellCfg
593 {
594    MacOpState      opState;
595    MacAdminState   adminState;
596    MacCellState    cellState;
597    PlmnInfoList plmnInfoList[MAX_PLMN];   /* Consits of PlmnId and Snssai list */
598    uint32_t     phyCellId;                /* Physical cell id */
599    uint32_t     tac;
600    uint32_t     ssbFreq;
601    uint16_t     subCarrSpacing;
602    DuplexMode   dupType;          /* Duplex type: TDD/FDD */
603    uint8_t      numerology;       /* Supported numerology */
604    Sib1CellCfg  sib1Cfg;          /* SIB1 config */
605 }CellCfg;
606
607 typedef struct ssbCfg
608 {
609    uint32_t    ssbPbchPwr;       /* SSB block power */
610    uint8_t     scsCmn;           /* subcarrier spacing for common */
611    uint16_t    ssbOffsetPointA;  /* SSB subcarrier offset from point A */
612    SSBPeriod   ssbPeriod;        /* SSB Periodicity in msec */
613    uint8_t     ssbScOffset;       /* Subcarrier Offset */
614    uint32_t    ssbMask[SSB_MASK_SIZE];      /* Bitmap for actually transmitted SSB. */
615    uint8_t     beamId[NUM_SSB];
616    BetaPss     betaPss;
617    BchPduOpt   bchPayloadFlag;   /* Options for generation of payload */
618    uint8_t     mibPdu[3];           /* MIB payload */
619    uint8_t     dmrsTypeAPos;     /* DMRS Type A position */
620 }SsbCfg;
621
622 typedef struct fdmInfo
623 {
624    uint16_t   rootSeqIdx;        /* Root sequence index */
625    uint8_t    numRootSeq;        /* Number of root sequences required for FD */
626    uint16_t   k1;                /* Frequency Offset for each FD */
627    uint8_t    zeroCorrZoneCfg;   /* Zero correlation zone cofig */
628 }PrachFdmInfo;
629
630 typedef struct prachCfg
631 {
632    PrachSeqLen   prachSeqLen;         /* RACH Sequence length: Long/short */
633    uint8_t       prachSubcSpacing;    /* Subcarrier spacing of RACH */
634    uint8_t       msg1Fdm;             /* Number of RACH frequency domain occasions/ PRACH FDM (1,2,4,8) */
635    uint8_t       prachCfgIdx;         /* PRACH Cfg Index */
636    PrachFdmInfo  fdm[8];              /* FDM info */
637    RstSetCfg     prachRstSetCfg;      /* PRACH restricted set config */
638    uint8_t       ssbPerRach;          /* SSB per RACH occassion */
639    uint8_t       totalNumRaPreamble;  /* Total number of RA preambles */
640    uint8_t       numCbPreamblePerSsb; /* Number of CB preamble per SSB */
641    uint16_t      msg1FreqStart;       /* Msg1-FrequencyStart */
642    uint8_t       raContResTmr;        /* RA Contention Resoultion Timer */
643    uint8_t       rsrpThreshSsb;       /* RSRP Threshold SSB */
644    uint8_t       raRspWindow;         /* RA Response Window */
645 }PrachCfg;
646
647 typedef struct bwpParams
648 {
649    uint16_t firstPrb;
650    uint16_t numPrb;
651    uint8_t  scs;
652    uint8_t  cyclicPrefix;
653 }BwpParams;
654
655 typedef struct candidatesInfo
656 {
657    uint8_t aggLevel1;
658    uint8_t aggLevel2;
659    uint8_t aggLevel4;
660    uint8_t aggLevel8;
661    uint8_t aggLevel16;
662 }CandidatesInfo;
663
664 typedef struct searchSpaceCfg
665 {
666    uint8_t searchSpaceId;
667    uint8_t coresetId;
668    uint16_t monitoringSlot;
669    uint16_t duration;
670    uint16_t monitoringSymbol;
671    CandidatesInfo candidate;
672 }SearchSpaceCfg;
673
674 typedef struct pdcchConfigCommon
675 {
676    /* only one search space is configured during SIB1 */
677    SearchSpaceCfg commonSearchSpace;
678    uint8_t raSearchSpaceId;
679 }PdcchConfigCommon;
680
681 typedef struct pdschCfgCommTimeDomRsrcAlloc
682 {
683    uint8_t k0;
684    uint8_t mappingType;
685    uint8_t startSymbol;
686    uint8_t lengthSymbol;
687 }PdschCfgCommTimeDomRsrcAlloc;
688
689 typedef struct pdschConfigCommon
690 {
691    uint8_t  numTimeDomAlloc;
692    /* PDSCH time domain DL resource allocation list */
693    PdschCfgCommTimeDomRsrcAlloc   timeDomRsrcAllocList[MAX_NUM_DL_ALLOC]; 
694 }PdschConfigCommon;
695
696 typedef struct pucchConfigCommon
697 {
698    uint8_t pucchResourceCommon;
699    uint8_t pucchGroupHopping;
700 }PucchConfigCommon;
701
702 /* PUSCH Time Domain Resource Allocation */
703 typedef struct puschTimeDomRsrcAlloc
704 {
705    uint8_t             k2;
706    CommonMappingType   mappingType;
707    uint8_t             startSymbol;
708    uint8_t             symbolLength;
709    uint8_t             startSymbolAndLength;
710 }PuschTimeDomRsrcAlloc;
711
712
713 typedef struct puschConfigCommon
714 {
715    /* PUSCH-TimeDomainResourceAllocation info */
716    uint8_t                 numTimeDomRsrcAlloc;
717    PuschTimeDomRsrcAlloc   timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
718 }PuschConfigCommon;
719
720 typedef struct bwpDlConfig
721 {
722    BwpParams         bwp;
723    PdcchConfigCommon pdcchCommon;
724    PdschConfigCommon pdschCommon;
725 }BwpDlConfig;
726
727 typedef struct bwpUlConfig
728 {
729    BwpParams         bwp;
730    // rach config common sent in PrachCfg
731    PucchConfigCommon pucchCommon;
732    PuschConfigCommon puschCommon;
733 }BwpUlConfig;
734
735 #ifdef NR_DRX
736 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
737 typedef struct drxOnDurationTimer
738 {
739    bool  onDurationTimerValInMs;
740    union
741    {
742       uint8_t  subMilliSeconds;
743       uint16_t milliSeconds;
744    }onDurationtimerValue;
745 }DrxOnDurationTimer;
746
747 typedef struct drxLongCycleStartOffset
748 {
749    uint16_t drxLongCycleStartOffsetChoice;
750    uint16_t drxLongCycleStartOffsetVal;
751 }DrxLongCycleStartOffset;
752
753 typedef struct shortDrx
754 {
755    uint16_t   drxShortCycle;
756    uint8_t    drxShortCycleTimer;
757 }ShortDrx;
758
759 typedef struct drxCfg
760 {
761    DrxOnDurationTimer       drxOnDurationTimer;   
762    uint16_t                 drxInactivityTimer;
763    uint8_t                  drxHarqRttTimerDl;
764    uint8_t                  drxHarqRttTimerUl;
765    uint16_t                 drxRetransmissionTimerDl;
766    uint16_t                 drxRetransmissionTimerUl;
767    DrxLongCycleStartOffset  drxLongCycleStartOffset;
768    bool                     shortDrxPres;
769    ShortDrx                 shortDrx;
770    uint8_t                  drxSlotOffset;
771 }DrxCfg;
772 #endif
773
774 typedef struct precodingConf
775 {
776    uint16_t numLayers;
777    uint16_t numAntPorts;
778 }PrecodingConf;
779
780 typedef struct beamformingConf
781 {    
782    uint16_t numOfBeams;
783    uint16_t numTxRUs;
784    uint16_t beamIdx;
785    uint16_t beamType;
786    uint32_t beamAzimuth;
787    uint32_t beamTilt;
788    uint32_t beamHorizWidth;
789    uint32_t beamVertWidth;
790    uint32_t coverageShape;
791    uint32_t digitalTilt;
792    uint32_t digitalAzimuth;    
793 }BeamformingConf;
794
795 typedef struct macCellCfg
796 {
797    uint16_t         cellId;           /* Cell Id */
798    CarrierCfg       carrCfg;          /* Carrier configuration */
799    CellCfg          cellCfg;          /* Cell Configuration*/
800    SsbCfg           ssbCfg;           /* SSB configuration */          
801    PrachCfg         prachCfg;         /* PRACH Configuration */
802 #ifdef NR_TDD
803    TDDCfg           tddCfg;           /* TDD periodicity and slot configuration */
804 #endif
805    BwpDlConfig      initialDlBwp;     /* Initial DL BWP */
806    BwpUlConfig      initialUlBwp;     /* Initial UL BWP */
807    PrecodingConf    precodingConf;
808    BeamformingConf  beamCfg;
809 }MacCellCfg;
810
811 typedef struct macCellCfgCfm
812 {
813    uint16_t       cellId;
814    uint8_t        rsp; 
815 }MacCellCfgCfm;
816
817 typedef struct ulCcchInd
818 {
819    uint16_t cellId;
820    uint16_t crnti;
821    uint16_t ulCcchMsgLen;
822    uint8_t  *ulCcchMsg;
823 }UlCcchIndInfo;
824
825 typedef struct dlCcchInd
826 {
827    uint16_t      cellId;
828    uint16_t      crnti;
829    DlCcchMsgType msgType;
830    uint16_t      dlCcchMsgLen;
831    uint8_t       *dlCcchMsg;
832 }DlCcchIndInfo;
833
834 typedef struct bsrTmrCfg
835 {
836    uint16_t     periodicTimer;
837    uint16_t     retxTimer;
838    uint16_t     srDelayTimer;
839 }BsrTmrCfg;
840
841
842 /* Info of Scheduling Request to Add/Modify */
843 typedef struct schedReqInfo
844 {
845    uint8_t         schedReqId;
846    SrProhibitTimer srProhibitTmr;
847    SrTransMax      srTransMax;
848 }SchedReqInfo;
849
850 /* Scheduling Request Configuration */
851 typedef struct schedReqCfg
852 {
853    uint8_t       addModListCount;
854    SchedReqInfo  addModList[MAX_NUM_SR_CFG_PER_CELL_GRP];   /* List of Scheduling req to be added/modified */
855    uint8_t       relListCount;
856    uint8_t       relList[MAX_NUM_SR_CFG_PER_CELL_GRP];      /* list of scheduling request Id to be deleted */
857 }SchedReqCfg;
858
859 typedef struct tagInfo
860 {
861    uint8_t tagId;
862    TimeAlignmentTimer timeAlignTimer;
863 }TagInfo;
864
865 typedef struct tagCfg
866 {
867    uint8_t      addModListCount;
868    TagInfo      addModList[MAC_NUM_TAGS];  /* List of Tag to Add/Modify */
869    uint8_t      relListCount;
870    uint8_t      relList[MAC_NUM_TAGS];     /* list of Tag Id to release */
871 }TagCfg;
872
873 typedef struct phrCfg
874 {
875    PhrPeriodicTimer periodicTimer;
876    PhrProhibitTimer prohibitTimer; 
877    PhrTxPwrFactorChange txPowerFactor;
878    bool     multiplePHR;       
879    bool     dummy;
880    bool     phrType2OtherCell;
881    PhrModeOtherCG phrOtherCG;
882 }PhrCfg;
883
884 typedef struct macCellGrpCfg
885 {
886    SchedReqCfg schReqCfg;
887    TagCfg      tagCfg;
888    BsrTmrCfg   bsrTmrCfg;
889    bool        phrCfgSetupPres;   /* true/false: phrCfgSetup/phrCfgRelease */
890    PhrCfg      phrCfg;
891 #ifdef NR_DRX
892    bool        drxCfgPresent;
893    DrxCfg      drxCfg;
894 #endif
895 }MacCellGrpCfg;
896
897 typedef struct phyCellGrpCfg
898 {
899    PdschHarqAckCodebook  pdschHarqAckCodebook;
900    uint8_t    pNrFr1;
901 }PhyCellGrpCfg;
902
903 /* Control resource set info */
904 typedef struct controlRsrcSet
905 {
906    uint8_t     cRSetId;                /* Control resource set id */
907    uint8_t     freqDomainRsrc[FREQ_DOM_RSRC_SIZE];  /* Frequency domain resource */
908    uint8_t     duration;
909    REGMappingType cceRegMappingType;
910    PrecoderGranul precoderGranularity;
911    uint16_t    dmrsScramblingId;
912 }ControlRsrcSet;
913
914 /* Search Space info */
915 typedef struct searchSpace
916 {
917    uint8_t     searchSpaceId;
918    uint8_t     cRSetId;
919    MSlotPeriodAndOffset  mSlotPeriodicityAndOffset;
920    uint8_t     mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
921    AggrLevel   numCandidatesAggLevel1;      /* Number of candidates for aggregation level 1 */
922    AggrLevel   numCandidatesAggLevel2;      /* Number of candidates for aggregation level 2 */
923    AggrLevel   numCandidatesAggLevel4;      /* Number of candidates for aggregation level 4 */
924    AggrLevel   numCandidatesAggLevel8;      /* Number of candidates for aggregation level 8 */
925    AggrLevel   numCandidatesAggLevel16;     /* Number of candidates for aggregation level 16 */
926    SearchSpaceType searchSpaceType;
927    uint8_t     ueSpecificDciFormat;
928 }SearchSpace;
929
930 /* PDCCH cofniguration */
931 typedef struct pdcchConfig
932 {
933    uint8_t           numCRsetToAddMod;
934    ControlRsrcSet    cRSetToAddModList[MAX_NUM_CRSET];           /* List of control resource set to add/modify */
935    uint8_t           numCRsetToRel;
936    uint8_t           cRSetToRelList[MAX_NUM_CRSET];              /* List of control resource set to release */
937    uint8_t           numSearchSpcToAddMod;
938    SearchSpace       searchSpcToAddModList[MAX_NUM_SEARCH_SPC];  /* List of search space to add/modify */
939    uint8_t           numSearchSpcToRel;
940    uint8_t           searchSpcToRelList[MAX_NUM_SEARCH_SPC];     /* List of search space to release */
941 }PdcchConfig;
942
943 /* PDSCH time domain resource allocation */
944 typedef struct pdschTimeDomRsrcAlloc
945 {
946    uint8_t           *k0;
947    CommonMappingType mappingType;
948    uint8_t           startSymbol;
949    uint8_t           symbolLength;
950    uint8_t           startSymbolAndLength;
951 }PdschTimeDomRsrcAlloc;
952
953
954 typedef struct pdschBundling
955 {
956    struct staticBundling
957    {
958      BundlingSizeSet2 size;
959    }StaticBundling;
960    struct dynamicBundling
961    {
962      BundlingSizeSet1 sizeSet1;
963      BundlingSizeSet2 sizeSet2;
964    }DynamicBundling;
965 }PdschBundling;
966
967 /* DMRS downlink configuration */
968 typedef struct dmrsDlCfg
969 {
970    AddPosType  addPos;       /* DMRS additional position */
971 }DmrsDlCfg;
972
973 /* PDSCH Configuration */
974 typedef struct pdschConfig
975 {
976    DmrsDlCfg               dmrsDlCfgForPdschMapTypeA;
977    ResAllocType            resourceAllocType;
978    uint8_t                 numTimeDomRsrcAlloc;
979    PdschTimeDomRsrcAlloc   timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
980    RBGSize                 rbgSize;
981    CodeWordsSchedDci       numCodeWordsSchByDci;                    /* Number of code words scheduled by DCI */
982    BundlingType            bundlingType;
983    PdschBundling           bundlingInfo;
984 }PdschConfig;
985
986 /* Initial Downlink BWP */
987 typedef struct initialDlBwp
988 {
989    bool          pdcchPresent;
990    PdcchConfig   pdcchCfg;
991    bool          pdschPresent;
992    PdschConfig   pdschCfg;
993 }InitialDlBwp;
994
995 /* BWP Downlink common */
996 typedef struct bwpDlCommon
997 {
998 }BwpDlCommon;
999
1000 /* Downlink BWP information */
1001 typedef struct dlBwpInfo
1002 {
1003    uint8_t          bwpId;
1004 }DlBwpInfo;
1005
1006 /* PDCCH Serving Cell configuration */
1007 typedef struct pdschServCellCfg
1008 {
1009    uint8_t              *maxMimoLayers;           
1010    NumHarqProcForPdsch  numHarqProcForPdsch;
1011    MaxCodeBlkGrpPerTB   *maxCodeBlkGrpPerTb;
1012    bool                 *codeBlkGrpFlushInd;
1013    PdschXOverhead       *xOverhead;
1014 }PdschServCellCfg;
1015
1016 /* PUCCH Configuration */
1017
1018 typedef struct pucchResrcSetInfo
1019 {
1020    uint8_t resrcSetId;
1021    uint8_t resrcListCount;
1022    uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1023    uint8_t maxPayLoadSize;
1024 }PucchResrcSetInfo;
1025
1026 typedef struct pucchResrcSetCfg
1027 {
1028    uint8_t resrcSetToAddModListCount;
1029    PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1030    uint8_t resrcSetToRelListCount;
1031    uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1032 }PucchResrcSetCfg;
1033
1034 typedef struct pucchFormat0
1035 {
1036    uint8_t initialCyclicShift;
1037    uint8_t numSymbols;
1038    uint8_t startSymbolIdx;
1039 }PucchFormat0;
1040
1041 typedef struct pucchFormat1
1042 {
1043    uint8_t initialCyclicShift;
1044    uint8_t numSymbols;
1045    uint8_t startSymbolIdx;
1046    uint8_t timeDomOCC;
1047 }PucchFormat1;
1048
1049 typedef struct pucchFormat2_3
1050 {
1051    uint8_t numPrbs;
1052    uint8_t numSymbols;
1053    uint8_t startSymbolIdx;
1054 }PucchFormat2_3;
1055
1056 typedef struct pucchFormat4
1057 {
1058    uint8_t numSymbols;
1059    uint8_t occLen;
1060    uint8_t occIdx;
1061    uint8_t startSymbolIdx;
1062 }PucchFormat4;
1063
1064 typedef struct pucchResrcInfo
1065 {
1066    uint8_t  resrcId;
1067    uint16_t startPrb;
1068    uint8_t  intraFreqHop;
1069    uint16_t secondPrbHop;
1070    uint8_t  pucchFormat;
1071    union
1072    {
1073       PucchFormat0   *format0; 
1074       PucchFormat1   *format1;
1075       PucchFormat2_3 *format2;
1076       PucchFormat2_3 *format3;
1077       PucchFormat4   *format4;
1078    }PucchFormat;
1079 }PucchResrcInfo;
1080
1081 typedef struct pucchResrcCfg
1082 {
1083    uint8_t resrcToAddModListCount;
1084    PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1085    uint8_t resrcToRelListCount;
1086    uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1087 }PucchResrcCfg;
1088
1089 typedef struct pucchFormatCfg
1090 {
1091    bool interSlotFreqHop;
1092    bool addDmrs;
1093    uint8_t maxCodeRate;
1094    uint8_t numSlots;
1095    bool    pi2BPSK;
1096    bool    harqAckCSI;
1097 }PucchFormatCfg;
1098
1099 typedef struct schedReqResrcInfo
1100 {
1101    uint8_t resrcId;
1102    uint8_t requestId;
1103    uint8_t periodicity;
1104    uint16_t offset;
1105    uint8_t resrc;
1106 }SchedReqResrcInfo;
1107
1108 typedef struct pucchSchedReqCfg
1109 {
1110    uint8_t           schedAddModListCount;
1111    SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1112    uint8_t           schedRelListCount;
1113    uint8_t           schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1114 }PucchSchedReqCfg;
1115
1116 typedef struct spatialRelationInfo
1117 {
1118    uint8_t spatialRelationId;
1119    uint8_t servCellIdx;
1120    uint8_t pathLossRefRSId;
1121    uint8_t p0PucchId;
1122    uint8_t closeLoopIdx;
1123 }SpatialRelationInfo;
1124
1125 typedef struct pucchSpatialCfg
1126 {
1127    uint8_t spatialAddModListCount;
1128    SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1129    uint8_t spatialRelListCount;
1130    uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1131 }PucchSpatialCfg;
1132
1133 typedef struct p0PucchCfg
1134 {
1135    uint8_t p0PucchId;
1136    int     p0PucchVal;
1137 }P0PucchCfg;
1138
1139 typedef struct pathLossRefRSCfg
1140 {
1141    uint8_t pathLossRefRSId;
1142 }PathLossRefRSCfg;
1143
1144 typedef struct pucchMultiCsiCfg
1145 {
1146    uint8_t  multiCsiResrcListCount;
1147    uint8_t  multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1148 }PucchMultiCsiCfg;
1149
1150 typedef struct pucchDlDataToUlAck
1151 {
1152    uint8_t  dlDataToUlAckListCount;
1153    uint8_t  dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1154 }PucchDlDataToUlAck;
1155
1156 typedef struct pucchPowerControl
1157 {
1158    int deltaF_Format0;
1159    int deltaF_Format1;
1160    int deltaF_Format2;
1161    int deltaF_Format3;
1162    int deltaF_Format4;
1163    uint8_t p0SetCount;
1164    P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1165    uint8_t pathLossRefRSListCount;
1166    PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1167 }PucchPowerControl;
1168
1169 typedef struct pucchCfg
1170 {
1171    PucchResrcSetCfg  *resrcSet;
1172    PucchResrcCfg     *resrc;
1173    PucchFormatCfg    *format1; 
1174    PucchFormatCfg    *format2; 
1175    PucchFormatCfg    *format3; 
1176    PucchFormatCfg    *format4;
1177    PucchSchedReqCfg  *schedReq;
1178    PucchMultiCsiCfg  *multiCsiCfg;
1179    PucchSpatialCfg   *spatialInfo;
1180    PucchDlDataToUlAck *dlDataToUlAck;
1181    PucchPowerControl *powerControl;
1182 }PucchCfg;
1183
1184 /* Transform precoding disabled */
1185 typedef struct transPrecodDisabled
1186 {
1187    uint16_t   scramblingId0;
1188 }TransPrecodDisabled;
1189
1190 /* DMRS Uplink configuration */
1191 typedef struct dmrsUlCfg
1192 {
1193    AddPosType            addPos;               /* DMRS additional position */
1194    TransPrecodDisabled   transPrecodDisabled;  /* Transform precoding disabled */
1195 }DmrsUlCfg;
1196
1197 /* PUSCH Configuration */
1198 typedef struct puschCfg
1199 {
1200    uint8_t                 dataScramblingId;
1201    DmrsUlCfg               dmrsUlCfgForPuschMapTypeA;
1202    ResAllocType            resourceAllocType;
1203    uint8_t                 numTimeDomRsrcAlloc;
1204    PuschTimeDomRsrcAlloc   timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1205    TransformPrecoder       transformPrecoder;
1206 }PuschCfg;
1207
1208 /* Initial Uplink BWP */
1209 typedef struct initialUlBwp
1210 {
1211    bool       pucchPresent;
1212    PucchCfg   pucchCfg; 
1213    bool       puschPresent;
1214    PuschCfg   puschCfg;
1215 }InitialUlBwp;
1216
1217 /* Uplink BWP information */
1218 typedef struct ulBwpInfo
1219 {
1220    uint8_t        bwpId;
1221 }UlBwpInfo;
1222
1223 /* Serving cell configuration */
1224 typedef struct servCellCfgInfo
1225 {
1226    InitialDlBwp       initDlBwp;
1227    uint8_t            numDlBwpToAdd;
1228    DlBwpInfo          dlBwpToAddList[MAX_NUM_BWP];
1229    uint8_t            firstActvDlBwpId;
1230    uint8_t            defaultDlBwpId;
1231    uint8_t            *bwpInactivityTmr;
1232    PdschServCellCfg   pdschServCellCfg;
1233    InitialUlBwp       initUlBwp;
1234    uint8_t            numUlBwpToAdd;
1235    UlBwpInfo          ulBwpToAddList[MAX_NUM_BWP];
1236    uint8_t            firstActvUlBwpId;
1237 }ServCellCfgInfo;
1238
1239 /* Special cell configuration */
1240 typedef struct spCellCfg
1241 {
1242    uint8_t           servCellIdx;
1243    ServCellCfgInfo   servCellCfg;
1244 }SpCellCfg;
1245
1246 /* Serving cell Re-configuration */
1247 typedef struct servCellRecfgInfo
1248 {
1249    InitialDlBwp       initDlBwp;
1250    uint8_t            numDlBwpToAddOrMod;
1251    DlBwpInfo          dlBwpToAddOrModList[MAX_NUM_BWP];
1252    uint8_t            numDlBwpToRel;
1253    DlBwpInfo          dlBwpToRelList[MAX_NUM_BWP];
1254    uint8_t            firstActvDlBwpId;
1255    uint8_t            defaultDlBwpId;
1256    uint8_t            *bwpInactivityTmr;
1257    PdschServCellCfg   pdschServCellCfg;
1258    InitialUlBwp       initUlBwp;
1259    uint8_t            numUlBwpToAddOrMod;
1260    UlBwpInfo          ulBwpToAddOrModList[MAX_NUM_BWP];
1261    uint8_t            numUlBwpToRel;
1262    UlBwpInfo          ulBwpToRelList[MAX_NUM_BWP];
1263    uint8_t            firstActvUlBwpId;
1264 }ServCellRecfgInfo;
1265
1266 /* Special cell Re-configuration */
1267 typedef struct spCellRecfg 
1268 {
1269    uint8_t             servCellIdx;
1270    ServCellRecfgInfo   servCellCfg;
1271 }SpCellRecfg;
1272
1273 typedef struct ambrCfg
1274 {
1275    uint32_t ulBr;   /* UL Bit rate */
1276 }AmbrCfg;
1277
1278 typedef struct nonDynFiveQi
1279 {
1280    uint16_t   fiveQi;
1281    uint8_t    priorLevel;
1282    uint16_t   avgWindow;
1283    uint16_t   maxDataBurstVol;
1284 }NonDynFiveQi;
1285
1286 typedef struct dynFiveQi
1287 {
1288    uint8_t    priorLevel;
1289    uint16_t   packetDelayBudget;
1290    uint8_t    packetErrRateScalar;
1291    uint8_t    packetErrRateExp;
1292    uint16_t   fiveQi;
1293    uint8_t    delayCritical;
1294    uint16_t   avgWindow;
1295    uint16_t   maxDataBurstVol;
1296 }DynFiveQi;
1297
1298 typedef struct ngRanAllocAndRetPri
1299 {
1300    uint8_t priorityLevel;
1301    uint8_t preEmptionCap;
1302    uint8_t preEmptionVul;
1303 }NgRanAllocAndRetPri;
1304
1305 typedef struct grbQosInfo
1306 {
1307    uint32_t maxFlowBitRateDl;
1308    uint32_t maxFlowBitRateUl;
1309    uint32_t guarFlowBitRateDl;
1310    uint32_t guarFlowBitRateUl;
1311 }GrbQosInfo;
1312
1313 typedef struct drbQos
1314 {
1315    QosType  fiveQiType;   /* Dynamic or non-dynamic */ 
1316    union
1317    {
1318       NonDynFiveQi   nonDyn5Qi;
1319       DynFiveQi      dyn5Qi;
1320    }u;
1321    NgRanAllocAndRetPri ngRanRetPri;
1322    GrbQosInfo grbQosInfo;
1323    uint16_t             pduSessionId;
1324    uint32_t             ulPduSessAggMaxBitRate;
1325 }DrbQosInfo;
1326
1327 typedef struct ulLcCfg
1328 {
1329    uint8_t priority;
1330    uint8_t lcGroup;
1331    uint8_t schReqId;
1332    PBitRate pbr;        // prioritisedBitRate
1333    BucketSizeDur bsd;        // bucketSizeDuration
1334 }UlLcCfg;
1335
1336 typedef struct dlLcCfg
1337 {
1338    LcPriority lcp;      // logical Channel Prioritization
1339 }DlLcCfg;
1340
1341 typedef struct lcCfg
1342 {
1343    uint8_t lcId;
1344    Snssai  *snssai;
1345    DrbQosInfo *drbQos; 
1346    bool ulLcCfgPres;
1347    UlLcCfg ulLcCfg;
1348    DlLcCfg dlLcCfg;
1349 }LcCfg;
1350
1351 typedef struct modulationInfo
1352 {
1353    uint8_t     modOrder;    /* Modulation order */
1354    uint8_t     mcsIndex;    /* MCS Index */
1355    McsTable    mcsTable;    /* MCS table */
1356 }ModulationInfo;
1357
1358 typedef struct macUeCfg
1359 {
1360    uint16_t               cellId;
1361    uint8_t                ueId;
1362    uint16_t               crnti;
1363    bool                   macCellGrpCfgPres;
1364    MacCellGrpCfg          macCellGrpCfg;
1365    bool                   phyCellGrpCfgPres;
1366    PhyCellGrpCfg          phyCellGrpCfg;
1367    bool                   spCellCfgPres;
1368    SpCellCfg              spCellCfg;
1369    AmbrCfg                *ambrCfg;
1370    ModulationInfo         dlModInfo;    /* DL modulation info */ 
1371    ModulationInfo         ulModInfo;    /* UL modulation info */
1372    uint8_t                numLcs;
1373    LcCfg                  lcCfgList[MAX_NUM_LC];
1374 }MacUeCfg;
1375
1376 /* UE Re-configuration */
1377 typedef struct macUeRecfg
1378 {
1379    uint16_t        cellId;
1380    uint8_t         ueId;
1381    uint8_t         beamIdx;
1382    uint16_t        crnti;
1383    bool            macCellGrpRecfgPres;
1384    MacCellGrpCfg   macCellGrpRecfg;
1385    bool            phyCellGrpRecfgPres;
1386    PhyCellGrpCfg   phyCellGrpRecfg;
1387    bool            spCellRecfgPres;
1388    SpCellRecfg     spCellRecfg;
1389    AmbrCfg         *ambrRecfg;
1390    ModulationInfo  dlModInfo;
1391    ModulationInfo  ulModInfo;
1392    uint8_t         numLcsToAdd;
1393    LcCfg           lcCfgAdd[MAX_NUM_LC];
1394    uint8_t         numLcsToDel;
1395    uint8_t         lcIdToDel[MAX_NUM_LC];
1396    uint8_t         numLcsToMod;
1397    LcCfg           lcCfgMod[MAX_NUM_LC];
1398    DataTransmissionAction transmissionAction;
1399 #ifdef NR_DRX   
1400    bool            drxConfigIndicatorRelease;
1401 #endif
1402 }MacUeRecfg;
1403
1404 typedef struct nrcgi
1405 {
1406    Plmn      plmn;
1407    uint16_t  cellId;
1408 }Nrcgi;
1409
1410 typedef struct srbFailInfo
1411 {
1412    uint8_t       srbId;
1413    FailureCause  cause;
1414 }SRBFailInfo;
1415
1416 typedef struct drbFailInfo
1417 {
1418    uint8_t       drbId;
1419    FailureCause  cause;
1420 }DRBFailInfo;
1421
1422 typedef struct sCellFailInfo
1423 {
1424    Nrcgi         nrcgi;
1425    FailureCause  cause;
1426 }SCellFailInfo;
1427
1428 typedef struct ueCfgRsp
1429 {
1430    uint16_t       cellId;
1431    uint16_t       ueId;
1432    MacRsp         result;
1433    uint8_t        numSRBFailed;   /* valid values : 0 to MAX_NUM_SRB */ 
1434    SRBFailInfo    *failedSRBlisti;
1435    uint8_t        numDRBFailed;   /* valid values : 0 to MAX_NUM_DRB */
1436    DRBFailInfo    *failedDRBlist;
1437    uint8_t        numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1438    SCellFailInfo  *failedSCellList;
1439    uint8_t        numDRBModFailed;   /* valid values : 0 to MAX_NUM_DRB */
1440    DRBFailInfo    *failedDRBModlist;
1441 }MacUeCfgRsp;
1442
1443 typedef struct ueCfgRsp MacUeRecfgRsp;
1444
1445 typedef struct rachRsrcReq
1446 {
1447    uint16_t cellId;
1448    uint16_t ueId;
1449    uint8_t  numSsb;
1450    uint8_t  ssbIdx[MAX_NUM_SSB];
1451 }MacRachRsrcReq;
1452
1453 typedef struct macCfraSsbResource
1454 {
1455    uint8_t  ssbIdx;
1456    uint8_t  raPreambleIdx;
1457 }MacCfraSsbResource;
1458
1459 typedef struct macCfraResource
1460 {
1461    uint8_t   numSsb;
1462    MacCfraSsbResource ssbResource[MAX_NUM_SSB];
1463 }MacCfraResource;
1464
1465 typedef struct macRachRsrcRsp
1466 {
1467    uint16_t   cellId;
1468    uint16_t   ueId;
1469    MacRsp     result;
1470    uint16_t   newCrnti;     /* This parameter maps to 3GPP TS 38.331 newUE-Identity */
1471    MacCfraResource  cfraResource;
1472 }MacRachRsrcRsp;
1473
1474 typedef struct macRachRsrcRel
1475 {
1476    uint16_t cellId;
1477    uint16_t ueId;
1478    uint16_t crnti;
1479 }MacRachRsrcRel;
1480
1481 typedef struct ueDelete
1482 {
1483     uint16_t cellId;
1484     uint8_t  ueId;
1485     uint16_t crnti;
1486 }MacUeDelete;
1487
1488 typedef struct ueDeleteRsp
1489 {
1490    uint16_t cellId;
1491    uint8_t  ueId;
1492    UeDeleteStatus result;
1493 }MacUeDeleteRsp;
1494
1495 typedef struct macCellDeleteReq
1496 {
1497    uint16_t cellId;
1498 }MacCellDeleteReq;
1499
1500 typedef struct macCellDeleteRsp
1501 {
1502    uint16_t cellId;
1503    CellDeleteStatus result;
1504 }MacCellDeleteRsp;
1505
1506 typedef struct macSliceRsp
1507 {
1508    Snssai     snssai;
1509    MacRsp     rsp;
1510    RspReason  cause;  
1511 }MacSliceRsp;
1512
1513 typedef struct rrmPolicyRatio
1514 {
1515    uint8_t maxRatio;
1516    uint8_t minRatio;
1517    uint8_t dedicatedRatio;
1518 }RrmPolicyRatio;
1519
1520 typedef struct rrmPolicyMemberList
1521 {
1522    Plmn    plmn;
1523    Snssai  snssai;
1524 }RrmPolicyMemberList;
1525
1526 typedef struct macSliceRrmPolicy
1527 {
1528    ResourceType        resourceType;
1529    uint8_t             numOfRrmPolicyMem;
1530    RrmPolicyMemberList **rRMPolicyMemberList;
1531    RrmPolicyRatio      policyRatio;
1532 }MacSliceRrmPolicy;
1533
1534 typedef struct macSliceCfgReq
1535 {
1536    uint8_t           numOfRrmPolicy;
1537    MacSliceRrmPolicy **listOfRrmPolicy;
1538 }MacSliceCfgReq;
1539
1540 typedef struct macSliceCfgRsp
1541 {
1542    uint8_t      numSliceCfgRsp;
1543    MacSliceRsp  **listOfSliceCfgRsp;
1544 }MacSliceCfgRsp;
1545
1546 /*As per ORAN-WG8, Slice Cfg and ReCfg are same structures*/
1547 typedef struct macSliceCfgReq MacSliceRecfgReq;
1548 typedef struct macSliceCfgRsp MacSliceRecfgRsp;
1549
1550 typedef struct dlPcchInd
1551 {
1552    uint16_t  cellId;
1553    uint16_t  pf;
1554    uint8_t   i_s;
1555    uint16_t  pduLen;
1556    uint8_t  *pcchPdu;
1557 }DlPcchInd;
1558
1559 typedef struct cellInfo
1560 {
1561     SlotTimingInfo slotInfo;
1562     uint16_t       cellId;
1563 }CellInfo;
1564
1565 typedef struct cellInfo CellStartInfo;
1566 typedef struct cellInfo CellStopInfo;
1567
1568 /* Functions for CellUp Ind from MAC to DU APP*/
1569 typedef uint8_t (*DuMacCellUpInd) ARGS((
1570          Pst       *pst,
1571          OduCellId *cellId ));
1572
1573 /* Functions for slot Ind from MAC to DU APP*/
1574 typedef uint8_t (*DuMacSlotInd) ARGS((
1575          Pst       *pst,
1576          SlotTimingInfo *slotIndInfo));
1577
1578 /* Functions for stop Ind from MAC to DU APP*/
1579 typedef uint8_t (*DuMacStopInd) ARGS((
1580          Pst        *pst,
1581          OduCellId  *cellId ));
1582
1583 /* Functions for mac cell start req */
1584 typedef uint8_t (*DuMacCellStart) ARGS((
1585          Pst        *pst, 
1586          CellStartInfo  *cellId));
1587
1588 /* Functions for mac cell stop request */
1589 typedef uint8_t (*DuMacCellStop) ARGS((
1590          Pst        *pst,
1591          CellStopInfo  *cellId ));
1592
1593 /* Function pointers for packing macCellCfg Request and Confirm */
1594 typedef uint8_t (*packMacCellCfgReq) ARGS((
1595          Pst           *pst,
1596          MacCellCfg    *macCellCfg ));
1597
1598 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1599          Pst              *pst,
1600          MacCellCfgCfm    *macCellCfgCfm ));
1601
1602 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1603          Pst        *pst,        
1604          MacCellCfg *macCellCfg));
1605
1606 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1607          Pst        *pst,        
1608          MacCellCfgCfm *macCellCfgCfm ));
1609
1610 /* Functions for UL CCCH Ind from MAC to DU APP*/
1611 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1612          Pst           *pst,
1613          UlCcchIndInfo *ulCcchIndInfo ));
1614
1615 /* Functions for DL CCCH Ind from DU APP to MAC*/
1616 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1617          Pst           *pst,
1618          DlCcchIndInfo *dlCcchIndInfo ));
1619
1620 /* UE create Request from DU APP to MAC*/
1621 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1622          Pst           *pst,
1623          MacUeCfg      *ueCfg ));
1624
1625 /* UE create Response from MAC to DU APP */
1626 typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
1627          Pst           *pst, 
1628          MacUeCfgRsp   *cfgRsp));
1629
1630 /* UE Reconfig Request from DU APP to MAC */
1631 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1632          Pst           *pst,
1633          MacUeRecfg      *ueCfg ));
1634
1635 /* UE Reconfig Response from MAC to DU APP */
1636 typedef uint8_t (*MacDuUeRecfgRspFunc) ARGS((
1637          Pst           *pst, 
1638          MacUeRecfgRsp   *cfgRsp));
1639
1640 /* RACH Resource Request from DU APP to MAC */
1641 typedef uint8_t (*DuMacRachRsrcReq) ARGS((
1642     Pst            *pst,
1643     MacRachRsrcReq *rachRsrcReq));
1644
1645 /* RACH Resource Response from MAC to DU APP */
1646 typedef uint8_t (*MacDuRachRsrcRspFunc) ARGS((
1647     Pst            *pst,
1648     MacRachRsrcRsp *rachRsrcRsp));
1649
1650 /* RACH Resource Release from DU APP to MAC */
1651 typedef uint8_t (*DuMacRachRsrcRel) ARGS((
1652     Pst            *pst,
1653     MacRachRsrcRel *rachRsrcRel));
1654
1655 /* UE Delete Request from DU APP to MAC*/
1656 typedef uint8_t (*DuMacUeDeleteReq) ARGS((
1657      Pst           *pst,
1658      MacUeDelete   *ueDel ));
1659
1660 /* UE Delete Response from MAC to DU APP*/
1661 typedef uint8_t (*MacDuUeDeleteRspFunc) ARGS((
1662      Pst            *pst,
1663      MacUeDeleteRsp *deleteRsp));
1664
1665 /* Cell Delete Request from DU APP to MAC*/
1666 typedef uint8_t (*DuMacCellDeleteReq) ARGS((
1667      Pst           *pst,
1668      MacCellDeleteReq *cellDelete ));
1669
1670 /* Cell Delete Response from MAC to DU APP*/
1671 typedef uint8_t (*MacDuCellDeleteRspFunc) ARGS((
1672      Pst            *pst,
1673      MacCellDeleteRsp *cellDeleteRsp));
1674
1675 /* Slice Cfg Request from DU APP to MAC*/
1676 typedef uint8_t (*DuMacSliceCfgReq) ARGS((
1677      Pst           *pst,
1678      MacSliceCfgReq *CfgReq));
1679
1680 /* Slice Cfg Response from MAC to DU APP */
1681 typedef uint8_t (*MacDuSliceCfgRspFunc) ARGS((
1682          Pst           *pst, 
1683          MacSliceCfgRsp   *cfgRsp));
1684
1685 /* Slice ReReCfg Request from DU APP to MAC*/
1686 typedef uint8_t (*DuMacSliceRecfgReq) ARGS((
1687      Pst           *pst,
1688      MacSliceRecfgReq *CfgReq));
1689
1690 /* Slice ReReCfg Response from MAC to DU APP */
1691 typedef uint8_t (*MacDuSliceRecfgRspFunc) ARGS((
1692         Pst           *pst,
1693         MacSliceRecfgRsp   *cfgRsp));
1694
1695 /* Pcch indication from DU APP to MAC*/
1696 typedef uint8_t (*DuMacDlPcchInd) ARGS((
1697      Pst        *pst,
1698      DlPcchInd *pcchInd));
1699
1700 uint64_t ueBitMapPerCell[MAX_NUM_CELL]; /* Bit Map to store used/free UE-IDX per Cell */
1701
1702 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
1703 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
1704 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
1705 uint8_t packMacCellStart(Pst *pst, CellStartInfo *cellStartInfo);
1706 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
1707 uint8_t MacProcCellStart(Pst *pst, CellStartInfo *cellStartInfo);
1708 uint8_t packMacCellStop(Pst *pst, CellStopInfo *cellStopInfo);
1709 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
1710 uint8_t MacProcCellStop(Pst *pst, CellStopInfo *cellStopInfo);
1711 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1712 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func,  Pst *pst,  Buffer *mBuf);
1713 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1714 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1715 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1716 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1717 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
1718 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1719 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
1720 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1721 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1722 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1723 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1724 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1725 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1726 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1727 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1728 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1729 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1730 uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1731 uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
1732 uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1733 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
1734 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
1735 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
1736 uint8_t packDuMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp);
1737 uint8_t unpackDuMacUeRecfgRsp(MacDuUeRecfgRspFunc func, Pst *pst, Buffer *mBuf);
1738 uint8_t DuProcMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp);
1739 uint8_t packDuMacRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
1740 uint8_t unpackMacRachRsrcReq(DuMacRachRsrcReq func, Pst *pst, Buffer *mBuf);
1741 uint8_t MacProcRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
1742 uint8_t packDuMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
1743 uint8_t unpackDuMacRachRsrcRsp(MacDuRachRsrcRspFunc func, Pst *pst, Buffer *mBuf);
1744 uint8_t DuProcMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
1745 uint8_t packDuMacRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
1746 uint8_t unpackMacRachRsrcRel(DuMacRachRsrcRel func, Pst *pst, Buffer *mBuf);
1747 uint8_t MacProcRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
1748 uint8_t packDuMacUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
1749 uint8_t MacProcUeDeleteReq(Pst *pst,  MacUeDelete *ueDelete);
1750 uint8_t unpackMacUeDeleteReq(DuMacUeDeleteReq func, Pst *pst, Buffer *mBuf);
1751 uint8_t packDuMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
1752 uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
1753 uint8_t unpackDuMacUeDeleteRsp(MacDuUeDeleteRspFunc func, Pst *pst, Buffer *mBuf);
1754 uint8_t packDuMacCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete);
1755 uint8_t MacProcCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete);
1756 uint8_t unpackMacCellDeleteReq(DuMacCellDeleteReq func, Pst *pst, Buffer *mBuf);
1757 uint8_t packDuMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
1758 uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
1759 uint8_t unpackDuMacCellDeleteRsp(MacDuCellDeleteRspFunc func, Pst *pst, Buffer *mBuf);
1760 uint8_t packDuMacSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
1761 uint8_t MacProcSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
1762 uint8_t unpackMacSliceCfgReq(DuMacSliceCfgReq func, Pst *pst, Buffer *mBuf);
1763 uint8_t DuProcMacSliceCfgRsp(Pst *pst,  MacSliceCfgRsp *cfgRsp);
1764 uint8_t packDuMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
1765 uint8_t unpackDuMacSliceCfgRsp(MacDuSliceCfgRspFunc func, Pst *pst, Buffer *mBuf);
1766 uint8_t packDuMacSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq);
1767 uint8_t MacProcSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq);
1768 uint8_t unpackMacSliceRecfgReq(DuMacSliceRecfgReq func, Pst *pst, Buffer *mBuf);
1769 uint8_t DuProcMacSliceRecfgRsp(Pst *pst,  MacSliceRecfgRsp *sliceRecfgRsp);
1770 uint8_t packDuMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp);
1771 uint8_t unpackDuMacSliceRecfgRsp(MacDuSliceRecfgRspFunc func, Pst *pst, Buffer *mBuf);
1772 uint8_t duHandleSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
1773 uint8_t packMacSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
1774 uint8_t unpackDuMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
1775 uint8_t packDuMacDlPcchInd(Pst *pst, DlPcchInd *pcchInd);
1776 uint8_t MacProcDlPcchInd(Pst *pst, DlPcchInd *pcchInd);
1777 uint8_t unpackMacDlPcchInd(DuMacDlPcchInd func, Pst *pst, Buffer *mBuf);
1778 int8_t getFreeBitFromUeBitMap(uint16_t cellId);
1779 void unsetBitInUeBitMap(uint16_t cellId, uint8_t bitPos);
1780 #endif
1781
1782
1783 /**********************************************************************
1784   End of file
1785  **********************************************************************/