diff --git a/CMakeLists.txt b/CMakeLists.txt index b602939345..2e14f7fe10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -737,7 +737,6 @@ include_directories("${OPENAIR2_DIR}/UTIL/OSA") include_directories("${OPENAIR2_DIR}/UTIL/MEM") include_directories("${OPENAIR2_DIR}/UTIL/LISTS") include_directories("${OPENAIR2_DIR}/UTIL/FIFO") -include_directories("${OPENAIR2_DIR}/UTIL/OCG") include_directories("${OPENAIR2_DIR}/UTIL/MATH") include_directories("${OPENAIR2_DIR}/UTIL/TIMER") include_directories("${OPENAIR2_DIR}/UTIL/OMG") diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index 84c70c3767..a620dfa5c5 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -460,7 +460,6 @@ int logInit (void) register_log_component("OTG_GP","dat",OTG_GP); register_log_component("OTG_GP_BG","dat",OTG_GP_BG); register_log_component("OTG_JITTER","dat",OTG_JITTER); - register_log_component("OCG","",OCG); register_log_component("PERF","",PERF); register_log_component("OIP","",OIP); register_log_component("OCM","log",OCM); diff --git a/common/utils/LOG/log.h b/common/utils/LOG/log.h index 40e8a17d8c..e2c551f648 100644 --- a/common/utils/LOG/log.h +++ b/common/utils/LOG/log.h @@ -197,7 +197,6 @@ typedef enum { MAC, EMU, SIM, - OCG, OMG, OPT, OTG, diff --git a/common/utils/T/T_messages.txt b/common/utils/T/T_messages.txt index 97185aa138..c535f36f5e 100644 --- a/common/utils/T/T_messages.txt +++ b/common/utils/T/T_messages.txt @@ -801,27 +801,6 @@ ID = LEGACY_OTG_TRACE GROUP = ALL:LEGACY_OTG:LEGACY_GROUP_TRACE:LEGACY FORMAT = string,log -ID = LEGACY_OCG_INFO - DESC = OCG legacy logs - info level - GROUP = ALL:LEGACY_OCG:LEGACY_GROUP_INFO:LEGACY - FORMAT = string,log -ID = LEGACY_OCG_ERROR - DESC = OCG legacy logs - error level - GROUP = ALL:LEGACY_OCG:LEGACY_GROUP_ERROR:LEGACY - FORMAT = string,log -ID = LEGACY_OCG_WARNING - DESC = OCG legacy logs - warning level - GROUP = ALL:LEGACY_OCG:LEGACY_GROUP_WARNING:LEGACY - FORMAT = string,log -ID = LEGACY_OCG_DEBUG - DESC = OCG legacy logs - debug level - GROUP = ALL:LEGACY_OCG:LEGACY_GROUP_DEBUG:LEGACY - FORMAT = string,log -ID = LEGACY_OCG_TRACE - DESC = OCG legacy logs - trace level - GROUP = ALL:LEGACY_OCG:LEGACY_GROUP_TRACE:LEGACY - FORMAT = string,log - ID = LEGACY_OCM_INFO DESC = OCM legacy logs - info level GROUP = ALL:LEGACY_OCM:LEGACY_GROUP_INFO:LEGACY diff --git a/doc/Doxyfile b/doc/Doxyfile index 7579fa56bf..6a4dd850a3 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -986,9 +986,6 @@ INPUT = \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/ASYNC_IF/ringbuffer_queue.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/ASYNC_IF/message_queue.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/ASYNC_IF/link_manager.c \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OCG/OCG.h \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OCG/OCG_extern.h \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OCG/OCG_vars.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/LISTS/list.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/LISTS/list.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/LISTS/list2.c \ diff --git a/openair1/PHY/CODING/TESTBENCH/ltetest.c b/openair1/PHY/CODING/TESTBENCH/ltetest.c index 414c636a31..56053f7784 100644 --- a/openair1/PHY/CODING/TESTBENCH/ltetest.c +++ b/openair1/PHY/CODING/TESTBENCH/ltetest.c @@ -32,7 +32,6 @@ #include "SCHED/defs.h" #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "OCG_vars.h" #include "UTIL/LOG/log.h" diff --git a/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c b/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c index 9d209043fd..d0f0eab4a6 100644 --- a/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c +++ b/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c @@ -35,8 +35,6 @@ #include "defs.h" #include "extern.h" #include "proto.h" -#include "UTIL/OCG/OCG.h" -#include "UTIL/OCG/OCG_extern.h" #include "UTIL/LOG/log.h" #include "UTIL/LOG/vcd_signal_dumper.h" #include "openair1/SIMULATION/ETH_TRANSPORT/extern.h" diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index e8a06f9e88..f8b1e359e5 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -52,7 +52,6 @@ #include "SCHED/sched_eNB.h" #include "SCHED_UE/sched_UE.h" #include "SIMULATION/TOOLS/sim.h" -#include "OCG_vars.h" #include "unitary_defs.h" #include "dummy_functions.c" #include "executables/thread-common.h" diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c index d6a248059c..9a086e1a7f 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c @@ -48,7 +48,6 @@ #include "SCHED/defs.h" #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "OCG_vars.h" #include "UTIL/LOG/log.h" #include "UTIL/LISTS/list.h" diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c index 547d2cfa28..7092fd9d1e 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c @@ -45,7 +45,6 @@ #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "OCG_vars.h" #include "UTIL/LOG/log.h" #include "UTIL/LISTS/list.h" diff --git a/openair1/SIMULATION/LTE_PHY/framegen.c b/openair1/SIMULATION/LTE_PHY/framegen.c index 9203f0a095..74f76e56b9 100644 --- a/openair1/SIMULATION/LTE_PHY/framegen.c +++ b/openair1/SIMULATION/LTE_PHY/framegen.c @@ -28,7 +28,6 @@ #include "PHY/defs.h" #include "PHY/vars.h" #include "SCHED/extern.h" -#include "OCG_vars.h" #include "MAC_INTERFACE/vars.h" #ifdef IFFT_FPGA #include "PHY/LTE_REFSIG/mod_table.h" diff --git a/openair1/SIMULATION/LTE_PHY/mbmssim.c b/openair1/SIMULATION/LTE_PHY/mbmssim.c index 33d9a58def..accb6004f8 100644 --- a/openair1/SIMULATION/LTE_PHY/mbmssim.c +++ b/openair1/SIMULATION/LTE_PHY/mbmssim.c @@ -45,7 +45,6 @@ #include "SCHED/sched_eNB.h" #include "LAYER2/MAC/mac_vars.h" -#include "OCG_vars.h" #include "common/utils/LOG/log.h" #include "UTIL/LISTS/list.h" diff --git a/openair1/SIMULATION/LTE_PHY/pbchsim.c b/openair1/SIMULATION/LTE_PHY/pbchsim.c index 71286faafb..7d8d8e88f5 100644 --- a/openair1/SIMULATION/LTE_PHY/pbchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pbchsim.c @@ -40,8 +40,6 @@ #include "PHY/TOOLS/lte_phy_scope.h" #endif -#include "OCG_vars.h" - #include "unitary_defs.h" PHY_VARS_eNB *eNB,*eNB1,*eNB2; diff --git a/openair1/SIMULATION/LTE_PHY/pdcchsim.c b/openair1/SIMULATION/LTE_PHY/pdcchsim.c index 50910290c3..494c9bbde6 100644 --- a/openair1/SIMULATION/LTE_PHY/pdcchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pdcchsim.c @@ -31,7 +31,6 @@ #include "SCHED/defs.h" #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "OCG_vars.h" #ifdef XFORMS #include "PHY/TOOLS/lte_phy_scope.h" diff --git a/openair1/SIMULATION/LTE_PHY/prachsim.c b/openair1/SIMULATION/LTE_PHY/prachsim.c index 229764a893..0619facf3e 100644 --- a/openair1/SIMULATION/LTE_PHY/prachsim.c +++ b/openair1/SIMULATION/LTE_PHY/prachsim.c @@ -31,8 +31,6 @@ #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "OCG_vars.h" - #include "unitary_defs.h" int current_dlsch_cqi; //FIXME! diff --git a/openair1/SIMULATION/LTE_PHY/pucchsim.c b/openair1/SIMULATION/LTE_PHY/pucchsim.c index 083a756afb..fd0e0e44aa 100644 --- a/openair1/SIMULATION/LTE_PHY/pucchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pucchsim.c @@ -31,7 +31,6 @@ #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "OCG_vars.h" #include "UTIL/LOG/log_extern.h" #include "unitary_defs.h" diff --git a/openair1/SIMULATION/LTE_PHY/scansim.c b/openair1/SIMULATION/LTE_PHY/scansim.c index 839d30a8de..9660e2343e 100644 --- a/openair1/SIMULATION/LTE_PHY/scansim.c +++ b/openair1/SIMULATION/LTE_PHY/scansim.c @@ -41,8 +41,6 @@ #include "PHY/TOOLS/lte_phy_scope.h" #endif -#include "OCG_vars.h" - #define BW 20.0 diff --git a/openair1/SIMULATION/LTE_PHY/syncsim.c b/openair1/SIMULATION/LTE_PHY/syncsim.c index 97336c509d..02f6f0a63b 100644 --- a/openair1/SIMULATION/LTE_PHY/syncsim.c +++ b/openair1/SIMULATION/LTE_PHY/syncsim.c @@ -50,7 +50,6 @@ #endif //XFORMS -#include "OCG_vars.h" #include "openair_hw.h" #define BW 5.0 diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 8be518e14a..a0286ad719 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -45,7 +45,6 @@ #include "SCHED/sched_eNB.h" #include "SCHED_UE/sched_UE.h" #include "SIMULATION/TOOLS/sim.h" -#include "OCG_vars.h" #include "unitary_defs.h" #include "dummy_functions.c" #include "nfapi/oai_integration/vendor_ext.h" diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index 59e8a988a2..cd346ded3a 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -46,7 +46,6 @@ #include "PHY/NR_TRANSPORT/nr_transport_common_proto.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "nr_unitary_defs.h" -#include "OCG_vars.h" #include #include #include diff --git a/openair1/SIMULATION/TOOLS/channel_sim.c b/openair1/SIMULATION/TOOLS/channel_sim.c index 9cf08fa5a3..048cf5de64 100644 --- a/openair1/SIMULATION/TOOLS/channel_sim.c +++ b/openair1/SIMULATION/TOOLS/channel_sim.c @@ -35,7 +35,6 @@ #include "common/utils/LOG/log.h" #include "PHY_INTERFACE/phy_interface_extern.h" -#include "UTIL/OCG/OCG.h" #include "UTIL/OPT/opt.h" // to test OPT #include "common/ran_context.h" diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index b7cbac4256..badcd36cc6 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -39,8 +39,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "RRC/LTE/rrc_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index 12f37c3b68..40eeacfaec 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -43,8 +43,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" #include "RRC/LTE/rrc_extern.h" diff --git a/openair2/LAYER2/MAC/eNB_scheduler_bch.c b/openair2/LAYER2/MAC/eNB_scheduler_bch.c index 5966f5c10b..a51aca96b9 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_bch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_bch.c @@ -35,8 +35,6 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "RRC/LTE/rrc_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 2cd1a4167f..395803b5f5 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -38,9 +38,8 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" +#include "PHY/defs_eNB.h" #include "RRC/LTE/rrc_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 9a939f7627..118de4f7f8 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -35,6 +35,7 @@ #include "PHY/phy_extern.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" +#include "PHY/defs_eNB.h" #include "SIMULATION/TOOLS/sim.h" #include "LAYER2/MAC/mac_proto.h" #include "LAYER2/MAC/mac_extern.h" @@ -43,8 +44,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "rlc.h" #include "common/utils/lte/prach_utils.h" diff --git a/openair2/LAYER2/MAC/eNB_scheduler_mch.c b/openair2/LAYER2/MAC/eNB_scheduler_mch.c index ff8607a2db..9cdc72a558 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_mch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_mch.c @@ -37,8 +37,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" #include "RRC/LTE/rrc_extern.h" diff --git a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c index 9ade5eb8b2..db04ab143f 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c @@ -42,8 +42,6 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "SIMULATION/TOOLS/sim.h" // for taus diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index e2809b6ca3..6dedc0e47b 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -39,8 +39,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "RRC/LTE/rrc_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 4832456915..1372cb7276 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -38,9 +38,8 @@ #include "common/utils/LOG/vcd_signal_dumper.h" #include "nfapi/oai_integration/vendor_ext.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" +#include "PHY/defs_eNB.h" #include "RRC/LTE/rrc_extern.h" #include "RRC/LTE/rrc_eNB_UE_context.h" diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index e9ed99160e..64e5822071 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -40,8 +40,6 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "RRC/LTE/rrc_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "rlc.h" diff --git a/openair2/LAYER2/MAC/ra_procedures.c b/openair2/LAYER2/MAC/ra_procedures.c index af68cebbe1..0917e0a1bc 100644 --- a/openair2/LAYER2/MAC/ra_procedures.c +++ b/openair2/LAYER2/MAC/ra_procedures.c @@ -42,8 +42,6 @@ #include "common/utils/LOG/log.h" #include "nfapi/oai_integration/vendor_ext.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "SIMULATION/TOOLS/sim.h" // for taus #include "PHY/LTE_TRANSPORT/transport_common_proto.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h" diff --git a/openair2/LAYER2/MAC/rar_tools.c b/openair2/LAYER2/MAC/rar_tools.c index 740923cc08..b608ea03a1 100644 --- a/openair2/LAYER2/MAC/rar_tools.c +++ b/openair2/LAYER2/MAC/rar_tools.c @@ -33,8 +33,6 @@ #include "mac_extern.h" #include "SIMULATION/TOOLS/sim.h" #include "common/utils/LOG/log.h" -#include "OCG.h" -#include "OCG_extern.h" #include "UTIL/OPT/opt.h" #include "common/ran_context.h" diff --git a/openair2/LAYER2/MAC/rar_tools_ue.c b/openair2/LAYER2/MAC/rar_tools_ue.c index 9af5baec39..1ab9bbd644 100644 --- a/openair2/LAYER2/MAC/rar_tools_ue.c +++ b/openair2/LAYER2/MAC/rar_tools_ue.c @@ -33,8 +33,6 @@ #include "mac_extern.h" #include "SIMULATION/TOOLS/sim.h" #include "common/utils/LOG/log.h" -#include "OCG.h" -#include "OCG_extern.h" #include "UTIL/OPT/opt.h" #include "common/ran_context.h" diff --git a/openair2/LAYER2/MAC/ue_procedures.c b/openair2/LAYER2/MAC/ue_procedures.c index 44ba53c1db..d7fd5d23dd 100644 --- a/openair2/LAYER2/MAC/ue_procedures.c +++ b/openair2/LAYER2/MAC/ue_procedures.c @@ -45,8 +45,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "openair2/PHY_INTERFACE/phy_stub_UE.h" #include "pdcp.h" diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 895f0bd0dc..c641bf4d15 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -39,8 +39,6 @@ #include "common/utils/nr/nr_common.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "RRC/NR/nr_rrc_extern.h" diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 8db40a26c7..3224223631 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -38,7 +38,6 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" #include "RRC/NR/nr_rrc_extern.h" #include "common/utils/nr/nr_common.h" diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 251566f64b..740aa40a12 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -41,8 +41,6 @@ #include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/nr/nr_common.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h" diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index c5eadf0a34..b0b4e235c6 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -40,8 +40,6 @@ #include "LAYER2/MAC/mac_extern.h" #include "RRC/LTE/rrc_proto.h" #include "pdcp_primitives.h" -#include "OCG.h" -#include "OCG_extern.h" #include "otg_rx.h" #include "common/utils/LOG/log.h" #include diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index a909343965..11ee36669b 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -51,8 +51,6 @@ extern int otg_enabled; #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "NETWORK_DRIVER/LITE/constant.h" //#include "SIMULATION/ETH_TRANSPORT/extern.h" -#include "UTIL/OCG/OCG.h" -#include "UTIL/OCG/OCG_extern.h" #include "common/utils/LOG/log.h" #include "UTIL/OTG/otg_tx.h" #include "nfapi/oai_integration/vendor_ext.h" diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c index 0bd1b8fa8d..b832fee136 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c @@ -54,8 +54,6 @@ #include "common/utils/LOG/log.h" #include "common/utils/system.h" -#include "UTIL/OCG/OCG.h" -#include "UTIL/OCG/OCG_extern.h" #include "LAYER2/MAC/mac_extern.h" #include "pdcp.h" diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index d9feb95590..f30dc1932e 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -59,6 +59,7 @@ #include "LTE_SL-CommConfig-r12.h" #include "LTE_PeriodicBSR-Timer-r12.h" #include "LTE_RetxBSR-Timer-r12.h" +#include "PHY/defs_eNB.h" #include "LTE_BCCH-BCH-Message-MBMS.h" #include "LTE_BCCH-DL-SCH-Message-MBMS.h" @@ -79,8 +80,6 @@ #include "RRC/NAS/nas_config.h" #include "RRC/NAS/rb_config.h" -#include "OCG.h" -#include "OCG_extern.h" #include "UTIL/OSA/osa_defs.h" diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 00ff6f39cc..45a1879146 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -74,8 +74,6 @@ #include "RRC/NAS/nas_config.h" #include "RRC/NAS/rb_config.h" -#include "OCG.h" -#include "OCG_extern.h" #include "UTIL/OSA/osa_defs.h" diff --git a/openair2/UTIL/CLI/cli_cmd.c b/openair2/UTIL/CLI/cli_cmd.c index a490255574..021c7c0b97 100644 --- a/openair2/UTIL/CLI/cli_cmd.c +++ b/openair2/UTIL/CLI/cli_cmd.c @@ -31,8 +31,6 @@ #include "cli.h" -#include "OCG.h" -#include "OCG_extern.h" #include "log.h" #include "log_extern.h" diff --git a/openair2/UTIL/MATH/oml.h b/openair2/UTIL/MATH/oml.h index 70f677a559..abdc8fbf09 100644 --- a/openair2/UTIL/MATH/oml.h +++ b/openair2/UTIL/MATH/oml.h @@ -20,7 +20,7 @@ */ /*! \file oml.h -* \brief Data structure for OCG of OpenAir emulator +* \brief Data structure for OML * \author N. Nikaein and A. Hafsaoui * \date 2011 * \version 1.0 diff --git a/openair2/UTIL/OCG/.directory b/openair2/UTIL/OCG/.directory deleted file mode 100644 index 7e667a51d7..0000000000 --- a/openair2/UTIL/OCG/.directory +++ /dev/null @@ -1,3 +0,0 @@ -[Dolphin] -Sorting=6 -Timestamp=2011,2,7,10,19,55 diff --git a/openair2/UTIL/OCG/Doxyfile b/openair2/UTIL/OCG/Doxyfile deleted file mode 100644 index 5f58666d6e..0000000000 --- a/openair2/UTIL/OCG/Doxyfile +++ /dev/null @@ -1,231 +0,0 @@ -# Doxyfile 1.5.3 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = OpenAirInterface -PROJECT_NUMBER = V1.0 -OUTPUT_DIRECTORY = -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -EXTRACT_ANON_NSPACES = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = OCG.h OCG_vars.h OCG_extern.h OCG_get_opt.h OCG_detect_file.h OCG_parse_filename.h OCG_create_dir.h OCG_parse_XML.h OCG_save_XML.h OCG_generate_report.h Readme.doxy -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = -RECURSIVE = NO -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = images/ -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -HTML_DYNAMIC_SECTIONS = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = YES -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -MSCGEN_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = YES -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = /usr/bin/dot -DOTFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/openair2/UTIL/OCG/OCG.c b/openair2/UTIL/OCG/OCG.c deleted file mode 100644 index c3665c93f5..0000000000 --- a/openair2/UTIL/OCG/OCG.c +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG.c -* \brief Main function containing the FSM of OCG -* \author Navid Nikaein and Lusheng Wang -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#include -#include -#include "OCG.h" -#include "OCG_vars.h" -#include "OCG_detect_file.h" -#include "OCG_parse_filename.h" -#include "OCG_create_dir.h" -#include "OCG_parse_XML.h" -#include "OCG_save_XML.h" -#include "OCG_generate_report.h" -#include "UTIL/LOG/log.h" -/*----------------------------------------------------------------------------*/ -//#define TEST_OCG - - - -#ifdef TEST_OCG -int main(int argc, char *argv[]) -{ -#else -int OCG_main(char is_local_server[FILENAME_LENGTH_MAX]) -{ -#endif - int state = STATE_START_OCG; - char web_XML_folder[DIR_LENGTH_MAX] = ""; - char output_dir[DIR_LENGTH_MAX] = ""; // the output folder during the OCG procedure. Change step by step - - char *OPENAIR_TARGETS=getenv("OPENAIR_TARGETS"); - - if (OPENAIR_TARGETS == NULL) { - LOG_E(OCG, "please set the PATH for OPENAIR_TARGETS"); - exit(EXIT_FAILURE); - } - - if (!strcmp(is_local_server, "0")) { // Eurecom web server - strcpy(web_XML_folder, WEB_XML_FOLDER); - strcat(output_dir, OUTPUT_DIR); - } else { // local user - - sprintf(web_XML_folder,"%s/SIMU/EXAMPLES/OSD/WEBXML/",getenv("OPENAIR_TARGETS")); - sprintf(output_dir,"%s/SIMU/EXAMPLES/OSD/RESULTS/",getenv("OPENAIR_TARGETS")); - /* - strcpy(web_XML_folder, OPENAIR_TARGETS); - strcpy(output_dir, OPENAIR_TARGETS); - - char *slash; - slash = web_XML_folder + strlen(web_XML_folder) - 1; - if (strcmp(slash, "/")) { // check if the path OPENAIR_TARGETS is ended with a '/' - strcat(web_XML_folder, "/"); - strcat(output_dir, "/"); - } - strcat(web_XML_folder, "SIMU/EXAMPLES/OSD/WEBXML/"); - strcat(output_dir, "SIMU/EXAMPLES/OSD/RESULTS/"); - */ - } - - LOG_I(OCG, "Folder for detecting the XML configuration file is %s\n", web_XML_folder); - LOG_I(OCG, "Folder for generating the results is %s\n", output_dir); - LOG_I(OCG, "OSD XML config file is %s\n", is_local_server); - - - while(state != STATE_END) { - - switch(state) { - - case STATE_START_OCG : - LOG_I(OCG, "OCG starts ...\n\n"); - get_opt_OK = MODULE_NOT_PROCESSED; // -9999 is the initial value, representing the module not processed - detect_file_OK = MODULE_NOT_PROCESSED; - create_dir_OK = MODULE_NOT_PROCESSED; - - // to write the pid into a file 'OCG.pid' so that the web portal part could check if OCG is running - /* - pid_t pid; - pid = getpid(); - FILE *OCG_pid; - OCG_pid = fopen("OCG.pid", "w"); - fprintf(OCG_pid, "%d\n", pid); - fclose(OCG_pid); - */ -#ifdef TEST_OCG - state = STATE_GET_OPT; - - case STATE_GET_OPT : - get_opt_OK = get_opt(argc, argv); - - if (get_opt_OK == MODULE_OK) { - strcpy(src_file, LOCAL_XML_FOLDER); - copy_or_move = 1; - state = STATE_INI_EMU; - } else if (get_opt_OK == GET_HELP) state = STATE_END; - else state = STATE_DETECT_FILE; - - break; -#else - state = STATE_DETECT_FILE; - //get_opt_OK == MODULE_OK; -#endif - - case STATE_DETECT_FILE : - strcpy(src_file, web_XML_folder); - detect_file_OK = detect_file(src_file, is_local_server); - - if (detect_file_OK == MODULE_OK) { - if ((!strcmp(is_local_server, "0")) || (!strcmp(is_local_server, "-1"))) copy_or_move = 2; - - state = STATE_INI_EMU; - } else if (detect_file_OK == MODULE_ERROR) state = STATE_GENERATE_REPORT; - else if (detect_file_OK == NO_FILE) { - state = STATE_DETECT_FILE; - sleep(1); - } - - break; - - case STATE_INI_EMU : // before initiating an emu, an XML file should be found above - parse_filename_OK = MODULE_NOT_PROCESSED; - create_dir_OK = MODULE_NOT_PROCESSED; - parse_XML_OK = MODULE_NOT_PROCESSED; - save_XML_OK = MODULE_NOT_PROCESSED; - // call_emu_OK = MODULE_NOT_PROCESSED; - //config_mobi_OK = MODULE_NOT_PROCESSED; - generate_report_OK = MODULE_NOT_PROCESSED; - - LOG_I(OCG, "An emulation for file %s is initiated\n", filename); - state = STATE_PARSE_FILENAME; - break; - - case STATE_PARSE_FILENAME : - strcat(src_file, filename); - - if ((parse_filename_OK = parse_filename(filename)) == MODULE_OK) state = STATE_CREATE_DIR; - else { - if (copy_or_move == 2) { - remove(src_file); - state = STATE_DETECT_FILE; - } else state = STATE_GENERATE_REPORT; - } - - break; - - case STATE_CREATE_DIR : - if ((create_dir_OK = create_dir(output_dir, user_name, file_date)) == MODULE_OK) { - state = STATE_PARSE_XML; - strcat(output_dir, user_name); - strcat(output_dir, "/"); - strcat(output_dir, file_date); - strcat(output_dir, "/"); - strcpy(dst_dir, output_dir); - oai_emulation.info.output_path = dst_dir; // information for other modules within OAI - } else state = STATE_GENERATE_REPORT; - - break; - - case STATE_PARSE_XML : - if ((parse_XML_OK = parse_XML(src_file)) == MODULE_OK) state = STATE_SAVE_XML; - else { - if (copy_or_move == 2) remove(src_file); - - state = STATE_GENERATE_REPORT; - } - - break; - - case STATE_SAVE_XML : - if ((save_XML_OK = save_XML(copy_or_move, src_file, output_dir, filename)) == MODULE_OK) - state = STATE_CALL_EMU; - else state = STATE_GENERATE_REPORT; - - break; - - case STATE_CALL_EMU : // change this state to set_params - - if ((detect_file_OK == MODULE_OK) && (parse_filename_OK == MODULE_OK) && (create_dir_OK == MODULE_OK) && (parse_XML_OK == MODULE_OK) && (save_XML_OK == MODULE_OK)) { - // if the above tasks are all successful, we could tell the oaisim_config.c that everything is ready before running the emulation - oai_emulation.info.ocg_ok = 1; - } - -#ifdef TEST_OCG - call_emu_OK = call_emu(output_dir); - // config_mobi_OK = config_mobi("RWMEmulator.xml", filename); // generate the XML for Mobigen -#endif - state = STATE_GENERATE_REPORT; - break; - - case STATE_GENERATE_REPORT : - if (create_dir_OK != MODULE_OK) { - // a temp folder is required when the output folder could not be correctly generated - strncpy(output_dir, OPENAIR_TARGETS, sizeof(output_dir)); - output_dir[sizeof(output_dir) - 1] = 0; // terminate string - strncat(output_dir, "SIMU/EXAMPLES/OSD/", sizeof(output_dir) - strlen(output_dir) - 1); - strncat(output_dir, TEMP_OUTPUT_DIR, sizeof(output_dir) - strlen(output_dir) - 1); - struct stat st; - - if(stat(output_dir, &st) != 0) { // if temp output directory does not exist, we create it here - mkdir(output_dir, S_IRWXU | S_IRWXG | S_IRWXO); - LOG_I(OCG, "temp output directory %s is created", output_dir); - } - } else { - //strcat(output_dir, "SCENARIO/STATE/"); // if needeed the outpur directory can be further set - LOG_I(OCG, "Output directory is %s \n", output_dir); - } - - generate_report(output_dir, "OCG_report.xml"); - - if (copy_or_move == 1) state = STATE_END; - else state = STATE_END; - - //else state = STATE_DETECT_FILE; - break; - } - } // end while - - // Cleanup function for the XML library. - xmlCleanupParser(); - // this is to debug memory for regression tests - xmlMemoryDump(); - LOG_I(OCG, "... OCG ends\n\n"); -#ifdef TEST_OCG - return 0; -#else - return 1; -#endif -} - diff --git a/openair2/UTIL/OCG/OCG.h b/openair2/UTIL/OCG/OCG.h deleted file mode 100644 index 452581bb17..0000000000 --- a/openair2/UTIL/OCG/OCG.h +++ /dev/null @@ -1,769 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG.h -* \brief Data structure for OCG of OpenAir emulator -* \author Navid Nikaein, Lusheng Wang and Andre Gomes(One source) -* \date 2011 -* \version 1.0 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -//#include "SIMULATION/TOOLS/defs.h" - - -#ifndef __OCG_H__ -#define __OCG_H__ - -#include "PHY/defs_common.h" -#include "PHY/impl_defs_top.h" -#include "platform_types.h" -# include "s1ap_eNB.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif -/** @defgroup _OCG OpenAir Config Generation (OCG) - * @{*/ -/* @}*/ - -/** @defgroup _useful_macro Macro Definition - * @ingroup _OCG - * @brief the following macros will be used in the code of OCG - * @{*/ -#define MODULE_NOT_PROCESSED -9999 /*!< \brief the module state indicator is set to -9999 before the module being processed */ -#define MODULE_ERROR -1 /*!< \brief the module state indicator is set to -1 for error */ -#define MODULE_OK 0 /*!< \brief the module state indicator is set to 0 when successfully processed */ -#define GET_HELP 1 /*!< \brief the module state indicator is set to 1 for get_opt_OK when the user types -h option */ -#define NO_FILE -2 /*!< \brief the module state indicator is set to -2 for detect_file_OK when no file is detected */ -#define WEB_XML_FOLDER "/nfs/webxml/" /*!< \brief the web portal generates XML files into this folder */ -#define LOCAL_XML_FOLDER "local_XML/" /*!< \brief this folder contains some XML files for demo, users could also put their own XML files into this folder for a direct emulation without using the web portal */ -#define TEMP_OUTPUT_DIR "temp_output/" /*!< \brief temporary output files will be generated in this folder when folders for an emulation could not be created due to errors */ -#define OUTPUT_DIR "/nfs/emu_results/" /*!< \brief this folder contains all the output files when folders for an emulation could be successfully created */ -#define FILENAME_LENGTH_MAX 128 /*!< \brief the maximum length of a filename */ -#define DIR_LENGTH_MAX 128 /*!< \brief the maximum length of the path name */ -#define MOBI_XML_FOLDER "mobi_XML/" /*!< \brief the folder that mobigen generate XML files in */ -#define DIR_TO_MOBIGEN "XML_to_mobigen/" /*!< \brief the folder that mobigen detects XML file from OCG */ - -#define NUMBER_OF_MASTER_MAX 20 - -/* @}*/ - - - -/** @defgroup _enum_fsm OCG Finite State Machine (FSM) - * @ingroup _OCG - * @brief See the flow chart for details - * @{*/ - -/** @defgroup _fsm_flow FSM Flow Chart - * @ingroup _enum_fsm - * @brief This flow chart shows how the FSM works - -There are the following steps the OCG module should contain : -- start OCG -- get option -- detect file -- initiate an emulation -- parse filename -- create directory -- parse XML -- save XML -- call OAI emulator -- generate report -- end OCG - -The following diagram is based on graphviz (http://www.graphviz.org/), you need to install the package to view the diagram. - - * \dot - * digraph ocg_flow_chart { - * node [shape=rect, fontname=Helvetica, fontsize=14,style=filled,fillcolor=lightgrey]; - * a [ label = " start OCG"]; - * b1 [ label = " get option"]; - * b2 [ label = " detect file"]; - * c [ label = " initiate an emulation"]; - * d [ label = " parse filename"]; - * e [ label = " create directory"]; - * f [ label = " parse XML"]; - * g [ label = " save XML"]; - * i [ label = " generate report"]; - * j [ label = " end OCG"]; - * a->b1; - * b1->b2 [ label = "OCG" ]; - * b1->c [ label = "OCG -f filename" ]; - * b1->j [ label = "OCG -h or command wrong" ]; - * b2->c [ label = "file detected" ]; - * b2->b2 [ label = "check every sec" ]; - * c->d; - * d->e [ label = "OK" ]; - * d->i [ label = "error" ]; - * e->f [ label = "OK" ]; - * e->i [ label = "error" ]; - * f->g [ label = "OK" ]; - * f->i [ label = "error" ]; - * g->i [ label = "OK" ]; - * g->i [ label = "error" ]; - * i->b2; - * label = "OCG Flow Chart" - * - * } - * \enddot - */ - -enum { - STATE_START_OCG, /*!< \brief initiate OCG */ - STATE_GET_OPT, /*!< \brief get options of OCG command */ - STATE_DETECT_FILE, /*!< \brief detect the configuration file in folder USER_XML_FOLDER */ - STATE_INI_EMU, /*!< \brief initiate an emulation after finding a configuration file */ - STATE_PARSE_FILENAME, /*!< \brief parse the filename into user_name and file_date */ - STATE_CREATE_DIR, /*!< \brief create directory for current emulation */ - STATE_PARSE_XML, /*!< \brief parse the configuration file */ - STATE_SAVE_XML, /*!< \brief save the configuration file to the created directory */ - STATE_CALL_EMU, /*!< \brief call the emulator */ - STATE_GENERATE_REPORT, /*!< \brief generate some information of OCG */ - STATE_END /*!< \brief lead to an end of the OCG process */ -}; -/* @}*/ - -// the OSD_basic : - - - -typedef struct { - char *selected_option; - int free_space; - int urban; - int rural; -} Large_Scale; - -////// options of generic -typedef struct { - double pathloss_exponent; // default 2 - double pathloss_0_dB; // default -50 dB -} Free_Space_Model_Parameters; - -typedef struct { - char *selected_option; - int SCM_A; //3GPP 36.384 Spatial channel model A - int SCM_B; - int SCM_C; - int SCM_D; - int rayleigh_8tap; // updated to advanced - int ricean_8tap; - int EPA; - int EVA; - int ETU; -} Small_Scale; - -////// options of Ricean_8Tap -typedef struct { - int rice_factor_dB; // default 10 dB -} Ricean_8Tap; - -typedef struct { - double decorrelation_distance_m; // (m), default 100m - double variance_dB; // (dB), default 10dB - double inter_site_correlation; // (0...1), default 1, not yet implemented -} Shadowing; - -typedef struct { - Large_Scale large_scale; - Small_Scale small_scale; - Shadowing shadowing; - - Free_Space_Model_Parameters free_space_model_parameters; - Ricean_8Tap ricean_8tap; -} Fading; - -typedef struct { - int number_of_sectors; /// Number of sectors (1-3), for UE always 1 - double beam_width_dB; /// Antenna 3dB beam width (in radians) (set to 2*M_PI for onmidirectional antennas), for UE always 2*M_PI - double alpha_rad[3]; /// Antenna orientation for each sector (for non-omnidirectional antennas) in radians wrt north - double antenna_gain_dBi; /// Antenna gain (dBi) (same for Tx and Rx) - double tx_power_dBm; /// Tx power (dBm) - double rx_noise_level_dB; /// Rx noise level (dB) - double antenna_orientation_degree[3]; // 3 is the number of sectors for OpenAir // we need think about how to parse it from the XML ?????? -} eNB_Antenna; - -typedef struct { - double antenna_gain_dBi; /// Antenna gain (dBi) (same for Tx and Rx) - double tx_power_dBm; /// Tx power (dBm) - double rx_noise_level_dB; /// Rx noise level (dB) -} UE_Antenna; - -typedef struct { - eNB_Antenna eNB_antenna; - UE_Antenna UE_antenna; -} Antenna; - -/** @defgroup _envi_config Environment Configuration - * @ingroup _OSD_basic - * @brief Including simulation area, geography, topography, fading information, etc - * @{*/ -typedef struct { - Fading fading; - double wall_penetration_loss_dB; - double system_bandwidth_MB; - double system_frequency_GHz; - Antenna antenna; -} Environment_System_Config; -/* @}*/ - - -typedef struct { - double x_m; - double y_m; - //double zz; // for test -} Area; - -typedef struct { - char *selected_option; - int homogeneous; - int heterogeneous; -} Network_Type; - -typedef struct { - char *selected_option; - int macrocell; - int microcell; - int picocell; - int femtocell; -} Cell_Type; - -typedef struct { - int number_of_relays; -} Relay; // may not exist in the XML if RELAY is not selected by the user - -typedef struct { - char *selected_option; - int fixed; // static - int random_waypoint; - int random_walk; - int grid_walk; - int trace; - int sumo; -} UE_Mobility_Type; - -////// options of UE_Mobility_Type -typedef struct { - char *selected_option; - int horizontal_grid; - int vertical_grid; -} Grid_Map; - -typedef struct { - char *selected_option; - int random_destination; // TRIP_RANDOM - int random_turn; // TRIP_NONE -} Grid_Trip_Type; - -typedef struct { - Grid_Map grid_map; - Grid_Trip_Type grid_trip_type; // JHNote: modificaiton -} Grid_Walk; -////// - -typedef struct { - char *selected_option; - int random; - int concentrated; - int grid; -} UE_Initial_Distribution; - -////// options of UE_Initial_Distribution -typedef struct { - int number_of_nodes; -} Random_UE_Distribution; - -typedef struct { - int number_of_nodes; -} Concentrated_UE_Distribution; - -typedef struct { - int number_of_nodes; -} Random_Grid; - -typedef struct { - int number_of_nodes; -} Border_Grid; - -typedef struct { - char *selected_option; - Random_Grid random_grid; // random choice of vertex in Grid_Graph mobility - Border_Grid border_grid; // random choice of vertex located on the border in Grid_Graph mobility -} Grid_UE_Distribution; -////// - -typedef struct { - double min_speed_mps; // m/s - double max_speed_mps; - double min_sleep_ms; - double max_sleep_ms; - double min_journey_time_ms; - double max_journey_time_ms; -} UE_Moving_Dynamics; // now, we use uniform distribution for these dynamics -typedef struct { - char *trace_mobility_file; -} Trace_Configuration; -typedef struct { - char *command; - char *file; //!< 256 bytes memory (see oaisim_config.c) - int start; - int end; - int step; - char *hip; - int hport; -} SUMO_Configuration; -typedef struct { - UE_Mobility_Type UE_mobility_type; - // ! Note: Grid_Walk is a UE_Mobility_Type, we put it here for the sake of simplicity of the XML file - Grid_Walk grid_walk; - - UE_Initial_Distribution UE_initial_distribution; - // ! Note: the following three options are for UE_Initial_Distribution, we put them here for the sake of simplicity of the XML file - Random_UE_Distribution random_UE_distribution; - Concentrated_UE_Distribution concentrated_UE_distribution; - Grid_UE_Distribution grid_UE_distribution; - - UE_Moving_Dynamics UE_moving_dynamics; - Trace_Configuration trace_config; - SUMO_Configuration sumo_config; -} UE_Mobility; - -typedef struct { - char *selected_option; - int fixed; - int mobile; // at this moment, it is OMG who decides this mobility type, so there is even no config of moving dynamics for eNB -} eNB_Mobility_Type; - -typedef struct { - char *selected_option; - int random; - int hexagonal; - int grid; -} eNB_Initial_Distribution; - -typedef struct { - double pos_x; - double pos_y; -} Fixed_eNB_Distribution; - -////// options of eNB_Initial_Distribution -typedef struct { - int number_of_cells; -} Random_eNB_Distribution; - -typedef struct { - int number_of_cells; - double inter_eNB_distance_km; -} Hexagonal_eNB_Distribution; - -typedef struct { - int number_of_grid_x; - int number_of_grid_y; -} Grid_eNB_Distribution; // inter_eNB_distance = (x/num_x) and (y/num_y) for horizontal and vertical dimensions -////// - -typedef struct { - eNB_Mobility_Type eNB_mobility_type; - - eNB_Initial_Distribution eNB_initial_distribution; - // ! Note: the following four options are for eNB_Initial_Distribution, we put them here for the sake of simplicity of the XML file - Fixed_eNB_Distribution fixed_eNB_distribution; - Random_eNB_Distribution random_eNB_distribution; - Hexagonal_eNB_Distribution hexagonal_eNB_distribution; - Grid_eNB_Distribution grid_eNB_distribution; - Trace_Configuration trace_config; -} eNB_Mobility; - -typedef struct { - UE_Mobility UE_mobility; - eNB_Mobility eNB_mobility; -} Mobility; - -/** @defgroup _topo_config Topology Configuration - * @ingroup _OSD_basic - * @brief Including cell type, eNB topology, UE distribution, mobility information, etc - * @{*/ -typedef struct { - Area area; - Network_Type network_type; - Cell_Type cell_type; - Relay relay; - Mobility mobility; - int omv; -} Topology_Config; -/* @}*/ - - -typedef struct { - uint16_t priority[11];//pas possible d'acceder au MAX_NUM_LCID - // - uint8_t DCI_aggregation_min; - uint8_t DLSCH_dci_size_bits; - //UL transmission bandwidth in RBs - uint8_t ul_bandwidth[11]; - //DL transmission bandwidth in RBs - uint8_t dl_bandwidth[11]; - //UL transmission bandwidth in RBs - uint8_t min_ul_bandwidth[11]; - //DL transmission bandwidth in RBs - uint8_t min_dl_bandwidth[11]; - //aggregated bit rate of non-gbr bearer per UE - uint64_t ue_AggregatedMaximumBitrateDL; - //aggregated bit rate of non-gbr bearer per UE - uint64_t ue_AggregatedMaximumBitrateUL; - //CQI scheduling interval in subframes. - uint16_t cqiSchedInterval; - //Contention resolution timer used during random access - uint8_t mac_ContentionResolutionTimer; - uint16_t max_allowed_rbs[11]; - uint8_t max_mcs[11]; - - - uint8_t num_groups; - - -} Mac_config; - -/** @defgroup _Predefined_traffic Configuration - * @ingroup _OSD_basic - * @brief Including Application type, Source, destination, background, etc - * @{*/ -typedef struct { - char *application_type[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *source_id[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *destination_id[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int aggregation_level[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int flow_start[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int flow_duration[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - -} Predefined_Traffic; -/* @}*/ - - -/* - typedef struct - { - - } M2M_Traffic;*/ -/* @}*/ - -/** @defgroup _customized_traffic Configuration - * @ingroup _OSD_basic - * @brief Including Application type, Source, destination, background, idt, packet size, etc - * @{*/ -typedef struct { - //int pu; - //double prob_off_pu; - //double prob_pu_ed; - //double holding_time_off_pu; - //int pe; - //double prob_off_ed; - //double prob_ed_pe; - //double holding_time_off_ed; - //int ed; - //double holding_time_off_pe; - - char *application_type[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *source_id[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *destination_id[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *traffic[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *transport_protocol[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *ip_version[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *idt_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int idt_min_ms[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int idt_max_ms[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double idt_standard_deviation[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double idt_lambda[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double idt_scale[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double idt_shape[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *size_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int size_min_byte[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int size_max_byte[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double size_standard_deviation[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double size_lambda[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double size_scale[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double size_shape[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int stream[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int destination_port[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int aggregation_level[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int flow_start[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int flow_duration[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - - char *m2m[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - //M2M_Traffic m2m_traffic; - double prob_off_pu[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double prob_off_ed[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double prob_off_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double prob_pu_ed[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double prob_pu_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double prob_ed_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double prob_ed_pu[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int holding_time_off_ed[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int holding_time_off_pu[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int holding_time_off_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int holding_time_pe_off[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int pu_size_pkts[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int ed_size_pkts[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; -} Customized_Traffic; -/* @}*/ - - - - -/** @defgroup _app_config Application Configuration - * @ingroup _OSD_basic - * @brief Including application type and traffic information - * @{*/ -typedef struct { - char *packet_gen_type; - Predefined_Traffic predefined_traffic; - Customized_Traffic customized_traffic; -} Application_Config; -/* @}*/ - -typedef struct { - char *throughput; - char *latency; - char *loss_rate; - int signalling_overhead; - char *owd_radio_access; -} Performance_Metrics; - -typedef struct { - int phy; - int mac; - int rlc; - int rrc; - int pdcp; - int omg; - int emu; - int otg; -} Layer; - -typedef struct { - char *level; - char *verbosity; - int interval; -} Log_Emu; - -typedef struct { - int enabled; - unsigned int start_time; - unsigned int end_time; -} Packet_Trace; - -typedef struct { - int value; -} Seed; - - -/** @defgroup _emu_config Emulation Configuration - * @ingroup _OSD_basic - * @brief Including emulation time and performance output - * @{*/ -typedef struct { - double emulation_time_ms; - Performance_Metrics performance_metrics; - Layer layer; - Log_Emu log_emu; - Packet_Trace packet_trace; - Seed seed; - char *curve; - char *background_stats; - // CLI tags are in Info - //char g_log_level[20]; -} Emulation_Config; -/* @}*/ - -/** @defgroup _OSD_basic OAI protocol config - * @ingroup _OCG - * @brief OAI Emulation struct for protocol configuration - * @{*/ - -typedef struct { - uint8_t num_groups; -} eNB_MAC_Config; - -typedef struct { - eNB_MAC_Config eNB_mac_config; /*!< \brief eNB MAC configuration parameters */ - -} Protocol_Config; - - -/* @}*/ - -/** @defgroup _OSD_basic Basic OpenAirInterface Scenario Descriptor - * @ingroup _OCG - * @brief OAI Emulation struct for OSD_basic - * @{*/ - - -typedef struct { - unsigned char nb_ue; - module_id_t first_ue; - unsigned char nb_enb; - module_id_t first_enb; -} master_info_t; - -typedef struct { - char *output_path; /*!< \brief The path where we generate all the emulation results */ - int ocg_ok; - - // distributed emulation params - master_info_t master[NUMBER_OF_MASTER_MAX]; - unsigned char nb_ue_local; - unsigned char nb_ue_remote; - unsigned char nb_enb_local; - unsigned char nb_enb_remote; - unsigned char nb_ru_local; - unsigned char nb_ru_remote; - unsigned char nb_rn_local; - unsigned char nb_rn_remote; - module_id_t first_enb_local; - module_id_t first_rn_local; - module_id_t first_ue_local; - unsigned short master_id; - unsigned char nb_master; - unsigned int master_list; - unsigned int is_primary_master; - unsigned int ethernet_id; - char local_server[128]; // for the oaisim -c option : 0 = EURECOM web portal; -1 = local; 1 - N or filename = running a specific XML configuration file - unsigned char ethernet_flag; - unsigned char multicast_group; - char *multicast_ifname; - // status - unsigned char ocg_enabled; // openair config generator - unsigned char ocm_enabled; // openair channel modeling - unsigned char opt_enabled;//openair packet tracer - unsigned char opt_mode; // openair packet tracer mode: wireshark, pcap - unsigned char otg_enabled; // openair traffic generator - unsigned char omv_enabled; // openair mobility visulizer - unsigned char opp_enabled; // openair performance profiler - unsigned char oeh_enabled; // openair event handler, with CLI this could provide a remote event management - unsigned char vcd_enabled; - char *vcd_file; - unsigned char eMBMS_active_state; - unsigned char cba_group_active; - unsigned char cba_backoff; - unsigned char handover_active; - char *otg_traffic; - unsigned char otg_bg_traffic_enabled; - unsigned char omg_model_rn; - unsigned char omg_model_enb; - unsigned char omg_model_ue; - unsigned char omg_rwp_type; - unsigned char omg_model_ue_current; // when mixed mbility is used - // control eNB/UE instance through CLI - unsigned char cli_enabled; - unsigned char cli_num_enb; - unsigned char cli_start_enb[NUMBER_OF_eNB_MAX]; - unsigned char cli_num_ue; - unsigned char cli_start_ue[NUMBER_OF_UE_MAX]; - unsigned char oai_ifup[NUMBER_OF_eNB_MAX+NUMBER_OF_UE_MAX]; - // emu related - unsigned int seed; - unsigned int frame; - double time_s; - double time_ms; - unsigned int g_log_level; - unsigned int g_log_verbosity; - char *g_log_verbosity_option; - // phy related params - unsigned int n_frames; - unsigned int n_frames_flag; // if set, then let the emulation goes to infinity - node_function_t node_function[MAX_NUM_CCs]; - node_timing_t node_timing[MAX_NUM_CCs]; - unsigned char frame_type[MAX_NUM_CCs]; //! LTE frame type (TDD=1, FDD=0). \note this should be converted to \ref frame_type_t (header file reorganization needed) - char *frame_type_name[MAX_NUM_CCs]; - unsigned char tdd_config[MAX_NUM_CCs]; - unsigned char tdd_config_S[MAX_NUM_CCs]; - unsigned char extended_prefix_flag[MAX_NUM_CCs]; - unsigned char N_RB_DL[MAX_NUM_CCs]; - unsigned char transmission_mode[MAX_NUM_CCs]; - int max_predefined_traffic_config_index; - int max_customized_traffic_config_index; - s1ap_eNB_config_t s1ap_config; - - /* Per-Slot ISR - * Interval between two ISR = 500usec - */ - unsigned char slot_isr; - int slot_sfd; -} Info; -/* @}*/ - -/** @defgroup _OSD_basic Basic OpenAirInterface Scenario Descriptor - * @ingroup _OCG - * @brief OAI Emulation struct for OSD_basic - * @{*/ -typedef struct { - Mac_config mac_config[NUMBER_OF_UE_MAX]; - Environment_System_Config environment_system_config; /*!< \brief Evironment configuration */ - Topology_Config topology_config; /*!< \brief Topology configuration */ - Application_Config application_config; /*!< \brief Applications configuration */ - Emulation_Config emulation_config; /*!< \brief Emulation configuration */ - Protocol_Config protocol_config; /* specific protocol configuration*/ - Info info; /*!< \brief Some important information which should be able to be reached by OAISIM */ - char *profile; -} OAI_Emulation; -/* @}*/ - - -/** @defgroup _fn Functions in OCG - * @ingroup _OCG - * @brief describing all the functions used by OCG - * @{*/ -/* @} */ - -/** @defgroup _log_gen LOG GEN Commands - * @ingroup _OCG - * @brief using the following macro instead of "printf" - * @{*/ - -//#define LOG_A printf("OCG: "); printf /*!< \brief alert */ -//#define LOG_C printf("OCG: "); printf /*!< \brief critical */ -//#define LOG_W printf("OCG: "); printf /*!< \brief warning */ -//#define LOG_N printf("OCG: "); printf /*!< \brief notice */ -//#define LOG_E printf("OCG: "); printf /*!< \brief error */ -//#define LOG_I printf("OCG: "); printf /*!< \brief info */ -//#define LOG_D printf("OCG: "); printf /*!< \brief debug */ -//#define LOG_T printf("OCG: "); printf /*!< \brief trace */ -/* @}*/ - -int OCG_main (char is_local_server[FILENAME_LENGTH_MAX]); - -// void init_oai_emulation (void); -//#include "UTIL/LOG/log.h" - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_call_emu.c b/openair2/UTIL/OCG/OCG_call_emu.c deleted file mode 100644 index b6a2c924bf..0000000000 --- a/openair2/UTIL/OCG/OCG_call_emu.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -Lusheng Wang and -/*! \file OCG_call_emu.c -* \brief Call the emulator -* \author Lusheng Wang and Navid Nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include "OCG_vars.h" -#include "OCG_call_emu.h" -#include "UTIL/LOG/log.h" -/*----------------------------------------------------------------------------*/ - -OAI_Emulation oai_emulation; - -int call_emu(char dst_dir[DIR_LENGTH_MAX]) -{ - - - ////////// print the configuration - FILE *file; - char dst_file[DIR_LENGTH_MAX] = ""; - strcat(dst_file, dst_dir); - strcat(dst_file, "emulation_result.txt"); - file = fopen(dst_file,"w"); - //system("../../../openair1/SIMULATION/LTE_PHY_L2/physim --help"); - - fclose(file); - - LOG_I(OCG, "Emulation finished\n"); - return MODULE_OK; -} diff --git a/openair2/UTIL/OCG/OCG_call_emu.h b/openair2/UTIL/OCG/OCG_call_emu.h deleted file mode 100644 index c7b2bb4327..0000000000 --- a/openair2/UTIL/OCG/OCG_call_emu.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_call_emu.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_CALL_EMU_H__ - -#define __OCG_CALL_EMU_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _call_emu Call Emu - * @ingroup _fn - * @brief Call the emulator - * @{*/ -int call_emu(char dst_dir[DIR_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_config_mobi.c b/openair2/UTIL/OCG/OCG_config_mobi.c deleted file mode 100644 index b3100a4214..0000000000 --- a/openair2/UTIL/OCG/OCG_config_mobi.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_config_mobi.c -* \brief Generate an XML to configure the mobility -* \author Lusheng Wang & Navid Nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include -#include "OCG.h" -#include "OCG_extern.h" -#include "OCG_config_mobi.h" -/*----------------------------------------------------------------------------*/ - -int config_mobi(char mobigen_filename[FILENAME_LENGTH_MAX], char filename[FILENAME_LENGTH_MAX]) { - // for the xml writer, refer to http://xmlsoft.org/html/libxml-xmlwriter.html - char dir_to_mobigen_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX]; - char mobi_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX] = ""; - xmlTextWriterPtr writer; - strcpy(dir_to_mobigen_file, DIR_TO_MOBIGEN); - strcat(dir_to_mobigen_file, mobigen_filename); - /* Create a new XmlWriter for uri, with no compression. */ - writer = xmlNewTextWriterFilename(dir_to_mobigen_file, 0); - // set the output format of the XML file - xmlTextWriterSetIndent(writer, 1); - xmlTextWriterSetIndentString(writer, " "); - /* Start the document with the xml default for the version, - * encoding ISO 8859-1 and the default for the standalone - * declaration. */ - xmlTextWriterStartDocument(writer, NULL, NULL, NULL); - /* Start an element named "EXAMPLE". Since this is the first - * element, this will be the root element of the document. */ - xmlTextWriterStartElement(writer, "universe"); - /* Write an element named "X_ORDER_ID" as child of HEADER. */ - xmlTextWriterWriteFormatElement(writer, "dimx", "%lf", oai_emulation.topo_config.area.x); - /* Write an element named "X_ORDER_ID" as child of HEADER. */ - xmlTextWriterWriteFormatElement(writer, "dimy", "%lf", oai_emulation.topo_config.area.y); - xmlTextWriterWriteFormatElement(writer, "seed", "%d", 1); - xmlTextWriterStartElement(writer, "extension"); - xmlTextWriterWriteAttribute(writer, "class", "de.uni_stuttgart.informatik.canu.mobisim.simulations.TimeSimulation"); - xmlTextWriterWriteFormatAttribute(writer, "param", "%lf", oai_emulation.emu_config.emu_time); - xmlTextWriterEndElement(writer); - xmlTextWriterStartElement(writer, "extension"); - xmlTextWriterWriteAttribute(writer, "class", "de.uni_stuttgart.informatik.canu.spatialmodel.core.SpatialModel"); - xmlTextWriterWriteFormatAttribute(writer, "max_x", "%lf", oai_emulation.topo_config.area.x); - xmlTextWriterWriteFormatAttribute(writer, "max_y", "%lf", oai_emulation.topo_config.area.y); - xmlTextWriterWriteAttribute(writer, "min_x", "0"); - xmlTextWriterWriteAttribute(writer, "min_y", "0"); - xmlTextWriterWriteFormatElement(writer, "dump_boundary_points", "%s", "false"); - xmlTextWriterWriteFormatElement(writer, "separated_flow", "%s", "false"); - xmlTextWriterWriteFormatElement(writer, "max_traffic_lights", "%d", 500); - xmlTextWriterEndElement(writer); - xmlTextWriterStartElement(writer, "extension"); - xmlTextWriterWriteAttribute(writer, "class", "de.uni_stuttgart.informatik.canu.mobisim.extensions.ReportNodeMobility"); - strcpy(mobi_file, MOBI_XML_FOLDER); - strcat(mobi_file, filename); - xmlTextWriterWriteAttribute(writer, "output", mobi_file); - xmlTextWriterWriteFormatElement(writer, "step", "%d", 1); - xmlTextWriterEndElement(writer); - xmlTextWriterStartElement(writer, "nodegroup"); - xmlTextWriterWriteAttribute(writer, "car2x", "false"); - xmlTextWriterWriteAttribute(writer, "id", ""); - xmlTextWriterWriteAttribute(writer, "n", "50"); - xmlTextWriterWriteAttribute(writer, "type", "car"); - xmlTextWriterStartElement(writer, "position"); - xmlTextWriterWriteAttribute(writer, "random", "true"); - xmlTextWriterWriteFormatElement(writer, "z", "%s", "0.0"); - xmlTextWriterEndElement(writer); - xmlTextWriterStartElement(writer, "extension"); - xmlTextWriterWriteAttribute(writer, "class", "de.uni_stuttgart.informatik.canu.mobisim.mobilitymodels.RandomWaypointWalk"); - - if (!strcmp(oai_emulation.topo_config.UE_mobility.UE_mobility_type.selected_option, "fixed")) { - xmlTextWriterWriteFormatElement(writer, "minspeed", "%d", 0); - xmlTextWriterWriteFormatElement(writer, "maxspeed", "%d", 0); - xmlTextWriterWriteFormatElement(writer, "minstay", "%d", 9999); - xmlTextWriterWriteFormatElement(writer, "maxstay", "%d", 9999); - } else if (!strcmp(oai_emulation.topo_config.UE_mobility.UE_mobility_type.selected_option, "random_waypoint")) { - xmlTextWriterWriteFormatElement(writer, "minspeed", "%lf", oai_emulation.topo_config.UE_mobility.UE_moving_dynamics.min_speed); - xmlTextWriterWriteFormatElement(writer, "maxspeed", "%lf", oai_emulation.topo_config.UE_mobility.UE_moving_dynamics.max_speed); - xmlTextWriterWriteFormatElement(writer, "minstay", "%lf", oai_emulation.topo_config.UE_mobility.UE_moving_dynamics.min_pause_time); - xmlTextWriterWriteFormatElement(writer, "maxstay", "%lf", oai_emulation.topo_config.UE_mobility.UE_moving_dynamics.max_pause_time); - } - - // Close the element named HEADER. - xmlTextWriterEndElement(writer); - xmlTextWriterEndDocument(writer); - xmlFreeTextWriter(writer); - return MODULE_OK; -} - diff --git a/openair2/UTIL/OCG/OCG_config_mobi.h b/openair2/UTIL/OCG/OCG_config_mobi.h deleted file mode 100644 index fbaeb4b281..0000000000 --- a/openair2/UTIL/OCG/OCG_config_mobi.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_config_mobi.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_CONFIG_MOBI_H__ - -#define __OCG_CONFIG_MOBI_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _config_mobi Config Mobigen - * @ingroup _fn - * @brief Generate configuration XML for mobigen - * @{*/ -int config_mobi(char mobigen_filename[FILENAME_LENGTH_MAX], char filename[FILENAME_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_create_dir.c b/openair2/UTIL/OCG/OCG_create_dir.c deleted file mode 100644 index 364887163b..0000000000 --- a/openair2/UTIL/OCG/OCG_create_dir.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_create_dir.c -* \brief Create directory for current emulation -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include -#include "OCG_vars.h" -#include "OCG_create_dir.h" -#include "UTIL/LOG/log.h" -/*----------------------------------------------------------------------------*/ - -int create_dir(char output_dir[DIR_LENGTH_MAX], char user_name[FILENAME_LENGTH_MAX / 2], char file_date[FILENAME_LENGTH_MAX / 2]) -{ - - char directory[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX] = ""; - mode_t process_mask = umask(0); - - strncpy(directory, output_dir, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX); - directory[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - 1] = 0; // terminate string - - struct stat st; - - if(stat(directory, &st) != 0) { // if output_dir does not exist, we create it here - mkdir(directory, S_IRWXU | S_IRWXG | S_IRWXO); - LOG_I(OCG, "output_dir %s is created", directory); - } - - strncat(directory, user_name, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - strlen(directory) - 1); - - mkdir(directory, S_IRWXU | S_IRWXG | S_IRWXO); - - strncat(directory, "/", FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - strlen(directory) - 1); - strncat(directory, file_date, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - strlen(directory) - 1); - - mkdir(directory, S_IRWXU | S_IRWXG |S_IRWXO); - - //char directory_extension[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX + 64] = ""; - /*strcpy(directory_extension, directory); // to create some more folders - strcat(directory_extension, "/LOGS"); - mkdir(directory_extension, S_IRWXU | S_IRWXG |S_IRWXO); - - strcpy(directory_extension, directory); - strcat(directory_extension, "/PACKET_TRACE"); - mkdir(directory_extension, S_IRWXU | S_IRWXG |S_IRWXO); - - strcpy(directory_extension, directory); - strcat(directory_extension, "/SCENARIO"); - mkdir(directory_extension, S_IRWXU | S_IRWXG |S_IRWXO); - - strcpy(directory_extension, directory); - strcat(directory_extension, "/SCENARIO/XML"); - mkdir(directory_extension, S_IRWXU | S_IRWXG |S_IRWXO); - - strcpy(directory_extension, directory); - strcat(directory_extension, "/SCENARIO/STATE"); - mkdir(directory_extension, S_IRWXU | S_IRWXG |S_IRWXO); - */ - umask(process_mask); - - LOG_I(OCG, "Directory for current emulation is created\n"); - return MODULE_OK; - -} diff --git a/openair2/UTIL/OCG/OCG_create_dir.h b/openair2/UTIL/OCG/OCG_create_dir.h deleted file mode 100644 index 692f4b095e..0000000000 --- a/openair2/UTIL/OCG/OCG_create_dir.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_create_dir.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_CREATE_DIR_H__ - -#define __OCG_CREATE_DIR_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _create_dir Create Dir - * @ingroup _fn - * @brief Create directory in OUTPUT_DIR for current emulation - * @{*/ -int create_dir(char output_dir[DIR_LENGTH_MAX], char user_name[FILENAME_LENGTH_MAX / 2], char file_date[FILENAME_LENGTH_MAX / 2]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_detect_file.c b/openair2/UTIL/OCG/OCG_detect_file.c deleted file mode 100644 index 034f173b77..0000000000 --- a/openair2/UTIL/OCG/OCG_detect_file.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_detect_file.c -* \brief Detect if a new XML is generated from the web portal -* \author Lusheng Wang & Navid Nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include -#include -#include "OCG_vars.h" -#include "OCG_detect_file.h" -#include "UTIL/LOG/log.h" -/*----------------------------------------------------------------------------*/ - - -int detect_file(char src_dir[DIR_LENGTH_MAX], char is_local_server[FILENAME_LENGTH_MAX]) -{ - DIR *dir = NULL; - struct dirent *file = NULL; - char template[FILENAME_LENGTH_MAX] = ""; - char manual[FILENAME_LENGTH_MAX] = ""; - - if((dir = opendir(src_dir)) == NULL) { - LOG_E(OCG, "Folder %s for detecting the XML configuration file is not found\n", src_dir); - return MODULE_ERROR; - } - - while((file = readdir(dir)) != NULL) { - if(strcmp(file->d_name, ".") && strcmp(file->d_name, "..")) { - if(file->d_type != DT_DIR) { - if ((!strcmp(is_local_server, "0")) || (!strcmp(is_local_server, "-1"))) { // for EURECOM web or local user without specifying the file name - strncpy(template, file->d_name, sizeof("template") - 1); - strncpy(manual, file->d_name, sizeof("manual") - 1); - - if ((!strcmp(template, "template")) || (!strcmp(manual, "manual"))) { // should skip the templates and the manual XML files - - } else { - if (strlen(file->d_name) <= FILENAME_LENGTH_MAX) { - strcpy(filename, file->d_name); - LOG_I(OCG, "Configuration file \"%s\" is detected\n", filename); - closedir(dir); - return MODULE_OK; // find a good file and return - } else { - LOG_E(OCG, "File name too long: char filename[] should be less than 64 characters\n"); - closedir(dir); - return MODULE_ERROR; - } - } - } else { // should use a template or a manual XML file - strncpy(template, is_local_server, sizeof("template") - 1); - strncpy(manual, is_local_server, sizeof("manual") - 1); - - if ((!strcmp(template, "template")) || (!strcmp(manual, "manual"))) { - strcpy(filename, is_local_server); - } else { - strcpy(filename, "template_"); - strcat(filename, is_local_server); - strcat(filename, ".xml"); - } - - char check_src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX]; - strncpy(check_src_file, src_dir, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX); - check_src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - 1] = 0; // terminate string - strncat(check_src_file, filename, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - strlen(check_src_file) - 1); - struct stat st; - - if(stat(check_src_file, &st) != 0) { - LOG_E(OCG, "file %s does not exist\n", check_src_file); - closedir(dir); - return MODULE_ERROR; - } else { - LOG_I(OCG, "template/manual file \"%s\" is used\n", filename); - closedir(dir); - return MODULE_OK; - } - } - } else { // this option is not used at this moment : NO directory should be put in the src_dir - //detect_file(strncat(src_dir, file->d_name, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX)); - } - } - } - - closedir(dir); - - if (strcmp(is_local_server, "0") && strcmp(is_local_server, "-1")) { - LOG_E(OCG, "file %s does not exist in directory %s\n", is_local_server, src_dir); - return MODULE_ERROR; - } else return NO_FILE; -} diff --git a/openair2/UTIL/OCG/OCG_detect_file.h b/openair2/UTIL/OCG/OCG_detect_file.h deleted file mode 100644 index 3a43b50552..0000000000 --- a/openair2/UTIL/OCG/OCG_detect_file.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_detect_file.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_DETECT_FILE_H__ - -#define __OCG_DETECT_FILE_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _detect_file Detect File - * @ingroup _fn - * @brief Detect new XML configuration file in USER_XML_FOLDER - * @{*/ -//int detect_file(int argc, char *argv[], char folder[DIR_LENGTH_MAX]); -int detect_file(char folder[DIR_LENGTH_MAX], char is_local_server[FILENAME_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_extern.h b/openair2/UTIL/OCG/OCG_extern.h deleted file mode 100644 index 25fea4e90e..0000000000 --- a/openair2/UTIL/OCG/OCG_extern.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -#ifndef __OCG_EXTERN_H__ -#define __OCG_EXTERN_H__ - -extern char filename[]; /*!< \brief user_name.file_date.xml */ -extern char user_name[]; /*!< \brief user_name */ -extern char file_date[]; /*!< \brief file_date */ -extern char src_file[]; /*!< \brief USER_XML_FOLDER/user_name.file_date.xml or DEMO_XML_FOLDER/user_name.file_date.xml */ -extern char dst_dir[]; /*!< \brief user_name/file_date/ */ -extern int copy_or_move; /*!< \brief indicating if the current emulation is with a local XML or an XML generated from the web portal */ -extern int file_detected; /*!< \brief indicate whether a new file is detected */ -/* @}*/ - -/** @defgroup _oks OCG Module State Indicators - * @ingroup _OCG - * @brief Indicate whether a module has processed successfully - * @{*/ -extern int get_opt_OK; /*!< \brief value: -9999, -1, 0 or 1 */ -extern int detect_file_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int parse_filename_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int create_dir_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int parse_XML_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int save_XML_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int call_emu_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int config_mobi_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int generate_report_OK; /*!< \brief value: -9999, -1 or 0 */ -/* @}*/ - -extern OAI_Emulation oai_emulation; - -#endif diff --git a/openair2/UTIL/OCG/OCG_generate_report.c b/openair2/UTIL/OCG/OCG_generate_report.c deleted file mode 100644 index a48b3a7af7..0000000000 --- a/openair2/UTIL/OCG/OCG_generate_report.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_generate_report.c -* \brief Generate a brief report for debug of OCG -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include -#include -#include "OCG_vars.h" -#include "OCG_generate_report.h" -#include "UTIL/LOG/log.h" - -/*----------------------------------------------------------------------------*/ - - -int generate_report(char dst_dir[DIR_LENGTH_MAX], char filename[FILENAME_LENGTH_MAX]) { - // for the xml writer, refer to http://xmlsoft.org/html/libxml-xmlwriter.html - char dst_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX]; - strncpy(dst_file, dst_dir, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - strlen(filename) - 1); - strcat(dst_file, filename); - xmlTextWriterPtr writer; - writer = xmlNewTextWriterFilename(dst_file, 0); - // set the output format of the XML file - xmlTextWriterSetIndent(writer, 1); - xmlTextWriterSetIndentString(writer,(unsigned char *) " "); - xmlTextWriterStartDocument(writer, NULL, NULL, NULL); - /* Write an element named "X_ORDER_ID" as child of HEADER. */ - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "COMMENT ", " in this output file, %d means NOT_PROCESSED; %d means NO_FILE; %d means ERROR; %d means OK ", MODULE_NOT_PROCESSED, - NO_FILE, MODULE_ERROR, MODULE_OK); - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "OCG_GET_OPT ", " %d ", get_opt_OK); - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "OCG_DETECT_FILE ", " %d ", detect_file_OK); - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "OCG_PARSE_FILENAME", " %d ", parse_filename_OK); - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "OCG_CREATE_DIR ", " %d ", create_dir_OK); - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "OCG_PARSE_XML ", " %d ", parse_XML_OK); - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "OCG_SAVE_XML ", " %d ", save_XML_OK); - // xmlTextWriterWriteFormatElement(writer, "OCG_CALL_EMU ", " %d ", call_emu_OK); - xmlTextWriterEndDocument(writer); - xmlFreeTextWriter(writer); - LOG_I(OCG, "A report of OCG is generated in directory \"%s\"\n\n", dst_dir); - return MODULE_OK; -} diff --git a/openair2/UTIL/OCG/OCG_generate_report.h b/openair2/UTIL/OCG/OCG_generate_report.h deleted file mode 100644 index a67adf70c7..0000000000 --- a/openair2/UTIL/OCG/OCG_generate_report.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_generate_report.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_GENERATE_REPORT_H__ - -#define __OCG_GENERATE_REPORT_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _generate_report Generate report - * @ingroup _fn - * @brief Generate a report to show the states of OCG modules - * @{*/ -int generate_report(char dst_dir[DIR_LENGTH_MAX], char filename[FILENAME_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_get_opt.c b/openair2/UTIL/OCG/OCG_get_opt.c deleted file mode 100644 index 0d52197d13..0000000000 --- a/openair2/UTIL/OCG/OCG_get_opt.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_get_opt.c -* \brief Get Options of the OCG command -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#include "OCG.h" -#include "OCG_get_opt.h" -//#include "log.h" -/*----------------------------------------------------------------------------*/ - -char filename[FILENAME_LENGTH_MAX]; - -int get_opt(int argc, char *argv[]) -{ - char opts; - - while((opts = getopt(argc, argv, "f:h")) != -1) { - - switch (opts) { - case 'f' : - strcpy(filename, optarg); - LOG_D(OCG, "User specified configuration file is \"%s\"\n", filename); - return MODULE_OK; - - case 'h' : - LOG_I(OCG, "OCG command : OCG -f \"filename.xml\"\n"); - return GET_HELP; - - default : - LOG_E(OCG, "OCG command : OCG -f \"filename.xml\"\n"); - return GET_HELP; - } - } - - return NO_FILE; -} diff --git a/openair2/UTIL/OCG/OCG_get_opt.h b/openair2/UTIL/OCG/OCG_get_opt.h deleted file mode 100644 index 7fdab0c574..0000000000 --- a/openair2/UTIL/OCG/OCG_get_opt.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_get_opt.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ -#ifndef __OCG_GET_OPT_H__ - -#define __OCG_GET_OPT_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _get_opt Get Opt - * @ingroup _fn - * @brief Get options of the OCG command, e.g. "OCG -f" and "OCG -h" - * @{*/ -int get_opt(int argc, char *argv[]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_if.h b/openair2/UTIL/OCG/OCG_if.h deleted file mode 100644 index cc55b56f36..0000000000 --- a/openair2/UTIL/OCG/OCG_if.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_if.h -* \brief Interfaces to the outside of OCG -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __UTIL_OCG_OCG_IF__H__ -#define __UTIL_OCG_OCG_IF__H__ - -#ifdef __cplusplus -extern "C" { -#endif -/*--- INCLUDES ---------------------------------------------------------------*/ -# include "OCG.h" -/*----------------------------------------------------------------------------*/ - - -# ifdef COMPONENT_CONFIGEN -# ifdef COMPONENT_CONFIGEN_IF -# define private_configen_if(x) x -# define friend_configen_if(x) x -# define public_configen_if(x) x -# else -# define private_configen_if(x) -# define friend_configen_if(x) extern x -# define public_configen_if(x) extern x -# endif -# else -# define private_configen_if(x) -# define friend_configen_if(x) -# define public_configen_if(x) extern x -# endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_parse_XML.c b/openair2/UTIL/OCG/OCG_parse_XML.c deleted file mode 100644 index e52bf402db..0000000000 --- a/openair2/UTIL/OCG/OCG_parse_XML.c +++ /dev/null @@ -1,1357 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_parse_XML.c -* \brief Parse the content of the XML configuration file -* \author Lusheng Wang & Navid Nikaein & Andre Gomes(One Source) -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -//#include -#include -//#include -#include "OCG_vars.h" -#include "OCG_parse_XML.h" -#include "UTIL/LOG/log.h" -#include "UTIL/OTG/otg_defs.h" -#include "UTIL/OPT/opt.h" -/*----------------------------------------------------------------------------*/ - -static int oai_emulation_; /*!< \brief indicating that the parsing position is now within OAI_Emulation_*/ - -static int environment_system_config_; /*!< \brief indicating that the parsing position is now within Envi_Config_*/ -static int fading_; -static int large_scale_; -static int free_space_model_parameters_; -static int pathloss_exponent_; -static int pathloss_0_dB_; -static int small_scale_; -static int ricean_8tap_; -static int rice_factor_dB_; -static int shadowing_; -static int decorrelation_distance_m_; -static int variance_dB_; -static int inter_site_correlation_; -static int wall_penetration_loss_dB_; -static int system_bandwidth_MB_; -static int system_frequency_GHz_; -static int number_of_rbs_dl_; -static int transmission_mode_; -static int frame_config_; -static int frame_type_; -static int tdd_config_; -static int antenna_; -static int eNB_antenna_; -static int UE_antenna_; -static int number_of_sectors_; -static int beam_width_dB_; -static int alpha_rad_1_; -static int alpha_rad_2_; -static int alpha_rad_3_; -static int antenna_gain_dBi_; -static int tx_power_dBm_; -static int rx_noise_level_dB_; -static int antenna_orientation_degree_1_; -static int antenna_orientation_degree_2_; -static int antenna_orientation_degree_3_; - -static int topology_config_; -static int area_; /*!< \brief indicating that the parsing position is now within Area_*/ -static int x_m_; -static int y_m_; -static int network_type_; -static int cell_type_; -static int relay_; -static int number_of_relays_; -static int mobility_; -static int UE_mobility_; -static int UE_mobility_type_; -static int grid_walk_; -static int grid_map_; -static int horizontal_grid_; -static int vertical_grid_; -static int grid_trip_type_; -static int UE_initial_distribution_; -static int random_UE_distribution_; -static int number_of_nodes_; -static int concentrated_UE_distribution_; -static int grid_UE_distribution_; -static int random_grid_; -static int border_grid_; -static int UE_moving_dynamics_; -static int min_speed_mps_; -static int max_speed_mps_; -static int min_sleep_ms_; -static int max_sleep_ms_; -static int min_journey_time_ms_; -static int max_journey_time_ms_; -static int eNB_mobility_; -static int eNB_mobility_type_; -static int eNB_initial_distribution_; -static int eNB_initial_coordinates_; -static double eNB_pos_x_; -static double eNB_pos_y_; -static int random_eNB_distribution_; -static int number_of_cells_; -static int hexagonal_eNB_distribution_; -static int inter_eNB_distance_km_; -static int grid_eNB_distribution_; -static int number_of_grid_x_; -static int number_of_grid_y_; -static int trace_mobility_file_; -static int sumo_config_; -static int sumo_cmd_; -static int sumo_config_file_; -static int sumo_start_; -static int sumo_end_; -static int sumo_step_; -static int sumo_hip_; -static int sumo_hport_; -static int omv_; - -static int application_config_; /*!< \brief indicating that the parsing position is now within App_Config_*/ -static int predefined_traffic_; -static int background_traffic_; -static int customized_traffic_; -static int application_type_; /*!< \brief indicating that the parsing position is now within App_Type_*/ -static int source_id_; -static int destination_id_; -static int traffic_; /*!< \brief indicating that the parsing position is now within Traffic_*/ -static int transport_protocol_; /*!< \brief indicating that the parsing position is now within Transport_Protocol_*/ -static int ip_version_; -static unsigned int aggregation_level_; -static int flow_start_; -static int flow_duration_; -static int idt_dist_; -static int idt_min_ms_; -static int idt_max_ms_; -static double idt_standard_deviation_; -static double idt_lambda_; -static double idt_scale_; -static double idt_shape_; -static int size_dist_; -static int size_min_byte_; -static int size_max_byte_; -static double size_standard_deviation_; -static double size_lambda_; -static double size_scale_; -static double size_shape_; -static int stream_; -static int destination_port_; -static int packet_gen_type_; - -static int emulation_config_; /*!< \brief indicating that the parsing position is now within Emu_Config_*/ -static int emulation_time_ms_; -static int curve_; -static int profiling_; -static int trace_file_; -static int background_stats_; -static int performance_metrics_; /*!< \brief indicating that the parsing position is now within Performance_*/ -static int throughput_; -static int latency_; -static int loss_rate_; -static int owd_radio_access_; -static int layer_; /*!< \brief indicating that the parsing position is now within Layer_*/ -static int phy_; -static int mac_; -static int rlc_; -static int pdcp_; -static int rrc_; -static int emu_; -static int omg_; -static int otg_; - -/* MAC*/ -static int protocol_; -static int mac_; -static int num_groups_; - -static int log_; -static int level_; -static int verbosity_; -static int interval_; -static int packet_trace_; -static int seed_value_; - -static int cli_enabled_; -static int cli_start_enb_; -static int cli_start_ue_; - -static unsigned int m2m_traffic_; -static double prob_off_pu_; -double prob_off_ed_; -static double prob_off_pe_; -static double prob_pu_ed_; -static double prob_pu_pe_; -static double prob_ed_pe_; -static double prob_ed_pu_; -static unsigned int holding_time_off_ed_; -static unsigned int holding_time_off_pu_; -static unsigned int holding_time_off_pe_; -static unsigned int holding_time_pe_off_; -static unsigned int pu_size_pkts_; -static unsigned int ed_size_pkts_; - -static int profile_; - - -void start_document(void *user_data) -{ - //printf("Start parsing ............ \n"); -} - -void end_document(void *user_data) -{ - //printf("End parsing .\n"); -} - -void start_element(void *user_data, const xmlChar *name, const xmlChar **attrs) // called once at the beginning of each element -{ - if (!xmlStrcmp(name,(unsigned char*) "OAI_EMULATION")) { - oai_emulation_ = 1; - - } else if (!xmlStrcmp(name,(unsigned char*) "ENVIRONMENT_SYSTEM_CONFIG")) { - environment_system_config_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "FADING")) { - fading_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "LARGE_SCALE")) { - large_scale_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "FREE_SPACE_MODEL_PARAMETERS")) { - free_space_model_parameters_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PATHLOSS_EXPONENT")) { - pathloss_exponent_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PATHLOSS_0_dB")) { - pathloss_0_dB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SMALL_SCALE")) { - small_scale_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RICEAN_8TAP")) { - ricean_8tap_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RICE_FACTOR_dB")) { - rice_factor_dB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SHADOWING")) { - shadowing_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "DECORRELATION_DISTANCE_m")) { - decorrelation_distance_m_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "VARIANCE_dB")) { - variance_dB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "INTER_SITE_CORRELATION")) { - inter_site_correlation_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "WALL_PENETRATION_LOSS_dB")) { - wall_penetration_loss_dB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SYSTEM_BANDWIDTH_MB")) { - system_bandwidth_MB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SYSTEM_FREQUENCY_GHz")) { - system_frequency_GHz_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_RBS_DL")) { - number_of_rbs_dl_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "TRANSMISSION_MODE")) { - transmission_mode_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "FRAME_CONFIG")) { - frame_config_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "FRAME_TYPE")) { - frame_type_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "TDD_CONFIG")) { - tdd_config_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA")) { - antenna_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_ANTENNA")) { - eNB_antenna_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_ANTENNA")) { - UE_antenna_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_SECTORS")) { - number_of_sectors_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "BEAM_WIDTH_dB")) { - beam_width_dB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ALPHA_RAD_1")) { - alpha_rad_1_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ALPHA_RAD_2")) { - alpha_rad_2_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ALPHA_RAD_3")) { - alpha_rad_3_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_GAIN_dBi")) { - antenna_gain_dBi_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "TX_POWER_dBm")) { - tx_power_dBm_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RX_NOISE_LEVEL_dB")) { - rx_noise_level_dB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_ORIENTATION_degree1")) { - antenna_orientation_degree_1_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_ORIENTATION_degree2")) { - antenna_orientation_degree_2_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_ORIENTATION_degree3")) { - antenna_orientation_degree_3_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "TOPOLOGY_CONFIG")) { - topology_config_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "AREA")) { - area_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "X_m")) { - x_m_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "Y_m")) { - y_m_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NETWORK_TYPE")) { - network_type_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "CELL_TYPE")) { - cell_type_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RELAY")) { - relay_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_RELAYS")) { - number_of_relays_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MOBILITY")) { - mobility_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_MOBILITY")) { - UE_mobility_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_MOBILITY_TYPE")) { - UE_mobility_type_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_WALK")) { - grid_walk_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_MAP")) { - grid_map_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "HORIZONTAL_GRID")) { - horizontal_grid_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "VERTICAL_GRID")) { - vertical_grid_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_TRIP_TYPE")) { - grid_trip_type_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_INITIAL_DISTRIBUTION")) { - UE_initial_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RANDOM_UE_DISTRIBUTION")) { - random_UE_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_NODES")) { - number_of_nodes_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "CONCENTRATED_UE_DISTRIBUTION")) { - concentrated_UE_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_UE_DISTRIBUTION")) { - grid_UE_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RANDOM_GRID")) { - random_grid_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "BORDER_GRID")) { - border_grid_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_MOVING_DYNAMICS")) { - UE_moving_dynamics_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MIN_SPEED_mps")) { - min_speed_mps_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MAX_SPEED_mps")) { - max_speed_mps_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MIN_SLEEP_ms")) { - min_sleep_ms_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MAX_SLEEP_ms")) { - max_sleep_ms_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MIN_JOURNEY_TIME_ms")) { - min_journey_time_ms_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MAX_JOURNEY_TIME_ms")) { - max_journey_time_ms_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_MOBILITY")) { - eNB_mobility_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_MOBILITY_TYPE")) { - eNB_mobility_type_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_INITIAL_DISTRIBUTION")) { - eNB_initial_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_INITIAL_COORDINATES")) { - eNB_initial_coordinates_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "POS_X")) { - eNB_pos_x_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "POS_Y")) { - eNB_pos_y_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RANDOM_eNB_DISTRIBUTION")) { - random_eNB_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_CELLS")) { - number_of_cells_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "HEXAGONAL_eNB_DISTRIBUTION")) { - hexagonal_eNB_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "INTER_eNB_DISTANCE_km")) { - inter_eNB_distance_km_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_eNB_DISTRIBUTION")) { - grid_eNB_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_GRID_X")) { - number_of_grid_x_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_GRID_Y")) { - number_of_grid_y_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "TRACE_MOBILITY_FILE")) { - trace_mobility_file_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_CONFIG")) { - sumo_config_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_CMD")) { - sumo_cmd_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_CONFIG_FILE")) { - sumo_config_file_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_START")) { - sumo_start_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_END")) { - sumo_end_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_STEP")) { - sumo_step_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_HOST_IP")) { - sumo_hip_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_HOST_PORT")) { - sumo_hport_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "OMV")) { - omv_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "APPLICATION_CONFIG")) { - application_config_ = 1; - oai_emulation.info.max_predefined_traffic_config_index = 0; - oai_emulation.info.max_customized_traffic_config_index = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PREDEFINED_TRAFFIC")) { - predefined_traffic_ = 1; - oai_emulation.info.otg_enabled =1; - oai_emulation.info.max_predefined_traffic_config_index ++; - } else if (!xmlStrcmp(name, (unsigned char*) "CUSTOMIZED_TRAFFIC")) { - customized_traffic_ = 1; - oai_emulation.info.otg_enabled =1; - oai_emulation.info.max_customized_traffic_config_index ++; - } else if (!xmlStrcmp(name, (unsigned char*) "CUSTOMIZED_TRAFFIC")) { - customized_traffic_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "M2M")) { - m2m_traffic_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_OFF_PU")) { - prob_off_pu_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_OFF_ED")) { - prob_off_ed_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_OFF_PE")) { - prob_off_pe_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_PU_ED")) { - prob_pu_ed_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_PU_PE")) { - prob_pu_pe_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_ED_PE")) { - prob_ed_pe_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_ED_PU")) { - prob_ed_pu_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_OFF_ED")) { - holding_time_off_ed_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_OFF_PU")) { - holding_time_off_pu_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_OFF_PE")) { - holding_time_off_pe_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_PE_OFF")) { - holding_time_pe_off_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PU_SIZE_PKTS")) { - pu_size_pkts_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "ED_SIZE_PKTS")) { - ed_size_pkts_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SOURCE_ID")) { - source_id_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "DESTINATION_ID")) { - destination_id_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "APPLICATION_TYPE")) { - application_type_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PACKET_GEN_TYPE")) { - packet_gen_type_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "BACKGROUND_TRAFFIC")) { - background_traffic_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "TRAFFIC")) { - traffic_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "TRANSPORT_PROTOCOL")) { - transport_protocol_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IP_VERSION")) { - ip_version_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "AGGREGATION_LEVEL")) { - aggregation_level_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "FLOW_START_ms")) { - flow_start_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "FLOW_DURATION_ms")) { - flow_duration_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_DIST")) { - idt_dist_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_MIN_ms")) { - idt_min_ms_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_MAX_ms")) { - idt_max_ms_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_STANDARD_DEVIATION")) { - idt_standard_deviation_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_LAMBDA")) { - idt_lambda_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_SCALE")) { - idt_scale_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_SHAPE")) { - idt_shape_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_DIST")) { - size_dist_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_MIN_byte")) { - size_min_byte_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_MAX_byte")) { - size_max_byte_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_STANDARD_DEVIATION")) { - size_standard_deviation_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_LAMBDA")) { - size_lambda_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_SCALE")) { - size_scale_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_SHAPE")) { - size_shape_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "STREAM")) { - stream_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "DESTINATION_PORT")) { - destination_port_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "EMULATION_CONFIG")) { - emulation_config_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "EMULATION_TIME_ms")) { - emulation_time_ms_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "CURVE")) { - curve_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PROFILING")) { - profiling_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "TRACE_FILE")) { - trace_file_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "BACKGROUND_STATS")) { - background_stats_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PERFORMANCE_METRICS")) { - performance_metrics_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "THROUGHPUT")) { - throughput_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "LATENCY")) { - latency_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "LOSS_RATE")) { - loss_rate_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "OWD_RADIO_ACCESS")) { - owd_radio_access_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "LAYER")) { - layer_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PHY")) { - phy_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MAC")) { - mac_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RLC")) { - rlc_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PDCP")) { - pdcp_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RRC")) { - rrc_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "OMG")) { - omg_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "OTG")) { - otg_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "EMU")) { - emu_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "LOG")) { - log_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "LEVEL")) { - level_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "VERBOSITY")) { - verbosity_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "INTERVAL")) { - interval_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PACKET_TRACE")) { - packet_trace_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SEED_VALUE")) { - seed_value_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "CLI")) { - cli_enabled_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "START_ENB")) { - cli_start_enb_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "START_UE")) { - cli_start_ue_ = 1; - - } else if (!xmlStrcmp(name,(unsigned char*) "PROTOCOL")) { - protocol_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MAC")) { - mac_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUM_GROUPS")) { - num_groups_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PROFILE")) { - profile_ = 1; - } else { - LOG_W(OCG, "One element could not be parsed : unknown element name '%s'\n", name); - } -} - -void end_element(void *user_data, const xmlChar *name) // called once at the end of each element -{ - if (!xmlStrcmp(name,(unsigned char*) "OAI_EMULATION")) { - oai_emulation_ = 0; - - } else if (!xmlStrcmp(name,(unsigned char*) "ENVIRONMENT_SYSTEM_CONFIG")) { - environment_system_config_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "FADING")) { - fading_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "LARGE_SCALE")) { - large_scale_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "FREE_SPACE_MODEL_PARAMETERS")) { - free_space_model_parameters_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PATHLOSS_EXPONENT")) { - pathloss_exponent_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PATHLOSS_0_dB")) { - pathloss_0_dB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SMALL_SCALE")) { - small_scale_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RICEAN_8TAP")) { - ricean_8tap_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RICE_FACTOR_dB")) { - rice_factor_dB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SHADOWING")) { - shadowing_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "DECORRELATION_DISTANCE_m")) { - decorrelation_distance_m_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "VARIANCE_dB")) { - variance_dB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "INTER_SITE_CORRELATION")) { - inter_site_correlation_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "WALL_PENETRATION_LOSS_dB")) { - wall_penetration_loss_dB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SYSTEM_BANDWIDTH_MB")) { - system_bandwidth_MB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SYSTEM_FREQUENCY_GHz")) { - system_frequency_GHz_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_RBS_DL")) { - number_of_rbs_dl_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "TRANSMISSION_MODE")) { - transmission_mode_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "FRAME_CONFIG")) { - frame_config_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "FRAME_TYPE")) { - frame_type_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "TDD_CONFIG")) { - tdd_config_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA")) { - antenna_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_ANTENNA")) { - eNB_antenna_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_ANTENNA")) { - UE_antenna_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_SECTORS")) { - number_of_sectors_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "BEAM_WIDTH_dB")) { - beam_width_dB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ALPHA_RAD_1")) { - alpha_rad_1_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ALPHA_RAD_2")) { - alpha_rad_2_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ALPHA_RAD_3")) { - alpha_rad_3_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_GAIN_dBi")) { - antenna_gain_dBi_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "TX_POWER_dBm")) { - tx_power_dBm_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RX_NOISE_LEVEL_dB")) { - rx_noise_level_dB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_ORIENTATION_degree1")) { - antenna_orientation_degree_1_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_ORIENTATION_degree2")) { - antenna_orientation_degree_2_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_ORIENTATION_degree3")) { - antenna_orientation_degree_3_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "TOPOLOGY_CONFIG")) { - topology_config_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "AREA")) { - area_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "X_m")) { - x_m_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "Y_m")) { - y_m_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NETWORK_TYPE")) { - network_type_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "CELL_TYPE")) { - cell_type_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RELAY")) { - relay_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_RELAYS")) { - number_of_relays_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MOBILITY")) { - mobility_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_MOBILITY")) { - UE_mobility_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_MOBILITY_TYPE")) { - UE_mobility_type_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_WALK")) { - grid_walk_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_MAP")) { - grid_map_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "HORIZONTAL_GRID")) { - horizontal_grid_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "VERTICAL_GRID")) { - vertical_grid_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_TRIP_TYPE")) { - grid_trip_type_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_INITIAL_DISTRIBUTION")) { - UE_initial_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RANDOM_UE_DISTRIBUTION")) { - random_UE_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_NODES")) { - number_of_nodes_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "CONCENTRATED_UE_DISTRIBUTION")) { - concentrated_UE_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_UE_DISTRIBUTION")) { - grid_UE_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RANDOM_GRID")) { - random_grid_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "BORDER_GRID")) { - border_grid_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_MOVING_DYNAMICS")) { - UE_moving_dynamics_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MIN_SPEED_mps")) { - min_speed_mps_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MAX_SPEED_mps")) { - max_speed_mps_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MIN_SLEEP_ms")) { - min_sleep_ms_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MAX_SLEEP_ms")) { - max_sleep_ms_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MIN_JOURNEY_TIME_ms")) { - min_journey_time_ms_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MAX_JOURNEY_TIME_ms")) { - max_journey_time_ms_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_MOBILITY")) { - eNB_mobility_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_MOBILITY_TYPE")) { - eNB_mobility_type_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_INITIAL_DISTRIBUTION")) { - eNB_initial_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_INITIAL_COORDINATES")) { - eNB_initial_coordinates_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "POS_X")) { - eNB_pos_x_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "POS_Y")) { - eNB_pos_y_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RANDOM_eNB_DISTRIBUTION")) { - random_eNB_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_CELLS")) { - number_of_cells_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "HEXAGONAL_eNB_DISTRIBUTION")) { - hexagonal_eNB_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "INTER_eNB_DISTANCE_km")) { - inter_eNB_distance_km_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_eNB_DISTRIBUTION")) { - grid_eNB_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_GRID_X")) { - number_of_grid_x_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_GRID_Y")) { - number_of_grid_y_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "TRACE_MOBILITY_FILE")) { - trace_mobility_file_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_CONFIG")) { - sumo_config_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_CMD")) { - sumo_cmd_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_CONFIG_FILE")) { - sumo_config_file_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_START")) { - sumo_start_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_END")) { - sumo_end_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_STEP")) { - sumo_step_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_HOST_IP")) { - sumo_hip_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_HOST_PORT")) { - sumo_hport_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "OMV")) { - omv_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "APPLICATION_CONFIG")) { - application_config_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PREDEFINED_TRAFFIC")) { - predefined_traffic_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "CUSTOMIZED_TRAFFIC")) { - customized_traffic_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "M2M")) { - m2m_traffic_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_OFF_PU")) { - prob_off_pu_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_OFF_ED")) { - prob_off_ed_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_OFF_PE")) { - prob_off_pe_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_PU_ED")) { - prob_pu_ed_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_PU_PE")) { - prob_pu_pe_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_ED_PE")) { - prob_ed_pe_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_ED_PU")) { - prob_ed_pu_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_OFF_ED")) { - holding_time_off_ed_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_OFF_PU")) { - holding_time_off_pu_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_OFF_PE")) { - holding_time_off_pe_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_PE_OFF")) { - holding_time_pe_off_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PU_SIZE_PKTS")) { - pu_size_pkts_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "ED_SIZE_PKTS")) { - ed_size_pkts_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SOURCE_ID")) { - source_id_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "DESTINATION_ID")) { - destination_id_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "APPLICATION_TYPE")) { - application_type_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PACKET_GEN_TYPE")) { - packet_gen_type_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "BACKGROUND_TRAFFIC")) { - background_traffic_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "TRAFFIC")) { - traffic_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "TRANSPORT_PROTOCOL")) { - transport_protocol_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "AGGREGATION_LEVEL")) { - aggregation_level_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "FLOW_START_ms")) { - flow_start_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "FLOW_DURATION_ms")) { - flow_duration_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IP_VERSION")) { - ip_version_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_DIST")) { - idt_dist_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_MIN_ms")) { - idt_min_ms_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_MAX_ms")) { - idt_max_ms_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_STANDARD_DEVIATION")) { - idt_standard_deviation_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_LAMBDA")) { - idt_lambda_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_SCALE")) { - idt_scale_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_SHAPE")) { - idt_shape_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_DIST")) { - size_dist_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_MIN_byte")) { - size_min_byte_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_MAX_byte")) { - size_max_byte_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_STANDARD_DEVIATION")) { - size_standard_deviation_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_LAMBDA")) { - size_lambda_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_SCALE")) { - size_scale_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_SHAPE")) { - size_shape_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "STREAM")) { - stream_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "DESTINATION_PORT")) { - destination_port_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "EMULATION_CONFIG")) { - emulation_config_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "EMULATION_TIME_ms")) { - emulation_time_ms_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "CURVE")) { - curve_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PROFILING")) { - profiling_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "TRACE_FILE")) { - trace_file_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "BACKGROUND_STATS")) { - background_stats_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PERFORMANCE_METRICS")) { - performance_metrics_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "THROUGHPUT")) { - throughput_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "LATENCY")) { - latency_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "LOSS_RATE")) { - loss_rate_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "OWD_RADIO_ACCESS")) { - owd_radio_access_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "LAYER")) { - layer_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PHY")) { - phy_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MAC")) { - mac_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RLC")) { - rlc_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PDCP")) { - pdcp_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RRC")) { - rrc_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "OMG")) { - omg_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "OTG")) { - otg_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "EMU")) { - emu_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "LOG")) { - log_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "LEVEL")) { - level_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "VERBOSITY")) { - verbosity_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "INTERVAL")) { - interval_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PACKET_TRACE")) { - packet_trace_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SEED_VALUE")) { - seed_value_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "CLI")) { - cli_enabled_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "START_ENB")) { - cli_start_enb_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "START_UE")) { - cli_start_ue_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PROTOCOL")) { - protocol_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MAC")) { - mac_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUM_GROUPS")) { - num_groups_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PROFILE")) { - profile_ = 0; - } -} - -void characters(void *user_data, const xmlChar *xmlch, int xmllen) // called once when there is content in each element -{ - - int i; - const char *ch = (const char*) xmlch; - size_t len = (size_t) xmllen; - - if (oai_emulation_) { - if (environment_system_config_) { - if (fading_) { - if (large_scale_) { - oai_emulation.environment_system_config.fading.large_scale.selected_option = strndup(ch, len); - } else if (small_scale_) { - oai_emulation.environment_system_config.fading.small_scale.selected_option = strndup(ch, len); - } else if (shadowing_) { - if (decorrelation_distance_m_) { - oai_emulation.environment_system_config.fading.shadowing.decorrelation_distance_m = atof(ch); - } else if (variance_dB_) { - oai_emulation.environment_system_config.fading.shadowing.variance_dB = atof(ch); - } else if (inter_site_correlation_) { - oai_emulation.environment_system_config.fading.shadowing.inter_site_correlation = atof(ch); - } - } else if (free_space_model_parameters_) { - if (pathloss_exponent_) { - oai_emulation.environment_system_config.fading.free_space_model_parameters.pathloss_exponent = atof(ch); - } else if (pathloss_0_dB_) { - oai_emulation.environment_system_config.fading.free_space_model_parameters.pathloss_0_dB = atof(ch); - } - } else if (ricean_8tap_) { - oai_emulation.environment_system_config.fading.ricean_8tap.rice_factor_dB = atof(ch); - } - } else if (wall_penetration_loss_dB_) { - oai_emulation.environment_system_config.wall_penetration_loss_dB = atof(ch); - } else if (system_bandwidth_MB_) { - oai_emulation.environment_system_config.system_bandwidth_MB = atof(ch); - } else if (system_frequency_GHz_) { - oai_emulation.environment_system_config.system_frequency_GHz = atof(ch); - } else if (number_of_rbs_dl_) { - oai_emulation.info.N_RB_DL[0] = atoi(ch); - } else if (transmission_mode_) { - oai_emulation.info.transmission_mode[0] = atoi(ch); - } else if (frame_config_) { - if (frame_type_) { - oai_emulation.info.frame_type[0] = atoi(ch); - - if (oai_emulation.info.frame_type[0]) { - oai_emulation.info.frame_type_name[0] = "TDD"; - } else { - oai_emulation.info.frame_type_name[0] = "FDD"; - } - } else if (tdd_config_) { - oai_emulation.info.tdd_config[0] = atoi(ch); - } - } else if (antenna_) { - if (eNB_antenna_) { - if (number_of_sectors_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.number_of_sectors = atoi(ch); - } else if (beam_width_dB_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.beam_width_dB = atof(ch); - } else if (alpha_rad_1_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.alpha_rad[0] = atof(ch); - } else if (alpha_rad_2_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.alpha_rad[1] = atof(ch); - } else if (alpha_rad_3_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.alpha_rad[2] = atof(ch); - } else if (antenna_gain_dBi_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.antenna_gain_dBi = atof(ch); - } else if (tx_power_dBm_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.tx_power_dBm = atof(ch); - } else if (rx_noise_level_dB_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.rx_noise_level_dB = atof(ch); - } else if (antenna_orientation_degree_1_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.antenna_orientation_degree[0] = atof(ch); - } else if (antenna_orientation_degree_2_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.antenna_orientation_degree[1] = atof(ch); - } else if (antenna_orientation_degree_3_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.antenna_orientation_degree[2] = atof(ch); - } - } else if (UE_antenna_) { - if (antenna_gain_dBi_) { - oai_emulation.environment_system_config.antenna.UE_antenna.antenna_gain_dBi = atof(ch); - } else if (tx_power_dBm_) { - oai_emulation.environment_system_config.antenna.UE_antenna.tx_power_dBm = atof(ch); - } else if (rx_noise_level_dB_) { - oai_emulation.environment_system_config.antenna.UE_antenna.rx_noise_level_dB = atof(ch); - } - } - } - - } else if (topology_config_) { - if (area_) { - if (x_m_) { - oai_emulation.topology_config.area.x_m = atof(ch); - } else if (y_m_) { - oai_emulation.topology_config.area.y_m = atof(ch); - } - } else if (network_type_) { - oai_emulation.topology_config.network_type.selected_option = strndup(ch, len); - } else if (cell_type_) { - oai_emulation.topology_config.cell_type.selected_option = strndup(ch, len); - } else if (relay_) { - if (number_of_relays_) { - oai_emulation.topology_config.relay.number_of_relays = atoi(ch); - } - } else if (mobility_) { - if (UE_mobility_) { - if (UE_mobility_type_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_mobility_type.selected_option = strndup(ch, len); - - } else if (grid_walk_) { - if (grid_map_) { - oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_map.selected_option = strndup(ch, len); - /* - if (horizontal_grid_) { - oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_map.horizontal_grid = atoi(ch); - } else if (vertical_grid_) { - oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_map.vertical_grid = atoi(ch); - } - */ - } else if (grid_trip_type_) { - oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_trip_type.selected_option = strndup(ch, len); - } - } else if (UE_initial_distribution_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_initial_distribution.selected_option = strndup(ch, len); - } else if (random_UE_distribution_) { - if (number_of_nodes_) { - oai_emulation.topology_config.mobility.UE_mobility.random_UE_distribution.number_of_nodes = atoi(ch); - oai_emulation.info.nb_ue_local = oai_emulation.topology_config.mobility.UE_mobility.random_UE_distribution.number_of_nodes; - } - } else if (concentrated_UE_distribution_) { - if (number_of_nodes_) { - oai_emulation.topology_config.mobility.UE_mobility.concentrated_UE_distribution.number_of_nodes = atoi(ch); - oai_emulation.info.nb_ue_local = oai_emulation.topology_config.mobility.UE_mobility.concentrated_UE_distribution.number_of_nodes; - } - } else if (grid_UE_distribution_) { - if (random_grid_) { - if (number_of_nodes_) { - oai_emulation.topology_config.mobility.UE_mobility.grid_UE_distribution.random_grid.number_of_nodes = atoi(ch); - oai_emulation.info.nb_ue_local = oai_emulation.topology_config.mobility.UE_mobility.grid_UE_distribution.random_grid.number_of_nodes; - } - } else if (border_grid_) { - if (number_of_nodes_) { - oai_emulation.topology_config.mobility.UE_mobility.grid_UE_distribution.border_grid.number_of_nodes = atoi(ch); - oai_emulation.info.nb_ue_local = oai_emulation.topology_config.mobility.UE_mobility.grid_UE_distribution.border_grid.number_of_nodes; - } - } - } else if (UE_moving_dynamics_) { - if (min_speed_mps_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_speed_mps = atof(ch); - } else if (max_speed_mps_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_speed_mps = atof(ch); - } else if (min_sleep_ms_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_sleep_ms = atof(ch); - } else if (max_sleep_ms_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_sleep_ms = atof(ch); - } else if (min_journey_time_ms_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_journey_time_ms = atof(ch); - } else if (max_journey_time_ms_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_journey_time_ms = atof(ch); - } - } else if (trace_mobility_file_) { - oai_emulation.topology_config.mobility.UE_mobility.trace_config.trace_mobility_file=strndup(ch,len); - } else if (sumo_config_) { - if (sumo_cmd_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.command=strndup(ch,len); - } else if (sumo_config_file_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.file=strndup(ch,len); - } else if (sumo_start_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.start=atoi(ch); - } else if (sumo_end_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.end=atoi(ch); - } else if (sumo_step_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.step=atoi(ch); - } else if (sumo_hip_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.hip=strndup(ch,len); - } else if (sumo_hport_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.hport=atoi(ch); - } - } - - } else if (eNB_mobility_) { - if (eNB_mobility_type_) { - oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option = strndup(ch, len); - - } else if (eNB_initial_distribution_) { - oai_emulation.topology_config.mobility.eNB_mobility.eNB_initial_distribution.selected_option = strndup(ch, len); - } else if (eNB_initial_coordinates_) { - if (eNB_pos_x_) { - oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_x = atof(ch); - } else if (eNB_pos_y_) { - oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_y = atof(ch); - } - } else if (random_eNB_distribution_) { - if (number_of_cells_) { - oai_emulation.topology_config.mobility.eNB_mobility.random_eNB_distribution.number_of_cells = atoi(ch); - oai_emulation.info.nb_enb_local = oai_emulation.topology_config.mobility.eNB_mobility.random_eNB_distribution.number_of_cells; - } - } else if (hexagonal_eNB_distribution_) { - if (number_of_cells_) { - oai_emulation.topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.number_of_cells = atoi(ch); - oai_emulation.info.nb_enb_local = oai_emulation.topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.number_of_cells; - } else if (inter_eNB_distance_km_) { - oai_emulation.topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.inter_eNB_distance_km = atof(ch); - } - } else if (grid_eNB_distribution_) { - if (number_of_grid_x_) { - oai_emulation.topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_x = atoi(ch); - } else if (number_of_grid_y_) { - oai_emulation.topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_y = atoi(ch); - oai_emulation.info.nb_enb_local = oai_emulation.topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_x * - oai_emulation.topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_y; - } - } else if (trace_mobility_file_) { - oai_emulation.topology_config.mobility.eNB_mobility.trace_config.trace_mobility_file=strndup(ch,len); - } - } - } else if (omv_) { - oai_emulation.topology_config.omv=atoi(ch); - } - - } else if (application_config_) { - if (packet_gen_type_) { - oai_emulation.application_config.packet_gen_type=strndup(ch, len); - } else if (predefined_traffic_) { - if (source_id_) { - oai_emulation.application_config.predefined_traffic.source_id[oai_emulation.info.max_predefined_traffic_config_index] = strndup(ch, len); - } else if (destination_id_) { - oai_emulation.application_config.predefined_traffic.destination_id[oai_emulation.info.max_predefined_traffic_config_index] = strndup(ch, len); - } else if (application_type_) { - oai_emulation.application_config.predefined_traffic.application_type[oai_emulation.info.max_predefined_traffic_config_index] = strndup(ch, len); - } else if (background_traffic_) { - oai_emulation.application_config.predefined_traffic.background[oai_emulation.info.max_predefined_traffic_config_index] = strndup(ch, len); - } else if (aggregation_level_) { - oai_emulation.application_config.predefined_traffic.aggregation_level[oai_emulation.info.max_predefined_traffic_config_index] = atoi(ch); - } else if (flow_start_) { - oai_emulation.application_config.predefined_traffic.flow_start[oai_emulation.info.max_predefined_traffic_config_index] = atoi(ch); - } else if (flow_duration_) { - oai_emulation.application_config.predefined_traffic.flow_duration[oai_emulation.info.max_predefined_traffic_config_index] = atoi(ch); - } - } else if (customized_traffic_) { - - - if (prob_off_pu_) { - oai_emulation.application_config.customized_traffic.prob_off_pu[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (prob_off_ed_) { - oai_emulation.application_config.customized_traffic.prob_off_ed[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (prob_off_pe_) { - oai_emulation.application_config.customized_traffic.prob_off_pe[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (prob_pu_ed_) { - oai_emulation.application_config.customized_traffic.prob_pu_ed[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (prob_pu_pe_) { - oai_emulation.application_config.customized_traffic.prob_pu_pe[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (prob_ed_pe_) { - oai_emulation.application_config.customized_traffic.prob_ed_pe[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (prob_ed_pu_) { - oai_emulation.application_config.customized_traffic.prob_ed_pu[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (holding_time_off_ed_) { - oai_emulation.application_config.customized_traffic.holding_time_off_ed[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (holding_time_off_pu_) { - oai_emulation.application_config.customized_traffic.holding_time_off_pu[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (holding_time_off_pe_) { - oai_emulation.application_config.customized_traffic.holding_time_off_pe[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (holding_time_pe_off_) { - oai_emulation.application_config.customized_traffic.holding_time_pe_off[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (pu_size_pkts_) { - oai_emulation.application_config.customized_traffic.pu_size_pkts[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (ed_size_pkts_) { - oai_emulation.application_config.customized_traffic.ed_size_pkts[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (background_traffic_) { - oai_emulation.application_config.customized_traffic.background[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (m2m_traffic_) { - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (source_id_) { - oai_emulation.application_config.customized_traffic.source_id[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (destination_id_) { - oai_emulation.application_config.customized_traffic.destination_id[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (transport_protocol_) { - oai_emulation.application_config.customized_traffic.transport_protocol[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (ip_version_) { - oai_emulation.application_config.customized_traffic.ip_version[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (aggregation_level_) { - oai_emulation.application_config.customized_traffic.aggregation_level[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (flow_start_) { - oai_emulation.application_config.customized_traffic.flow_start[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (flow_duration_) { - oai_emulation.application_config.customized_traffic.flow_duration[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (idt_dist_) { - oai_emulation.application_config.customized_traffic.idt_dist[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (idt_min_ms_) { - oai_emulation.application_config.customized_traffic.idt_min_ms[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (idt_max_ms_) { - oai_emulation.application_config.customized_traffic.idt_max_ms[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (idt_standard_deviation_) { - oai_emulation.application_config.customized_traffic.idt_standard_deviation[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (idt_lambda_) { - oai_emulation.application_config.customized_traffic.idt_lambda[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (idt_scale_) { - oai_emulation.application_config.customized_traffic.idt_scale[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (idt_shape_) { - oai_emulation.application_config.customized_traffic.idt_shape[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (size_dist_) { - oai_emulation.application_config.customized_traffic.size_dist[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (size_min_byte_) { - oai_emulation.application_config.customized_traffic.size_min_byte[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (size_max_byte_) { - oai_emulation.application_config.customized_traffic.size_max_byte[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (size_standard_deviation_) { - oai_emulation.application_config.customized_traffic.size_standard_deviation[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (size_lambda_) { - oai_emulation.application_config.customized_traffic.size_lambda[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (size_scale_) { - oai_emulation.application_config.customized_traffic.size_scale[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (size_shape_) { - oai_emulation.application_config.customized_traffic.size_shape[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (stream_) { - oai_emulation.application_config.customized_traffic.stream[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (destination_port_) { - oai_emulation.application_config.customized_traffic.destination_port[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } - } - - } else if (emulation_config_) { - if (emulation_time_ms_) { - oai_emulation.emulation_config.emulation_time_ms = atof(ch); - } else if (curve_) { - oai_emulation.emulation_config.curve = strndup(ch, len); - } else if (profiling_) { - oai_emulation.info.opp_enabled = atoi(ch); - } else if (trace_file_) { - oai_emulation.info.opt_enabled = 1; - - if (strncmp(ch, "wireshark", len) == 0) { - opt_type = OPT_WIRESHARK; - } else if (strncmp(ch, "pcap", len) == 0) { - opt_type = OPT_PCAP; - } else { - opt_type = OPT_NONE; - oai_emulation.info.opt_enabled = 0; - } - - oai_emulation.info.opt_mode = opt_type; - } else if (background_stats_) { - oai_emulation.emulation_config.background_stats = strndup(ch, len); - } else if (performance_metrics_) { - if (throughput_) { - oai_emulation.emulation_config.performance_metrics.throughput = strndup(ch, len); - } else if (latency_) { - oai_emulation.emulation_config.performance_metrics.latency = strndup(ch, len); - } else if (loss_rate_) { - oai_emulation.emulation_config.performance_metrics.loss_rate = strndup(ch, len); - } else if (owd_radio_access_) { - oai_emulation.emulation_config.performance_metrics.owd_radio_access = strndup(ch, len); - } - } else if (layer_) { - if (phy_) { - oai_emulation.emulation_config.layer.phy = atoi(ch); - } else if (mac_) { - oai_emulation.emulation_config.layer.mac = atoi(ch); - } else if (rlc_) { - oai_emulation.emulation_config.layer.rlc = atoi(ch); - } else if (pdcp_) { - oai_emulation.emulation_config.layer.pdcp = atoi(ch); - } else if (rrc_) { - oai_emulation.emulation_config.layer.rrc = atoi(ch); - } else if (omg_) { - oai_emulation.emulation_config.layer.omg = atoi(ch); - } else if (otg_) { - oai_emulation.emulation_config.layer.otg = atoi(ch); - } else if (emu_) { - oai_emulation.emulation_config.layer.emu = atoi(ch); - } - } else if (log_) { - if (level_) { - oai_emulation.emulation_config.log_emu.level = strndup(ch,len); - } else if (verbosity_) { - oai_emulation.emulation_config.log_emu.verbosity = strndup(ch,len); - } else if (interval_) { - oai_emulation.emulation_config.log_emu.interval = atoi(ch); - } - } else if (packet_trace_) { - oai_emulation.emulation_config.packet_trace.enabled = atoi(ch); - } else if (seed_value_) { - oai_emulation.emulation_config.seed.value = atoi(ch); - } else if (cli_enabled_) { - oai_emulation.info.cli_enabled = 1; - - if (cli_start_enb_) { - for (i=0; i < oai_emulation.info.cli_num_enb; i++) - oai_emulation.info.cli_start_enb[i] = atoi(ch); - } else if (cli_start_ue_) { - for (i=0; i < oai_emulation.info.cli_num_ue; i++) - oai_emulation.info.cli_start_ue[i] = atoi(ch); - } - } - } else if (protocol_) { - if (mac_) { - if (num_groups_) { - oai_emulation.protocol_config.eNB_mac_config.num_groups=atoi(ch); - } - } - } else if (profile_) { - oai_emulation.profile = strndup(ch, len); - } - } -} - - -int parse_XML(char src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX]) -{ - // config the parser, refer to 'http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html' - xmlSAXHandler sax_handler = { 0 }; // a Simple API for XML (SAX) handler - sax_handler.startDocument = start_document; - sax_handler.endDocument = end_document; - sax_handler.startElement = start_element; - sax_handler.endElement = end_element; - sax_handler.characters = characters; - - // Parsing the XML file - if (xmlSAXUserParseFile(&sax_handler, NULL, src_file) != 0) { - LOG_E(OCG, "An error occurs while parsing the configuration file!\n"); - return MODULE_ERROR; - } - - LOG_I(OCG, "The configuration file is parsed\n"); - return MODULE_OK; -} diff --git a/openair2/UTIL/OCG/OCG_parse_XML.h b/openair2/UTIL/OCG/OCG_parse_XML.h deleted file mode 100644 index cb74a9fe1e..0000000000 --- a/openair2/UTIL/OCG/OCG_parse_XML.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_parse_XML.h -* \brief Variables indicating the element which is currently parsed -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_PARSE_XML_H__ - -#define __OCG_PARSE_XML_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _parsing_position_indicator Parsing Position Indicator - * @ingroup _parse_XML - * @brief Indicate the position where the program is current parsing in the XML file - * @{*/ - -/* @}*/ - -/** @defgroup _parse_XML Parse XML - * @ingroup _fn - * @brief Parse the XML configuration file - * @{*/ -int parse_XML(char src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_parse_filename.c b/openair2/UTIL/OCG/OCG_parse_filename.c deleted file mode 100644 index 1ecad56e20..0000000000 --- a/openair2/UTIL/OCG/OCG_parse_filename.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_parse_filename.c -* \brief Parse the filename of the XML file -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include "OCG_vars.h" -#include "OCG_parse_filename.h" -#include "UTIL/LOG/log.h" - -/*----------------------------------------------------------------------------*/ - -int parse_filename(char filename[FILENAME_LENGTH_MAX]) -{ - char *delim = "._"; - char tmp_filename[FILENAME_LENGTH_MAX]; - char *fd_tmp; - char *un_tmp; - char *ex_tmp; - - //delim = "._"; - strncpy(tmp_filename, filename, FILENAME_LENGTH_MAX); - tmp_filename[FILENAME_LENGTH_MAX - 1] = 0; // terminate string - - un_tmp = strtok(tmp_filename, delim); - fd_tmp = strtok(NULL, delim); - ex_tmp = strtok(NULL, delim); - - if ((ex_tmp == NULL) || ((strcmp(ex_tmp, "xml")) && (strcmp(ex_tmp, "XML")))) { - LOG_E(OCG, - "Please use .xml file for configuration with the format \"user_name.file_date.xml\"\nfile_date = \"year month day hour minute second\" without space, \ne.g. 20100201193045 represents in the year 2010, February 1st, 19:30:45\n"); - return MODULE_ERROR; - } else { - strncpy(file_date, fd_tmp, sizeof(file_date)); - file_date[sizeof(file_date) - 1] = 0; // terminate string - strncpy(user_name, un_tmp, sizeof(user_name)); - user_name[sizeof(user_name) - 1] = 0; // terminate string - - LOG_I(OCG, "File name is parsed as user_name = %s, file_date = %s\n", user_name, file_date); - return MODULE_OK; - } -} diff --git a/openair2/UTIL/OCG/OCG_parse_filename.h b/openair2/UTIL/OCG/OCG_parse_filename.h deleted file mode 100644 index bcc8cd11ed..0000000000 --- a/openair2/UTIL/OCG/OCG_parse_filename.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_parse_filename.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_PARSE_FILENAME_H__ - -#define __OCG_PARSE_FILENAME_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _parse_filename Parse Filename - * @ingroup _fn - * @brief Parse the filename to get user_name and file_date - * @{*/ -int parse_filename(char filename[FILENAME_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_save_XML.c b/openair2/UTIL/OCG/OCG_save_XML.c deleted file mode 100644 index 2b0d907cdf..0000000000 --- a/openair2/UTIL/OCG/OCG_save_XML.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_save_XML.c -* \brief Save the XML configuration file in the created directory for current emulation -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include "OCG_vars.h" -#include "OCG_save_XML.h" -#include "UTIL/LOG/log.h" -/*----------------------------------------------------------------------------*/ - -//int save_XML(int copy_or_move, char src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX], char dst_dir[DIR_LENGTH_MAX], char filename[FILENAME_LENGTH_MAX]) { -int save_XML(int copy_or_move, char *src_file, char *output_dir, char *filename) -{ - - FILE *fs, *ft; - int ch; - char dst_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX + 32] = ""; - char XML_saving_dir[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX + 32] = ""; - - strncpy(dst_file, output_dir, sizeof(dst_file)); - dst_file[sizeof(dst_file) - 1] = 0; // terminate string - //strcat(dst_file, "SCENARIO/XML/"); - strncpy(XML_saving_dir, dst_file, sizeof(XML_saving_dir)); - XML_saving_dir[sizeof(XML_saving_dir) - 1] = 0; // terminate string - strncat(dst_file, filename, sizeof(dst_file) - strlen(dst_file) - 1); - fs = fopen(src_file, "r"); - ft = fopen(dst_file, "w"); - - if ((ft !=NULL)&&(fs!=NULL)) { - while(1) { - ch = getc(fs); - - if(ch == EOF) { - break; - } else { - putc(ch, ft); - } - } - - } - - if (fs) - fclose(fs); - - if (ft) - fclose(ft); - - if (copy_or_move == 2) remove(src_file); - - LOG_I(OCG, "The file is saved in directory \"%s\"\n", XML_saving_dir); - return MODULE_OK; -} diff --git a/openair2/UTIL/OCG/OCG_save_XML.h b/openair2/UTIL/OCG/OCG_save_XML.h deleted file mode 100644 index ba2d9240ca..0000000000 --- a/openair2/UTIL/OCG/OCG_save_XML.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_save_XML.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_SAVE_XML_H__ - -#define __OCG_SAVE_XML_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _save_XML Save XML - * @ingroup _fn - * @brief Save the XML configuration file in dst_dir - * @{*/ -int save_XML(int demo_or_user, char src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX], char dst_dir[DIR_LENGTH_MAX], char filename[FILENAME_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_vars.h b/openair2/UTIL/OCG/OCG_vars.h deleted file mode 100644 index 947a90715c..0000000000 --- a/openair2/UTIL/OCG/OCG_vars.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -#ifndef __OCG_VARS_H__ -#define __OCG_VARS_H__ - -#include "OCG.h" - -/** @defgroup _main_val Main Variables - * @ingroup _OCG - * @brief Variables used by the main function - * @{*/ -char filename[FILENAME_LENGTH_MAX]; /*!< \brief user_name.file_date.xml */ -char user_name[FILENAME_LENGTH_MAX / 2]; /*!< \brief user_name */ -char file_date[FILENAME_LENGTH_MAX / 2]; /*!< \brief file_date */ -char src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX]; /*!< \brief USER_XML_FOLDER/user_name.file_date.xml or DEMO_XML_FOLDER/user_name.file_date.xml */ -char dst_dir[DIR_LENGTH_MAX]; /*!< \brief user_name/file_date/ */ -int copy_or_move; /*!< \brief indicating if the current emulation is with a local XML or an XML generated from the web portal */ -int file_detected; /*!< \brief indicate whether a new file is detected */ -/* @}*/ - -/** @defgroup _oks OCG Module State Indicators - * @ingroup _OCG - * @brief Indicate whether a module has processed successfully - * @{*/ -int get_opt_OK; /*!< \brief value: -9999, -1, 0 or 1 */ -int detect_file_OK; /*!< \brief value: -9999, -1 or 0 */ -int parse_filename_OK; /*!< \brief value: -9999, -1 or 0 */ -int create_dir_OK; /*!< \brief value: -9999, -1 or 0 */ -int parse_XML_OK; /*!< \brief value: -9999, -1 or 0 */ -int save_XML_OK; /*!< \brief value: -9999, -1 or 0 */ -int call_emu_OK; /*!< \brief value: -9999, -1 or 0 */ -int config_mobi_OK; /*!< \brief value: -9999, -1 or 0 */ -int generate_report_OK; /*!< \brief value: -9999, -1 or 0 */ - -OAI_Emulation oai_emulation; - - -/* @}*/ -#endif - diff --git a/openair2/UTIL/OCG/XML_to_mobigen/RWMEmulator.xml b/openair2/UTIL/OCG/XML_to_mobigen/RWMEmulator.xml deleted file mode 100644 index 062b4c9aa0..0000000000 --- a/openair2/UTIL/OCG/XML_to_mobigen/RWMEmulator.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - 1.000000 - 1.000000 - 1 - - - false - false - 500 - - - 1 - - - - 0.0 - - - 0 - 0 - 9999 - 9999 - - - diff --git a/openair2/UTIL/OCG/eurecom_20110208110244.xml b/openair2/UTIL/OCG/eurecom_20110208110244.xml deleted file mode 100644 index 15acc6fd9a..0000000000 --- a/openair2/UTIL/OCG/eurecom_20110208110244.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - 100 - 1.5 - - home - obstructed - - - 2.3 - 56 - - - - 15 - - - - 1 - -10 - - - homogeneous - macrocell - - 5 - - - - 23 - - - 25 - - 1 - - 100 - 99 - - random_waypoint - - 1 - 3 - 1 - 2 - - - - - cbr - - udp - - - 54 - - - - - 19 - - - - - - 15 - - - 1 - 1 - - - - 1 - - - - - 1 - - - 1 - - - - - - - EURECOM - \ No newline at end of file diff --git a/openair2/UTIL/OCG/local_XML/Lusheng.20110208110244.xml b/openair2/UTIL/OCG/local_XML/Lusheng.20110208110244.xml deleted file mode 100644 index 15acc6fd9a..0000000000 --- a/openair2/UTIL/OCG/local_XML/Lusheng.20110208110244.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - 100 - 1.5 - - home - obstructed - - - 2.3 - 56 - - - - 15 - - - - 1 - -10 - - - homogeneous - macrocell - - 5 - - - - 23 - - - 25 - - 1 - - 100 - 99 - - random_waypoint - - 1 - 3 - 1 - 2 - - - - - cbr - - udp - - - 54 - - - - - 19 - - - - - - 15 - - - 1 - 1 - - - - 1 - - - - - 1 - - - 1 - - - - - - - EURECOM - \ No newline at end of file diff --git a/openair2/UTIL/OCG/makefile b/openair2/UTIL/OCG/makefile deleted file mode 100644 index 1ef4ec98dc..0000000000 --- a/openair2/UTIL/OCG/makefile +++ /dev/null @@ -1,72 +0,0 @@ -include $(OPENAIR_DIR)/common/utils/Makefile.inc -LIB = -lxml2 - -TOP_DIR = ../.. -OPENAIR1_TOP = ../.. -OPENAIR2_TOP = ../../../openair2 -OPENAIR3_TOP = ../../../openair3 -OPENAIR3 = $(OPENAIR3_DIR) - -CFLAGS += -DPHYSIM -DNODE_RG -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat - - -CFLAGS += -m32 -DOPENAIR_LTE -DOPENAIR2 #-DOFDMA_ULSCH -DIFFT_FPGA -DIFFT_FPGA_UE - -#CFLAGS += -DXFORMS - -ifdef DEBUG_PHY -CFLAGS += -DDEBUG_PHY -endif - -ifdef PDCP_USE_NETLINK -CFLAGS += -DPDCP_USE_NETLINK -DLINUX -DDEBUG_CONTROL -endif - -#ifdef OCG -CFLAGS += -I/usr/include/libxml2 -lxml2 -#endif - -include $(OPENAIR1_DIR)/PHY/Makefile.inc -include $(OPENAIR1_DIR)/SCHED/Makefile.inc -include $(OPENAIR2_DIR)/LAYER2/Makefile.inc -include $(OPENAIR1_DIR)/SIMULATION/ETH_TRANSPORT/Makefile.inc - -SIMULATION_OBJS = $(TOP_DIR)/SIMULATION/TOOLS/gauss.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/random_channel.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/rangen_double.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/taus.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/multipath_channel.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/rf.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/adc.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/dac.o - -OBJ = $(PHY_OBJS) $(SIMULATION_OBJS) $(ETHERNET_TRANSPORT_OBJS) $(TOOLS_OBJS) $(SCHED_OBJS) $(STATS_OBJS) - -all: physim - - -$(OBJ) : %.o : %.c - $(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DPHY_CONTEXT=1 -I$(TOP_DIR) $(L2_incl) -o $@ $< - -$(L2_OBJS) : %.o : %.c - $(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DMAC_CONTEXT=1 -DPHY_CONTEXT=1 -I$(TOP_DIR) $(L2_incl) -o $@ $< - -physim : $(OBJ) $(L2_OBJS) OCG.c OCG_get_opt.c OCG_detect_file.c OCG_parse_filename.c OCG_create_dir.c OCG_parse_XML.c OCG_save_XML.c OCG_config_mobi.c OCG_generate_report.c - $(CC) OCG.c OCG_get_opt.c OCG_detect_file.c OCG_parse_filename.c OCG_create_dir.c OCG_parse_XML.c OCG_save_XML.c OCG_config_mobi.c OCG_generate_report.c -I$(TOP_DIR) $(L2_incl) -o physim $(CFLAGS) $(EXTRA_CFLAGS) $(OBJ) $(L2_OBJS) -lm -lforms -L/usr/local/lib -lforms -lX11 -L/usr/X11R6/lib -lXpm -lblas -lpthread - -clean: - rm -f physim - rm -f $(OBJ) - rm -f $(L2_OBJS) - rm -f *.o - rm -f *.exe* - -cleanl1: - rm -f physim - rm -f $(OBJ) - rm -f *.o - rm -f *.exe -cleanl2: - rm -f $(L2_OBJS) - - diff --git a/openair2/UTIL/OCG/readme.txt b/openair2/UTIL/OCG/readme.txt deleted file mode 100644 index 35300aa39f..0000000000 --- a/openair2/UTIL/OCG/readme.txt +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*________________________OEPNAIR/OPENAIR0/________________________ - - File : Readme.txt - Authors : Lusheng Wang - Company : EURECOM - Emails : lusheng.wang@eurecom.fr -________________________________________________________________*/ - - ------------------ -Table of contents ------------------ - -The content of this readme is the following: - - 1) What is this block about in OpenAirInterface - 2) Organization of the folders and their dependancies - 3) Folders and files description - 4) Makefile targets and how to build - 5) How to use OCG: run a simple experimentation - -------------------------------------------------- -1) What is this block about in OpenAirInterface ? -------------------------------------------------- - - This block is called OpenAirInterface Configuration Generation (OCG). Its major function is to parse the XML configuration file and configure an emulation. - - When the user specifies a scenario for emulation from the web portal, the web portal will generate an XML configuration file in the scenario folder of OCG. OCG automatically detects this file and initiates an emulation for it. During the emulation, OCG calls other blocks (such as MobiGen and TrafficGen) and gets feedbacks from them. After the emulation, OCG generates output files in the created folder of the emulation. - - OCG contains the following key modules: - - a) get opt : Get options of the OCG command, e.g. "OCG -f" and "OCG -h" - b) detect file : Detect new XML configuration file in the scenario folder - c) parse filename : Parse the filename to get user name and file date - d) create dir : Create directory in the output directory for an emulation - e) parse XML : Parse the XML configuration file - f) save XML : Save the XML configuration file in created directory - g) call emu : Call the emulator - h) generate report : Generate a report to show the states of OCG modules - ------------------------------------------------------ -2) Organization of the folders and their dependancies ------------------------------------------------------ - - Folder Description - ------ ----------- - - - src/ contains source files - - - include/ contains header files - - - demo/ contains XML configuration files for demo - - - detecting_XML/ contains nothing, but OCG will detect here the XML files generated by the web portal - - - output_folder/ if filename of the XML file can be successfully parsed, OCG creates output folders for users and generates output files for emulations here - - - temp_output_folder/ if filename of the XML file cannot be successfully parsed, OCG generates an output file here - --------------------------------- -3) Folders and files description --------------------------------- - - Folder/File Description - ----------- ----------- - - - src/OCG.c contains the main() function with the FSM of OCG - - - src/OCG_get_opt.c contains the get_opt() function - - - src/OCG_detect_file.c contains the detect_file() function - - - src/OCG_parse_filename.c contains the parse_filename() function - - - src/OCG_create_dir.c contains the create_dir() function - - - src/OCG_parse_XML.c contains the parse_XML() function - - - src/OCG_save_XML.c contains the save_XML() function - - - src/OCG_call_emu.c contains the call_emu() function - - - src/OCG_generate_report.c contains the generate_report() function - - - include/OCG.h header file of main(), contains the data structure of the basic OpenAirInterface Scenario Descriptor (OSD), etc. - - - include/OCG_get_opt.h header file of get_opt() - - - include/OCG_detect_file.h header file of detect_file() - - - include/OCG_parse_filename.h header file of parse_filename() - - - include/OCG_create_dir.h header file of create_dir() - - - include/OCG_parse_XML.h header file of parse_XML(), contains the declaration of parsing position indicators - - - include/OCG_save_XML.h header file of save_XML() - - - include/OCG_call_emu.h header file of call_emu() - - - include/OCG_generate_report.h header file of generate_report() - - - demo/eurecom.20110208110244.xml contains a demo - -------------------------------------- -4) Makefile targets and how to build -------------------------------------- - - CC= gcc - CFLAGS = -I/usr/include/libxml2 - LIB = -lxml2 - - OCG: - ${CC} ${CFLAGS} ${LIB} src/OCG.c src/OCG_get_opt.c src/OCG_detect_file.c src/OCG_parse_filename.c src/OCG_create_dir.c src/OCG_parse_XML.c src/OCG_save_XML.c src/OCG_call_emu.c src/OCG_generate_OCG_report.c -o OCG - ---------------------------------------------------------------- -6) How to use OCG: run a simple experimentation ---------------------------------------------------------------- - - There are two methods to use the OCG for an emulation: - - a) DEMO mode : use command "OCG -f filename" to run a DEMO mode emulation - - The following steps are required for a DEMO mode emulation: - - i) Put your XML configuration file into the demo/ folder; - - ii) Change the filename as user_name.file_date.xml; - - iii) Run the emulation with the above command; - - iv) Check debug information in the shell, which indicates you the directory where OCG generates the outputs. - - To run an existing demo XML file, step i) and ii) are not required. - - Note that OCG automatically set the path of a demo XML file as demo/, so only filename is required in the command. - - b) USER mode : use command "OCG" to start OCG as a daemon - - The following steps are required for a USER mode emulation: - - i) Run OCG as a daemon with the above command; - - iiA) Configure an emulation scenario through the web portal and press the button to generate an XML file; or - - iiB) Copy your XML file to the detecting_XML/ folder directly; - - iii) Check debug information in the shell, which indicates you the directory where OCG generates the outputs. - - For option iiB), make sure the filename is with the correct format "user_name.file_date.xml". Moreover, make sure the configuration in the XML file is correct. - For the format of the XML configuration file, refer to "demo/eurecom.20110208110244.xml". - - diff --git a/openair2/UTIL/OCG/temp_output/OCG_report.xml b/openair2/UTIL/OCG/temp_output/OCG_report.xml deleted file mode 100644 index 37ef79b4b8..0000000000 --- a/openair2/UTIL/OCG/temp_output/OCG_report.xml +++ /dev/null @@ -1,9 +0,0 @@ - - in this output file, -9999 means NOT_PROCESSED; -2 means NO_FILE; -1 means ERROR; 0 means OK - -2 - 0 - -1 - -9999 - -9999 - -9999 - -9999 diff --git a/openair2/UTIL/OMG/omg.h b/openair2/UTIL/OMG/omg.h index 07dbf1f750..a233164062 100644 --- a/openair2/UTIL/OMG/omg.h +++ b/openair2/UTIL/OMG/omg.h @@ -63,7 +63,7 @@ Given the great importance of mobility features in the world of wireless communi /** @defgroup _omg_ OMG: The mobility generator of OpenAirInterface * @ingroup _omg OMG, or OpenAir Mobility Generation has born to add the mobility features to OpenAir given the increasing importance of realistic mobility patterns in the world of wireless networks and the need for simulation to explore this area. OMG includes the most used mobility models, in three classes, namely: \b EMBEDDED \b TRACE \ FEDERATED. In the \b EMBEDDED class, random mobility is embedded in OMG. The most used random models have been implemneted, namely \b Random \b Walk , \b Random \b Way \b Point and \b Graph based mobility. The \b TRACE class is able to load into OMG and OAI trace-based mobility files. The \b FEDERATED class allows OMG to interface with an external mobility/traffic generator to obtain and change mobility patterns. The \b FEDERATED class currently support the federation with SUMO, Simulation of Urban Mobility, but could easily be extended to accept other simulator. Thus, it is capable of abstracting the motion of vehicles or mobile nodes in different ways. And since it is also useful to model the fix nodes that can exist in the road to communicate with the mobile nodes, a \b STATIC model is also included in OMG. \n -OMG has a direct relation ship with the already existing \b OCG module (OpenAir Config Generation). Actually, this latter module is responsible of setting the emulation time to synchronize OMG, requesting OMG to start simulation scenario, update the nodes positions and many other features. (see section Specification) \n +OMG has a direct relation ship with the (edit: deleted as of 2023-03-09) OCG module (OpenAir Config Generation). Actually, this latter module is responsible of setting the emulation time to synchronize OMG, requesting OMG to start simulation scenario, update the nodes positions and many other features. (see section Specification) \n */ diff --git a/targets/TEST/AT_COMMANDS/Makefile b/targets/TEST/AT_COMMANDS/Makefile index fc5f550329..aa834872e7 100644 --- a/targets/TEST/AT_COMMANDS/Makefile +++ b/targets/TEST/AT_COMMANDS/Makefile @@ -48,7 +48,6 @@ RRC_DIR = $(OPENAIR2_TOP)/RRC/LITE L2_INTERFACE_DIR = $(OPENAIR2_TOP)/RRC/L2_INTERFACE MAC_DIR = $(OPENAIR2_TOP)/LAYER2/MAC LOG_DIR=$(OPENAIR2_TOP)/UTIL/LOG -OCG_DIR=$(OPENAIR2_TOP)/UTIL/OCG OPT_DIR=$(OPENAIR2_TOP)/UTIL/OPT diff --git a/targets/TEST/AT_COMMANDS/oaisim.c b/targets/TEST/AT_COMMANDS/oaisim.c index e14373f87f..bbbbe3da5f 100644 --- a/targets/TEST/AT_COMMANDS/oaisim.c +++ b/targets/TEST/AT_COMMANDS/oaisim.c @@ -36,7 +36,6 @@ #include "UTIL/LOG/log_extern.h" #include "RRC/LTE/vars.h" #include "PHY_INTERFACE/vars.h" -#include "UTIL/OCG/OCG.h" #include "UTIL/AT_COMMANDS/parser.h" mapping level_names[] = { diff --git a/targets/TEST/PACKET_TRACER/Makefile b/targets/TEST/PACKET_TRACER/Makefile index e7a4e70bf9..f49fefe454 100644 --- a/targets/TEST/PACKET_TRACER/Makefile +++ b/targets/TEST/PACKET_TRACER/Makefile @@ -20,10 +20,7 @@ endif # activate OCG and libxml only under linux ifeq ($(linux),1) CFLAGS += -I/usr/include/libxml2 -L/usr/local/lib -I/usr/include/atlas -L/usr/X11R6/lib -OCG_FLAG = 1 CFLAGS += -DLINUX -else -OCG_FLAG = 0 endif @@ -100,7 +97,6 @@ printvars: @echo LINUX variable is $(linux) @echo rrc_cellular variable is $(rrc_cellular) @echo EXTRA_CFLAGS = $(EXTRA_CFLAGS) - @echo OAI Config generator is $(OCG_FLAG) @echo OAI NETLINK FLAG is $(NAS_FLAG) @echo SSE3 proc is $(SSE3PROC) @echo IS_REL_8 is $(IS_REL_8) @@ -153,7 +149,6 @@ cleanasn1: rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated print: - @echo $(OCG_FLAG) @echo $(CFLAGS) @echo $(EXTRA_CFLAGS) @echo $(OBJ) diff --git a/targets/TEST/PACKET_TRACER/pt.c b/targets/TEST/PACKET_TRACER/pt.c index 54f3a09405..24c1fe495a 100644 --- a/targets/TEST/PACKET_TRACER/pt.c +++ b/targets/TEST/PACKET_TRACER/pt.c @@ -39,7 +39,6 @@ #include "RRC/LTE/vars.h" #include "PHY_INTERFACE/vars.h" #include "UTIL/LOG/log.h" -#include "OCG_vars.h" #include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg.h" #include "UTIL/OTG/otg_vars.h" @@ -512,7 +511,6 @@ int main (int argc, char **argv) /* set_log(OMG, LOG_INFO, 20); set_log(EMU, LOG_INFO, 10); - set_log(OCG, LOG_INFO, 1); set_log(MAC, LOG_TRACE, 1); set_log(RLC, LOG_TRACE, 1); set_log(PHY, LOG_DEBUG, 1); diff --git a/targets/TEST/PDCP/Makefile b/targets/TEST/PDCP/Makefile index 805cabe7cb..c1f4416bee 100644 --- a/targets/TEST/PDCP/Makefile +++ b/targets/TEST/PDCP/Makefile @@ -48,7 +48,6 @@ RRC_DIR = $(OPENAIR2_TOP)/RRC/LITE L2_INTERFACE_DIR = $(OPENAIR2_TOP)/RRC/L2_INTERFACE MAC_DIR = $(OPENAIR2_TOP)/LAYER2/MAC LOG_DIR=$(OPENAIR2_TOP)/UTIL/LOG -OCG_DIR=$(OPENAIR2_TOP)/UTIL/OCG OPT_DIR=$(OPENAIR2_TOP)/UTIL/OPT SOURCES_L2 = $(LIST_DIR)/list.c @@ -66,8 +65,7 @@ OPT_OBJS = $(OPT_DIR)/probe.o L2_OBJS=$(addsuffix .o,$(basename $(SOURCES_L2))) $(PHY_INTERFACE_OBJS) $(MAC_OBJS) $(L2_INTERFACE_OBJS) $(RRC_OBJS) $(LOG_OBJS) $(OPT_OBJS) L2_incl = -I$(OPENAIR2_TOP) -I$(COMMON_DIR) -I$(RLC_DIR) -I$(RLC_AM_DIR) -I$(RLC_UM_DIR) -I$(RLC_TM_DIR) -I$(PDCP_DIR) -I$(MEM_DIR) -I$(LIST_DIR) \ - -I$(LOG_DIR) -I$(MATH_DIR) -I$(TIMER_DIR) -I$(OPENAIR3)/MESH -I$(OPENAIR2_TOP)/RRC/MESH -I$(OPENAIR2_TOP)/RRC/MESH/MESSAGES -I$(OPENAIR3)/MESH/RRM -I$(OPT_DIR) \ - -I$(OCG_DIR) + -I$(LOG_DIR) -I$(MATH_DIR) -I$(TIMER_DIR) -I$(OPENAIR3)/MESH -I$(OPENAIR2_TOP)/RRC/MESH -I$(OPENAIR2_TOP)/RRC/MESH/MESSAGES -I$(OPENAIR3)/MESH/RRM -I$(OPT_DIR) ASN1_MSG_OBJS2 := $(foreach file, $(ASN1_MSG_OBJS), $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/$(file)) diff --git a/targets/TEST/PDCP/test_pdcp.c b/targets/TEST/PDCP/test_pdcp.c index d6becf87c1..f5f34daec6 100644 --- a/targets/TEST/PDCP/test_pdcp.c +++ b/targets/TEST/PDCP/test_pdcp.c @@ -28,7 +28,6 @@ #include "MAC_INTERFACE/vars.h" #include "LAYER2/MAC/vars.h" #include "UTIL/LOG/log_if.h" -#include "OCG_vars.h" #include "test_util.h" #include "test_pdcp.h" diff --git a/targets/TEST/PDCP/with_rlc/Makefile.data_bearer b/targets/TEST/PDCP/with_rlc/Makefile.data_bearer index d1397d3f49..865545c50f 100644 --- a/targets/TEST/PDCP/with_rlc/Makefile.data_bearer +++ b/targets/TEST/PDCP/with_rlc/Makefile.data_bearer @@ -48,7 +48,6 @@ RRC_DIR = $(OPENAIR2_TOP)/RRC/LITE L2_INTERFACE_DIR = $(OPENAIR2_TOP)/RRC/L2_INTERFACE MAC_DIR = $(OPENAIR2_TOP)/LAYER2/MAC LOG_DIR=$(OPENAIR2_TOP)/UTIL/LOG -OCG_DIR=$(OPENAIR2_TOP)/UTIL/OCG OPT_DIR=$(OPENAIR2_TOP)/UTIL/OPT SOURCES_L2 = $(LIST_DIR)/list.c @@ -104,8 +103,7 @@ OPT_OBJS = $(OPT_DIR)/probe.o L2_OBJS=$(addsuffix .o,$(basename $(SOURCES_L2))) $(PHY_INTERFACE_OBJS) $(MAC_OBJS) $(L2_INTERFACE_OBJS) $(RRC_OBJS) $(LOG_OBJS) $(OPT_OBJS) L2_incl = -I$(OPENAIR2_TOP) -I$(COMMON_DIR) -I$(RLC_DIR) -I$(RLC_AM_DIR) -I$(RLC_UM_DIR) -I$(RLC_TM_DIR) -I$(PDCP_DIR) -I$(MEM_DIR) -I$(LIST_DIR) \ - -I$(LOG_DIR) -I$(MATH_DIR) -I$(TIMER_DIR) -I$(OPENAIR3)/MESH -I$(OPENAIR2_TOP)/RRC/MESH -I$(OPENAIR2_TOP)/RRC/MESH/MESSAGES -I$(OPENAIR3)/MESH/RRM -I$(OPT_DIR) \ - -I$(OCG_DIR) + -I$(LOG_DIR) -I$(MATH_DIR) -I$(TIMER_DIR) -I$(OPENAIR3)/MESH -I$(OPENAIR2_TOP)/RRC/MESH -I$(OPENAIR2_TOP)/RRC/MESH/MESSAGES -I$(OPENAIR3)/MESH/RRM -I$(OPT_DIR) ASN1_MSG_OBJS2 := $(foreach file, $(ASN1_MSG_OBJS), $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/$(file)) diff --git a/targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c b/targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c index 507521ee1e..d2a0d4c6dc 100644 --- a/targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c +++ b/targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c @@ -36,9 +36,7 @@ #include "UTIL/LOG/log_extern.h" #include "RRC/LTE/vars.h" #include "PHY_INTERFACE/vars.h" -#include "UTIL/OCG/OCG.h" #include "LAYER2/PDCP_v10.1.0/pdcp.h" -#include "OCG_vars.h" #include "rlc.h" #include "pdcp.h"