X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fphy_stub%2Fphy_stub_thread_hdl.c;h=72ddaacf3daf94d5b77b732cc7ab3977e5c5e364;hb=8264f7ce2ba9f4a1874c4ec1018127cc27fa12cb;hp=7699009c6b6d0885481216e0b18a60aa16977d5a;hpb=86ce8157d6b459515f2a3f37f5bc84daee2d27ca;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 7699009c6..72ddaacf3 100644 --- a/src/phy_stub/phy_stub_thread_hdl.c +++ b/src/phy_stub/phy_stub_thread_hdl.c @@ -21,16 +21,20 @@ #include "common_def.h" #include "phy_stub_utils.h" #ifdef INTEL_FAPI -#include "fapi.h" +#include "nr5g_fapi_internal.h" #include "fapi_vendor_extension.h" #endif #include "phy_stub.h" #include "mac_sch_interface.h" +uint16_t sfnValue; +uint16_t slotValue; +PhyDb phyDb; extern uint16_t l1BuildAndSendBSR(uint8_t ueIdx, BsrType bsrType,\ LcgBufferSize lcgBsIdx[MAX_NUM_LOGICAL_CHANNEL_GROUPS]); pthread_t thread = 0; int socket_fd =0; +bool slotIndicationStarted; /******************************************************************* * @@ -159,7 +163,7 @@ void *l1ConsoleHandler(void *args) while(counter) { /* Start Pumping data from PHY stub to DU */ - for(ueIdx=0; ueIdx < MAX_NUM_UE; ueIdx++) + for(ueIdx=0; ueIdx < phyDb.ueDb.numActvUe; ueIdx++) { for(drbIdx = 0; drbIdx < NUM_DRB_TO_PUMP_DATA; drbIdx++) //Number of DRB times the loop will run { @@ -205,6 +209,18 @@ void *l1ConsoleHandler(void *args) } } } + else if(ch == 'r') + { + /* Trigger RACH Indication towards DU */ + if(phyDb.ueDb.ueCb[phyDb.ueDb.numActvUe].rachIndSent == false) + { + phyDb.ueDb.ueCb[phyDb.ueDb.numActvUe].rachIndSent = true; + phyDb.ueDb.ueCb[phyDb.ueDb.numActvUe].isCFRA = true; + l1BuildAndSendRachInd(slotValue, sfnValue, CF_RA_PREAMBLE_IDX); + phyDb.ueDb.numActvUe++; + } + + } DU_LOG("\n"); continue; }