JIRA ID: ODUHIGH-314 : Time domain allocation for SSB in TDD mode
[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 #define SIB1_MCS  4
41
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 SD_SIZE   3                     /* Max size of Slice Differentiator in S-NSSAI */
52
53 #define MAX_NUM_SCELL  32
54
55 /* PUCCH Configuration Macro */
56 #define MAX_NUM_PUCCH_RESRC 128
57 #define MAX_NUM_PUCCH_RESRC_SET 4
58 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
59 #define MAX_NUM_SPATIAL_RELATIONS 8
60 #define MAX_NUM_PUCCH_P0_PER_SET 8
61 #define MAX_NUM_PATH_LOSS_REF_RS 4
62 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
63
64 /* Event IDs */
65 #define EVENT_MAC_CELL_CONFIG_REQ    200
66 #define EVENT_MAC_CELL_CONFIG_CFM    201
67 #define EVENT_MAC_CELL_START         202
68 #define EVENT_MAC_CELL_STOP          203
69 #define EVENT_MAC_CELL_UP_IND        204
70 #define EVENT_MAC_STOP_IND           205
71 #define EVENT_MAC_UL_CCCH_IND        206
72 #define EVENT_MAC_DL_CCCH_IND        207
73 #define EVENT_MAC_UE_CREATE_REQ      208
74 #define EVENT_MAC_UE_CREATE_RSP      209
75 #define EVENT_MAC_UE_RECONFIG_REQ    210
76 #define EVENT_MAC_UE_RECONFIG_RSP    211
77
78 #define BSR_PERIODIC_TIMER_SF_10 10
79 #define BSR_RETX_TIMER_SF_320 320
80 #define BSR_SR_DELAY_TMR_2560 2560
81
82 typedef enum
83 {
84    MAC_DU_APP_RSP_NOK,
85    MAC_DU_APP_RSP_OK
86 }MacRsp;
87
88 typedef enum
89 {
90    DUP_MODE_FDD,
91    DUP_MODE_TDD
92 }DuplexMode;
93
94 typedef enum
95 {
96    MAC_GEN_FULL_PBCH_PAYLD,   /* MAC generated the full PBCH Payload */
97    PHY_GEN_TIMING_PBCH_BIT,   /* PHY generates the timing PBCH bits */
98    PHY_GEN_FULL_PBCH_PAYLD    /* PHY generates full PBCH payload */
99 }BchPduOpt;
100
101 typedef enum
102 {
103    LONG_SEQUENCE,
104    SHORT_SEQUENCE
105 }PrachSeqLen;
106
107 typedef enum
108 {
109    UNRESTRICTED,
110    RESTRICTED_SET_TYPE_A,
111    RESTRICTED_SET_TYPE_B
112 }RstSetCfg;
113
114 typedef enum
115 {
116    DONT_REPORT_RSSI,
117    RSSI_UNIT_DBM,
118    RSSI_UNIT_DBFS
119 }RSSIMeasUnit;
120
121 typedef enum
122 {
123    BETA_PSS_0DB,
124    BETA_PSS_1DB
125 }BetaPss;
126
127 typedef enum 
128 {
129    SSB_PRDCTY_MS_5,
130    SSB_PRDCTY_MS_10,
131    SSB_PRDCTY_MS_20,
132    SSB_PRDCTY_MS_40,
133    SSB_PRDCTY_MS_80,
134    SSB_PRDCTY_MS_160
135 }SSBPeriod;
136
137 typedef enum
138 {
139    RRC_REJECT,
140    RRC_SETUP
141 }DlCcchMsgType;
142
143 /* Enums for Ue Create Request */
144
145 /* SR PROHIBIT TIMER */
146 typedef enum
147 {
148    SR_PROHIBIT_MS_1,
149    SR_PROHIBIT_MS_2,
150    SR_PROHIBIT_MS_4,
151    SR_PROHIBIT_MS_8,
152    SR_PROHIBIT_MS_16,
153    SR_PROHIBIT_MS_32,
154    SR_PROHIBIT_MS_64,
155    SR_PROHIBIT_MS_128
156 }SrProhibitTimer;
157
158 typedef enum
159 {
160    SR_TRANS_MAX_N_4,
161    SR_TRANS_MAX_N_8,
162    SR_TRANS_MAX_N_16,
163    SR_TRANS_MAX_N_32,
164    SR_TRANS_MAX_N_64,
165    SR_TRANS_MAX_spare3,
166    SR_TRANS_MAX_spare2,
167    SR_TRANS_MAX_spare1
168 }SrTransMax;
169
170 typedef enum
171 {
172    TIME_ALIGNMENT_TIMER_MS_500,
173    TIME_ALIGNMENT_TIMER_MS_750,
174    TIME_ALIGNMENT_TIMER_MS_1280,
175    TIME_ALIGNMENT_TIMER_MS_1920,
176    TIME_ALIGNMENT_TIMER_MS_2560,
177    TIME_ALIGNMENT_TIMER_MS_5120,
178    TIME_ALIGNMENT_TIMER_MS_10240,
179    TIME_ALIGNMENT_TIMER_INFINITY
180 }TimeAlignmentTimer;
181
182 typedef enum
183 {
184    PHR_PERIODIC_TIMER_SF_10,
185    PHR_PERIODIC_TIMER_SF_20,
186    PHR_PERIODIC_TIMER_SF_50,
187    PHR_PERIODIC_TIMER_SF_100,
188    PHR_PERIODIC_TIMER_SF_200,
189    PHR_PERIODIC_TIMER_SF_500,
190    PHR_PERIODIC_TIMER_SF_1000,
191    PHR_PERIODIC_TIMER_INFINITY
192 }PhrPeriodicTimer;
193
194 typedef enum
195 {
196    PHR_PROHIBIT_TIMER_SF_0,
197    PHR_PROHIBIT_TIMER_SF_10,
198    PHR_PROHIBIT_TIMER_SF_20,
199    PHR_PROHIBIT_TIMER_SF_50,
200    PHR_PROHIBIT_TIMER_SF_100,
201    PHR_PROHIBIT_TIMER_SF_200,
202    PHR_PROHIBIT_TIMER_SF_500,
203    PHR_PROHIBIT_TIMER_SF_1000
204 }PhrProhibitTimer;
205
206 typedef enum
207 {
208    PHR_TX_PWR_FACTOR_CHANGE_DB_1,
209    PHR_TX_PWR_FACTOR_CHANGE_DB_3,
210    PHR_TX_PWR_FACTOR_CHANGE_DB_6,
211    PHR_TX_PWR_FACTOR_CHANGE_INFINITY
212 }PhrTxPwrFactorChange;
213
214 typedef enum
215 {
216    PHR_MODE_OTHER_CG_REAL,
217    PHR_MODE_OTHER_CG_VIRTUAL
218 }PhrModeOtherCG;
219
220 typedef enum
221 {
222    PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
223    PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
224 }PdschHarqAckCodebook;
225
226 typedef enum
227 {
228    NUM_HARQ_PROC_FOR_PDSCH_N_2,
229    NUM_HARQ_PROC_FOR_PDSCH_N_4,
230    NUM_HARQ_PROC_FOR_PDSCH_N_6,
231    NUM_HARQ_PROC_FOR_PDSCH_N_10,
232    NUM_HARQ_PROC_FOR_PDSCH_N_16
233 }NumHarqProcForPdsch;
234
235 typedef enum
236 {
237    MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
238    MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
239    MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
240    MAX_CODE_BLOCK_GROUP_PER_TB_N_8
241 }MaxCodeBlkGrpPerTB;
242
243 typedef enum
244 {
245    PDSCH_X_OVERHEAD_6,
246    PDSCH_X_OVERHEAD_12,
247    PDSCH_X_OVERHEAD_18
248 }PdschXOverhead;
249
250 typedef enum
251 {
252    TRANSFORM_PRECODER_ENABLED,
253    TRANSFORM_PRECODER_DISABLED
254 }TransformPrecoder;
255
256 typedef enum 
257 {
258    CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
259    CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
260 }REGMappingType;
261
262 typedef enum
263 {
264    SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
265    SLOTPERIODICITYANDOFFSET_PR_SL2,
266    SLOTPERIODICITYANDOFFSET_PR_SL4,
267    SLOTPERIODICITYANDOFFSET_PR_SL5,
268    SLOTPERIODICITYANDOFFSET_PR_SL8,
269    SLOTPERIODICITYANDOFFSET_PR_SL10,
270    SLOTPERIODICITYANDOFFSET_PR_SL16,
271    SLOTPERIODICITYANDOFFSET_PR_SL20,
272    SLOTPERIODICITYANDOFFSET_PR_SL40,
273    SLOTPERIODICITYANDOFFSET_PR_SL80,
274    SLOTPERIODICITYANDOFFSET_PR_SL160,
275    SLOTPERIODICITYANDOFFSET_PR_SL320,
276    SLOTPERIODICITYANDOFFSET_PR_SL640,
277    SLOTPERIODICITYANDOFFSET_PR_SL1280,
278    SLOTPERIODICITYANDOFFSET_PR_SL2560
279 }MSlotPeriodAndOffset;
280
281 typedef enum
282 {
283    SAMEASREG_BUNDLE,
284    ALL_CONTIGUOUS_RBS
285 }PrecoderGranul;
286
287 typedef enum
288 {
289    SEARCHSPACETYPE_PR_COMMON = 1,
290    SEARCHSPACETYPE_PR_UE_SPECIFIC
291 }SearchSpaceType;
292
293 typedef enum
294 {
295    QOS_NON_DYNAMIC = 1,
296    QOS_DYNAMIC
297 }QosType;
298
299 typedef enum
300 {
301    AGGREGATIONLEVEL_N0  = 0,  
302    AGGREGATIONLEVEL_N1  = 1,
303    AGGREGATIONLEVEL_N2  = 2,
304    AGGREGATIONLEVEL_N3  = 3,
305    AGGREGATIONLEVEL_N4  = 4,
306    AGGREGATIONLEVEL_N5  = 5,
307    AGGREGATIONLEVEL_N6  = 6,
308    AGGREGATIONLEVEL_N8  = 7
309 }AggrLevel;
310
311 typedef enum
312 {
313    ADDITIONALPOSITION_POS0,
314    ADDITIONALPOSITION_POS1,
315    ADDITIONALPOSITION_POS3
316 }AddPosType;
317
318 typedef enum
319 {
320    MAPPING_TYPEA,
321    MAPPING_TYPEB
322 }CommonMappingType;
323
324 typedef enum
325 {
326    RESOURCEALLOCATION_TYPE0,
327    RESOURCEALLOCATION_TYPE1,
328    RESOURCEALLOCATION_DYNAMICSWITCH
329 }ResAllocType;
330
331 typedef enum
332 {
333    RBG_SIZE_CONFIG1,
334    RBG_SIZE_CONFIG2
335 }RBGSize;
336
337 typedef enum
338 {
339    CODEWORDS_SCHED_BY_DCI_N1,
340    CODEWORDS_SCHED_BY_DCI_N2
341 }CodeWordsSchedDci;
342
343 typedef enum
344 {
345    TYPE_STATIC_BUNDLING = 1,
346    TYPE_DYNAMIC_BUNDLING
347 }BundlingType;
348
349 typedef enum
350 {
351    SET2_SIZE_N4,
352    SET2_SIZE_WIDEBAND
353 }BundlingSizeSet2;
354
355 typedef enum
356 {
357    SET1_SIZE_N4,
358    SET1_SIZE_WIDEBAND,
359    SET1_SIZE_N2_WIDEBAND,
360    SET1_SIZE_N4_WIDEBAND
361 }BundlingSizeSet1;
362
363 typedef enum
364 {
365    LC_PRIORITY_1 = 1,
366    LC_PRIORITY_2,
367    LC_PRIORITY_3
368 }LcPriority;
369
370 typedef enum
371 {
372   PBR_KBPS_0,
373   PBR_KBPS_8,
374   PBR_KBPS_16,
375   PBR_KBPS_32,
376   PBR_KBPS_64,
377   PBR_KBPS_128,
378   PBR_KBPS_256,
379   PBR_KBPS_512,
380   PBR_KBPS_1024,
381   PBR_KBPS_2048,
382   PBR_KBPS_4096,
383   PBR_KBPS_8192,
384   PBR_KBPS_16384,
385   PBR_KBPS_32768,
386   PBR_KBPS_65536,
387   PBR_KBPS_INFINITY
388 }PBitRate;
389
390 typedef enum
391 {
392    BSD_MS_5,
393    BSD_MS_10,
394    BSD_MS_20,
395    BSD_MS_50,
396    BSD_MS_100,
397    BSD_MS_150,
398    BSD_MS_300,
399    BSD_MS_500,
400    BSD_MS_1000,
401    BSD_SPARE_7,
402    BSD_SPARE_6,
403    BSD_SPARE_5,
404    BSD_SPARE_4,
405    BSD_SPARE_3,
406    BSD_SPARE_2,
407    BSD_SPARE_1
408
409 }BucketSizeDur;
410
411 typedef enum
412 {
413    RADIO_NW_LAYER_FAIL,
414    TRANSPORT_LAYER_FAIL,
415    PROTOCOL_FAIL,
416    MISCELLANEOUS
417 }CauseGrp;
418
419 typedef enum
420 {
421    UNSPECIFIED_RADIO_NW_CAUSE,
422    RL_FAIL_RLC,
423    UNKNOWN_GNB_CU_UE_F1AP_ID,
424    ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
425    UNKNOWN_GNB_DU_UE_F1AP_ID,
426    ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
427    UNKNOWN_UE_F1AP_ID_PAIR,
428    INCONSISTENT_UE_F1AP_ID_PAIR,
429    INTERACTION_WITH_OTHER_PROCEDURE,
430    UNSUPPORTED_QCI,
431    ACTION_REQUIRED_FOR_RADIO_REASONS,
432    RADIO_RESOURCES_UNAVAILABLE,
433    CANCELLED_PROCEDURE,
434    RELEASE_NORMAL,
435    CELL_UNAVAILABLE,
436    OTHER_RL_FAILURE,
437    UE_REJECTION,
438    RESOURCES_UNAVAILABLE_FOR_SLICE
439 }RadioNwLyrCause;
440
441 typedef enum
442 {
443    UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
444    TRANSPORT_RESOURCE_UNAVAILABLE
445 }TransLyrCause;
446
447 typedef enum
448 {
449    TRANSFER_SYNTAX_ERROR,
450    ABSTRACT_SYNTAX_ERROR_REJECT,
451    ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
452    INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
453    SEMANTIC_ERR,
454    ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
455    UNSPECIFIED_PROTOCOL_CAUSE
456 }ProtCause;
457
458 typedef enum
459 {
460    CONTROL_PROCESSING_OVERLOAD,
461    NOT_ENOUGH_USER,
462    PLANE_PROCESSING_RESOURCES,
463    HARDWARE_FAIL,
464    INTERVENTION_BY_O_AND_M,
465    UNSPECIFIED_MISC_CAUSE
466 }MiscFailCause;
467
468 typedef enum
469 {
470    MCS_TABLE_QAM64,
471    MCS_TABLE_QAM256,
472    MCS_TABLE_QAM64_LOW_SE
473 }McsTable;
474
475 typedef struct failureCause
476 {
477    CauseGrp   type;
478    union
479    {
480       RadioNwLyrCause   radioNwCause;
481       TransLyrCause     transportCause;
482       ProtCause         protcolCause;
483       MiscFailCause     miscCause;
484    }u;
485 }FailureCause;
486
487 typedef struct carrierCfg
488 {
489    bool  pres;
490    uint32_t   bw;             /* DL/UL bandwidth */
491    uint32_t   freq;           /* Absolute frequency of DL/UL point A in KHz */
492    uint16_t   k0[NUM_NUMEROLOGY];          /* K0 for DL/UL */
493    uint16_t   gridSize[NUM_NUMEROLOGY];    /* DL/UL Grid size for each numerologies */
494    uint16_t   numAnt;         /* Number of Tx/Rx antennas */
495 }CarrierCfg;
496
497 typedef struct ssbCfg
498 {
499    uint32_t    ssbPbchPwr;       /* SSB block power */
500    BchPduOpt   bchPayloadFlag;   /* Options for generation of payload */
501    uint8_t     scsCmn;           /* subcarrier spacing for common */
502    uint16_t    ssbOffsetPointA;  /* SSB subcarrier offset from point A */
503    BetaPss     betaPss;
504    SSBPeriod   ssbPeriod;        /* SSB Periodicity in msec */
505    uint8_t     ssbScOffset;       /* Subcarrier Offset */
506    uint8_t     mibPdu[3];           /* MIB payload */
507    uint32_t    ssbMask[SSB_MASK_SIZE];      /* Bitmap for actually transmitted SSB. */
508    uint8_t     beamId[NUM_SSB];
509    bool        multCarrBand;     /* Multiple carriers in a band */
510    bool        multCellCarr;     /* Multiple cells in single carrier */
511 }SsbCfg;
512
513 typedef struct fdmInfo
514 {
515    uint16_t   rootSeqIdx;        /* Root sequence index */
516    uint8_t    numRootSeq;        /* Number of root sequences required for FD */
517    uint16_t   k1;                /* Frequency Offset for each FD */
518    uint8_t    zeroCorrZoneCfg;   /* Zero correlation zone cofig */
519    uint8_t    numUnusedRootSeq;  /* Number of unused root sequence */
520    uint8_t    *unsuedRootSeq;     /* Unused root sequence per FD */
521 }PrachFdmInfo;
522
523 typedef struct prachCfg
524 {
525    bool          pres;
526    uint8_t       prachCfgIdx;         /* PRACH Cfg Index */
527    PrachSeqLen   prachSeqLen;         /* RACH Sequence length: Long/short */
528    uint8_t       prachSubcSpacing;    /* Subcarrier spacing of RACH */
529    RstSetCfg     prachRstSetCfg;      /* PRACH restricted set config */
530    uint16_t      msg1FreqStart;       /* Msg1-FrequencyStart */
531    uint8_t       msg1Fdm;             /* PRACH FDM (1,2,4,8) */
532    uint8_t       rootSeqLen;          /* Root sequence length */
533    PrachFdmInfo  fdm[8];              /* FDM info */
534    uint8_t       ssbPerRach;          /* SSB per RACH occassion */
535    bool          prachMultCarrBand;   /* Multiple carriers in Band */
536    uint8_t       prachRestrictedSet; /* Support for PRACH restricted set */
537    uint8_t       raContResTmr;        /* RA Contention Resoultion Timer */
538    uint8_t       rsrpThreshSsb;       /* RSRP Threshold SSB */
539    uint8_t       raRspWindow;         /* RA Response Window */
540 }PrachCfg;
541
542 typedef struct sib1CellCfg
543 {
544    uint8_t  *sib1Pdu;
545    uint16_t sib1PduLen;
546    uint16_t sib1RepetitionPeriod;
547    uint8_t coresetZeroIndex;     /* derived from 4 LSB of pdcchSib1 present in MIB */
548    uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
549    uint16_t sib1Mcs;
550 } Sib1CellCfg; 
551
552 typedef struct bwpParams
553 {
554    uint16_t firstPrb;
555    uint16_t numPrb;
556    uint8_t  scs;
557    uint8_t  cyclicPrefix;
558 }BwpParams;
559
560 typedef struct candidatesInfo
561 {
562    uint8_t aggLevel1;
563    uint8_t aggLevel2;
564    uint8_t aggLevel4;
565    uint8_t aggLevel8;
566    uint8_t aggLevel16;
567 }CandidatesInfo;
568
569 typedef struct searchSpaceCfg
570 {
571    uint8_t searchSpaceId;
572    uint8_t coresetId;
573    uint16_t monitoringSlot;
574    uint16_t duration;
575    uint16_t monitoringSymbol;
576    CandidatesInfo candidate;
577 }SearchSpaceCfg;
578
579 typedef struct pdcchConfigCommon
580 {
581    /* only one search space is configured during SIB1 */
582    SearchSpaceCfg commonSearchSpace;
583    uint8_t raSearchSpaceId;
584 }PdcchConfigCommon;
585
586 typedef struct pdschConfigCommon
587 {
588    uint8_t k0;
589    uint8_t mappingType;
590    uint8_t startSymbol;
591    uint8_t lengthSymbol;
592 }PdschConfigCommon;
593
594 typedef struct pucchConfigCommon
595 {
596    uint8_t pucchResourceCommon;
597    uint8_t pucchGroupHopping;
598 }PucchConfigCommon;
599
600 typedef struct puschConfigCommon
601 {
602    /* PUSCH-TimeDomainResourceAllocation info */
603    uint8_t k2;
604    uint8_t mappingType;
605    uint8_t startSymbol;
606    uint8_t lengthSymbol;
607 }PuschConfigCommon;
608
609 typedef struct bwpDlConfig
610 {
611    BwpParams      bwp;
612    PdcchConfigCommon pdcchCommon;
613    PdschConfigCommon pdschCommon;
614 }BwpDlConfig;
615
616 typedef struct bwpUlConfig
617 {
618    BwpParams      bwp;
619    // rach config common sent in PrachCfg
620    PucchConfigCommon pucchCommon;
621    PuschConfigCommon puschCommon;
622 }BwpUlConfig;
623
624 typedef struct macCellCfg
625 {
626    uint16_t       cellId;           /* Cell Id */
627    uint8_t        carrierId;        /* Carrired Index */
628    uint16_t       phyCellId;        /* Physical cell id */
629    uint8_t        numerology;       /* Supported numerology */
630    DuplexMode     dupType;          /* Duplex type: TDD/FDD */
631    CarrierCfg     dlCarrCfg;        /* DL Carrier configuration */
632    CarrierCfg     ulCarrCfg;        /* UL Carrier configuration */
633    bool           freqShft;         /* Indicates presence of 7.5kHz frequency shift */
634    SsbCfg         ssbCfg;           /* SSB configuration */          
635    PrachCfg       prachCfg;         /* PRACH Configuration */
636 #ifdef NR_TDD
637    TDDCfg         tddCfg;           /* TDD periodicity and slot configuration */
638 #endif
639    RSSIMeasUnit   rssiUnit;         /* RSSI measurement unit */
640    Sib1CellCfg    sib1Cfg;          /* SIB1 config */
641    BwpDlConfig    initialDlBwp;     /* Initial DL BWP */
642    BwpUlConfig    initialUlBwp;     /* Initial UL BWP */
643    uint8_t        dmrsTypeAPos;     /* DMRS Type A position */
644 }MacCellCfg;
645
646 typedef struct macCellCfgCfm
647 {
648    uint16_t       cellId;
649    uint8_t        rsp; 
650 }MacCellCfgCfm;
651
652 typedef struct ulCcchInd
653 {
654    uint16_t cellId;
655    uint16_t crnti;
656    uint16_t ulCcchMsgLen;
657    uint8_t  *ulCcchMsg;
658 }UlCcchIndInfo;
659
660 typedef struct dlCcchInd
661 {
662    uint16_t      cellId;
663    uint16_t      crnti;
664    DlCcchMsgType msgType;
665    uint16_t      dlCcchMsgLen;
666    uint8_t       *dlCcchMsg;
667 }DlCcchIndInfo;
668
669 typedef struct bsrTmrCfg
670 {
671    uint16_t     periodicTimer;
672    uint16_t     retxTimer;
673    uint16_t     srDelayTimer;
674 }BsrTmrCfg;
675
676
677 /* Info of Scheduling Request to Add/Modify */
678 typedef struct schedReqInfo
679 {
680    uint8_t         schedReqId;
681    SrProhibitTimer srProhibitTmr;
682    SrTransMax      srTransMax;
683 }SchedReqInfo;
684
685 /* Scheduling Request Configuration */
686 typedef struct schedReqCfg
687 {
688    uint8_t       addModListCount;
689    SchedReqInfo  addModList[MAX_NUM_SR_CFG_PER_CELL_GRP];   /* List of Scheduling req to be added/modified */
690    uint8_t       relListCount;
691    uint8_t       relList[MAX_NUM_SR_CFG_PER_CELL_GRP];      /* list of scheduling request Id to be deleted */
692 }SchedReqCfg;
693
694 typedef struct tagInfo
695 {
696    uint8_t tagId;
697    TimeAlignmentTimer timeAlignTimer;
698 }TagInfo;
699
700 typedef struct tagCfg
701 {
702    uint8_t      addModListCount;
703    TagInfo      addModList[MAC_NUM_TAGS];  /* List of Tag to Add/Modify */
704    uint8_t      relListCount;
705    uint8_t      relList[MAC_NUM_TAGS];     /* list of Tag Id to release */
706 }TagCfg;
707
708 typedef struct phrCfg
709 {
710    PhrPeriodicTimer periodicTimer;
711    PhrProhibitTimer prohibitTimer; 
712    PhrTxPwrFactorChange txPowerFactor;
713    bool     multiplePHR;       
714    bool     dummy;
715    bool     phrType2OtherCell;
716    PhrModeOtherCG phrOtherCG;
717 }PhrCfg;
718
719 typedef struct macCellGrpCfg
720 {
721    SchedReqCfg schReqCfg;
722    TagCfg      tagCfg;
723    BsrTmrCfg   bsrTmrCfg;
724    bool        phrCfgSetupPres;   /* true/false: phrCfgSetup/phrCfgRelease */
725    PhrCfg      phrCfg;
726 }MacCellGrpCfg;
727
728 typedef struct phyCellGrpCfg
729 {
730    PdschHarqAckCodebook  pdschHarqAckCodebook;
731    uint8_t    pNrFr1;
732 }PhyCellGrpCfg;
733
734 /* Control resource set info */
735 typedef struct controlRsrcSet
736 {
737    uint8_t     cRSetId;                /* Control resource set id */
738    uint8_t     freqDomainRsrc[FREQ_DOM_RSRC_SIZE];  /* Frequency domain resource */
739    uint8_t     duration;
740    REGMappingType cceRegMappingType;
741    PrecoderGranul precoderGranularity;
742    uint16_t    dmrsScramblingId;
743 }ControlRsrcSet;
744
745 /* Search Space info */
746 typedef struct searchSpace
747 {
748    uint8_t     searchSpaceId;
749    uint8_t     cRSetId;
750    MSlotPeriodAndOffset  mSlotPeriodicityAndOffset;
751    uint8_t     mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
752    AggrLevel   numCandidatesAggLevel1;      /* Number of candidates for aggregation level 1 */
753    AggrLevel   numCandidatesAggLevel2;      /* Number of candidates for aggregation level 2 */
754    AggrLevel   numCandidatesAggLevel4;      /* Number of candidates for aggregation level 4 */
755    AggrLevel   numCandidatesAggLevel8;      /* Number of candidates for aggregation level 8 */
756    AggrLevel   numCandidatesAggLevel16;     /* Number of candidates for aggregation level 16 */
757    SearchSpaceType searchSpaceType;
758    uint8_t     ueSpecificDciFormat;
759 }SearchSpace;
760
761 /* PDCCH cofniguration */
762 typedef struct pdcchConfig
763 {
764    uint8_t           numCRsetToAddMod;
765    ControlRsrcSet    cRSetToAddModList[MAX_NUM_CRSET];           /* List of control resource set to add/modify */
766    uint8_t           numCRsetToRel;
767    uint8_t           cRSetToRelList[MAX_NUM_CRSET];              /* List of control resource set to release */
768    uint8_t           numSearchSpcToAddMod;
769    SearchSpace       searchSpcToAddModList[MAX_NUM_SEARCH_SPC];  /* List of search space to add/modify */
770    uint8_t           numSearchSpcToRel;
771    uint8_t           searchSpcToRelList[MAX_NUM_SEARCH_SPC];     /* List of search space to release */
772 }PdcchConfig;
773
774 /* PDSCH time domain resource allocation */
775 typedef struct pdschTimeDomRsrcAlloc
776 {
777    CommonMappingType mappingType;
778    uint8_t           startSymbol;
779    uint8_t           symbolLength;
780    uint8_t           startSymbolAndLength;
781 }PdschTimeDomRsrcAlloc;
782
783
784 typedef struct pdschBundling
785 {
786    struct staticBundling
787    {
788      BundlingSizeSet2 size;
789    }StaticBundling;
790    struct dynamicBundling
791    {
792      BundlingSizeSet1 sizeSet1;
793      BundlingSizeSet2 sizeSet2;
794    }DynamicBundling;
795 }PdschBundling;
796
797 /* DMRS downlink configuration */
798 typedef struct dmrsDlCfg
799 {
800    AddPosType  addPos;       /* DMRS additional position */
801 }DmrsDlCfg;
802
803 /* PDSCH Configuration */
804 typedef struct pdschConfig
805 {
806    DmrsDlCfg               dmrsDlCfgForPdschMapTypeA;
807    ResAllocType            resourceAllocType;
808    uint8_t                 numTimeDomRsrcAlloc;
809    PdschTimeDomRsrcAlloc   timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
810    RBGSize                 rbgSize;
811    CodeWordsSchedDci       numCodeWordsSchByDci;                    /* Number of code words scheduled by DCI */
812    BundlingType            bundlingType;
813    PdschBundling           bundlingInfo;
814 }PdschConfig;
815
816 /* Initial Downlink BWP */
817 typedef struct initialDlBwp
818 {
819    bool          pdcchPresent;
820    PdcchConfig   pdcchCfg;
821    bool          pdschPresent;
822    PdschConfig   pdschCfg;
823 }InitialDlBwp;
824
825 /* BWP Downlink common */
826 typedef struct bwpDlCommon
827 {
828 }BwpDlCommon;
829
830 /* Downlink BWP information */
831 typedef struct dlBwpInfo
832 {
833    uint8_t          bwpId;
834 }DlBwpInfo;
835
836 /* PDCCH Serving Cell configuration */
837 typedef struct pdschServCellCfg
838 {
839    uint8_t              *maxMimoLayers;           
840    NumHarqProcForPdsch  numHarqProcForPdsch;
841    MaxCodeBlkGrpPerTB   *maxCodeBlkGrpPerTb;
842    bool                 *codeBlkGrpFlushInd;
843    PdschXOverhead       *xOverhead;
844 }PdschServCellCfg;
845
846 /* PUCCH Configuration */
847
848 typedef struct pucchResrcSetInfo
849 {
850    uint8_t resrcSetId;
851    uint8_t resrcListCount;
852    uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
853    uint8_t maxPayLoadSize;
854 }PucchResrcSetInfo;
855
856 typedef struct pucchResrcSetCfg
857 {
858    uint8_t resrcSetToAddModListCount;
859    PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
860    uint8_t resrcSetToRelListCount;
861    uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
862 }PucchResrcSetCfg;
863
864 typedef struct pucchFormat0
865 {
866    uint8_t initialCyclicShift;
867    uint8_t numSymbols;
868    uint8_t startSymbolIdx;
869 }PucchFormat0;
870
871 typedef struct pucchFormat1
872 {
873    uint8_t initialCyclicShift;
874    uint8_t numSymbols;
875    uint8_t startSymbolIdx;
876    uint8_t timeDomOCC;
877 }PucchFormat1;
878
879 typedef struct pucchFormat2_3
880 {
881    uint8_t numPrbs;
882    uint8_t numSymbols;
883    uint8_t startSymbolIdx;
884 }PucchFormat2_3;
885
886 typedef struct pucchFormat4
887 {
888    uint8_t numSymbols;
889    uint8_t occLen;
890    uint8_t occIdx;
891    uint8_t startSymbolIdx;
892 }PucchFormat4;
893
894 typedef struct pucchResrcInfo
895 {
896    uint8_t  resrcId;
897    uint16_t startPrb;
898    uint8_t  intraFreqHop;
899    uint16_t secondPrbHop;
900    uint8_t  pucchFormat;
901    union
902    {
903       PucchFormat0   *format0; 
904       PucchFormat1   *format1;
905       PucchFormat2_3 *format2;
906       PucchFormat2_3 *format3;
907       PucchFormat4   *format4;
908    }PucchFormat;
909 }PucchResrcInfo;
910
911 typedef struct pucchResrcCfg
912 {
913    uint8_t resrcToAddModListCount;
914    PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
915    uint8_t resrcToRelListCount;
916    uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
917 }PucchResrcCfg;
918
919 typedef struct pucchFormatCfg
920 {
921    uint8_t interSlotFreqHop;
922    uint8_t addDmrs;
923    uint8_t maxCodeRate;
924    uint8_t numSlots;
925    bool    pi2BPSK;
926    bool    harqAckCSI;
927 }PucchFormatCfg;
928
929 typedef struct schedReqResrcInfo
930 {
931    uint8_t resrcId;
932    uint8_t requestId;
933    uint8_t periodicity;
934    uint16_t offset;
935    uint8_t resrc;
936 }SchedReqResrcInfo;
937
938 typedef struct pucchSchedReqCfg
939 {
940    uint8_t           schedAddModListCount;
941    SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
942    uint8_t           schedRelListCount;
943    uint8_t           schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
944 }PucchSchedReqCfg;
945
946 typedef struct spatialRelationInfo
947 {
948    uint8_t spatialRelationId;
949    uint8_t servCellIdx;
950    uint8_t pathLossRefRSId;
951    uint8_t p0PucchId;
952    uint8_t closeLoopIdx;
953 }SpatialRelationInfo;
954
955 typedef struct pucchSpatialCfg
956 {
957    uint8_t spatialAddModListCount;
958    SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
959    uint8_t spatialRelListCount;
960    uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
961 }PucchSpatialCfg;
962
963 typedef struct p0PucchCfg
964 {
965    uint8_t p0PucchId;
966    int     p0PucchVal;
967 }P0PucchCfg;
968
969 typedef struct pathLossRefRSCfg
970 {
971    uint8_t pathLossRefRSId;
972 }PathLossRefRSCfg;
973
974 typedef struct pucchMultiCsiCfg
975 {
976    uint8_t  multiCsiResrcListCount;
977    uint8_t  multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
978 }PucchMultiCsiCfg;
979
980 typedef struct pucchDlDataToUlAck
981 {
982    uint8_t  dlDataToUlAckListCount;
983    uint8_t  dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
984 }PucchDlDataToUlAck;
985
986 typedef struct pucchPowerControl
987 {
988    int deltaF_Format0;
989    int deltaF_Format1;
990    int deltaF_Format2;
991    int deltaF_Format3;
992    int deltaF_Format4;
993    uint8_t p0SetCount;
994    P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
995    uint8_t pathLossRefRSListCount;
996    PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
997 }PucchPowerControl;
998
999 typedef struct pucchCfg
1000 {
1001    PucchResrcSetCfg  *resrcSet;
1002    PucchResrcCfg     *resrc;
1003    PucchFormatCfg    *format1; 
1004    PucchFormatCfg    *format2; 
1005    PucchFormatCfg    *format3; 
1006    PucchFormatCfg    *format4;
1007    PucchSchedReqCfg  *schedReq;
1008    PucchMultiCsiCfg  *multiCsiCfg;
1009    PucchSpatialCfg   *spatialInfo;
1010    PucchDlDataToUlAck *dlDataToUlAck;
1011    PucchPowerControl *powerControl;
1012 }PucchCfg;
1013
1014 /* Transform precoding disabled */
1015 typedef struct transPrecodDisabled
1016 {
1017    uint16_t   scramblingId0;
1018 }TransPrecodDisabled;
1019
1020 /* DMRS Uplink configuration */
1021 typedef struct dmrsUlCfg
1022 {
1023    AddPosType            addPos;               /* DMRS additional position */
1024    TransPrecodDisabled   transPrecodDisabled;  /* Transform precoding disabled */
1025 }DmrsUlCfg;
1026
1027 /* PUSCH Time Domain Resource Allocation */
1028 typedef struct puschTimeDomRsrcAlloc
1029 {
1030    uint8_t   k2;
1031    CommonMappingType   mappingType;
1032    uint8_t           startSymbol;
1033    uint8_t           symbolLength;
1034    uint8_t   startSymbolAndLength;
1035 }PuschTimeDomRsrcAlloc;
1036
1037 /* PUSCH Configuration */
1038 typedef struct puschCfg
1039 {
1040    uint8_t                 dataScramblingId;
1041    DmrsUlCfg               dmrsUlCfgForPuschMapTypeA;
1042    ResAllocType            resourceAllocType;
1043    uint8_t                 numTimeDomRsrcAlloc;
1044    PuschTimeDomRsrcAlloc   timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1045    TransformPrecoder       transformPrecoder;
1046 }PuschCfg;
1047
1048 /* Initial Uplink BWP */
1049 typedef struct initialUlBwp
1050 {
1051    bool       pucchPresent;
1052    PucchCfg   pucchCfg; 
1053    bool       puschPresent;
1054    PuschCfg   puschCfg;
1055 }InitialUlBwp;
1056
1057 /* Uplink BWP information */
1058 typedef struct ulBwpInfo
1059 {
1060    uint8_t        bwpId;
1061 }UlBwpInfo;
1062
1063 /* Serving cell configuration */
1064 typedef struct servCellCfgInfo
1065 {
1066    InitialDlBwp       initDlBwp;
1067    uint8_t            numDlBwpToAdd;
1068    DlBwpInfo          DlBwpToAddList[MAX_NUM_BWP];
1069    uint8_t            firstActvDlBwpId;
1070    uint8_t            defaultDlBwpId;
1071    uint8_t            *bwpInactivityTmr;
1072    PdschServCellCfg   pdschServCellCfg;
1073    InitialUlBwp       initUlBwp;
1074    uint8_t            numUlBwpToAdd;
1075    UlBwpInfo          UlBwpToAddList[MAX_NUM_BWP];
1076    uint8_t            firstActvUlBwpId;
1077 }ServCellCfgInfo;
1078
1079 /* Special cell configuration */
1080 typedef struct spCellCfg
1081 {
1082    uint8_t           servCellIdx;
1083    ServCellCfgInfo   servCellCfg;
1084 }SpCellCfg;
1085
1086 typedef struct ambrCfg
1087 {
1088    uint32_t ulBr;   /* UL Bit rate */
1089 }AmbrCfg;
1090
1091 /* Single Network Slice Selection assistance Info */
1092 typedef struct snssai
1093 {
1094    uint8_t sst;                /* Slice Type */
1095    uint8_t sd[SD_SIZE];        /* Slice Differentiator */
1096 }Snssai;
1097
1098 typedef struct nonDynFiveQi
1099 {
1100    uint16_t   fiveQi;
1101    uint8_t    priorLevel;
1102    uint16_t   avgWindow;
1103    uint16_t   maxDataBurstVol;
1104 }NonDynFiveQi;
1105
1106 typedef struct dynFiveQi
1107 {
1108    uint8_t    priorLevel;
1109    uint16_t   packetDelayBudget;
1110    uint8_t    packetErrRateScalar;
1111    uint8_t    packetErrRateExp;
1112    uint16_t   fiveQi;
1113    uint8_t    delayCritical;
1114    uint16_t   avgWindow;
1115    uint16_t   maxDataBurstVol;
1116 }DynFiveQi;
1117
1118 typedef struct ngRanAllocAndRetPri
1119 {
1120    uint8_t priorityLevel;
1121    uint8_t preEmptionCap;
1122    uint8_t preEmptionVul;
1123 }NgRanAllocAndRetPri;
1124
1125 typedef struct grbQosInfo
1126 {
1127    uint32_t maxFlowBitRateDl;
1128    uint32_t maxFlowBitRateUl;
1129    uint32_t guarFlowBitRateDl;
1130    uint32_t guarFlowBitRateUl;
1131 }GrbQosInfo;
1132
1133 typedef struct drbQos
1134 {
1135    QosType  fiveQiType;   /* Dynamic or non-dynamic */ 
1136    union
1137    {
1138       NonDynFiveQi   nonDyn5Qi;
1139       DynFiveQi      dyn5Qi;
1140    }u;
1141    NgRanAllocAndRetPri ngRanRetPri;
1142    GrbQosInfo grbQosInfo;
1143    uint16_t             pduSessionId;
1144    uint32_t             ulPduSessAggMaxBitRate;
1145 }DrbQosInfo;
1146
1147 typedef struct ulLcCfg
1148 {
1149    uint8_t priority;
1150    uint8_t lcGroup;
1151    uint8_t schReqId;
1152    PBitRate pbr;        // prioritisedBitRate
1153    BucketSizeDur bsd;        // bucketSizeDuration
1154 }UlLcCfg;
1155
1156 typedef struct duLcCfg
1157 {
1158    LcPriority lcp;      // logical Channel Prioritization
1159 }DlLcCfg;
1160
1161 typedef struct lcCfg
1162 {
1163    ConfigType configType;
1164    uint8_t lcId;
1165    DrbQosInfo *drbQos; 
1166    Snssai  *snssai;
1167    bool ulLcCfgPres;
1168    UlLcCfg ulLcCfg;
1169    DlLcCfg dlLcCfg;
1170 }LcCfg;
1171
1172 typedef struct modulationInfo
1173 {
1174    uint8_t     modOrder;    /* Modulation order */
1175    uint8_t     mcsIndex;    /* MCS Index */
1176    McsTable    mcsTable;    /* MCS table */
1177 }ModulationInfo;
1178
1179 typedef struct macUeCfg
1180 {
1181    uint16_t cellId;
1182    uint8_t  ueIdx;
1183    uint16_t crnti;
1184    bool macCellGrpCfgPres;
1185    MacCellGrpCfg macCellGrpCfg;
1186    bool phyCellGrpCfgPres;
1187    PhyCellGrpCfg phyCellGrpCfg;
1188    bool spCellCfgPres;
1189    SpCellCfg spCellCfg;
1190    AmbrCfg   *ambrCfg;
1191    ModulationInfo dlModInfo;    /* DL modulation info */
1192    ModulationInfo ulModInfo;    /* UL modulation info */
1193    uint8_t numLcs;
1194    LcCfg lcCfgList[MAX_NUM_LC];
1195    UeCfgState macUeCfgState;    /* InActive / Completed */
1196 }MacUeCfg;
1197
1198 typedef struct nrcgi
1199 {
1200    Plmn      plmn;
1201    uint16_t  cellId;
1202 }Nrcgi;
1203
1204 typedef struct srbFailInfo
1205 {
1206    uint8_t       srbId;
1207    FailureCause  cause;
1208 }SRBFailInfo;
1209
1210 typedef struct drbFailInfo
1211 {
1212    uint8_t       drbId;
1213    FailureCause  cause;
1214 }DRBFailInfo;
1215
1216 typedef struct sCellFailInfo
1217 {
1218    Nrcgi         nrcgi;
1219    FailureCause  cause;
1220 }SCellFailInfo;
1221
1222 typedef struct ueCfgRsp
1223 {
1224    uint16_t       cellId;
1225    uint16_t       ueIdx;
1226    MacRsp         result;
1227    uint8_t        numSRBFailed;   /* valid values : 0 to MAX_NUM_SRB */ 
1228    SRBFailInfo    *failedSRBlisti;
1229    uint8_t        numDRBFailed;   /* valid values : 0 to MAX_NUM_DRB */
1230    DRBFailInfo    *failedDRBlist;
1231    uint8_t        numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1232    SCellFailInfo  *failedSCellList;
1233 }MacUeCfgRsp;
1234
1235 /* Functions for slot Ind from MAC to DU APP*/
1236 typedef uint8_t (*DuMacCellUpInd) ARGS((
1237          Pst       *pst,
1238          OduCellId *cellId ));
1239
1240 /* Functions for stop Ind from MAC to DU APP*/
1241 typedef uint8_t (*DuMacStopInd) ARGS((
1242          Pst        *pst,
1243          OduCellId  *cellId ));
1244
1245 /* Functions for mac cell start req */
1246 typedef uint8_t (*DuMacCellStart) ARGS((
1247          Pst        *pst, 
1248          OduCellId  *cellId));
1249
1250 /* Functions for mac cell stop request */
1251 typedef uint8_t (*DuMacCellStop) ARGS((
1252          Pst        *pst,
1253          OduCellId  *cellId ));
1254
1255 /* Function pointers for packing macCellCfg Request and Confirm */
1256 typedef uint8_t (*packMacCellCfgReq) ARGS((
1257          Pst           *pst,
1258          MacCellCfg    *macCellCfg ));
1259
1260 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1261          Pst              *pst,
1262          MacCellCfgCfm    *macCellCfgCfm ));
1263
1264 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1265          Pst        *pst,        
1266          MacCellCfg *macCellCfg));
1267
1268 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1269          Pst        *pst,        
1270          MacCellCfgCfm *macCellCfgCfm ));
1271
1272 /* Functions for UL CCCH Ind from MAC to DU APP*/
1273 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1274          Pst           *pst,
1275          UlCcchIndInfo *ulCcchIndInfo ));
1276
1277 /* Functions for DL CCCH Ind from DU APP to MAC*/
1278 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1279          Pst           *pst,
1280          DlCcchIndInfo *dlCcchIndInfo ));
1281
1282 /* UE create Request from DU APP to MAC*/
1283 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1284          Pst           *pst,
1285          MacUeCfg      *ueCfg ));
1286
1287 /* UE create Response from MAC to DU APP */
1288 typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
1289          Pst           *pst, 
1290          MacUeCfgRsp   *cfgRsp));
1291
1292 /* UE Reconfig Request from DU APP to MAC*/
1293 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1294          Pst           *pst,
1295          MacUeCfg      *ueCfg ));
1296
1297 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
1298 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
1299 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
1300 uint8_t packMacCellStart(Pst *pst, OduCellId *cellId);
1301 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
1302 uint8_t MacProcCellStart(Pst *pst, OduCellId *cellId);
1303 uint8_t packMacCellStop(Pst *pst, OduCellId *cellId);
1304 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
1305 uint8_t MacProcCellStop(Pst *pst, OduCellId *cellId);
1306 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1307 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func,  Pst *pst,  Buffer *mBuf);
1308 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1309 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1310 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1311 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1312 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
1313 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1314 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
1315 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1316 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1317 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1318 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1319 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1320 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1321 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1322 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1323 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1324 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1325 uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1326 uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
1327 uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1328 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1329 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
1330 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1331
1332 #endif
1333
1334 /**********************************************************************
1335   End of file
1336  **********************************************************************/