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