Remove unused OCG (OpenAir Config Generator)

This commit is contained in:
Robert Schmidt
2023-03-11 15:50:50 +01:00
parent c9db9b4c22
commit 6791974004
85 changed files with 8 additions and 4519 deletions
-1
View File
@@ -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")
-1
View File
@@ -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);
-1
View File
@@ -197,7 +197,6 @@ typedef enum {
MAC,
EMU,
SIM,
OCG,
OMG,
OPT,
OTG,
-21
View File
@@ -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
-3
View File
@@ -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 \
-1
View File
@@ -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"
@@ -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"
-1
View File
@@ -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"
-1
View File
@@ -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"
-1
View File
@@ -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"
-1
View File
@@ -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"
-1
View File
@@ -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"
-2
View File
@@ -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;
-1
View File
@@ -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"
-2
View File
@@ -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!
-1
View File
@@ -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"
-2
View File
@@ -41,8 +41,6 @@
#include "PHY/TOOLS/lte_phy_scope.h"
#endif
#include "OCG_vars.h"
#define BW 20.0
-1
View File
@@ -50,7 +50,6 @@
#endif //XFORMS
#include "OCG_vars.h"
#include "openair_hw.h"
#define BW 5.0
-1
View File
@@ -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"
-1
View File
@@ -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 <openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h>
#include <openair2/RRC/LTE/rrc_vars.h>
#include <executables/softmodem-common.h>
-1
View File
@@ -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"
-2
View File
@@ -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"
-2
View File
@@ -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"
-2
View File
@@ -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"
+1 -2
View File
@@ -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"
+1 -2
View File
@@ -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"
-2
View File
@@ -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"
@@ -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
@@ -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"
+1 -2
View File
@@ -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"
-2
View File
@@ -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"
-2
View File
@@ -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"
-2
View File
@@ -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"
-2
View File
@@ -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"
-2
View File
@@ -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"
@@ -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"
@@ -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"
@@ -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"
-2
View File
@@ -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 <inttypes.h>
-2
View File
@@ -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"
@@ -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"
+1 -2
View File
@@ -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"
-2
View File
@@ -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"
-2
View File
@@ -31,8 +31,6 @@
#include "cli.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "log.h"
#include "log_extern.h"
+1 -1
View File
@@ -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
-3
View File
@@ -1,3 +0,0 @@
[Dolphin]
Sorting=6
Timestamp=2011,2,7,10,19,55
-231
View File
@@ -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
-263
View File
@@ -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 <libxml/tree.h>
#include <libxml/parser.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <math.h>
#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
}
-769
View File
@@ -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
-60
View File
@@ -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 <stdio.h>
#include <string.h>
#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;
}
-51
View File
@@ -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
-117
View File
@@ -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 <string.h>
#include <libxml/encoding.h>
#include <libxml/xmlwriter.h>
#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;
}
-51
View File
@@ -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
-93
View File
@@ -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 <stdio.h>
#include <string.h>
#include <sys/stat.h>
#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;
}
-51
View File
@@ -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
-117
View File
@@ -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 <stdio.h>
#include <string.h>
#include <dirent.h>
#include <sys/stat.h>
#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;
}
-52
View File
@@ -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
-51
View File
@@ -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
-70
View File
@@ -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 <stdio.h>
#include <string.h>
#include <libxml/encoding.h>
#include <libxml/xmlwriter.h>
#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;
}
-51
View File
@@ -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
-69
View File
@@ -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 <libxml/tree.h>
#include <libxml/parser.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#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;
}
-50
View File
@@ -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
-64
View File
@@ -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
File diff suppressed because it is too large Load Diff
-58
View File
@@ -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
-71
View File
@@ -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 <stdio.h>
#include <string.h>
#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;
}
}
-51
View File
@@ -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
-82
View File
@@ -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 <stdio.h>
#include <string.h>
#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;
}
-51
View File
@@ -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
-59
View File
@@ -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
@@ -1,26 +0,0 @@
<?xml version="1.0"?>
<universe>
<dimx>1.000000</dimx>
<dimy>1.000000</dimy>
<seed>1</seed>
<extension class="de.uni_stuttgart.informatik.canu.mobisim.simulations.TimeSimulation" param="1.000000"/>
<extension class="de.uni_stuttgart.informatik.canu.spatialmodel.core.SpatialModel" max_x="1.000000" max_y="1.000000" min_x="0" min_y="0">
<dump_boundary_points>false</dump_boundary_points>
<separated_flow>false</separated_flow>
<max_traffic_lights>500</max_traffic_lights>
</extension>
<extension class="de.uni_stuttgart.informatik.canu.mobisim.extensions.ReportNodeMobility" output="mobi_XML/root.20110309123817.xml">
<step>1</step>
</extension>
<nodegroup car2x="false" id="" n="50" type="car">
<position random="true">
<z>0.0</z>
</position>
<extension class="de.uni_stuttgart.informatik.canu.mobisim.mobilitymodels.RandomWaypointWalk">
<minspeed>0</minspeed>
<maxspeed>0</maxspeed>
<minstay>9999</minstay>
<maxstay>9999</maxstay>
</extension>
</nodegroup>
</universe>
@@ -1,92 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<OPENAIRINTERFACE>
<ENVICONFIG>
<AREA>
<X>100</X>
<Y>1.5</Y>
</AREA>
<GEOGRAPHY>home</GEOGRAPHY>
<TOPOGRAPHY>obstructed</TOPOGRAPHY>
<FADING>
<FREESPACEPROPAGATION>
<PATHLOSSEXPONENT>2.3</PATHLOSSEXPONENT>
<PATHLOSS0>56</PATHLOSS0>
</FREESPACEPROPAGATION>
<SMALLSCALE>
<RAYLEIGH>
<DELAYSPREAD>15</DELAYSPREAD>
</RAYLEIGH>
</SMALLSCALE>
</FADING>
<WALLPENETRATIONLOSS>1</WALLPENETRATIONLOSS>
<NOISEPOWER>-10</NOISEPOWER>
</ENVICONFIG>
<TOPOCONFIG>
<TYPE>homogeneous</TYPE>
<CELLTYPE>macrocell</CELLTYPE>
<RELAY>
<NUMBEROFRELAYS>5</NUMBEROFRELAYS>
</RELAY>
<ENBTOPOLOGY>
<HEXAGONAL>
<NUMBEROFCELLS>23</NUMBEROFCELLS>
</HEXAGONAL>
</ENBTOPOLOGY>
<INTERENBDISTANCE>25</INTERENBDISTANCE>
<UEDISTRIBUTION>
<CONCENTRATED>1</CONCENTRATED>
</UEDISTRIBUTION>
<SYSTEMBANDWIDTH>100</SYSTEMBANDWIDTH>
<UEFREQUENCY>99</UEFREQUENCY>
<MOBILITY>
<MOBILITYTYPE>random_waypoint</MOBILITYTYPE>
<MOVINGDYNAMICS>
<MINSPEED>1</MINSPEED>
<MAXSPEED>3</MAXSPEED>
<MINPAUSETIME>1</MINPAUSETIME>
<MAXPAUSETIME>2</MAXPAUSETIME>
</MOVINGDYNAMICS>
</MOBILITY>
</TOPOCONFIG>
<APPCONFIG>
<APPTYPE>cbr</APPTYPE>
<TRAFFIC>
<TRANSPORTPROTOCOL>udp</TRANSPORTPROTOCOL>
<PACKETSIZE>
<FIXED>
<FIXEDVALUE>54</FIXEDVALUE>
</FIXED>
</PACKETSIZE>
<INTERARRIVALTIME>
<FIXED>
<FIXEDVALUE>19</FIXEDVALUE>
</FIXED>
</INTERARRIVALTIME>
</TRAFFIC>
</APPCONFIG>
<EMUCONFIG>
<EMUTIME>15</EMUTIME>
<PERFORMANCE>
<METRIC>
<THROUGHPUT>1</THROUGHPUT>
<LATENCY>1</LATENCY>
<SIGNALLINGOVERHEAD></SIGNALLINGOVERHEAD>
</METRIC>
<LAYER>
<MAC>1</MAC>
<RLC></RLC>
<PDCP></PDCP>
</LAYER>
<LOGEMU>
<DEBUG>1</DEBUG>
<INFO></INFO>
<WARNING></WARNING>
<ERROR>1</ERROR>
</LOGEMU>
<PACKETTRACE>
<MAC></MAC>
</PACKETTRACE>
</PERFORMANCE>
</EMUCONFIG>
<PROFILE>EURECOM</PROFILE>
</OPENAIRINTERFACE>
@@ -1,92 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<OPENAIRINTERFACE>
<ENVICONFIG>
<AREA>
<X>100</X>
<Y>1.5</Y>
</AREA>
<GEOGRAPHY>home</GEOGRAPHY>
<TOPOGRAPHY>obstructed</TOPOGRAPHY>
<FADING>
<FREESPACEPROPAGATION>
<PATHLOSSEXPONENT>2.3</PATHLOSSEXPONENT>
<PATHLOSS0>56</PATHLOSS0>
</FREESPACEPROPAGATION>
<SMALLSCALE>
<RAYLEIGH>
<DELAYSPREAD>15</DELAYSPREAD>
</RAYLEIGH>
</SMALLSCALE>
</FADING>
<WALLPENETRATIONLOSS>1</WALLPENETRATIONLOSS>
<NOISEPOWER>-10</NOISEPOWER>
</ENVICONFIG>
<TOPOCONFIG>
<TYPE>homogeneous</TYPE>
<CELLTYPE>macrocell</CELLTYPE>
<RELAY>
<NUMBEROFRELAYS>5</NUMBEROFRELAYS>
</RELAY>
<ENBTOPOLOGY>
<HEXAGONAL>
<NUMBEROFCELLS>23</NUMBEROFCELLS>
</HEXAGONAL>
</ENBTOPOLOGY>
<INTERENBDISTANCE>25</INTERENBDISTANCE>
<UEDISTRIBUTION>
<CONCENTRATED>1</CONCENTRATED>
</UEDISTRIBUTION>
<SYSTEMBANDWIDTH>100</SYSTEMBANDWIDTH>
<UEFREQUENCY>99</UEFREQUENCY>
<MOBILITY>
<MOBILITYTYPE>random_waypoint</MOBILITYTYPE>
<MOVINGDYNAMICS>
<MINSPEED>1</MINSPEED>
<MAXSPEED>3</MAXSPEED>
<MINPAUSETIME>1</MINPAUSETIME>
<MAXPAUSETIME>2</MAXPAUSETIME>
</MOVINGDYNAMICS>
</MOBILITY>
</TOPOCONFIG>
<APPCONFIG>
<APPTYPE>cbr</APPTYPE>
<TRAFFIC>
<TRANSPORTPROTOCOL>udp</TRANSPORTPROTOCOL>
<PACKETSIZE>
<FIXED>
<FIXEDVALUE>54</FIXEDVALUE>
</FIXED>
</PACKETSIZE>
<INTERARRIVALTIME>
<FIXED>
<FIXEDVALUE>19</FIXEDVALUE>
</FIXED>
</INTERARRIVALTIME>
</TRAFFIC>
</APPCONFIG>
<EMUCONFIG>
<EMUTIME>15</EMUTIME>
<PERFORMANCE>
<METRIC>
<THROUGHPUT>1</THROUGHPUT>
<LATENCY>1</LATENCY>
<SIGNALLINGOVERHEAD></SIGNALLINGOVERHEAD>
</METRIC>
<LAYER>
<MAC>1</MAC>
<RLC></RLC>
<PDCP></PDCP>
</LAYER>
<LOGEMU>
<DEBUG>1</DEBUG>
<INFO></INFO>
<WARNING></WARNING>
<ERROR>1</ERROR>
</LOGEMU>
<PACKETTRACE>
<MAC></MAC>
</PACKETTRACE>
</PERFORMANCE>
</EMUCONFIG>
<PROFILE>EURECOM</PROFILE>
</OPENAIRINTERFACE>
-72
View File
@@ -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)
-174
View File
@@ -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".
@@ -1,9 +0,0 @@
<?xml version="1.0"?>
<COMMENT > in this output file, -9999 means NOT_PROCESSED; -2 means NO_FILE; -1 means ERROR; 0 means OK </COMMENT >
<OCG_GET_OPT > -2 </OCG_GET_OPT >
<OCG_DETECT_FILE > 0 </OCG_DETECT_FILE >
<OCG_PARSE_FILENAME> -1 </OCG_PARSE_FILENAME>
<OCG_CREATE_DIR > -9999 </OCG_CREATE_DIR >
<OCG_PARSE_XML > -9999 </OCG_PARSE_XML >
<OCG_SAVE_XML > -9999 </OCG_SAVE_XML >
<OCG_CALL_EMU > -9999 </OCG_CALL_EMU >
+1 -1
View File
@@ -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
*/
-1
View File
@@ -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
-1
View File
@@ -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[] = {
-5
View File
@@ -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)
-2
View File
@@ -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);
+1 -3
View File
@@ -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))
-1
View File
@@ -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"
@@ -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))
@@ -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"