X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_mgr_ex_ms.c;h=5fcd095895b77e853f587693b1bdf32d93dd505b;hb=45d134510deb6902b870b4a0fb574b6075fba601;hp=8245d2f35f252426a38b7e5ba9097f53e4d47ac7;hpb=483d527d19566ecca87eee46a198bab6c890c6bb;p=o-du%2Fl2.git diff --git a/src/du_app/du_mgr_ex_ms.c b/src/du_app/du_mgr_ex_ms.c index 8245d2f35..5fcd09589 100644 --- a/src/du_app/du_mgr_ex_ms.c +++ b/src/du_app/du_mgr_ex_ms.c @@ -14,10 +14,18 @@ # See the License for the specific language governing permissions and # # limitations under the License. # ################################################################################ -*******************************************************************************/ + *******************************************************************************/ /* This file contains message handling functionality for DU APP */ - +#include "common_def.h" +#include "lrg.h" +#include "legtp.h" +#include "lkw.h" +#include "lrg.x" +#include "lkw.x" +#include "du_app_mac_inf.h" +#include "du_cfg.h" +#include "E2AP-PDU.h" #include "du_sctp.h" #include "du_f1ap_msg_hdl.h" #include "du_e2ap_msg_hdl.h" @@ -30,7 +38,8 @@ extern S16 cmUnpkLkwCfgCfm(LkwCfgCfm func,Pst *pst, Buffer *mBuf); extern S16 cmUnpkLkwCntrlCfm(LkwCntrlCfm func,Pst *pst, Buffer *mBuf); extern S16 cmUnpkLrgCfgCfm(LrgCfgCfm func,Pst *pst, Buffer *mBuf); - +extern S16 cmUnpkKwuDatInd(KwuDatInd func,Pst *pst, Buffer *mBuf); +extern S16 cmUnpkLrgSchCfgCfm(LrgSchCfgCfm func,Pst *pst,Buffer *mBuf); /************************************************************************** * @brief Task Initiation callback function. * @@ -55,6 +64,8 @@ S16 duActvInit(Ent entity, Inst inst, Region region, Reason reason) { uint8_t id; + memset(&duCb, 0, sizeof(DuCb)); + duCb.init.procId = SFndProcId(); duCb.init.ent = entity; duCb.init.inst = inst; @@ -71,11 +82,15 @@ S16 duActvInit(Ent entity, Inst inst, Region region, Reason reason) duCb.f1Status = FALSE; duCb.e2Status = FALSE; - for(id = 0; id < DU_MAX_CELLS; id ++) + for(id = 0; id < MAX_NUM_CELL; id ++) { - duCb.cfgCellLst[id] = NULL; + duCb.cfgCellLst[id] = NULL; duCb.actvCellLst[id] = NULL; } + duCb.numUe = 0; + memset(duCb.ueCcchCtxt, 0, MAX_NUM_UE * sizeof(UeCcchCtxt)); + duCb.numCfgCells = 0; + duCb.numActvCells = 0; SSetProcId(DU_PROC); @@ -110,166 +125,182 @@ S16 duActvTsk(Pst *pst, Buffer *mBuf) switch(pst->srcEnt) { case ENTDUAPP: - { - switch(pst->event) - { - case EVTCFG: - { - DU_LOG("\n****** Received initial configs at DU APP ******\n"); - duProcCfgComplete(); - SPutMsg(mBuf); - break; - } - default: - { - DU_LOG("\nDU_APP : Invalid event received at duActvTsk from ENTDUAPP"); - SPutMsg(mBuf); - ret = RFAILED; - } - } + { + switch(pst->event) + { + case EVTCFG: + { + DU_LOG("\n****** Received initial configs at DU APP ******\n"); + duProcCfgComplete(); + SPutMsg(mBuf); + break; + } + default: + { + DU_LOG("\nDU_APP : Invalid event received at duActvTsk from ENTDUAPP"); + SPutMsg(mBuf); + ret = RFAILED; + } + } - break; - } + break; + } case ENTKW: - { - switch(pst->event) - { - case LKW_EVT_CFG_CFM: - { - ret = cmUnpkLkwCfgCfm(duHdlRlcCfgComplete, pst, mBuf); - break; - } - case LKW_EVT_CNTRL_CFM: - { - ret = cmUnpkLkwCntrlCfm(duHdlRlcCntrlCfgComplete, pst, mBuf); - break; - } - case LKW_EVT_STA_IND: - { - break; - } - case KWU_EVT_DAT_IND: - { - ret = cmUnpkKwuDatInd(duHdlRlcUlData, pst, mBuf); - break; - } - default: - { - DU_LOG("\nDU_APP : Invalid event %d received at duActvTsk from ENTKW", \ - pst->event); - SPutMsg(mBuf); - ret = RFAILED; - } - } - break; - } + { + switch(pst->event) + { + case LKW_EVT_CFG_CFM: + { + ret = cmUnpkLkwCfgCfm(duHdlRlcCfgComplete, pst, mBuf); + break; + } + case LKW_EVT_CNTRL_CFM: + { + ret = cmUnpkLkwCntrlCfm(duHdlRlcCntrlCfgComplete, pst, mBuf); + break; + } + case LKW_EVT_STA_IND: + { + break; + } + case KWU_EVT_DAT_IND: + { + ret = cmUnpkKwuDatInd(duHdlRlcUlData, pst, mBuf); + break; + } + default: + { + DU_LOG("\nDU_APP : Invalid event %d received at duActvTsk from ENTKW", \ + pst->event); + SPutMsg(mBuf); + ret = RFAILED; + } + } + break; + } case ENTRG: - { - switch(pst->event) - { - //Config complete - case EVTCFG: - { - SPutMsg(mBuf); - break; - } - case EVTLRGCFGCFM: - { - ret = cmUnpkLrgCfgCfm(duHdlMacCfgComplete, pst, mBuf); - break; - } - case EVTLRGCNTRLCFM: - { - break; - } - case EVTMACSCHGENCFGCFM: - { - ret = cmUnpkLrgSchCfgCfm(duHdlSchCfgComplete, pst, mBuf); - break; - } - case EVENT_MAC_CELL_CONFIG_CFM: - { - ret = unpackMacCellCfgCfm(duHandleMacCellCfgCfm, pst, mBuf); - break; - } - case EVENT_MAC_SLOT_IND: - { - ret = unpackMacSlotInd(duHandleSlotInd, pst, mBuf); - break; - } - default: - { - DU_LOG("\nDU_APP : Invalid event received at duActvTsk from ENTRG"); - SPutMsg(mBuf); - ret = RFAILED; - } - } + { + switch(pst->event) + { + //Config complete + case EVTCFG: + { + SPutMsg(mBuf); + break; + } + case EVTLRGCFGCFM: + { + ret = cmUnpkLrgCfgCfm(duHdlMacCfgComplete, pst, mBuf); + break; + } + case EVTLRGCNTRLCFM: + { + break; + } + case EVTMACSCHGENCFGCFM: + { + ret = cmUnpkLrgSchCfgCfm(duHdlSchCfgComplete, pst, mBuf); + break; + } + case EVENT_MAC_CELL_CONFIG_CFM: + { + ret = unpackMacCellCfgCfm(duHandleMacCellCfgCfm, pst, mBuf); + break; + } + case EVENT_MAC_SLOT_IND: + { + ret = unpackMacSlotInd(duHandleSlotInd, pst, mBuf); + break; + } + case EVENT_MAC_STOP_IND: + { + ret = unpackMacStopInd(duHandleStopInd, pst, mBuf); + break; + } + case EVENT_MAC_UL_CCCH_IND: + { + ret = unpackMacUlCcchInd(duHandleUlCcchInd, pst, mBuf); + break; + } + case EVENT_MAC_UE_CREATE_RSP: + { + ret = unpackDuMacUeCreateRsp(duHandleMacUeCreateRsp, pst, mBuf); + break; + } + + default: + { + DU_LOG("\nDU_APP : Invalid event received at duActvTsk from ENTRG"); + SPutMsg(mBuf); + ret = RFAILED; + } + } - break; - } + break; + } case ENTSCTP: - { - switch(pst->event) - { - case EVENT_CU_DATA: - { - F1APMsgHdlr(mBuf); - break; - } - case EVENT_SCTP_NTFY: - { - ret = cmUnpkSctpNtfy(duSctpNtfyHdl, pst, mBuf); - break; - } - case EVENT_RIC_DATA: - { - E2APMsgHdlr(mBuf); - break; - } - default: - { - DU_LOG("\nDU_APP : Invalid event received at duActvTsk from ENTSCTP"); - ret = RFAILED; - } + { + switch(pst->event) + { + case EVENT_CU_DATA: + { + F1APMsgHdlr(mBuf); + break; + } + case EVENT_SCTP_NTFY: + { + ret = cmUnpkSctpNtfy(duSctpNtfyHdl, pst, mBuf); + break; + } + case EVENT_RIC_DATA: + { + E2APMsgHdlr(mBuf); + break; + } + default: + { + DU_LOG("\nDU_APP : Invalid event received at duActvTsk from ENTSCTP"); + ret = RFAILED; + } - } - SPutMsg(mBuf); - break; - } + } + SPutMsg(mBuf); + break; + } case ENTEGTP: - { - switch(pst->event) - { - case EVTCFGCFM: - { - unpackEgtpCfgCfm(duHdlEgtpCfgComplete, mBuf); - break; - } - case EVTSRVOPENCFM: - { - unpackEgtpSrvOpenCfm(duHdlEgtpSrvOpenComplete, mBuf); - break; - } - case EVTTNLMGMTCFM: - { - unpackEgtpTnlMgmtCfm(duHdlEgtpTnlMgmtCfm, mBuf); - break; - } - default: - { - DU_LOG("\nDU_APP : Invalid event[%d] received at duActvTsk from ENTEGTP", pst->event); - ret = RFAILED; - } - } - SPutMsg(mBuf); - break; - } + { + switch(pst->event) + { + case EVTCFGCFM: + { + unpackEgtpCfgCfm(duHdlEgtpCfgComplete, mBuf); + break; + } + case EVTSRVOPENCFM: + { + unpackEgtpSrvOpenCfm(duHdlEgtpSrvOpenComplete, mBuf); + break; + } + case EVTTNLMGMTCFM: + { + unpackEgtpTnlMgmtCfm(duHdlEgtpTnlMgmtCfm, mBuf); + break; + } + default: + { + DU_LOG("\nDU_APP : Invalid event[%d] received at duActvTsk from ENTEGTP", pst->event); + ret = RFAILED; + } + } + SPutMsg(mBuf); + break; + } default: - { - DU_LOG("\nDU_APP : DU APP can not process message from Entity %d", pst->srcEnt); - SPutMsg(mBuf); - ret = RFAILED; - } + { + DU_LOG("\nDU_APP : DU APP can not process message from Entity %d", pst->srcEnt); + SPutMsg(mBuf); + ret = RFAILED; + } } SExitTsk(); @@ -277,5 +308,5 @@ S16 duActvTsk(Pst *pst, Buffer *mBuf) } /********************************************************************** - End of file -**********************************************************************/ + End of file + **********************************************************************/