Modify licenses
[scp/ocu/5gnr.git] / Include / gnbServiceType.h
1 /******************************************************************************
2 *
3 *   Copyright (c) 2020 ICT/CAS.
4 *
5 *   Licensed under the O-RAN Software License, Version 1.0 (the "Software 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 *       https://www.o-ran.org/software
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
20 #ifndef __GNB_COMM_TYPE_H__
21 #define __GNB_COMM_TYPE_H__
22
23 /** @brief max cell num */
24 #define MAX_CELL_NUM                   4
25
26 /** @brief max cell id */
27 #define MAX_CELL_ID                    (MAX_CELL_NUM - 1)
28
29 /** @brief max ue num */
30 #define MAX_UE_NUM                     42
31 #define MAX_UE_NUM_PER_CELL            21
32
33 /** @brief max ue id */
34 #define MAX_UE_ID                      (MAX_UE_NUM - 1)
35
36 /** @brief max drb num */
37 #define MAX_DRB_NUM                    33
38
39 /** @brief max drb id */
40 #define MAX_DRB_ID                     (MAX_DRB_NUM - 1)
41
42 /** @brief max srb num */
43 #define MAX_SRB_NUM                    4
44
45 /** @brief max srb id */
46 #define MAX_SRB_ID                     (MAX_SRB_NUM - 1)
47
48 /** @brief max logical channel num */
49 #define MAX_LCH_NUM                    33
50
51 #define MAX_PLMN_ID_NUM              8
52
53 /** @brief tunnel port */
54 #define TUNNEL_PORT                   2152
55
56 #define MAX_PDU_SESSION_NUM                      (10)
57
58 #define MAC_CU_DU_TNL_ASSOC_NUM (32)
59 /** @brief Cell ID */
60 typedef UINT16   CmNrCellId;
61
62 /** @brief RNTI */
63 typedef UINT16   CmNrRnti;
64
65 /** @brief I-RNTI */
66 typedef UINT64  CmNrIRnti;
67
68 /** @brief Ue Id */
69 typedef UINT16   CmNrUeId;
70
71 /** @brief Radio Bearer ID */
72 typedef UINT8    CmNrRbId;
73
74 /** @brief Logical Channel Type */
75 typedef UINT8    CmNrLcType;
76
77 /** @brief Radio Bearer ID */
78 typedef UINT8    CmNrRbId;
79
80 /** @brief Mode Type TM/UM/AM */
81 typedef UINT8    CmNrRlcMode;
82
83 /** @brief Logical Channel ID */
84 typedef UINT8    CmNrLcId;
85
86 /** @brief Logical Channel Type */
87 typedef UINT8    CmNrLcType;
88
89 /** @brief Sn bits*/
90 typedef UINT8    CmRlcSnLen;
91
92 /*见协议38401 8.5 F1 Startup and cells activation*/
93 typedef enum
94 {
95     CELL_ACTIVE_STATE,
96     CELL_INACTIVE_STATE,
97
98 }CellState_e;
99
100
101 typedef struct  PlmnId
102 {
103     UINT8                  mcc2:4;
104     UINT8                  mcc1:4;
105     UINT8                  mnc3:4;
106     UINT8                  mcc3:4;
107     UINT8                  mnc2:4;
108     UINT8                  mnc1:4;
109 } PlmnId_t;
110
111 /* NR CELL Identity */
112 typedef struct  NrCellId
113 {
114     UINT64                  cellId:36;
115 }NrCellId_t;
116
117 #define      TRACKING_AREA_CODE     (1<<0)
118 #define      RANRC                  (1<<1)
119 typedef struct  plmnInformation
120 {
121     UINT16                  bitMask;
122     UINT8                   plmnIdNum;
123     PlmnId_t                plmnId[MAX_PLMN_ID_NUM];
124     UINT32                  trackingAreaCode;  /*option*/
125     UINT8                   ranac;             /*option*/
126     UINT64                  cellIdentity;
127     BOOL                    cellReservedForOperatorUse;
128 } PlmnInformation_t;
129
130
131 typedef struct
132 {
133     PlmnId_t               plmn;
134     UINT64                 cellId;
135 } GnbNrCgi_t;
136
137 typedef struct
138 {
139     PlmnId_t               plmn;
140 }GnbServedPlmn_t;
141
142
143 /** @brief SRBID */
144 typedef LONG     GnbSrbId_t;//9.3.1.7
145
146 /** @brief DRB ID */
147 typedef LONG     GnbDrbId_t;
148
149 /** @brief Transaction ID */
150 typedef LONG     GnbTransId;
151
152 /** @brief gND DU ID */
153 typedef LONG     GnbDuId;
154
155 /** @brief gND CU ID */
156 typedef LONG     GnbCuId;
157
158
159
160 #endif