* manage control elements in CCCH PDU through rx_sdu function
* add event handler for remote (online) configuration and status monitoring * update openair config generator (OCG) and scneario descriptor (OSD) with new features contributed by A. Gomes (one source) * fix the issue with netlink when benchmarking oaisim preformance * pre-ci passed except for eMBMS git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5299 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
|
||||
<EMULATION_CONFIG>
|
||||
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms> <!--if 0 set to infinity-->
|
||||
<CURVE>disable</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<CURVE>enabled</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
|
||||
<BACKGROUND_STATS>enable</BACKGROUND_STATS> <!-- option: enable, disable. If enable, it allows to ptrint BACKGROUNS statistics: Nb packets, throughputs,etc-->
|
||||
<PERFORMANCE_METRICS>
|
||||
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
|
||||
|
||||
@@ -228,6 +228,7 @@ OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/oaisim_config.o
|
||||
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/sinr_sim.o
|
||||
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/cor_SF_sim.o
|
||||
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/oaisim_functions.o
|
||||
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/event_handler.o
|
||||
|
||||
OAISIM_OBJS = $(OPENAIR_TARGETS)/SIMU/USER/oaisim.o
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
#include "oaisim.h"
|
||||
#include "UTIL/FIFO/pad_list.h"
|
||||
|
||||
void add_event(struct Event event);
|
||||
|
||||
void schedule(enum Event_Type type, int frame, char * key, void* value);
|
||||
|
||||
void schedule_end_of_simulation(End_Of_Sim_Event_Type type, int value);
|
||||
|
||||
int end_of_simulation();
|
||||
|
||||
void update_omg_model(char * key, void * value);
|
||||
|
||||
void update_otg_model(char * key, void * value);
|
||||
@@ -1,37 +1,75 @@
|
||||
#include "discrete_event_generator.h"
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2014 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
/*! \file event_handler.c
|
||||
* \brief event handler primitives
|
||||
* \author Navid Nikaein and Mohamed Said MOSLI BOUKSIAA,
|
||||
* \date 2014
|
||||
* \version 0.5
|
||||
* @ingroup _oai
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
extern frame_t frame;
|
||||
End_Of_Sim_Event end_event; //Could later be a list of condition_events (if the end condition is more complicated)
|
||||
Event_List event_list;
|
||||
#include "event_handler.h"
|
||||
|
||||
void add_event(struct Event event) {
|
||||
//extern frame_t frame;
|
||||
//End_Of_Sim_Event end_event; //Could later be a list of condition_events (if the end condition is more complicated)
|
||||
|
||||
Event_elt * counter = event_list.head;
|
||||
Event_elt * previous = counter;
|
||||
Event_elt * elt = malloc(sizeof(Event_elt));
|
||||
Event_List_t event_list;
|
||||
|
||||
while (counter != NULL) {
|
||||
if ((counter->event).frame > event.frame) break;
|
||||
//else if ((counter->event).next_slot > event.next_slot) break;
|
||||
else {
|
||||
previous = counter;
|
||||
counter = counter->next;
|
||||
}
|
||||
void add_event(Event_t event) {
|
||||
|
||||
Event_elt_t * counter = event_list.head;
|
||||
Event_elt_t * previous = counter;
|
||||
Event_elt_t * elt = malloc(sizeof(Event_elt_t));
|
||||
|
||||
while (counter != NULL) {
|
||||
if ((counter->event).frame > event.frame) break;
|
||||
//else if ((counter->event).next_slot > event.next_slot) break;
|
||||
else {
|
||||
previous = counter;
|
||||
counter = counter->next;
|
||||
}
|
||||
|
||||
elt->event = event;
|
||||
|
||||
if (event_list.head != NULL)
|
||||
event_list_add_element(elt, previous, &event_list);
|
||||
else
|
||||
event_list_add_head(elt, &event_list);
|
||||
|
||||
}
|
||||
|
||||
elt->event = event;
|
||||
|
||||
if (event_list.head != NULL)
|
||||
event_list_add_element(elt, previous, &event_list);
|
||||
else
|
||||
event_list_add_head(elt, &event_list);
|
||||
|
||||
}
|
||||
|
||||
void schedule(enum Event_Type type, int frame, char * key, void * value) {
|
||||
Event event;
|
||||
void schedule(Event_Type_t type, int frame, char * key, void * value) {
|
||||
Event_t event;
|
||||
event.frame = frame;
|
||||
if (key == NULL) { //Global model update
|
||||
event.key = NULL;
|
||||
@@ -44,25 +82,130 @@ void schedule(enum Event_Type type, int frame, char * key, void * value) {
|
||||
add_event(event);
|
||||
}
|
||||
|
||||
void schedule_end_of_simulation(End_Of_Sim_Event_Type type, int value) {
|
||||
end_event.type = type;
|
||||
end_event.value = value;
|
||||
/*
|
||||
* this function can reschedule events in the future to build a desired (more dynamic) scenario
|
||||
* TODO: make sure that OCG OAI_Emulation is decoupled with the local vars
|
||||
*/
|
||||
void schedule_events(){
|
||||
|
||||
/*
|
||||
* Step 1: vars needed for future changes
|
||||
*/
|
||||
|
||||
// overall config associated with OAI_ET
|
||||
// OAI_Emulation * oai_frame_1000;
|
||||
|
||||
// specific config
|
||||
/*
|
||||
* associated with SYS_ET
|
||||
*/
|
||||
//Environment_System_Config * system_frame_200;
|
||||
/*
|
||||
* associated with TOPO_ET
|
||||
*/
|
||||
//Topology_Config *topology_frame_10;
|
||||
/*
|
||||
* associated with APP_ET
|
||||
*/
|
||||
//Application_Config *application_frame_20;
|
||||
/*
|
||||
* associated with EMU_ET
|
||||
*/
|
||||
//Emulation_Config * emulation_frame_100;
|
||||
|
||||
|
||||
/*
|
||||
* Step 2: set the desired future changes in the vars
|
||||
*/
|
||||
// i.e. optionally provide an XML file and update OCG vars
|
||||
|
||||
//mob_frame_10 -> ...
|
||||
//application_frame_30 -> ...
|
||||
|
||||
/*
|
||||
* Step 3: schedule the execution of changes
|
||||
*/
|
||||
|
||||
// general OAI dynamic configuration
|
||||
|
||||
//schedule(OAI_ET, 1000, NULL, oai_frame_1000);
|
||||
//schedule(SYS_ET, 200, NULL, system_frame_200);
|
||||
//schedule(TOPO_ET, 10, NULL, topology_frame_10);
|
||||
//schedule(APP_ET, 20, NULL, application_frame_20);
|
||||
//schedule(EMU_ET, 100, NULL,emulation_frame_100);
|
||||
|
||||
// protocol dynamic configuration
|
||||
//schedule(MAC_ET, 100, NULL,mac_frame_100);
|
||||
|
||||
|
||||
//event_list_display(&event_list);
|
||||
|
||||
}
|
||||
|
||||
int end_of_simulation() {
|
||||
switch (end_event.type) {
|
||||
case FRAME:
|
||||
if (frame == end_event.value)
|
||||
return 1;
|
||||
break;
|
||||
|
||||
/* default:
|
||||
return 0;*/
|
||||
void execute_events(frame_t frame){
|
||||
|
||||
Event_elt_t *user_defined_event;
|
||||
Event_t event;
|
||||
|
||||
while ((user_defined_event = event_list_get_head(&event_list)) != NULL) {
|
||||
|
||||
event = user_defined_event->event;
|
||||
|
||||
if (event.frame == frame) {
|
||||
switch (event.type) {
|
||||
case OAI_ET:
|
||||
update_oai_model(event.key, event.value);
|
||||
user_defined_event = event_list_remove_head(&event_list);
|
||||
break;
|
||||
|
||||
case SYS_ET:
|
||||
update_sys_model(event.key, event.value);
|
||||
user_defined_event = event_list_remove_head(&event_list);
|
||||
break;
|
||||
|
||||
case TOPO_ET:
|
||||
update_topo_model(event.key, event.value); //implement it with assigning the new values to that of oai_emulation & second thing is to ensure mob model is always read from oai_emulation
|
||||
user_defined_event = event_list_remove_head(&event_list);
|
||||
break;
|
||||
|
||||
case APP_ET:
|
||||
update_app_model(event.key, event.value);
|
||||
user_defined_event = event_list_remove_head(&event_list);
|
||||
break;
|
||||
|
||||
case EMU_ET:
|
||||
update_emu_model(event.key, event.value);
|
||||
user_defined_event = event_list_remove_head(&event_list);
|
||||
break;
|
||||
|
||||
case MAC_ET:
|
||||
update_mac(event.key, event.value);
|
||||
user_defined_event = event_list_remove_head(&event_list);
|
||||
break;
|
||||
|
||||
default :
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void update_omg_model(char * key, void * value) {
|
||||
void update_mac(char * key, void * value) {
|
||||
|
||||
}
|
||||
|
||||
void update_oai_model(char * key, void * value) {
|
||||
|
||||
}
|
||||
|
||||
void update_sys_model(char * key, void * value) {
|
||||
|
||||
}
|
||||
|
||||
void update_topo_model(char * key, void * value) {
|
||||
printf("\n\n\nA NEW MOB MODEL\n\n\n");
|
||||
/*
|
||||
if (key != NULL) { //Global model update
|
||||
@@ -127,7 +270,7 @@ void update_omg_model(char * key, void * value) {
|
||||
*/
|
||||
}
|
||||
|
||||
void update_otg_model(char * key, void * value) {
|
||||
void update_app_model(char * key, void * value) {
|
||||
printf("\n\n\nA NEW APP MODEL\n\n\n");
|
||||
//int i;
|
||||
/*
|
||||
@@ -329,3 +472,8 @@ void update_otg_model(char * key, void * value) {
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void update_emu_model(char * key, void * value) {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2014 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
/*! \file event_handler.h
|
||||
* \brief primitives to handle event acting on oai
|
||||
* \author Navid Nikaein and Mohamed Said MOSLI BOUKSIAA,
|
||||
* \date 2014
|
||||
* \version 0.5
|
||||
* @ingroup _oai
|
||||
*/
|
||||
|
||||
#include "oaisim.h"
|
||||
#include "UTIL/FIFO/pad_list.h"
|
||||
|
||||
|
||||
|
||||
void add_event(Event_t event);
|
||||
|
||||
void schedule(Event_Type_t type, int frame, char * key, void* value);
|
||||
|
||||
void schedule_events(void);
|
||||
|
||||
void execute_events(frame_t frame);
|
||||
|
||||
|
||||
void update_oai_model(char * key, void * value);
|
||||
|
||||
void update_sys_model(char * key, void * value);
|
||||
|
||||
void update_topo_model(char * key, void * value);
|
||||
|
||||
void update_app_model(char * key, void * value);
|
||||
|
||||
void update_emu_model(char * key, void * value);
|
||||
|
||||
void update_mac(char * key, void * value);
|
||||
|
||||
/*
|
||||
void schedule_end_of_simulation(End_Of_Sim_Event_Type type, int value);
|
||||
|
||||
int end_of_simulation();
|
||||
*/
|
||||
@@ -1,3 +1,32 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2014 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
@@ -8,6 +37,7 @@
|
||||
#include <cblas.h>
|
||||
#include <execinfo.h>
|
||||
|
||||
#include "event_handler.h"
|
||||
#include "SIMULATION/RF/defs.h"
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs.h"
|
||||
@@ -556,7 +586,11 @@ void *l2l1_task(void *args_p) {
|
||||
}
|
||||
} while(message_p != NULL);
|
||||
#endif
|
||||
|
||||
|
||||
//Run the aperiodic user-defined events
|
||||
if (oai_emulation.info.oeh_enabled == 1)
|
||||
execute_events(frame);
|
||||
|
||||
/*
|
||||
// Handling the cooperation Flag
|
||||
if (cooperation_flag == 2)
|
||||
@@ -1075,6 +1109,10 @@ int main(int argc, char **argv) {
|
||||
smbv_init_config(smbv_fname, smbv_nframes);
|
||||
smbv_write_config_from_frame_parms(smbv_fname, &PHY_vars_eNB_g[0]->lte_frame_parms);
|
||||
#endif
|
||||
// add events to future event list: Currently not used
|
||||
if (oai_emulation.info.oeh_enabled == 1)
|
||||
schedule_events();
|
||||
|
||||
// oai performance profiler is enabled
|
||||
if (oai_emulation.info.opp_enabled == 1)
|
||||
reset_opp_meas();
|
||||
|
||||
@@ -26,7 +26,7 @@ void do_DL_sig(double **r_re0,double **r_im0,double **r_re,double **r_im,double
|
||||
void init_ue(node_desc_t *ue_data, UE_Antenna ue_ant);//Abstraction changes
|
||||
void init_enb(node_desc_t *enb_data, eNB_Antenna enb_ant);//Abstraction changes
|
||||
void extract_position(Node_list input_node_list, node_desc_t**, int nb_nodes);//Abstraction changes
|
||||
void get_beta_map();//Abstraction changes
|
||||
void get_beta_map(void);//Abstraction changes
|
||||
void get_MIESM_param(void);
|
||||
|
||||
void init_snr(channel_desc_t *, node_desc_t *, node_desc_t *, double*, double*, uint8_t, uint16_t, uint8_t);//Abstraction changes
|
||||
@@ -42,13 +42,12 @@ void calc_path_loss(node_desc_t* node_tx, node_desc_t* node_rx, channel_desc_t *
|
||||
|
||||
void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, frame_t frame, uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
#ifdef OPENAIR2
|
||||
int omv_write (int pfd, Node_list enb_node_list, Node_list ue_node_list, Data_Flow_Unit omv_data);
|
||||
void omv_end (int pfd, Data_Flow_Unit omv_data);
|
||||
|
||||
void reset_opp_meas(void);
|
||||
void print_opp_meas(void);
|
||||
|
||||
#ifdef OPENAIR2
|
||||
int omv_write (int pfd, Node_list enb_node_list, Node_list ue_node_list, Data_Flow_Unit omv_data);
|
||||
void omv_end (int pfd, Data_Flow_Unit omv_data);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,43 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2014 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
/*! \file oaisim_config.c
|
||||
* \brief Configuration of oaisim
|
||||
* \author Navid Nikaein & Andre Gomes (One source)
|
||||
* \date 2014
|
||||
* \version 1.0
|
||||
* \company Eurecom
|
||||
* \email: openair_tech@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
@@ -165,7 +205,7 @@ mapping packet_gen_names[] =
|
||||
{NULL, -1}
|
||||
};
|
||||
|
||||
void init_oai_emulation() {
|
||||
void init_oai_emulation(void) {
|
||||
|
||||
int i;
|
||||
|
||||
@@ -195,7 +235,6 @@ void init_oai_emulation() {
|
||||
oai_emulation.environment_system_config.system_bandwidth_MB = 7.68;
|
||||
oai_emulation.environment_system_config.system_frequency_GHz = 1.9;
|
||||
|
||||
|
||||
oai_emulation.topology_config.area.x_m = 500;
|
||||
oai_emulation.topology_config.area.y_m = 500;
|
||||
oai_emulation.topology_config.network_type.selected_option = "homogeneous";
|
||||
@@ -218,6 +257,8 @@ void init_oai_emulation() {
|
||||
oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_journey_time_ms = 10.0;
|
||||
oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option = "STATIC";
|
||||
oai_emulation.topology_config.mobility.eNB_mobility.eNB_initial_distribution.selected_option = "random";
|
||||
oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_x = 1;
|
||||
oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_y = 1;
|
||||
oai_emulation.topology_config.mobility.eNB_mobility.random_eNB_distribution.number_of_cells = 1;
|
||||
oai_emulation.topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.number_of_cells = 1;
|
||||
oai_emulation.topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.inter_eNB_distance_km = 1;
|
||||
@@ -338,6 +379,7 @@ void init_oai_emulation() {
|
||||
oai_emulation.info.omv_enabled =0; // v flag
|
||||
oai_emulation.info.vcd_enabled=0;
|
||||
oai_emulation.info.opp_enabled=0;
|
||||
oai_emulation.info.oeh_enabled=0;
|
||||
|
||||
oai_emulation.info.cba_group_active=0;
|
||||
oai_emulation.info.eMBMS_active_state=0;
|
||||
@@ -392,7 +434,7 @@ void init_oai_emulation() {
|
||||
}
|
||||
|
||||
|
||||
void oaisim_config() {
|
||||
void oaisim_config(void) {
|
||||
|
||||
// init log gen first
|
||||
//initialize the log generator
|
||||
@@ -436,7 +478,7 @@ void oaisim_config() {
|
||||
}
|
||||
}
|
||||
|
||||
int olg_config() {
|
||||
int olg_config(void) {
|
||||
int comp;
|
||||
int ocg_log_level = map_str_to_int(log_level_names, oai_emulation.emulation_config.log_emu.level);
|
||||
int ocg_log_verbosity = map_str_to_int(log_verbosity_names, oai_emulation.emulation_config.log_emu.verbosity);
|
||||
@@ -510,7 +552,7 @@ int olg_config() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ocg_config_env() {
|
||||
int ocg_config_env(void) {
|
||||
// int func related to channel desc from oaisim.c could be moved here
|
||||
|
||||
if (oai_emulation.info.ocg_enabled){
|
||||
@@ -531,7 +573,7 @@ int ocg_config_env() {
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
int ocg_config_topo() {
|
||||
int ocg_config_topo(void) {
|
||||
|
||||
// omg
|
||||
init_omg_global_params();
|
||||
@@ -571,8 +613,13 @@ int ocg_config_topo() {
|
||||
LOG_I(OMG,"TRACE file at %s\n", omg_param_list.mobility_file);
|
||||
}
|
||||
|
||||
omg_param_list.mobility_type = oai_emulation.info.omg_model_enb;
|
||||
omg_param_list.mobility_type = oai_emulation.info.omg_model_enb;
|
||||
omg_param_list.nodes_type = eNB; //eNB or eNB + RN
|
||||
if (strcmp(oai_emulation.topology_config.mobility.eNB_mobility.eNB_initial_distribution.selected_option, "fixed") == 0) {
|
||||
omg_param_list.user_fixed = true;
|
||||
omg_param_list.fixed_X = (double)oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_x;
|
||||
omg_param_list.fixed_Y = (double)oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_y;
|
||||
}
|
||||
omg_param_list.nodes = oai_emulation.info.nb_enb_local + oai_emulation.info.nb_rn_local;
|
||||
omg_param_list.seed = oai_emulation.info.seed; // specific seed for enb and ue to avoid node overlapping
|
||||
|
||||
@@ -1057,7 +1104,7 @@ g_otg->application_idx[source_id_index][destination_id_index]+=1;
|
||||
|
||||
|
||||
|
||||
int ocg_config_emu(){
|
||||
int ocg_config_emu(void){
|
||||
|
||||
if (oai_emulation.emulation_config.emulation_time_ms != 0) {
|
||||
oai_emulation.info.n_frames = (int) oai_emulation.emulation_config.emulation_time_ms / 10; // configure the number of frame
|
||||
@@ -1083,6 +1130,9 @@ int ocg_config_emu(){
|
||||
oai_emulation.info.cli_start_ue[0]);
|
||||
}
|
||||
|
||||
if (oai_emulation.info.opp_enabled)
|
||||
opp_enabled = 1;
|
||||
|
||||
//bin/LOG_I(OCG, "OPT output file directory = %s\n", oai_emulation.info.output_path);
|
||||
oai_emulation.info.opt_enabled = ( oai_emulation.emulation_config.packet_trace.enabled == 0) ? oai_emulation.info.opt_enabled : oai_emulation.emulation_config.packet_trace.enabled;
|
||||
if (oai_emulation.info.opt_enabled == 1) {
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
|
||||
/*! \file oaisim_config.h
|
||||
* \brief configure an emulation
|
||||
* \author Lusheng Wang
|
||||
* \author navid nikaein & Lusheng Wang
|
||||
* \date 2006-2010
|
||||
* \version 4.0
|
||||
* \company Eurecom
|
||||
* \email: wangl@eurecom.fr
|
||||
* \email: openair_tech@eurecom.fr
|
||||
* \note this a note
|
||||
* \bug this is a bug
|
||||
* \warning this is a warning
|
||||
@@ -59,19 +59,20 @@ The current sturcture of oaisim is shown by the figure.
|
||||
#include "UTIL/OMG/omg.h"
|
||||
#include "UTIL/CLI/cli_if.h"
|
||||
#include "SIMULATION/ETH_TRANSPORT/defs.h"
|
||||
#include "PHY/defs.h"
|
||||
|
||||
/** @defgroup _init_oai Initial oaisim
|
||||
* @ingroup _fn
|
||||
* @brief Initialize all the parameters before start an emulation
|
||||
* @{*/
|
||||
void init_oai_emulation();
|
||||
void init_oai_emulation(void);
|
||||
/* @}*/
|
||||
|
||||
/** @defgroup _config_oaisim All the configurations for an emulation
|
||||
* @ingroup _fn
|
||||
* @brief This is the function that calls all the other configuration functions
|
||||
* @{*/
|
||||
void oaisim_config();
|
||||
void oaisim_config(void);
|
||||
/* @}*/
|
||||
|
||||
|
||||
@@ -79,11 +80,11 @@ void oaisim_config();
|
||||
* @ingroup _fn
|
||||
* @brief There are the functions to configure different various modules in the emulator
|
||||
* @{*/
|
||||
int olg_config();
|
||||
int ocg_config_env();
|
||||
int ocg_config_omg();
|
||||
int ocg_config_topo();
|
||||
int ocg_config_app();
|
||||
int ocg_config_emu();
|
||||
int olg_config(void);
|
||||
int ocg_config_env(void);
|
||||
int ocg_config_omg(void);
|
||||
int ocg_config_topo(void);
|
||||
int ocg_config_app(void);
|
||||
int ocg_config_emu(void);
|
||||
/* @}*/
|
||||
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2014 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
@@ -137,6 +167,7 @@ void get_simulation_options(int argc, char *argv[]) {
|
||||
|
||||
LONG_OPTION_PDNC_PERIOD,
|
||||
LONG_OPTION_OMG_PERIOD,
|
||||
LONG_OPTION_OEH_ENABLED,
|
||||
|
||||
LONG_OPTION_ENB_RAL_LISTENING_PORT,
|
||||
LONG_OPTION_ENB_RAL_IP_ADDRESS,
|
||||
@@ -160,8 +191,9 @@ void get_simulation_options(int argc, char *argv[]) {
|
||||
static struct option long_options[] = {
|
||||
{"enb-conf", required_argument, 0, LONG_OPTION_ENB_CONF},
|
||||
|
||||
{"pdcp_period", required_argument, 0, LONG_OPTION_PDNC_PERIOD},
|
||||
{"omg_period", required_argument, 0, LONG_OPTION_OMG_PERIOD},
|
||||
{"pdcp-period", required_argument, 0, LONG_OPTION_PDNC_PERIOD},
|
||||
{"omg-period", required_argument, 0, LONG_OPTION_OMG_PERIOD},
|
||||
{"oeh-enabled", no_argument, 0, LONG_OPTION_OEH_ENABLED},
|
||||
|
||||
{"enb-ral-listening-port", required_argument, 0, LONG_OPTION_ENB_RAL_LISTENING_PORT},
|
||||
{"enb-ral-ip-address", required_argument, 0, LONG_OPTION_ENB_RAL_IP_ADDRESS},
|
||||
@@ -180,6 +212,7 @@ void get_simulation_options(int argc, char *argv[]) {
|
||||
{"ue-mihf-remote-port", required_argument, 0, LONG_OPTION_UE_MIHF_REMOTE_PORT},
|
||||
{"ue-mihf-ip-address", required_argument, 0, LONG_OPTION_UE_MIHF_IP_ADDRESS},
|
||||
{"ue-mihf-id", required_argument, 0, LONG_OPTION_UE_MIHF_ID},
|
||||
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
@@ -205,7 +238,10 @@ void get_simulation_options(int argc, char *argv[]) {
|
||||
printf("OMG period is %d\n", omg_period);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case LONG_OPTION_OEH_ENABLED:
|
||||
oai_emulation.info.oeh_enabled = 1;
|
||||
break;
|
||||
#if defined(ENABLE_RAL)
|
||||
case LONG_OPTION_ENB_RAL_LISTENING_PORT:
|
||||
if (optarg) {
|
||||
@@ -475,11 +511,11 @@ void get_simulation_options(int argc, char *argv[]) {
|
||||
}
|
||||
oai_emulation.info.opt_mode = opt_type;
|
||||
break;
|
||||
case 'q':
|
||||
// openair performane profiler
|
||||
oai_emulation.info.opp_enabled = 1; // this var is used for OCG
|
||||
opp_enabled = 1; // this is the global var used by oaisim
|
||||
break;
|
||||
case 'q':
|
||||
// openair performane profiler
|
||||
oai_emulation.info.opp_enabled = 1; // this var is used for OCG
|
||||
opp_enabled = 1; // this is the global var used by oaisim
|
||||
break;
|
||||
case 'Q':
|
||||
//eMBMS_active=1;
|
||||
// 0 : not used (default), 1: eMBMS and RRC enabled, 2: eMBMS relaying and RRC enabled, 3: eMBMS enabled, RRC disabled, 4: eMBMS relaying enabled, RRC disabled
|
||||
@@ -512,7 +548,7 @@ void get_simulation_options(int argc, char *argv[]) {
|
||||
break;
|
||||
|
||||
case 't':
|
||||
target_ul_mcs = atoi (optarg);
|
||||
target_ul_mcs = atoi (optarg);
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
|
||||
Reference in New Issue
Block a user