X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fphy_stub%2Fl1_bdy2.c;h=67f66f88600c68968262d48cd0f6d3e6a623f34c;hb=8b3c1a54b33c87e09512690649ed24775f7a5508;hp=7a800afc72981819149791588c41b35b5d4535f3;hpb=be7e4e372cc1d6f12f7af9c6b6d09a7ecedca58c;p=o-du%2Fl2.git diff --git a/src/phy_stub/l1_bdy2.c b/src/phy_stub/l1_bdy2.c index 7a800afc7..67f66f886 100644 --- a/src/phy_stub/l1_bdy2.c +++ b/src/phy_stub/l1_bdy2.c @@ -1,30 +1,62 @@ -/* This file handles TTI genertion */ +/******************************************************************************* +################################################################################ +# Copyright (c) [2017-2019] [Radisys] # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ +*******************************************************************************/ + +/* This file handles slot indication */ #include +#include #include +#include #include "lphy_stub.h" +#include "du_log.h" + +uint16_t l1BuildAndSendSlotIndication(); void *GenerateTicks(void *arg) { + int milisec = 1; /* 1ms */ + struct timespec req = {0}; + + req.tv_sec = 0; + req.tv_nsec = milisec * 1000000L; + while(1) { - sleep(1); - printf("\nTTI indication"); - /* Send TTI indication to CL */ - duSendEgtpTTIInd(); + nanosleep(&req, (struct timespec *)NULL); + + /* Send Slot indication indication to lower mac */ + l1BuildAndSendSlotIndication(); } + return((void *)NULLP); } -void duStartTtiThread() +void duStartSlotIndicaion() { - pthread_t ttiThread; + pthread_t thread; int ret; - ret = pthread_create(&ttiThread, NULL, GenerateTicks, NULL); + ret = pthread_create(&thread, NULL, GenerateTicks, NULL); if(ret) { - printf("\nUnable to create thread"); + DU_LOG("\nPHY_STUB: Unable to create thread"); } } - +/********************************************************************** + End of file +**********************************************************************/