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