Commit f442a7c5 authored by winckel's avatar winckel

Modified -O option used for eNB configuration.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4961 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 1acf4a6d
...@@ -140,6 +140,7 @@ char UE_flag=0; ...@@ -140,6 +140,7 @@ char UE_flag=0;
u8 eNB_id=0,UE_id=0; u8 eNB_id=0,UE_id=0;
u32 carrier_freq[4]= {1907600000,1907600000,1907600000,1907600000}; u32 carrier_freq[4]= {1907600000,1907600000,1907600000,1907600000};
char *g_conf_config_file_name = NULL;
unsigned int lost_bytes=0; unsigned int lost_bytes=0;
...@@ -699,19 +700,7 @@ int main(int argc, char **argv) { ...@@ -699,19 +700,7 @@ int main(int argc, char **argv) {
#endif #endif
break; break;
case 'O': case 'O':
#if defined(ENABLE_USE_MME) g_conf_config_file_name = optarg;
EPC_MODE_ENABLED = 1;
if (optarg == NULL) /* No IP address provided: use localhost */
{
memcpy(&EPC_MODE_MME_ADDRESS[0], "127.0.0.1", 10);
} else {
u8 ip_length = strlen(optarg) + 1;
memcpy(&EPC_MODE_MME_ADDRESS[0], optarg,
ip_length > 16 ? 16 : ip_length);
}
#else
printf("You enabled mme mode without s1ap compiled...\n");
#endif
break; break;
case 'F': case 'F':
sprintf(rxg_fname,"%srxg.lime",optarg); sprintf(rxg_fname,"%srxg.lime",optarg);
......
...@@ -168,6 +168,7 @@ char UE_flag=0; ...@@ -168,6 +168,7 @@ char UE_flag=0;
u8 eNB_id=0,UE_id=0; u8 eNB_id=0,UE_id=0;
u32 carrier_freq[4]= {1907600000,1907600000,1907600000,1907600000}; u32 carrier_freq[4]= {1907600000,1907600000,1907600000,1907600000};
char *g_conf_config_file_name = NULL;
struct timing_info_t { struct timing_info_t {
//unsigned int frame, hw_slot, last_slot, next_slot; //unsigned int frame, hw_slot, last_slot, next_slot;
...@@ -1126,19 +1127,7 @@ int main(int argc, char **argv) { ...@@ -1126,19 +1127,7 @@ int main(int argc, char **argv) {
#endif #endif
break; break;
case 'O': case 'O':
#if defined(ENABLE_USE_MME) g_conf_config_file_name = optarg;
EPC_MODE_ENABLED = 1;
if (optarg == NULL) /* No IP address provided: use localhost */
{
memcpy(&EPC_MODE_MME_ADDRESS[0], "127.0.0.1", 10);
} else {
u8 ip_length = strlen(optarg) + 1;
memcpy(&EPC_MODE_MME_ADDRESS[0], optarg,
ip_length > 16 ? 16 : ip_length);
}
#else
printf("You enabled mme mode without s1ap compiled...\n");
#endif
break; break;
case 'F': case 'F':
sprintf(rxg_fname,"%srxg.lime",optarg); sprintf(rxg_fname,"%srxg.lime",optarg);
...@@ -1344,6 +1333,14 @@ int main(int argc, char **argv) { ...@@ -1344,6 +1333,14 @@ int main(int argc, char **argv) {
g_log->log_component[OTG].flag = LOG_HIGH; g_log->log_component[OTG].flag = LOG_HIGH;
g_log->log_component[RRC].level = LOG_INFO; g_log->log_component[RRC].level = LOG_INFO;
g_log->log_component[RRC].flag = LOG_HIGH; g_log->log_component[RRC].flag = LOG_HIGH;
#if defined(ENABLE_ITTI)
g_log->log_component[EMU].level = LOG_INFO;
g_log->log_component[EMU].flag = LOG_HIGH;
# if defined(ENABLE_USE_MME)
g_log->log_component[NAS].level = LOG_INFO;
g_log->log_component[NAS].flag = LOG_HIGH;
# endif
#endif
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE*)); PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE*));
PHY_vars_UE_g[0] = init_lte_UE(frame_parms, UE_id,abstraction_flag,transmission_mode); PHY_vars_UE_g[0] = init_lte_UE(frame_parms, UE_id,abstraction_flag,transmission_mode);
......
...@@ -202,7 +202,7 @@ void help(void) { ...@@ -202,7 +202,7 @@ void help(void) {
printf ("-m Gives a fixed DL mcs\n"); printf ("-m Gives a fixed DL mcs\n");
printf ("-M Set the machine ID for Ethernet-based emulation\n"); printf ("-M Set the machine ID for Ethernet-based emulation\n");
printf ("-n Set the number of frames for the simulation\n"); printf ("-n Set the number of frames for the simulation\n");
printf ("-O [mme ipv4 address] Enable MME mode\n"); printf ("-O [enb_conf_file] eNB configuration file name\n");
printf ("-p Set the total number of machine in emulation - valid if M is set\n"); printf ("-p Set the total number of machine in emulation - valid if M is set\n");
printf ("-P [trace type] Enable protocol analyzer. Possible values for OPT:\n"); printf ("-P [trace type] Enable protocol analyzer. Possible values for OPT:\n");
printf (" - wireshark: Enable tracing of layers above PHY using an UDP socket\n"); printf (" - wireshark: Enable tracing of layers above PHY using an UDP socket\n");
......
...@@ -118,9 +118,9 @@ void get_simulation_options(int argc, char *argv[]) { ...@@ -118,9 +118,9 @@ void get_simulation_options(int argc, char *argv[]) {
char c; char c;
int option_index; int option_index;
static struct option long_options[] = { static struct option long_options[] = {
{"config-file", required_argument, 0, 0}, {"enb-conf", required_argument, 0, 0},
{"pdcp_period", 1, 0, 0}, {"pdcp_period", required_argument, 0, 0},
{"omg_period", 1, 0, 0}, {"omg_period", required_argument, 0, 0},
{"enb-ral-listening-port", required_argument, 0, 0}, {"enb-ral-listening-port", required_argument, 0, 0},
{"enb-ral-ip-address", required_argument, 0, 0}, {"enb-ral-ip-address", required_argument, 0, 0},
{"enb-ral-link-id", required_argument, 0, 0}, {"enb-ral-link-id", required_argument, 0, 0},
...@@ -141,10 +141,10 @@ void get_simulation_options(int argc, char *argv[]) { ...@@ -141,10 +141,10 @@ void get_simulation_options(int argc, char *argv[]) {
while ((c = getopt_long (argc, argv, "aA:b:B:c:C:D:d:eE:f:FGg:hHi:IJ:j:k:K:l:L:m:M:n:N:oO:p:P:Q:rR:s:S:t:T:u:U:vV:w:W:x:X:y:Y:z:Z:", long_options, &option_index)) != -1) { while ((c = getopt_long (argc, argv, "aA:b:B:c:C:D:d:eE:f:FGg:hHi:IJ:j:k:K:l:L:m:M:n:N:oO:p:P:Q:rR:s:S:t:T:u:U:vV:w:W:x:X:y:Y:z:Z:", long_options, &option_index)) != -1) {
switch (c) { switch (c) {
case 0: case 0:
if (! strcmp(long_options[option_index].name, "config-file")) { if (! strcmp(long_options[option_index].name, "enb-conf")) {
if (optarg) { if (optarg) {
g_conf_config_file_name = strdup(optarg); g_conf_config_file_name = strdup(optarg);
printf("config file is %s\n", g_conf_config_file_name); printf("eNB configuration file is %s\n", g_conf_config_file_name);
} }
} else if (! strcmp(long_options[option_index].name, "pdcp_period")) { } else if (! strcmp(long_options[option_index].name, "pdcp_period")) {
if (optarg) { if (optarg) {
...@@ -462,19 +462,7 @@ void get_simulation_options(int argc, char *argv[]) { ...@@ -462,19 +462,7 @@ void get_simulation_options(int argc, char *argv[]) {
/* Sebastien ROUX: Reserved for future use (currently used in ltenow branch) */ /* Sebastien ROUX: Reserved for future use (currently used in ltenow branch) */
break; break;
case 'O': case 'O':
#if defined(ENABLE_USE_MME) g_conf_config_file_name = optarg;
EPC_MODE_ENABLED = 1;
if (optarg == NULL) /* No IP address provided: use localhost */
{
memcpy(&EPC_MODE_MME_ADDRESS[0], "127.0.0.1", 10);
} else {
u8 ip_length = strlen(optarg) + 1;
memcpy(&EPC_MODE_MME_ADDRESS[0], optarg,
ip_length > 16 ? 16 : ip_length);
}
#else
printf("You enabled MME mode without compiling using ENABLE_USE_MME=1 ...\n");
#endif
break; break;
case 'o': case 'o':
oai_emulation.info.slot_isr = 1; oai_emulation.info.slot_isr = 1;
......
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