[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-415]: Paging Configuration
[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    
453    /*Ref:Spec 38.331 "ssb-PositionsInBurst", Value 0 in Bitmap => corresponding SS/PBCH block is not transmitted
454     *value 1 => corresponding SS/PBCH block is transmitted*/
455    uint8_t     totNumSsb;       /*S = Total Number of Actual SSB transmitted*/
456 }SchSsbCfg;
457
458 typedef struct bwpCfg
459 {
460    uint8_t         subcarrierSpacing;
461    uint8_t         cyclicPrefix;
462    FreqDomainAlloc freqAlloc;   
463 }BwpCfg;
464
465 typedef struct prg
466 {
467    uint16_t pmIdx;
468    uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
469 } Prg;
470
471 typedef struct beamformingInfo
472 {
473    uint16_t numPrgs;
474    uint16_t prgSize;
475    uint8_t  digBfInterfaces;
476    Prg  prg[MAX_NUM_PRG];
477 } BeamformingInfo;
478
479 /* SIB1 PDSCH structures */
480
481 typedef struct codewordinfo
482 {
483    uint16_t targetCodeRate;
484    uint8_t  qamModOrder;
485    uint8_t  mcsIndex;
486    uint8_t  mcsTable;
487    uint8_t  rvIndex;
488    uint32_t tbSize;
489 } CodewordInfo;
490
491 typedef struct dmrsInfo
492 {
493    uint16_t dlDmrsSymbPos;
494    uint8_t  dmrsConfigType;
495    uint16_t dlDmrsScramblingId;
496    uint8_t  scid;
497    uint8_t  numDmrsCdmGrpsNoData;
498    uint16_t dmrsPorts;
499    uint8_t mappingType;
500    uint8_t nrOfDmrsSymbols;
501    uint8_t dmrsAddPos;
502 } DmrsInfo;
503
504 typedef struct pdschFreqAlloc
505 {
506    uint8_t  resourceAllocType;
507    /* since we are using type-1, rbBitmap excluded */
508    FreqDomainAlloc freqAlloc;
509    uint8_t  vrbPrbMapping;
510 } PdschFreqAlloc;
511
512 typedef struct pdschTimeAlloc
513 {
514    uint8_t         rowIndex;
515    TimeDomainAlloc timeAlloc;
516 } PdschTimeAlloc;
517
518 typedef struct txPowerPdschInfo
519 {
520    uint8_t powerControlOffset;
521    uint8_t powerControlOffsetSS;
522 } TxPowerPdschInfo;
523
524 typedef struct pdschCfg
525 {
526    uint16_t         pduBitmap;
527    uint16_t         rnti;
528    uint16_t         pduIndex;
529    uint8_t          numCodewords;
530    CodewordInfo     codeword[MAX_CODEWORDS];
531    uint16_t         dataScramblingId;
532    uint8_t          numLayers;
533    uint8_t          transmissionScheme;
534    uint8_t          refPoint;
535    DmrsInfo         dmrs;
536    PdschFreqAlloc   pdschFreqAlloc;
537    PdschTimeAlloc   pdschTimeAlloc;
538    BeamformingInfo  beamPdschInfo;
539    TxPowerPdschInfo txPdschPower;
540 } PdschCfg;
541 /* SIB1 PDSCH structures end */
542
543 /* SIB1 interface structure */
544
545 typedef struct coresetCfg
546 {
547    uint8_t coreSetSize;
548    uint8_t startSymbolIndex;
549    uint8_t durationSymbols;
550    uint8_t freqDomainResource[6];
551    uint8_t cceRegMappingType;
552    uint8_t regBundleSize;
553    uint8_t interleaverSize;
554    uint8_t coreSetType;
555    uint16_t shiftIndex;
556    uint8_t precoderGranularity;
557    uint8_t cceIndex;
558    uint8_t aggregationLevel;
559 } CoresetCfg;
560
561 typedef struct txPowerPdcchInfo
562 {
563    uint8_t powerValue;
564    uint8_t powerControlOffsetSS;
565 } TxPowerPdcchInfo;
566
567 typedef struct dlDCI
568 {
569    uint16_t rnti;
570    uint16_t scramblingId;
571    uint16_t scramblingRnti;
572    uint8_t cceIndex;
573    uint8_t aggregLevel;
574    BeamformingInfo beamPdcchInfo;
575    TxPowerPdcchInfo txPdcchPower;
576    PdschCfg     *pdschCfg;
577 } DlDCI;
578
579 typedef struct pdcchCfg
580 {
581    /* coreset-0 configuration */
582    CoresetCfg coresetCfg;
583
584    uint16_t numDlDci;
585    DlDCI    dci; /* as of now its only one DCI, later it will be numDlCi */
586 } PdcchCfg;
587 /* end of SIB1 PDCCH structures */
588
589 typedef struct pageCfg
590 {
591    uint8_t  numPO;                    /*Derived from Ns*/
592    bool     poPresent;                /*FirstPDCCH-MonitoringPO is present or not*/
593    uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
594 }PageCfg;
595
596 typedef struct
597 {
598    /* parameters recieved from DU-APP */
599    uint16_t sib1PduLen;
600    uint16_t sib1RepetitionPeriod;
601    uint8_t  coresetZeroIndex;     /* derived from 4 LSB of pdcchSib1 present in MIB */
602    uint8_t  searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
603    uint16_t sib1Mcs;
604
605    /* parameters derived in scheduler */
606    uint8_t   n0;
607    BwpCfg    bwp;
608    PdcchCfg  sib1PdcchCfg;
609    PdschCfg  sib1PdschCfg;
610    PageCfg   pageCfg;         /*Config of Paging*/
611 }SchSib1Cfg;
612
613 typedef struct schRachCfg
614 {
615    uint8_t      prachCfgIdx;       /* PRACH config idx */
616    uint8_t      prachSubcSpacing;  /* Subcarrier spacing of RACH */
617    uint16_t     msg1FreqStart;     /* Msg1-FrequencyStart */
618    uint8_t      msg1Fdm;           /* PRACH FDM (1,2,4,8) */
619    uint8_t      rootSeqLen;        /* root sequence length */
620    uint16_t     rootSeqIdx;        /* Root sequence index */
621    uint8_t      numRootSeq;        /* Number of root sequences required for FD */
622    uint16_t     k1;                /* Frequency Offset for each FD */
623    uint8_t      ssbPerRach;        /* SSB per RACH occassion */
624    uint8_t      prachMultCarrBand; /* Presence of Multiple carriers in Band */
625    uint8_t      raContResTmr;      /* RA Contention Resoultion Timer */
626    uint8_t      rsrpThreshSsb;     /* RSRP Threshold SSB */
627    uint8_t      raRspWindow;       /* RA Response Window */
628 }SchRachCfg;
629
630 typedef struct schBwpParams
631 {
632    FreqDomainAlloc freqAlloc;
633    uint8_t         scs;
634    uint8_t         cyclicPrefix;
635 }SchBwpParams;
636
637 typedef struct schCandidatesInfo
638 {
639    uint8_t aggLevel1;
640    uint8_t aggLevel2;
641    uint8_t aggLevel4;
642    uint8_t aggLevel8;
643    uint8_t aggLevel16;
644 }SchCandidatesInfo;
645
646 typedef struct schSearchSpaceCfg
647 {
648    uint8_t  searchSpaceId;
649    uint8_t  coresetId;
650    uint8_t  freqDomainRsrc[FREQ_DOM_RSRC_SIZE];  /* Frequency domain resource */
651    uint16_t monitoringSlot;
652    uint16_t duration;
653    uint16_t monitoringSymbol;
654    SchCandidatesInfo candidate;
655 }SchSearchSpaceCfg;
656
657 typedef struct schPdcchCfgCmn
658 {
659    SchSearchSpaceCfg commonSearchSpace;
660    uint8_t raSearchSpaceId;
661 }SchPdcchCfgCmn;
662
663 typedef struct schPdschCfgCmnTimeDomRsrcAlloc
664 {
665    uint8_t k0;
666    uint8_t mappingType;
667    uint8_t startSymbol;
668    uint8_t lengthSymbol;
669 }SchPdschCfgCmnTimeDomRsrcAlloc;
670
671 typedef struct schPdschCfgCmn
672 {
673    uint8_t   numTimeDomAlloc;
674    SchPdschCfgCmnTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
675 }SchPdschCfgCmn;
676
677 typedef struct schPucchCfgCmn
678 {
679    uint8_t pucchResourceCommon;
680    uint8_t pucchGroupHopping;
681 }SchPucchCfgCmn;
682
683 /* PUSCH Time Domain Resource Allocation */
684 typedef struct schPuschTimeDomRsrcAlloc
685 {
686    uint8_t   k2;
687    SchTimeDomRsrcAllocMappingType   mappingType;
688    uint8_t   startSymbol;
689    uint8_t   symbolLength;
690 }SchPuschTimeDomRsrcAlloc;
691
692 typedef struct schPuschCfgCmn
693 {
694    uint8_t                    numTimeDomRsrcAlloc;
695    SchPuschTimeDomRsrcAlloc   timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
696 }SchPuschCfgCmn;
697
698 typedef struct schK1TimingInfo
699 {
700    uint8_t numK1;
701    uint8_t k1Indexes[MAX_NUM_K1_IDX];
702 }SchK1TimingInfo;
703
704 typedef struct schK0TimingInfo
705 {
706    uint8_t k0Index;
707    SchK1TimingInfo k1TimingInfo;
708 }SchK0TimingInfo;
709
710 typedef struct schK0K1TimingInfo
711 {
712    uint8_t numK0;
713    SchK0TimingInfo k0Indexes[MAX_NUM_K0_IDX];
714 }SchK0K1TimingInfo;
715
716 typedef struct schK0K1TimingInfoTbl
717 {
718    uint16_t tblSize;
719    SchK0K1TimingInfo k0k1TimingInfo[MAX_NUM_CONFIG_SLOTS];
720 }SchK0K1TimingInfoTbl;
721
722 typedef struct schBwpDlCfg
723 {
724    SchBwpParams   bwp;
725    SchPdcchCfgCmn pdcchCommon;
726    SchPdschCfgCmn pdschCommon;
727    SchK0K1TimingInfoTbl k0K1InfoTbl;
728 }SchBwpDlCfg;
729
730 typedef struct schK2TimingInfo
731 {
732    uint8_t numK2; 
733    uint8_t k2Indexes[MAX_NUM_K2_IDX]; 
734 }SchK2TimingInfo;
735
736 typedef struct schK2TimingInfoTbl
737 {
738    uint16_t tblSize; 
739    SchK2TimingInfo k2TimingInfo[MAX_NUM_CONFIG_SLOTS]; 
740 }SchK2TimingInfoTbl;
741
742 typedef struct schBwpUlCfg
743 {
744    SchBwpParams   bwp;
745    SchPucchCfgCmn pucchCommon;
746    SchPuschCfgCmn puschCommon;
747    SchK2TimingInfoTbl msg3K2InfoTbl;
748    SchK2TimingInfoTbl k2InfoTbl;
749 }SchBwpUlCfg;
750
751 typedef struct schPlmnInfoList
752 {
753    Plmn           plmn;
754    uint8_t        numSliceSupport; /* Total slice supporting */
755    Snssai         **snssai;         /* List of supporting snssai*/
756 }SchPlmnInfoList;
757
758 typedef struct schCellCfg
759 {
760    uint16_t       cellId;           /* Cell Id */
761    uint16_t       phyCellId;        /* Physical cell id */
762    uint8_t        numerology;       /* Supported numerology */
763    SchDuplexMode  dupMode;          /* Duplex type: TDD/FDD */
764    uint8_t        bandwidth;        /* Supported B/W */
765    uint32_t       dlFreq;           /* DL Frequency */
766    uint32_t       ulFreq;           /* UL Frequency */
767    SchSsbCfg      ssbSchCfg;        /* SSB config */
768    SchSib1Cfg     sib1SchCfg;       /* SIB1 config */
769    SchRachCfg     schRachCfg;       /* PRACH config */
770    SchBwpDlCfg    schInitialDlBwp;  /* Initial DL BWP */
771    SchBwpUlCfg    schInitialUlBwp;  /* Initial UL BWP */
772    SchPlmnInfoList plmnInfoList;     /* Consits of PlmnId and Snssai list */
773 #ifdef NR_TDD
774    TDDCfg         tddCfg;           /* TDD Cfg */ 
775 #endif  
776 }SchCellCfg;
777
778 typedef struct schCellCfgCfm
779 {
780    uint16_t         cellId;     /* Cell Id */
781    SchMacRsp   rsp;   
782 }SchCellCfgCfm;
783
784 typedef struct ssbInfo
785 {
786    uint8_t         ssbIdx;          /* SSB Index */
787    TimeDomainAlloc tdAlloc; /* Time domain allocation */
788    FreqDomainAlloc fdAlloc; /* Freq domain allocation */
789 }SsbInfo;
790
791 typedef struct sib1AllocInfo
792 {
793    BwpCfg bwp;
794    PdcchCfg sib1PdcchCfg;
795    PdschCfg sib1PdschCfg;
796 } Sib1AllocInfo;
797
798 typedef struct prachSchInfo
799 {
800    uint8_t  numPrachOcas;   /* Num Prach Ocassions */
801    uint8_t  prachFormat;    /* PRACH Format */
802    uint8_t  numRa;          /* Freq domain ocassion */
803    uint8_t  prachStartSymb; /* Freq domain ocassion */
804 }PrachSchInfo;
805
806 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
807 typedef struct dlBrdcstAlloc
808 {
809    /* Ssb transmission is determined as follows:
810     * 0 : No tranamission
811     * 1 : SSB Transmission
812     * 2 : SSB Repetition */
813    uint8_t ssbTrans;
814    uint8_t ssbIdxSupported;
815    SsbInfo ssbInfo[MAX_SSB_IDX];
816    /* Sib1 transmission is determined as follows:
817     * 0 : No tranamission
818     * 1 : SIB1 Transmission
819     * 2 : SIB1 Repetition */
820    uint8_t sib1Trans;
821    Sib1AllocInfo sib1Alloc;
822 }DlBrdcstAlloc;
823
824 typedef struct msg3UlGrant
825 {
826    uint8_t         freqHopFlag;
827    uint16_t        bwpSize;
828    FreqDomainAlloc msg3FreqAlloc;
829    uint8_t         k2Index;
830    uint8_t         mcs;
831    uint8_t         tpc;
832    uint8_t         csiReq;
833 }Msg3UlGrant;
834
835 typedef struct rarInfo
836 {
837    uint16_t        raRnti;
838    uint8_t         RAPID;
839    uint16_t        ta;
840    Msg3UlGrant     ulGrant;
841    uint16_t        tcrnti;
842    uint8_t         rarPdu[RAR_PAYLOAD_SIZE];
843    uint8_t         rarPduLen;
844 }RarInfo;
845
846 typedef struct rarAlloc
847 {
848    DlPduType  pduPres;
849    uint8_t    pdschSlot;
850    RarInfo rarInfo;
851    BwpCfg  bwp;
852    PdcchCfg rarPdcchCfg;
853    PdschCfg rarPdschCfg;
854 }RarAlloc;
855
856 typedef struct dlMsgInfo
857 {
858    uint16_t crnti;
859    uint8_t  ndi;
860    uint8_t  harqProcNum;
861    uint8_t  dlAssignIdx;
862    uint8_t  pucchTpc;
863    uint8_t  pucchResInd;
864    uint8_t  harqFeedbackInd;
865    uint8_t  dciFormatId;
866    bool     isMsg4Pdu;
867    uint16_t  dlMsgPduLen;
868    uint8_t  *dlMsgPdu;
869 }DlMsgInfo;
870
871 typedef struct lcSchInfo
872 {
873    uint8_t   lcId;
874    uint32_t  schBytes; /* Number of scheduled bytes */
875 }LcSchInfo;
876
877 typedef struct dlMsgSchedInfo
878 {
879    uint8_t    numLc;
880    LcSchInfo  lcSchInfo[MAX_NUM_LC]; /* Scheduled LC info */
881    BwpCfg     bwp;
882    PdcchCfg   dlMsgPdcchCfg;
883    PdschCfg   dlMsgPdschCfg;
884    DlPduType  pduPres;
885    uint8_t    pdschSlot;
886    DlMsgInfo  dlMsgInfo;
887 }DlMsgSchInfo;
888
889 typedef struct dlMsgAlloc
890 {
891    uint16_t     crnti;
892    uint8_t      numSchedInfo;
893    DlMsgSchInfo dlMsgSchedInfo[2];
894 }DlMsgAlloc;
895
896 typedef struct schSlotValue
897 {
898    SlotTimingInfo currentTime;
899    SlotTimingInfo broadcastTime;
900    SlotTimingInfo rarTime;
901    SlotTimingInfo dlMsgTime;
902    SlotTimingInfo ulDciTime;
903 }SchSlotValue;
904
905 typedef struct format0_0
906 {
907    uint8_t         resourceAllocType;
908    /* since we are using type-1, hence rbBitmap excluded */
909    FreqDomainAlloc freqAlloc;
910    TimeDomainAlloc timeAlloc;
911    uint16_t        rowIndex;
912    uint8_t         mcs;
913    uint8_t         harqProcId;   /* HARQ Process ID */
914    bool            puschHopFlag;
915    bool            freqHopFlag;
916    uint8_t         ndi;    /* NDI */
917    uint8_t         rv;     /* Redundancy Version */
918    uint8_t         tpcCmd;
919    bool            sUlCfgd;
920 }Format0_0;
921
922 typedef struct format0_1
923 {
924 /* TBD */
925
926 }Format0_1;
927
928 typedef struct format1_0
929 {
930 /* TBD */
931
932 }Format1_0;
933
934 typedef struct format1_1
935 {
936 /* TBD */
937 }Format1_1;
938
939 typedef struct dciInfo
940 {
941    uint16_t      cellId;   
942    uint16_t      crnti;          /* CRNI */
943    SlotTimingInfo   slotIndInfo;    /* Slot Info: sfn, slot number */
944    BwpCfg        bwpCfg;         /* BWP Cfg */
945    CoresetCfg    coresetCfg;     /* Coreset1 Cfg */
946    FormatType    formatType;     /* DCI Format */
947    union
948    {
949       Format0_0  format0_0;      /* Format 0_0 */
950       Format0_1  format0_1;      /* Format 0_1 */
951       Format1_0  format1_0;      /* Format 1_0 */
952       Format1_1  format1_1;      /* Format 1_1 */
953    }format;
954    DlDCI    dciInfo;
955 }DciInfo;
956
957
958 typedef struct dlSchedInfo
959 {
960    uint16_t cellId;  /* Cell Id */
961    SchSlotValue schSlotValue;
962
963    /* Allocation for broadcast messages */
964    bool isBroadcastPres;
965    DlBrdcstAlloc brdcstAlloc;
966
967    /* Allocation for RAR message */
968    RarAlloc *rarAlloc[MAX_NUM_UE];
969
970    /* UL grant in response to BSR */
971    DciInfo    *ulGrant;
972
973    /* Allocation from dedicated DL msg */
974    DlMsgAlloc *dlMsgAlloc[MAX_NUM_UE];
975
976 }DlSchedInfo;
977
978 typedef struct tbInfo
979 {
980    uint8_t  qamOrder;  /* Modulation Order */
981    uint8_t  mcs;       /* MCS */
982    SchMcsTable  mcsTable;  /* MCS Table */
983    uint8_t  ndi;       /* NDI */
984    uint8_t  rv;        /* Redundancy Version */
985    uint16_t tbSize;    /* TB Size */
986 }TbInfo;
987
988 typedef struct schPuschInfo
989 {
990    uint16_t         crnti;
991    uint8_t          harqProcId;   /* HARQ Process ID */
992    uint8_t          resAllocType; /* Resource allocation type */
993    FreqDomainAlloc  fdAlloc;      /* Freq domain allocation */
994    TimeDomainAlloc  tdAlloc;      /* Time domain allocation */
995    TbInfo           tbInfo;       /* TB info */
996    uint8_t          dmrsMappingType;
997    uint8_t          nrOfDmrsSymbols;
998    uint8_t          dmrsAddPos;
999 }SchPuschInfo;
1000
1001 typedef struct schPucchFormatCfg
1002 {
1003    uint8_t interSlotFreqHop;
1004    uint8_t addDmrs;
1005    uint8_t maxCodeRate;
1006    uint8_t numSlots;
1007    bool    pi2BPSK;
1008    bool    harqAckCSI;
1009 }SchPucchFormatCfg;
1010
1011 typedef struct schPucchInfo
1012 {
1013    uint16_t         rnti;
1014    uint8_t          pucchFormat;
1015    FreqDomainAlloc  fdAlloc;      /* Freq domain allocation */
1016    TimeDomainAlloc  tdAlloc;      /* Time domain allocation */
1017    uint8_t          srFlag;
1018    uint8_t          harqFlag;
1019    uint8_t          numHarqBits;
1020    uint8_t          uciFlag;
1021    uint8_t          numUciBits;
1022    uint8_t          intraFreqHop;
1023    uint16_t         secondPrbHop;
1024    uint8_t          initialCyclicShift;
1025    uint8_t          occLen;
1026    uint8_t          occIdx;
1027    uint8_t          timeDomOCC;
1028    SchPucchFormatCfg cmnFormatCfg;
1029 }SchPucchInfo;
1030
1031 typedef struct ulSchedInfo
1032 {
1033    uint16_t      cellId;         /* Cell Id */
1034    uint16_t      crnti;          /* CRNI */
1035    SlotTimingInfo   slotIndInfo;    /* Slot Info: sfn, slot number */
1036    uint8_t       dataType;       /* Type of info being scheduled */
1037    PrachSchInfo  prachSchInfo;   /* Prach scheduling info */
1038    SchPuschInfo  schPuschInfo;   /* Pusch scheduling info */
1039    SchPucchInfo  schPucchInfo;   /* Pusch scheduling info */
1040 }UlSchedInfo;
1041
1042 typedef struct rachIndInfo
1043 {
1044    uint16_t    cellId;
1045    uint16_t    crnti;
1046    SlotTimingInfo timingInfo;
1047    uint8_t     slotIdx;
1048    uint8_t     symbolIdx;
1049    uint8_t     freqIdx;
1050    uint8_t     preambleIdx;
1051    uint16_t    timingAdv;
1052 }RachIndInfo;
1053
1054
1055 typedef struct crcIndInfo
1056 {
1057    uint16_t    cellId;
1058    uint16_t    crnti;
1059    SlotTimingInfo timingInfo;
1060    uint16_t    numCrcInd;
1061    uint8_t     crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
1062 }CrcIndInfo;
1063
1064 typedef struct boInfo
1065 {
1066    uint8_t   lcId;
1067    uint32_t  dataVolume;
1068 }BOInfo;
1069
1070 typedef struct dlRlcBOInfo
1071 {
1072    uint16_t    cellId;
1073    uint16_t    crnti;
1074    uint8_t     lcId;
1075    uint32_t    dataVolume;
1076 }DlRlcBoInfo;
1077
1078 /* Info of Scheduling Request to Add/Modify */
1079 typedef struct schSchedReqInfo
1080 {
1081    uint8_t              schedReqId;
1082    SchSrProhibitTimer   srProhibitTmr;
1083    SchSrTransMax        srTransMax;
1084 }SchSchedReqInfo;
1085
1086 /* Scheduling Request Configuration */
1087 typedef struct schSchedReqCfg
1088 {
1089    uint8_t          addModListCount;
1090    SchSchedReqInfo  addModList[MAX_NUM_SR_CFG_PER_CELL_GRP];   /* List of Scheduling req to be added/modified */
1091    uint8_t          relListCount;
1092    uint8_t          relList[MAX_NUM_SR_CFG_PER_CELL_GRP];      /* list of scheduling request Id to be deleted */
1093 }SchSchedReqCfg;
1094
1095 /* Info of Tag to Add/Modify */
1096 typedef struct schTagInfo
1097 {
1098    uint8_t       tagId;
1099    SchTimeAlignmentTimer  timeAlignmentTmr;
1100 }SchTagInfo;
1101
1102 /* Timing Advance Group Configuration */
1103 typedef struct schTagCfg
1104 {
1105    uint8_t      addModListCount;
1106    SchTagInfo   addModList[MAX_NUM_TAGS];    /* List of Tag to Add/Modify */
1107    uint8_t      relListCount;
1108    uint8_t      relList[MAX_NUM_TAGS];       /* list of Tag Id to release */
1109 }SchTagCfg;
1110
1111 /* Configuration for Power headroom reporting */
1112 typedef struct schPhrCfg
1113 {
1114    SchPhrPeriodicTimer       periodicTmr;
1115    SchPhrProhibitTimer       prohibitTmr;
1116    SchPhrTxPwrFactorChange   txpowerFactorChange;
1117    bool                      multiplePhr;
1118    bool                      dummy;
1119    bool                      type2OtherCell;
1120    SchPhrModeOtherCG         modeOtherCG;
1121 }SchPhrCfg;
1122
1123 /* MAC cell Group configuration */
1124 typedef struct schMacCellGrpCfg
1125 {
1126    SchSchedReqCfg   schedReqCfg;
1127    SchTagCfg        tagCfg;
1128    SchPhrCfg        phrCfg;             /* To be used only if phrCfgSetupPres is true */      
1129 }SchMacCellGrpCfg;
1130
1131 /* Physical Cell Group Configuration */
1132 typedef struct schPhyCellGrpCfg
1133 {
1134    SchPdschHarqAckCodebook    pdschHarqAckCodebook;
1135    int8_t     pNrFr1;
1136 }SchPhyCellGrpCfg;
1137
1138 /* Control resource set info */
1139 typedef struct schControlRsrcSet
1140 {
1141    uint8_t             cRSetId;                /* Control resource set id */
1142    uint8_t             freqDomainRsrc[FREQ_DOM_RSRC_SIZE];  /* Frequency domain resource */
1143    uint8_t             duration;
1144    SchREGMappingType   cceRegMappingType;
1145    SchPrecoderGranul   precoderGranularity;
1146    uint16_t            dmrsScramblingId;
1147 }SchControlRsrcSet;
1148
1149 /* Search Space info */
1150 typedef struct schSearchSpace
1151 {
1152    uint8_t                  searchSpaceId;
1153    uint8_t                  cRSetId;
1154    SchMSlotPeriodAndOffset  mSlotPeriodicityAndOffset;
1155    uint8_t                  mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1156    SchAggrLevel             numCandidatesAggLevel1;      /* Number of candidates for aggregation level 1 */
1157    SchAggrLevel             numCandidatesAggLevel2;      /* Number of candidates for aggregation level 2 */
1158    SchAggrLevel             numCandidatesAggLevel4;      /* Number of candidates for aggregation level 4 */
1159    SchAggrLevel             numCandidatesAggLevel8;      /* Number of candidates for aggregation level 8 */
1160    SchAggrLevel             numCandidatesAggLevel16;     /* Number of candidates for aggregation level 16 */
1161    SchSearchSpaceType       searchSpaceType;
1162    uint8_t                  ueSpecificDciFormat;
1163 }SchSearchSpace;
1164
1165 /* PDCCH cofniguration */
1166 typedef struct schPdcchConfig
1167 {
1168    uint8_t           numCRsetToAddMod;
1169    SchControlRsrcSet  cRSetToAddModList[MAX_NUM_CRSET];           /* List of control resource set to add/modify */
1170    uint8_t           numCRsetToRel;
1171    uint8_t           cRSetToRelList[MAX_NUM_CRSET];              /* List of control resource set to release */
1172    uint8_t           numSearchSpcToAddMod;
1173    SchSearchSpace    searchSpcToAddModList[MAX_NUM_SEARCH_SPC];  /* List of search space to add/modify */
1174    uint8_t           numSearchSpcToRel;
1175    uint8_t           searchSpcToRelList[MAX_NUM_SEARCH_SPC];     /* List of search space to release */
1176 }SchPdcchConfig;
1177
1178 /* PDSCH time domain resource allocation */
1179 typedef struct schPdschTimeDomRsrcAlloc
1180 {
1181    uint8_t    *k0;
1182    SchTimeDomRsrcAllocMappingType    mappingType;
1183    uint8_t    startSymbol;
1184    uint8_t    symbolLength;
1185 }SchPdschTimeDomRsrcAlloc;
1186
1187
1188 typedef struct schPdschBundling
1189 {
1190    struct schStaticBundling
1191    {
1192      SchBundlingSizeSet2 size;
1193    }SchStaticBundling;
1194    struct schDynamicBundling
1195    {
1196      SchBundlingSizeSet1 sizeSet1;
1197      SchBundlingSizeSet2 sizeSet2;
1198    }SchDynamicBundling;
1199 }SchPdschBundling;
1200
1201 /* DMRS downlink configuration */
1202 typedef struct schDmrsDlCfg
1203 {
1204    SchDmrsAdditionPosition   addPos;       /* DMRS additional position */
1205 }SchDmrsDlCfg;
1206
1207 /* PDSCH Configuration */
1208 typedef struct schPdschConfig
1209 {
1210    SchDmrsDlCfg               dmrsDlCfgForPdschMapTypeA;
1211    SchResourceAllocType       resourceAllocType;
1212    uint8_t                    numTimeDomRsrcAlloc;
1213    SchPdschTimeDomRsrcAlloc   timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1214    SchRBGSize                 rbgSize;
1215    SchCodeWordsSchedByDci     numCodeWordsSchByDci;                    /* Number of code words scheduled by DCI */
1216    SchBundlingType            bundlingType;
1217    SchPdschBundling           bundlingInfo;
1218 }SchPdschConfig;
1219
1220 /* Initial Downlink BWP */
1221 typedef struct schInitalDlBwp
1222 {
1223    bool             pdcchCfgPres;
1224    SchPdcchConfig   pdcchCfg;
1225    bool             pdschCfgPres;
1226    SchPdschConfig   pdschCfg;
1227    bool             k0K1TblPrsnt;
1228    SchK0K1TimingInfoTbl k0K1InfoTbl;
1229 }SchInitalDlBwp;
1230
1231 /* BWP Downlink common */
1232 typedef struct schBwpDlCommon
1233 {
1234 }SchBwpDlCommon;
1235
1236 /* Downlink BWP information */
1237 typedef struct schDlBwpInfo
1238 {
1239    uint8_t          bwpId;
1240 }SchDlBwpInfo;
1241
1242 /* PDCCH Serving Cell configuration */
1243 typedef struct schPdschServCellCfg
1244 {
1245    uint8_t                  *maxMimoLayers;           
1246    SchNumHarqProcForPdsch   numHarqProcForPdsch;
1247    SchMaxCodeBlkGrpPerTB    *maxCodeBlkGrpPerTb;
1248    bool                     *codeBlkGrpFlushInd;
1249    SchPdschXOverhead        *xOverhead;
1250 }SchPdschServCellCfg;
1251
1252 /* PUCCH Configuration */
1253 typedef struct schPucchResrcSetInfo
1254 {
1255    uint8_t resrcSetId;
1256    uint8_t resrcListCount;
1257    uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1258    uint8_t maxPayLoadSize;
1259 }SchPucchResrcSetInfo;
1260
1261 typedef struct schPucchResrcSetCfg
1262 {
1263    uint8_t resrcSetToAddModListCount;
1264    SchPucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1265    uint8_t resrcSetToRelListCount;
1266    uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1267 }SchPucchResrcSetCfg;
1268
1269 typedef struct schPucchFormat0
1270 {
1271    uint8_t initialCyclicShift;
1272    uint8_t numSymbols;
1273    uint8_t startSymbolIdx;
1274 }SchPucchFormat0;
1275
1276 typedef struct schPucchFormat1
1277 {
1278    uint8_t initialCyclicShift;
1279    uint8_t numSymbols;
1280    uint8_t startSymbolIdx;
1281    uint8_t timeDomOCC;
1282 }SchPucchFormat1;
1283
1284 typedef struct schPucchFormat2_3
1285 {
1286    uint8_t numPrbs;
1287    uint8_t numSymbols;
1288    uint8_t startSymbolIdx;
1289 }SchPucchFormat2_3;
1290
1291 typedef struct schPucchFormat4
1292 {
1293    uint8_t numSymbols;
1294    uint8_t occLen;
1295    uint8_t occIdx;
1296    uint8_t startSymbolIdx;
1297 }SchPucchFormat4;
1298
1299 typedef struct schPucchResrcInfo
1300 {
1301    uint8_t  resrcId;
1302    uint16_t startPrb;
1303    uint8_t  intraFreqHop;
1304    uint16_t secondPrbHop;
1305    uint8_t  pucchFormat;
1306    union{
1307       SchPucchFormat0   *format0; 
1308       SchPucchFormat1   *format1;
1309       SchPucchFormat2_3 *format2;
1310       SchPucchFormat2_3 *format3;
1311       SchPucchFormat4   *format4;
1312    }SchPucchFormat;
1313 }SchPucchResrcInfo;
1314
1315 typedef struct schPucchResrcCfg
1316 {
1317    uint8_t resrcToAddModListCount;
1318    SchPucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1319    uint8_t resrcToRelListCount;
1320    uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1321 }SchPucchResrcCfg;
1322
1323
1324 typedef struct schSchedReqResrcInfo
1325 {
1326    uint8_t resrcId;
1327    uint8_t requestId;
1328    uint8_t periodicity;
1329    uint16_t offset;
1330    uint8_t resrc;
1331 }SchSchedReqResrcInfo;
1332
1333 typedef struct schPucchSchedReqCfg
1334 {
1335    uint8_t           schedAddModListCount;
1336    SchSchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1337    uint8_t           schedRelListCount;
1338    uint8_t           schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1339 }SchPucchSchedReqCfg;
1340
1341 typedef struct schSpatialRelationInfo
1342 {
1343    uint8_t spatialRelationId;
1344    uint8_t servCellIdx;
1345    uint8_t pathLossRefRSId;
1346    uint8_t p0PucchId;
1347    uint8_t closeLoopIdx;
1348 }SchSpatialRelationInfo;
1349
1350 typedef struct schPucchSpatialCfg
1351 {
1352    uint8_t spatialAddModListCount;
1353    SchSpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1354    uint8_t spatialRelListCount;
1355    uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1356 }SchPucchSpatialCfg;
1357
1358 typedef struct schP0PucchCfg
1359 {
1360    uint8_t p0PucchId;
1361    int     p0PucchVal;
1362 }SchP0PucchCfg;
1363
1364 typedef struct schPathLossRefRSCfg
1365 {
1366    uint8_t pathLossRefRSId;
1367 }SchPathLossRefRSCfg;
1368
1369 typedef struct schPucchMultiCsiCfg
1370 {
1371    uint8_t  multiCsiResrcListCount;
1372    uint8_t  multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1373 }SchPucchMultiCsiCfg;
1374
1375 typedef struct schPucchDlDataToUlAck
1376 {
1377    uint8_t  dlDataToUlAckListCount;
1378    uint8_t  dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1379 }SchPucchDlDataToUlAck;
1380
1381 typedef struct schPucchPowerControl
1382 {
1383    int deltaF_Format0;
1384    int deltaF_Format1;
1385    int deltaF_Format2;
1386    int deltaF_Format3;
1387    int deltaF_Format4;
1388    uint8_t p0SetCount;
1389    SchP0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1390    uint8_t pathLossRefRSListCount;
1391    SchPathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1392 }SchPucchPowerControl;
1393
1394 typedef struct schPucchCfg
1395 {
1396    SchPucchResrcSetCfg   *resrcSet;
1397    SchPucchResrcCfg      *resrc;
1398    SchPucchFormatCfg     *format1; 
1399    SchPucchFormatCfg     *format2; 
1400    SchPucchFormatCfg     *format3; 
1401    SchPucchFormatCfg     *format4;
1402    SchPucchSchedReqCfg   *schedReq;
1403    SchPucchMultiCsiCfg   *multiCsiCfg;
1404    SchPucchSpatialCfg    *spatialInfo;
1405    SchPucchDlDataToUlAck *dlDataToUlAck;
1406    SchPucchPowerControl  *powerControl;
1407 }SchPucchCfg;
1408
1409 /* Transform precoding disabled */
1410 typedef struct schTransPrecodDisabled
1411 {
1412    uint16_t   scramblingId0;
1413 }SchTransPrecodDisabled;
1414
1415 /* DMRS Uplink configuration */
1416 typedef struct SchDmrsUlCfg
1417 {
1418    SchDmrsAdditionPosition    addPos;               /* DMRS additional position */
1419    SchTransPrecodDisabled     transPrecodDisabled;  /* Transform precoding disabled */
1420 }SchDmrsUlCfg;
1421
1422 /* PUSCH Configuration */
1423 typedef struct schPuschCfg
1424 {
1425    uint8_t                    dataScramblingId;
1426    SchDmrsUlCfg               dmrsUlCfgForPuschMapTypeA;
1427    SchResourceAllocType       resourceAllocType;
1428    uint8_t                    numTimeDomRsrcAlloc;
1429    SchPuschTimeDomRsrcAlloc   timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1430    SchTransformPrecoder       transformPrecoder;
1431 }SchPuschCfg;
1432
1433 /* Initial Uplink BWP */
1434 typedef struct schInitialUlBwp
1435 {
1436    bool          pucchCfgPres;
1437    SchPucchCfg   pucchCfg;
1438    bool          puschCfgPres;
1439    SchPuschCfg   puschCfg;
1440    bool          k2TblPrsnt;
1441    SchK2TimingInfoTbl k2InfoTbl;
1442 }SchInitialUlBwp;
1443
1444 /* Uplink BWP information */
1445 typedef struct schUlBwpInfo
1446 {
1447    uint8_t        bwpId;
1448 }SchUlBwpInfo;
1449
1450 /* Serving cell configuration */
1451 typedef struct schServCellCfgInfo
1452 {
1453    SchInitalDlBwp        initDlBwp;
1454    uint8_t               numDlBwpToAdd;
1455    SchDlBwpInfo          DlBwpToAddList[MAX_NUM_BWP];
1456    uint8_t               firstActvDlBwpId;
1457    uint8_t               defaultDlBwpId;
1458    uint8_t               *bwpInactivityTmr;
1459    SchPdschServCellCfg   pdschServCellCfg;
1460    SchInitialUlBwp       initUlBwp;
1461    uint8_t               numUlBwpToAdd;
1462    SchUlBwpInfo          UlBwpToAddList[MAX_NUM_BWP];
1463    uint8_t               firstActvUlBwpId;
1464 }SchServCellCfgInfo;
1465
1466 typedef struct schNonDynFiveQi
1467 {
1468    uint16_t   fiveQi;
1469    uint8_t    priorLevel;
1470    uint16_t   avgWindow;
1471    uint16_t   maxDataBurstVol;
1472 }SchNonDynFiveQi;
1473
1474 typedef struct schDynFiveQi
1475 {
1476    uint8_t    priorLevel;
1477    uint16_t   packetDelayBudget;
1478    uint8_t    packetErrRateScalar;
1479    uint8_t    packetErrRateExp;
1480    uint16_t   fiveQi;
1481    uint8_t    delayCritical;
1482    uint16_t   avgWindow;
1483    uint16_t   maxDataBurstVol;
1484 }SchDynFiveQi;
1485
1486 typedef struct schNgRanAllocAndRetPri
1487 {
1488    uint8_t priorityLevel;
1489    uint8_t preEmptionCap;
1490    uint8_t preEmptionVul;
1491 }SchNgRanAllocAndRetPri;
1492
1493 typedef struct schGrbQosFlowInfo
1494 {
1495    uint32_t maxFlowBitRateDl;
1496    uint32_t maxFlowBitRateUl;
1497    uint32_t guarFlowBitRateDl;
1498    uint32_t guarFlowBitRateUl;
1499 }SchGrbQosFlowInfo;
1500
1501 /* DRB QoS */
1502 typedef struct schDrbQos
1503 {
1504    SchQosType  fiveQiType;   /* Dynamic or non-dynamic */ 
1505    union
1506    {
1507       SchNonDynFiveQi   nonDyn5Qi;
1508       SchDynFiveQi      dyn5Qi;
1509    }u;
1510    SchNgRanAllocAndRetPri  ngRanRetPri;
1511    SchGrbQosFlowInfo       grbQosFlowInfo;
1512    uint16_t                pduSessionId;
1513    uint32_t                ulPduSessAggMaxBitRate;   /* UL PDU Session Aggregate max bit rate */
1514 }SchDrbQosInfo;
1515
1516 /* Special cell configuration */
1517 typedef struct schSpCellCfg
1518 {
1519    uint8_t           servCellIdx;
1520    SchServCellCfgInfo   servCellCfg;
1521 }SchSpCellCfg;
1522
1523 /* Uplink logical channel configuration */
1524 typedef struct SchUlLcCfg
1525 {
1526    uint8_t priority;
1527    uint8_t lcGroup;
1528    uint8_t schReqId;
1529    uint8_t pbr;        // prioritisedBitRate
1530    uint8_t bsd;        // bucketSizeDuration
1531 }SchUlLcCfg;
1532
1533 /* Downlink logical channel configuration */
1534 typedef struct schDlLcCfg
1535 {
1536    uint8_t lcp;      // logical Channel Prioritization
1537 }SchDlLcCfg;
1538
1539 /* Logical Channel configuration */
1540 typedef struct schLcCfg
1541 {
1542    ConfigType     configType;
1543    uint8_t        lcId;
1544    SchDrbQosInfo  *drbQos;
1545    Snssai         *snssai;
1546    SchDlLcCfg     dlLcCfg;
1547    SchUlLcCfg     ulLcCfg;
1548 }SchLcCfg;
1549
1550 /* Aggregate max bit rate */
1551 typedef struct schAmbrCfg
1552 {
1553    uint32_t   ulBr;   /* Ul BitRate */
1554 }SchAmbrCfg;
1555
1556 typedef struct schModulationInfo
1557 {
1558    uint8_t      modOrder;
1559    uint8_t      mcsIndex;
1560    SchMcsTable  mcsTable;
1561 }SchModulationInfo;
1562
1563 /* UE configuration */
1564 typedef struct schUeCfg
1565 {
1566    uint16_t        cellId;
1567    uint16_t        crnti;
1568    bool macCellGrpCfgPres;
1569    SchMacCellGrpCfg   macCellGrpCfg;
1570    bool phyCellGrpCfgPres;
1571    SchPhyCellGrpCfg   phyCellGrpCfg;
1572    bool spCellCfgPres;
1573    SchSpCellCfg       spCellCfg;
1574    SchAmbrCfg         *ambrCfg;
1575    SchModulationInfo  dlModInfo;
1576    SchModulationInfo  ulModInfo;
1577    uint8_t            numLcs;
1578    SchLcCfg           schLcCfg[MAX_NUM_LC];
1579 }SchUeCfg;
1580
1581 typedef struct schUeCfgRsp
1582 {
1583    uint16_t   ueId;
1584    uint16_t   cellId;
1585    uint16_t   crnti;
1586    SchMacRsp  rsp;
1587    SchFailureCause cause;
1588 }SchUeCfgRsp;
1589
1590 typedef struct schUeDelete
1591 {
1592    uint16_t   cellId;
1593    uint16_t   crnti;
1594 }SchUeDelete;
1595
1596 typedef struct schUeDeleteRsp
1597 {
1598    uint16_t   cellId;
1599    uint16_t   crnti;
1600    SchMacRsp  rsp;
1601    ErrorCause cause;
1602 }SchUeDeleteRsp;
1603
1604 typedef struct schCellDelete 
1605 {
1606    uint16_t   cellId;
1607 }SchCellDelete;
1608
1609
1610 typedef struct schCellDeleteRsp
1611 {
1612    uint16_t   cellId;
1613    SchMacRsp  rsp;
1614 }SchCellDeleteRsp;
1615
1616 typedef struct dataVolInfo
1617 {
1618    uint8_t  lcgId;
1619    uint32_t dataVol;
1620 }DataVolInfo;
1621
1622 typedef struct ulBufferStatusRptInd
1623 {
1624    uint16_t    cellId;
1625    uint16_t    crnti;
1626    BsrType     bsrType;
1627    uint8_t     numLcg;
1628    DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
1629 }UlBufferStatusRptInd;
1630
1631 typedef struct srUciIndInfo
1632 {
1633    uint16_t    cellId;
1634    uint16_t    crnti;
1635    SlotTimingInfo slotInd;
1636    uint8_t     numSrBits;
1637    uint8_t     srPayload[MAX_SR_BITS_IN_BYTES];
1638 }SrUciIndInfo;
1639
1640 typedef struct schRrmPolicyRatio
1641 {
1642    uint8_t policyMaxRatio;
1643    uint8_t policyMinRatio;
1644    uint8_t policyDedicatedRatio;
1645 }SchRrmPolicyRatio;
1646
1647 typedef struct schRrmPolicyOfSlice
1648 {
1649    Snssai  snssai;
1650    SchRrmPolicyRatio *rrmPolicyRatioInfo;
1651 }SchRrmPolicyOfSlice;
1652
1653 typedef struct schSliceCfgReq
1654 {
1655    uint8_t  numOfConfiguredSlice;
1656    SchRrmPolicyOfSlice **listOfConfirguration;
1657 }SchSliceCfgReq;
1658
1659 typedef struct sliceRsp
1660 {
1661    Snssai     snssai;
1662    SchMacRsp  rsp;
1663    RspCause   cause;
1664 }SliceRsp;
1665
1666 typedef struct schSliceRsp
1667 {
1668    uint8_t    numSliceCfgRsp;
1669    SliceRsp   **listOfSliceCfgRsp;
1670 }SchSliceCfgRsp;
1671
1672 /* function pointers */
1673 typedef uint8_t (*SchCellCfgCfmFunc)    ARGS((
1674          Pst            *pst,           /* Post Structure */                         
1675          SchCellCfgCfm  *schCellCfgCfm  /* Cell Cfg Cfm */
1676          ));
1677
1678 typedef uint8_t (*SchCellCfgFunc)    ARGS((
1679          Pst         *pst,           /* Post Structure */                         
1680          SchCellCfg  *schCellCfg     /* Cell Cfg  */
1681          ));
1682
1683 typedef uint8_t (*SchMacDlAllocFunc)     ARGS((                     
1684          Pst            *pst,          /* Post Structure */                         
1685          DlSchedInfo    *dlSchedInfo   /* dl allocation Info */                      
1686          ));
1687
1688 typedef uint8_t (*SchMacUlSchInfoFunc)     ARGS((                     
1689          Pst         *pst,           /* Post Structure */                         
1690          UlSchedInfo *ulSchedInfo    /* UL Alloc Sch  Info */                      
1691          ));
1692
1693 typedef uint8_t (*MacSchRachIndFunc) ARGS((
1694          Pst         *pst,         /* Post structure */
1695          RachIndInfo *rachInd));    /* Rach Indication Info */
1696
1697 typedef uint8_t (*MacSchCrcIndFunc) ARGS(( 
1698          Pst         *pst,         /* Post structure */
1699          CrcIndInfo  *crcInd));     /* CRC Info */
1700
1701 typedef uint8_t (*MacSchDlRlcBoInfoFunc) ARGS((
1702          Pst         *pst,         /* Post structure */
1703          DlRlcBoInfo *dlBoInfo));   /* DL BO Info */
1704
1705 typedef uint8_t (*MacSchAddUeConfigReqFunc) ARGS((
1706          Pst         *pst,           /* Post structure */
1707          SchUeCfg    *ueCfgToSch));   /* Scheduler UE Cfg */
1708
1709 typedef uint8_t (*SchUeCfgRspFunc) ARGS((
1710          Pst         *pst,           /* Post structure */
1711          SchUeCfgRsp *cfgRsp));       /* Scheduler UE Cfg response */
1712
1713 typedef uint8_t (*MacSchSlotIndFunc) ARGS((
1714          Pst         *pst,          /* Post structure */
1715          SlotTimingInfo *slotInd));    /* Slot Info */
1716
1717 typedef uint8_t (*MacSchBsrFunc)       ARGS((
1718    Pst                  *pst,
1719    UlBufferStatusRptInd *bsrInd
1720 ));
1721
1722 typedef uint8_t (*MacSchSrUciIndFunc) ARGS(( 
1723          Pst         *pst,         /* Post structure */
1724          SrUciIndInfo  *uciInd));    /* UCI IND Info */
1725
1726 typedef uint8_t (*MacSchModUeConfigReqFunc) ARGS((
1727          Pst         *pst,           /* Post structure */
1728          SchUeCfg    *ueCfgToSch));   /* Scheduler UE Cfg */
1729
1730 typedef uint8_t (*SchUeReCfgRspFunc) ARGS((
1731          Pst         *pst,           /* Post structure */
1732          SchUeCfgRsp *cfgRsp));       /* Scheduler UE Cfg response */
1733
1734 typedef uint8_t (*MacSchUeDeleteReqFunc) ARGS((
1735    Pst         *pst,           /* Post structure */
1736    SchUeDelete *schUeDel)); /*Scheduler UE Del*/
1737
1738 typedef uint8_t (*SchUeDeleteRspFunc) ARGS((
1739    Pst          *pst,           /* Post structure */
1740    SchUeDeleteRsp *delRsp));       /* Scheduler UE delete response */
1741
1742 typedef uint8_t (*MacSchCellDeleteReqFunc) ARGS((
1743    Pst         *pst,           /* Post structure */
1744    SchCellDelete *schCellDelete)); /*Scheduler UE Del*/
1745
1746 typedef uint8_t (*SchCellDeleteRspFunc) ARGS((
1747    Pst          *pst,           /* Post structure */
1748    SchCellDeleteRsp *schCellDeleteRsp));       /* Scheduler UE delete response */
1749
1750 typedef uint8_t (*MacSchSliceCfgReqFunc) ARGS((
1751    Pst          *pst,           /* Post structure */
1752    SchSliceCfgReq *schSliceCfgReq));  /* Scheduler Slice Cfg Req */
1753
1754 typedef uint8_t (*SchSliceCfgRspFunc)    ARGS((
1755          Pst            *pst,            /* Post Structure */                         
1756          SchSliceCfgRsp  *schSliceCfgRsp /* Cell Cfg Cfm */
1757          ));
1758
1759 typedef uint8_t (*MacSchSliceReCfgReqFunc) ARGS((
1760    Pst          *pst,           /* Post structure */
1761    SchSliceCfgReq *schSliceReCfgReq));  /* Scheduler Slice ReCfg Req */
1762
1763 typedef uint8_t (*SchSliceReCfgRspFunc)    ARGS((
1764          Pst            *pst,            /* Post Structure */                         
1765          SchSliceCfgRsp  *schSliceReCfgRsp /* Cell ReCfg Cfm */
1766          ));
1767 /* function declarations */
1768 uint8_t packMacSchSlotInd(Pst *pst, SlotTimingInfo *slotInd);
1769 uint8_t packSchMacDlAlloc(Pst *pst, DlSchedInfo  *dlSchedInfo);
1770 uint8_t packSchMacUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo);
1771 uint8_t packSchCellCfg(Pst *pst, SchCellCfg  *schCellCfg);
1772 uint8_t packSchCellCfgCfm(Pst *pst, SchCellCfgCfm  *schCellCfgCfm);
1773 uint8_t MacProcDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo);
1774 uint8_t MacProcSchCellCfg(Pst *pst, SchCellCfg  *schCellCfg);
1775 uint8_t MacProcSchCellCfgCfm(Pst *pst, SchCellCfgCfm  *schCellCfgCfm);
1776 uint8_t SchHdlCellCfgReq(Pst *pst, SchCellCfg *schCellCfg);
1777 uint8_t schActvInit(Ent entity, Inst instId, Region region, Reason reason);
1778 uint8_t MacProcUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo);
1779 uint8_t packMacSchRachInd(Pst *pst, RachIndInfo *rachInd);
1780 uint8_t MacSchRachInd(Pst *pst, RachIndInfo *rachInd);
1781 uint8_t packMacSchCrcInd(Pst *pst, CrcIndInfo *crcInd);
1782 uint8_t MacSchCrcInd(Pst *pst, CrcIndInfo *crcInd);
1783 uint8_t packMacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo);
1784 uint8_t MacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo);
1785 uint8_t packMacSchAddUeConfigReq(Pst *pst, SchUeCfg *ueCfgToSch);
1786 uint8_t MacSchAddUeConfigReq(Pst *pst, SchUeCfg *ueCfgToSch);
1787 uint8_t packSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
1788 uint8_t MacProcSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
1789 uint8_t MacSchSlotInd ARGS((Pst * pst, SlotTimingInfo * slotInd));
1790 uint8_t packMacSchSlotInd(Pst * pst, SlotTimingInfo * slotInd);
1791 uint8_t unpackMacSchSlotInd(MacSchSlotIndFunc func, Pst *pst, Buffer  *mBuf);
1792 uint8_t packMacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd);
1793 uint8_t MacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd);
1794 uint8_t packMacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd);
1795 uint8_t MacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd);
1796 uint8_t packMacSchModUeConfigReq(Pst *pst, SchUeCfg *ueCfgToSch);
1797 uint8_t MacSchModUeConfigReq(Pst *pst, SchUeCfg *ueCfgToSch);
1798 uint8_t packSchUeReconfigRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
1799 uint8_t MacProcSchUeReconfigRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
1800 uint8_t packMacSchUeDeleteReq(Pst *pst,  SchUeDelete *schUeDel);
1801 uint8_t MacSchUeDeleteReq(Pst *pst, SchUeDelete  *ueDelete);
1802 uint8_t packSchUeDeleteRsp(Pst *pst, SchUeDeleteRsp  *delRsp);
1803 uint8_t MacProcSchUeDeleteRsp(Pst *pst, SchUeDeleteRsp *schUeDelRsp);
1804 uint8_t packMacSchCellDeleteReq(Pst *pst,  SchCellDelete *schCellDelete);
1805 uint8_t MacSchCellDeleteReq(Pst *pst, SchCellDelete  *schCellDelete);
1806 uint8_t packSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp  *schCellDeleteRsp);
1807 uint8_t MacProcSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDeleteRsp);
1808 uint8_t packMacSchSliceCfgReq(Pst *pst, SchSliceCfgReq *cfgReq);
1809 uint8_t MacSchSliceCfgReq(Pst *pst, SchSliceCfgReq *schSliceCfgReq);
1810 uint8_t packSchSliceCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp);
1811 uint8_t MacProcSchSliceCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp);
1812 uint8_t packMacSchSliceReCfgReq(Pst *pst, SchSliceCfgReq *cfgReq);
1813 uint8_t MacSchSliceReCfgReq(Pst *pst, SchSliceCfgReq *schSliceCfgReq);
1814 uint8_t packSchSliceReCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp);
1815 uint8_t MacProcSchSliceReCfgRsp(Pst *pst, SchSliceCfgRsp *sliceReCfgrsp);
1816 /**********************************************************************
1817   End of file
1818  **********************************************************************/
1819