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