diff --git a/lib/include/srsran/interfaces/enb_metrics_interface.h b/lib/include/srsran/interfaces/enb_metrics_interface.h index 9046c70eb..9a89c0293 100644 --- a/lib/include/srsran/interfaces/enb_metrics_interface.h +++ b/lib/include/srsran/interfaces/enb_metrics_interface.h @@ -19,7 +19,7 @@ #include "srsenb/hdr/phy/phy_metrics.h" #include "srsenb/hdr/stack/mac/mac_metrics.h" #include "srsenb/hdr/stack/rrc/rrc_metrics.h" -#include "srsenb/hdr/stack/upper/s1ap_metrics.h" +#include "srsenb/hdr/stack/s1ap/s1ap_metrics.h" #include "srsran/common/metrics_hub.h" #include "srsran/radio/radio_metrics.h" #include "srsran/system/sys_metrics.h" diff --git a/srsenb/hdr/stack/enb_stack_lte.h b/srsenb/hdr/stack/enb_stack_lte.h index 6af11ce6b..3caa5c927 100644 --- a/srsenb/hdr/stack/enb_stack_lte.h +++ b/srsenb/hdr/stack/enb_stack_lte.h @@ -20,11 +20,11 @@ #include "mac/mac.h" #include "rrc/rrc.h" +#include "s1ap/s1ap.h" #include "srsran/common/task_scheduler.h" #include "upper/gtpu.h" #include "upper/pdcp.h" #include "upper/rlc.h" -#include "upper/s1ap.h" #include "enb_stack_base.h" #include "srsran/common/mac_pcap_net.h" diff --git a/srsenb/hdr/stack/gnb_stack_nr.h b/srsenb/hdr/stack/gnb_stack_nr.h index d107f16a9..43baf0473 100644 --- a/srsenb/hdr/stack/gnb_stack_nr.h +++ b/srsenb/hdr/stack/gnb_stack_nr.h @@ -18,12 +18,12 @@ #ifndef SRSRAN_GNB_STACK_NR_H #define SRSRAN_GNB_STACK_NR_H +#include "s1ap/s1ap.h" #include "srsenb/hdr/stack/mac/mac_nr.h" #include "srsenb/hdr/stack/rrc/rrc_nr.h" #include "srsenb/hdr/stack/upper/pdcp_nr.h" #include "srsenb/hdr/stack/upper/rlc_nr.h" #include "upper/gtpu.h" -#include "upper/s1ap.h" #include "upper/sdap.h" #include "enb_stack_base.h" diff --git a/srsenb/hdr/stack/upper/ngap.h b/srsenb/hdr/stack/s1ap/ngap.h similarity index 100% rename from srsenb/hdr/stack/upper/ngap.h rename to srsenb/hdr/stack/s1ap/ngap.h diff --git a/srsenb/hdr/stack/upper/s1ap.h b/srsenb/hdr/stack/s1ap/s1ap.h similarity index 100% rename from srsenb/hdr/stack/upper/s1ap.h rename to srsenb/hdr/stack/s1ap/s1ap.h diff --git a/srsenb/hdr/stack/upper/s1ap_metrics.h b/srsenb/hdr/stack/s1ap/s1ap_metrics.h similarity index 100% rename from srsenb/hdr/stack/upper/s1ap_metrics.h rename to srsenb/hdr/stack/s1ap/s1ap_metrics.h diff --git a/srsenb/src/CMakeLists.txt b/srsenb/src/CMakeLists.txt index ff694f121..98776f739 100644 --- a/srsenb/src/CMakeLists.txt +++ b/srsenb/src/CMakeLists.txt @@ -26,10 +26,10 @@ target_link_libraries(enb_cfg_parser ${LIBCONFIGPP_LIBRARIES}) add_executable(srsenb main.cc enb.cc metrics_stdout.cc metrics_csv.cc metrics_json.cc) -set(SRSENB_SOURCES srsenb_phy srsenb_stack srsenb_common srsenb_upper srsenb_mac srsenb_rrc srslog system) +set(SRSENB_SOURCES srsenb_phy srsenb_stack srsenb_common srsenb_s1ap srsenb_upper srsenb_mac srsenb_rrc srslog system) set(SRSRAN_SOURCES srsran_common srsran_mac srsran_phy srsran_upper srsran_radio rrc_asn1 s1ap_asn1 enb_cfg_parser srslog system) -set(SRSENB_SOURCES ${SRSENB_SOURCES} srsgnb_phy srsgnb_stack srsgnb_upper srsgnb_mac srsgnb_rrc) +set(SRSENB_SOURCES ${SRSENB_SOURCES} srsgnb_phy srsgnb_stack srsgnb_ngap srsgnb_upper srsgnb_mac srsgnb_rrc) set(SRSRAN_SOURCES ${SRSRAN_SOURCES} rrc_nr_asn1 ngap_nr_asn1) target_link_libraries(srsenb ${SRSENB_SOURCES} diff --git a/srsenb/src/stack/CMakeLists.txt b/srsenb/src/stack/CMakeLists.txt index 3af94e230..7793457c0 100644 --- a/srsenb/src/stack/CMakeLists.txt +++ b/srsenb/src/stack/CMakeLists.txt @@ -8,6 +8,7 @@ add_subdirectory(mac) add_subdirectory(rrc) +add_subdirectory(s1ap) add_subdirectory(upper) set(SOURCES enb_stack_lte.cc) diff --git a/srsenb/src/stack/s1ap/CMakeLists.txt b/srsenb/src/stack/s1ap/CMakeLists.txt new file mode 100644 index 000000000..0f8d2ad5a --- /dev/null +++ b/srsenb/src/stack/s1ap/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright 2013-2021 Software Radio Systems Limited +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the distribution. +# + +set(SOURCES s1ap.cc) +add_library(srsenb_s1ap STATIC ${SOURCES}) + +set(SOURCES ngap.cc) +add_library(srsgnb_ngap STATIC ${SOURCES}) diff --git a/srsenb/src/stack/upper/ngap.cc b/srsenb/src/stack/s1ap/ngap.cc similarity index 99% rename from srsenb/src/stack/upper/ngap.cc rename to srsenb/src/stack/s1ap/ngap.cc index cfd2d6d7c..0165517ce 100644 --- a/srsenb/src/stack/upper/ngap.cc +++ b/srsenb/src/stack/s1ap/ngap.cc @@ -10,7 +10,7 @@ * */ -#include "srsenb/hdr/stack/upper/ngap.h" +#include "srsenb/hdr/stack/s1ap/ngap.h" #define procError(fmt, ...) ngap_ptr->logger.error("Proc \"%s\" - " fmt, name(), ##__VA_ARGS__) #define procWarning(fmt, ...) ngap_ptr->logger.warning("Proc \"%s\" - " fmt, name(), ##__VA_ARGS__) diff --git a/srsenb/src/stack/upper/s1ap.cc b/srsenb/src/stack/s1ap/s1ap.cc similarity index 99% rename from srsenb/src/stack/upper/s1ap.cc rename to srsenb/src/stack/s1ap/s1ap.cc index 1b7314de3..0857bb536 100644 --- a/srsenb/src/stack/upper/s1ap.cc +++ b/srsenb/src/stack/s1ap/s1ap.cc @@ -10,7 +10,7 @@ * */ -#include "srsenb/hdr/stack/upper/s1ap.h" +#include "srsenb/hdr/stack/s1ap/s1ap.h" #include "srsran/adt/scope_exit.h" #include "srsran/common/bcd_helpers.h" #include "srsran/common/enb_events.h" diff --git a/srsenb/src/stack/upper/CMakeLists.txt b/srsenb/src/stack/upper/CMakeLists.txt index 9ec6d3bbe..f86393693 100644 --- a/srsenb/src/stack/upper/CMakeLists.txt +++ b/srsenb/src/stack/upper/CMakeLists.txt @@ -6,8 +6,8 @@ # the distribution. # -set(SOURCES gtpu.cc pdcp.cc rlc.cc s1ap.cc) +set(SOURCES gtpu.cc pdcp.cc rlc.cc) add_library(srsenb_upper STATIC ${SOURCES}) -set(SOURCES pdcp_nr.cc rlc_nr.cc sdap.cc ngap.cc) +set(SOURCES pdcp_nr.cc rlc_nr.cc sdap.cc) add_library(srsgnb_upper STATIC ${SOURCES}) diff --git a/srsenb/test/CMakeLists.txt b/srsenb/test/CMakeLists.txt index 9d898374e..b648a8e05 100644 --- a/srsenb/test/CMakeLists.txt +++ b/srsenb/test/CMakeLists.txt @@ -10,6 +10,7 @@ add_subdirectory(mac) add_subdirectory(phy) add_subdirectory(upper) add_subdirectory(rrc) +add_subdirectory(s1ap) add_executable(enb_metrics_test enb_metrics_test.cc ../src/metrics_stdout.cc ../src/metrics_csv.cc) target_link_libraries(enb_metrics_test srsran_phy srsran_common) diff --git a/srsenb/test/s1ap/CMakeLists.txt b/srsenb/test/s1ap/CMakeLists.txt new file mode 100644 index 000000000..accc3eb73 --- /dev/null +++ b/srsenb/test/s1ap/CMakeLists.txt @@ -0,0 +1,12 @@ +# +# Copyright 2013-2021 Software Radio Systems Limited +# +# By using this file, you agree to the terms and conditions set +# forth in the LICENSE file which can be found at the top level of +# the distribution. +# + +add_executable(s1ap_test s1ap_test.cc) +target_link_libraries(s1ap_test srsran_common s1ap_asn1 srsenb_s1ap srsenb_upper srsran_upper s1ap_asn1 ${SCTP_LIBRARIES}) +add_test(s1ap_test s1ap_test) + diff --git a/srsenb/test/upper/s1ap_test.cc b/srsenb/test/s1ap/s1ap_test.cc similarity index 99% rename from srsenb/test/upper/s1ap_test.cc rename to srsenb/test/s1ap/s1ap_test.cc index 8791af8ae..79930d590 100644 --- a/srsenb/test/upper/s1ap_test.cc +++ b/srsenb/test/s1ap/s1ap_test.cc @@ -10,7 +10,7 @@ * */ -#include "srsenb/hdr/stack/upper/s1ap.h" +#include "srsenb/hdr/stack/s1ap/s1ap.h" #include "srsenb/test/common/dummy_classes.h" #include "srsran/common/network_utils.h" #include "srsran/common/test_common.h" diff --git a/srsenb/test/upper/CMakeLists.txt b/srsenb/test/upper/CMakeLists.txt index 01b7ca05b..d3eb8ac8d 100644 --- a/srsenb/test/upper/CMakeLists.txt +++ b/srsenb/test/upper/CMakeLists.txt @@ -25,9 +25,6 @@ target_link_libraries(rrc_meascfg_test test_helpers) add_executable(gtpu_test gtpu_test.cc) target_link_libraries(gtpu_test srsran_common s1ap_asn1 srsenb_upper srsran_upper ${SCTP_LIBRARIES}) -add_executable(s1ap_test s1ap_test.cc) -target_link_libraries(s1ap_test srsran_common s1ap_asn1 srsenb_upper srsran_upper s1ap_asn1 ${SCTP_LIBRARIES}) - add_test(rrc_mobility_test rrc_mobility_test -i ${CMAKE_CURRENT_SOURCE_DIR}/../..) add_test(erab_setup_test erab_setup_test -i ${CMAKE_CURRENT_SOURCE_DIR}/../..) add_test(rrc_meascfg_test rrc_meascfg_test -i ${CMAKE_CURRENT_SOURCE_DIR}/../..)