X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_mgr_ex_ms.c;h=3cecb379070953d065da913cabb1d63ded0d2f12;hb=0fccb83e55b237d60cf451bab71a0c7242cc6e66;hp=44a83ccfc3e9c796ee186678156e5e0408e2488e;hpb=d349ae65e1495488772f87e5cfa1ae71d9eab075;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 44a83ccfc..3cecb3790 100644 --- a/src/du_app/du_mgr_ex_ms.c +++ b/src/du_app/du_mgr_ex_ms.c @@ -16,15 +16,22 @@ ################################################################################ *******************************************************************************/ -/* This file contains message handling functionality for DU cell management */ +/* This file contains message handling functionality for DU APP */ #include "du_sctp.h" -#include "f1ap_msg_hdl.h" +#include "du_f1ap_msg_hdl.h" +#include "du_e2ap_msg_hdl.h" +#include "lsctp.h" +#include "legtp.h" +#include "du_app_mac_inf.h" +#include "du_ue_mgr.h" +#include "kwu.x" 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. * @@ -47,6 +54,8 @@ extern S16 cmUnpkLrgCfgCfm(LrgCfgCfm func,Pst *pst, Buffer *mBuf); ***************************************************************************/ S16 duActvInit(Ent entity, Inst inst, Region region, Reason reason) { + uint8_t id; + duCb.init.procId = SFndProcId(); duCb.init.ent = entity; duCb.init.inst = inst; @@ -60,9 +69,14 @@ S16 duActvInit(Ent entity, Inst inst, Region region, Reason reason) duCb.mem.region = DFLT_REGION; duCb.mem.pool = DU_POOL; - duCb.sctpStatus = FALSE; duCb.f1Status = FALSE; - duCb.duStatus = FALSE; + duCb.e2Status = FALSE; + + for(id = 0; id < DU_MAX_CELLS; id ++) + { + duCb.cfgCellLst[id] = NULL; + duCb.actvCellLst[id] = NULL; + } SSetProcId(DU_PROC); @@ -102,13 +116,14 @@ S16 duActvTsk(Pst *pst, Buffer *mBuf) { case EVTCFG: { - duSendRlcUlCfg(); + DU_LOG("\n****** Received initial configs at DU APP ******\n"); + duProcCfgComplete(); SPutMsg(mBuf); break; } default: { - printf("\nInvalid event received at duActvTsk from ENTDUAPP"); + DU_LOG("\nDU_APP : Invalid event received at duActvTsk from ENTDUAPP"); SPutMsg(mBuf); ret = RFAILED; } @@ -134,9 +149,14 @@ S16 duActvTsk(Pst *pst, Buffer *mBuf) { break; } + case KWU_EVT_DAT_IND: + { + ret = cmUnpkKwuDatInd(duHdlRlcUlData, pst, mBuf); + break; + } default: { - printf("\nInvalid event %d received at duActvTsk from ENTKW", \ + DU_LOG("\nDU_APP : Invalid event %d received at duActvTsk from ENTKW", \ pst->event); SPutMsg(mBuf); ret = RFAILED; @@ -163,9 +183,29 @@ S16 duActvTsk(Pst *pst, Buffer *mBuf) { 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; + } default: { - printf("\nInvalid event received at duActvTsk from ENTRG"); + DU_LOG("\nDU_APP : Invalid event received at duActvTsk from ENTRG"); SPutMsg(mBuf); ret = RFAILED; } @@ -177,29 +217,62 @@ S16 duActvTsk(Pst *pst, Buffer *mBuf) { switch(pst->event) { - case EVTSCTPDATA: + case EVENT_CU_DATA: { - F1InmsgHdlr(mBuf); + F1APMsgHdlr(mBuf); + break; + } + case EVENT_SCTP_NTFY: + { + ret = cmUnpkSctpNtfy(duSctpNtfyHdl, pst, mBuf); + break; + } + case EVENT_RIC_DATA: + { + E2APMsgHdlr(mBuf); break; } - case EVTSCTPNTFY: - { - ret = cmUnpkSctpNtfy(duSctpNtfyHdl, pst, mBuf); - break; - } default: - { - printf("\nInvalid event received at duActvTsk from ENTRG"); - ret = RFAILED; - } + { + DU_LOG("\nDU_APP : Invalid event received at duActvTsk from ENTSCTP"); + ret = RFAILED; + } } 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; + } default: { - printf("\n DU APP can not process message from Entity %d", pst->srcEnt); + DU_LOG("\nDU_APP : DU APP can not process message from Entity %d", pst->srcEnt); SPutMsg(mBuf); ret = RFAILED; }