MAC Clean-up [Issue-ID: ODUHIGH-212]
[o-du/l2.git] / src / cm / common_def.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 #include <stdio.h>
19 #include <ctype.h>
20 #include <stdlib.h>
21 #include <string.h>
22 #include <stdbool.h>
23 #include <stdint.h>
24
25 #include "cm_mem.h"
26 #include "cm_math.h"
27 #include "envopt.h"
28 #include "envdep.h"
29 #include "envind.h"
30 #include "gen.h" 
31 #include "ssi.h" 
32 #include "cm5.h"
33 #include "cm_tkns.h"
34 #include "cm_mblk.h"
35 #include "cm_llist.h"
36 #include "cm_hash.h"
37 #include "cm_lte.h"
38 #include "cm_err.h"
39 #include "cm_tpt.h"
40 #include "cm.h"
41 #include "gen.x"           /* general */
42 #include "ssi.x"           /* system services */
43 #include "cm_math.x"
44 #include "cm_tpt.x"
45 #include "cm_tkns.x" 
46 #include "cm_mblk.x"
47 #include "cm_llist.x"
48 #include "cm5.x" 
49 #include "cm_hash.x"
50 #include "cm_lte.x"
51 #include "cm_lib.x"
52 #include "du_log.h"
53
54 /* MAX values */
55 #define MAX_NUM_CELL 1
56 #define MAX_NUM_UE   1
57
58 /* 5G ORAN phy delay */
59 #define PHY_DELTA 2
60
61  /* SELECTORS */ 
62 #define ODU_SELECTOR_LC 0
63 #define ODU_SELECTOR_TC 1
64 #define ODU_SELECTOR_LWLC 2
65
66 #define ODU_START_CRNTI   100
67 #define ODU_END_CRNTI     500
68
69 #define GET_UE_IDX( _crnti,_ueIdx)         \
70 {                                          \
71    _ueIdx = _crnti - ODU_START_CRNTI + 1;  \
72 }
73
74 #define GET_CRNTI( _crnti,_ueIdx)          \
75 {                                          \
76    _crnti = _ueIdx + ODU_START_CRTNI - 1;  \
77 }
78
79 /* Calculates cellIdx from cellId */
80 #define GET_CELL_IDX(_cellId, _cellIdx)   \
81 {                                         \
82    _cellIdx = _cellId - 1;                \
83 }
84
85 typedef struct slotIndInfo
86 {
87    uint16_t cellId;
88    uint16_t sfn;
89    uint16_t slot;
90 }SlotIndInfo;
91
92 typedef struct PlmnIdentity
93 {
94    uint8_t mcc[3];
95    uint8_t mnc[3];
96 }Plmn;
97
98 /**********************************************************************
99   End of file
100 ***********************************************************************/