e19e55c20a3d24f8344e79106706553045fe9def
[o-du/l2.git] / src / 5gnrrlc / rlc.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 /* This file contains defines for RLC layer */
19
20 /* Memory */
21 #define RLC_MEM_REGION_UL    1
22 #define RLC_MEM_REGION_DL    4
23 #define RLC_POOL 1
24
25 /* Inst */
26 #define RLC_UL_INST   0
27 #define RLC_DL_INST   1
28
29 /* Fill Pst structure for sending msg from RLC to DUAPP */
30 #define FILL_PST_RLC_TO_DUAPP(_pst, _procId, _srcInst, _event) \
31 {                                                              \
32    _pst.selector    = ODU_SELECTOR_LWLC;                       \
33    _pst.srcEnt      = ENTRLC;                                   \
34    _pst.dstEnt      = ENTDUAPP;                                \
35    _pst.dstInst     = 0;                                       \
36    _pst.srcInst     = _srcInst;                                \
37    _pst.dstProcId   = _procId;                                 \
38    _pst.srcProcId   = _procId;                                 \
39    if(_srcInst == RLC_UL_INST)                                 \
40    {                                                           \
41       _pst.region   = RLC_MEM_REGION_UL;                       \
42    }                                                           \
43    else if(_srcInst == RLC_DL_INST)                            \
44    {                                                           \
45       _pst.region   = RLC_MEM_REGION_DL;                       \
46    }                                                           \
47    _pst.pool        = RLC_POOL;                                \
48    _pst.event       = _event;                                  \
49    _pst.route       = 0;                                       \
50    _pst.prior       = 0;                                       \
51    _pst.intfVer     = 0;                                       \
52 }
53
54 /**********************************************************************
55          End of file
56 **********************************************************************/