2f1e83db02bcccefcfd74310868c5f7ad431464e
[o-du/l2.git] / src / cm / mac_sch_interface.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 /* events */
20 #define EVENT_SCH_CELL_CFG           1
21 #define EVENT_SCH_CELL_CFG_CFM       2
22 #define EVENT_DL_SCH_INFO            3 
23 #define EVENT_UL_SCH_INFO            4 
24 #define EVENT_RACH_IND_TO_SCH        5
25 #define EVENT_CRC_IND_TO_SCH         6
26 #define EVENT_DL_RLC_BO_INFO_TO_SCH  7
27 #define EVENT_ADD_UE_CONFIG_REQ_TO_SCH   8
28 #define EVENT_UE_CONFIG_RSP_TO_MAC   9
29 #define EVENT_SLOT_IND_TO_SCH        10
30 #define EVENT_SHORT_BSR              11
31 #define EVENT_UCI_IND_TO_SCH         12
32 #define EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH 13
33 #define EVENT_UE_RECONFIG_RSP_TO_MAC 14
34 #define EVENT_UE_DELETE_REQ_TO_SCH   15
35 #define EVENT_UE_DELETE_RSP_TO_MAC   16
36 #define EVENT_CELL_DELETE_REQ_TO_SCH   17
37 #define EVENT_CELL_DELETE_RSP_TO_MAC   18
38 #define EVENT_LONG_BSR              19
39 #define EVENT_SLICE_CFG_REQ_TO_SCH  20
40 #define EVENT_SLICE_CFG_RSP_TO_MAC  21
41 #define EVENT_SLICE_RECFG_REQ_TO_SCH  22
42 #define EVENT_SLICE_RECFG_RSP_TO_MAC  23
43
44 /*macros*/
45 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
46 #define SCH_SSB_MASK_SIZE   1
47
48 #define MAX_NUM_PRG     1 /* max value should be later 275 */
49 #define MAX_DIG_BF_INTERFACES 0 /* max value should be later 255 */
50 #define MAX_CODEWORDS  1  /* max should be 2 */
51 #define SCH_HARQ_PROC_ID 1 /* harq proc id */
52 #define SCH_ALLOC_TYPE_1 1 /*sch res alloc type */
53
54 /* Datatype in UL SCH Info */
55 #define SCH_DATATYPE_PUSCH 1
56 #define SCH_DATATYPE_PUSCH_UCI 2
57 #define SCH_DATATYPE_UCI 4
58 #define SCH_DATATYPE_SRS 8
59 #define SCH_DATATYPE_PRACH 16
60
61 #define MAX_NUMBER_OF_CRC_IND_BITS 1
62 #define MAX_NUMBER_OF_UCI_IND_BITS 1
63 #define MAX_SR_BITS_IN_BYTES       1
64 #define MAX_NUM_LOGICAL_CHANNEL_GROUPS 8
65 /* can we have a common numslot numscs between mac sch */
66 #ifdef NR_TDD
67 #define MAX_SLOTS 20
68 #else
69 #define MAX_SLOTS 10
70 #endif
71 #define MAX_SFN   1024
72 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8   /* Max number of scheduling request config per cell group */
73 #define MAX_NUM_TAGS 4                  /* Max number of timing advance groups */
74 #define MAX_NUM_BWP  4                  /* Max number of BWP per serving cell */
75 #define MAX_NUM_CRSET  3                /* Max number of control resource set in add/modify/release list */
76 #define MAX_NUM_SEARCH_SPC  10          /* Max number of search space in add/modify/release list */
77 #define FREQ_DOM_RSRC_SIZE  6           /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
78 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2  /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
79 #define MAX_NUM_DL_ALLOC 16             /* Max number of pdsch time domain downlink allocation */
80 #define MAX_NUM_UL_ALLOC 16             /* Max number of pusch time domain uplink allocation */
81
82 /* PUCCH Configuration Macro */
83 #define MAX_NUM_PUCCH_RESRC 128
84 #define MAX_NUM_PUCCH_RESRC_SET 4
85 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
86 #define MAX_NUM_SPATIAL_RELATIONS 8
87 #define MAX_NUM_PUCCH_P0_PER_SET 8
88 #define MAX_NUM_PATH_LOSS_REF_RS 4
89 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
90 #define QPSK_MODULATION 2
91
92 #define RAR_PAYLOAD_SIZE 10             /* As per spec 38.321, sections 6.1.5 and 6.2.3, RAR PDU is 8 bytes long and 2 bytes of padding */
93 #define TX_PAYLOAD_HDR_LEN 32           /* Intel L1 requires adding a 32 byte header to transmitted payload */
94 #define UL_TX_BUFFER_SIZE 5
95
96 #define MAX_NUM_CONFIG_SLOTS 160  /*Max number of slots as per the numerology*/
97 #define MAX_NUM_K0_IDX 16 /* Max number of pdsch time domain downlink allocation */
98 #define MAX_NUM_K1_IDX 8  /* As per spec 38.213 section 9.2.3 Max number of PDSCH-to-HARQ resource indication */
99 #define MIN_NUM_K1_IDX 4  /* Min K1 values */
100 #define MAX_NUM_K2_IDX 16 /* PUSCH time domain UL resource allocation list */
101 #define DEFAULT_K0_VALUE 0 /* As per 38.331, PDSCH-TimeDomainResourceAllocation field descriptions */
102 /* As per 38.331, PUSCH-TimeDomainResourceAllocationList field descriptions */
103 #define DEFAULT_K2_VALUE_FOR_SCS15  1 
104 #define DEFAULT_K2_VALUE_FOR_SCS30  1 
105 #define DEFAULT_K2_VALUE_FOR_SCS60  2
106 #define DEFAULT_K2_VALUE_FOR_SCS120 3 
107
108 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr)          \
109 {                                                          \
110    if ((crntTime.slot + incr) > (MAX_SLOTS - 1))           \
111    {                                                       \
112       toFill.sfn = (crntTime.sfn + 1);                     \
113    }                                                       \
114    else                                                    \
115    {                                                       \
116       toFill.sfn = crntTime.sfn;                           \
117    }                                                       \
118    toFill.slot = (crntTime.slot + incr) % MAX_SLOTS;       \
119    if (toFill.sfn >= MAX_SFN)                              \
120    {                                                       \
121       toFill.sfn%=MAX_SFN;                                 \
122    }                                                       \
123 }
124
125 typedef enum
126 {
127    PRB_RSRC,
128    DRB_RSRC,
129    RRC_CONNECTED_USERS_RSRC
130 }SchResourceType;
131
132 typedef enum
133 {
134    SLICE_FOUND,
135    SLICE_NOT_FOUND
136 }RspCause;
137
138 typedef enum
139 {
140    NO_TRANSMISSION,
141    NEW_TRANSMISSION,
142    REPEATITION 
143 }PduTxOccsaion;
144
145 typedef enum
146 {
147    UNSPECIFIED_CAUSE,
148    INVALID_PARAM_VALUE,
149    RESOURCE_UNAVAILABLE,
150    SYSTEM_ERROR
151 }SchFailureCause;
152
153 typedef enum
154 {
155    SR_PROHIBIT_MS1,
156    SR_PROHIBIT_MS2,
157    SR_PROHIBIT_MS4,
158    SR_PROHIBIT_MS8,
159    SR_PROHIBIT_MS16,
160    SR_PROHIBIT_MS32,
161    SR_PROHIBIT_MS64,
162    SR_PROHIBIT_MS128
163 }SchSrProhibitTimer;
164
165 typedef enum
166 {
167    NOT_APPLICABLE,
168    INVALID_CELLID,
169    INVALID_UEID
170 }ErrorCause;
171
172 typedef enum
173 {
174    SR_TRANS_MAX_N4,
175    SR_TRANS_MAX_N8,
176    SR_TRANS_MAX_N16,
177    SR_TRANS_MAX_N32,
178    SR_TRANS_MAX_N64,
179    SR_TRANS_MAX_SPARE3,
180    SR_TRANS_MAX_SPARE2,
181    SR_TRANS_MAX_SPARE1
182 }SchSrTransMax;
183
184 typedef enum
185 {
186    TIME_ALIGNMENT_TIMER_MS500,
187    TIME_ALIGNMENT_TIMER_MS750,
188    TIME_ALIGNMENT_TIMER_MS1280,
189    TIME_ALIGNMENT_TIMER_MS1920,
190    TIME_ALIGNMENT_TIMER_MS2560,
191    TIME_ALIGNMENT_TIMER_MS5120,
192    TIME_ALIGNMENT_TIMER_MS10240,
193    TIME_ALIGNMENT_TIMER_INFINITE
194 }SchTimeAlignmentTimer;
195
196 typedef enum
197 {
198    PHR_PERIODIC_TIMER_SF10,
199    PHR_PERIODIC_TIMER_SF20,
200    PHR_PERIODIC_TIMER_SF50,
201    PHR_PERIODIC_TIMER_SF100,
202    PHR_PERIODIC_TIMER_SF200,
203    PHR_PERIODIC_TIMER_SF500,
204    PHR_PERIODIC_TIMER_SF1000,
205    PHR_PERIODIC_TIMER_INFINITE
206 }SchPhrPeriodicTimer;
207
208 typedef enum
209 {
210    PHR_PROHIBIT_TIMER_SF0,
211    PHR_PROHIBIT_TIMER_SF10,
212    PHR_PROHIBIT_TIMER_SF20,
213    PHR_PROHIBIT_TIMER_SF50,
214    PHR_PROHIBIT_TIMER_SF100,
215    PHR_PROHIBIT_TIMER_SF200,
216    PHR_PROHIBIT_TIMER_SF500,
217    PHR_PROHIBIT_TIMER_SF1000
218 }SchPhrProhibitTimer;
219
220 typedef enum
221 {
222    PHR_TX_PWR_FACTOR_CHANGE_DB1,
223    PHR_TX_PWR_FACTOR_CHANGE_DB3,
224    PHR_TX_PWR_FACTOR_CHANGE_DB6,
225    PHR_TX_PWR_FACTOR_CHANGE_INFINITE
226 }SchPhrTxPwrFactorChange;
227
228 typedef enum
229 {
230    PHR_MODE_REAL,
231    PHR_MODE_VIRTUAL
232 }SchPhrModeOtherCG;
233
234 typedef enum
235 {
236    HARQ_ACK_CODEBOOK_SEMISTATIC,
237    HARQ_ACK_CODEBOOK_DYNAMIC
238 }SchPdschHarqAckCodebook;
239
240 typedef enum
241 {
242    NUM_HARQ_PROC_FOR_PDSCH_N2,
243    NUM_HARQ_PROC_FOR_PDSCH_N4,
244    NUM_HARQ_PROC_FOR_PDSCH_N6,
245    NUM_HARQ_PROC_FOR_PDSCH_N10,
246    NUM_HARQ_PROC_FOR_PDSCH_N16
247 }SchNumHarqProcForPdsch;
248
249 typedef enum
250 {
251    MAX_CODE_BLOCK_GROUP_PER_TB_N2,
252    MAX_CODE_BLOCK_GROUP_PER_TB_N4,
253    MAX_CODE_BLOCK_GROUP_PER_TB_N6,
254    MAX_CODE_BLOCK_GROUP_PER_TB_N8
255 }SchMaxCodeBlkGrpPerTB;
256
257 typedef enum
258 {
259    PDSCH_X_OVERHEAD_XOH_6,
260    PDSCH_X_OVERHEAD_XOH_12,
261    PDSCH_X_OVERHEAD_XOH_18
262 }SchPdschXOverhead;
263
264 typedef enum
265 {
266    DMRS_ADDITIONAL_POS0,
267    DMRS_ADDITIONAL_POS1,
268    DMRS_ADDITIONAL_POS3
269 }SchDmrsAdditionPosition;
270
271 typedef enum
272 {
273    RESOURCE_ALLOCTION_TYPE_0,
274    RESOURCE_ALLOCTION_TYPE_1,
275    RESOURCE_ALLOCTION_DYN_SWITCH
276 }SchResourceAllocType;
277
278 typedef enum
279 {
280    TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_A,
281    TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_B
282 }SchTimeDomRsrcAllocMappingType;
283
284 typedef enum
285 {
286    ENABLED_TRANSFORM_PRECODER,
287    DISABLED_TRANSFORM_PRECODER
288 }SchTransformPrecoder;
289
290 typedef enum
291 {
292    INTERLEAVED_CCE_REG_MAPPING = 1,
293    NONINTERLEAVED_CCE_REG_MAPPING
294 }SchREGMappingType;
295
296 typedef enum
297 {
298    SLOT_PERIODICITY_AND_OFFSET_SL_1 = 1,
299    SLOT_PERIODICITY_AND_OFFSET_SL_2,
300    SLOT_PERIODICITY_AND_OFFSET_SL_4,
301    SLOT_PERIODICITY_AND_OFFSET_SL_5,
302    SLOT_PERIODICITY_AND_OFFSET_SL_8,
303    SLOT_PERIODICITY_AND_OFFSET_SL_10,
304    SLOT_PERIODICITY_AND_OFFSET_SL_16,
305    SLOT_PERIODICITY_AND_OFFSET_SL_20,
306    SLOT_PERIODICITY_AND_OFFSET_SL_40,
307    SLOT_PERIODICITY_AND_OFFSET_SL_80,
308    SLOT_PERIODICITY_AND_OFFSET_SL_160,
309    SLOT_PERIODICITY_AND_OFFSET_SL_320,
310    SLOT_PERIODICITY_AND_OFFSET_SL_640,
311    SLOT_PERIODICITY_AND_OFFSET_SL_1280,
312    SLOT_PERIODICITY_AND_OFFSET_SL_2560
313 }SchMSlotPeriodAndOffset;
314
315 typedef enum
316 {
317    SAME_AS_REG_BUNDLE,
318    ALL_CONTIGUOUS_RB
319 }SchPrecoderGranul;
320
321 typedef enum
322 {
323    SEARCH_SPACE_TYPE_COMMON = 1,
324    SEARCH_SPACE_TYPE_UE_SPECIFIC
325 }SchSearchSpaceType;
326
327 typedef enum
328 {
329    SCH_QOS_NON_DYNAMIC = 1,
330    SCH_QOS_DYNAMIC
331 }SchQosType;
332
333 typedef enum
334 {
335    AGGREGATION_LEVEL_N0,
336    AGGREGATION_LEVEL_N1,
337    AGGREGATION_LEVEL_N2,
338    AGGREGATION_LEVEL_N3,
339    AGGREGATION_LEVEL_N4,
340    AGGREGATION_LEVEL_N5,
341    AGGREGATION_LEVEL_N6,
342    AGGREGATION_LEVEL_N8
343 }SchAggrLevel;
344
345 typedef enum
346 {
347    RBG_SIZE_CONFIG_1,
348    RBG_SIZE_CONFIG_2
349 }SchRBGSize;
350
351 typedef enum
352 {
353    CODE_WORDS_SCHED_BY_DCI_N1,
354    CODE_WORDS_SCHED_BY_DCI_N2
355 }SchCodeWordsSchedByDci;
356
357 typedef enum
358 {
359    STATIC_BUNDLING_TYPE = 1,
360    DYNAMIC_BUNDLING_TYPE
361 }SchBundlingType;
362
363 typedef enum
364 {
365    SCH_SET1_SIZE_N4,
366    SCH_SET1_SIZE_WIDEBAND,
367    SCH_SET1_SIZE_N2_WIDEBAND,
368    SCH_SET1_SIZE_N4_WIDEBAND
369 }SchBundlingSizeSet1;
370
371 typedef enum
372 {
373    SCH_SET2_SIZE_N4,
374    SCH_SET2_SIZE_WIDEBAND
375 }SchBundlingSizeSet2;
376
377 typedef enum
378 {
379    DUPLEX_MODE_FDD,
380    DUPLEX_MODE_TDD
381 }SchDuplexMode;
382
383 typedef enum
384 {
385    SSB_PRDCTY_MS5,
386    SSB_PRDCTY_MS10,
387    SSB_PRDCTY_MS20,
388    SSB_PRDCTY_MS40,
389    SSB_PRDCTY_MS80,
390    SSB_PRDCTY_MS160
391 }SchSSBPeriod;
392
393 typedef enum
394 {
395    RSP_OK,
396    RSP_NOK
397 }SchMacRsp;
398
399 typedef enum
400 {
401    SHORT_BSR,
402    LONG_BSR,
403    SHORT_TRUNCATED_BSR,
404    LONG_TRUNCATED_BSR
405 }BsrType;
406
407 typedef enum
408 {
409    FORMAT0_0,
410    FORMAT0_1,
411    FORMAT1_0,
412    FORMAT1_1
413 }FormatType;
414
415 typedef enum
416 {
417    SCH_MCS_TABLE_QAM_64,
418    SCH_MCS_TABLE_QAM_256,
419    SCH_MCS_TABLE_QAM_64_LOW_SE
420 }SchMcsTable;
421
422 typedef enum
423 {
424    NONE,
425    PDCCH_PDU,
426    PDSCH_PDU,
427    BOTH
428 }DlPduType;
429
430 /*structures*/
431 typedef struct timeDomainAlloc
432 {
433    uint16_t startSymb;
434    uint16_t numSymb;
435 }TimeDomainAlloc;
436
437 typedef struct freqDomainAlloc
438 {
439    uint16_t startPrb;
440    uint16_t numPrb;
441 }FreqDomainAlloc;
442
443
444 typedef struct
445 {
446    uint32_t    ssbPbchPwr;       /* SSB block power */
447    uint8_t     scsCommon;           /* subcarrier spacing for common [0-3]*/
448    uint8_t     ssbOffsetPointA;  /* SSB sub carrier offset from point A */
449    SchSSBPeriod   ssbPeriod;        /* SSB Periodicity in msec */
450    uint8_t     ssbSubcOffset;    /* Subcarrier Offset(Kssb) */
451    uint32_t    nSSBMask[SCH_SSB_MASK_SIZE];      /* Bitmap for actually transmitted SSB. */
452 }SchSsbCfg;
453
454 typedef struct bwpCfg
455 {
456    uint8_t         subcarrierSpacing;
457    uint8_t         cyclicPrefix;
458    FreqDomainAlloc freqAlloc;   
459 }BwpCfg;
460
461 typedef struct prg
462 {
463    uint16_t pmIdx;
464    uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
465 } Prg;
466
467 typedef struct beamformingInfo
468 {
469    uint16_t numPrgs;
470    uint16_t prgSize;
471    uint8_t  digBfInterfaces;
472    Prg  prg[MAX_NUM_PRG];
473 } BeamformingInfo;
474
475 /* SIB1 PDSCH structures */
476
477 typedef struct codewordinfo
478 {
479    uint16_t targetCodeRate;
480    uint8_t  qamModOrder;
481    uint8_t  mcsIndex;
482    uint8_t  mcsTable;
483    uint8_t  rvIndex;
484    uint32_t tbSize;
485 } CodewordInfo;
486
487 typedef struct dmrsInfo
488 {
489    uint16_t dlDmrsSymbPos;
490    uint8_t  dmrsConfigType;
491    uint16_t dlDmrsScramblingId;
492    uint8_t  scid;
493    uint8_t  numDmrsCdmGrpsNoData;
494    uint16_t dmrsPorts;
495    uint8_t mappingType;
496    uint8_t nrOfDmrsSymbols;
497    uint8_t dmrsAddPos;
498 } DmrsInfo;
499
500 typedef struct pdschFreqAlloc
501 {
502    uint8_t  resourceAllocType;
503    /* since we are using type-1, rbBitmap excluded */
504    FreqDomainAlloc freqAlloc;
505    uint8_t  vrbPrbMapping;
506 } PdschFreqAlloc;
507
508 typedef struct pdschTimeAlloc
509 {
510    uint8_t         rowIndex;
511    TimeDomainAlloc timeAlloc;
512 } PdschTimeAlloc;
513
514 typedef struct txPowerPdschInfo
515 {
516    uint8_t powerControlOffset;
517    uint8_t powerControlOffsetSS;
518 } TxPowerPdschInfo;
519
520 typedef struct pdschCfg
521 {
522    uint16_t         pduBitmap;
523    uint16_t         rnti;
524    uint16_t         pduIndex;
525    uint8_t          numCodewords;
526    CodewordInfo     codeword[MAX_CODEWORDS];
527    uint16_t         dataScramblingId;
528    uint8_t          numLayers;
529    uint8_t          transmissionScheme;
530    uint8_t          refPoint;
531    DmrsInfo         dmrs;
532    PdschFreqAlloc   pdschFreqAlloc;
533    PdschTimeAlloc   pdschTimeAlloc;
534    BeamformingInfo  beamPdschInfo;
535    TxPowerPdschInfo txPdschPower;
536 } PdschCfg;
537 /* SIB1 PDSCH structures end */
538
539 /* SIB1 interface structure */
540
541 typedef struct coresetCfg
542 {
543    uint8_t coreSetSize;
544    uint8_t startSymbolIndex;
545    uint8_t durationSymbols;
546    uint8_t freqDomainResource[6];
547    uint8_t cceRegMappingType;
548    uint8_t regBundleSize;
549    uint8_t interleaverSize;
550    uint8_t coreSetType;
551    uint16_t shiftIndex;
552    uint8_t precoderGranularity;
553    uint8_t cceIndex;
554    uint8_t aggregationLevel;
555 } CoresetCfg;
556
557 typedef struct txPowerPdcchInfo
558 {
559    uint8_t powerValue;
560    uint8_t powerControlOffsetSS;
561 } TxPowerPdcchInfo;
562
563 typedef struct dlDCI
564 {
565    uint16_t rnti;
566    uint16_t scramblingId;
567    uint16_t scramblingRnti;
568    uint8_t cceIndex;
569    uint8_t aggregLevel;
570    BeamformingInfo beamPdcchInfo;
571    TxPowerPdcchInfo txPdcchPower;
572    PdschCfg     *pdschCfg;
573 } DlDCI;
574
575 typedef struct pdcchCfg
576 {
577    /* coreset-0 configuration */
578    CoresetCfg coresetCfg;
579
580    uint16_t numDlDci;
581    DlDCI    dci; /* as of now its only one DCI, later it will be numDlCi */
582 } PdcchCfg;
583 /* end of SIB1 PDCCH structures */
584
585 typedef struct
586 {
587    /* parameters recieved from DU-APP */
588    uint16_t sib1PduLen;
589    uint16_t sib1RepetitionPeriod;
590    uint8_t  coresetZeroIndex;     /* derived from 4 LSB of pdcchSib1 present in MIB */
591    uint8_t  searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
592    uint16_t sib1Mcs;
593
594    /* parameters derived in scheduler */
595    uint8_t n0;
596    BwpCfg bwp;
597    PdcchCfg sib1PdcchCfg;
598    PdschCfg sib1PdschCfg;
599 }SchSib1Cfg;
600
601 typedef struct schRachCfg
602 {
603    uint8_t      prachCfgIdx;       /* PRACH config idx */
604    uint8_t      prachSubcSpacing;  /* Subcarrier spacing of RACH */
605    uint16_t     msg1FreqStart;     /* Msg1-FrequencyStart */
606    uint8_t      msg1Fdm;           /* PRACH FDM (1,2,4,8) */
607    uint8_t      rootSeqLen;        /* root sequence length */
608    uint16_t     rootSeqIdx;        /* Root sequence index */
609    uint8_t      numRootSeq;        /* Number of root sequences required for FD */
610    uint16_t     k1;                /* Frequency Offset for each FD */
611    uint8_t      ssbPerRach;        /* SSB per RACH occassion */
612    uint8_t      prachMultCarrBand; /* Presence of Multiple carriers in Band */
613    uint8_t      raContResTmr;      /* RA Contention Resoultion Timer */
614    uint8_t      rsrpThreshSsb;     /* RSRP Threshold SSB */
615    uint8_t      raRspWindow;       /* RA Response Window */
616 }SchRachCfg;
617
618 typedef struct schBwpParams
619 {
620    FreqDomainAlloc freqAlloc;
621    uint8_t         scs;
622    uint8_t         cyclicPrefix;
623 }SchBwpParams;
624
625 typedef struct schCandidatesInfo
626 {
627    uint8_t aggLevel1;
628    uint8_t aggLevel2;
629    uint8_t aggLevel4;
630    uint8_t aggLevel8;
631    uint8_t aggLevel16;
632 }SchCandidatesInfo;
633
634 typedef struct schSearchSpaceCfg
635 {
636    uint8_t  searchSpaceId;
637    uint8_t  coresetId;
638    uint8_t  freqDomainRsrc[FREQ_DOM_RSRC_SIZE];  /* Frequency domain resource */
639    uint16_t monitoringSlot;
640    uint16_t duration;
641    uint16_t monitoringSymbol;
642    SchCandidatesInfo candidate;
643 }SchSearchSpaceCfg;
644
645 typedef struct schPdcchCfgCmn
646 {
647    SchSearchSpaceCfg commonSearchSpace;
648    uint8_t raSearchSpaceId;
649 }SchPdcchCfgCmn;
650
651 typedef struct schPdschCfgCmnTimeDomRsrcAlloc
652 {
653    uint8_t k0;
654    uint8_t mappingType;
655    uint8_t startSymbol;
656    uint8_t lengthSymbol;
657 }SchPdschCfgCmnTimeDomRsrcAlloc;
658
659 typedef struct schPdschCfgCmn
660 {
661    uint8_t   numTimeDomAlloc;
662    SchPdschCfgCmnTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
663 }SchPdschCfgCmn;
664
665 typedef struct schPucchCfgCmn
666 {
667    uint8_t pucchResourceCommon;
668    uint8_t pucchGroupHopping;
669 }SchPucchCfgCmn;
670
671 /* PUSCH Time Domain Resource Allocation */
672 typedef struct schPuschTimeDomRsrcAlloc
673 {
674    uint8_t   k2;
675    SchTimeDomRsrcAllocMappingType   mappingType;
676    uint8_t   startSymbol;
677    uint8_t   symbolLength;
678 }SchPuschTimeDomRsrcAlloc;
679
680 typedef struct schPuschCfgCmn
681 {
682    uint8_t                    numTimeDomRsrcAlloc;
683    SchPuschTimeDomRsrcAlloc   timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
684 }SchPuschCfgCmn;
685
686 typedef struct schK1TimingInfo
687 {
688    uint8_t numK1;
689    uint8_t k1Indexes[MAX_NUM_K1_IDX];
690 }SchK1TimingInfo;
691
692 typedef struct schK0TimingInfo
693 {
694    uint8_t k0Index;
695    SchK1TimingInfo k1TimingInfo;
696 }SchK0TimingInfo;
697
698 typedef struct schK0K1TimingInfo
699 {
700    uint8_t numK0;
701    SchK0TimingInfo k0Indexes[MAX_NUM_K0_IDX];
702 }SchK0K1TimingInfo;
703
704 typedef struct schK0K1TimingInfoTbl
705 {
706    uint16_t tblSize;
707    SchK0K1TimingInfo k0k1TimingInfo[MAX_NUM_CONFIG_SLOTS];
708 }SchK0K1TimingInfoTbl;
709
710 typedef struct schBwpDlCfg
711 {
712    SchBwpParams   bwp;
713    SchPdcchCfgCmn pdcchCommon;
714    SchPdschCfgCmn pdschCommon;
715    SchK0K1TimingInfoTbl k0K1InfoTbl;
716 }SchBwpDlCfg;
717
718 typedef struct schK2TimingInfo
719 {
720    uint8_t numK2; 
721    uint8_t k2Indexes[MAX_NUM_K2_IDX]; 
722 }SchK2TimingInfo;
723
724 typedef struct schK2TimingInfoTbl
725 {
726    uint16_t tblSize; 
727    SchK2TimingInfo k2TimingInfo[MAX_NUM_CONFIG_SLOTS]; 
728 }SchK2TimingInfoTbl;
729
730 typedef struct schBwpUlCfg
731 {
732    SchBwpParams   bwp;
733    SchPucchCfgCmn pucchCommon;
734    SchPuschCfgCmn puschCommon;
735    SchK2TimingInfoTbl msg3K2InfoTbl;
736    SchK2TimingInfoTbl k2InfoTbl;
737 }SchBwpUlCfg;
738
739 typedef struct schPlmnInfoList
740 {
741    Plmn           plmn;
742    uint8_t        numSliceSupport; /* Total slice supporting */
743    Snssai         **snssai;         /* List of supporting snssai*/
744 }SchPlmnInfoList;
745
746 typedef struct schCellCfg
747 {
748    uint16_t       cellId;           /* Cell Id */
749    uint16_t       phyCellId;        /* Physical cell id */
750    uint8_t        numerology;       /* Supported numerology */
751    SchDuplexMode  dupMode;          /* Duplex type: TDD/FDD */
752    uint8_t        bandwidth;        /* Supported B/W */
753    uint32_t       dlFreq;           /* DL Frequency */
754    uint32_t       ulFreq;           /* UL Frequency */
755    SchSsbCfg      ssbSchCfg;        /* SSB config */
756    SchSib1Cfg     sib1SchCfg;       /* SIB1 config */
757    SchRachCfg     schRachCfg;       /* PRACH config */
758    SchBwpDlCfg    schInitialDlBwp;  /* Initial DL BWP */
759    SchBwpUlCfg    schInitialUlBwp;  /* Initial UL BWP */
760    SchPlmnInfoList plmnInfoList;     /* Consits of PlmnId and Snssai list */
761 #ifdef NR_TDD
762    TDDCfg         tddCfg;           /* TDD Cfg */ 
763 #endif   
764 }SchCellCfg;
765
766 typedef struct schCellCfgCfm
767 {
768    uint16_t         cellId;     /* Cell Id */
769    SchMacRsp   rsp;   
770 }SchCellCfgCfm;
771
772 typedef struct ssbInfo
773 {
774    uint8_t         ssbIdx;          /* SSB Index */
775    TimeDomainAlloc tdAlloc; /* Time domain allocation */
776    FreqDomainAlloc fdAlloc; /* Freq domain allocation */
777 }SsbInfo;
778
779 typedef struct sib1AllocInfo
780 {
781    BwpCfg bwp;
782    PdcchCfg sib1PdcchCfg;
783    PdschCfg sib1PdschCfg;
784 } Sib1AllocInfo;
785
786 typedef struct prachSchInfo
787 {
788    uint8_t  numPrachOcas;   /* Num Prach Ocassions */
789    uint8_t  prachFormat;    /* PRACH Format */
790    uint8_t  numRa;          /* Freq domain ocassion */
791    uint8_t  prachStartSymb; /* Freq domain ocassion */
792 }PrachSchInfo;
793
794 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
795 typedef struct dlBrdcstAlloc
796 {
797    /* Ssb transmission is determined as follows:
798     * 0 : No tranamission
799     * 1 : SSB Transmission
800     * 2 : SSB Repetition */
801    uint8_t ssbTrans;
802    uint8_t ssbIdxSupported;
803    SsbInfo ssbInfo[MAX_SSB_IDX];
804    /* Sib1 transmission is determined as follows:
805     * 0 : No tranamission
806     * 1 : SIB1 Transmission
807     * 2 : SIB1 Repetition */
808    uint8_t sib1Trans;
809    Sib1AllocInfo sib1Alloc;
810 }DlBrdcstAlloc;
811
812 typedef struct msg3UlGrant
813 {
814    uint8_t         freqHopFlag;
815    uint16_t        bwpSize;
816    FreqDomainAlloc msg3FreqAlloc;
817    uint8_t         k2Index;
818    uint8_t         mcs;
819    uint8_t         tpc;
820    uint8_t         csiReq;
821 }Msg3UlGrant;
822
823 typedef struct rarInfo
824 {
825    uint16_t        raRnti;
826    uint8_t         RAPID;
827    uint16_t        ta;
828    Msg3UlGrant     ulGrant;
829    uint16_t        tcrnti;
830    uint8_t         rarPdu[RAR_PAYLOAD_SIZE];
831    uint8_t         rarPduLen;
832 }RarInfo;
833
834 typedef struct rarAlloc
835 {
836    DlPduType  pduPres;
837    uint8_t    pdschSlot;
838    RarInfo rarInfo;
839    BwpCfg  bwp;
840    PdcchCfg rarPdcchCfg;
841    PdschCfg rarPdschCfg;
842 }RarAlloc;
843
844 typedef struct dlMsgInfo
845 {
846    uint16_t crnti;
847    uint8_t  ndi;
848    uint8_t  harqProcNum;
849    uint8_t  dlAssignIdx;
850    uint8_t  pucchTpc;
851    uint8_t  pucchResInd;
852    uint8_t  harqFeedbackInd;
853    uint8_t  dciFormatId;
854    bool     isMsg4Pdu;
855    uint16_t  dlMsgPduLen;
856    uint8_t  *dlMsgPdu;
857 }DlMsgInfo;
858
859 typedef struct lcSchInfo
860 {
861    uint8_t   lcId;
862    uint32_t  schBytes; /* Number of scheduled bytes */
863 }LcSchInfo;
864
865 typedef struct dlMsgSchedInfo
866 {
867    uint8_t    numLc;
868    LcSchInfo  lcSchInfo[MAX_NUM_LC]; /* Scheduled LC info */
869    BwpCfg     bwp;
870    PdcchCfg   dlMsgPdcchCfg;
871    PdschCfg   dlMsgPdschCfg;
872    DlPduType  pduPres;
873    uint8_t    pdschSlot;
874    DlMsgInfo  dlMsgInfo;
875 }DlMsgSchInfo;
876
877 typedef struct dlMsgAlloc
878 {
879    uint16_t     crnti;
880    uint8_t      numSchedInfo;
881    DlMsgSchInfo dlMsgSchedInfo[2];
882 }DlMsgAlloc;
883
884 typedef struct schSlotValue
885 {
886    SlotTimingInfo currentTime;
887    SlotTimingInfo broadcastTime;
888    SlotTimingInfo rarTime;
889    SlotTimingInfo dlMsgTime;
890    SlotTimingInfo ulDciTime;
891 }SchSlotValue;
892
893 typedef struct format0_0
894 {
895    uint8_t         resourceAllocType;
896    /* since we are using type-1, hence rbBitmap excluded */
897    FreqDomainAlloc freqAlloc;
898    TimeDomainAlloc timeAlloc;
899    uint16_t        rowIndex;
900    uint8_t         mcs;
901    uint8_t         harqProcId;   /* HARQ Process ID */
902    bool            puschHopFlag;
903    bool            freqHopFlag;
904    uint8_t         ndi;    /* NDI */
905    uint8_t         rv;     /* Redundancy Version */
906    uint8_t         tpcCmd;
907    bool            sUlCfgd;
908 }Format0_0;
909
910 typedef struct format0_1
911 {
912 /* TBD */
913
914 }Format0_1;
915
916 typedef struct format1_0
917 {
918 /* TBD */
919
920 }Format1_0;
921
922 typedef struct format1_1
923 {
924 /* TBD */
925 }Format1_1;
926
927 typedef struct dciInfo
928 {
929    uint16_t      cellId;   
930    uint16_t      crnti;          /* CRNI */
931    SlotTimingInfo   slotIndInfo;    /* Slot Info: sfn, slot number */
932    BwpCfg        bwpCfg;         /* BWP Cfg */
933    CoresetCfg    coresetCfg;     /* Coreset1 Cfg */
934    FormatType    formatType;     /* DCI Format */
935    union
936    {
937       Format0_0  format0_0;      /* Format 0_0 */
938       Format0_1  format0_1;      /* Format 0_1 */
939       Format1_0  format1_0;      /* Format 1_0 */
940       Format1_1  format1_1;      /* Format 1_1 */
941    }format;
942    DlDCI    dciInfo;
943 }DciInfo;
944
945
946 typedef struct dlSchedInfo
947 {
948    uint16_t cellId;  /* Cell Id */
949    SchSlotValue schSlotValue;
950
951    /* Allocation for broadcast messages */
952    bool isBroadcastPres;
953    DlBrdcstAlloc brdcstAlloc;
954
955    /* Allocation for RAR message */
956    RarAlloc *rarAlloc[MAX_NUM_UE];
957
958    /* UL grant in response to BSR */
959    DciInfo    *ulGrant;
960
961    /* Allocation from dedicated DL msg */
962    DlMsgAlloc *dlMsgAlloc[MAX_NUM_UE];
963
964 }DlSchedInfo;
965
966 typedef struct tbInfo
967 {
968    uint8_t  qamOrder;  /* Modulation Order */
969    uint8_t  mcs;       /* MCS */
970    SchMcsTable  mcsTable;  /* MCS Table */
971    uint8_t  ndi;       /* NDI */
972    uint8_t  rv;        /* Redundancy Version */
973    uint16_t tbSize;    /* TB Size */
974 }TbInfo;
975
976 typedef struct schPuschInfo
977 {
978    uint16_t         crnti;
979    uint8_t          harqProcId;   /* HARQ Process ID */
980    uint8_t          resAllocType; /* Resource allocation type */
981    FreqDomainAlloc  fdAlloc;      /* Freq domain allocation */
982    TimeDomainAlloc  tdAlloc;      /* Time domain allocation */
983    TbInfo           tbInfo;       /* TB info */
984    uint8_t          dmrsMappingType;
985    uint8_t          nrOfDmrsSymbols;
986    uint8_t          dmrsAddPos;
987 }SchPuschInfo;
988
989 typedef struct schPucchFormatCfg
990 {
991    uint8_t interSlotFreqHop;
992    uint8_t addDmrs;
993    uint8_t maxCodeRate;
994    uint8_t numSlots;
995    bool    pi2BPSK;
996    bool    harqAckCSI;
997 }SchPucchFormatCfg;
998
999 typedef struct schPucchInfo
1000 {
1001    uint16_t         rnti;
1002    uint8_t          pucchFormat;
1003    FreqDomainAlloc  fdAlloc;      /* Freq domain allocation */
1004    TimeDomainAlloc  tdAlloc;      /* Time domain allocation */
1005    uint8_t          srFlag;
1006    uint8_t          harqFlag;
1007    uint8_t          numHarqBits;
1008    uint8_t          uciFlag;
1009    uint8_t          numUciBits;
1010    uint8_t          intraFreqHop;
1011    uint16_t         secondPrbHop;
1012    uint8_t          initialCyclicShift;
1013    uint8_t          occLen;
1014    uint8_t          occIdx;
1015    uint8_t          timeDomOCC;
1016    SchPucchFormatCfg cmnFormatCfg;
1017 }SchPucchInfo;
1018
1019 typedef struct ulSchedInfo
1020 {
1021    uint16_t      cellId;         /* Cell Id */
1022    uint16_t      crnti;          /* CRNI */
1023    SlotTimingInfo   slotIndInfo;    /* Slot Info: sfn, slot number */
1024    uint8_t       dataType;       /* Type of info being scheduled */
1025    PrachSchInfo  prachSchInfo;   /* Prach scheduling info */
1026    SchPuschInfo  schPuschInfo;   /* Pusch scheduling info */
1027    SchPucchInfo  schPucchInfo;   /* Pusch scheduling info */
1028 }UlSchedInfo;
1029
1030 typedef struct rachIndInfo
1031 {
1032    uint16_t    cellId;
1033    uint16_t    crnti;
1034    SlotTimingInfo timingInfo;
1035    uint8_t     slotIdx;
1036    uint8_t     symbolIdx;
1037    uint8_t     freqIdx;
1038    uint8_t     preambleIdx;
1039    uint16_t    timingAdv;
1040 }RachIndInfo;
1041
1042
1043 typedef struct crcIndInfo
1044 {
1045    uint16_t    cellId;
1046    uint16_t    crnti;
1047    SlotTimingInfo timingInfo;
1048    uint16_t    numCrcInd;
1049    uint8_t     crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
1050 }CrcIndInfo;
1051
1052 typedef struct boInfo
1053 {
1054    uint8_t   lcId;
1055    uint32_t  dataVolume;
1056 }BOInfo;
1057
1058 typedef struct dlRlcBOInfo
1059 {
1060    uint16_t    cellId;
1061    uint16_t    crnti;
1062    uint8_t     lcId;
1063    uint32_t    dataVolume;
1064 }DlRlcBoInfo;
1065
1066 /* Info of Scheduling Request to Add/Modify */
1067 typedef struct schSchedReqInfo
1068 {
1069    uint8_t              schedReqId;
1070    SchSrProhibitTimer   srProhibitTmr;
1071    SchSrTransMax        srTransMax;
1072 }SchSchedReqInfo;
1073
1074 /* Scheduling Request Configuration */
1075 typedef struct schSchedReqCfg
1076 {
1077    uint8_t          addModListCount;
1078    SchSchedReqInfo  addModList[MAX_NUM_SR_CFG_PER_CELL_GRP];   /* List of Scheduling req to be added/modified */
1079    uint8_t          relListCount;
1080    uint8_t          relList[MAX_NUM_SR_CFG_PER_CELL_GRP];      /* list of scheduling request Id to be deleted */
1081 }SchSchedReqCfg;
1082
1083 /* Info of Tag to Add/Modify */
1084 typedef struct schTagInfo
1085 {
1086    uint8_t       tagId;
1087    SchTimeAlignmentTimer  timeAlignmentTmr;
1088 }SchTagInfo;
1089
1090 /* Timing Advance Group Configuration */
1091 typedef struct schTagCfg
1092 {
1093    uint8_t      addModListCount;
1094    SchTagInfo   addModList[MAX_NUM_TAGS];    /* List of Tag to Add/Modify */
1095    uint8_t      relListCount;
1096    uint8_t      relList[MAX_NUM_TAGS];       /* list of Tag Id to release */
1097 }SchTagCfg;
1098
1099 /* Configuration for Power headroom reporting */
1100 typedef struct schPhrCfg
1101 {
1102    SchPhrPeriodicTimer       periodicTmr;
1103    SchPhrProhibitTimer       prohibitTmr;
1104    SchPhrTxPwrFactorChange   txpowerFactorChange;
1105    bool                      multiplePhr;
1106    bool                      dummy;
1107    bool                      type2OtherCell;
1108    SchPhrModeOtherCG         modeOtherCG;
1109 }SchPhrCfg;
1110
1111 /* MAC cell Group configuration */
1112 typedef struct schMacCellGrpCfg
1113 {
1114    SchSchedReqCfg   schedReqCfg;
1115    SchTagCfg        tagCfg;
1116    SchPhrCfg        phrCfg;             /* To be used only if phrCfgSetupPres is true */      
1117 }SchMacCellGrpCfg;
1118
1119 /* Physical Cell Group Configuration */
1120 typedef struct schPhyCellGrpCfg
1121 {
1122    SchPdschHarqAckCodebook    pdschHarqAckCodebook;
1123    int8_t     pNrFr1;
1124 }SchPhyCellGrpCfg;
1125
1126 /* Control resource set info */
1127 typedef struct schControlRsrcSet
1128 {
1129    uint8_t             cRSetId;                /* Control resource set id */
1130    uint8_t             freqDomainRsrc[FREQ_DOM_RSRC_SIZE];  /* Frequency domain resource */
1131    uint8_t             duration;
1132    SchREGMappingType   cceRegMappingType;
1133    SchPrecoderGranul   precoderGranularity;
1134    uint16_t            dmrsScramblingId;
1135 }SchControlRsrcSet;
1136
1137 /* Search Space info */
1138 typedef struct schSearchSpace
1139 {
1140    uint8_t                  searchSpaceId;
1141    uint8_t                  cRSetId;
1142    SchMSlotPeriodAndOffset  mSlotPeriodicityAndOffset;
1143    uint8_t                  mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1144    SchAggrLevel             numCandidatesAggLevel1;      /* Number of candidates for aggregation level 1 */
1145    SchAggrLevel             numCandidatesAggLevel2;      /* Number of candidates for aggregation level 2 */
1146    SchAggrLevel             numCandidatesAggLevel4;      /* Number of candidates for aggregation level 4 */
1147    SchAggrLevel             numCandidatesAggLevel8;      /* Number of candidates for aggregation level 8 */
1148    SchAggrLevel             numCandidatesAggLevel16;     /* Number of candidates for aggregation level 16 */
1149    SchSearchSpaceType       searchSpaceType;
1150    uint8_t                  ueSpecificDciFormat;
1151 }SchSearchSpace;
1152
1153 /* PDCCH cofniguration */
1154 typedef struct schPdcchConfig
1155 {
1156    uint8_t           numCRsetToAddMod;
1157    SchControlRsrcSet  cRSetToAddModList[MAX_NUM_CRSET];           /* List of control resource set to add/modify */
1158    uint8_t           numCRsetToRel;
1159    uint8_t           cRSetToRelList[MAX_NUM_CRSET];              /* List of control resource set to release */
1160    uint8_t           numSearchSpcToAddMod;
1161    SchSearchSpace    searchSpcToAddModList[MAX_NUM_SEARCH_SPC];  /* List of search space to add/modify */
1162    uint8_t           numSearchSpcToRel;
1163    uint8_t           searchSpcToRelList[MAX_NUM_SEARCH_SPC];     /* List of search space to release */
1164 }SchPdcchConfig;
1165
1166 /* PDSCH time domain resource allocation */
1167 typedef struct schPdschTimeDomRsrcAlloc
1168 {
1169    uint8_t    *k0;
1170    SchTimeDomRsrcAllocMappingType    mappingType;
1171    uint8_t    startSymbol;
1172    uint8_t    symbolLength;
1173 }SchPdschTimeDomRsrcAlloc;
1174
1175
1176 typedef struct schPdschBundling
1177 {
1178    struct schStaticBundling
1179    {
1180      SchBundlingSizeSet2 size;
1181    }SchStaticBundling;
1182    struct schDynamicBundling
1183    {
1184      SchBundlingSizeSet1 sizeSet1;
1185      SchBundlingSizeSet2 sizeSet2;
1186    }SchDynamicBundling;
1187 }SchPdschBundling;
1188
1189 /* DMRS downlink configuration */
1190 typedef struct schDmrsDlCfg
1191 {
1192    SchDmrsAdditionPosition   addPos;       /* DMRS additional position */
1193 }SchDmrsDlCfg;
1194
1195 /* PDSCH Configuration */
1196 typedef struct schPdschConfig
1197 {
1198    SchDmrsDlCfg               dmrsDlCfgForPdschMapTypeA;
1199    SchResourceAllocType       resourceAllocType;
1200    uint8_t                    numTimeDomRsrcAlloc;
1201    SchPdschTimeDomRsrcAlloc   timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1202    SchRBGSize                 rbgSize;
1203    SchCodeWordsSchedByDci     numCodeWordsSchByDci;                    /* Number of code words scheduled by DCI */
1204    SchBundlingType            bundlingType;
1205    SchPdschBundling           bundlingInfo;
1206 }SchPdschConfig;
1207
1208 /* Initial Downlink BWP */
1209 typedef struct schInitalDlBwp
1210 {
1211    bool             pdcchCfgPres;
1212    SchPdcchConfig   pdcchCfg;
1213    bool             pdschCfgPres;
1214    SchPdschConfig   pdschCfg;
1215    bool             k0K1TblPrsnt;
1216    SchK0K1TimingInfoTbl k0K1InfoTbl;
1217 }SchInitalDlBwp;
1218
1219 /* BWP Downlink common */
1220 typedef struct schBwpDlCommon
1221 {
1222 }SchBwpDlCommon;
1223
1224 /* Downlink BWP information */
1225 typedef struct schDlBwpInfo
1226 {
1227    uint8_t          bwpId;
1228 }SchDlBwpInfo;
1229
1230 /* PDCCH Serving Cell configuration */
1231 typedef struct schPdschServCellCfg
1232 {
1233    uint8_t                  *maxMimoLayers;           
1234    SchNumHarqProcForPdsch   numHarqProcForPdsch;
1235    SchMaxCodeBlkGrpPerTB    *maxCodeBlkGrpPerTb;
1236    bool                     *codeBlkGrpFlushInd;
1237    SchPdschXOverhead        *xOverhead;
1238 }SchPdschServCellCfg;
1239
1240 /* PUCCH Configuration */
1241 typedef struct schPucchResrcSetInfo
1242 {
1243    uint8_t resrcSetId;
1244    uint8_t resrcListCount;
1245    uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1246    uint8_t maxPayLoadSize;
1247 }SchPucchResrcSetInfo;
1248
1249 typedef struct schPucchResrcSetCfg
1250 {
1251    uint8_t resrcSetToAddModListCount;
1252    SchPucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1253    uint8_t resrcSetToRelListCount;
1254    uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1255 }SchPucchResrcSetCfg;
1256
1257 typedef struct schPucchFormat0
1258 {
1259    uint8_t initialCyclicShift;
1260    uint8_t numSymbols;
1261    uint8_t startSymbolIdx;
1262 }SchPucchFormat0;
1263
1264 typedef struct schPucchFormat1
1265 {
1266    uint8_t initialCyclicShift;
1267    uint8_t numSymbols;
1268    uint8_t startSymbolIdx;
1269    uint8_t timeDomOCC;
1270 }SchPucchFormat1;
1271
1272 typedef struct schPucchFormat2_3
1273 {
1274    uint8_t numPrbs;
1275    uint8_t numSymbols;
1276    uint8_t startSymbolIdx;
1277 }SchPucchFormat2_3;
1278
1279 typedef struct schPucchFormat4
1280 {
1281    uint8_t numSymbols;
1282    uint8_t occLen;
1283    uint8_t occIdx;
1284    uint8_t startSymbolIdx;
1285 }SchPucchFormat4;
1286
1287 typedef struct schPucchResrcInfo
1288 {
1289    uint8_t  resrcId;
1290    uint16_t startPrb;
1291    uint8_t  intraFreqHop;
1292    uint16_t secondPrbHop;
1293    uint8_t  pucchFormat;
1294    union{
1295       SchPucchFormat0   *format0; 
1296       SchPucchFormat1   *format1;
1297       SchPucchFormat2_3 *format2;
1298       SchPucchFormat2_3 *format3;
1299       SchPucchFormat4   *format4;
1300    }SchPucchFormat;
1301 }SchPucchResrcInfo;
1302
1303 typedef struct schPucchResrcCfg
1304 {
1305    uint8_t resrcToAddModListCount;
1306    SchPucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1307    uint8_t resrcToRelListCount;
1308    uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1309 }SchPucchResrcCfg;
1310
1311
1312 typedef struct schSchedReqResrcInfo
1313 {
1314    uint8_t resrcId;
1315    uint8_t requestId;
1316    uint8_t periodicity;
1317    uint16_t offset;
1318    uint8_t resrc;
1319 }SchSchedReqResrcInfo;
1320
1321 typedef struct schPucchSchedReqCfg
1322 {
1323    uint8_t           schedAddModListCount;
1324    SchSchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1325    uint8_t           schedRelListCount;
1326    uint8_t           schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1327 }SchPucchSchedReqCfg;
1328
1329 typedef struct schSpatialRelationInfo
1330 {
1331    uint8_t spatialRelationId;
1332    uint8_t servCellIdx;
1333    uint8_t pathLossRefRSId;
1334    uint8_t p0PucchId;
1335    uint8_t closeLoopIdx;
1336 }SchSpatialRelationInfo;
1337
1338 typedef struct schPucchSpatialCfg
1339 {
1340    uint8_t spatialAddModListCount;
1341    SchSpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1342    uint8_t spatialRelListCount;
1343    uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1344 }SchPucchSpatialCfg;
1345
1346 typedef struct schP0PucchCfg
1347 {
1348    uint8_t p0PucchId;
1349    int     p0PucchVal;
1350 }SchP0PucchCfg;
1351
1352 typedef struct schPathLossRefRSCfg
1353 {
1354    uint8_t pathLossRefRSId;
1355 }SchPathLossRefRSCfg;
1356
1357 typedef struct schPucchMultiCsiCfg
1358 {
1359    uint8_t  multiCsiResrcListCount;
1360    uint8_t  multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1361 }SchPucchMultiCsiCfg;
1362
1363 typedef struct schPucchDlDataToUlAck
1364 {
1365    uint8_t  dlDataToUlAckListCount;
1366    uint8_t  dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1367 }SchPucchDlDataToUlAck;
1368
1369 typedef struct schPucchPowerControl
1370 {
1371    int deltaF_Format0;
1372    int deltaF_Format1;
1373    int deltaF_Format2;
1374    int deltaF_Format3;
1375    int deltaF_Format4;
1376    uint8_t p0SetCount;
1377    SchP0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1378    uint8_t pathLossRefRSListCount;
1379    SchPathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1380 }SchPucchPowerControl;
1381
1382 typedef struct schPucchCfg
1383 {
1384    SchPucchResrcSetCfg   *resrcSet;
1385    SchPucchResrcCfg      *resrc;
1386    SchPucchFormatCfg     *format1; 
1387    SchPucchFormatCfg     *format2; 
1388    SchPucchFormatCfg     *format3; 
1389    SchPucchFormatCfg     *format4;
1390    SchPucchSchedReqCfg   *schedReq;
1391    SchPucchMultiCsiCfg   *multiCsiCfg;
1392    SchPucchSpatialCfg    *spatialInfo;
1393    SchPucchDlDataToUlAck *dlDataToUlAck;
1394    SchPucchPowerControl  *powerControl;
1395 }SchPucchCfg;
1396
1397 /* Transform precoding disabled */
1398 typedef struct schTransPrecodDisabled
1399 {
1400    uint16_t   scramblingId0;
1401 }SchTransPrecodDisabled;
1402
1403 /* DMRS Uplink configuration */
1404 typedef struct SchDmrsUlCfg
1405 {
1406    SchDmrsAdditionPosition    addPos;               /* DMRS additional position */
1407    SchTransPrecodDisabled     transPrecodDisabled;  /* Transform precoding disabled */
1408 }SchDmrsUlCfg;
1409
1410 /* PUSCH Configuration */
1411 typedef struct schPuschCfg
1412 {
1413    uint8_t                    dataScramblingId;
1414    SchDmrsUlCfg               dmrsUlCfgForPuschMapTypeA;
1415    SchResourceAllocType       resourceAllocType;
1416    uint8_t                    numTimeDomRsrcAlloc;
1417    SchPuschTimeDomRsrcAlloc   timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1418    SchTransformPrecoder       transformPrecoder;
1419 }SchPuschCfg;
1420
1421 /* Initial Uplink BWP */
1422 typedef struct schInitialUlBwp
1423 {
1424    bool          pucchCfgPres;
1425    SchPucchCfg   pucchCfg;
1426    bool          puschCfgPres;
1427    SchPuschCfg   puschCfg;
1428    bool          k2TblPrsnt;
1429    SchK2TimingInfoTbl k2InfoTbl;
1430 }SchInitialUlBwp;
1431
1432 /* Uplink BWP information */
1433 typedef struct schUlBwpInfo
1434 {
1435    uint8_t        bwpId;
1436 }SchUlBwpInfo;
1437
1438 /* Serving cell configuration */
1439 typedef struct schServCellCfgInfo
1440 {
1441    SchInitalDlBwp        initDlBwp;
1442    uint8_t               numDlBwpToAdd;
1443    SchDlBwpInfo          DlBwpToAddList[MAX_NUM_BWP];
1444    uint8_t               firstActvDlBwpId;
1445    uint8_t               defaultDlBwpId;
1446    uint8_t               *bwpInactivityTmr;
1447    SchPdschServCellCfg   pdschServCellCfg;
1448    SchInitialUlBwp       initUlBwp;
1449    uint8_t               numUlBwpToAdd;
1450    SchUlBwpInfo          UlBwpToAddList[MAX_NUM_BWP];
1451    uint8_t               firstActvUlBwpId;
1452 }SchServCellCfgInfo;
1453
1454 typedef struct schNonDynFiveQi
1455 {
1456    uint16_t   fiveQi;
1457    uint8_t    priorLevel;
1458    uint16_t   avgWindow;
1459    uint16_t   maxDataBurstVol;
1460 }SchNonDynFiveQi;
1461
1462 typedef struct schDynFiveQi
1463 {
1464    uint8_t    priorLevel;
1465    uint16_t   packetDelayBudget;
1466    uint8_t    packetErrRateScalar;
1467    uint8_t    packetErrRateExp;
1468    uint16_t   fiveQi;
1469    uint8_t    delayCritical;
1470    uint16_t   avgWindow;
1471    uint16_t   maxDataBurstVol;
1472 }SchDynFiveQi;
1473
1474 typedef struct schNgRanAllocAndRetPri
1475 {
1476    uint8_t priorityLevel;
1477    uint8_t preEmptionCap;
1478    uint8_t preEmptionVul;
1479 }SchNgRanAllocAndRetPri;
1480
1481 typedef struct schGrbQosFlowInfo
1482 {
1483    uint32_t maxFlowBitRateDl;
1484    uint32_t maxFlowBitRateUl;
1485    uint32_t guarFlowBitRateDl;
1486    uint32_t guarFlowBitRateUl;
1487 }SchGrbQosFlowInfo;
1488
1489 /* DRB QoS */
1490 typedef struct schDrbQos
1491 {
1492    SchQosType  fiveQiType;   /* Dynamic or non-dynamic */ 
1493    union
1494    {
1495       SchNonDynFiveQi   nonDyn5Qi;
1496       SchDynFiveQi      dyn5Qi;
1497    }u;
1498    SchNgRanAllocAndRetPri  ngRanRetPri;
1499    SchGrbQosFlowInfo       grbQosFlowInfo;
1500    uint16_t                pduSessionId;
1501    uint32_t                ulPduSessAggMaxBitRate;   /* UL PDU Session Aggregate max bit rate */
1502 }SchDrbQosInfo;
1503
1504 /* Special cell configuration */
1505 typedef struct schSpCellCfg
1506 {
1507    uint8_t           servCellIdx;
1508    SchServCellCfgInfo   servCellCfg;
1509 }SchSpCellCfg;
1510
1511 /* Uplink logical channel configuration */
1512 typedef struct SchUlLcCfg
1513 {
1514    uint8_t priority;
1515    uint8_t lcGroup;
1516    uint8_t schReqId;
1517    uint8_t pbr;        // prioritisedBitRate
1518    uint8_t bsd;        // bucketSizeDuration
1519 }SchUlLcCfg;
1520
1521 /* Downlink logical channel configuration */
1522 typedef struct schDlLcCfg
1523 {
1524    uint8_t lcp;      // logical Channel Prioritization
1525 }SchDlLcCfg;
1526
1527 /* Logical Channel configuration */
1528 typedef struct schLcCfg
1529 {
1530    ConfigType     configType;
1531    uint8_t        lcId;
1532    SchDrbQosInfo  *drbQos;
1533    Snssai         *snssai;
1534    SchDlLcCfg     dlLcCfg;
1535    SchUlLcCfg     ulLcCfg;
1536 }SchLcCfg;
1537
1538 /* Aggregate max bit rate */
1539 typedef struct schAmbrCfg
1540 {
1541    uint32_t   ulBr;   /* Ul BitRate */
1542 }SchAmbrCfg;
1543
1544 typedef struct schModulationInfo
1545 {
1546    uint8_t      modOrder;
1547    uint8_t      mcsIndex;
1548    SchMcsTable  mcsTable;
1549 }SchModulationInfo;
1550
1551 /* UE configuration */
1552 typedef struct schUeCfg
1553 {
1554    uint16_t        cellId;
1555    uint16_t        crnti;
1556    bool macCellGrpCfgPres;
1557    SchMacCellGrpCfg   macCellGrpCfg;
1558    bool phyCellGrpCfgPres;
1559    SchPhyCellGrpCfg   phyCellGrpCfg;
1560    bool spCellCfgPres;
1561    SchSpCellCfg       spCellCfg;
1562    SchAmbrCfg         *ambrCfg;
1563    SchModulationInfo  dlModInfo;
1564    SchModulationInfo  ulModInfo;
1565    uint8_t            numLcs;
1566    SchLcCfg           schLcCfg[MAX_NUM_LC];
1567 }SchUeCfg;
1568
1569 typedef struct schUeCfgRsp
1570 {
1571    uint16_t   ueId;
1572    uint16_t   cellId;
1573    uint16_t   crnti;
1574    SchMacRsp  rsp;
1575    SchFailureCause cause;
1576 }SchUeCfgRsp;
1577
1578 typedef struct schUeDelete
1579 {
1580    uint16_t   cellId;
1581    uint16_t   crnti;
1582 }SchUeDelete;
1583
1584 typedef struct schUeDeleteRsp
1585 {
1586    uint16_t   cellId;
1587    uint16_t   crnti;
1588    SchMacRsp  rsp;
1589    ErrorCause cause;
1590 }SchUeDeleteRsp;
1591
1592 typedef struct schCellDelete 
1593 {
1594    uint16_t   cellId;
1595 }SchCellDelete;
1596
1597
1598 typedef struct schCellDeleteRsp
1599 {
1600    uint16_t   cellId;
1601    SchMacRsp  rsp;
1602 }SchCellDeleteRsp;
1603
1604 typedef struct dataVolInfo
1605 {
1606    uint8_t  lcgId;
1607    uint32_t dataVol;
1608 }DataVolInfo;
1609
1610 typedef struct ulBufferStatusRptInd
1611 {
1612    uint16_t    cellId;
1613    uint16_t    crnti;
1614    BsrType     bsrType;
1615    uint8_t     numLcg;
1616    DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
1617 }UlBufferStatusRptInd;
1618
1619 typedef struct srUciIndInfo
1620 {
1621    uint16_t    cellId;
1622    uint16_t    crnti;
1623    SlotTimingInfo slotInd;
1624    uint8_t     numSrBits;
1625    uint8_t     srPayload[MAX_SR_BITS_IN_BYTES];
1626 }SrUciIndInfo;
1627
1628 typedef struct schRrmPolicyRatio
1629 {
1630    uint8_t policyMaxRatio;
1631    uint8_t policyMinRatio;
1632    uint8_t policyDedicatedRatio;
1633 }SchRrmPolicyRatio;
1634
1635 typedef struct schRrmPolicyOfSlice
1636 {
1637    Snssai  snssai;
1638    SchRrmPolicyRatio *rrmPolicyRatioInfo;
1639 }SchRrmPolicyOfSlice;
1640
1641 typedef struct schSliceCfgReq
1642 {
1643    uint8_t  numOfConfiguredSlice;
1644    SchRrmPolicyOfSlice **listOfConfirguration;
1645 }SchSliceCfgReq;
1646
1647 typedef struct sliceRsp
1648 {
1649    Snssai     snssai;
1650    SchMacRsp  rsp;
1651    RspCause   cause;
1652 }SliceRsp;
1653
1654 typedef struct schSliceRsp
1655 {
1656    uint8_t    numSliceCfgRsp;
1657    SliceRsp   **listOfSliceCfgRsp;
1658 }SchSliceCfgRsp;
1659
1660 /* function pointers */
1661 typedef uint8_t (*SchCellCfgCfmFunc)    ARGS((
1662          Pst            *pst,           /* Post Structure */                         
1663          SchCellCfgCfm  *schCellCfgCfm  /* Cell Cfg Cfm */
1664          ));
1665
1666 typedef uint8_t (*SchCellCfgFunc)    ARGS((
1667          Pst         *pst,           /* Post Structure */                         
1668          SchCellCfg  *schCellCfg     /* Cell Cfg  */
1669          ));
1670
1671 typedef uint8_t (*SchMacDlAllocFunc)     ARGS((                     
1672          Pst            *pst,          /* Post Structure */                         
1673          DlSchedInfo    *dlSchedInfo   /* dl allocation Info */                      
1674          ));
1675
1676 typedef uint8_t (*SchMacUlSchInfoFunc)     ARGS((                     
1677          Pst         *pst,           /* Post Structure */                         
1678          UlSchedInfo *ulSchedInfo    /* UL Alloc Sch  Info */                      
1679          ));
1680
1681 typedef uint8_t (*MacSchRachIndFunc) ARGS((
1682          Pst         *pst,         /* Post structure */
1683          RachIndInfo *rachInd));    /* Rach Indication Info */
1684
1685 typedef uint8_t (*MacSchCrcIndFunc) ARGS(( 
1686          Pst         *pst,         /* Post structure */
1687          CrcIndInfo  *crcInd));     /* CRC Info */
1688
1689 typedef uint8_t (*MacSchDlRlcBoInfoFunc) ARGS((
1690          Pst         *pst,         /* Post structure */
1691          DlRlcBoInfo *dlBoInfo));   /* DL BO Info */
1692
1693 typedef uint8_t (*MacSchAddUeConfigReqFunc) ARGS((
1694          Pst         *pst,           /* Post structure */
1695          SchUeCfg    *ueCfgToSch));   /* Scheduler UE Cfg */
1696
1697 typedef uint8_t (*SchUeCfgRspFunc) ARGS((
1698          Pst         *pst,           /* Post structure */
1699          SchUeCfgRsp *cfgRsp));       /* Scheduler UE Cfg response */
1700
1701 typedef uint8_t (*MacSchSlotIndFunc) ARGS((
1702          Pst         *pst,          /* Post structure */
1703          SlotTimingInfo *slotInd));    /* Slot Info */
1704
1705 typedef uint8_t (*MacSchBsrFunc)       ARGS((
1706    Pst                  *pst,
1707    UlBufferStatusRptInd *bsrInd
1708 ));
1709
1710 typedef uint8_t (*MacSchSrUciIndFunc) ARGS(( 
1711          Pst         *pst,         /* Post structure */
1712          SrUciIndInfo  *uciInd));    /* UCI IND Info */
1713
1714 typedef uint8_t (*MacSchModUeConfigReqFunc) ARGS((
1715          Pst         *pst,           /* Post structure */
1716          SchUeCfg    *ueCfgToSch));   /* Scheduler UE Cfg */
1717
1718 typedef uint8_t (*SchUeReCfgRspFunc) ARGS((
1719          Pst         *pst,           /* Post structure */
1720          SchUeCfgRsp *cfgRsp));       /* Scheduler UE Cfg response */
1721
1722 typedef uint8_t (*MacSchUeDeleteReqFunc) ARGS((
1723    Pst         *pst,           /* Post structure */
1724    SchUeDelete *schUeDel)); /*Scheduler UE Del*/
1725
1726 typedef uint8_t (*SchUeDeleteRspFunc) ARGS((
1727    Pst          *pst,           /* Post structure */
1728    SchUeDeleteRsp *delRsp));       /* Scheduler UE delete response */
1729
1730 typedef uint8_t (*MacSchCellDeleteReqFunc) ARGS((
1731    Pst         *pst,           /* Post structure */
1732    SchCellDelete *schCellDelete)); /*Scheduler UE Del*/
1733
1734 typedef uint8_t (*SchCellDeleteRspFunc) ARGS((
1735    Pst          *pst,           /* Post structure */
1736    SchCellDeleteRsp *schCellDeleteRsp));       /* Scheduler UE delete response */
1737
1738 typedef uint8_t (*MacSchSliceCfgReqFunc) ARGS((
1739    Pst          *pst,           /* Post structure */
1740    SchSliceCfgReq *schSliceCfgReq));  /* Scheduler Slice Cfg Req */
1741
1742 typedef uint8_t (*SchSliceCfgRspFunc)    ARGS((
1743          Pst            *pst,            /* Post Structure */                         
1744          SchSliceCfgRsp  *schSliceCfgRsp /* Cell Cfg Cfm */
1745          ));
1746
1747 typedef uint8_t (*MacSchSliceReCfgReqFunc) ARGS((
1748    Pst          *pst,           /* Post structure */
1749    SchSliceCfgReq *schSliceReCfgReq));  /* Scheduler Slice ReCfg Req */
1750
1751 typedef uint8_t (*SchSliceReCfgRspFunc)    ARGS((
1752          Pst            *pst,            /* Post Structure */                         
1753          SchSliceCfgRsp  *schSliceReCfgRsp /* Cell ReCfg Cfm */
1754          ));
1755 /* function declarations */
1756 uint8_t packMacSchSlotInd(Pst *pst, SlotTimingInfo *slotInd);
1757 uint8_t packSchMacDlAlloc(Pst *pst, DlSchedInfo  *dlSchedInfo);
1758 uint8_t packSchMacUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo);
1759 uint8_t packSchCellCfg(Pst *pst, SchCellCfg  *schCellCfg);
1760 uint8_t packSchCellCfgCfm(Pst *pst, SchCellCfgCfm  *schCellCfgCfm);
1761 uint8_t MacProcDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo);
1762 uint8_t MacProcSchCellCfg(Pst *pst, SchCellCfg  *schCellCfg);
1763 uint8_t MacProcSchCellCfgCfm(Pst *pst, SchCellCfgCfm  *schCellCfgCfm);
1764 uint8_t SchHdlCellCfgReq(Pst *pst, SchCellCfg *schCellCfg);
1765 uint8_t schActvInit(Ent entity, Inst instId, Region region, Reason reason);
1766 uint8_t MacProcUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo);
1767 uint8_t packMacSchRachInd(Pst *pst, RachIndInfo *rachInd);
1768 uint8_t MacSchRachInd(Pst *pst, RachIndInfo *rachInd);
1769 uint8_t packMacSchCrcInd(Pst *pst, CrcIndInfo *crcInd);
1770 uint8_t MacSchCrcInd(Pst *pst, CrcIndInfo *crcInd);
1771 uint8_t packMacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo);
1772 uint8_t MacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo);
1773 uint8_t packMacSchAddUeConfigReq(Pst *pst, SchUeCfg *ueCfgToSch);
1774 uint8_t MacSchAddUeConfigReq(Pst *pst, SchUeCfg *ueCfgToSch);
1775 uint8_t packSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
1776 uint8_t MacProcSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
1777 uint8_t MacSchSlotInd ARGS((Pst * pst, SlotTimingInfo * slotInd));
1778 uint8_t packMacSchSlotInd(Pst * pst, SlotTimingInfo * slotInd);
1779 uint8_t unpackMacSchSlotInd(MacSchSlotIndFunc func, Pst *pst, Buffer  *mBuf);
1780 uint8_t packMacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd);
1781 uint8_t MacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd);
1782 uint8_t packMacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd);
1783 uint8_t MacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd);
1784 uint8_t packMacSchModUeConfigReq(Pst *pst, SchUeCfg *ueCfgToSch);
1785 uint8_t MacSchModUeConfigReq(Pst *pst, SchUeCfg *ueCfgToSch);
1786 uint8_t packSchUeReconfigRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
1787 uint8_t MacProcSchUeReconfigRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
1788 uint8_t packMacSchUeDeleteReq(Pst *pst,  SchUeDelete *schUeDel);
1789 uint8_t MacSchUeDeleteReq(Pst *pst, SchUeDelete  *ueDelete);
1790 uint8_t packSchUeDeleteRsp(Pst *pst, SchUeDeleteRsp  *delRsp);
1791 uint8_t MacProcSchUeDeleteRsp(Pst *pst, SchUeDeleteRsp *schUeDelRsp);
1792 uint8_t packMacSchCellDeleteReq(Pst *pst,  SchCellDelete *schCellDelete);
1793 uint8_t MacSchCellDeleteReq(Pst *pst, SchCellDelete  *schCellDelete);
1794 uint8_t packSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp  *schCellDeleteRsp);
1795 uint8_t MacProcSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDeleteRsp);
1796 uint8_t packMacSchSliceCfgReq(Pst *pst, SchSliceCfgReq *cfgReq);
1797 uint8_t MacSchSliceCfgReq(Pst *pst, SchSliceCfgReq *schSliceCfgReq);
1798 uint8_t packSchSliceCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp);
1799 uint8_t MacProcSchSliceCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp);
1800 uint8_t packMacSchSliceReCfgReq(Pst *pst, SchSliceCfgReq *cfgReq);
1801 uint8_t MacSchSliceReCfgReq(Pst *pst, SchSliceCfgReq *schSliceCfgReq);
1802 uint8_t packSchSliceReCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp);
1803 uint8_t MacProcSchSliceReCfgRsp(Pst *pst, SchSliceCfgRsp *sliceReCfgrsp);
1804 /**********************************************************************
1805   End of file
1806  **********************************************************************/
1807