RAR_message
[o-du/l2.git] / src / 5gnrmac / mac.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 #ifndef _MAC_H_
19 #define _MAC_H_
20
21 #include <stdio.h>
22
23 /* header include files (.h) */
24 #include "envopt.h"        /* environment options */
25 #include "envdep.h"        /* environment dependent */
26 #include "envind.h"        /* environment independent */
27 #include "gen.h"           /* general */
28 #include "ssi.h"           /* system services */
29 #include "cm_tkns.h"       /* Common Token Defines */
30 #include "cm_llist.h"      /* Common Link List Defines */
31 #include "cm_hash.h"       /* Common Hash List Defines */
32 #include "cm_lte.h"        /* Common LTE Defines */
33 #include "cm_mblk.h"        /* Common LTE Defines */
34 #include "tfu.h"           /* RGU Interface defines */
35 #include "lrg.h"
36 #include "du_app_mac_inf.h"
37 #include "mac_sch_interface.h"
38
39 /* header/extern include files (.x) */
40 #include "gen.x"           /* general */
41 #include "ssi.x"           /* system services */
42 #include "cm_tkns.x"       /* Common Token Definitions */
43 #include "cm_llist.x"      /* Common Link List Definitions */
44 #include "cm_lib.x"        /* Common Library Definitions */
45 #include "cm_hash.x"       /* Common Hash List Definitions */
46 #include "cm_lte.x"        /* Common LTE Defines */
47 #include "cm_mblk.x"        /* Common LTE Defines */
48 #include "tfu.x"           /* RGU Interface includes */
49 #include "lrg.x"
50
51 #define MAX_SLOT_SUPPORTED    10 /* numerology 0 15Khz */
52 #define MAX_ZERO_CORR_CFG_IDX 16 /* max zero correlation config index */
53 #define SI_RNTI 0xFFFF
54 #define P-RNTI  0xFFFE
55
56 typedef struct macDlSlot
57 {
58    DlAlloc dlInfo;
59
60 }MacDlSlot;
61
62 typedef struct macUlSlot
63 {
64    UlSchInfo    ulCellInfo;
65 }MacUlSlot;
66
67 typedef struct macCellCb
68 {
69    uint16_t   cellId;
70    RachIndInfo raCb;
71    MacDlSlot  dlSlot[MAX_SLOT_SUPPORTED];
72    MacUlSlot  ulSlot[MAX_SLOT_SUPPORTED];
73 }MacCellCb;
74
75 typedef struct macCb
76 {
77    Inst       macInst;
78    MacCellCb  *macCell;
79 }MacCb;
80
81 /* global variable */
82 EXTERN MacCb macCb;
83 void fillMacToSchPst(Pst *pst);
84
85 #endif
86 /**********************************************************************
87   End of file
88  **********************************************************************/