Committing in PDCP code
[o-du/l2.git] / src / cm / lpj.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 /********************************************************************20**
20   
21         Name:    LPJ PDCP Layer Manager Interface
22     
23         Type:    C include file
24   
25         Desc:    This file Contains the Hash defines for LPJ Interface
26  
27         File:    lpj.h
28   
29 *********************************************************************21*/
30
31 #ifndef __LPJ_H__
32 #define __LPJ_H__
33
34 #ifdef __cplusplus
35 EXTERN "C" {
36 #endif  /*for extern "C"*/
37
38 #define STUDXSAP           189
39
40 #define LPJ_SEL_LC         0
41 #ifdef TENB_SPLIT_ARCH
42 #define LPJ_MODE_PDCP_UL   0x1
43 #define LPJ_MODE_PDCP_DL   0x2
44 #endif
45
46 /* KWU Interface Hash Defines */
47 #define LPJ_MAX_NUM_RB     24      /*!< Maximum number of RBs. */
48
49 /* Event codes at the PDCP management interface */
50 #define LPJ_EVT_CFG_REQ    0x50    /*!< General configuration request. */
51 #define LPJ_EVT_CFG_CFM    0x51    /*!< General configuration confirm. */
52 #define LPJ_EVT_CNTRL_REQ  0x52    /*!< Control request. */
53 #define LPJ_EVT_CNTRL_CFM  0x53    /*!< Control confirm. */
54 #define LPJ_EVT_STA_IND    0x54    /*!< Unsolicited status indication. */
55 #define LPJ_EVT_STA_REQ    0x55    /*!< Solicited status request. */
56 #define LPJ_EVT_STA_CFM    0x56    /*!< Solicited status confirm. */
57 #define LPJ_EVT_STS_REQ    0x57    /*!< Statistics request. */
58 #define LPJ_EVT_STS_CFM    0x58    /*!< Statistics confirm. */
59 #define LPJ_EVT_TRC_IND    0x59    /*!< Trace indication. */
60 /* lpj_h_001.main_2 added support for L2 Measurement */
61 #define LPJ_EVT_L2MEAS_REQ 0x60    /*!< L2 Measurement Request. */
62 #define LPJ_EVT_L2MEAS_CFM 0x61    /*!< L2 Measurement Confirm. */
63 #ifdef LTE_L2_MEAS
64 #define LPJ_EVT_MEAS_HALT  0x62    /*!< Measurement is halted due to RB deletion */
65 #define LPJ_EVT_L2MEAS_SEND_REQ  0x63   /*!< L2 Measurement Send Request*/
66 #define LPJ_EVT_L2MEAS_STOP_REQ  0x64   /*!< L2 Measurement Stop Request*/
67 #define LPJ_EVT_L2MEAS_STOP_CFM  0x65   /*!< L2 Measurement Stop Confirm*/    
68 #endif
69 #define LPJ_EVT_L2MEAS_SEND_REQ 0x63    /*!< L2 Measurement send request*/
70 #define LPJ_EVT_L2MEAS_STOP_REQ 0x64   /*!< L2 Measurement stop request.*/
71 #define LPJ_EVT_L2MEAS_STOP_CFM 0x65   /*!< L2 Measurement stop confirm*/
72
73 #define LPJ_ZEROSTS        0       /*!< Reset the statistics counters. */
74 #define LPJ_NOZEROSTS      1       /*!< No reset of statistics counters. */
75
76 /********************************************************************KW**
77  Specific event values
78 *********************************************************************KW*/
79 #define LPJ_EVENT_RGU_BND_CFM        (LCM_EVENT_LYR_SPECIFIC + 1)
80 #define LPJ_EVENT_KWU_BND_REQ        (LCM_EVENT_LYR_SPECIFIC + 2)
81 #define LPJ_EVENT_CKW_BND_REQ        (LCM_EVENT_LYR_SPECIFIC + 3)
82 #define LPJ_EVENT_CPJ_BND_REQ        (LCM_EVENT_LYR_SPECIFIC + 4)
83 #define LPJ_EVENT_PJU_BND_REQ        (LCM_EVENT_LYR_SPECIFIC + 5)
84
85 /********************************************************************KW**
86  Specific cause values
87 *********************************************************************KW*/
88 #define LPJ_CAUSE_UNKNOWN        (LCM_CAUSE_LYR_SPECIFIC + 1)
89 #define LPJ_CAUSE_SAP_BNDENB     (LCM_CAUSE_LYR_SPECIFIC + 2)
90 #define LPJ_CAUSE_SAP_BNDDIS     (LCM_CAUSE_LYR_SPECIFIC + 3)
91 #define LMG_CAUSE_RSRC_UNAVAIL   (LCM_CAUSE_LYR_SPECIFIC + 4)
92 /* lpj_h_001.main_2 added support for L2 Measurement */
93 #ifdef LTE_L2_MEAS
94 #define LPJ_CAUSE_MEM_FAILED         (LCM_CAUSE_LYR_SPECIFIC + 5)
95 #define LPJ_CAUSE_INVALID_MEASTYPE   (LCM_CAUSE_LYR_SPECIFIC  + 6)
96 #define LPJ_CAUSE_EXCEED_MEASREQ     (LCM_CAUSE_LYR_SPECIFIC  + 7)
97 #define LPJ_CAUSE_EXCEED_NUMQCI      (LCM_CAUSE_LYR_SPECIFIC  + 8)
98 #define LPJ_CAUSE_MEAS_ALREADY_ENA   (LCM_CAUSE_LYR_SPECIFIC  + 9)
99 #define LPJ_CAUSE_INVALID_QCI        (LCM_CAUSE_LYR_SPECIFIC + 10)
100 #define LPJ_CAUSE_ZERO_MEASPERIOD    (LCM_CAUSE_LYR_SPECIFIC + 11)
101 #define LPJ_CAUSE_RB_DELETION        (LCM_CAUSE_LYR_SPECIFIC + 12)
102 #endif
103 /************************************************************************
104  *                         Events
105  ***********************************************************************/
106 #define LPJ_EVT_BND_REQ       0     /*!< Bind Request Event. */
107 #define LPJ_EVT_BND_CFM       1     /*!< Bind Confirm Event. */
108 #define LPJ_EVT_UBND_REQ      2     /*!< Unbind Request Event. */
109 #define LPJ_EVT_WAIT_BNDCFM   3     /*!< Wait Bind Confirm Event. */
110
111 /*************************************************************************
112  *                            KWU SAPs
113  ************************************************************************/
114 #define LPJ_RRC_SAP   0x00         /*!< RLU SAP ID for RRC */
115 #define LPJ_PDCP_SAP  0x01         /*!< RLU SAP ID for PDCP */
116
117 /********************************************************************KW**
118  Usta defines
119 *********************************************************************KW*/
120 #define LPJ_USTA_DGNVAL_NONE     1
121 #define LPJ_USTA_DGNVAL_MEM      2
122 #define LPJ_USTA_DGNVAL_SAPID    3
123 #define LPJ_USTA_DGNVAL_UEID     4
124 #define LPJ_USTA_MAX_DGNVAL      256
125 /********************************************************************KW**
126  Specific event values
127 *********************************************************************KW*/
128 #define LPJ_EVENT_LI_BND_CFM        (LCM_EVENT_LYR_SPECIFIC + 1)
129
130 #define LPJ_PART_NUM_STR_LEN        10        /*!< Part Number String Length. */
131
132 /* lpj_h_001.main_2 added support for L2 Measurement */
133 /********************************************************************KW**
134  L2 MEASUREMENT VALUES 
135 *********************************************************************KW*/
136 #ifdef LTE_L2_MEAS
137 #define LPJ_L2MEAS_NONE       0x0000
138 #define LPJ_L2MEAS_DL_DELAY   0x0001
139 #define LPJ_L2MEAS_DL_DISC    0x0002
140 #define LPJ_L2MEAS_UL_LOSS    0x0004
141 #define LPJ_L2MEAS_DLDP_BIT_RATE 0x0008 /*Added for L2 Meas*/
142 #define LPJ_L2MEAS_ULDP_BIT_RATE 0x0010
143 #define LPJ_L2MEAS_DLCP_BIT_RATE 0x0020 
144 #define LPJ_L2MEAS_ULCP_BIT_RATE 0x0040
145 #define LPJ_L2CPU_PERCORE_STATS  0x0080
146 #define LPJ_L2MEM_PERPOOL_STATS  0x0100
147
148 #define LPJ_MAX_L2MEAS        5 
149 #define LPJ_MAX_QCI             10
150 #endif
151 /* lpj_h_001.main_1 */
152 #define LPJ_FULL_TRACE              -1        /*!< Trace macro to get full trace */   
153 /* Added Log Error for LPJ Interface */
154 #define LPJLOGERROR(_pst, _errCls, _errCode, _errVal, _errDesc) \
155         SLogError(_pst->srcEnt, _pst->srcInst, _pst->srcProcId, \
156                    __FILE__, __LINE__, _errCls, _errCode, _errVal, _errDesc)
157
158 /* Error Codes */
159 #define   ERRLPJ         0
160
161 #define ELPJ001         (ERRLPJ + 1)
162 #define ELPJ002         (ERRLPJ + 2)
163 #define ELPJ003         (ERRLPJ + 3)
164 #define ELPJ004         (ERRLPJ + 4)
165 #define ELPJ005         (ERRLPJ + 5)
166 #define ELPJ006         (ERRLPJ + 6)
167 #define ELPJ007         (ERRLPJ + 7)
168 #define ELPJ008         (ERRLPJ + 8)
169 #define ELPJ009         (ERRLPJ + 9)
170 #define ELPJ010         (ERRLPJ + 10)
171 #define ELPJ011         (ERRLPJ + 11)
172 #define ELPJ012         (ERRLPJ + 12)
173 #define ELPJ013         (ERRLPJ + 13)
174 #define ELPJ014         (ERRLPJ + 14)
175 #define ELPJ015         (ERRLPJ + 15)
176 #define ELPJ016         (ERRLPJ + 16)
177 #define ELPJ017         (ERRLPJ + 17)
178 #define ELPJ018         (ERRLPJ + 18)
179 #define ELPJ019         (ERRLPJ + 19)
180 #define ELPJ020         (ERRLPJ + 20)
181 #define ELPJ021         (ERRLPJ + 21)
182 #define ELPJ022         (ERRLPJ + 22)
183 #define ELPJ023         (ERRLPJ + 23)
184 #define ELPJ024         (ERRLPJ + 24)
185 #define ELPJ025         (ERRLPJ + 25)
186 #define ELPJ026         (ERRLPJ + 26)
187 #define ELPJ027         (ERRLPJ + 27)
188 #define ELPJ028         (ERRLPJ + 28)
189 #define ELPJ029         (ERRLPJ + 29)
190 #define ELPJ030         (ERRLPJ + 30)
191 #define ELPJ031         (ERRLPJ + 31)
192 #define ELPJ032         (ERRLPJ + 32)
193 #define ELPJ033         (ERRLPJ + 33)
194 #define ELPJ034         (ERRLPJ + 34)
195 #define ELPJ035         (ERRLPJ + 35)
196 #define ELPJ036         (ERRLPJ + 36)
197 #define ELPJ037         (ERRLPJ + 37)
198 #define ELPJ038         (ERRLPJ + 38)
199 #define ELPJ039         (ERRLPJ + 39)
200 #define ELPJ040         (ERRLPJ + 40)
201 #define ELPJ041         (ERRLPJ + 41)
202 #define ELPJ042         (ERRLPJ + 42)
203 #define ELPJ043         (ERRLPJ + 43)
204 #define ELPJ044         (ERRLPJ + 44)
205 #define ELPJ045         (ERRLPJ + 45)
206 #define ELPJ046         (ERRLPJ + 46)
207 #define ELPJ047         (ERRLPJ + 47)
208 #define ELPJ048         (ERRLPJ + 48)
209 #define ELPJ049         (ERRLPJ + 49)
210 #define ELPJ050         (ERRLPJ + 50)
211 #define ELPJ051         (ERRLPJ + 51)
212 #define ELPJ052         (ERRLPJ + 52)
213 #define ELPJ053         (ERRLPJ + 53)
214 #define ELPJ054         (ERRLPJ + 54)
215 #define ELPJ055         (ERRLPJ + 55)
216 #define ELPJ056         (ERRLPJ + 56)
217 #define ELPJ057         (ERRLPJ + 57)
218 #define ELPJ058         (ERRLPJ + 58)
219 #define ELPJ059         (ERRLPJ + 59)
220 #define ELPJ060         (ERRLPJ + 60)
221 #define ELPJ061         (ERRLPJ + 61)
222 #define ELPJ062         (ERRLPJ + 62)
223 #define ELPJ063         (ERRLPJ + 63)
224 #define ELPJ064         (ERRLPJ + 64)
225 #define ELPJ065         (ERRLPJ + 65)
226 #define ELPJ066         (ERRLPJ + 66)
227 #define ELPJ067         (ERRLPJ + 67)
228
229 #ifdef __cplusplus
230 }
231 #endif /* __cplusplus */
232 #endif /* __LPJ_H__ */
233
234 \f  
235 /********************************************************************30**
236          End of file
237 **********************************************************************/