2020-11-26 01:25:22 -08:00
|
|
|
/**
|
2017-06-02 03:46:06 -07:00
|
|
|
*
|
2020-11-26 01:25:22 -08:00
|
|
|
* \section COPYRIGHT
|
2017-06-02 03:46:06 -07:00
|
|
|
*
|
2020-11-26 01:25:22 -08:00
|
|
|
* Copyright 2013-2020 Software Radio Systems Limited
|
2017-06-02 03:46:06 -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-06-02 03:46:06 -07:00
|
|
|
*
|
|
|
|
*/
|
2017-05-18 03:11:31 -07:00
|
|
|
|
2018-03-31 10:04:04 -07:00
|
|
|
#ifndef SRSLTE_INTERFACES_COMMON_H
|
|
|
|
#define SRSLTE_INTERFACES_COMMON_H
|
2017-05-18 03:11:31 -07:00
|
|
|
|
2021-02-05 09:04:05 -08:00
|
|
|
#include "srslte/common/byte_buffer.h"
|
2017-06-28 04:31:43 -07:00
|
|
|
#include "srslte/common/security.h"
|
2021-01-20 06:46:46 -08:00
|
|
|
#include "srslte/phy/common/phy_common.h"
|
2018-01-22 10:12:02 -08:00
|
|
|
#include <string>
|
2017-07-06 07:42:16 -07:00
|
|
|
|
2017-05-18 03:11:31 -07:00
|
|
|
namespace srslte {
|
|
|
|
|
2019-07-05 07:47:39 -07:00
|
|
|
typedef struct {
|
2020-02-05 08:54:26 -08:00
|
|
|
std::string phy_level = "none";
|
|
|
|
std::string phy_lib_level = "none";
|
|
|
|
int phy_hex_limit = -1;
|
2019-07-05 07:47:39 -07:00
|
|
|
} phy_log_args_t;
|
|
|
|
|
2020-03-12 15:06:09 -07:00
|
|
|
typedef struct {
|
|
|
|
float min;
|
|
|
|
float max;
|
|
|
|
} rf_args_band_t;
|
|
|
|
|
2019-07-05 07:47:39 -07:00
|
|
|
// RF/radio args
|
|
|
|
typedef struct {
|
|
|
|
std::string type;
|
|
|
|
std::string log_level;
|
2020-07-23 03:02:51 -07:00
|
|
|
double srate_hz;
|
2019-07-05 07:47:39 -07:00
|
|
|
float dl_freq;
|
|
|
|
float ul_freq;
|
|
|
|
float freq_offset;
|
|
|
|
float rx_gain;
|
2020-07-28 07:06:52 -07:00
|
|
|
float rx_gain_ch[SRSLTE_MAX_CARRIERS];
|
2019-07-05 07:47:39 -07:00
|
|
|
float tx_gain;
|
2020-06-19 02:00:12 -07:00
|
|
|
float tx_gain_ch[SRSLTE_MAX_CARRIERS];
|
2019-07-05 07:47:39 -07:00
|
|
|
float tx_max_power;
|
|
|
|
float tx_gain_offset;
|
|
|
|
float rx_gain_offset;
|
2020-03-06 06:26:48 -08:00
|
|
|
uint32_t nof_carriers; // Number of RF channels
|
|
|
|
uint32_t nof_antennas; // Number of antennas per RF channel
|
2019-07-05 07:47:39 -07:00
|
|
|
std::string device_name;
|
2020-03-06 06:26:48 -08:00
|
|
|
std::string device_args;
|
2019-07-05 07:47:39 -07:00
|
|
|
std::string time_adv_nsamples;
|
|
|
|
std::string continuous_tx;
|
2020-03-12 15:06:09 -07:00
|
|
|
|
|
|
|
std::array<rf_args_band_t, SRSLTE_MAX_CARRIERS> ch_rx_bands;
|
|
|
|
std::array<rf_args_band_t, SRSLTE_MAX_CARRIERS> ch_tx_bands;
|
|
|
|
|
2019-07-05 07:47:39 -07:00
|
|
|
} rf_args_t;
|
|
|
|
|
2020-06-09 10:35:57 -07:00
|
|
|
struct vnf_args_t {
|
|
|
|
std::string type;
|
|
|
|
std::string bind_addr;
|
|
|
|
uint16_t bind_port;
|
|
|
|
std::string log_level;
|
|
|
|
int log_hex_limit;
|
|
|
|
};
|
|
|
|
|
2018-01-17 07:45:07 -08:00
|
|
|
class srslte_gw_config_t
|
|
|
|
{
|
|
|
|
public:
|
2019-11-08 03:53:59 -08:00
|
|
|
explicit srslte_gw_config_t(uint32_t lcid_ = 0) : lcid(lcid_) {}
|
2018-01-17 07:45:07 -08:00
|
|
|
|
|
|
|
uint32_t lcid;
|
|
|
|
};
|
|
|
|
|
2017-05-18 03:11:31 -07:00
|
|
|
class read_pdu_interface
|
|
|
|
{
|
|
|
|
public:
|
2019-10-14 09:39:02 -07:00
|
|
|
virtual int read_pdu(uint32_t lcid, uint8_t* payload, uint32_t requested_bytes) = 0;
|
2017-05-18 03:11:31 -07:00
|
|
|
};
|
|
|
|
|
2020-05-20 12:16:06 -07:00
|
|
|
class stack_interface_phy_nr
|
|
|
|
{};
|
|
|
|
|
2019-10-14 09:39:02 -07:00
|
|
|
} // namespace srslte
|
2017-05-18 03:11:31 -07:00
|
|
|
|
2018-03-31 10:04:04 -07:00
|
|
|
#endif // SRSLTE_INTERFACES_COMMON_H
|