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