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