X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_tmr.c;h=1ea0d77d33606dc5b940238e8f3fbd45582c0c5e;hb=a3796bdbd76c38cd78ed1c9ef5cbf4cee1c355de;hp=4a1bda79f27a462050192d33e89f2cdc60e6e7c9;hpb=3740878d9d4bf9ab3d2639f0495b77f3f45bd3cb;p=o-du%2Fl2.git diff --git a/src/du_app/du_tmr.c b/src/du_app/du_tmr.c index 4a1bda79f..1ea0d77d3 100644 --- a/src/du_app/du_tmr.c +++ b/src/du_app/du_tmr.c @@ -72,6 +72,15 @@ bool duChkTmr(PTR cb, int16_t tmrEvnt) } break; } + case EVENT_RIC_SUBSCRIPTION_REPORTING_TMR: + { + if(((RicSubscription *)cb)->ricSubsReportTimer.tmrEvnt == EVENT_RIC_SUBSCRIPTION_REPORTING_TMR) + { + DU_LOG("\nERROR --> DU_APP : duChkTmr: Timer already running for event [%d]", tmrEvnt); + return TRUE; + } + break; + } default: { DU_LOG("\nERROR --> DU_APP : duChkTmr: Invalid tmr Evnt [%d]", tmrEvnt); @@ -91,7 +100,7 @@ bool duChkTmr(PTR cb, int16_t tmrEvnt) * @return Void */ -void duStartTmr(PTR cb, int16_t tmrEvnt, uint8_t timerValue) +void duStartTmr(PTR cb, int16_t tmrEvnt, uint32_t timerValue) { CmTmrArg arg; arg.wait = 0; @@ -100,7 +109,7 @@ void duStartTmr(PTR cb, int16_t tmrEvnt, uint8_t timerValue) { case EVENT_E2_SETUP_TMR: { - CmTimer *e2SetupTimer; + CmTimer *e2SetupTimer = NULLP; e2SetupTimer = ((CmTimer *)cb); TMR_CALCUATE_WAIT(arg.wait, timerValue, duCb.duTimersInfo.tmrRes); @@ -110,7 +119,7 @@ void duStartTmr(PTR cb, int16_t tmrEvnt, uint8_t timerValue) } case EVENT_RIC_SERVICE_UPDATE_TMR: { - RicServiceUpdateTimer *ricServiceUpdateTimer; + RicServiceUpdateTimer *ricServiceUpdateTimer = NULLP; ricServiceUpdateTimer= ((RicServiceUpdateTimer*)cb); TMR_CALCUATE_WAIT(arg.wait, timerValue, duCb.duTimersInfo.tmrRes); @@ -128,9 +137,20 @@ void duStartTmr(PTR cb, int16_t tmrEvnt, uint8_t timerValue) arg.max = MAX_E2_NODE_CONFIG_UPDATE_TMR; break; } + case EVENT_RIC_SUBSCRIPTION_REPORTING_TMR: + { + RicSubscription *ricSubscription = NULLP; + ricSubscription = ((RicSubscription*)cb); + TMR_CALCUATE_WAIT(arg.wait, timerValue, duCb.duTimersInfo.tmrRes); + + arg.timers = &ricSubscription->ricSubsReportTimer; + arg.max = MAX_RIC_SUBSCRIPTION_REPORTING_TMR; + break; + } default: { DU_LOG("\nERROR --> DU : duStartTmr: Invalid tmr Evnt [%d]", tmrEvnt); + return; } } @@ -186,6 +206,14 @@ void duTmrExpiry(PTR cb,int16_t tmrEvnt) BuildAndSendE2NodeConfigUpdate(&cfgUpdateTimer->configList); break; } + case EVENT_RIC_SUBSCRIPTION_REPORTING_TMR: + { + RicSubscription *ricSubscription = NULLP; + + ricSubscription = ((RicSubscription *)cb); + E2apHdlRicSubsReportTmrExp(ricSubscription); + break; + } default: { DU_LOG("\nERROR --> DU : duStartTmr: Invalid tmr Evnt [%d]", tmrEvnt);