26fe41a158e2da79ec9aba4a560645cb40f27dc7
[o-du/l2.git] / src / cm / mac_sch_interface.h
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17  *******************************************************************************/
18
19 /* events */
20 #define EVENT_SCH_CELL_CFG           1
21 #define EVENT_SCH_CELL_CFG_CFM       2
22 #define EVENT_DL_ALLOC               3 
23 #define EVENT_UL_SCH_INFO            4 
24 #define EVENT_RACH_IND_TO_SCH        5
25 #define EVENT_CRC_IND_TO_SCH         6
26 #define EVENT_DL_RLC_BO_INFO_TO_SCH  7
27 #define EVENT_UE_CREATE_REQ_TO_SCH   8
28 #define EVENT_UE_CREATE_RSP_TO_MAC   9
29 #define EVENT_SLOT_IND_TO_SCH        10
30 #define EVENT_SHORT_BSR              11
31 #define EVENT_UCI_IND_TO_SCH         12
32
33 /*macros*/
34 #define NO_SSB 0
35 #define SSB_TRANSMISSION 1
36 #define SSB_REPEAT 2
37 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
38 #define SCH_SSB_MASK_SIZE   1
39
40 #define NO_SIB1 0
41 #define SIB1_TRANSMISSION 1
42 #define SIB1_REPITITION 2
43
44 #define MAX_NUM_PRG     1 /* max value should be later 275 */
45 #define MAX_DIG_BF_INTERFACES 0 /* max value should be later 255 */
46 #define MAX_CODEWORDS  1  /* max should be 2 */
47 #define SCH_HARQ_PROC_ID 1 /* harq proc id */
48 #define SCH_ALLOC_TYPE_1 1 /*sch res alloc type */
49
50 /* Datatype in UL SCH Info */
51 #define SCH_DATATYPE_PUSCH 1
52 #define SCH_DATATYPE_PUSCH_UCI 2
53 #define SCH_DATATYPE_UCI 4
54 #define SCH_DATATYPE_SRS 8
55 #define SCH_DATATYPE_PRACH 16
56
57 #define MAX_NUMBER_OF_CRC_IND_BITS 1
58 #define MAX_NUMBER_OF_UCI_IND_BITS 1
59 #define MAX_SR_BITS_IN_BYTES       1
60 #define MAX_NUM_LOGICAL_CHANNELS   11
61 #define MAX_NUM_LOGICAL_CHANNEL_GROUPS 8
62 /* can we have a common numslot numscs between mac sch */
63 #define MAX_SLOTS 10
64 #define MAX_SFN   1024
65 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8   /* Max number of scheduling request config per cell group */
66 #define MAX_NUM_TAGS 4                  /* Max number of timing advance groups */
67 #define MAX_NUM_BWP  4                  /* Max number of BWP per serving cell */
68 #define MAX_NUM_CRSET  3                /* Max number of control resource set in add/modify/release list */
69 #define MAX_NUM_SEARCH_SPC  10          /* Max number of search space in add/modify/release list */
70 #define FREQ_DOM_RSRC_SIZE  6           /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
71 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2  /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
72 #define MAX_NUM_DL_ALLOC 16             /* Max number of pdsch time domain downlink allocation */
73 #define MAX_NUM_UL_ALLOC 16             /* Max number of pusch time domain uplink allocation */
74
75 #define SD_SIZE   3
76 #define CCCH_LCID  0
77 #define SRB1_LCID  1
78 #define SRB2_LCID  2
79
80 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr)          \
81 {                                                          \
82    if ((crntTime.slot + incr) > (MAX_SLOTS - 1))           \
83    {                                                       \
84       toFill.sfn = (crntTime.sfn + 1);                     \
85    }                                                       \
86    else                                                    \
87    {                                                       \
88       toFill.sfn = crntTime.sfn;                           \
89    }                                                       \
90    toFill.slot = (crntTime.slot + incr) % MAX_SLOTS;       \
91    if (toFill.sfn >= MAX_SFN)                              \
92    {                                                       \
93       toFill.sfn%=MAX_SFN;                                 \
94    }                                                       \
95 }
96
97 typedef enum
98 {
99    UNSPECIFIED_CAUSE,
100    INVALID_PARAM_VALUE,
101    RESOURCE_UNAVAILABLE,
102    SYSTEM_ERROR
103 }SchFailureCause;
104
105 typedef enum
106 {
107    SR_PROHIBIT_MS1,
108    SR_PROHIBIT_MS2,
109    SR_PROHIBIT_MS4,
110    SR_PROHIBIT_MS8,
111    SR_PROHIBIT_MS16,
112    SR_PROHIBIT_MS32,
113    SR_PROHIBIT_MS64,
114    SR_PROHIBIT_MS128
115 }SchSrProhibitTimer;
116
117 typedef enum
118 {
119    SR_TRANS_MAX_N4,
120    SR_TRANS_MAX_N8,
121    SR_TRANS_MAX_N16,
122    SR_TRANS_MAX_N32,
123    SR_TRANS_MAX_N64,
124    SR_TRANS_MAX_SPARE3,
125    SR_TRANS_MAX_SPARE2,
126    SR_TRANS_MAX_SPARE1
127 }SchSrTransMax;
128
129 typedef enum
130 {
131    TIME_ALIGNMENT_TIMER_MS500,
132    TIME_ALIGNMENT_TIMER_MS750,
133    TIME_ALIGNMENT_TIMER_MS1280,
134    TIME_ALIGNMENT_TIMER_MS1920,
135    TIME_ALIGNMENT_TIMER_MS2560,
136    TIME_ALIGNMENT_TIMER_MS5120,
137    TIME_ALIGNMENT_TIMER_MS10240,
138    TIME_ALIGNMENT_TIMER_INFINITE
139 }SchTimeAlignmentTimer;
140
141 typedef enum
142 {
143    PHR_PERIODIC_TIMER_SF10,
144    PHR_PERIODIC_TIMER_SF20,
145    PHR_PERIODIC_TIMER_SF50,
146    PHR_PERIODIC_TIMER_SF100,
147    PHR_PERIODIC_TIMER_SF200,
148    PHR_PERIODIC_TIMER_SF500,
149    PHR_PERIODIC_TIMER_SF1000,
150    PHR_PERIODIC_TIMER_INFINITE
151 }SchPhrPeriodicTimer;
152
153 typedef enum
154 {
155    PHR_PROHIBIT_TIMER_SF0,
156    PHR_PROHIBIT_TIMER_SF10,
157    PHR_PROHIBIT_TIMER_SF20,
158    PHR_PROHIBIT_TIMER_SF50,
159    PHR_PROHIBIT_TIMER_SF100,
160    PHR_PROHIBIT_TIMER_SF200,
161    PHR_PROHIBIT_TIMER_SF500,
162    PHR_PROHIBIT_TIMER_SF1000
163 }SchPhrProhibitTimer;
164
165 typedef enum
166 {
167    PHR_TX_PWR_FACTOR_CHANGE_DB1,
168    PHR_TX_PWR_FACTOR_CHANGE_DB3,
169    PHR_TX_PWR_FACTOR_CHANGE_DB6,
170    PHR_TX_PWR_FACTOR_CHANGE_INFINITE
171 }SchPhrTxPwrFactorChange;
172
173 typedef enum
174 {
175    PHR_MODE_REAL,
176    PHR_MODE_VIRTUAL
177 }SchPhrModeOtherCG;
178
179 typedef enum
180 {
181    HARQ_ACK_CODEBOOK_SEMISTATIC,
182    HARQ_ACK_CODEBOOK_DYNAMIC
183 }SchPdschHarqAckCodebook;
184
185 typedef enum
186 {
187    NUM_HARQ_PROC_FOR_PDSCH_N2,
188    NUM_HARQ_PROC_FOR_PDSCH_N4,
189    NUM_HARQ_PROC_FOR_PDSCH_N6,
190    NUM_HARQ_PROC_FOR_PDSCH_N10,
191    NUM_HARQ_PROC_FOR_PDSCH_N16
192 }SchNumHarqProcForPdsch;
193
194 typedef enum
195 {
196    MAX_CODE_BLOCK_GROUP_PER_TB_N2,
197    MAX_CODE_BLOCK_GROUP_PER_TB_N4,
198    MAX_CODE_BLOCK_GROUP_PER_TB_N6,
199    MAX_CODE_BLOCK_GROUP_PER_TB_N8
200 }SchMaxCodeBlkGrpPerTB;
201
202 typedef enum
203 {
204    PDSCH_X_OVERHEAD_XOH_6,
205    PDSCH_X_OVERHEAD_XOH_12,
206    PDSCH_X_OVERHEAD_XOH_18
207 }SchPdschXOverhead;
208
209 typedef enum
210 {
211    DMRS_ADDITIONAL_POS0,
212    DMRS_ADDITIONAL_POS1,
213    DMRS_ADDITIONAL_POS3
214 }SchDmrsAdditionPosition;
215
216 typedef enum
217 {
218    RESOURCE_ALLOCTION_TYPE_0,
219    RESOURCE_ALLOCTION_TYPE_1,
220    RESOURCE_ALLOCTION_DYN_SWITCH
221 }SchResourceAllocType;
222
223 typedef enum
224 {
225    TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_A,
226    TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_B
227 }SchTimeDomRsrcAllocMappingType;
228
229 typedef enum
230 {
231    ENABLED_TRANSFORM_PRECODER,
232    DISABLED_TRANSFORM_PRECODER
233 }SchTransformPrecoder;
234
235 typedef enum
236 {
237    INTERLEAVED_CCE_REG_MAPPING,
238    NONINTERLEAVED_CCE_REG_MAPPING
239 }SchREGMappingType;
240
241 typedef enum
242 {
243    SLOT_PERIODICITY_AND_OFFSET_SL_1,
244    SLOT_PERIODICITY_AND_OFFSET_SL_2,
245    SLOT_PERIODICITY_AND_OFFSET_SL_4,
246    SLOT_PERIODICITY_AND_OFFSET_SL_5,
247    SLOT_PERIODICITY_AND_OFFSET_SL_8,
248    SLOT_PERIODICITY_AND_OFFSET_SL_10,
249    SLOT_PERIODICITY_AND_OFFSET_SL_16,
250    SLOT_PERIODICITY_AND_OFFSET_SL_20,
251    SLOT_PERIODICITY_AND_OFFSET_SL_40,
252    SLOT_PERIODICITY_AND_OFFSET_SL_80,
253    SLOT_PERIODICITY_AND_OFFSET_SL_160,
254    SLOT_PERIODICITY_AND_OFFSET_SL_320,
255    SLOT_PERIODICITY_AND_OFFSET_SL_640,
256    SLOT_PERIODICITY_AND_OFFSET_SL_1280,
257    SLOT_PERIODICITY_AND_OFFSET_SL_2560
258 }SchMSlotPeriodAndOffset;
259
260 typedef enum
261 {
262    SAME_AS_REG_BUNDLE,
263    ALL_CONTIGUOUS_RB
264 }SchPrecoderGranul;
265
266 typedef enum
267 {
268    SEARCH_SPACE_TYPE_COMMON,
269    SEARCH_SPACE_TYPE_UE_SPECIFIC
270 }SchSearchSpaceType;
271
272 typedef enum
273 {
274    AGGREGATION_LEVEL_N0,
275    AGGREGATION_LEVEL_N1,
276    AGGREGATION_LEVEL_N2,
277    AGGREGATION_LEVEL_N3,
278    AGGREGATION_LEVEL_N4,
279    AGGREGATION_LEVEL_N5,
280    AGGREGATION_LEVEL_N6,
281    AGGREGATION_LEVEL_N8
282 }SchAggrLevel;
283
284 typedef enum
285 {
286    RBG_SIZE_CONFIG_1,
287    RBG_SIZE_CONFIG_2
288 }SchRBGSize;
289
290 typedef enum
291 {
292    CODE_WORDS_SCHED_BY_DCI_N1,
293    CODE_WORDS_SCHED_BY_DCI_N2
294 }SchCodeWordsSchedByDci;
295
296 typedef enum
297 {
298    STATIC_BUNDLING_TYPE,
299    DYNAMIC_BUNDLING_TYPE
300 }SchBundlingType;
301
302 typedef enum
303 {
304    DUPLEX_MODE_FDD,
305    DUPLEX_MODE_TDD
306 }SchDuplexMode;
307
308 typedef enum
309 {
310    SSB_PRDCTY_MS5,
311    SSB_PRDCTY_MS10,
312    SSB_PRDCTY_MS20,
313    SSB_PRDCTY_MS40,
314    SSB_PRDCTY_MS80,
315    SSB_PRDCTY_MS160
316 }SchSSBPeriod;
317
318 typedef enum
319 {
320    RSP_OK,
321    RSP_NOK
322 }SchMacRsp;
323
324 typedef enum
325 {
326    SHORT_BSR,
327    LONG_BSR,
328    SHORT_TRUNCATED_BSR,
329    LONG_TRUNCATED_BSR
330 }BsrType;
331
332 typedef enum
333 {
334    FORMAT0_0,
335    FORMAT0_1,
336    FORMAT1_0,
337    FORMAT1_1
338 }FormatType;
339
340 /*structures*/
341 typedef struct timeDomainAlloc
342 {
343    uint16_t startSymb;
344    uint16_t numSymb;
345 }TimeDomainAlloc;
346
347 typedef struct freqDomainAlloc
348 {
349    uint16_t startPrb;
350    uint16_t numPrb;
351 }FreqDomainAlloc;
352
353
354 typedef struct
355 {
356    uint32_t    ssbPbchPwr;       /* SSB block power */
357    uint8_t     scsCommon;           /* subcarrier spacing for common [0-3]*/
358    uint8_t     ssbOffsetPointA;  /* SSB sub carrier offset from point A */
359    SchSSBPeriod   ssbPeriod;        /* SSB Periodicity in msec */
360    uint8_t     ssbSubcOffset;    /* Subcarrier Offset(Kssb) */
361    uint32_t    nSSBMask[SCH_SSB_MASK_SIZE];      /* Bitmap for actually transmitted SSB. */
362 }SchSsbCfg;
363
364 typedef struct bwpCfg
365 {
366    uint8_t         subcarrierSpacing;
367    uint8_t         cyclicPrefix;
368    FreqDomainAlloc freqAlloc;   
369 }BwpCfg;
370
371 typedef struct prg
372 {
373    uint16_t pmIdx;
374    uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
375 } Prg;
376
377 typedef struct beamformingInfo
378 {
379    uint16_t numPrgs;
380    uint16_t prgSize;
381    uint8_t  digBfInterfaces;
382    Prg  prg[MAX_NUM_PRG];
383 } BeamformingInfo;
384
385 /* SIB1 PDSCH structures */
386
387 typedef struct codewordinfo
388 {
389    uint16_t targetCodeRate;
390    uint8_t  qamModOrder;
391    uint8_t  mcsIndex;
392    uint8_t  mcsTable;
393    uint8_t  rvIndex;
394    uint32_t tbSize;
395 } CodewordInfo;
396
397 typedef struct dmrsInfo
398 {
399    uint16_t dlDmrsSymbPos;
400    uint8_t  dmrsConfigType;
401    uint16_t dlDmrsScramblingId;
402    uint8_t  scid;
403    uint8_t  numDmrsCdmGrpsNoData;
404    uint16_t dmrsPorts;
405    uint8_t mappingType;
406    uint8_t nrOfDmrsSymbols;
407    uint8_t dmrsAddPos;
408 } DmrsInfo;
409
410 typedef struct pdschFreqAlloc
411 {
412    uint8_t  resourceAllocType;
413    /* since we are using type-1, hence rbBitmap excluded */
414    FreqDomainAlloc freqAlloc;
415    uint8_t  vrbPrbMapping;
416 } PdschFreqAlloc;
417
418 typedef struct pdschTimeAlloc
419 {
420    uint8_t         rowIndex;
421    TimeDomainAlloc timeAlloc;
422 } PdschTimeAlloc;
423
424 typedef struct txPowerPdschInfo
425 {
426    uint8_t powerControlOffset;
427    uint8_t powerControlOffsetSS;
428 } TxPowerPdschInfo;
429
430 typedef struct pdschCfg
431 {
432    uint16_t         pduBitmap;
433    uint16_t         rnti;
434    uint16_t         pduIndex;
435    uint8_t          numCodewords;
436    CodewordInfo     codeword[MAX_CODEWORDS];
437    uint16_t         dataScramblingId;
438    uint8_t          numLayers;
439    uint8_t          transmissionScheme;
440    uint8_t          refPoint;
441    DmrsInfo         dmrs;
442    PdschFreqAlloc   pdschFreqAlloc;
443    PdschTimeAlloc   pdschTimeAlloc;
444    BeamformingInfo  beamPdschInfo;
445    TxPowerPdschInfo txPdschPower;
446 } PdschCfg;
447 /* SIB1 PDSCH structures end */
448
449 /* SIB1 interface structure */
450
451 typedef struct coresetCfg
452 {
453    uint8_t coreSetSize;
454    uint8_t startSymbolIndex;
455    uint8_t durationSymbols;
456    uint8_t freqDomainResource[6];
457    uint8_t cceRegMappingType;
458    uint8_t regBundleSize;
459    uint8_t interleaverSize;
460    uint8_t coreSetType;
461    uint16_t shiftIndex;
462    uint8_t precoderGranularity;
463    uint8_t cceIndex;
464    uint8_t aggregationLevel;
465 } CoresetCfg;
466
467 typedef struct txPowerPdcchInfo
468 {
469    uint8_t powerValue;
470    uint8_t powerControlOffsetSS;
471 } TxPowerPdcchInfo;
472
473 typedef struct dlDCI
474 {
475    uint16_t rnti;
476    uint16_t scramblingId;
477    uint16_t scramblingRnti;
478    uint8_t cceIndex;
479    uint8_t aggregLevel;
480    BeamformingInfo beamPdcchInfo;
481    TxPowerPdcchInfo txPdcchPower;
482    PdschCfg     *pdschCfg;
483 } DlDCI;
484
485 typedef struct pdcchCfg
486 {
487    /* coreset-0 configuration */
488    CoresetCfg coreset0Cfg;
489
490    uint16_t numDlDci;
491    DlDCI    dci; /* as of now its only one DCI, later it will be numDlCi */
492 } PdcchCfg;
493 /* end of SIB1 PDCCH structures */
494
495 typedef struct
496 {
497    /* parameters recieved from DU-APP */
498    uint16_t sib1PduLen;
499    uint16_t sib1NewTxPeriod;
500    uint16_t sib1RepetitionPeriod;
501    uint8_t  coresetZeroIndex;     /* derived from 4 LSB of pdcchSib1 present in MIB */
502    uint8_t  searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
503    uint16_t sib1Mcs;
504
505    /* parameters derived in scheduler */
506    uint8_t n0;
507    BwpCfg bwp;
508    PdcchCfg sib1PdcchCfg;
509    PdschCfg sib1PdschCfg;
510 }SchSib1Cfg;
511
512 typedef struct schRachCfg
513 {
514    uint8_t      prachCfgIdx;       /* PRACH config idx */
515    uint8_t      prachSubcSpacing;  /* Subcarrier spacing of RACH */
516    uint16_t     msg1FreqStart;     /* Msg1-FrequencyStart */
517    uint8_t      msg1Fdm;           /* PRACH FDM (1,2,4,8) */
518    uint8_t      rootSeqLen;        /* root sequence length */
519    uint16_t     rootSeqIdx;        /* Root sequence index */
520    uint8_t      numRootSeq;        /* Number of root sequences required for FD */
521    uint16_t     k1;                /* Frequency Offset for each FD */
522    uint8_t      ssbPerRach;        /* SSB per RACH occassion */
523    uint8_t      prachMultCarrBand; /* Presence of Multiple carriers in Band */
524    uint8_t      raContResTmr;      /* RA Contention Resoultion Timer */
525    uint8_t      rsrpThreshSsb;     /* RSRP Threshold SSB */
526    uint8_t      raRspWindow;       /* RA Response Window */
527 }SchRachCfg;
528
529 typedef struct schBwpParams
530 {
531    FreqDomainAlloc freqAlloc;
532    uint8_t         scs;
533    uint8_t         cyclicPrefix;
534 }SchBwpParams;
535
536 typedef struct schCandidatesInfo
537 {
538    uint8_t aggLevel1;
539    uint8_t aggLevel2;
540    uint8_t aggLevel4;
541    uint8_t aggLevel8;
542    uint8_t aggLevel16;
543 }SchCandidatesInfo;
544
545 typedef struct schSearchSpaceCfg
546 {
547    uint8_t searchSpaceId;
548    uint8_t coresetId;
549    uint16_t monitoringSlot;
550    uint16_t duration;
551    uint16_t monitoringSymbol;
552    SchCandidatesInfo candidate;
553 }SchSearchSpaceCfg;
554
555 typedef struct schPdcchCfgCmn
556 {
557    SchSearchSpaceCfg commonSearchSpace;
558    uint8_t raSearchSpaceId;
559 }SchPdcchCfgCmn;
560
561 typedef struct schPdschCfgCmn
562 {
563    uint8_t k0;
564    uint8_t mappingType;
565    uint8_t startSymbol;
566    uint8_t lengthSymbol;
567 }SchPdschCfgCmn;
568
569 typedef struct schPucchCfgCmn
570 {
571    uint8_t pucchResourceCommon;
572    uint8_t pucchGroupHopping;
573 }SchPucchCfgCmn;
574
575 typedef struct schPuschCfgCmn
576 {
577    uint8_t k2;
578    uint8_t mappingType;
579    uint8_t startSymbol;
580    uint8_t lengthSymbol;
581 }SchPuschCfgCmn;
582
583 typedef struct schBwpDlCfg
584 {
585    SchBwpParams   bwp;
586    SchPdcchCfgCmn pdcchCommon;
587    SchPdschCfgCmn pdschCommon;
588 }SchBwpDlCfg;
589
590 typedef struct schBwpUlCfg
591 {
592    SchBwpParams   bwp;
593    SchPucchCfgCmn pucchCommon;
594    SchPuschCfgCmn puschCommon;
595 }SchBwpUlCfg;
596
597 typedef struct schCellCfg
598 {
599    uint16_t    cellId;           /* Cell Id */
600    uint16_t    phyCellId;        /* Physical cell id */
601    uint8_t     bandwidth;        /* Supported B/W */
602    SchDuplexMode  dupMode;          /* Duplex type: TDD/FDD */
603    SchSsbCfg   ssbSchCfg;        /* SSB config */
604    SchSib1Cfg  sib1SchCfg;       /* SIB1 config */
605    SchRachCfg  schRachCfg;       /* PRACH config */
606    SchBwpDlCfg schInitialDlBwp;  /* Initial DL BWP */
607    SchBwpUlCfg schInitialUlBwp;  /* Initial UL BWP */
608    uint8_t     puschMu;          /* PUSCH MU */
609 }SchCellCfg;
610
611 typedef struct schCellCfgCfm
612 {
613    uint16_t         cellId;     /* Cell Id */
614    SchMacRsp   rsp;   
615 }SchCellCfgCfm;
616
617 typedef struct ssbInfo
618 {
619    uint8_t         ssbIdx;          /* SSB Index */
620    TimeDomainAlloc tdAlloc; /* Time domain allocation */
621    FreqDomainAlloc fdAlloc; /* Freq domain allocation */
622 }SsbInfo;
623
624 typedef struct sib1AllocInfo
625 {
626    BwpCfg bwp;
627    PdcchCfg sib1PdcchCfg;
628    PdschCfg sib1PdschCfg;
629 } Sib1AllocInfo;
630
631 typedef struct prachSchInfo
632 {
633    uint8_t  numPrachOcas;   /* Num Prach Ocassions */
634    uint8_t  prachFormat;    /* PRACH Format */
635    uint8_t  numRa;          /* Freq domain ocassion */
636    uint8_t  prachStartSymb; /* Freq domain ocassion */
637 }PrachSchInfo;
638
639 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
640 typedef struct dlBrdcstAlloc
641 {
642    /* Ssb transmission is determined as follows:
643     * 0 : No tranamission
644     * 1 : SSB Transmission
645     * 2 : SSB Repetition */
646    uint8_t ssbTrans;
647    uint8_t ssbIdxSupported;
648    SsbInfo ssbInfo[MAX_SSB_IDX];
649    /* Sib1 transmission is determined as follows:
650     * 0 : No tranamission
651     * 1 : SIB1 Transmission
652     * 2 : SIB1 Repetition */
653    uint8_t sib1Trans;
654    Sib1AllocInfo sib1Alloc;
655 }DlBrdcstAlloc;
656
657 typedef struct rarInfo
658 {
659    uint16_t        raRnti;
660    uint8_t         RAPID;
661    uint16_t        ta;
662    FreqDomainAlloc msg3FreqAlloc;
663    uint16_t        tcrnti;
664    uint8_t         rarPdu[8];
665    uint8_t         rarPduLen;
666 }RarInfo;
667
668 typedef struct rarAlloc
669 {
670    RarInfo rarInfo;
671    BwpCfg  bwp;
672    PdcchCfg rarPdcchCfg;
673    PdschCfg rarPdschCfg;
674 }RarAlloc;
675
676 typedef struct msg4Info
677 {
678    uint16_t crnti;
679    uint8_t  ndi;
680    uint8_t  harqProcNum;
681    uint8_t  dlAssignIdx;
682    uint8_t  pucchTpc;
683    uint8_t  pucchResInd;
684    uint8_t  harqFeedbackInd;
685    uint8_t  dciFormatId;
686    uint8_t  *msg4Pdu;
687    uint16_t  msg4PduLen;
688 }Msg4Info;
689
690 typedef struct msg4Alloc
691 {
692    Msg4Info msg4Info;
693    BwpCfg bwp;
694    PdcchCfg msg4PdcchCfg;
695    PdschCfg msg4PdschCfg;
696 }Msg4Alloc;
697
698 typedef struct schSlotValue
699 {
700    SlotIndInfo currentTime;
701    SlotIndInfo broadcastTime;
702    SlotIndInfo rarTime;
703    SlotIndInfo msg4Time;
704    SlotIndInfo dlMsgTime;
705    SlotIndInfo ulDciTime;
706 }SchSlotValue;
707
708 typedef struct format0_0
709 {
710    uint8_t         resourceAllocType;
711    /* since we are using type-1, hence rbBitmap excluded */
712    FreqDomainAlloc freqAlloc;
713    TimeDomainAlloc timeAlloc;
714    uint16_t        rowIndex;
715    uint8_t         mcs;
716    uint8_t         harqProcId;   /* HARQ Process ID */
717    bool            puschHopFlag;
718    bool            freqHopFlag;
719    uint8_t         ndi;    /* NDI */
720    uint8_t         rv;     /* Redundancy Version */
721    uint8_t         tpcCmd;
722    bool            sUlCfgd;
723 }Format0_0;
724
725 typedef struct format0_1
726 {
727 /* TBD */
728
729 }Format0_1;
730
731 typedef struct format1_0
732 {
733 /* TBD */
734
735 }Format1_0;
736
737 typedef struct format1_1
738 {
739 /* TBD */
740 }Format1_1;
741
742 typedef struct dciInfo
743 {
744    uint16_t      cellId;   
745    uint16_t      crnti;          /* CRNI */
746    SlotIndInfo   slotIndInfo;    /* Slot Info: sfn, slot number */
747    BwpCfg        bwpCfg;         /* BWP Cfg */
748    CoresetCfg    coresetCfg;     /* Coreset1 Cfg */
749    FormatType    formatType;     /* DCI Format */
750    union
751    {
752       Format0_0  format0_0;      /* Format 0_0 */
753       Format0_1  format0_1;      /* Format 0_1 */
754       Format1_0  format1_0;      /* Format 1_0 */
755       Format1_1  format1_1;      /* Format 1_1 */
756    }format;
757    DlDCI    dciInfo;
758 }DciInfo;
759
760
761 typedef struct dlSchedInfo
762 {
763    uint16_t cellId;  /* Cell Id */
764    SchSlotValue schSlotValue;
765
766    /* Allocation for broadcast messages */
767    bool isBroadcastPres;
768    DlBrdcstAlloc brdcstAlloc;
769
770    /* Allocation for RAR message */
771    //uint8_t isRarPres;
772    RarAlloc *rarAlloc;
773
774    /* Allocation from MSG4 */
775    Msg4Alloc *msg4Alloc;
776
777    /* UL grant in response to BSR */
778    DciInfo    *ulGrant;
779
780 }DlSchedInfo;
781
782 typedef struct tbInfo
783 {
784    uint8_t  mcs;    /* MCS */
785    uint8_t  ndi;    /* NDI */
786    uint8_t  rv;     /* Redundancy Version */
787    uint16_t tbSize; /* TB Size */
788 }TbInfo;
789
790 typedef struct schPuschInfo
791 {
792    uint8_t          harqProcId;   /* HARQ Process ID */
793    uint8_t          resAllocType; /* Resource allocation type */
794    FreqDomainAlloc  fdAlloc;      /* Freq domain allocation */
795    TimeDomainAlloc  tdAlloc;      /* Time domain allocation */
796    TbInfo           tbInfo;       /* TB info */
797    uint8_t          dmrsMappingType;
798    uint8_t          nrOfDmrsSymbols;
799    uint8_t          dmrsAddPos;
800 }SchPuschInfo;
801
802 typedef struct schPucchInfo
803 {
804    uint16_t         rnti;
805    uint8_t          pucchFormat;
806    FreqDomainAlloc  fdAlloc;      /* Freq domain allocation */
807    TimeDomainAlloc  tdAlloc;      /* Time domain allocation */
808    uint8_t          srFlag;
809    uint8_t          harqFlag;
810    uint8_t          numHarqBits;
811    uint8_t          uciFlag;
812    uint8_t          numUciBits;
813 }SchPucchInfo;
814
815 typedef struct ulSchedInfo
816 {
817    uint16_t      cellId;         /* Cell Id */
818    uint16_t      crnti;          /* CRNI */
819    SlotIndInfo   slotIndInfo;    /* Slot Info: sfn, slot number */
820    uint8_t       dataType;       /* Type of info being scheduled */
821    PrachSchInfo  prachSchInfo;   /* Prach scheduling info */
822    SchPuschInfo  schPuschInfo;   /* Pusch scheduling info */
823    SchPucchInfo  schPucchInfo;   /* Pusch scheduling info */
824 }UlSchedInfo;
825
826 typedef struct rachIndInfo
827 {
828    uint16_t    cellId;
829    uint16_t    crnti;
830    SlotIndInfo timingInfo;
831    uint8_t     slotIdx;
832    uint8_t     symbolIdx;
833    uint8_t     freqIdx;
834    uint8_t     preambleIdx;
835    uint16_t    timingAdv;
836 }RachIndInfo;
837
838
839 typedef struct crcIndInfo
840 {
841    uint16_t    cellId;
842    uint16_t    crnti;
843    SlotIndInfo timingInfo;
844    uint16_t    numCrcInd;
845    uint8_t     crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
846 }CrcIndInfo;
847
848 typedef struct boInfo
849 {
850    uint8_t   lcId;
851    uint32_t  dataVolume;
852 }BOInfo;
853
854 typedef struct dlRlcBOInfo
855 {
856    uint16_t    cellId;
857    uint16_t    crnti;
858    uint16_t    numLc;
859    BOInfo      boInfo[MAX_NUM_LOGICAL_CHANNELS];
860 }DlRlcBOInfo;
861
862 /* Info of Scheduling Request to Add/Modify */
863 typedef struct schSchedReqInfo
864 {
865    uint8_t              schedReqId;
866    SchSrProhibitTimer   srProhibitTmr;
867    SchSrTransMax        srTransMax;
868 }SchSchedReqInfo;
869
870 /* Scheduling Request Configuration */
871 typedef struct schSchedReqCfg
872 {
873    uint8_t          addModListCount;
874    SchSchedReqInfo  addModList[MAX_NUM_SR_CFG_PER_CELL_GRP];   /* List of Scheduling req to be added/modified */
875    uint8_t          relListCount;
876    uint8_t          relList[MAX_NUM_SR_CFG_PER_CELL_GRP];      /* list of scheduling request Id to be deleted */
877 }SchSchedReqCfg;
878
879 /* Info of Tag to Add/Modify */
880 typedef struct schTagInfo
881 {
882    uint8_t       tagId;
883    SchTimeAlignmentTimer  timeAlignmentTmr;
884 }SchTagInfo;
885
886 /* Timing Advance Group Configuration */
887 typedef struct schTagCfg
888 {
889    uint8_t      addModListCount;
890    SchTagInfo   addModList[MAX_NUM_TAGS];    /* List of Tag to Add/Modify */
891    uint8_t      relListCount;
892    uint8_t      relList[MAX_NUM_TAGS];       /* list of Tag Id to release */
893 }SchTagCfg;
894
895 /* Configuration for Power headroom reporting */
896 typedef struct schPhrCfg
897 {
898    SchPhrPeriodicTimer       periodicTmr;
899    SchPhrProhibitTimer       prohibitTmr;
900    SchPhrTxPwrFactorChange   txpowerFactorChange;
901    bool                      multiplePhr;
902    bool                      dummy;
903    bool                      type2OtherCell;
904    SchPhrModeOtherCG         modeOtherCG;
905 }SchPhrCfg;
906
907 /* MAC cell Group configuration */
908 typedef struct schMacCellGrpCfg
909 {
910    SchSchedReqCfg   schedReqCfg;
911    SchTagCfg        tagCfg;
912    SchPhrCfg        phrCfg;             /* To be used only if phrCfgSetupPres is true */      
913 }SchMacCellGrpCfg;
914
915 /* Physical Cell Group Configuration */
916 typedef struct schPhyCellGrpCfg
917 {
918    SchPdschHarqAckCodebook    pdschHarqAckCodebook;
919    int8_t     pNrFr1;
920 }SchPhyCellGrpCfg;
921
922 /* Control resource set info */
923 typedef struct schControlRsrcSet
924 {
925    uint8_t             cRSetId;                /* Control resource set id */
926    uint8_t             freqDomainRsrc[FREQ_DOM_RSRC_SIZE];  /* Frequency domain resource */
927    uint8_t             duration;
928    SchREGMappingType   cceRegMappingType;
929    SchPrecoderGranul   precoderGranularity;
930    uint16_t            dmrsScramblingId;
931 }SchControlRsrcSet;
932
933 /* Search Space info */
934 typedef struct schSearchSpace
935 {
936    uint8_t                  searchSpaceId;
937    uint8_t                  cRSetId;
938    SchMSlotPeriodAndOffset  mSlotPeriodicityAndOffset;
939    uint8_t                  mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
940    SchAggrLevel             numCandidatesAggLevel1;      /* Number of candidates for aggregation level 1 */
941    SchAggrLevel             numCandidatesAggLevel2;      /* Number of candidates for aggregation level 2 */
942    SchAggrLevel             numCandidatesAggLevel4;      /* Number of candidates for aggregation level 4 */
943    SchAggrLevel             numCandidatesAggLevel8;      /* Number of candidates for aggregation level 8 */
944    SchAggrLevel             numCandidatesAggLevel16;     /* Number of candidates for aggregation level 16 */
945    SchSearchSpaceType       searchSpaceType;
946    uint8_t                  ueSpecificDciFormat;
947 }SchSearchSpace;
948
949 /* PDCCH cofniguration */
950 typedef struct schPdcchConfig
951 {
952    uint8_t           numCRsetToAddMod;
953    SchControlRsrcSet  cRSetToAddModList[MAX_NUM_CRSET];           /* List of control resource set to add/modify */
954    uint8_t           numCRsetToRel;
955    uint8_t           cRSetToRelList[MAX_NUM_CRSET];              /* List of control resource set to release */
956    uint8_t           numSearchSpcToAddMod;
957    SchSearchSpace    searchSpcToAddModList[MAX_NUM_SEARCH_SPC];  /* List of search space to add/modify */
958    uint8_t           numSearchSpcToRel;
959    uint8_t           searchSpcToRelList[MAX_NUM_SEARCH_SPC];     /* List of search space to release */
960 }SchPdcchConfig;
961
962 /* PDSCH time domain resource allocation */
963 typedef struct schPdschTimeDomRsrcAlloc
964 {
965    SchTimeDomRsrcAllocMappingType    mappingType;
966    uint8_t    startSymbol;
967    uint8_t    symbolLength;
968 }SchPdschTimeDomRsrcAlloc;
969
970 /* DMRS downlink configuration */
971 typedef struct schDmrsDlCfg
972 {
973    SchDmrsAdditionPosition   addPos;       /* DMRS additional position */
974 }SchDmrsDlCfg;
975
976 /* PDSCH Configuration */
977 typedef struct schPdschConfig
978 {
979    SchDmrsDlCfg               dmrsDlCfgForPdschMapTypeA;
980    SchResourceAllocType       resourceAllocType;
981    uint8_t                    numTimeDomRsrcAlloc;
982    SchPdschTimeDomRsrcAlloc   timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
983    SchRBGSize                 rbgSize;
984    SchCodeWordsSchedByDci     numCodeWordsSchByDci;                    /* Number of code words scheduled by DCI */
985    SchBundlingType            bundlingType;
986 }SchPdschConfig;
987
988 /* Initial Downlink BWP */
989 typedef struct schInitalDlBwp
990 {
991    bool             pdcchCfgPres;
992    SchPdcchConfig   pdcchCfg;
993    bool             pdschCfgPres;
994    SchPdschConfig   pdschCfg;
995 }SchInitalDlBwp;
996
997 /* BWP Downlink common */
998 typedef struct schBwpDlCommon
999 {
1000 }SchBwpDlCommon;
1001
1002 /* Downlink BWP information */
1003 typedef struct schDlBwpInfo
1004 {
1005    uint8_t          bwpId;
1006 }SchDlBwpInfo;
1007
1008 /* PDCCH Serving Cell configuration */
1009 typedef struct schPdschServCellCfg
1010 {
1011    uint8_t                  *maxMimoLayers;           
1012    SchNumHarqProcForPdsch   numHarqProcForPdsch;
1013    SchMaxCodeBlkGrpPerTB    *maxCodeBlkGrpPerTb;
1014    bool                     *codeBlkGrpFlushInd;
1015    SchPdschXOverhead        *xOverhead;
1016 }SchPdschServCellCfg;
1017
1018 /* PUCCH Configuration */
1019 typedef struct schPucchCfg
1020 {
1021    /* TODO : Not used currently */ 
1022 }SchPucchCfg;
1023
1024 /* Transform precoding disabled */
1025 typedef struct schTransPrecodDisabled
1026 {
1027    uint16_t   scramblingId0;
1028 }SchTransPrecodDisabled;
1029
1030 /* DMRS Uplink configuration */
1031 typedef struct SchDmrsUlCfg
1032 {
1033    SchDmrsAdditionPosition    addPos;               /* DMRS additional position */
1034    SchTransPrecodDisabled     transPrecodDisabled;  /* Transform precoding disabled */
1035 }SchDmrsUlCfg;
1036
1037 /* PUSCH Time Domain Resource Allocation */
1038 typedef struct schPuschTimeDomRsrcAlloc
1039 {
1040    uint8_t   k2;
1041    SchTimeDomRsrcAllocMappingType   mappingType;
1042    uint8_t   startSymbol;
1043    uint8_t   symbolLength;
1044 }SchPuschTimeDomRsrcAlloc;
1045
1046 /* PUSCH Configuration */
1047 typedef struct schPuschCfg
1048 {
1049    SchDmrsUlCfg               dmrsUlCfgForPuschMapTypeA;
1050    SchResourceAllocType       resourceAllocType;
1051    uint8_t                    numTimeDomRsrcAlloc;
1052    SchPuschTimeDomRsrcAlloc   timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1053    SchTransformPrecoder       transformPrecoder;
1054 }SchPuschCfg;
1055
1056 /* Initial Uplink BWP */
1057 typedef struct schInitialUlBwp
1058 {
1059    bool          pucchCfgPres;
1060    SchPucchCfg   pucchCfg;
1061    bool          puschCfgPres;
1062    SchPuschCfg   puschCfg;
1063 }SchInitialUlBwp;
1064
1065 /* Uplink BWP information */
1066 typedef struct schUlBwpInfo
1067 {
1068    uint8_t        bwpId;
1069 }SchUlBwpInfo;
1070
1071 /* Serving cell configuration */
1072 typedef struct schServCellCfgInfo
1073 {
1074    SchInitalDlBwp        initDlBwp;
1075    uint8_t               numDlBwpToAdd;
1076    SchDlBwpInfo          DlBwpToAddList[MAX_NUM_BWP];
1077    uint8_t               firstActvDlBwpId;
1078    uint8_t               defaultDlBwpId;
1079    uint8_t               *bwpInactivityTmr;
1080    SchPdschServCellCfg   pdschServCellCfg;
1081    SchInitialUlBwp       initUlBwp;
1082    uint8_t               numUlBwpToAdd;
1083    SchUlBwpInfo          UlBwpToAddList[MAX_NUM_BWP];
1084    uint8_t               firstActvUlBwpId;
1085 }SchServCellCfgInfo;
1086
1087 typedef struct schNonDynFiveQi
1088 {
1089    uint16_t   fiveQi;
1090    uint8_t    priorLevel;
1091    uint16_t   avgWindow;
1092    uint16_t   maxDataBurstVol;
1093 }SchNonDynFiveQi;
1094
1095 typedef struct schDynFiveQi
1096 {
1097    uint8_t    priorLevel;
1098    uint16_t   packetDelayBudget;
1099    uint8_t    packetErrRateScalar;
1100    uint8_t    packetErrRateExp;
1101    uint16_t   fiveQi;
1102    uint8_t    delayCritical;
1103    uint16_t   avgWindow;
1104    uint16_t   maxDataBurstVol;
1105 }SchDynFiveQi;
1106
1107 typedef struct schNgRanAllocAndRetPri
1108 {
1109    uint8_t priorityLevel;
1110    uint8_t preEmptionCap;
1111    uint8_t preEmptionVul;
1112 }SchNgRanAllocAndRetPri;
1113
1114 typedef struct schGrbQosFlowInfo
1115 {
1116    uint32_t maxFlowBitRateDl;
1117    uint32_t maxFlowBitRateUl;
1118    uint32_t guarFlowBitRateDl;
1119    uint32_t guarFlowBitRateUl;
1120 }SchGrbQosFlowInfo;
1121
1122 /* DRB QoS */
1123 typedef struct schDrbQos
1124 {
1125    uint8_t  fiveQiType;   /* Dynamic or non-dynamic */ 
1126    union
1127    {
1128       SchNonDynFiveQi   nonDyn5Qi;
1129       SchDynFiveQi      dyn5Qi;
1130    }u;
1131    SchNgRanAllocAndRetPri  ngRanRetPri;
1132    SchGrbQosFlowInfo       grbQosFlowInfo;
1133    uint16_t                pduSessionId;
1134    uint32_t                ulPduSessAggMaxBitRate;   /* UL PDU Session Aggregate max bit rate */
1135 }SchDrbQosInfo;
1136
1137 typedef struct schSnssai
1138 {
1139    uint8_t   sst;
1140    uint8_t   sd[SD_SIZE];
1141 }SchSnssai;
1142
1143 /* Special cell configuration */
1144 typedef struct schSpCellCfg
1145 {
1146    uint8_t           servCellIdx;
1147    SchServCellCfgInfo   servCellCfg;
1148 }SchSpCellCfg;
1149
1150 /* Uplink logical channel configuration */
1151 typedef struct SchUlLcCfg
1152 {
1153    uint8_t priority;
1154    uint8_t lcGroup;
1155    uint8_t schReqId;
1156    uint8_t pbr;        // prioritisedBitRate
1157    uint8_t bsd;        // bucketSizeDuration
1158 }SchUlLcCfg;
1159
1160 /* Downlink logical channel configuration */
1161 typedef struct schDlLcCfg
1162 {
1163    uint8_t lcp;      // logical Channel Prioritization
1164 }SchDlLcCfg;
1165
1166 /* Logical Channel configuration */
1167 typedef struct schLcCfg
1168 {
1169    uint8_t        lcId;
1170    SchDrbQosInfo  *drbQos;
1171    SchSnssai      *snssai;
1172    SchDlLcCfg     dlLcCfg;
1173    SchUlLcCfg     *ulLcCfg;
1174 }SchLcCfg;
1175
1176 /* Aggregate max bit rate */
1177 typedef struct aggrMaxBitRate
1178 {
1179    uint32_t   ulBitRate;
1180    uint32_t   dlBitRate;
1181 }SchAggrMaxBitRate;
1182
1183 /* UE configuration */
1184 typedef struct schUeCfg
1185 {
1186    uint16_t        cellId;
1187    uint16_t        crnti;
1188    SchMacCellGrpCfg   macCellGrpCfg;
1189    SchPhyCellGrpCfg   phyCellGrpCfg;
1190    SchSpCellCfg       spCellCfg;
1191    SchAggrMaxBitRate  *aggrMaxBitRate;
1192    uint8_t            numLc;
1193    SchLcCfg           lcCfgList[MAX_NUM_LOGICAL_CHANNELS];
1194 }SchUeCfg;
1195
1196 typedef struct schUeCfgRsp
1197 {
1198    uint16_t   ueIdx;
1199    uint16_t   cellId;
1200    uint16_t   crnti;
1201    SchMacRsp  rsp;
1202    SchFailureCause cause;
1203 }SchUeCfgRsp;
1204
1205 typedef struct dataVolInfo
1206 {
1207    uint8_t  lcgId;
1208    uint32_t dataVol;
1209 }DataVolInfo;
1210
1211 typedef struct ulBufferStatusRptInd
1212 {
1213    uint16_t    cellId;
1214    uint16_t    crnti;
1215    BsrType     bsrType;
1216    uint8_t     numLcg;
1217    DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
1218 }UlBufferStatusRptInd;
1219
1220 typedef struct srUciIndInfo
1221 {
1222    uint16_t    cellId;
1223    uint16_t    crnti;
1224    SlotIndInfo slotInd;
1225    uint8_t     numSrBits;
1226    uint8_t     srPayload[MAX_SR_BITS_IN_BYTES];
1227 }SrUciIndInfo;
1228
1229 /* function pointers */
1230
1231 typedef uint8_t (*SchCellCfgCfmFunc)    ARGS((
1232          Pst            *pst,           /* Post Structure */                         
1233          SchCellCfgCfm  *schCellCfgCfm  /* Cell Cfg Cfm */
1234          ));
1235
1236 typedef uint8_t (*SchCellCfgFunc)    ARGS((
1237          Pst         *pst,           /* Post Structure */                         
1238          SchCellCfg  *schCellCfg     /* Cell Cfg  */
1239          ));
1240
1241 typedef uint8_t (*SchMacDlAllocFunc)     ARGS((                     
1242          Pst            *pst,          /* Post Structure */                         
1243          DlSchedInfo    *dlSchedInfo   /* dl allocation Info */                      
1244          ));
1245
1246 typedef uint8_t (*SchMacUlSchInfoFunc)     ARGS((                     
1247          Pst         *pst,           /* Post Structure */                         
1248          UlSchedInfo *ulSchedInfo    /* UL Alloc Sch  Info */                      
1249          ));
1250
1251 typedef uint8_t (*MacSchRachIndFunc) ARGS((
1252          Pst         *pst,         /* Post structure */
1253          RachIndInfo *rachInd));    /* Rach Indication Info */
1254
1255 typedef uint8_t (*MacSchCrcIndFunc) ARGS(( 
1256          Pst         *pst,         /* Post structure */
1257          CrcIndInfo  *crcInd));     /* CRC Info */
1258
1259 typedef uint8_t (*MacSchDlRlcBoInfoFunc) ARGS((
1260          Pst         *pst,         /* Post structure */
1261          DlRlcBOInfo *dlBoInfo));   /* DL BO Info */
1262
1263 typedef uint8_t (*MacSchUeCreateReqFunc) ARGS((
1264          Pst         *pst,           /* Post structure */
1265          SchUeCfg    *ueCfgToSch));   /* Scheduler UE Cfg */
1266
1267 typedef uint8_t (*SchUeCfgRspFunc) ARGS((
1268          Pst         *pst,           /* Post structure */
1269          SchUeCfgRsp *cfgRsp));       /* Scheduler UE Cfg response */
1270
1271 typedef uint8_t (*MacSchSlotIndFunc) ARGS((
1272          Pst         *pst,          /* Post structure */
1273          SlotIndInfo *slotInd));    /* Slot Info */
1274
1275 typedef uint8_t (*MacSchBsrFunc)       ARGS((
1276    Pst                  *pst,
1277    UlBufferStatusRptInd *bsrInd
1278 ));
1279
1280 typedef uint8_t (*MacSchSrUciIndFunc) ARGS(( 
1281          Pst         *pst,         /* Post structure */
1282          SrUciIndInfo  *uciInd));    /* UCI IND Info */
1283
1284
1285 /* function declarations */
1286 uint8_t packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd);
1287 uint8_t packSchMacDlAlloc(Pst *pst, DlSchedInfo  *dlSchedInfo);
1288 uint8_t packSchMacUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo);
1289 uint8_t packSchCellCfg(Pst *pst, SchCellCfg  *schCellCfg);
1290 uint8_t packSchCellCfgCfm(Pst *pst, SchCellCfgCfm  *schCellCfgCfm);
1291 uint8_t MacProcDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo);
1292 uint8_t MacProcSchCellCfg(Pst *pst, SchCellCfg  *schCellCfg);
1293 uint8_t MacProcSchCellCfgCfm(Pst *pst, SchCellCfgCfm  *schCellCfgCfm);
1294 uint8_t SchHdlCellCfgReq(Pst *pst, SchCellCfg *schCellCfg);
1295 uint8_t schActvInit(Ent entity, Inst instId, Region region, Reason reason);
1296 uint8_t SchSendCfgCfm(Pst *pst, RgMngmt *cfm);
1297 uint8_t MacProcUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo);
1298 uint8_t packMacSchRachInd(Pst *pst, RachIndInfo *rachInd);
1299 uint8_t MacSchRachInd(Pst *pst, RachIndInfo *rachInd);
1300 uint8_t packMacSchCrcInd(Pst *pst, CrcIndInfo *crcInd);
1301 uint8_t MacSchCrcInd(Pst *pst, CrcIndInfo *crcInd);
1302 uint8_t packMacSchDlRlcBoInfo(Pst *pst, DlRlcBOInfo *dlBoInfo);
1303 uint8_t MacSchDlRlcBoInfo(Pst *pst, DlRlcBOInfo *dlBoInfo);
1304 uint8_t packMacSchUeCreateReq(Pst *pst, SchUeCfg *ueCfgToSch);
1305 uint8_t MacSchUeCreateReq(Pst *pst, SchUeCfg *ueCfgToSch);
1306 uint8_t packSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
1307 uint8_t MacProcSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
1308 uint8_t MacSchSlotInd ARGS((Pst * pst, SlotIndInfo * slotInd));
1309 uint8_t packMacSchSlotInd(Pst * pst, SlotIndInfo * slotInd);
1310 uint8_t unpackMacSchSlotInd(MacSchSlotIndFunc func, Pst *pst, Buffer  *mBuf);
1311 uint8_t packMacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd);
1312 uint8_t MacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd);
1313 uint8_t packMacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd);
1314 uint8_t MacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd);
1315
1316 /**********************************************************************
1317   End of file
1318  **********************************************************************/
1319