X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fphy_stub%2Fphy_stub_thread_hdl.c;h=f320001d5973dcb44a9fa6dc471284942d5ae33a;hb=2a05694263fa633b9b051cb249d0e43128d5a760;hp=e76c067ef8ecb9476e159c394141fb5da97e0f04;hpb=6d01b1cb797bb2b47115eee21ad7d1a6ff3fcfe7;p=o-du%2Fl2.git diff --git a/src/phy_stub/phy_stub_thread_hdl.c b/src/phy_stub/phy_stub_thread_hdl.c index e76c067ef..f320001d5 100644 --- a/src/phy_stub/phy_stub_thread_hdl.c +++ b/src/phy_stub/phy_stub_thread_hdl.c @@ -23,6 +23,7 @@ #include "du_log.h" uint8_t l1SendUlUserData(); +uint8_t l1SendStatusPdu(); uint16_t l1BuildAndSendSlotIndication(); pthread_t thread = 0; @@ -43,7 +44,11 @@ pthread_t thread = 0; * ****************************************************************/ void *GenerateTicks(void *arg) { - int milisec = 1; /* 1ms */ +#ifdef NR_TDD + int milisec = 0.5; /* 0.5ms */ +#else + int milisec = 1; /* 1ms */ +#endif struct timespec req = {0}; req.tv_sec = 0; @@ -51,8 +56,7 @@ void *GenerateTicks(void *arg) while(1) { - nanosleep(&req, (struct timespec *)NULL); - + clock_nanosleep(CLOCK_REALTIME, 0, &req, NULL); /* Send Slot indication indication to lower mac */ l1BuildAndSendSlotIndication(); } @@ -123,6 +127,12 @@ void *l1ConsoleHandler(void *args) DU_LOG("\nDEBUG --> PHY STUB: Sending UL User Data"); l1SendUlUserData(); } + else if((ch = getchar()) == 'c') + { + /* Send Control PDU from PHY stub to DU */ + DU_LOG("\nDEBUG --> PHY STUB: Sending Status PDU"); + l1SendStatusPdu(); + } } }