Commit 1de3183d authored by Aikaterini's avatar Aikaterini

fix for RRH compilation

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