Commit 1de3183d authored by Aikaterini's avatar Aikaterini

fix for RRH compilation

parent f3c7d753
......@@ -147,18 +147,22 @@ void config_BBU_mod( rrh_module_t *mod_enb, uint8_t RT_flag, uint8_t NRT_flag) {
mod_enb->devs->openair0_cfg = mod_enb->eth_dev.openair0_cfg;
/* check sanity of configuration parameters and print */
check_dev_config(mod_enb);
check_dev_config(mod_enb);
if (rf_config_file[0] == '\0')
mod_enb->devs->openair0_cfg->configFilename = NULL;
else
mod_enb->devs->openair0_cfg->configFilename = rf_config_file;
/* initialize and configure the RF device */
if (openair0_device_load(mod_enb->devs, mod_enb->devs->openair0_cfg)<0) {
LOG_E(RRH,"Exiting, cannot initialize RF device.\n");
exit(-1);
} else {
} else {
if (mod_enb->devs->type != NONE_DEV) {
/* start RF device */
if (mod_enb->devs->type == EXMIMO_DEV) {
//call start function for exmino
} else {
if (mod_enb->devs->trx_start_func(mod_enb->devs)!=0)
LOG_E(RRH,"Unable to initiate RF device.\n");
else
......
......@@ -111,8 +111,7 @@ rrh_module_t *ue_array;
openair0_vtimestamp hw_counter=0;
char rf_config_file[1024];
static void debug_init(void);
static void get_options(int argc, char *argv[]);
......@@ -143,7 +142,7 @@ static int get_address(char* if_name, uint8_t flag);
int main(int argc, char **argv) {
unsigned int i;
rf_config_file[0]='\0';
/* parse input arguments */
get_options(argc, argv);
/* initialize logger and signal analyzer */
......@@ -257,7 +256,7 @@ static void get_options(int argc, char *argv[]) {
int opt;
while ((opt = getopt(argc, argv, "xvhlte:n:u:g:r:m:i:")) != -1) {
while ((opt = getopt(argc, argv, "xvhlte:n:u:g:r:m:i:f:")) != -1) {
switch (opt) {
case 'n':
......@@ -299,6 +298,14 @@ static void get_options(int argc, char *argv[]) {
/*In loopback mode rrh sends back to bbu what it receives*/
loopback_flag=1;
break;
case 'f':
if (strlen(optarg)<=1024)
strcpy(rf_config_file,optarg);
else {
printf("Configuration filename is too long\n");
exit(-1);
}
break;
case 't':
/* When measurements are enabled statistics related to TX/RX time are printed */
measurements_flag=1;
......
......@@ -39,6 +39,7 @@
#ifndef RRH_GW_EXTERNS_H_
#define RRH_GW_EXTERNS_H_
extern char rf_config_file[1024];
extern openair0_timestamp timestamp_UE_tx[4] ,timestamp_UE_rx[4] ,timestamp_eNB_rx[4],timestamp_eNB_tx[4];
extern openair0_vtimestamp hw_counter;
......
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