RLC-MAC Interface APIs and Memory configuration Changes
[o-du/l2.git] / src / du_app / du_ue_mgr.c
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 UE management handling functionality for DU APP */
19 #include "du_ue_mgr.h"
20 #include "du_cfg.h"
21
22 /******************************************************************
23  *
24  * @brief Send UE configuration to RLC
25  *
26  * @details
27  *
28  *    Function : duSendUeCreateReqToRlc
29  *
30  *    Functionality: Send UeCreateReqToRlc
31  *
32  * @return ROK     - success
33  *         RFAILED - failure
34  *
35  * ****************************************************************/
36 S16 duSendUeCreateReqToRlc()
37 {
38    U8  idx;
39    Pst pst;
40    CkwCfgInfo ueCfg;
41    
42    DU_SET_ZERO(&ueCfg, sizeof(ueCfg));
43    DU_SET_ZERO(&pst, sizeof(Pst));
44
45    ueCfg.ueId = 1;
46    ueCfg.cellId = NR_CELL_ID;
47    ueCfg.numEnt = 1;
48    
49    for(idx = 0; idx < ueCfg.numEnt; idx++)
50    {
51       ueCfg.entCfg[idx].rbId = 1;
52       ueCfg.entCfg[idx].rbType = CM_LTE_DRB;
53       ueCfg.entCfg[idx].entMode = CM_LTE_MODE_UM;
54       ueCfg.entCfg[idx].dir = CKW_CFG_DIR_BOTH;
55
56       switch(ueCfg.entCfg[idx].entMode)
57       {
58          case CM_LTE_MODE_TM:
59          {
60             break;
61          }
62
63          case CM_LTE_MODE_UM:
64          {
65             ueCfg.entCfg[idx].m.umInfo.dl.snLen = 1;      /* For 12 bit SN */
66             ueCfg.entCfg[idx].m.umInfo.ul.snLen = 1;      /* For 12 bit SN */
67             ueCfg.entCfg[idx].m.umInfo.ul.reOrdTmr = 10;  /* in msec */
68             break;
69          }
70
71          case CM_LTE_MODE_AM:
72          {
73             break;
74          }
75          
76          defualt:
77             break;
78       } /* End of switch(entMode) */
79    } /* End of entity configuration for loop */
80
81    /* Fill Pst */
82    pst.selector  = DU_SELECTOR_LWLC;
83    pst.srcEnt    = ENTDUAPP;
84    pst.dstEnt    = ENTKW;
85    pst.dstInst   = RLC_UL_INST;
86    pst.dstProcId = DU_PROC;
87    pst.srcProcId = DU_PROC;
88    pst.region    = duCb.init.region;
89
90    /* Sending to RLC */
91    packUeCreateReq(&pst, &ueCfg);
92
93    RETVALUE(ROK); 
94 } /* End of duSendUeCreateReqToRlc */
95
96 /**********************************************************************
97          End of file
98 ***********************************************************************/