9eed9d009301fa2439db6e1022fad7e2af4974af
[o-du/l2.git] / src / cm / lrg.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  
21     Name:   LTE MAC Layer 
22  
23     Type:   C include file
24  
25     Desc:   Defines required by LTE-MAC
26  
27     File:   lrg.h
28  
29 **********************************************************************/
30  
31 #ifndef __LRGH__
32 #define __LRGH__
33
34 #define EVTLRGCFGREQ    0      /* Config Request */
35 #define EVTLRGCFGCFM    1      /* Config Confirm */
36 #define EVTLRGCNTRLREQ  2      /* Control Request */
37 #define EVTLRGCNTRLCFM  3      /* Control Confirm */
38 #define EVTLRGSTSREQ    44      /* Statistics Request */
39 #define EVTLRGSTSCFM    5      /* Statistics Confirm */
40 #define EVTLRGSSTAREQ   6      /* Solicited Status Request */
41 #define EVTLRGSSTACFM   7      /* Solicited Status Confirm */
42 #define EVTLRGUSTAIND   8      /* Unsolicite Status Indication */
43 #define EVTLRGTRCIND    9      /* Trace Indication */
44 #define EVTMACSCHGENCFGREQ 10     /* Scheduler Configuration */
45 #define EVTMACSCHGENCFGCFM 11     /* Scheduler Config Confirm */
46 #define EVTLRGSCHSTAIND 12     /* Scheduler Configuration */
47 #define EVTLRGSCHCNTRLREQ 13   /* Scheduler Configuration */
48 #define EVTLRGSCHCNTRLCFM 14   /* Scheduler Config Confirm */
49 #define EVTLRGSCHUSTAIND  15   /* Unsolicite Status Indication */
50 /* lrg_h_001.main_3 - ADD - Event definitions for LTE_L2_MEAS */
51 #ifdef LTE_L2_MEAS
52 #define EVTLRGSCHL2MEASREQ 16    /* For L2 measurement request */
53 #define EVTLRGSCHL2MEASCFM 17    /* For L2 measurement confirm */
54 #define EVTLRGSCHL2MEASSENDREQ 18 /*For L2 measurement send request*/
55 #define EVTLRGSCHL2MEASSTOPREQ 19 /*For L2 measurement stop request*/ 
56 #define EVTLRGSCHL2MEASSTOPCFM 20 /*For L2 meaurement stop cfm*/ 
57 #endif /*  LTE_L2_MEAS */
58
59 #define MAXRGLRG        2      /* Maxiumum selector values */
60 /*MCELL changes*/
61 #define LRG_MAX_RGU_SAPS 4     /* RGU SAPS TO KW UL AND KW DL */
62
63 #define LRG_MAX_PT_NUM_SIZE 8 
64 #define LRG_NOT_CFG     0      /* SAP not configured */
65 #define LRG_UNBND       1      /* Unbound SAP State */
66 #define LRG_BND         2      /* Bound SAP State */
67 #define LRG_WAIT_BNDCFM 3      /* Await Bind Confirm State */
68
69 /* Unsolicited status indication events */
70 /* RGU interface SAP bound with RLC */
71 #define LRG_EVENT_RGUSAP_ENB      (LCM_EVENT_LYR_SPECIFIC + 0)    
72 /* CRG interface SAP bound with RRC */
73 #define LRG_EVENT_CRGSAP_ENB      (LCM_EVENT_LYR_SPECIFIC + 1)  
74 /* RGR interface SAP bound with RRM */
75 #define LRG_EVENT_RGRSAP_ENB      (LCM_EVENT_LYR_SPECIFIC + 2)    
76
77 /* RGR interface SAP bound with RRM */
78 #define LRG_EVENT_RGMSAP_ENB      (LCM_EVENT_LYR_SPECIFIC + 3)    
79 /* Layer specific causes */
80 #define LRG_CAUSE_HQ_PROC_BUSY      (LCM_CAUSE_LYR_SPECIFIC + 0)    
81 #define LRG_CAUSE_DELAYED_DATREQ    (LCM_CAUSE_LYR_SPECIFIC + 1)    
82 /**********************************************************************
83  Debug Mask values
84 **********************************************************************/
85
86 #ifdef DEBUGP
87
88 #define DBGMASK_INFO             (DBGMASK_LYR << 0)
89 #define DBGMASK_ERR              (DBGMASK_LYR << 1)
90 #define DBGMASK_PRM              (DBGMASK_LYR << 2)
91
92 #endif /* #ifdef DEBUGP */
93
94 #define STCRGSAP     STGEN + 1
95 #define STRGRSAP     STGEN + 2
96 #define STTFUSAP     STGEN + 4
97 #define STSCHINST    STGEN + 5 /* Scheduler Instance */
98
99 #define LRG_USTA_DGNVAL_MEM      1
100 #define LRG_USTA_DGNVAL_HARQ     2
101
102 /* TRACE Macros */
103 #define LRG_NO_TRACE            0
104 #define LRG_FULL_TRACE          -1
105 #ifdef TENB_ACC
106 #define LRG_MAX_SAPS_PER_INST    5 
107 #else
108 /*Mcell changes*/
109 #define LRG_MAX_SAPS_PER_INST    4
110 #endif
111 /* pack unpack error code */
112 #define ELRGXXX                 0
113 #define ERRLRG                  0
114 /* lrg_h_001.main_3 - ADD - Event definitions for LTE_L2_MEAS */
115 #ifdef LTE_L2_MEAS
116 /* Max Requests per Measurement type per One call to RgMiLrgSchL2MeasReq */
117 #define LRG_MAX_QCI_PER_REQ     10   /*!< Max number of QCI's per request */
118 #define LRG_MAX_QCI             10  /*!< Max QCI indexe's used */
119 #define LRG_MAX_SAMP_PRD        100 /*!<Max Valid samp period */
120
121 /* Different Measurement Types supported at SCH and MAC */
122 #define LRG_L2MEAS_AVG_PRB_DL                 1  /* Supported at SCH */
123 #define LRG_L2MEAS_AVG_PRB_UL                 2  /* Supported at SCH */
124 #define LRG_L2MEAS_AVG_PRB_PER_QCI_DL         4  /* Supported at SCH */
125 #define LRG_L2MEAS_AVG_PRB_PER_QCI_UL         8  /* Supported at SCH */
126 #define LRG_L2MEAS_RA_PREAMBLE                16  /* Supported at SCH */
127 #define LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL     32 /* Supported at SCH */
128 #define LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL     64 /* Supported at SCH */
129 #define LRG_L2MEAS_TB_TRANS_DL_COUNT          128 /* Supported at SCH */
130 #define LRG_L2MEAS_TB_TRANS_DL_FAULTY_COUNT   256 /* Supported at SCH */
131 #define LRG_L2MEAS_TB_TRANS_UL_COUNT          512 /* Supported at SCH */
132 #define LRG_L2MEAS_TB_TRANS_UL_FAULTY_COUNT   1024 /* Supported at SCH */
133 #endif /* LTE_L2_MEAS */
134
135 #define   ELRG001      (ERRLRG +    1)    /*        lrg.c: 152 */
136 #define   ELRG002      (ERRLRG +    2)    /*        lrg.c: 161 */
137 #define   ELRG003      (ERRLRG +    3)    /*        lrg.c: 209 */
138 #define   ELRG004      (ERRLRG +    4)    /*        lrg.c: 250 */
139 #define   ELRG005      (ERRLRG +    5)    /*        lrg.c: 259 */
140 #define   ELRG006      (ERRLRG +    6)    /*        lrg.c: 308 */
141 #define   ELRG007      (ERRLRG +    7)    /*        lrg.c: 349 */
142 #define   ELRG008      (ERRLRG +    8)    /*        lrg.c: 358 */
143 #define   ELRG009      (ERRLRG +    9)    /*        lrg.c: 406 */
144 #define   ELRG010      (ERRLRG +   10)    /*        lrg.c: 447 */
145 #define   ELRG011      (ERRLRG +   11)    /*        lrg.c: 456 */
146 #define   ELRG012      (ERRLRG +   12)    /*        lrg.c: 504 */
147 #define   ELRG013      (ERRLRG +   13)    /*        lrg.c: 545 */
148 #define   ELRG014      (ERRLRG +   14)    /*        lrg.c: 554 */
149 #define   ELRG015      (ERRLRG +   15)    /*        lrg.c: 602 */
150 #define   ELRG016      (ERRLRG +   16)    /*        lrg.c: 643 */
151 #define   ELRG017      (ERRLRG +   17)    /*        lrg.c: 652 */
152 #define   ELRG018      (ERRLRG +   18)    /*        lrg.c: 700 */
153 #define   ELRG019      (ERRLRG +   19)    /*        lrg.c: 741 */
154 #define   ELRG020      (ERRLRG +   20)    /*        lrg.c: 749 */
155 #define   ELRG021      (ERRLRG +   21)    /*        lrg.c: 796 */
156 #define   ELRG022      (ERRLRG +   22)    /*        lrg.c: 838 */
157 #define   ELRG023      (ERRLRG +   23)    /*        lrg.c: 846 */
158 #define   ELRG024      (ERRLRG +   24)    /*        lrg.c: 893 */
159 #define   ELRG025      (ERRLRG +   25)    /*        lrg.c: 935 */
160 #define   ELRG026      (ERRLRG +   26)    /*        lrg.c: 944 */
161 #define   ELRG027      (ERRLRG +   27)    /*        lrg.c: 992 */
162 #define   ELRG028      (ERRLRG +   28)    /*        lrg.c:1033 */
163 #define   ELRG029      (ERRLRG +   29)    /*        lrg.c:1042 */
164 #define   ELRG030      (ERRLRG +   30)    /*        lrg.c:1090 */
165 #define   ELRG031      (ERRLRG +   31)    /*        lrg.c:1131 */
166 #define   ELRG032      (ERRLRG +   32)    /*        lrg.c:1140 */
167 #define   ELRG033      (ERRLRG +   33)    /*        lrg.c:1188 */
168 #define   ELRG034      (ERRLRG +   34)    /*        lrg.c:1229 */
169 #define   ELRG035      (ERRLRG +   35)    /*        lrg.c:1238 */
170 #define   ELRG036      (ERRLRG +   36)    /*        lrg.c:1286 */
171 #define   ELRG037      (ERRLRG +   37)    /*        lrg.c:1327 */
172 #define   ELRG038      (ERRLRG +   38)    /*        lrg.c:1336 */
173 #define   ELRG039      (ERRLRG +   39)    /*        lrg.c:1384 */
174 #define   ELRG040      (ERRLRG +   40)    /*        lrg.c:1425 */
175 #define   ELRG041      (ERRLRG +   41)    /*        lrg.c:1434 */
176 #define   ELRG042      (ERRLRG +   42)    /*        lrg.c:1482 */
177 #define   ELRG043      (ERRLRG +   43)    /*        lrg.c:1526 */
178 #define   ELRG044      (ERRLRG +   44)    /*        lrg.c:1537 */
179 #define   ELRG045      (ERRLRG +   45)    /*        lrg.c:1546 */
180 #define   ELRG046      (ERRLRG +   46)    /*        lrg.c:1558 */
181 #define   ELRG047      (ERRLRG +   47)    /*        lrg.c:1608 */
182 #define   ELRG048      (ERRLRG +   48)    /*        lrg.c:2541 */
183 #define   ELRG049      (ERRLRG +   49)    /*        lrg.c:3354 */
184 #define   ELRG050      (ERRLRG +   50)    /*        lrg.c:3681 */
185
186 #endif /* __LRGH__ */
187 \f
188 /**********************************************************************
189          End of file
190 **********************************************************************/