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