Commit 0cb8546a authored by Lionel Gauthier's avatar Lionel Gauthier

add L after frequency value in enb config file

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5587 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 223c5a8a
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <string.h> #include <string.h>
#include <libconfig.h> #include <libconfig.h>
#include <inttypes.h>
#include "log.h" #include "log.h"
#include "assertions.h" #include "assertions.h"
...@@ -235,7 +236,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -235,7 +236,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
long int tdd_config_s; long int tdd_config_s;
const char* prefix_type; const char* prefix_type;
long int eutra_band; long int eutra_band;
long int downlink_frequency; long long int downlink_frequency;
long int uplink_frequency_offset; long int uplink_frequency_offset;
char* ipv4 = NULL; char* ipv4 = NULL;
char* ipv6 = NULL; char* ipv6 = NULL;
...@@ -422,17 +423,22 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -422,17 +423,22 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
if(config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_EUTRA_BAND, &eutra_band)) { if(config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_EUTRA_BAND, &eutra_band)) {
enb_properties.properties[enb_properties_index]->eutra_band = eutra_band; enb_properties.properties[enb_properties_index]->eutra_band = eutra_band;
printf( "\teutra band:\t%d\n",enb_properties.properties[enb_properties_index]->eutra_band);
} else { } else {
enb_properties.properties[enb_properties_index]->eutra_band = 7; // Default band enb_properties.properties[enb_properties_index]->eutra_band = 7; // Default band
printf( "\teutra band:\t%d (default)\n",enb_properties.properties[enb_properties_index]->eutra_band);
} }
if(config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, &downlink_frequency)) { if(config_setting_lookup_int64(setting_enb, ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, &downlink_frequency)) {
enb_properties.properties[enb_properties_index]->downlink_frequency = (unsigned int) downlink_frequency; enb_properties.properties[enb_properties_index]->downlink_frequency = (uint32_t) downlink_frequency;
printf( "\tdownlink freq:\t%u\n",enb_properties.properties[enb_properties_index]->downlink_frequency);
} else { } else {
enb_properties.properties[enb_properties_index]->downlink_frequency = 2680000000UL; // Default downlink frequency enb_properties.properties[enb_properties_index]->downlink_frequency = 2680000000UL; // Default downlink frequency
printf( "\tdownlink freq:\t%u (default)\n",enb_properties.properties[enb_properties_index]->downlink_frequency);
} }
if(config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, &uplink_frequency_offset)) { if(config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, &uplink_frequency_offset)) {
enb_properties.properties[enb_properties_index]->uplink_frequency_offset = (unsigned int) uplink_frequency_offset; enb_properties.properties[enb_properties_index]->uplink_frequency_offset = (unsigned int) uplink_frequency_offset;
printf( "\tuplink freq offset:\t%ld\n",enb_properties.properties[enb_properties_index]->uplink_frequency_offset);
} else { } else {
// Default uplink frequency offset // Default uplink frequency offset
if (enb_properties.properties[enb_properties_index]->frame_type == FDD) { if (enb_properties.properties[enb_properties_index]->frame_type == FDD) {
...@@ -440,6 +446,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -440,6 +446,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
} else { } else {
enb_properties.properties[enb_properties_index]->uplink_frequency_offset = 0; enb_properties.properties[enb_properties_index]->uplink_frequency_offset = 0;
} }
printf( "\tuplink freq offset:\t%ld (default)\n",enb_properties.properties[enb_properties_index]->uplink_frequency_offset);
} }
parse_errors += enb_check_band_frequencies(lib_config_file_name_pP, parse_errors += enb_check_band_frequencies(lib_config_file_name_pP,
......
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