refactor: clean unnecessary includes of the asn1/rrc_nr.h

master
Francisco 3 years ago committed by Francisco Paisana
parent ef78c7e06f
commit 47e5e85449

@ -13,10 +13,10 @@
#ifndef SRSUE_RRC_COMMON_H #ifndef SRSUE_RRC_COMMON_H
#define SRSUE_RRC_COMMON_H #define SRSUE_RRC_COMMON_H
namespace srsran {
#include <stdint.h> #include <stdint.h>
namespace srsran {
enum quant_s { quant_rsrp, quant_rsrq }; enum quant_s { quant_rsrp, quant_rsrq };
uint8_t rrc_value_to_range(quant_s quant, const float value); uint8_t rrc_value_to_range(quant_s quant, const float value);

@ -30,7 +30,6 @@
#include "srsenb/hdr/phy/enb_phy_base.h" #include "srsenb/hdr/phy/enb_phy_base.h"
#include "srsenb/hdr/stack/enb_stack_base.h" #include "srsenb/hdr/stack/enb_stack_base.h"
#include "srsenb/hdr/stack/rrc/nr/rrc_config_nr.h"
#include "srsenb/hdr/stack/rrc/rrc_config.h" #include "srsenb/hdr/stack/rrc/rrc_config.h"
#include "srsenb/hdr/stack/mac/sched_interface.h" #include "srsenb/hdr/stack/mac/sched_interface.h"

@ -21,7 +21,6 @@
#include <string.h> #include <string.h>
#include <string> #include <string>
#include "srsenb/hdr/stack/rrc/nr/rrc_config_nr.h"
#include "srsenb/hdr/stack/rrc/rrc.h" #include "srsenb/hdr/stack/rrc/rrc.h"
#include "srsran/asn1/asn1_utils.h" #include "srsran/asn1/asn1_utils.h"
@ -31,6 +30,7 @@ using namespace libconfig;
struct all_args_t; struct all_args_t;
struct phy_cfg_t; struct phy_cfg_t;
struct rrc_nr_cfg_t;
bool sib_is_present(const asn1::rrc::sched_info_list_l& l, asn1::rrc::sib_type_e sib_num); bool sib_is_present(const asn1::rrc::sched_info_list_l& l, asn1::rrc::sib_type_e sib_num);

@ -107,7 +107,7 @@ public:
bool msg3_is_empty() { return mux.msg3_is_empty(); } bool msg3_is_empty() { return mux.msg3_is_empty(); }
/// RRC /// RRC
void rrc_ra_problem() { rrc->ra_problem(); } void rrc_ra_problem();
/// stack interface /// stack interface
void process_pdus(); void process_pdus();

@ -0,0 +1,40 @@
/**
*
* \section COPYRIGHT
*
* 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.
*
*/
#ifndef SRSRAN_RRC_NR_CONFIG_H
#define SRSRAN_RRC_NR_CONFIG_H
#include <string>
#include <vector>
namespace srsue {
// Expert arguments to create GW without proper RRC
struct core_less_args_t {
std::string ip_addr;
uint8_t drb_lcid;
};
struct rrc_nr_args_t {
core_less_args_t coreless;
uint32_t sim_nr_meas_pci;
bool pdcp_short_sn_support;
std::string supported_bands_nr_str;
std::vector<uint32_t> supported_bands_nr;
std::vector<uint32_t> supported_bands_eutra;
std::string log_level;
uint32_t log_hex_limit;
};
} // namespace srsue
#endif // SRSRAN_RRC_NR_CONFIG_H

@ -14,6 +14,7 @@
#define SRSUE_RRC_H #define SRSUE_RRC_H
#include "rrc_cell.h" #include "rrc_cell.h"
#include "rrc_config.h"
#include "rrc_metrics.h" #include "rrc_metrics.h"
#include "rrc_rlf_report.h" #include "rrc_rlf_report.h"
#include "srsran/asn1/rrc_utils.h" #include "srsran/asn1/rrc_utils.h"
@ -36,29 +37,6 @@ using srsran::byte_buffer_t;
namespace srsue { namespace srsue {
#define SRSRAN_RRC_N_BANDS 43
typedef struct {
std::string ue_category_str;
uint32_t ue_category;
int ue_category_ul;
int ue_category_dl;
uint32_t release;
uint32_t feature_group;
std::array<uint8_t, SRSRAN_RRC_N_BANDS> supported_bands;
std::vector<uint32_t> supported_bands_nr;
uint32_t nof_supported_bands;
bool support_ca;
int mbms_service_id;
uint32_t mbms_service_port;
} rrc_args_t;
#define SRSRAN_UE_CATEGORY_DEFAULT "4"
#define SRSRAN_UE_CATEGORY_MIN 1
#define SRSRAN_UE_CATEGORY_MAX 21
#define SRSRAN_RELEASE_MIN 8
#define SRSRAN_RELEASE_MAX 15
#define SRSRAN_RELEASE_DEFAULT (SRSRAN_RELEASE_MIN)
class phy_controller; class phy_controller;
class usim_interface_rrc; class usim_interface_rrc;
class gw_interface_rrc; class gw_interface_rrc;

@ -0,0 +1,44 @@
/**
*
* \section COPYRIGHT
*
* 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.
*
*/
#ifndef SRSRAN_RRC_CONFIG_H
#define SRSRAN_RRC_CONFIG_H
namespace srsue {
#define SRSRAN_RRC_N_BANDS 43
struct rrc_args_t {
std::string ue_category_str;
uint32_t ue_category;
int ue_category_ul;
int ue_category_dl;
uint32_t release;
uint32_t feature_group;
std::array<uint8_t, SRSRAN_RRC_N_BANDS> supported_bands;
std::vector<uint32_t> supported_bands_nr;
uint32_t nof_supported_bands;
bool support_ca;
int mbms_service_id;
uint32_t mbms_service_port;
};
#define SRSRAN_UE_CATEGORY_DEFAULT "4"
#define SRSRAN_UE_CATEGORY_MIN 1
#define SRSRAN_UE_CATEGORY_MAX 21
#define SRSRAN_RELEASE_MIN 8
#define SRSRAN_RELEASE_MAX 15
#define SRSRAN_RELEASE_DEFAULT (SRSRAN_RELEASE_MIN)
} // namespace srsue
#endif // SRSRAN_RRC_CONFIG_H

@ -13,6 +13,7 @@
#ifndef SRSUE_RRC_NR_H #ifndef SRSUE_RRC_NR_H
#define SRSUE_RRC_NR_H #define SRSUE_RRC_NR_H
#include "nr/rrc_nr_config.h"
#include "srsran/adt/circular_map.h" #include "srsran/adt/circular_map.h"
#include "srsran/asn1/rrc_nr.h" #include "srsran/asn1/rrc_nr.h"
#include "srsran/asn1/rrc_nr_utils.h" #include "srsran/asn1/rrc_nr_utils.h"
@ -32,24 +33,6 @@ class usim_interface_rrc_nr;
class pdcp_interface_rrc; class pdcp_interface_rrc;
class rlc_interface_rrc; class rlc_interface_rrc;
// Expert arguments to create GW without proper RRC
struct core_less_args_t {
std::string ip_addr;
srsue::gw_args_t gw_args;
uint8_t drb_lcid;
};
struct rrc_nr_args_t {
core_less_args_t coreless;
uint32_t sim_nr_meas_pci;
bool pdcp_short_sn_support;
std::string supported_bands_nr_str;
std::vector<uint32_t> supported_bands_nr;
std::vector<uint32_t> supported_bands_eutra;
std::string log_level;
uint32_t log_hex_limit;
};
struct rrc_nr_metrics_t {}; struct rrc_nr_metrics_t {};
class rrc_nr final : public rrc_interface_phy_nr, class rrc_nr final : public rrc_interface_phy_nr,

@ -13,11 +13,10 @@
#ifndef SRSUE_UE_STACK_BASE_H #ifndef SRSUE_UE_STACK_BASE_H
#define SRSUE_UE_STACK_BASE_H #define SRSUE_UE_STACK_BASE_H
#include "rrc/nr/rrc_nr_config.h"
#include "rrc/rrc_config.h"
#include "srsue/hdr/stack/upper/nas_config.h" #include "srsue/hdr/stack/upper/nas_config.h"
#include "srsue/hdr/ue_metrics_interface.h" #include "srsue/hdr/ue_metrics_interface.h"
#include "rrc/rrc.h"
#include "rrc/rrc_nr.h"
#include "upper/gw.h" #include "upper/gw.h"
#include "upper/usim.h" #include "upper/usim.h"

@ -17,20 +17,10 @@
#ifndef SRSUE_UE_STACK_LTE_H #ifndef SRSUE_UE_STACK_LTE_H
#define SRSUE_UE_STACK_LTE_H #define SRSUE_UE_STACK_LTE_H
#include <functional>
#include <pthread.h>
#include <stdarg.h>
#include <string>
#include "mac/mac.h" #include "mac/mac.h"
#include "mac_nr/mac_nr.h" #include "mac_nr/mac_nr.h"
#include "rrc/rrc.h" #include "rrc/rrc.h"
#include "srsran/radio/radio.h" #include "rrc/rrc_nr.h"
#include "srsran/rlc/rlc.h"
#include "srsran/upper/pdcp.h"
#include "upper/nas.h"
#include "upper/usim.h"
#include "srsran/common/bearer_manager.h" #include "srsran/common/bearer_manager.h"
#include "srsran/common/buffer_pool.h" #include "srsran/common/buffer_pool.h"
#include "srsran/common/multiqueue.h" #include "srsran/common/multiqueue.h"
@ -39,8 +29,17 @@
#include "srsran/common/thread_pool.h" #include "srsran/common/thread_pool.h"
#include "srsran/common/time_prof.h" #include "srsran/common/time_prof.h"
#include "srsran/interfaces/ue_interfaces.h" #include "srsran/interfaces/ue_interfaces.h"
#include "srsran/radio/radio.h"
#include "srsran/rlc/rlc.h"
#include "srsran/upper/pdcp.h"
#include "srsue/hdr/ue_metrics_interface.h" #include "srsue/hdr/ue_metrics_interface.h"
#include "ue_stack_base.h" #include "ue_stack_base.h"
#include "upper/nas.h"
#include "upper/usim.h"
#include <functional>
#include <pthread.h>
#include <stdarg.h>
#include <string>
namespace srsue { namespace srsue {

@ -19,7 +19,6 @@
#include <string> #include <string>
#include "mac_nr/mac_nr.h" #include "mac_nr/mac_nr.h"
#include "rrc/rrc_nr.h"
#include "srsran/radio/radio.h" #include "srsran/radio/radio.h"
#include "srsran/rlc/rlc.h" #include "srsran/rlc/rlc.h"
#include "srsran/upper/pdcp.h" #include "srsran/upper/pdcp.h"
@ -30,6 +29,7 @@
#include "srsran/common/mac_pcap.h" #include "srsran/common/mac_pcap.h"
#include "srsran/common/multiqueue.h" #include "srsran/common/multiqueue.h"
#include "srsran/common/thread_pool.h" #include "srsran/common/thread_pool.h"
#include "srsran/interfaces/ue_interfaces.h"
#include "srsran/interfaces/ue_nr_interfaces.h" #include "srsran/interfaces/ue_nr_interfaces.h"
#include "srsue/hdr/ue_metrics_interface.h" #include "srsue/hdr/ue_metrics_interface.h"
@ -37,6 +37,8 @@
namespace srsue { namespace srsue {
class rrc_nr;
/** \brief L2/L3 stack class for 5G/NR UEs. /** \brief L2/L3 stack class for 5G/NR UEs.
* *
* This class wraps all L2/L3 blocks and provides a single interface towards the PHY. * This class wraps all L2/L3 blocks and provides a single interface towards the PHY.

@ -14,6 +14,7 @@
#include "srsran/common/config_file.h" #include "srsran/common/config_file.h"
#include "srsran/common/crash_handler.h" #include "srsran/common/crash_handler.h"
#include "srsran/common/metrics_hub.h" #include "srsran/common/metrics_hub.h"
#include "srsran/common/multiqueue.h"
#include "srsran/common/signal_handler.h" #include "srsran/common/signal_handler.h"
#include "srsran/common/tsan_options.h" #include "srsran/common/tsan_options.h"
#include "srsran/srslog/event_trace.h" #include "srsran/srslog/event_trace.h"

@ -12,6 +12,7 @@
#include "srsue/hdr/stack/mac_nr/mac_nr.h" #include "srsue/hdr/stack/mac_nr/mac_nr.h"
#include "srsran/interfaces/ue_rlc_interfaces.h" #include "srsran/interfaces/ue_rlc_interfaces.h"
#include "srsran/interfaces/ue_rrc_interfaces.h"
#include "srsran/mac/mac_rar_pdu_nr.h" #include "srsran/mac/mac_rar_pdu_nr.h"
#include "srsue/hdr/stack/mac_nr/proc_ra_nr.h" #include "srsue/hdr/stack/mac_nr/proc_ra_nr.h"
@ -500,6 +501,11 @@ void mac_nr::get_metrics(mac_metrics_t m[SRSRAN_MAX_CARRIERS])
metrics = {}; metrics = {};
} }
void mac_nr::rrc_ra_problem()
{
rrc->ra_problem();
}
/** /**
* Called from the main stack thread to process received PDUs * Called from the main stack thread to process received PDUs
*/ */

@ -12,6 +12,7 @@
#include "srsue/hdr/stack/ue_stack_nr.h" #include "srsue/hdr/stack/ue_stack_nr.h"
#include "srsran/srsran.h" #include "srsran/srsran.h"
#include "srsue/hdr/stack/rrc/rrc_nr.h"
using namespace srsran; using namespace srsran;
@ -110,7 +111,7 @@ void ue_stack_nr::stop_impl()
bool ue_stack_nr::switch_on() bool ue_stack_nr::switch_on()
{ {
// statically setup TUN (will be done through RRC later) // statically setup TUN (will be done through RRC later)
char* err_str = nullptr; char* err_str = nullptr;
struct in_addr in_addr; struct in_addr in_addr;
if (inet_pton(AF_INET, "192.168.1.3", &in_addr.s_addr) != 1) { if (inet_pton(AF_INET, "192.168.1.3", &in_addr.s_addr) != 1) {
perror("inet_pton"); perror("inet_pton");

@ -13,6 +13,7 @@
#ifndef SRSUE_TTCN3_LTE_PHY_H #ifndef SRSUE_TTCN3_LTE_PHY_H
#define SRSUE_TTCN3_LTE_PHY_H #define SRSUE_TTCN3_LTE_PHY_H
#include "srsran/common/task_scheduler.h"
#include "srsran/interfaces/ue_interfaces.h" #include "srsran/interfaces/ue_interfaces.h"
#include "srsran/interfaces/ue_phy_interfaces.h" #include "srsran/interfaces/ue_phy_interfaces.h"
#include "srsue/hdr/phy/ue_lte_phy_base.h" #include "srsue/hdr/phy/ue_lte_phy_base.h"

Loading…
Cancel
Save