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