From 73cb0dabf2bd62b1e7e8b7cede1c1385272e71b2 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 29 Jan 2021 15:58:06 +0100 Subject: [PATCH] mac_nr: move UE MAC class into own subfolder this should simplify further MAC NR extensions and lead to a more organized folder structure --- srsue/hdr/stack/{mac => mac_nr}/mac_nr.h | 0 srsue/hdr/stack/ue_stack_lte.h | 2 +- srsue/hdr/stack/ue_stack_nr.h | 2 +- srsue/src/stack/CMakeLists.txt | 3 ++- srsue/src/stack/mac/CMakeLists.txt | 7 +------ srsue/src/stack/mac_nr/CMakeLists.txt | 10 ++++++++++ srsue/src/stack/{mac => mac_nr}/mac_nr.cc | 2 +- 7 files changed, 16 insertions(+), 10 deletions(-) rename srsue/hdr/stack/{mac => mac_nr}/mac_nr.h (100%) create mode 100644 srsue/src/stack/mac_nr/CMakeLists.txt rename srsue/src/stack/{mac => mac_nr}/mac_nr.cc (99%) diff --git a/srsue/hdr/stack/mac/mac_nr.h b/srsue/hdr/stack/mac_nr/mac_nr.h similarity index 100% rename from srsue/hdr/stack/mac/mac_nr.h rename to srsue/hdr/stack/mac_nr/mac_nr.h diff --git a/srsue/hdr/stack/ue_stack_lte.h b/srsue/hdr/stack/ue_stack_lte.h index d09c6d5e9..0c99a4e5a 100644 --- a/srsue/hdr/stack/ue_stack_lte.h +++ b/srsue/hdr/stack/ue_stack_lte.h @@ -23,7 +23,7 @@ #include #include "mac/mac.h" -#include "mac/mac_nr.h" +#include "mac_nr/mac_nr.h" #include "rrc/rrc.h" #include "srslte/radio/radio.h" #include "srslte/upper/pdcp.h" diff --git a/srsue/hdr/stack/ue_stack_nr.h b/srsue/hdr/stack/ue_stack_nr.h index 92601d6b9..68d09626d 100644 --- a/srsue/hdr/stack/ue_stack_nr.h +++ b/srsue/hdr/stack/ue_stack_nr.h @@ -18,7 +18,7 @@ #include #include -#include "mac/mac_nr.h" +#include "mac_nr/mac_nr.h" #include "rrc/rrc_nr.h" #include "srslte/radio/radio.h" #include "srslte/upper/pdcp.h" diff --git a/srsue/src/stack/CMakeLists.txt b/srsue/src/stack/CMakeLists.txt index 7c256cabe..f1e9941d5 100644 --- a/srsue/src/stack/CMakeLists.txt +++ b/srsue/src/stack/CMakeLists.txt @@ -14,6 +14,7 @@ set(SOURCES ue_stack_lte.cc) add_library(srsue_stack STATIC ${SOURCES}) if(ENABLE_5GNR) + add_subdirectory(mac_nr) set(SOURCES ue_stack_nr.cc) add_library(srsue_nr_stack STATIC ${SOURCES}) -endif() +endif() \ No newline at end of file diff --git a/srsue/src/stack/mac/CMakeLists.txt b/srsue/src/stack/mac/CMakeLists.txt index 330ed06ae..74895d569 100644 --- a/srsue/src/stack/mac/CMakeLists.txt +++ b/srsue/src/stack/mac/CMakeLists.txt @@ -7,9 +7,4 @@ # set(SOURCES demux.cc dl_harq.cc mac.cc mux.cc proc_bsr.cc proc_phr.cc proc_ra.cc proc_sr.cc ul_harq.cc) -add_library(srsue_mac STATIC ${SOURCES}) - -if(ENABLE_5GNR) - set(SOURCES mac_nr.cc) - add_library(srsue_mac_nr STATIC ${SOURCES}) -endif() +add_library(srsue_mac STATIC ${SOURCES}) \ No newline at end of file diff --git a/srsue/src/stack/mac_nr/CMakeLists.txt b/srsue/src/stack/mac_nr/CMakeLists.txt new file mode 100644 index 000000000..7789c3edd --- /dev/null +++ b/srsue/src/stack/mac_nr/CMakeLists.txt @@ -0,0 +1,10 @@ +# +# Copyright 2013-2020 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 mac_nr.cc) +add_library(srsue_mac_nr STATIC ${SOURCES}) \ No newline at end of file diff --git a/srsue/src/stack/mac/mac_nr.cc b/srsue/src/stack/mac_nr/mac_nr.cc similarity index 99% rename from srsue/src/stack/mac/mac_nr.cc rename to srsue/src/stack/mac_nr/mac_nr.cc index 93e1f6b8a..b0697a12b 100644 --- a/srsue/src/stack/mac/mac_nr.cc +++ b/srsue/src/stack/mac_nr/mac_nr.cc @@ -10,7 +10,7 @@ * */ -#include "srsue/hdr/stack/mac/mac_nr.h" +#include "srsue/hdr/stack/mac_nr/mac_nr.h" #include "srslte/common/log_helper.h" using namespace asn1::rrc;