merge develop
This commit is contained in:
@@ -37,12 +37,6 @@ include("cmake_targets/macros.cmake")
|
||||
###################################
|
||||
include(FindPkgConfig)
|
||||
|
||||
pkg_search_module(LIBXML2 libxml-2.0 REQUIRED)
|
||||
include_directories(${LIBXML2_INCLUDE_DIRS})
|
||||
|
||||
pkg_search_module(LIBXSLT libxslt REQUIRED)
|
||||
include_directories(${LIBXSLT_INCLUDE_DIRS})
|
||||
|
||||
pkg_search_module(OPENSSL openssl REQUIRED)
|
||||
include_directories(${OPENSSL_INCLUDE_DIRS})
|
||||
|
||||
@@ -743,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")
|
||||
@@ -2162,7 +2155,6 @@ target_link_libraries(lte-softmodem PRIVATE
|
||||
${NAS_UE_LIB} ITTI SIMU SIMU_ETH
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries(lte-softmodem PRIVATE ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries(lte-softmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp)
|
||||
target_link_libraries(lte-softmodem PRIVATE ${T_LIB})
|
||||
target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
@@ -2225,7 +2217,6 @@ target_link_libraries(lte-uesoftmodem PRIVATE
|
||||
${NAS_UE_LIB} ITTI ${ATLAS_LIBRARIES}
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${ATLAS_LIBRARIES})
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE ${T_LIB})
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
@@ -2267,7 +2258,6 @@ target_link_libraries(nr-softmodem PRIVATE
|
||||
x2ap f1ap m2ap m3ap e1ap
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries(nr-softmodem PRIVATE ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${ATLAS_LIBRARIES})
|
||||
target_link_libraries(nr-softmodem PRIVATE ${T_LIB})
|
||||
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
@@ -2330,7 +2320,6 @@ target_link_libraries(nr-uesoftmodem PRIVATE
|
||||
ITTI ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB} SIMU SIMU_ETH
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries(nr-uesoftmodem PRIVATE ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries(nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries(nr-uesoftmodem PRIVATE ${T_LIB})
|
||||
target_link_libraries(nr-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
@@ -429,6 +429,7 @@ def GetParametersFromXML(action):
|
||||
elif action == 'Custom_Command':
|
||||
RAN.node = test.findtext('node')
|
||||
RAN.command = test.findtext('command')
|
||||
RAN.command_fail = test.findtext('command_fail') in ['True', 'true', 'Yes', 'yes']
|
||||
|
||||
else:
|
||||
logging.warning(f"unknown action {action} from option-parsing point-of-view")
|
||||
@@ -752,6 +753,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
elif action == 'Custom_Command':
|
||||
logging.info(f"Executing custom command")
|
||||
RAN.CustomCommand(HTML)
|
||||
if RAN.prematureExit:
|
||||
CiTestObj.AutoTerminateeNB(HTML,RAN,EPC,CONTAINERS)
|
||||
elif action == 'Initialize_eNB':
|
||||
RAN.InitializeeNB(HTML, EPC)
|
||||
if RAN.prematureExit:
|
||||
|
||||
+15
-9
@@ -99,6 +99,7 @@ class RANManagement():
|
||||
self.cmd_prefix = '' # prefix before {lte,nr}-softmodem
|
||||
self.node = ''
|
||||
self.command = ''
|
||||
self.command_fail = False
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
@@ -259,19 +260,24 @@ class RANManagement():
|
||||
self.checkBuildeNB(lIpAddr, lUserName, lPassWord, lSourcePath, self.backgroundBuildTestId[int(self.eNB_instance)], HTML)
|
||||
|
||||
def CustomCommand(self, HTML):
|
||||
if self.node == '' or self.node == "localhost":
|
||||
cmd = cls_cmd.LocalCmd()
|
||||
else:
|
||||
cmd = cls_cmd.RemoteCmd(self.node)
|
||||
cmd = cls_cmd.getConnection(self.node)
|
||||
ret = cmd.run(self.command)
|
||||
cmd.close()
|
||||
logging.debug(f'CustomCommand: {self.command} returnCode: {ret.returncode} output: {ret.stdout}')
|
||||
html_queue = SimpleQueue()
|
||||
logging.debug(f'CustomCommand: {self.command} returnCode: {ret.returncode}')
|
||||
status = 'OK'
|
||||
if ret.returncode != 0:
|
||||
html_queue.put(ret.stdout)
|
||||
message = []
|
||||
if ret.returncode != 0 and not self.command_fail:
|
||||
message = [ret.stdout]
|
||||
logging.warning(f'CustomCommand output: {message}')
|
||||
status = 'Warning'
|
||||
HTML.CreateHtmlTestRow(self.command, status, 1, html_queue)
|
||||
if self.command_fail: # important command since it would make the pipeline fail, so show output in HTML
|
||||
message = [ret.stdout]
|
||||
if ret.returncode != 0 and self.command_fail:
|
||||
message = [ret.stdout]
|
||||
logging.error(f'CustomCommand failed: output: {message}')
|
||||
status = 'KO'
|
||||
self.prematureExit = True
|
||||
HTML.CreateHtmlTestRowQueue(self.command, status, message)
|
||||
|
||||
def checkBuildeNB(self, lIpAddr, lUserName, lPassWord, lSourcePath, testcaseId, HTML):
|
||||
HTML.testCase_id=testcaseId
|
||||
|
||||
@@ -185,8 +185,8 @@
|
||||
|
||||
<testCase id="070000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/125Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 125M -t 60 -i 1 -fm</iperf_args>
|
||||
<desc>iperf (DL/90Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 90M -t 60 -i 1 -fm</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>TEST-SA-FR1-B200</htmlTabRef>
|
||||
<htmlTabName>40 MHz TDD SA</htmlTabName>
|
||||
<htmlTabName>20 MHz TDD SA</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
@@ -36,6 +36,10 @@
|
||||
070000
|
||||
070001
|
||||
070002
|
||||
060001
|
||||
000002
|
||||
060002
|
||||
050000
|
||||
010010
|
||||
010002
|
||||
030201
|
||||
@@ -136,8 +140,8 @@
|
||||
|
||||
<testCase id="070001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/8Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 8M -t 30 -i 1 -fm</iperf_args>
|
||||
<desc>iperf (UL/3.5Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 3.5M -t 30 -i 1 -fm</iperf_args>
|
||||
<direction>UL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>1</iperf_packetloss_threshold>
|
||||
@@ -154,6 +158,21 @@
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060001">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Trigger Reestablishment</desc>
|
||||
<node>nepes</node>
|
||||
<command>echo ci force_reestab | nc -N 192.168.68.194 9090 | grep -E 'force-remove UE RNTI [0-9a-f]{4} from RLC to trigger reestablishment'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
<testCase id="060002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Verify Reestablishment</desc>
|
||||
<node>nepes</node>
|
||||
<command>echo ci get_reestab_count | nc -N 192.168.68.194 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1 reconf_after_reestab 1'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy gNB</desc>
|
||||
|
||||
@@ -166,8 +166,8 @@
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
<d_retx_th>5,50,100,100</d_retx_th>
|
||||
<u_retx_th>5,50,100,100</u_retx_th>
|
||||
<d_retx_th>5,80,100,100</d_retx_th>
|
||||
<u_retx_th>5,80,100,100</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -119,8 +119,8 @@
|
||||
|
||||
<testCase id="072000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/200Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 200M -t 60</iperf_args>
|
||||
<desc>iperf (DL/180Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 180M -t 60</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
@@ -155,8 +155,8 @@
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
<d_retx_th>5,50,100,100</d_retx_th>
|
||||
<u_retx_th>5,50,100,100</u_retx_th>
|
||||
<d_retx_th>5,80,100,100</d_retx_th>
|
||||
<u_retx_th>5,80,100,100</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -193,8 +193,8 @@
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
<d_retx_th>5,50,100,100</d_retx_th>
|
||||
<u_retx_th>5,50,100,100</u_retx_th>
|
||||
<d_retx_th>5,80,100,100</d_retx_th>
|
||||
<u_retx_th>5,80,100,100</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -20,7 +20,7 @@ services:
|
||||
GNB_NGA_IP_ADDRESS: 192.168.68.194
|
||||
GNB_NGU_IF_NAME: eth0
|
||||
GNB_NGU_IP_ADDRESS: 192.168.68.194
|
||||
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --telnetsrv --telnetsrv.shrmod ci --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
volumes:
|
||||
- /dev:/dev
|
||||
networks:
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
# - Find freediameter
|
||||
# Find the native FreeDiameter includes and libraries
|
||||
#
|
||||
# FREEDIAMETER_FOUND - True if FreeDiameter found.
|
||||
# FREEDIAMETER_INCLUDE_DIR - where to find gnutls.h, etc.
|
||||
# FREEDIAMETER_LIBRARIES - List of libraries when using gnutls.
|
||||
# FREEDIAMETER_HSS_S6A_ENABLED - true if FreeDiameter enabled for S6A interface
|
||||
|
||||
|
||||
if (FREEDIAMETER_INCLUDE_DIR AND FREEDIAMETER_LIBRARIES)
|
||||
set(FREEDIAMETER_FIND_QUIETLY TRUE)
|
||||
endif (FREEDIAMETER_INCLUDE_DIR AND FREEDIAMETER_LIBRARIES)
|
||||
|
||||
# Include dir
|
||||
find_path(FREEDIAMETER_INCLUDE_DIR
|
||||
NAMES
|
||||
freeDiameter/freeDiameter-host.h
|
||||
freeDiameter/libfdcore.h
|
||||
freeDiameter/libfdproto.h
|
||||
)
|
||||
|
||||
# Library
|
||||
find_library(FREEDIAMETER_LIBRARY
|
||||
NAMES fdcore
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set FREEDIAMETER_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FREEDIAMETER DEFAULT_MSG FREEDIAMETER_LIBRARY FREEDIAMETER_INCLUDE_DIR)
|
||||
|
||||
IF(FREEDIAMETER_FOUND)
|
||||
SET( FREEDIAMETER_LIBRARIES ${FREEDIAMETER_LIBRARY} )
|
||||
ELSE(FREEDIAMETER_FOUND)
|
||||
SET( FREEDIAMETER_LIBRARIES )
|
||||
ENDIF(FREEDIAMETER_FOUND)
|
||||
|
||||
find_library(FREEDIAMETER_LIBRARY2
|
||||
NAMES fdproto
|
||||
)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FREEDIAMETER2 DEFAULT_MSG FREEDIAMETER_LIBRARY2 FREEDIAMETER_INCLUDE_DIR)
|
||||
IF(FREEDIAMETER2_FOUND)
|
||||
SET( FREEDIAMETER_LIBRARIES ${FREEDIAMETER_LIBRARIES} ${FREEDIAMETER_LIBRARY2} )
|
||||
ELSE(FREEDIAMETER2_FOUND)
|
||||
SET( FREEDIAMETER_LIBRARIES )
|
||||
ENDIF(FREEDIAMETER2_FOUND)
|
||||
|
||||
|
||||
# Lastly make it so that the FREEDIAMETER_LIBRARY and FREEDIAMETER_INCLUDE_DIR variables
|
||||
# only show up under the advanced options in the gui cmake applications.
|
||||
MARK_AS_ADVANCED( FREEDIAMETER_LIBRARY FREEDIAMETER_INCLUDE_DIR )
|
||||
|
||||
# Now check if the library is patched for OPENAIR HSS S6A.
|
||||
IF(FREEDIAMETER_FOUND)
|
||||
IF( FREEDIAMETER_INCLUDE_DIR )
|
||||
# Extract FD_PROJECT_VERSION_MAJOR, FD_PROJECT_VERSION_MINOR from freeDiameter-host.h
|
||||
# Read the whole file:
|
||||
#
|
||||
FILE(READ "${FREEDIAMETER_INCLUDE_DIR}/freeDiameter/freeDiameter-host.h" _freeDiameter_HOST_H_CONTENTS)
|
||||
|
||||
STRING(REGEX REPLACE ".*#define FD_PROJECT_VERSION_MAJOR ([0-9]+).*" "\\1" FD_PROJECT_VERSION_MAJOR "${_freeDiameter_HOST_H_CONTENTS}")
|
||||
STRING(REGEX REPLACE ".*#define FD_PROJECT_VERSION_MINOR ([0-9]+).*" "\\1" FD_PROJECT_VERSION_MINOR "${_freeDiameter_HOST_H_CONTENTS}")
|
||||
|
||||
IF(FD_PROJECT_VERSION_MAJOR GREATER 0)
|
||||
MATH(EXPR FREEDIAMETER_VERSION_VALUE "${FD_PROJECT_VERSION_MAJOR} * 100 + ${FD_PROJECT_VERSION_MINOR} * 10")
|
||||
SET(FREEDIAMETER_VERSION "${FREEDIAMETER_VERSION_VALUE}" CACHE INTERNAL "Freediameter release version")
|
||||
MESSAGE(STATUS "freeDiameter version found ${FREEDIAMETER_VERSION}")
|
||||
ENDIF(FD_PROJECT_VERSION_MAJOR GREATER 0)
|
||||
ENDIF( FREEDIAMETER_INCLUDE_DIR )
|
||||
GET_FILENAME_COMPONENT(FREEDIAMETER_PATH ${FREEDIAMETER_LIBRARY} PATH)
|
||||
IF( NOT( "${FREEDIAMETER_VERSION_TEST_FOR}" STREQUAL "${FREEDIAMETER_LIBRARIES}" ))
|
||||
INCLUDE (CheckLibraryExists)
|
||||
MESSAGE(STATUS "Checking freeDiameter patched for S6A")
|
||||
UNSET(FREEDIAMETER_HSS_S6A_ENABLED)
|
||||
UNSET(FREEDIAMETER_HSS_S6A_ENABLED CACHE)
|
||||
UNSET(DICT_S6A_FOUND)
|
||||
UNSET(DICT_S6A_FOUND CACHE)
|
||||
|
||||
|
||||
FIND_FILE(DICT_S6A_FOUND NAMES dict_s6a.fdx PATHS ${FREEDIAMETER_PATH} ${FREEDIAMETER_PATH}/freeDiameter)
|
||||
IF(DICT_S6A_FOUND)
|
||||
SET( FREEDIAMETER_HSS_S6A_ENABLED TRUE CACHE INTERNAL "dict_s6a.fdx Found")
|
||||
ELSE(DICT_S6A_FOUND)
|
||||
SET( FREEDIAMETER_HSS_S6A_ENABLED FALSE CACHE INTERNAL "dict_s6a.fdx not Found")
|
||||
ENDIF(DICT_S6A_FOUND)
|
||||
SET( FREEDIAMETER_VERSION_TEST_FOR ${FREEDIAMETER_LIBRARIES} CACHE INTERNAL "Version the test was made against" )
|
||||
ENDIF (NOT( "${FREEDIAMETER_VERSION_TEST_FOR}" STREQUAL "${FREEDIAMETER_LIBRARIES}" ))
|
||||
ENDIF(FREEDIAMETER_FOUND)
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
# - Find mysqlclient
|
||||
#
|
||||
# -*- cmake -*-
|
||||
#
|
||||
# Find the native MySQL includes and library
|
||||
#
|
||||
# MySQL_INCLUDE_DIR - where to find mysql.h, etc.
|
||||
# MySQL_LIBRARIES - List of libraries when using MySQL.
|
||||
# MySQL_FOUND - True if MySQL found.
|
||||
|
||||
IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
|
||||
# Already in cache, be silent
|
||||
SET(MySQL_FIND_QUIETLY TRUE)
|
||||
ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
|
||||
|
||||
# Include dir
|
||||
FIND_PATH(MySQL_INCLUDE_DIR
|
||||
NAMES mysql.h
|
||||
PATH_SUFFIXES mysql
|
||||
)
|
||||
|
||||
# Library
|
||||
#SET(MySQL_NAMES mysqlclient mysqlclient_r)
|
||||
SET(MySQL_NAMES mysqlclient)
|
||||
FIND_LIBRARY(MySQL_LIBRARY
|
||||
NAMES ${MySQL_NAMES}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
PATH_SUFFIXES mysql
|
||||
)
|
||||
|
||||
IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
|
||||
SET(MySQL_FOUND TRUE)
|
||||
SET( MySQL_LIBRARIES ${MySQL_LIBRARY} )
|
||||
ELSE (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
|
||||
SET(MySQL_FOUND FALSE)
|
||||
SET( MySQL_LIBRARIES )
|
||||
ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
|
||||
|
||||
|
||||
IF (MySQL_FOUND)
|
||||
IF (NOT MySQL_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found MySQL: ${MySQL_LIBRARY}")
|
||||
ENDIF (NOT MySQL_FIND_QUIETLY)
|
||||
ELSE (MySQL_FOUND)
|
||||
IF (MySQL_FIND_REQUIRED)
|
||||
MESSAGE(STATUS "Looked for MySQL libraries named ${MySQL_NAMES}.")
|
||||
MESSAGE(FATAL_ERROR "Could NOT find MySQL library")
|
||||
ENDIF (MySQL_FIND_REQUIRED)
|
||||
ENDIF (MySQL_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
MySQL_LIBRARY
|
||||
MySQL_INCLUDE_DIR
|
||||
)
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# - Find PostgreSQL library
|
||||
#
|
||||
# This module defines:
|
||||
# POSTGRESQL_FOUND - True if the package is found
|
||||
# POSTGRESQL_INCLUDE_DIR - containing libpq-fe.h
|
||||
# POSTGRESQL_LIBRARIES - Libraries to link to use PQ functions.
|
||||
|
||||
if (POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES)
|
||||
set(POSTGRESQL_FIND_QUIETLY TRUE)
|
||||
endif (POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES)
|
||||
|
||||
# Include dir
|
||||
find_path(POSTGRESQL_INCLUDE_DIR
|
||||
NAMES libpq-fe.h
|
||||
PATH_SUFFIXES pgsql postgresql
|
||||
)
|
||||
|
||||
# Library
|
||||
find_library(POSTGRESQL_LIBRARY
|
||||
NAMES pq
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set POSTGRESQL_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(POSTGRESQL DEFAULT_MSG POSTGRESQL_LIBRARY POSTGRESQL_INCLUDE_DIR)
|
||||
|
||||
IF(POSTGRESQL_FOUND)
|
||||
SET( POSTGRESQL_LIBRARIES ${POSTGRESQL_LIBRARY} )
|
||||
ELSE(POSTGRESQL_FOUND)
|
||||
SET( POSTGRESQL_LIBRARIES )
|
||||
ENDIF(POSTGRESQL_FOUND)
|
||||
|
||||
# Lastly make it so that the POSTGRESQL_LIBRARY and POSTGRESQL_INCLUDE_DIR variables
|
||||
# only show up under the advanced options in the gui cmake applications.
|
||||
MARK_AS_ADVANCED( POSTGRESQL_LIBRARY POSTGRESQL_INCLUDE_DIR )
|
||||
@@ -1,264 +0,0 @@
|
||||
# Declare variables for path prefixes for different types of files.
|
||||
# NB: depends on 'multi_kernel' and 'uninstall_target'.
|
||||
|
||||
# fill_install_prefixes(<project_name> <project_prefix>
|
||||
# [BASE_INSTALL_PREFIX <base_install_prefix>]
|
||||
# [KERNEL]
|
||||
# )
|
||||
#
|
||||
# Setup variables <project_prefix>_* to the install prefixes for
|
||||
# different project components.
|
||||
# Precisely, variables with next sufficies are set:
|
||||
# INSTALL_PREFIX_EXEC - executables
|
||||
# INSTALL_PREFIX_READONLY - readonly files
|
||||
# INSTALL_PREFIX_GLOBAL_CONF - global configuration files
|
||||
# INSTALL_PREFIX_PREFIX_LIB - libraries
|
||||
# INSTALL_INCLUDE_DIR - include directory(for flags to compiler)
|
||||
# INSTALL_PREFIX_INCLUDE - include files
|
||||
# INSTALL_PREFIX_TEMP_SESSION - temporary files(exists until system restarts)
|
||||
# INSTALL_PREFIX_TEMP - temporary files(preserved even when system restats)
|
||||
# INSTALL_PREFIX_STATE - files which describe current state of the project.
|
||||
# INSTALL_PREFIX_CACHE - cache files
|
||||
# INSTALL_PREFIX_VAR - other modifiable files
|
||||
# INSTALL_PREFIX_DOC - documentation files
|
||||
# INSTALL_PREFIX_EXAMPLES - documentation files
|
||||
#
|
||||
# With 'KERNEL' option enabled paths for kernel-related files also set:
|
||||
# INSTALL_KINCLUDE_DIR - directory for include when build kernel components
|
||||
# INSTALL_PREFIX_KINCLUDE - include files for the kernel.
|
||||
#
|
||||
# Additionally, with 'KERNEL' option enabled, several variables are set to
|
||||
# paths, which contains "%kernel%" pattern.
|
||||
# These paths are intended for kernel-dependent files; for make paths
|
||||
# complete one should replace "%kernel%" substring with version of the
|
||||
# kernel.
|
||||
# Next kernel-dependend paths are set(sufficies only):
|
||||
# KERNEL_INSTALL_PREFIX_KMODULE - directory for install kernel modules
|
||||
# KERNEL_INSTALL_PREFIX_KSYMVERS - directory for install kernel modules' symvers files.
|
||||
# KERNEL_INSTALL_INCLUDE_KERNEL_DIR - include directory with kernel-dependent headers.
|
||||
# KERNEL_INSTALL_PREFIX_INCLUDE_KERNEL - include files, which depends from kernel.
|
||||
#
|
||||
# Iff option 'COMMON_INSTALL_PREFIX' is given, all paths above are
|
||||
# calculated using <base_install_prefix> as base prefix.
|
||||
# Otherwise, CMAKE_INSTALL_PREFIX is used for that purpose.
|
||||
#
|
||||
# Additionally,
|
||||
# INSTALL_TYPE
|
||||
# variable(suffix) is set to one of:
|
||||
# - "GLOBAL_OPT" - install into "/opt",
|
||||
# - "GLOBAL" - global installation except one into "/opt",
|
||||
# - "LOCAL" - local installation.
|
||||
function(fill_install_prefixes project_name project_prefix)
|
||||
cmake_parse_arguments(fip "KERNEL" "BASE_INSTALL_PREFIX" "" ${ARGN})
|
||||
if(fip_UNPARSED_ARGUMENTS)
|
||||
list(GET fip_UNPARSED_ARGUMENTS 0 exceeded_arg)
|
||||
message(SEND_ERROR "Exceeded argument: ${exceeded_arg}")
|
||||
endif(fip_UNPARSED_ARGUMENTS)
|
||||
if(NOT fip_BASE_INSTALL_PREFIX)
|
||||
set(fip_BASE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
endif(NOT fip_BASE_INSTALL_PREFIX)
|
||||
|
||||
# Follow conventions about paths listed in
|
||||
# devel-docs/general/path_conventions.txt
|
||||
# in kedr-devel package.
|
||||
|
||||
# Determine type of installation
|
||||
if(fip_BASE_INSTALL_PREFIX MATCHES "^/opt")
|
||||
set(fip_INSTALL_TYPE "GLOBAL_OPT")
|
||||
elseif(fip_BASE_INSTALL_PREFIX MATCHES "^/usr"
|
||||
OR fip_BASE_INSTALL_PREFIX STREQUAL "/"
|
||||
)
|
||||
set(fip_INSTALL_TYPE "GLOBAL")
|
||||
else()
|
||||
set(fip_INSTALL_TYPE "LOCAL")
|
||||
endif()
|
||||
|
||||
# 1
|
||||
if(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT")
|
||||
set(fip_INSTALL_PREFIX_EXEC "/opt/${project_name}/bin")
|
||||
else(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT")
|
||||
set(fip_INSTALL_PREFIX_EXEC "${fip_BASE_INSTALL_PREFIX}/bin")
|
||||
endif(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT")
|
||||
# 2
|
||||
set(fip_INSTALL_PREFIX_EXEC_AUX
|
||||
"${fip_BASE_INSTALL_PREFIX}/lib/${project_name}"
|
||||
)
|
||||
# 3
|
||||
set(fip_INSTALL_PREFIX_READONLY
|
||||
"${fip_BASE_INSTALL_PREFIX}/share/${project_name}"
|
||||
)
|
||||
# 4
|
||||
set(fip_INSTALL_PREFIX_MANPAGE
|
||||
"${fip_BASE_INSTALL_PREFIX}/share/man"
|
||||
)
|
||||
# 5
|
||||
if(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT")
|
||||
set(fip_INSTALL_PREFIX_GLOBAL_CONF "/etc/opt/${project_name}")
|
||||
elseif(fip_INSTALL_TYPE STREQUAL "GLOBAL")
|
||||
set(fip_INSTALL_PREFIX_GLOBAL_CONF "/etc/${project_name}")
|
||||
else(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT")
|
||||
set(fip_INSTALL_PREFIX_GLOBAL_CONF
|
||||
"${fip_BASE_INSTALL_PREFIX}/etc/${project_name}"
|
||||
)
|
||||
endif(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT")
|
||||
# 6
|
||||
set(fip_INSTALL_PREFIX_LIB "${fip_BASE_INSTALL_PREFIX}/lib")
|
||||
# 7
|
||||
set(fip_INSTALL_PREFIX_LIB_AUX
|
||||
"${fip_BASE_INSTALL_PREFIX}/lib/${project_name}"
|
||||
)
|
||||
# 8
|
||||
set(fip_INSTALL_INCLUDE_DIR "${fip_BASE_INSTALL_PREFIX}/include")
|
||||
|
||||
set(fip_INSTALL_PREFIX_INCLUDE
|
||||
"${fip_INSTALL_INCLUDE_DIR}/${project_name}"
|
||||
)
|
||||
# 9
|
||||
set(fip_INSTALL_PREFIX_TEMP_SESSION "/tmp/${project_name}")
|
||||
# 10
|
||||
if(fip_INSTALL_TYPE MATCHES "GLOBAL")
|
||||
set(fip_INSTALL_PREFIX_TEMP "/var/tmp/${project_name}")
|
||||
else(fip_INSTALL_TYPE MATCHES "GLOBAL")
|
||||
set(fip_INSTALL_PREFIX_TEMP
|
||||
"${fip_BASE_INSTALL_PREFIX}/var/tmp/${project_name}"
|
||||
)
|
||||
endif(fip_INSTALL_TYPE MATCHES "GLOBAL")
|
||||
# 11
|
||||
if(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT")
|
||||
set(fip_INSTALL_PREFIX_STATE
|
||||
"/var/opt/${project_name}/lib/${project_name}"
|
||||
)
|
||||
elseif(fip_INSTALL_TYPE STREQUAL "GLOBAL")
|
||||
set(fip_INSTALL_PREFIX_STATE "/var/lib/${project_name}")
|
||||
else(fip_INSTALL_TYPE STREQUAL "GLOBAL")
|
||||
set(fip_INSTALL_PREFIX_STATE
|
||||
"${fip_BASE_INSTALL_PREFIX}/var/lib/${project_name}"
|
||||
)
|
||||
endif(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT")
|
||||
# 12
|
||||
if(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT")
|
||||
set(fip_INSTALL_PREFIX_CACHE
|
||||
"/var/opt/${project_name}/cache/${project_name}"
|
||||
)
|
||||
elseif(fip_INSTALL_TYPE STREQUAL "GLOBAL")
|
||||
set(fip_INSTALL_PREFIX_CACHE "/var/cache/${project_name}")
|
||||
else(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT")
|
||||
set(fip_INSTALL_PREFIX_CACHE
|
||||
"${fip_BASE_INSTALL_PREFIX}/var/cache/${project_name}"
|
||||
)
|
||||
endif(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT")
|
||||
# 13
|
||||
if(fip_INSTALL_TYPE MATCHES "GLOBAL")
|
||||
set(fip_INSTALL_PREFIX_VAR "/var/opt/${project_name}")
|
||||
else(fip_INSTALL_TYPE MATCHES "GLOBAL")
|
||||
set(fip_INSTALL_PREFIX_VAR
|
||||
"${fip_BASE_INSTALL_PREFIX}/var/${project_name}"
|
||||
)
|
||||
endif(fip_INSTALL_TYPE MATCHES "GLOBAL")
|
||||
# 14
|
||||
set(fip_INSTALL_PREFIX_DOC
|
||||
"${fip_BASE_INSTALL_PREFIX}/share/doc/${project_name}"
|
||||
)
|
||||
|
||||
# Set derivative install path and prefixes
|
||||
|
||||
# additional, 4
|
||||
set(fip_INSTALL_PREFIX_EXAMPLES
|
||||
"${fip_INSTALL_PREFIX_READONLY}/examples")
|
||||
|
||||
# Export symbols to the outer scope
|
||||
foreach(suffix
|
||||
INSTALL_TYPE
|
||||
INSTALL_PREFIX_EXEC
|
||||
INSTALL_PREFIX_EXEC_AUX
|
||||
INSTALL_PREFIX_READONLY
|
||||
INSTALL_PREFIX_MANPAGE
|
||||
INSTALL_PREFIX_GLOBAL_CONF
|
||||
INSTALL_PREFIX_LIB
|
||||
INSTALL_PREFIX_LIB_AUX
|
||||
INSTALL_INCLUDE_DIR
|
||||
INSTALL_PREFIX_INCLUDE
|
||||
INSTALL_PREFIX_TEMP_SESSION
|
||||
INSTALL_PREFIX_TEMP
|
||||
INSTALL_PREFIX_STATE
|
||||
INSTALL_PREFIX_CACHE
|
||||
INSTALL_PREFIX_VAR
|
||||
INSTALL_PREFIX_DOC
|
||||
INSTALL_PREFIX_EXAMPLES
|
||||
)
|
||||
set(${project_prefix}_${suffix} "${fip_${suffix}}" PARENT_SCOPE)
|
||||
endforeach(suffix)
|
||||
|
||||
if(fip_KERNEL)
|
||||
# Set derivative install path and prefixes
|
||||
# additional, 1
|
||||
if(fip_INSTALL_TYPE MATCHES GLOBAL)
|
||||
set(fip_KERNEL_INSTALL_PREFIX_KMODULE
|
||||
"/lib/modules/%kernel%/extra"
|
||||
)
|
||||
else(fip_INSTALL_TYPE MATCHES GLOBAL)
|
||||
set(fip_KERNEL_INSTALL_PREFIX_KMODULE
|
||||
"${fip_INSTALL_PREFIX_LIB}/modules/%kernel%/extra"
|
||||
)
|
||||
endif(fip_INSTALL_TYPE MATCHES GLOBAL)
|
||||
|
||||
# additional, 2
|
||||
set(fip_KERNEL_INSTALL_PREFIX_KSYMVERS
|
||||
"${fip_INSTALL_PREFIX_LIB}/modules/%kernel%/symvers"
|
||||
)
|
||||
# additional, 3
|
||||
set(fip_INSTALL_KINCLUDE_DIR "${fip_INSTALL_INCLUDE_DIR}")
|
||||
set(fip_INSTALL_PREFIX_KINCLUDE "${fip_INSTALL_PREFIX_INCLUDE}")
|
||||
|
||||
# Kernel include files, which depends from kernel version.
|
||||
# This prefix is not listed in path conventions.
|
||||
set(fip_KERNEL_INSTALL_INCLUDE_KERNEL_DIR
|
||||
"${fip_BASE_INSTALL_PREFIX}/include-kernel/%kernel%"
|
||||
)
|
||||
|
||||
set(fip_KERNEL_INSTALL_PREFIX_INCLUDE_KERNEL
|
||||
"${fip_KERNEL_INSTALL_INCLUDE_KERNEL_DIR}/${project_name}-kernel"
|
||||
)
|
||||
|
||||
# Export symbols to the outer scope
|
||||
foreach(suffix
|
||||
KERNEL_INSTALL_PREFIX_KMODULE
|
||||
KERNEL_INSTALL_PREFIX_KSYMVERS
|
||||
INSTALL_KINCLUDE_DIR
|
||||
INSTALL_PREFIX_KINCLUDE
|
||||
KERNEL_INSTALL_INCLUDE_KERNEL_DIR
|
||||
KERNEL_INSTALL_PREFIX_INCLUDE_KERNEL
|
||||
)
|
||||
set(${project_prefix}_${suffix} "${fip_${suffix}}" PARENT_SCOPE)
|
||||
endforeach(suffix)
|
||||
endif(fip_KERNEL)
|
||||
endfunction(fill_install_prefixes project_name project_prefix)
|
||||
|
||||
|
||||
########################################################################
|
||||
# Kernel-dependent paths.
|
||||
#
|
||||
# Some deliverables may depends on linux kernel.
|
||||
#
|
||||
# For make "one user installation for several kernels" paradigm works,
|
||||
# installation directory for that deliverables should include
|
||||
# kernel-version part(like "3.10.2-generic").
|
||||
#
|
||||
# So, components installed by user installation can determine at runtime,
|
||||
# which kernel-dependent deliverable should be used on currently loaded system.
|
||||
# They do selection using 'uname -r' request.
|
||||
#
|
||||
# For define variables represented kernel-dependent directories,
|
||||
# we use strings containing "%kernel%" stem.
|
||||
|
||||
# kernel_path(kernel_version RESULT_VARIABLE pattern ...)
|
||||
#
|
||||
# Form concrete path representation from kernel-dependent pattern(s).
|
||||
# Replace occurence of %kernel% in pattern(s) with given @kernel_version string.
|
||||
# Result is stored in the RESULT_VARIABLE.
|
||||
#
|
||||
# @kernel_version may be concrete version of the kernel,
|
||||
# or variable reference in some language.
|
||||
macro(kernel_path kernel_version RESULT_VARIABLE pattern)
|
||||
string(REPLACE "%kernel%" "${kernel_version}" ${RESULT_VARIABLE} ${pattern} ${ARGN})
|
||||
endmacro(kernel_path kernel_version RESULT_VARIABLE pattern)
|
||||
@@ -594,19 +594,10 @@ check_install_oai_software() {
|
||||
case "$(get_distribution_release)" in
|
||||
"ubuntu18.04")
|
||||
add_cmake_repo
|
||||
specific_packages="libgcrypt11-dev guile-2.0-dev"
|
||||
;;
|
||||
"ubuntu20.04")
|
||||
specific_packages="guile-2.0-dev"
|
||||
;;
|
||||
"ubuntu21.04")
|
||||
specific_packages="guile-2.0-dev"
|
||||
;;
|
||||
"ubuntu22.04")
|
||||
specific_packages="guile-2.2-dev"
|
||||
specific_packages="libgcrypt11-dev"
|
||||
;;
|
||||
"debian11")
|
||||
specific_packages="guile-2.2-dev libz-dev"
|
||||
specific_packages="libz-dev"
|
||||
;;
|
||||
esac
|
||||
$SUDO apt-get install -y \
|
||||
@@ -627,8 +618,6 @@ check_install_oai_software() {
|
||||
libsctp-dev \
|
||||
libssl-dev \
|
||||
libtool \
|
||||
libxslt1-dev \
|
||||
libtasn1-6-dev \
|
||||
patch \
|
||||
openssl \
|
||||
xxd
|
||||
@@ -649,7 +638,6 @@ check_install_oai_software() {
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
git \
|
||||
guile-devel \
|
||||
atlas-devel \
|
||||
pkgconfig \
|
||||
libconfig-devel \
|
||||
@@ -657,9 +645,7 @@ check_install_oai_software() {
|
||||
libgcrypt-devel \
|
||||
lksctp-tools \
|
||||
lksctp-tools-devel \
|
||||
libtasn1 \
|
||||
libtool \
|
||||
libxslt-devel \
|
||||
ninja-build \
|
||||
make \
|
||||
openssl \
|
||||
|
||||
@@ -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);
|
||||
|
||||
+12
-14
@@ -197,7 +197,6 @@ typedef enum {
|
||||
MAC,
|
||||
EMU,
|
||||
SIM,
|
||||
OCG,
|
||||
OMG,
|
||||
OPT,
|
||||
OTG,
|
||||
@@ -416,12 +415,12 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
|
||||
# if T_TRACER
|
||||
/* per component, level dependent macros */
|
||||
# define LOG_E(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} else { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_W(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} else { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_A(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ANALYSIS) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ANALYSIS, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_I(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_D(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_T(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_E(c, x...) do { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} } while (0)
|
||||
# define LOG_W(c, x...) do { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)); if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_WARNING ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} } while (0)
|
||||
# define LOG_A(c, x...) do { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ANALYSIS) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ANALYSIS, x);} } while (0)
|
||||
# define LOG_I(c, x...) do { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} } while (0)
|
||||
# define LOG_D(c, x...) do { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} } while (0)
|
||||
# define LOG_T(c, x...) do { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} } while (0)
|
||||
# define VLOG(c,l, f, args) do { if (T_stdout) { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ;} } while (0)
|
||||
/* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */
|
||||
# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */
|
||||
@@ -433,14 +432,13 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
# define LOG_M(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format, 0);} while(0)/* */
|
||||
/* define variable only used in LOG macro's */
|
||||
# define LOG_VAR(A,B) A B
|
||||
# else /* T_TRACER: remove all debugging and tracing messages, except errors */
|
||||
|
||||
# define LOG_E(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} while (0)
|
||||
# define LOG_W(c, x...) do { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} while (0)
|
||||
# else /* T_TRACER */
|
||||
# define LOG_E(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} while (0)
|
||||
# define LOG_W(c, x...) do { if( g_log->log_component[c].level >= OAILOG_WARNING ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} while (0)
|
||||
# define LOG_A(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ANALYSIS) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ANALYSIS, x);} while (0)
|
||||
# define LOG_I(c, x...) do { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} while (0)
|
||||
# define LOG_D(c, x...) do { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} while (0)
|
||||
# define LOG_T(c, x...) do { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} while (0)
|
||||
# define LOG_I(c, x...) do { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} while (0)
|
||||
# define LOG_D(c, x...) do { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} while (0)
|
||||
# define LOG_T(c, x...) do { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} while (0)
|
||||
# define VLOG(c,l, f, args) do { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ; } while (0)
|
||||
|
||||
# define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -54,8 +54,13 @@ add_library(telnetsrv_5Gue MODULE telnetsrv_5Gue_measurements.c)
|
||||
add_dependencies(telnetsrv telnetsrv_5Gue)
|
||||
target_link_libraries(telnetsrv_5Gue PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
message(STATUS "Add CI specific telnet functions in libtelnetsrv_ci.so")
|
||||
add_library(telnetsrv_ci MODULE telnetsrv_ci.c)
|
||||
target_link_libraries(telnetsrv_ci PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
add_dependencies(telnetsrv telnetsrv_ci)
|
||||
|
||||
# all libraries should be written to root build dir
|
||||
set_target_properties(telnetsrv telnetsrv_enb telnetsrv_5Gue
|
||||
set_target_properties(telnetsrv telnetsrv_enb telnetsrv_5Gue telnetsrv_ci
|
||||
PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../../..
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ By default the embedded telnet server, which is implemented in a shared library,
|
||||
./build_oai --build-lib telnetsrv
|
||||
```
|
||||
|
||||
This will create the `libtelnetsrv.so` and `libtelnetsrv_<app> file in the `cmake_targets/ran_build/build` subdirectory of the oai repository. <app> can be "enb", "gnb", "4GUE" or "5GUE", each library containing functions specific to a given executable.
|
||||
This will create the `libtelnetsrv.so` and `libtelnetsrv_<app>` file in the `cmake_targets/ran_build/build` subdirectory of the oai repository. `<app>` can be "enb", "gnb", "4GUE", "5GUE", or "ci", each library containing functions specific to a given executable.
|
||||
|
||||
When starting the softmodem, you must specify the **_\-\-telnetsrv_** option to load and start the telnet server. The telnet server is loaded via the [oai shared library loader](loader).
|
||||
|
||||
@@ -32,9 +32,15 @@ The telnet server is using the [oai configuration module](Config/Rtusage). Telne
|
||||
|:---:|:---:|:---:|:----|:----:|
|
||||
| `listenaddr` | `ipV4 address, ascii format` | "0.0.0.0" | local address the server is listening on| N |
|
||||
| `listenport` | `integer` | 9090 | port number the server is listening on | N |
|
||||
| `listenstdin` | `integer` (bool) | 0 | enable input from stdin via additional thread | N |
|
||||
| `policy` | `integer` | 0 | scheduling priority for telnet (0-99) | N |
|
||||
| `loopcount` | `integer` | 10 | number of iterations for the loop command | Y |
|
||||
| `loopdelay` | `integer` | 5000 | delay (in ms) between 2 loop command iterations | Y |
|
||||
| `histfile` | `character string` | "oaitelnet.history" | file used for command history persistency | Y |
|
||||
| `histfsize` | `integer` | 50 | maximum number of commands saved in the history | Y |
|
||||
| `histfile` | `string` | "oaitelnet.history" | file used for command history persistency | Y |
|
||||
| `histsize` | `integer` | 50 | maximum number of commands saved in the history | Y |
|
||||
| `logfile` | `string` | `oaisoftmodem.log` | output file to which to redirect
|
||||
| `phypbsize` | `integer` | 65000 | string buffer size to dump phy stats | Y |
|
||||
| `staticmod` | `string` | (empty) | additional internally defined telnet modules (`--telnetsrv.staticmod X`, comma-separated) to load on startup. The modules should define a function `add_X_cmds()` in which the module can register telnet commands | N |
|
||||
| `shrmod` | `string` | (empty) | additional shared object files `telnetsrv_X.so` (`--telnetsrv.shrmod X`, comma-separated) to load on startup. The shared object(s) should define a function `add_X_cmds()` in which the shared object can register telnet commands | N |
|
||||
|
||||
[oai telnet server home](telnetsrv.md)
|
||||
|
||||
@@ -821,14 +821,14 @@ void poll_telnetcmdq(void *qid, void *arg) {
|
||||
*
|
||||
*
|
||||
*/
|
||||
void exec_moduleinit(char *modname) {
|
||||
static bool exec_moduleinit(char *modname) {
|
||||
void (*fptr)(void);
|
||||
char initfunc[TELNET_CMD_MAXSIZE+10];
|
||||
|
||||
if (strlen(modname) > TELNET_CMD_MAXSIZE) {
|
||||
fprintf(stderr,"[TELNETSRV] module %s not loaded, name exceeds the %i size limit\n",
|
||||
modname, TELNET_CMD_MAXSIZE);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
sprintf(initfunc,"add_%s_cmds",modname);
|
||||
@@ -836,37 +836,35 @@ void exec_moduleinit(char *modname) {
|
||||
|
||||
if ( fptr != NULL) {
|
||||
fptr();
|
||||
} else {
|
||||
fprintf(stderr,"[TELNETSRV] couldn't find %s for module %s \n",initfunc,modname);
|
||||
return true;
|
||||
}
|
||||
fprintf(stderr, "[TELNETSRV] couldn't find %s for module %s \n", initfunc, modname);
|
||||
return false;
|
||||
}
|
||||
|
||||
int add_embeddedmodules(void) {
|
||||
int ret=0;
|
||||
int pindex = config_paramidx_fromname(telnetoptions,sizeof(telnetoptions)/sizeof(paramdef_t), TELNETSRV_OPTNAME_STATICMOD);
|
||||
for(int i=0; i<telnetoptions[pindex].numelt; i++) {
|
||||
ret++;
|
||||
exec_moduleinit(telnetoptions[pindex].strlistptr[i]);
|
||||
bool success = exec_moduleinit(telnetoptions[pindex].strlistptr[i]);
|
||||
if (success)
|
||||
ret++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int add_sharedmodules(void) {
|
||||
char initfunc[TELNET_CMD_MAXSIZE+9];
|
||||
void (*fptr)(void);
|
||||
int ret=0;
|
||||
int pindex = config_paramidx_fromname(telnetoptions,sizeof(telnetoptions)/sizeof(paramdef_t), TELNETSRV_OPTNAME_SHRMOD);
|
||||
for(int i=0; i<telnetoptions[pindex].numelt; i++) {
|
||||
sprintf(initfunc,"add_%s_cmds",telnetoptions[pindex].strlistptr[i]);
|
||||
fptr = dlsym(RTLD_DEFAULT,initfunc);
|
||||
|
||||
if ( fptr != NULL) {
|
||||
fptr();
|
||||
char *name = telnetoptions[pindex].strlistptr[i];
|
||||
char libname[256];
|
||||
snprintf(libname, sizeof(libname), "telnetsrv_%s", name);
|
||||
load_module_shlib(libname, NULL, 0, NULL);
|
||||
bool success = exec_moduleinit(name);
|
||||
if (success)
|
||||
ret++;
|
||||
} else {
|
||||
fprintf(stderr,"[TELNETSRV] couldn't find %s for module %s \n",initfunc,telnetoptions[pindex].strlistptr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -890,6 +888,7 @@ int telnetsrv_autoinit(void) {
|
||||
|
||||
add_telnetcmd("telnet", telnet_vardef, telnet_cmdarray);
|
||||
add_embeddedmodules();
|
||||
add_sharedmodules();
|
||||
if ( telnetparams.listenstdin ) {
|
||||
if(pthread_create(&telnetparams.telnetclt_pthread,NULL, (void *(*)(void *))run_telnetclt, NULL) != 0) {
|
||||
fprintf(stderr,"[TELNETSRV] Error %s on pthread_create f() run_telnetclt \n",strerror(errno));
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "openair2/RRC/NR/rrc_gNB_UE_context.h"
|
||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||
|
||||
#define TELNETSERVERCODE
|
||||
#include "telnetsrv.h"
|
||||
|
||||
#define ERROR_MSG_RET(mSG, aRGS...) do { prnt(mSG, ##aRGS); return 1; } while (0)
|
||||
|
||||
static int get_single_ue_rnti(void)
|
||||
{
|
||||
NR_UE_info_t *ue = NULL;
|
||||
UE_iterator(RC.nrmac[0]->UE_info.list, it) {
|
||||
if (it && ue)
|
||||
return -1;
|
||||
if (it)
|
||||
ue = it;
|
||||
}
|
||||
if (!ue)
|
||||
return -1;
|
||||
|
||||
// verify it exists in RRC as well
|
||||
rrc_gNB_ue_context_t *rrcue = rrc_gNB_get_ue_context(RC.nrrrc[0], ue->rnti);
|
||||
if (!rrcue)
|
||||
return -1;
|
||||
|
||||
return ue->rnti;
|
||||
}
|
||||
|
||||
int get_single_rnti(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
{
|
||||
if (buf)
|
||||
ERROR_MSG_RET("no parameter allowed\n");
|
||||
|
||||
int rnti = get_single_ue_rnti();
|
||||
if (rnti < 1)
|
||||
ERROR_MSG_RET("different number of UEs\n");
|
||||
|
||||
prnt("single UE RNTI %04x\n", rnti);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int get_reestab_count(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
{
|
||||
int rnti = -1;
|
||||
if (!buf) {
|
||||
rnti = get_single_ue_rnti();
|
||||
if (rnti < 1)
|
||||
ERROR_MSG_RET("no UE found\n");
|
||||
} else {
|
||||
rnti = strtol(buf, NULL, 16);
|
||||
if (rnti < 1 || rnti >= 0xfffe)
|
||||
ERROR_MSG_RET("RNTI needs to be [1,0xfffe]\n");
|
||||
}
|
||||
|
||||
rrc_gNB_ue_context_t *ue = rrc_gNB_get_ue_context(RC.nrrrc[0], rnti);
|
||||
if (!ue)
|
||||
ERROR_MSG_RET("could not find UE with RNTI %04x\n", rnti);
|
||||
|
||||
prnt("UE RNTI %04x reestab %d reconf_after_reestab %d\n",
|
||||
rnti,
|
||||
ue->ue_context.ue_reestablishment_counter,
|
||||
ue->ue_context.ue_reconfiguration_after_reestablishment_counter);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int trigger_reestab(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
{
|
||||
int rnti = -1;
|
||||
if (!buf) {
|
||||
rnti = get_single_ue_rnti();
|
||||
if (rnti < 1)
|
||||
ERROR_MSG_RET("no UE found\n");
|
||||
} else {
|
||||
rnti = strtol(buf, NULL, 16);
|
||||
if (rnti < 1 || rnti >= 0xfffe)
|
||||
ERROR_MSG_RET("RNTI needs to be [1,0xfffe]\n");
|
||||
}
|
||||
|
||||
// verify it exists in RRC as well
|
||||
rrc_gNB_ue_context_t *rrcue = rrc_gNB_get_ue_context(RC.nrrrc[0], rnti);
|
||||
if (!rrcue)
|
||||
ERROR_MSG_RET("could not find UE with RNTI %04x\n", rnti);
|
||||
|
||||
nr_rlc_remove_ue(rnti);
|
||||
prnt("force-remove UE RNTI %04x from RLC to trigger reestablishment\n", rnti);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static telnetshell_cmddef_t cicmds[] = {
|
||||
{"get_single_rnti", "", get_single_rnti},
|
||||
{"force_reestab", "[rnti(hex,opt)]", trigger_reestab},
|
||||
{"get_reestab_count", "[rnti(hex,opt)]", get_reestab_count},
|
||||
{"", "", NULL},
|
||||
};
|
||||
|
||||
static telnetshell_vardef_t civars[] = {
|
||||
|
||||
{"", 0, 0, NULL}
|
||||
};
|
||||
|
||||
void add_ci_cmds(void) {
|
||||
add_telnetcmd("ci", civars, cicmds);
|
||||
}
|
||||
@@ -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 \
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td style="border-collapse: collapse; border: none; vertical-align: center;">
|
||||
<b><font size = "5">OAI 5G SA tutorial</font></b>
|
||||
<b><font size = "5">OAI 5G NR SA tutorial with COTS UE</font></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -17,11 +17,11 @@
|
||||
[[_TOC_]]
|
||||
|
||||
# 1. Scenario
|
||||
In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB, OAI nrUE and COTS UE.
|
||||
In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and COTS UE.
|
||||
|
||||
Minimum hardware requirements:
|
||||
- Laptop/Desktop/Server for OAI CN5G and OAI gNB
|
||||
- Operating System: [Ubuntu 22.04.1 LTS](https://releases.ubuntu.com/22.04.1/ubuntu-22.04.1-desktop-amd64.iso)
|
||||
- Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso)
|
||||
- CPU: 8 cores x86_64 @ 3.5 GHz
|
||||
- RAM: 32 GB
|
||||
- Laptop for UE
|
||||
@@ -40,63 +40,11 @@ Minimum hardware requirements:
|
||||
|
||||
## 2.1 OAI CN5G pre-requisites
|
||||
|
||||
```bash
|
||||
sudo apt install -y git net-tools putty
|
||||
Please install and configure OAI CN5G as described here:
|
||||
[OAI CN5G](NR_SA_Tutorial_OAI_CN5G.md)
|
||||
|
||||
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||
sudo apt update
|
||||
sudo apt install -y docker docker-ce
|
||||
|
||||
# Add your username to the docker group, otherwise you will have to run in sudo mode.
|
||||
sudo usermod -a -G docker $(whoami)
|
||||
reboot
|
||||
|
||||
# https://docs.docker.com/compose/install/
|
||||
sudo curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
```
|
||||
|
||||
## 2.2 OAI CN5G Setup
|
||||
|
||||
```bash
|
||||
# Git oai-cn5g-fed repository
|
||||
git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git ~/oai-cn5g-fed
|
||||
|
||||
# Pull docker images
|
||||
docker pull oaisoftwarealliance/oai-amf:develop
|
||||
docker pull oaisoftwarealliance/oai-nrf:develop
|
||||
docker pull oaisoftwarealliance/oai-smf:develop
|
||||
docker pull oaisoftwarealliance/oai-udr:develop
|
||||
docker pull oaisoftwarealliance/oai-udm:develop
|
||||
docker pull oaisoftwarealliance/oai-ausf:develop
|
||||
docker pull oaisoftwarealliance/oai-spgwu-tiny:develop
|
||||
docker pull oaisoftwarealliance/trf-gen-cn5g:latest
|
||||
|
||||
# Tag docker images
|
||||
docker image tag oaisoftwarealliance/oai-amf:develop oai-amf:develop
|
||||
docker image tag oaisoftwarealliance/oai-nrf:develop oai-nrf:develop
|
||||
docker image tag oaisoftwarealliance/oai-smf:develop oai-smf:develop
|
||||
docker image tag oaisoftwarealliance/oai-udr:develop oai-udr:develop
|
||||
docker image tag oaisoftwarealliance/oai-udm:develop oai-udm:develop
|
||||
docker image tag oaisoftwarealliance/oai-ausf:develop oai-ausf:develop
|
||||
docker image tag oaisoftwarealliance/oai-spgwu-tiny:develop oai-spgwu-tiny:develop
|
||||
docker image tag oaisoftwarealliance/trf-gen-cn5g:latest trf-gen-cn5g:latest
|
||||
```
|
||||
|
||||
## 2.3 OAI CN5G Configuration files
|
||||
Download and copy configuration files:
|
||||
- Copy [docker-compose-basic-nrf.yaml](tutorial_resources/docker-compose-basic-nrf.yaml) to `~/oai-cn5g-fed/docker-compose`
|
||||
```bash
|
||||
wget -O ~/oai-cn5g-fed/docker-compose/docker-compose-basic-nrf.yaml https://gitlab.eurecom.fr/oai/openairinterface5g/-/raw/develop/doc/tutorial_resources/docker-compose-basic-nrf.yaml?inline=false
|
||||
```
|
||||
- Copy [oai_db.sql](tutorial_resources/oai_db.sql) to `~/oai-cn5g-fed/docker-compose/database`
|
||||
```bash
|
||||
wget -O ~/oai-cn5g-fed/docker-compose/database/oai_db.sql https://gitlab.eurecom.fr/oai/openairinterface5g/-/raw/develop/doc/tutorial_resources/oai_db.sql?inline=false
|
||||
```
|
||||
|
||||
## 2.4 SIM Card
|
||||
## 2.2 SIM Card
|
||||
Program SIM Card with [Open Cells Project](https://open-cells.com/) application [uicc-v2.6](https://open-cells.com/d5138782a8739209ec5760865b1e53b0/uicc-v2.6.tgz).
|
||||
|
||||
```bash
|
||||
@@ -114,7 +62,7 @@ sudo apt install -y libboost-all-dev libusb-1.0-0-dev doxygen python3-docutils p
|
||||
|
||||
git clone https://github.com/EttusResearch/uhd.git ~/uhd
|
||||
cd ~/uhd
|
||||
git checkout v4.3.0.0
|
||||
git checkout v4.4.0.0
|
||||
cd host
|
||||
mkdir build
|
||||
cd build
|
||||
@@ -135,16 +83,14 @@ cd ~/openairinterface5g
|
||||
git checkout develop
|
||||
|
||||
# Install OAI dependencies
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets
|
||||
cd ~/openairinterface5g/cmake_targets
|
||||
./build_oai -I
|
||||
|
||||
# Build OAI gNB
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets
|
||||
./build_oai -w USRP --ninja --nrUE --gNB --build-lib "telnetsrv nrscope" -c
|
||||
./build_oai -w USRP --ninja --gNB --build-lib "nrscope" -c
|
||||
```
|
||||
|
||||
# 4. Run OAI CN5G and OAI gNB
|
||||
@@ -152,8 +98,8 @@ cd cmake_targets
|
||||
## 4.1 Run OAI CN5G
|
||||
|
||||
```bash
|
||||
cd ~/oai-cn5g-fed/docker-compose
|
||||
python3 core-network.py --type start-basic --scenario 1
|
||||
cd ~/oai-cn5g
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## 4.2 Run OAI gNB
|
||||
@@ -181,14 +127,6 @@ cd cmake_targets/ran_build/build
|
||||
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --sa --usrp-tx-thread-config 1 -E --continuous-tx
|
||||
```
|
||||
|
||||
### RFsimulator
|
||||
```bash
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets/ran_build/build
|
||||
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --rfsim --sa
|
||||
```
|
||||
|
||||
# 5. Run UE
|
||||
## 5.1 Testing with Quectel RM500Q
|
||||
|
||||
@@ -196,9 +134,6 @@ sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band
|
||||
With [PuTTY](https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe), send the following AT commands to the module using a serial interface (ex: COM2) at 115200 bps:
|
||||
```bash
|
||||
# MUST be sent at least once everytime there is a firmware upgrade!
|
||||
AT+QMBNCFG="Select","ROW_Commercial"
|
||||
AT+QMBNCFG="AutoSel",0
|
||||
AT+CFUN=1,1
|
||||
AT+CGDCONT=1,"IP","oai"
|
||||
AT+CGDCONT=2
|
||||
AT+CGDCONT=3
|
||||
@@ -233,40 +168,6 @@ iperf -s -u -i 1 -B 12.1.1.2
|
||||
docker exec -it oai-ext-dn iperf -u -t 86400 -i 1 -fk -B 192.168.70.135 -b 100M -c 12.1.1.2
|
||||
```
|
||||
|
||||
## 5.2 Testing with OAI nrUE
|
||||
### 5.2.1 Testing with OAI nrUE with USRP B210
|
||||
Important notes:
|
||||
- This should be run in a second Ubuntu 20.04 host, other than gNB
|
||||
- It only applies when running OAI gNB with USRP B210
|
||||
- OAI gNB must run with the following flag: `--gNBs.[0].min_rxtxtime 6`
|
||||
|
||||
Run OAI nrUE
|
||||
```bash
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets/ran_build/build
|
||||
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --ue-fo-compensation --sa -E --uicc0.imsi 001010000000001 --uicc0.nssai_sd 1
|
||||
```
|
||||
|
||||
### 5.2.2 Testing with OAI nrUE with RFsimulator
|
||||
Important notes:
|
||||
- This should be run on the same host as the OAI gNB
|
||||
- It only applies when running OAI gNB with RFsimulator
|
||||
|
||||
Run OAI nrUE with RFsimulator
|
||||
```bash
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets/ran_build/build
|
||||
sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --uicc0.imsi 001010000000001 --uicc0.nssai_sd 1
|
||||
```
|
||||
|
||||
### 5.2.3 Ping test
|
||||
- UE host
|
||||
```bash
|
||||
ping 192.168.70.135 -I oaitun_ue1
|
||||
```
|
||||
|
||||
# 6. Advanced configurations (optional)
|
||||
|
||||
## 6.1 USRP N300 and X300 Ethernet Tuning
|
||||
@@ -292,8 +193,7 @@ sudo ethtool -G enp1s0f0 tx 4096 rx 4096
|
||||
```
|
||||
|
||||
## 6.2 Real-time performance workarounds
|
||||
- Enable Performance Mode in Ubuntu 22:
|
||||
- Settings/Power/Power Mode: Performance
|
||||
- Enable Performance Mode `sudo cpupower idle-set -D 0`
|
||||
- If you get real-time problems on heavy UL traffic, reduce the maximum UL MCS using an additional command-line switch: `--MACRLCs.[0].ul_max_mcs 14`.
|
||||
|
||||
## 6.3 Uplink issues related with noise on the DC carriers
|
||||
@@ -0,0 +1,90 @@
|
||||
<table style="border-collapse: collapse; border: none;">
|
||||
<tr style="border-collapse: collapse; border: none;">
|
||||
<td style="border-collapse: collapse; border: none;">
|
||||
<a href="http://www.openairinterface.org/">
|
||||
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
|
||||
</img>
|
||||
</a>
|
||||
</td>
|
||||
<td style="border-collapse: collapse; border: none; vertical-align: center;">
|
||||
<b><font size = "5">OAI 5G NR SA tutorial: setting up OAI CN5G</font></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
[[_TOC_]]
|
||||
|
||||
# 1. Scenario
|
||||
In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and COTS UE.
|
||||
|
||||
Minimum hardware requirements:
|
||||
- Laptop/Desktop/Server for OAI CN5G and OAI gNB
|
||||
- Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso)
|
||||
- CPU: 8 cores x86_64 @ 3.5 GHz
|
||||
- RAM: 32 GB
|
||||
|
||||
# 2. OAI CN5G
|
||||
|
||||
## 2.1 OAI CN5G pre-requisites
|
||||
|
||||
```bash
|
||||
sudo apt install -y git net-tools putty
|
||||
|
||||
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||
sudo apt update
|
||||
sudo apt install -y docker docker-ce
|
||||
|
||||
# Add your username to the docker group, otherwise you will have to run in sudo mode.
|
||||
sudo usermod -a -G docker $(whoami)
|
||||
reboot
|
||||
```
|
||||
|
||||
## 2.2 OAI CN5G configuration files
|
||||
Download and copy configuration files:
|
||||
```bash
|
||||
wget -O ~/oai-cn5g.zip https://gitlab.eurecom.fr/oai/openairinterface5g/-/archive/develop/openairinterface5g-develop.zip?path=doc/tutorial_resources/oai-cn5g
|
||||
unzip ~/oai-cn5g.zip
|
||||
mv ~/openairinterface5g-develop-doc-tutorial_resources-oai-cn5g/doc/tutorial_resources/oai-cn5g ~/oai-cn5g
|
||||
rm -r ~/openairinterface5g-develop-doc-tutorial_resources-oai-cn5g ~/oai-cn5g.zip
|
||||
```
|
||||
|
||||
## 2.3 Pull OAI CN5G docker images
|
||||
|
||||
```bash
|
||||
docker pull mysql:8.0
|
||||
docker pull oaisoftwarealliance/oai-amf:develop
|
||||
docker pull oaisoftwarealliance/oai-nrf:develop
|
||||
docker pull oaisoftwarealliance/oai-smf:develop
|
||||
docker pull oaisoftwarealliance/oai-udr:develop
|
||||
docker pull oaisoftwarealliance/oai-udm:develop
|
||||
docker pull oaisoftwarealliance/oai-ausf:develop
|
||||
docker pull oaisoftwarealliance/oai-spgwu-tiny:develop
|
||||
docker pull oaisoftwarealliance/trf-gen-cn5g:latest
|
||||
docker build --target ims --tag asterisk-ims:latest --file ~/oai-cn5g/Dockerfile .
|
||||
```
|
||||
|
||||
# 3. Run OAI CN5G
|
||||
## 3.1 Start OAI CN5G
|
||||
```bash
|
||||
cd ~/oai-cn5g
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## 3.2 Stop OAI CN5G
|
||||
```bash
|
||||
cd ~/oai-cn5g
|
||||
docker compose down
|
||||
```
|
||||
|
||||
# 4. Run 5G NR SA end-to-end setup with OAI gNB
|
||||
## 4.1 Testing with COTS UE
|
||||
Please check this link:
|
||||
[Testing with OAI gNB and COTS UE](NR_SA_Tutorial_COTS_UE.md)
|
||||
|
||||
## 4.2 Testing with OAI nrUE
|
||||
Please check this link:
|
||||
[Testing with OAI gNB and OAI nrUE](NR_SA_Tutorial_OAI_nrUE.md)
|
||||
@@ -0,0 +1,206 @@
|
||||
<table style="border-collapse: collapse; border: none;">
|
||||
<tr style="border-collapse: collapse; border: none;">
|
||||
<td style="border-collapse: collapse; border: none;">
|
||||
<a href="http://www.openairinterface.org/">
|
||||
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
|
||||
</img>
|
||||
</a>
|
||||
</td>
|
||||
<td style="border-collapse: collapse; border: none; vertical-align: center;">
|
||||
<b><font size = "5">OAI 5G NR SA tutorial with OAI nrUE</font></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
[[_TOC_]]
|
||||
|
||||
# 1. Scenario
|
||||
In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and OAI nrUE.
|
||||
|
||||
Minimum hardware requirements:
|
||||
- Laptop/Desktop/Server for OAI CN5G and OAI gNB
|
||||
- Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso)
|
||||
- CPU: 8 cores x86_64 @ 3.5 GHz
|
||||
- RAM: 32 GB
|
||||
- Laptop for UE
|
||||
- Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso)
|
||||
- CPU: 8 cores x86_64 @ 3.5 GHz
|
||||
- RAM: 8 GB
|
||||
- [USRP B210](https://www.ettus.com/all-products/ub210-kit/), [USRP N300](https://www.ettus.com/all-products/USRP-N300/) or [USRP X300](https://www.ettus.com/all-products/x300-kit/)
|
||||
- Please identify the network interface(s) on which the USRP is connected and update the gNB configuration file
|
||||
|
||||
|
||||
# 2. OAI CN5G
|
||||
|
||||
## 2.1 OAI CN5G pre-requisites
|
||||
|
||||
Please install and configure OAI CN5G as described here:
|
||||
[OAI CN5G](NR_SA_Tutorial_OAI_CN5G.md)
|
||||
|
||||
|
||||
# 3. OAI gNB and OAI nrUE
|
||||
|
||||
## 3.1 OAI gNB and OAI nrUE pre-requisites
|
||||
|
||||
### Build UHD from source
|
||||
```bash
|
||||
sudo apt install -y libboost-all-dev libusb-1.0-0-dev doxygen python3-docutils python3-mako python3-numpy python3-requests python3-ruamel.yaml python3-setuptools cmake build-essential
|
||||
|
||||
git clone https://github.com/EttusResearch/uhd.git ~/uhd
|
||||
cd ~/uhd
|
||||
git checkout v4.4.0.0
|
||||
cd host
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../
|
||||
make -j $(nproc)
|
||||
make test # This step is optional
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
sudo uhd_images_downloader
|
||||
```
|
||||
|
||||
## 3.2 Build OAI gNB and OAI nrUE
|
||||
|
||||
```bash
|
||||
# Get openairinterface5g source code
|
||||
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ~/openairinterface5g
|
||||
cd ~/openairinterface5g
|
||||
git checkout develop
|
||||
|
||||
# Install OAI dependencies
|
||||
cd ~/openairinterface5g/cmake_targets
|
||||
./build_oai -I
|
||||
|
||||
# Build OAI gNB
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets
|
||||
./build_oai -w USRP --ninja --nrUE --gNB --build-lib "telnetsrv nrscope" -c
|
||||
```
|
||||
|
||||
# 4. Run OAI CN5G and OAI gNB
|
||||
|
||||
## 4.1 Run OAI CN5G
|
||||
|
||||
```bash
|
||||
cd ~/oai-cn5g
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## 4.2 Run OAI gNB
|
||||
|
||||
### USRP B210
|
||||
```bash
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets/ran_build/build
|
||||
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --sa -E --continuous-tx
|
||||
```
|
||||
### USRP N300
|
||||
```bash
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets/ran_build/build
|
||||
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --gNBs.[0].min_rxtxtime 6 --sa --usrp-tx-thread-config 1
|
||||
```
|
||||
|
||||
### USRP X300
|
||||
```bash
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets/ran_build/build
|
||||
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --gNBs.[0].min_rxtxtime 6 --sa --usrp-tx-thread-config 1 -E --continuous-tx
|
||||
```
|
||||
|
||||
### RFsimulator
|
||||
```bash
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets/ran_build/build
|
||||
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --rfsim --sa
|
||||
```
|
||||
|
||||
# 5. OAI UE
|
||||
|
||||
## 5.1 SIM Card
|
||||
Edit openair3/UICC/usim_interface.c
|
||||
```bash
|
||||
#define UICC_PARAMS_DESC {\
|
||||
{"imsi", "USIM IMSI\n", 0, strptr:&(uicc->imsiStr), defstrval:"001010000000001", TYPE_STRING, 0 },\
|
||||
{"nmc_size" "number of digits in NMC", 0, iptr:&(uicc->nmc_size), defintval:2, TYPE_INT, 0 },\
|
||||
{"key", "USIM Ki\n", 0, strptr:&(uicc->keyStr), defstrval:"fec86ba6eb707ed08905757b1bb44b8f", TYPE_STRING, 0 },\
|
||||
{"opc", "USIM OPc\n", 0, strptr:&(uicc->opcStr), defstrval:"c42449363bbad02b66d16bc975d77cc1", TYPE_STRING, 0 },\
|
||||
{"amf", "USIM amf\n", 0, strptr:&(uicc->amfStr), defstrval:"8000", TYPE_STRING, 0 },\
|
||||
{"sqn", "USIM sqn\n", 0, strptr:&(uicc->sqnStr), defstrval:"000000", TYPE_STRING, 0 },\
|
||||
{"dnn", "UE dnn (apn)\n", 0, strptr:&(uicc->dnnStr), defstrval:"oai", TYPE_STRING, 0 },\
|
||||
{"nssai_sst", "UE nssai\n", 0, iptr:&(uicc->nssai_sst), defintval:1, TYPE_INT, 0 }, \
|
||||
{"nssai_sd", "UE nssai\n", 0, iptr:&(uicc->nssai_sd), defintval:0xffffff, TYPE_INT, 0 }, \
|
||||
};
|
||||
```
|
||||
|
||||
## 5.2 Testing OAI nrUE with USRP B210
|
||||
|
||||
Important notes:
|
||||
- This should be run in a second Ubuntu 22.04 host, other than gNB
|
||||
- It only applies when running OAI gNB with USRP B210
|
||||
|
||||
Run OAI nrUE
|
||||
```bash
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets/ran_build/build
|
||||
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --nokrnmod --ue-fo-compensation --sa -E --uicc0.imsi 001010000000001
|
||||
```
|
||||
|
||||
## 5.2 Testing OAI nrUE with RFsimulator
|
||||
Important notes:
|
||||
- This should be run on the same host as the OAI gNB
|
||||
- It only applies when running OAI gNB with RFsimulator
|
||||
|
||||
Run OAI nrUE with RFsimulator
|
||||
```bash
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets/ran_build/build
|
||||
sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --nokrnmod --rfsim --sa --uicc0.imsi 001010000000001
|
||||
```
|
||||
|
||||
### 5.2.1 Ping test
|
||||
- UE host
|
||||
```bash
|
||||
ping 192.168.70.135 -I oaitun_ue1
|
||||
```
|
||||
|
||||
# 6. Advanced configurations (optional)
|
||||
|
||||
## 6.1 USRP N300 and X300 Ethernet Tuning
|
||||
|
||||
Please also refer to the official [USRP Host Performance Tuning Tips and Tricks](https://kb.ettus.com/USRP_Host_Performance_Tuning_Tips_and_Tricks) tuning guide.
|
||||
|
||||
The following steps are recommended. Please change the network interface(s) as required. Also, you should have 10Gbps interface(s): if you use two cables, you should have the XG firmware. Refer to the [N300 Getting Started Guide](https://kb.ettus.com/USRP_N300/N310/N320/N321_Getting_Started_Guide) for more information.
|
||||
|
||||
* Use an MTU of 9000: how to change this depends on the network management tool. In the case of Network Manager, this can be done from the GUI.
|
||||
* Increase the kernel socket buffer (also done by the USRP driver in OAI)
|
||||
* Increase Ethernet Ring Buffers: `sudo ethtool -G <ifname> rx 4096 tx 4096`
|
||||
* Disable hyper-threading in the BIOS (This step is optional)
|
||||
* Optional: Disable KPTI Protections for Spectre/Meltdown for more performance. **This is a security risk.** Add `mitigations=off nosmt` in your grub config and update grub. (This step is optional)
|
||||
|
||||
Example code to run:
|
||||
```
|
||||
for ((i=0;i<$(nproc);i++)); do sudo cpufreq-set -c $i -r -g performance; done
|
||||
sudo sysctl -w net.core.wmem_max=62500000
|
||||
sudo sysctl -w net.core.rmem_max=62500000
|
||||
sudo sysctl -w net.core.wmem_default=62500000
|
||||
sudo sysctl -w net.core.rmem_default=62500000
|
||||
sudo ethtool -G enp1s0f0 tx 4096 rx 4096
|
||||
```
|
||||
|
||||
## 6.2 Real-time performance workarounds
|
||||
- Enable Performance Mode `sudo cpupower idle-set -D 0`
|
||||
- If you get real-time problems on heavy UL traffic, reduce the maximum UL MCS using an additional command-line switch: `--MACRLCs.[0].ul_max_mcs 14`.
|
||||
|
||||
## 6.3 Uplink issues related with noise on the DC carriers
|
||||
- There is noise on the DC carriers on N300 and especially the X300 in UL. To avoid their use or shift them away from the center to use more UL spectrum, use the `--tune-offset <Hz>` command line switch, where `<Hz>` is ideally half the bandwidth, or possibly less.
|
||||
@@ -1,345 +0,0 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
mysql:
|
||||
container_name: "mysql"
|
||||
image: mysql:5.7
|
||||
volumes:
|
||||
- ./database/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ./healthscripts/mysql-healthcheck2.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
- MYSQL_USER=test
|
||||
- MYSQL_PASSWORD=test
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.131
|
||||
oai-udr:
|
||||
container_name: "oai-udr"
|
||||
image: oai-udr:develop
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
- UDR_NAME=OAI_UDR
|
||||
- UDR_INTERFACE_NAME_FOR_NUDR=eth0
|
||||
- UDR_INTERFACE_PORT_FOR_NUDR=80
|
||||
- UDR_INTERFACE_HTTP2_PORT_FOR_NUDR=8080
|
||||
- USE_HTTP2=no
|
||||
- UDR_API_VERSION=v1
|
||||
- MYSQL_IPV4_ADDRESS=192.168.70.131
|
||||
- MYSQL_USER=test
|
||||
- MYSQL_PASS=test
|
||||
- DB_CONNECTION_TIMEOUT=300 # Reset the connection to the DB after expiring the timeout (in second) currently can't be changed
|
||||
- MYSQL_DB=oai_db
|
||||
- WAIT_MYSQL=120
|
||||
- USE_FQDN_DNS=yes
|
||||
- REGISTER_NRF=yes
|
||||
- NRF_IPV4_ADDRESS=192.168.70.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
depends_on:
|
||||
- mysql
|
||||
- oai-nrf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.136
|
||||
oai-udm:
|
||||
container_name: "oai-udm"
|
||||
image: oai-udm:develop
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
- UDM_NAME=OAI_UDM
|
||||
- SBI_IF_NAME=eth0
|
||||
- SBI_PORT=80
|
||||
- SBI_HTTP2_PORT=8080
|
||||
- USE_HTTP2=no
|
||||
- UDM_VERSION_NB=v1
|
||||
- USE_FQDN_DNS=yes
|
||||
- UDR_IP_ADDRESS=192.168.70.136
|
||||
- UDR_PORT=80
|
||||
- UDR_VERSION_NB=v1
|
||||
- UDR_FQDN=oai-udr
|
||||
- REGISTER_NRF=yes
|
||||
- NRF_IPV4_ADDRESS=192.168.70.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
depends_on:
|
||||
- oai-udr
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.137
|
||||
oai-ausf:
|
||||
container_name: "oai-ausf"
|
||||
image: oai-ausf:develop
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE_ID=0
|
||||
- PID_DIR=/var/run
|
||||
- AUSF_NAME=OAI_AUSF
|
||||
- SBI_IF_NAME=eth0
|
||||
- SBI_PORT=80
|
||||
- USE_HTTP2=no
|
||||
- SBI_HTTP2_PORT=8080
|
||||
- USE_FQDN_DNS=yes
|
||||
- UDM_IP_ADDRESS=192.168.70.137
|
||||
- UDM_PORT=80
|
||||
- UDM_VERSION_NB=v1
|
||||
- UDM_FQDN=oai-udm
|
||||
- REGISTER_NRF=yes
|
||||
- NRF_IPV4_ADDRESS=192.168.70.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
depends_on:
|
||||
- oai-udm
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.138
|
||||
oai-nrf:
|
||||
container_name: "oai-nrf"
|
||||
image: oai-nrf:develop
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- NRF_INTERFACE_PORT_FOR_SBI=80
|
||||
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=8080
|
||||
- NRF_API_VERSION=v1
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.130
|
||||
oai-amf:
|
||||
container_name: "oai-amf"
|
||||
image: oai-amf:develop
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
- MCC=001
|
||||
- MNC=01
|
||||
- REGION_ID=128
|
||||
- AMF_SET_ID=1
|
||||
- SERVED_GUAMI_MCC_0=001
|
||||
- SERVED_GUAMI_MNC_0=01
|
||||
- SERVED_GUAMI_REGION_ID_0=128
|
||||
- SERVED_GUAMI_AMF_SET_ID_0=1
|
||||
- SERVED_GUAMI_MCC_1=460
|
||||
- SERVED_GUAMI_MNC_1=11
|
||||
- SERVED_GUAMI_REGION_ID_1=10
|
||||
- SERVED_GUAMI_AMF_SET_ID_1=1
|
||||
- PLMN_SUPPORT_MCC=001
|
||||
- PLMN_SUPPORT_MNC=01
|
||||
- PLMN_SUPPORT_TAC=0x0001
|
||||
- SST_0=1
|
||||
- SD_0=0x1
|
||||
- SST_1=1
|
||||
- SD_1=0x2
|
||||
- SST_2=1
|
||||
- SD_2=0x3
|
||||
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
|
||||
- AMF_INTERFACE_NAME_FOR_N11=eth0
|
||||
- SMF_INSTANCE_ID_0=1
|
||||
- SMF_FQDN_0=oai-smf
|
||||
- SMF_IPV4_ADDR_0=192.168.70.133
|
||||
- SMF_HTTP_VERSION_0=v1
|
||||
- SELECTED_0=true
|
||||
- SMF_INSTANCE_ID_1=2
|
||||
- SMF_FQDN_1=oai-smf
|
||||
- SMF_IPV4_ADDR_1=0.0.0.0
|
||||
- SMF_HTTP_VERSION_1=v1
|
||||
- SELECTED_1=false
|
||||
- MYSQL_SERVER=192.168.70.131
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=linux
|
||||
- MYSQL_DB=oai_db
|
||||
- OPERATOR_KEY=1006020f0a478bf6b699f15c062e42b3
|
||||
- NRF_IPV4_ADDRESS=192.168.70.130
|
||||
- NRF_PORT=80
|
||||
- EXTERNAL_NRF=no
|
||||
- NF_REGISTRATION=yes
|
||||
- SMF_SELECTION=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- EXTERNAL_AUSF=yes
|
||||
- EXTERNAL_UDM=no
|
||||
- EXTERNAL_NSSF=no
|
||||
- USE_HTTP2=no
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
- AUSF_IPV4_ADDRESS=192.168.70.138
|
||||
- AUSF_PORT=80
|
||||
- AUSF_API_VERSION=v1
|
||||
- AUSF_FQDN=oai-ausf
|
||||
- UDM_IPV4_ADDRESS=192.168.70.137
|
||||
- UDM_PORT=80
|
||||
- UDM_API_VERSION=v2
|
||||
- UDM_FQDN=oai-udm
|
||||
- INT_ALGO_LIST=["NIA1", "NIA2"]
|
||||
- CIPH_ALGO_LIST=["NEA0", "NEA2"]
|
||||
depends_on:
|
||||
- mysql
|
||||
- oai-nrf
|
||||
- oai-ausf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.132
|
||||
oai-smf:
|
||||
container_name: "oai-smf"
|
||||
image: oai-smf:develop
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
- SMF_INTERFACE_NAME_FOR_N4=eth0
|
||||
- SMF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- SMF_INTERFACE_PORT_FOR_SBI=80
|
||||
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
|
||||
- SMF_API_VERSION=v1
|
||||
- DEFAULT_DNS_IPV4_ADDRESS=8.8.8.8
|
||||
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
|
||||
- AMF_IPV4_ADDRESS=192.168.70.132
|
||||
- AMF_PORT=80
|
||||
- AMF_API_VERSION=v1
|
||||
- AMF_FQDN=oai-amf
|
||||
- UDM_IPV4_ADDRESS=192.168.70.137
|
||||
- UDM_PORT=80
|
||||
- UDM_API_VERSION=v2
|
||||
- UDM_FQDN=oai-udm
|
||||
- UPF_IPV4_ADDRESS=192.168.70.134
|
||||
- UPF_FQDN_0=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.70.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- USE_LOCAL_SUBSCRIPTION_INFO=yes #Set to yes if SMF uses local subscription information instead of from an UDM
|
||||
- USE_NETWORK_INSTANCE=no #Set yes if network instance is to be used for given UPF
|
||||
- NRF_FQDN=oai-nrf
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- HTTP_VERSION=1 # Default: 1
|
||||
- UE_MTU=1500
|
||||
- DNN_NI0=oai
|
||||
- TYPE0=IPv4
|
||||
- DNN_RANGE0=12.1.1.2 - 12.1.1.253
|
||||
- NSSAI_SST0=1
|
||||
- NSSAI_SD0=0x1
|
||||
- SESSION_AMBR_UL0=10000Mbps
|
||||
- SESSION_AMBR_DL0=10000Mbps
|
||||
- DNN_NI1=oai2
|
||||
- TYPE1=IPv4
|
||||
- DNN_RANGE1=12.1.2.2 - 12.1.2.253
|
||||
- NSSAI_SST1=1
|
||||
- NSSAI_SD1=0x2
|
||||
- SESSION_AMBR_UL1=10000Mbps
|
||||
- SESSION_AMBR_DL1=10000Mbps
|
||||
- DNN_NI2=oai3
|
||||
- TYPE2=IPv4
|
||||
- DNN_RANGE2=12.1.3.2 - 12.1.3.253
|
||||
- NSSAI_SST2=1
|
||||
- NSSAI_SD2=0x3
|
||||
- SESSION_AMBR_UL2=10000Mbps
|
||||
- SESSION_AMBR_DL2=10000Mbps
|
||||
- DNN_NI3=ims
|
||||
- TYPE3=IPv4v6
|
||||
- DNN_RANGE3=14.1.1.2 - 14.1.1.253
|
||||
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1 # only needed when ims is being used
|
||||
- ENABLE_USAGE_REPORTING=no # Set yes if UE USAGE REPORTING is to be done at UPF
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.133
|
||||
oai-spgwu:
|
||||
container_name: "oai-spgwu"
|
||||
image: oai-spgwu-tiny:develop
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- PID_DIRECTORY=/var/run
|
||||
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
|
||||
- SGW_INTERFACE_NAME_FOR_SX=eth0
|
||||
- PGW_INTERFACE_NAME_FOR_SGI=eth0
|
||||
- NETWORK_UE_NAT_OPTION=yes
|
||||
- NETWORK_UE_IP=12.1.1.0/24
|
||||
- SPGWC0_IP_ADDRESS=192.168.70.133
|
||||
- BYPASS_UL_PFCP_RULES=no
|
||||
- MCC=001
|
||||
- MNC=01
|
||||
- MNC03=001
|
||||
- TAC=1
|
||||
- GW_ID=1
|
||||
- THREAD_S1U_PRIO=80
|
||||
- S1U_THREADS=8
|
||||
- THREAD_SX_PRIO=81
|
||||
- SX_THREADS=1
|
||||
- THREAD_SGI_PRIO=80
|
||||
- SGI_THREADS=8
|
||||
- REALM=openairinterface.org
|
||||
- ENABLE_5G_FEATURES=yes
|
||||
- REGISTER_NRF=yes
|
||||
- USE_FQDN_NRF=yes
|
||||
- UPF_FQDN_5G=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.70.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=0x1
|
||||
- DNN_0=oai
|
||||
- NSSAI_SST_1=1
|
||||
- NSSAI_SD_1=0x2
|
||||
- DNN_1=oai2
|
||||
- NSSAI_SST_2=1
|
||||
- NSSAI_SD_2=0x3
|
||||
- DNN_2=oai3
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- SYS_ADMIN
|
||||
cap_drop:
|
||||
- ALL
|
||||
privileged: true
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.134
|
||||
oai-ext-dn:
|
||||
image: trf-gen-cn5g:latest
|
||||
privileged: true
|
||||
container_name: oai-ext-dn
|
||||
entrypoint: /bin/bash -c \
|
||||
"ip route add 12.1.1.0/24 via 192.168.70.134 dev eth0; sleep infinity"
|
||||
depends_on:
|
||||
- oai-spgwu
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ip r | grep 12.1.1"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.135
|
||||
networks:
|
||||
# public_net:
|
||||
# external:
|
||||
# name: demo-oai-public-net
|
||||
public_net:
|
||||
driver: bridge
|
||||
name: demo-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.70.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "demo-oai"
|
||||
@@ -0,0 +1,15 @@
|
||||
ARG BASE_IMAGE=ubuntu:jammy
|
||||
|
||||
FROM $BASE_IMAGE as ims
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
psmisc \
|
||||
git \
|
||||
asterisk \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENTRYPOINT ["asterisk", "-fp"]
|
||||
@@ -0,0 +1,146 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
|
||||
AMF =
|
||||
{
|
||||
INSTANCE_ID = 0; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
|
||||
AMF_NAME = "OAI-AMF";
|
||||
|
||||
RELATIVE_CAPACITY = 30;
|
||||
# Display statistics about whole system (in seconds)
|
||||
STATISTICS_TIMER_INTERVAL = 20; # YOUR CONFIG HERE
|
||||
|
||||
CORE_CONFIGURATION:
|
||||
{
|
||||
EMERGENCY_SUPPORT = "false";
|
||||
};
|
||||
|
||||
GUAMI:
|
||||
{
|
||||
MCC = "001"; MNC = "01"; RegionID = "128"; AMFSetID = "1"; AMFPointer = "1" # YOUR GUAMI CONFIG HERE
|
||||
}
|
||||
|
||||
SERVED_GUAMI_LIST = (
|
||||
{MCC = "001"; MNC = "01"; RegionID = "128"; AMFSetID = "1"; AMFPointer = "0"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
|
||||
);
|
||||
|
||||
PLMN_SUPPORT_LIST = (
|
||||
{
|
||||
MCC = "001"; MNC = "01"; TAC = 0x0001; # YOUR PLMN CONFIG HERE
|
||||
SLICE_SUPPORT_LIST = (
|
||||
{SST = 1,SD= "0xFFFFFF"} #SST, SD value can be decimal or hexadecimal
|
||||
)
|
||||
}
|
||||
); # At the moment only one PLMN configuration is supported
|
||||
|
||||
INTERFACES:
|
||||
{
|
||||
# AMF binded interface for N1/N2 interface (NGAP)
|
||||
NGAP_AMF:
|
||||
{
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 38412; # YOUR NETWORK CONFIG HERE
|
||||
PPID = 60; # YOUR NETWORK CONFIG HERE
|
||||
};
|
||||
|
||||
# AMF binded interface for SBI (N11 (SMF)/N12 (AUSF), etc.)
|
||||
SBI:
|
||||
{
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE
|
||||
API_VERSION = "v1"; # YOUR AMF API VERSION CONFIG HERE
|
||||
HTTP2_PORT = 8080; # YOUR NETWORK CONFIG HERE
|
||||
|
||||
SMF_INSTANCES_POOL = (
|
||||
{SMF_INSTANCE_ID = 1; IPV4_ADDRESS = "192.168.70.133"; PORT = "80"; HTTP2_PORT = 8080, VERSION = "v1"; FQDN = "oai-smf", SELECTED = "true"} # YOUR SMF CONFIG HERE
|
||||
);
|
||||
};
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-nrf" # YOUR NRF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
AUSF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.138"; # YOUR AUSF CONFIG HERE
|
||||
PORT = 80; # YOUR AUSF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR AUSF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-ausf" # YOUR AUSF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
NSSF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.138"; # YOUR NSSF CONFIG HERE
|
||||
PORT = 80; # YOUR NSSF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v2"; # YOUR NSSF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-nssf" # YOUR NSSF FQDN CONFIG HERE
|
||||
};
|
||||
};
|
||||
|
||||
SUPPORT_FEATURES:
|
||||
{
|
||||
# STRING, {"yes", "no"},
|
||||
NF_REGISTRATION = "yes"; # Set to yes if AMF resgisters to an NRF
|
||||
NRF_SELECTION = "no"; # Set to yes to enable NRF discovery and selection
|
||||
SMF_SELECTION = "no"; # Set to yes to enable SMF discovery and selection
|
||||
EXTERNAL_NRF = "no"; # Set to yes if AMF works with an external NRF
|
||||
EXTERNAL_NSSF = "no";
|
||||
EXTERNAL_AUSF = "yes"; # Set to yes if AMF works with an external AUSF
|
||||
EXTERNAL_UDM = "no"; # Set to yes if AMF works with an external UDM
|
||||
USE_FQDN_DNS = "no"; # Set to yes if AMF relies on a DNS to resolve NRF/SMF/UDM/AUSF's FQDN
|
||||
USE_HTTP2 = "no"; # Set to yes to enable HTTP2 for AMF server
|
||||
}
|
||||
|
||||
AUTHENTICATION:
|
||||
{ #NOT USED because authentication requests go via AUSF
|
||||
## MySQL mandatory options
|
||||
MYSQL_server = "mysql"; # MySQL Server address
|
||||
MYSQL_user = "root"; # Database server login
|
||||
MYSQL_pass = "linux"; # Database server password
|
||||
MYSQL_db = "oai_db"; # Your database name
|
||||
|
||||
## OP
|
||||
RANDOM = "true";
|
||||
};
|
||||
|
||||
NAS:
|
||||
{
|
||||
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "NIA1" , "NIA1" , "NIA2" ]; #Default [ "NIA0" , "NIA1" , "NIA2" ];
|
||||
ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "NEA0" , "NEA1" , "NEA2" ]; #Default [ "NEA0" , "NEA1" , "NEA2" ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
MODULES =
|
||||
{
|
||||
NGAP_MESSAGE = (
|
||||
{MSG_NAME = "NGSetupRequest"; ProcedureCode = 21; TypeOfMessage = "initialMessage"}
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,62 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
|
||||
AUSF =
|
||||
{
|
||||
INSTANCE_ID = 0;
|
||||
PID_DIRECTORY = "/var/run";
|
||||
AUSF_NAME = "OAI_AUSF";
|
||||
|
||||
INTERFACES:{
|
||||
# AUSF binded interface for SBI interface (e.g., communication with AMF, UDM)
|
||||
SBI:{
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR API VERSION FOR UDM CONFIG HERE
|
||||
HTTP2_PORT = 8080; # YOUR NETWORK CONFIG HERE
|
||||
};
|
||||
};
|
||||
|
||||
# SUPPORT FEATURES
|
||||
SUPPORT_FEATURES:{
|
||||
# STRING, {"yes", "no"},
|
||||
USE_FQDN_DNS = "no"; # Set to yes if AUSF will relying on a DNS to resolve UDM's FQDN
|
||||
USE_HTTP2 = "no"; # Set to yes to enable HTTP2 for AMF server
|
||||
REGISTER_NRF = "no"; # Set to 'yes' if AUSF resgisters to an NRF
|
||||
}
|
||||
|
||||
# UDM Information
|
||||
UDM:{
|
||||
IPV4_ADDRESS = "192.168.70.137"; # YOUR NETWORK CONFIG HERE
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR API VERSION FOR UDM CONFIG HERE
|
||||
FQDN = "oai-udm" # YOUR UDM FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION HERE
|
||||
FQDN = "oai-nrf";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
|
||||
NRF =
|
||||
{
|
||||
INSTANCE = 0; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
|
||||
|
||||
SBI_INTERFACE :
|
||||
{
|
||||
# NRF binded interface for SBI interface (e.g., communication with other NFs e.g., AMF, SMF, UDM)
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
HTTP2_PORT = 8080; # YOUR NETWORK CONFIG HERE
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION CONFIG HERE
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
|
||||
SMF =
|
||||
{
|
||||
FQDN = "oai-smf";
|
||||
INSTANCE = 1; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
|
||||
INTERFACES :
|
||||
{
|
||||
N4 :
|
||||
{
|
||||
# SMF binded interface for N4 communication (UPF)
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
};
|
||||
|
||||
SBI :
|
||||
{
|
||||
# SMF binded interface for SBI interface (e.g., communication with AMF, UDM)
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
HTTP2_PORT = 8080; # YOUR NETWORK CONFIG HERE
|
||||
API_VERSION = "v1"; # YOUR SMF API VERSION CONFIG HERE
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# DNN configurations with pool of UE assigned IP addresses
|
||||
# Do not make IP pools overlap
|
||||
# first IPv4 address X.Y.Z.1 is reserved for GTP network device on UPF
|
||||
DNN_LIST = (
|
||||
# PDU_SESSION_TYPE choice in {IPv4, IPv6, IPv4v6}
|
||||
{DNN_NI = "oai"; PDU_SESSION_TYPE = "IPv4"; IPV4_RANGE = "12.1.1.2 - 12.1.1.254"; IPV6_PREFIX = "2001:1:2::/64"},
|
||||
{DNN_NI = "openairinterface"; PDU_SESSION_TYPE = "IPv4v6"; IPV4_RANGE = "12.1.2.2 - 12.1.2.254"; IPV6_PREFIX = "2001:1:2::/64"},
|
||||
{DNN_NI = "ims"; PDU_SESSION_TYPE = "IPv4v6"; IPV4_RANGE = "12.2.1.1 - 12.2.1.254"; IPV6_PREFIX = "2001:1:2::/64"}
|
||||
);
|
||||
|
||||
# DNS address communicated to UEs
|
||||
DEFAULT_DNS_IPV4_ADDRESS = "8.8.8.8"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_SEC_IPV4_ADDRESS = "4.4.4.4"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_IPV6_ADDRESS = "2001:4860:4860::8888"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_SEC_IPV6_ADDRESS = "2001:4860:4860::8844"; # YOUR DNS CONFIG HERE
|
||||
|
||||
DEFAULT_CSCF_IPV4_ADDRESS = "192.168.70.139"; #not defined at the moment
|
||||
DEFAULT_CSCF_IPV6_ADDRESS = "fe80::7915:f408:1787:db8b";
|
||||
|
||||
#Default UE MTU
|
||||
UE_MTU = 1500;
|
||||
|
||||
# SUPPORT FEATURES
|
||||
SUPPORT_FEATURES:
|
||||
{
|
||||
# STRING, {"yes", "no"},
|
||||
REGISTER_NRF = "yes"; # Set to yes if SMF resgisters to an NRF
|
||||
DISCOVER_UPF = "yes"; # Set to yes to enable UPF discovery and selection
|
||||
FORCE_PUSH_PROTOCOL_CONFIGURATION_OPTIONS = "no"; # Non standard feature, normally should be set to "no",
|
||||
# but you may need to set to yes for UE that do not explicitly request a PDN address through NAS signalling
|
||||
USE_LOCAL_SUBSCRIPTION_INFO = "yes"; # Set to yes if SMF uses local subscription information instead of from an UDM
|
||||
USE_FQDN_DNS = "no"; # Set to yes if AMF/UDM/NRF/UPF will relying on a DNS to resolve FQDN
|
||||
HTTP_VERSION = 1; # Default: 1
|
||||
USE_NETWORK_INSTANCE = "no" # Set yes if network instance is to be used for given UPF
|
||||
DISCOVER_PCF = "no";
|
||||
USE_LOCAL_PCC_RULES = "yes";
|
||||
INCLUDE_DL_PDR_IN_PFCP_SESSION_ESTAB = "no";
|
||||
ENABLE_REL15_SUPPORT = "no";
|
||||
}
|
||||
|
||||
AMF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.132"; # YOUR AMF CONFIG HERE
|
||||
PORT = 80; # YOUR AMF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR AMF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-amf" # YOUR AMF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
UDM :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.137"; # YOUR UDM CONFIG HERE
|
||||
PORT = 80; # YOUR UDM CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR UDM API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-udm" # YOUR UDM FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-nrf" # YOUR NRF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
UPF_LIST = (
|
||||
{IPV4_ADDRESS = "192.168.70.134" ; FQDN = "oai-spgwu-tiny"; NWI_LIST = ({DOMAIN_ACCESS = "access.oai.org", DOMAIN_CORE = "core.oai.org"})}
|
||||
); # NWI_LIST IS OPTIONAL PARAMETER
|
||||
# Not in use because information is getting fetched from UDR
|
||||
LOCAL_CONFIGURATION :
|
||||
{
|
||||
SESSION_MANAGEMENT_SUBSCRIPTION_LIST = (
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "0xFFFFFF", DNN = "oai", DEFAULT_SESSION_TYPE = "IPv4", DEFAULT_SSC_MODE = 1,
|
||||
QOS_PROFILE_5QI = 1, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 15, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
|
||||
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "10000Mbps", SESSION_AMBR_DL = "10000Mbps"},
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "0xFFFFFF", DNN = "openairinterface", DEFAULT_SESSION_TYPE = "IPv4v6", DEFAULT_SSC_MODE = 1,
|
||||
QOS_PROFILE_5QI = 1, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 15, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
|
||||
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "10000Mbps", SESSION_AMBR_DL = "10000Mbps"},
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "0xFFFFFF", DNN = "ims", DEFAULT_SESSION_TYPE = "IPv4v6", DEFAULT_SSC_MODE = 1,
|
||||
QOS_PROFILE_5QI = 1, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 15, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
|
||||
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "330Mbps", SESSION_AMBR_DL = "330Mbps"}
|
||||
);
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,138 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
SPGW-U =
|
||||
{
|
||||
FQDN = "gw1.spgw.node.epc.mnc01.mcc001.3gpp.org"; # FQDN for 4G
|
||||
INSTANCE = 0; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
|
||||
#ITTI_TASKS :
|
||||
#{
|
||||
#ITTI_TIMER_SCHED_PARAMS :
|
||||
#{
|
||||
#CPU_ID = 1;
|
||||
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
#SCHED_PRIORITY = 85;
|
||||
#};
|
||||
#S1U_SCHED_PARAMS :
|
||||
#{
|
||||
#CPU_ID = 1;
|
||||
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
#SCHED_PRIORITY = 84;
|
||||
#};
|
||||
#SX_SCHED_PARAMS :
|
||||
#{
|
||||
#CPU_ID = 1;
|
||||
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
#SCHED_PRIORITY = 84;
|
||||
#};
|
||||
#ASYNC_CMD_SCHED_PARAMS :
|
||||
#{
|
||||
#CPU_ID = 1;
|
||||
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
#SCHED_PRIORITY = 84;
|
||||
#};
|
||||
#};
|
||||
|
||||
INTERFACES :
|
||||
{
|
||||
S1U_S12_S4_UP :
|
||||
{
|
||||
# S-GW binded interface for S1-U (N3) communication (GTPV1-U) can be ethernet interface, virtual ethernet interface, we don't advise wireless interfaces
|
||||
INTERFACE_NAME = "eth0"; # STRING, interface name, YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read"; # STRING, CIDR or "read to let app read interface configured IP address
|
||||
#PORT = 2152; # Default is 2152
|
||||
SCHED_PARAMS :
|
||||
{
|
||||
#CPU_ID = 2;
|
||||
SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
SCHED_PRIORITY = 98;
|
||||
POOL_SIZE = 1; # NUM THREADS
|
||||
};
|
||||
};
|
||||
SX :
|
||||
{
|
||||
# S/P-GW binded interface for SX (N4) communication
|
||||
INTERFACE_NAME = "eth0"; # STRING, interface name
|
||||
IPV4_ADDRESS = "read"; # STRING, CIDR or "read" to let app read interface configured IP address
|
||||
#PORT = 8805; # Default is 8805
|
||||
SCHED_PARAMS :
|
||||
{
|
||||
#CPU_ID = 1;
|
||||
SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
SCHED_PRIORITY = 88;
|
||||
POOL_SIZE = 1; # NUM THREADS
|
||||
};
|
||||
};
|
||||
SGI :
|
||||
{
|
||||
# No config to set, the software will set the SGi (N6) interface to the interface used for the default route.
|
||||
INTERFACE_NAME = "eth0"; # STRING, interface name or "default_gateway"
|
||||
IPV4_ADDRESS = "read"; # STRING, CIDR or "read" to let app read interface configured IP address
|
||||
SCHED_PARAMS :
|
||||
{
|
||||
#CPU_ID = 3;
|
||||
SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
SCHED_PRIORITY = 99;
|
||||
POOL_SIZE = 1; # NUM THREADS
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
SNAT = "yes"; # SNAT Values in {yes, no}
|
||||
PDN_NETWORK_LIST = (
|
||||
{NETWORK_IPV4 = "12.1.0.0/16";} # 1 ITEM SUPPORTED ONLY
|
||||
);
|
||||
# SMF LIST
|
||||
SPGW-C_LIST = (
|
||||
{IPV4_ADDRESS="192.168.70.133" ;}
|
||||
);
|
||||
|
||||
NON_STANDART_FEATURES :
|
||||
{
|
||||
BYPASS_UL_PFCP_RULES = "no"; # 'no' for standard features, yes for enhancing UL throughput
|
||||
};
|
||||
|
||||
SUPPORT_5G_FEATURES:
|
||||
{
|
||||
# STRING, {"yes", "no"},
|
||||
ENABLE_5G_FEATURES = "yes" # Set to 'yes' to support 5G Features
|
||||
REGISTER_NRF = "yes"; # Set to 'yes' if UPF resgisters to an NRF
|
||||
USE_FQDN_NRF = "no"; # Set to 'yes' if UPF relies on a DNS/FQDN service to resolve NRF's FQDN
|
||||
UPF_FQDN_5G = "oai-spgwu-tiny"; #Set FQDN of UPF
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
HTTP_VERSION = 1; #Set HTTP version for NRF (1 or 2)Default 1
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION HERE
|
||||
FQDN = "oai-nrf";
|
||||
};
|
||||
|
||||
# Additional info to be sent to NRF for supporting Network Slicing
|
||||
UPF_INFO = (
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "0xFFFFFF"; DNN_LIST = ({DNN = "oai";}); },
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "0xFFFFFF"; DNN_LIST = ({DNN = "openairinterface";}); },
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "0xFFFFFF"; DNN_LIST = ({DNN = "ims";}); }
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,63 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
|
||||
UDM =
|
||||
{
|
||||
INSTANCE_ID = 0;
|
||||
PID_DIRECTORY = "/var/run";
|
||||
|
||||
UDM_NAME = "OAI_UDM";
|
||||
|
||||
INTERFACES:{
|
||||
# UDM binded interface for SBI interface (e.g., communication with UDR, AUSF)
|
||||
SBI:{
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
PPID = 60;
|
||||
API_VERSION = "v1";
|
||||
HTTP2_PORT = 8080; # YOUR NETWORK CONFIG HERE
|
||||
};
|
||||
};
|
||||
|
||||
# SUPPORT FEATURES
|
||||
SUPPORT_FEATURES: {
|
||||
# STRING, {"yes", "no"},
|
||||
USE_FQDN_DNS = "no"; # Set to yes if UDM will relying on a DNS to resolve UDR's FQDN
|
||||
USE_HTTP2 = "no"; # Set to yes to enable HTTP2 for AUSF server
|
||||
REGISTER_NRF = "no"; # Set to 'yes' if UDM resgisters to an NRF
|
||||
}
|
||||
|
||||
UDR:{
|
||||
IPV4_ADDRESS = "192.168.70.136"; # YOUR NETWORK CONFIG HERE
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR API VERSION FOR UDR CONFIG HERE
|
||||
FQDN = "oai-udr" # YOUR UDR FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION HERE
|
||||
FQDN = "oai-nrf"; # YOUR NRF FQDN HERE
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,66 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
UDR =
|
||||
{
|
||||
INSTANCE_ID = 0; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
UDR_NAME = "OAI_UDR";
|
||||
|
||||
|
||||
SUPPORT_FEATURES:{
|
||||
USE_FQDN_DNS = "no"; # Set to yes if UDR will relying on a DNS to resolve UDM's FQDN
|
||||
REGISTER_NRF = "no"; # Set to yes if UDR resgisters to an NRF
|
||||
USE_HTTP2 = "no"; # Set to yes to enable HTTP2 for UDR server
|
||||
DATABASE = "MySQL"; # Set to 'MySQL'/'Cassandra' to use MySQL/Cassandra
|
||||
};
|
||||
|
||||
INTERFACES:
|
||||
{
|
||||
# NUDR Interface (SBI)
|
||||
NUDR:
|
||||
{
|
||||
INTERFACE_NAME = "eth0";
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # Default value: 80
|
||||
HTTP2_PORT = 8080;
|
||||
API_VERSION = "v1";
|
||||
};
|
||||
};
|
||||
|
||||
NRF:
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.130";
|
||||
PORT = 80; # Default value: 80
|
||||
API_VERSION = "v1";
|
||||
FQDN = "oai-nrf";
|
||||
};
|
||||
|
||||
MYSQL:
|
||||
{
|
||||
# MySQL options
|
||||
MYSQL_SERVER = "mysql";
|
||||
MYSQL_USER = "root";
|
||||
MYSQL_PASS = "linux";
|
||||
MYSQL_DB = "oai_db";
|
||||
DB_CONNECTION_TIMEOUT = 300; # Reset the connection to the DB after expiring the timeout (in second)
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
[general]
|
||||
language=fr
|
||||
tcpenable=yes
|
||||
tcpbindaddr=0.0.0.0
|
||||
tcpbindport=5060
|
||||
srvlookup=yes
|
||||
@@ -0,0 +1,27 @@
|
||||
[001010000000001]
|
||||
fullname = user1
|
||||
hassip = yes
|
||||
context = users
|
||||
host = dynamic
|
||||
transport=udp
|
||||
|
||||
[001010000000002]
|
||||
fullname = user2
|
||||
hassip = yes
|
||||
context = users
|
||||
host = dynamic
|
||||
transport=udp
|
||||
|
||||
[001010000000003]
|
||||
fullname = user3
|
||||
hassip = yes
|
||||
context = users
|
||||
host = dynamic
|
||||
transport=udp
|
||||
|
||||
[001010000000004]
|
||||
fullname = user4
|
||||
hassip = yes
|
||||
context = users
|
||||
host = dynamic
|
||||
transport=udp
|
||||
+7
-3
@@ -156,6 +156,8 @@ INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPe
|
||||
('001010000000002', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000000\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000002');
|
||||
INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES
|
||||
('001010000000003', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000000\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000003');
|
||||
INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES
|
||||
('001010000000004', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000000\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000004');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@@ -209,11 +211,13 @@ CREATE TABLE `SessionManagementSubscriptionData` (
|
||||
--
|
||||
|
||||
INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES
|
||||
('001010000000001', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"10000Mbps\", \"downlink\":\"10000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.2\"}]}}');
|
||||
('001010000000001', '00101', '{\"sst\": 1, \"sd\": \"0xFFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.99\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}');
|
||||
INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES
|
||||
('001010000000002', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"10000Mbps\", \"downlink\":\"10000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.3\"}]}}');
|
||||
('001010000000002', '00101', '{\"sst\": 1, \"sd\": \"0xFFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.100\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}');
|
||||
INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES
|
||||
('001010000000003', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"10000Mbps\", \"downlink\":\"10000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.4\"}]}}');
|
||||
('001010000000003', '00101', '{\"sst\": 1, \"sd\": \"0xFFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.101\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}');
|
||||
INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES
|
||||
('001010000000004', '00101', '{\"sst\": 1, \"sd\": \"0xFFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.102\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
mysql:
|
||||
container_name: "mysql"
|
||||
image: mysql:8.0
|
||||
volumes:
|
||||
- ./database/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ./healthscripts/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
- MYSQL_USER=test
|
||||
- MYSQL_PASSWORD=test
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.131
|
||||
ims:
|
||||
container_name: "asterisk-ims"
|
||||
image: asterisk-ims:latest
|
||||
volumes:
|
||||
- ./conf/sip.conf:/etc/asterisk/sip.conf
|
||||
- ./conf/users.conf:/etc/asterisk/users.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep asterisk"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.139
|
||||
oai-udr:
|
||||
container_name: "oai-udr"
|
||||
image: oaisoftwarealliance/oai-udr:develop
|
||||
entrypoint: ["/openair-udr/bin/oai_udr", "-c", "/openair-udr/etc/udr.conf", "-o"]
|
||||
depends_on:
|
||||
- mysql
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./conf/oai-udr.conf:/openair-udr/etc/udr.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.136
|
||||
oai-udm:
|
||||
container_name: "oai-udm"
|
||||
image: oaisoftwarealliance/oai-udm:develop
|
||||
entrypoint: ["/openair-udm/bin/oai_udm", "-c", "/openair-udm/etc/udm.conf", "-o"]
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./conf/oai-udm.conf:/openair-udm/etc/udm.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.137
|
||||
oai-ausf:
|
||||
container_name: "oai-ausf"
|
||||
image: oaisoftwarealliance/oai-ausf:develop
|
||||
entrypoint: ["/openair-ausf/bin/oai_ausf", "-c", "/openair-ausf/etc/ausf.conf", "-o"]
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./conf/oai-ausf.conf:/openair-ausf/etc/ausf.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.138
|
||||
oai-nrf:
|
||||
container_name: "oai-nrf"
|
||||
image: oaisoftwarealliance/oai-nrf:develop
|
||||
entrypoint: ["/openair-nrf/bin/oai_nrf", "-c", "/openair-nrf/etc/nrf.conf", "-o"]
|
||||
volumes:
|
||||
- ./conf/oai-nrf.conf:/openair-nrf/etc/nrf.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.130
|
||||
oai-amf:
|
||||
container_name: "oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:develop
|
||||
entrypoint: ["/openair-amf/bin/oai_amf", "-c", "/openair-amf/etc/amf.conf", "-o"]
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./conf/oai-amf.conf:/openair-amf/etc/amf.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.132
|
||||
oai-smf:
|
||||
container_name: "oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:develop
|
||||
entrypoint: ["/openair-smf/bin/oai_smf", "-c", "/openair-smf/etc/smf.conf", "-o"]
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./conf/oai-smf.conf:/openair-smf/etc/smf.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.133
|
||||
oai-spgwu-tiny:
|
||||
container_name: "oai-spgwu-tiny"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:develop
|
||||
#for ims we need to execute below command once the container is running
|
||||
# iptables -t nat -A POSTROUTING -o eth0 -s 12.2.1.0/24 -j SNAT --to 192.168.70.134
|
||||
entrypoint: ["/openair-spgwu-tiny/bin/oai_spgwu", "-c", "/openair-spgwu-tiny/etc/spgw_u.conf","-o"]
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./conf/oai-spgwu-tiny.conf:/openair-spgwu-tiny/etc/spgw_u.conf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- SYS_ADMIN
|
||||
cap_drop:
|
||||
- ALL
|
||||
privileged: true
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.134
|
||||
oai-ext-dn:
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:latest
|
||||
privileged: true
|
||||
container_name: oai-ext-dn
|
||||
entrypoint: /bin/bash -c \
|
||||
"ip route add 12.1.0.0/16 via 192.168.70.134 dev eth0; sleep infinity"
|
||||
depends_on:
|
||||
- oai-spgwu-tiny
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ip r | grep 12.1.1"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.135
|
||||
networks:
|
||||
public_net:
|
||||
driver: bridge
|
||||
name: demo-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.70.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "demo-oai"
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then
|
||||
echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
host="$(hostname --ip-address || echo '127.0.0.1')"
|
||||
user="${MYSQL_USER:-root}"
|
||||
export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}"
|
||||
|
||||
args=(
|
||||
# force mysql to not use the local "mysqld.sock" (test "external" connectivity)
|
||||
-h"$host"
|
||||
-u"$user"
|
||||
--silent
|
||||
)
|
||||
|
||||
STATUS=0
|
||||
if command -v mysqladmin &> /dev/null; then
|
||||
if mysqladmin "${args[@]}" ping > /dev/null; then
|
||||
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM AuthenticationSubscription;")
|
||||
if [[ -z $database_check ]]; then
|
||||
echo "Healthcheck error: oai_db not populated"
|
||||
STATUS=1
|
||||
fi
|
||||
STATUS=0
|
||||
else
|
||||
echo "Healthcheck error: Mysql port inactive"
|
||||
STATUS=1
|
||||
fi
|
||||
else
|
||||
if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
|
||||
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM AuthenticationSubscription;")
|
||||
if [[ -z $database_check ]]; then
|
||||
echo "Healthcheck error: oai_db not populated"
|
||||
STATUS=1
|
||||
fi
|
||||
STATUS=0
|
||||
else
|
||||
echo "Healthcheck error: Mysql port inactive"
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
exit $STATUS
|
||||
@@ -35,4 +35,4 @@ COPY . .
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP --verbose-ci --noavx512 -c
|
||||
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror
|
||||
|
||||
@@ -73,6 +73,7 @@ COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=gnb-base \
|
||||
|
||||
@@ -78,6 +78,7 @@ COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
|
||||
/usr/local/lib/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
|
||||
@@ -84,8 +84,6 @@ COPY --from=phy-sim-build \
|
||||
/lib64/libforms.so.2 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/libexslt.so.0 \
|
||||
/lib64/libxslt.so.1 \
|
||||
/usr/lib64/libasan.so.5 \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -41,8 +41,6 @@
|
||||
#include "PHY/TOOLS/lte_phy_scope.h"
|
||||
#endif
|
||||
|
||||
#include "OCG_vars.h"
|
||||
|
||||
#define BW 20.0
|
||||
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
#endif //XFORMS
|
||||
|
||||
|
||||
#include "OCG_vars.h"
|
||||
#include "openair_hw.h"
|
||||
|
||||
#define BW 5.0
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -2181,8 +2179,8 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
|
||||
UL_BWP->transform_precoding = *UL_BWP->pusch_Config->transformPrecoder;
|
||||
|
||||
if (UL_BWP->bwp_id > 0) {
|
||||
UL_BWP->pucch_ConfigCommon = ul_bwp->bwp_Common->pucch_ConfigCommon->choice.setup;
|
||||
UL_BWP->rach_ConfigCommon = ul_bwp->bwp_Common->rach_ConfigCommon->choice.setup;
|
||||
UL_BWP->pucch_ConfigCommon = ul_bwp->bwp_Common->pucch_ConfigCommon ? ul_bwp->bwp_Common->pucch_ConfigCommon->choice.setup : NULL;
|
||||
UL_BWP->rach_ConfigCommon = ul_bwp->bwp_Common->rach_ConfigCommon ? ul_bwp->bwp_Common->rach_ConfigCommon->choice.setup : NULL;
|
||||
} else {
|
||||
UL_BWP->pucch_ConfigCommon = scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup;
|
||||
UL_BWP->rach_ConfigCommon = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -383,7 +383,8 @@ typedef struct gNB_RRC_UE_s {
|
||||
uint8_t established_pdu_sessions_flag;
|
||||
uint32_t ue_rrc_inactivity_timer;
|
||||
int8_t reestablishment_xid;
|
||||
//------------------------------------------------------------------------------//
|
||||
uint32_t ue_reestablishment_counter;
|
||||
uint32_t ue_reconfiguration_after_reestablishment_counter;
|
||||
NR_CellGroupId_t cellGroupId;
|
||||
struct NR_SpCellConfig *spCellConfig;
|
||||
struct NR_CellGroupConfig__sCellToAddModList *sCellconfig;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -312,7 +310,7 @@ static void apply_macrlc_config(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *const u
|
||||
|
||||
void apply_macrlc_config_reest(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *const ue_context_pP, const protocol_ctxt_t *const ctxt_pP, ue_id_t ue_id)
|
||||
{
|
||||
nr_mac_update_cellgroup(RC.nrmac[rrc->module_id], ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.masterCellGroup);
|
||||
nr_mac_update_cellgroup(RC.nrmac[rrc->module_id], ue_id, ue_context_pP->ue_context.masterCellGroup);
|
||||
|
||||
nr_rrc_rlc_config_asn1_req(ctxt_pP,
|
||||
ue_context_pP->ue_context.SRB_configList,
|
||||
@@ -1083,6 +1081,7 @@ static void rrc_gNB_process_RRCReconfigurationComplete(const protocol_ctxt_t *co
|
||||
for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) {
|
||||
nr_reestablish_rnti_map_t *nr_reestablish_rnti_map = &(RC.nrrrc[ctxt_pP->module_id])->nr_reestablish_rnti_map[i];
|
||||
if (nr_reestablish_rnti_map->ue_id == ctxt_pP->rntiMaybeUEid) {
|
||||
ue_context_pP->ue_context.ue_reconfiguration_after_reestablishment_counter++;
|
||||
reestablish_ue_id = nr_reestablish_rnti_map[i].c_rnti;
|
||||
LOG_D(NR_RRC, "Removing reestablish_rnti_map[%d] UEid %lx, RNTI %04x\n", i, nr_reestablish_rnti_map->ue_id, nr_reestablish_rnti_map->c_rnti);
|
||||
// clear current C-RNTI from map
|
||||
@@ -2388,10 +2387,10 @@ rrc_gNB_decode_dcch(
|
||||
if (ul_dcch_msg->message.choice.c1->choice.rrcReestablishmentComplete->criticalExtensions.present == NR_RRCReestablishmentComplete__criticalExtensions_PR_rrcReestablishmentComplete) {
|
||||
rrc_gNB_process_RRCReestablishmentComplete(ctxt_pP, reestablish_rnti, ue_context_p, ul_dcch_msg->message.choice.c1->choice.rrcReestablishmentComplete->rrc_TransactionIdentifier);
|
||||
|
||||
if (!NODE_IS_CU(RC.nrrrc[0]->node_type)) {
|
||||
gNB_MAC_INST *nrmac = RC.nrmac[ctxt_pP->module_id]; // WHAT A BEAUTIFULL RACE CONDITION !!!
|
||||
mac_remove_nr_ue(nrmac, reestablish_rnti);
|
||||
}
|
||||
gNB_MAC_INST *nrmac = RC.nrmac[ctxt_pP->module_id]; // WHAT A BEAUTIFULL RACE CONDITION !!!
|
||||
mac_remove_nr_ue(nrmac, reestablish_rnti);
|
||||
|
||||
ue_context_p->ue_context.ue_reestablishment_counter++;
|
||||
}
|
||||
|
||||
// UE->ue_release_timer = 0;
|
||||
|
||||
@@ -83,8 +83,8 @@ NR_DRB_ToAddMod_t *generateDRB(gNB_RRC_UE_t *ue, uint8_t drb_id, rrc_pdu_session
|
||||
drb->headerCompression.present = NR_PDCP_Config__drb__headerCompression_PR_notUsed;
|
||||
drb->headerCompression.choice.notUsed = 0;
|
||||
|
||||
asn1cCallocOne(pdcpConfig->t_Reordering, NR_PDCP_Config__t_Reordering_ms0);
|
||||
|
||||
asn1cCallocOne(pdcpConfig->t_Reordering, NR_PDCP_Config__t_Reordering_ms100);
|
||||
|
||||
if (do_drb_integrity) {
|
||||
asn1cCallocOne(drb->integrityProtection, NR_PDCP_Config__drb__integrityProtection_enabled);
|
||||
}
|
||||
|
||||
@@ -499,7 +499,7 @@ void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig,
|
||||
drb_ToAddMod->pdcp_Config->moreThanOneRLC = NULL;
|
||||
|
||||
drb_ToAddMod->pdcp_Config->t_Reordering = calloc(1,sizeof(*drb_ToAddMod->pdcp_Config->t_Reordering));
|
||||
*drb_ToAddMod->pdcp_Config->t_Reordering = NR_PDCP_Config__t_Reordering_ms0;
|
||||
*drb_ToAddMod->pdcp_Config->t_Reordering = NR_PDCP_Config__t_Reordering_ms100;
|
||||
drb_ToAddMod->pdcp_Config->ext1 = NULL;
|
||||
|
||||
asn1cSeqAdd(&rbconfig->drb_ToAddModList->list,drb_ToAddMod);
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
|
||||
|
||||
#include "cli.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#include "log.h"
|
||||
#include "log_extern.h"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/*! \file oml.h
|
||||
* \brief Data structure for OCG of OpenAir emulator
|
||||
* \brief Data structure for OML
|
||||
* \author N. Nikaein and A. Hafsaoui
|
||||
* \date 2011
|
||||
* \version 1.0
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[Dolphin]
|
||||
Sorting=6
|
||||
Timestamp=2011,2,7,10,19,55
|
||||
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user