X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_cfg.c;h=4c7a1c591102712c2a44f349499c39820af3e094;hb=cdf2274ce07f8a5e066f1a49e92db156f1a92c66;hp=335415ca42acf2ba8755f68bd459b1f9bdccede9;hpb=a50cee433ee06d6a8a4215c274432ab4ad8fdb26;p=o-du%2Fl2.git diff --git a/src/du_app/du_cfg.c b/src/du_app/du_cfg.c index 335415ca4..4c7a1c591 100644 --- a/src/du_app/du_cfg.c +++ b/src/du_app/du_cfg.c @@ -18,6 +18,7 @@ /* This file contains all utility functions */ #include "common_def.h" +#include "du_tmr.h" #include "legtp.h" #include "lrg.h" #include "lkw.x" @@ -601,8 +602,8 @@ uint8_t readCfg() Sib1Params sib1; F1TaiSliceSuppLst *taiSliceSuppLst; - duCb.e2apDb.transIdCounter = 0; - memset(duCb.e2apDb.onGoingTransaction, 0, MAX_NUM_TRANSACTION * sizeof(E2TransInfo)); + duCb.e2apDb.e2TransInfo.transIdCounter = 0; + memset(duCb.e2apDb.e2TransInfo.onGoingTransaction, 0, MAX_NUM_TRANSACTION * sizeof(E2TransInfo)); #ifndef O1_ENABLE /* Note: Added these below variable for local testing*/ @@ -1087,7 +1088,26 @@ uint8_t duReadCfg() pst.selector = ODU_SELECTOR_TC; pst.pool= DU_POOL; + /* Initialize the timer blocks */ + cmInitTimers(&(duCb.e2apDb.e2Timers.e2SetupTimer), 1); + /* Initialzie the timer queue */ + memset(&(duCb.duTimersInfo.tmrTq), 0, sizeof(CmTqType) * DU_TQ_SIZE); + + /* Initialize the timer control point */ + memset(&(duCb.duTimersInfo.tmrTqCp), 0, sizeof(CmTqCp)); + duCb.duTimersInfo.tmrTqCp.tmrLen = DU_TQ_SIZE; + + /* Initialize the timer resolution */ + duCb.duTimersInfo.tmrRes = DU_TIMER_RESOLUTION; + + /* Timer Registration request to system services */ + if (ODU_REG_TMR_MT(pst.srcEnt, pst.srcInst, duCb.duTimersInfo.tmrRes, duActvTmr) != ROK) + { + DU_LOG("\nERROR --> DU_APP : Failed to register timer"); + return RFAILED; + } + if(ODU_GET_MSG_BUF(DFLT_REGION, DU_POOL, &mBuf) != ROK) { DU_LOG("\nERROR --> DU_APP : Memory allocation failed in duReadCfg");