Commit 8dd212c0 authored by Robert Schmidt's avatar Robert Schmidt

Only send random data if phytest

parent 439095bc
...@@ -46,6 +46,9 @@ ...@@ -46,6 +46,9 @@
/*TAG*/ /*TAG*/
#include "NR_TAG-Id.h" #include "NR_TAG-Id.h"
/*Softmodem params*/
#include "executables/softmodem-common.h"
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
/////* DLSCH MAC PDU generation (6.1.2 TS 38.321) *///// /////* DLSCH MAC PDU generation (6.1.2 TS 38.321) */////
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
...@@ -439,6 +442,8 @@ void nr_schedule_ue_spec(module_id_t module_id, ...@@ -439,6 +442,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
lcid, lcid,
0, 0,
0); 0);
if (rlc_status.bytes_in_buffer == 0 && !get_softmodem_params()->phy_test)
return;
LOG_D(MAC, LOG_D(MAC,
"%d.%d, DTCH%d->DLSCH, RLC status %d bytes\n", "%d.%d, DTCH%d->DLSCH, RLC status %d bytes\n",
frame, frame,
...@@ -575,8 +580,8 @@ void nr_schedule_ue_spec(module_id_t module_id, ...@@ -575,8 +580,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
//ue_sched_ctl->uplane_inactivity_timer = 0; //ue_sched_ctl->uplane_inactivity_timer = 0;
} }
else { else if (get_softmodem_params()->phy_test) {
LOG_I(MAC, "Configuring DL_TX in %d.%d: random data\n", frame, slot); LOG_D(MAC, "Configuring DL_TX in %d.%d: random data\n", frame, slot);
// fill dlsch_buffer with random data // fill dlsch_buffer with random data
for (int i = 0; i < TBS; i++) for (int i = 0; i < TBS; i++)
mac_sdus[i] = (unsigned char) (lrand48()&0xff); mac_sdus[i] = (unsigned char) (lrand48()&0xff);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment