fix rfsimulator initialized variable, first pass on gNB scope, bugs
This commit is contained in:
+11
-12
@@ -81,7 +81,7 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include <openair2/GNB_APP/gnb_app.h>
|
||||
|
||||
#ifdef XFORMS
|
||||
#include "PHY/TOOLS/lte_phy_scope.h"
|
||||
#include "PHY/TOOLS/nr_phy_scope.h"
|
||||
#include "stats.h"
|
||||
#endif
|
||||
#include "nr-softmodem.h"
|
||||
@@ -91,8 +91,7 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
// current status is that every UE has a DL scope for a SINGLE eNB (gnb_id=0)
|
||||
// at eNB 0, an UL scope for every UE
|
||||
|
||||
FD_lte_phy_scope_ue *form_ue[NUMBER_OF_UE_MAX];
|
||||
FD_lte_phy_scope_enb *form_enb[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
FD_phy_scope_gnb *form_gnb[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
FD_stats_form *form_stats=NULL,*form_stats_l2=NULL;
|
||||
char title[255];
|
||||
unsigned char scope_enb_num_ue = 2;
|
||||
@@ -408,7 +407,7 @@ static void *scope_thread(void *arg) {
|
||||
if ((ue_cnt<scope_enb_num_ue)) {
|
||||
/*
|
||||
//this function needs to be written
|
||||
phy_scope_gNB(form_enb[CC_id][ue_cnt],
|
||||
phy_scope_gNB(form_gnb[CC_id][ue_cnt],
|
||||
RC.gNB[0][CC_id],
|
||||
UE_id);
|
||||
*/
|
||||
@@ -1050,16 +1049,16 @@ int main( int argc, char **argv ) {
|
||||
|
||||
for(UE_id=0; UE_id<scope_enb_num_ue; UE_id++) {
|
||||
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
form_enb[CC_id][UE_id] = create_lte_phy_scope_enb();
|
||||
form_gnb[CC_id][UE_id] = create_phy_scope_gnb();
|
||||
sprintf (title, "LTE UL SCOPE eNB for CC_id %d, UE %d",CC_id,UE_id);
|
||||
fl_show_form (form_enb[CC_id][UE_id]->lte_phy_scope_enb, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
|
||||
fl_show_form (form_gnb[CC_id][UE_id]->phy_scope_gnb, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
|
||||
|
||||
if (otg_enabled) {
|
||||
fl_set_button(form_enb[CC_id][UE_id]->button_0,1);
|
||||
fl_set_object_label(form_enb[CC_id][UE_id]->button_0,"DL Traffic ON");
|
||||
fl_set_button(form_gnb[CC_id][UE_id]->button_0,1);
|
||||
fl_set_object_label(form_gnb[CC_id][UE_id]->button_0,"DL Traffic ON");
|
||||
} else {
|
||||
fl_set_button(form_enb[CC_id][UE_id]->button_0,0);
|
||||
fl_set_object_label(form_enb[CC_id][UE_id]->button_0,"DL Traffic OFF");
|
||||
fl_set_button(form_gnb[CC_id][UE_id]->button_0,0);
|
||||
fl_set_object_label(form_gnb[CC_id][UE_id]->button_0,"DL Traffic OFF");
|
||||
}
|
||||
} // CC_id
|
||||
} // UE_id
|
||||
@@ -1187,8 +1186,8 @@ int main( int argc, char **argv ) {
|
||||
|
||||
for(UE_id=0; UE_id<scope_enb_num_ue; UE_id++) {
|
||||
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
fl_hide_form(form_enb[CC_id][UE_id]->lte_phy_scope_enb);
|
||||
fl_free_form(form_enb[CC_id][UE_id]->lte_phy_scope_enb);
|
||||
fl_hide_form(form_enb[CC_id][UE_id]->phy_scope_gNB);
|
||||
fl_free_form(form_enb[CC_id][UE_id]->phy_scope_gNB);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,22 +119,6 @@
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters specific to UE */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define CMDLINE_UEPARAMS_DESC { \
|
||||
{"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \
|
||||
{"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, dblptr:&rx_gain_off, defdblval:0, TYPE_DOUBLE, 0}, \
|
||||
{"ue-txgain", CONFIG_HLP_UETXG, 0, dblptr:&(tx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \
|
||||
{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, u8ptr:&nb_antenna_rx, defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, u8ptr:&nb_antenna_tx, defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \
|
||||
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \
|
||||
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0}, \
|
||||
{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
#define DEFAULT_DLF 2680000000
|
||||
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
@@ -189,6 +173,11 @@
|
||||
#define CMDLINE_STARTTELN_IDX 3
|
||||
|
||||
|
||||
typedef struct {
|
||||
int *argc;
|
||||
char **argv;
|
||||
} scopeParms_t;
|
||||
|
||||
extern int T_port;
|
||||
extern int T_nowait;
|
||||
extern int T_dont_fork;
|
||||
|
||||
+1
-1
@@ -377,7 +377,7 @@ void processSubframeRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
|
||||
#else
|
||||
uint64_t a=rdtsc();
|
||||
phy_procedures_nrUE_RX( UE, proc, 0, 1, UE->mode);
|
||||
printf("phy_procedures_nrUE_RX: slot:%d, time %lu\n", proc->nr_tti_rx, (rdtsc()-a)/3500);
|
||||
LOG_D(PHY,"phy_procedures_nrUE_RX: slot:%d, time %lu\n", proc->nr_tti_rx, (rdtsc()-a)/3500);
|
||||
// printf(">>> nr_ue_pdcch_procedures ended\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -97,11 +97,11 @@ extern FD_stats_form *create_form_stats_form( void );
|
||||
//#include "stats.h"
|
||||
// current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0)
|
||||
// at eNB 0, an UL scope for every UE
|
||||
FD_lte_phy_scope_ue *form_ue[NUMBER_OF_UE_MAX];
|
||||
FD_phy_scope_nrue *form_nrue[NUMBER_OF_UE_MAX];
|
||||
//FD_lte_phy_scope_enb *form_enb[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
//FD_stats_form *form_stats=NULL,*form_stats_l2=NULL;
|
||||
char title[255];
|
||||
//unsigned char scope_enb_num_ue = 2;
|
||||
unsigned char scope_enb_num_ue = 2;
|
||||
static pthread_t forms_thread; //xforms
|
||||
#endif //XFORMS
|
||||
#include <executables/nr-uesoftmodem.h>
|
||||
@@ -313,7 +313,7 @@ static void *scope_thread(void *arg) {
|
||||
sleep(5);
|
||||
|
||||
while (!oai_exit) {
|
||||
phy_scope_UE(form_ue[0],
|
||||
phy_scope_nrUE(form_nrue[0],
|
||||
PHY_vars_UE_g[0][0],
|
||||
0,0,1);
|
||||
usleep(100*1000);
|
||||
@@ -325,18 +325,15 @@ static void *scope_thread(void *arg) {
|
||||
|
||||
void init_scope(void) {
|
||||
#ifdef XFORMS
|
||||
int ret;
|
||||
int fl_argc=1;
|
||||
|
||||
if (do_forms==1) {
|
||||
char *name="5G-UE-scope";
|
||||
fl_initialize (&fl_argc, &name, NULL, 0, 0);
|
||||
int UE_id = 0;
|
||||
form_ue[UE_id] = create_lte_phy_scope_ue();
|
||||
form_nrue[UE_id] = create_phy_scope_nrue();
|
||||
sprintf (title, "NR DL SCOPE UE");
|
||||
fl_show_form (form_ue[UE_id]->lte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
|
||||
fl_set_button(form_ue[UE_id]->button_0,0);
|
||||
fl_set_object_label(form_ue[UE_id]->button_0, "IA Receiver OFF");
|
||||
fl_show_form (form_nrue[UE_id]->phy_scope_nrue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
|
||||
threadCreate(&forms_thread, scope_thread, NULL, "scope", -1, OAI_PRIORITY_RT_LOW);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
|
||||
*
|
||||
* 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.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/* Form definition file generated by fdesign */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "stats.h"
|
||||
|
||||
|
||||
/***************************************
|
||||
***************************************/
|
||||
|
||||
FD_stats_form *
|
||||
create_form_stats_form( void ) {
|
||||
FL_OBJECT *obj;
|
||||
FD_stats_form *fdui = fl_malloc( sizeof *fdui );
|
||||
fdui->vdata = fdui->cdata = NULL;
|
||||
fdui->ldata = 0;
|
||||
fdui->stats_form = fl_bgn_form( FL_NO_BOX, 1115, 900 );
|
||||
obj = fl_add_box( FL_UP_BOX, 0, 0, 1115, 900, "" );
|
||||
//fdui->stats_text = obj = fl_add_text( FL_NORMAL_TEXT, 60, 50, 1000, 810, "test" );
|
||||
//fl_set_object_lsize( obj, FL_TINY_SIZE );
|
||||
fdui->stats_text = obj = fl_add_browser( FL_NORMAL_BROWSER, 60, 50, 1000, 810, "test" );
|
||||
fl_set_browser_fontsize(obj,FL_TINY_SIZE);
|
||||
fdui->stats_button = obj = fl_add_button( FL_PUSH_BUTTON, 60, 10, 130, 30, "Reset Stats" );
|
||||
fl_set_object_lalign( obj, FL_ALIGN_CENTER );
|
||||
fl_set_object_color( obj, FL_GREEN, FL_GREEN);
|
||||
fl_set_object_callback( obj, reset_stats, 0 );
|
||||
fl_end_form( );
|
||||
fdui->stats_form->fdui = fdui;
|
||||
return fdui;
|
||||
}
|
||||
Reference in New Issue
Block a user