1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
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 #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
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 *******************************************************************************/
19 /* This file contains message handling functionality for DU cell management */
22 #include "f1ap_msg_hdl.h"
24 extern S16 cmUnpkLkwCfgCfm(LkwCfgCfm func,Pst *pst, Buffer *mBuf);
25 extern S16 cmUnpkLkwCntrlCfm(LkwCntrlCfm func,Pst *pst, Buffer *mBuf);
26 extern S16 cmUnpkLrgCfgCfm(LrgCfgCfm func,Pst *pst, Buffer *mBuf);
28 /**************************************************************************
29 * @brief Task Initiation callback function.
33 * Function : duActvInit
36 * This function is supplied as one of parameters during DU APP's
37 * task registration. SSI will invoke this function once, after
38 * it creates and attaches this TAPA Task to a system task.
40 * @param[in] Ent entity, the entity ID of this task.
41 * @param[in] Inst inst, the instance ID of this task.
42 * @param[in] Region region, the region ID registered for memory
44 * @param[in] Reason reason.
45 * @return ROK - success
47 ***************************************************************************/
48 S16 duActvInit(Ent entity, Inst inst, Region region, Reason reason)
50 duCb.init.procId = SFndProcId();
51 duCb.init.ent = entity;
52 duCb.init.inst = inst;
53 duCb.init.region = region;
54 duCb.init.reason = reason;
55 duCb.init.cfgDone = FALSE;
56 duCb.init.pool = DU_POOL;
57 duCb.init.acnt = FALSE;
58 duCb.init.trc = FALSE;
59 duCb.init.usta = TRUE;
60 duCb.mem.region = DFLT_REGION;
61 duCb.mem.pool = DU_POOL;
63 duCb.sctpStatus = FALSE;
64 duCb.f1Status = FALSE;
65 duCb.duStatus = FALSE;
73 /**************************************************************************
74 * @brief Task Activation callback function.
78 * Function : duActvTsk
81 * Primitives invoked by DU APP's users/providers through
82 * a loosely coupled interface arrive here by means of
83 * SSI's message handling. This API is registered with
84 * SSI during the Task Registration of DU APP.
86 * @param[in] Pst *pst, Post structure of the primitive.
87 * @param[in] Buffer *mBuf, Packed primitive parameters in the
89 * @return ROK - success
92 ***************************************************************************/
93 S16 duActvTsk(Pst *pst, Buffer *mBuf)
111 printf("\nInvalid event received at duActvTsk from ENTDUAPP");
123 case LKW_EVT_CFG_CFM:
125 ret = cmUnpkLkwCfgCfm(duHdlRlcCfgComplete, pst, mBuf);
128 case LKW_EVT_CNTRL_CFM:
130 ret = cmUnpkLkwCntrlCfm(duHdlRlcCntrlCfgComplete, pst, mBuf);
133 case LKW_EVT_STA_IND:
139 printf("\nInvalid event %d received at duActvTsk from ENTKW", \
159 ret = cmUnpkLrgCfgCfm(duHdlMacCfgComplete, pst, mBuf);
168 printf("\nInvalid event received at duActvTsk from ENTRG");
187 ret = cmUnpkSctpNtfy(duSctpNtfyHdl, pst, mBuf);
192 printf("\nInvalid event received at duActvTsk from ENTRG");
202 printf("\n DU APP can not process message from Entity %d", pst->srcEnt);
212 /**********************************************************************
214 **********************************************************************/