2020-11-26 01:25:22 -08:00
|
|
|
/**
|
2017-05-30 06:38:04 -07:00
|
|
|
*
|
2020-11-26 01:25:22 -08:00
|
|
|
* \section COPYRIGHT
|
2017-05-30 06:38:04 -07:00
|
|
|
*
|
2021-03-19 03:45:56 -07:00
|
|
|
* Copyright 2013-2021 Software Radio Systems Limited
|
2017-05-30 06:38:04 -07:00
|
|
|
*
|
2020-11-26 01:25:22 -08:00
|
|
|
* 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.
|
2017-05-30 06:38:04 -07:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-05-07 01:11:57 -07:00
|
|
|
#ifndef SRSUE_UE_STACK_BASE_H
|
|
|
|
#define SRSUE_UE_STACK_BASE_H
|
2017-05-30 06:38:04 -07:00
|
|
|
|
2021-10-07 09:39:43 -07:00
|
|
|
#include "rrc/rrc_config.h"
|
2021-11-26 03:29:40 -08:00
|
|
|
#include "rrc_nr/rrc_nr_config.h"
|
2020-05-07 10:18:12 -07:00
|
|
|
#include "srsue/hdr/stack/upper/nas_config.h"
|
2019-05-07 01:11:57 -07:00
|
|
|
#include "srsue/hdr/ue_metrics_interface.h"
|
2019-06-06 07:52:37 -07:00
|
|
|
#include "upper/gw.h"
|
|
|
|
#include "upper/usim.h"
|
2017-05-30 06:38:04 -07:00
|
|
|
|
|
|
|
namespace srsue {
|
|
|
|
|
2019-06-06 07:52:37 -07:00
|
|
|
typedef struct {
|
|
|
|
bool enable;
|
|
|
|
std::string filename;
|
|
|
|
} pcap_args_t;
|
|
|
|
|
2021-02-25 02:17:24 -08:00
|
|
|
typedef struct {
|
|
|
|
std::string enable;
|
|
|
|
pcap_args_t mac_pcap;
|
|
|
|
pcap_args_t mac_nr_pcap;
|
|
|
|
pcap_args_t nas_pcap;
|
|
|
|
} pkt_trace_args_t;
|
|
|
|
|
2019-06-06 07:52:37 -07:00
|
|
|
typedef struct {
|
|
|
|
std::string mac_level;
|
|
|
|
std::string rlc_level;
|
|
|
|
std::string pdcp_level;
|
|
|
|
std::string rrc_level;
|
|
|
|
std::string gw_level;
|
|
|
|
std::string nas_level;
|
|
|
|
std::string usim_level;
|
2020-05-05 06:36:33 -07:00
|
|
|
std::string stack_level;
|
2019-06-06 07:52:37 -07:00
|
|
|
|
|
|
|
int mac_hex_limit;
|
|
|
|
int rlc_hex_limit;
|
|
|
|
int pdcp_hex_limit;
|
|
|
|
int rrc_hex_limit;
|
|
|
|
int gw_hex_limit;
|
|
|
|
int nas_hex_limit;
|
|
|
|
int usim_hex_limit;
|
2020-05-05 06:36:33 -07:00
|
|
|
int stack_hex_limit;
|
2019-06-06 07:52:37 -07:00
|
|
|
} stack_log_args_t;
|
|
|
|
|
|
|
|
typedef struct {
|
2021-02-25 02:17:24 -08:00
|
|
|
pkt_trace_args_t pkt_trace;
|
2019-06-06 07:52:37 -07:00
|
|
|
stack_log_args_t log;
|
|
|
|
usim_args_t usim;
|
|
|
|
rrc_args_t rrc;
|
2020-12-15 02:04:42 -08:00
|
|
|
rrc_nr_args_t rrc_nr;
|
2019-06-06 07:52:37 -07:00
|
|
|
std::string ue_category_str;
|
|
|
|
nas_args_t nas;
|
2021-11-30 05:45:19 -08:00
|
|
|
nas_5g_args_t nas_5g;
|
2019-06-06 07:52:37 -07:00
|
|
|
gw_args_t gw;
|
2020-06-23 02:29:47 -07:00
|
|
|
uint32_t sync_queue_size; // Max allowed difference between PHY and Stack clocks (in TTI)
|
2020-02-26 01:50:40 -08:00
|
|
|
bool have_tti_time_stats;
|
2022-02-01 01:28:51 -08:00
|
|
|
bool sa_mode;
|
2019-06-06 07:52:37 -07:00
|
|
|
} stack_args_t;
|
|
|
|
|
|
|
|
class ue_stack_base
|
2017-05-30 06:38:04 -07:00
|
|
|
{
|
|
|
|
public:
|
2019-06-06 07:52:37 -07:00
|
|
|
ue_stack_base() = default;
|
|
|
|
virtual ~ue_stack_base() = default;
|
2019-05-07 01:11:57 -07:00
|
|
|
|
|
|
|
virtual std::string get_type() = 0;
|
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
virtual void stop() = 0;
|
|
|
|
virtual bool switch_on() = 0;
|
|
|
|
virtual bool switch_off() = 0;
|
2019-05-07 01:11:57 -07:00
|
|
|
|
|
|
|
// UE metrics interface
|
|
|
|
virtual bool get_metrics(stack_metrics_t* metrics) = 0;
|
2017-05-30 06:38:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace srsue
|
|
|
|
|
2019-05-07 01:11:57 -07:00
|
|
|
#endif // SRSUE_UE_BASE_H
|