srsLTE/lib/include/srsran/common/interfaces_common.h

89 lines
1.9 KiB
C
Raw Normal View History

/**
2017-06-02 03:46:06 -07:00
*
* \section COPYRIGHT
2017-06-02 03:46:06 -07:00
*
2021-03-19 03:45:56 -07:00
* Copyright 2013-2021 Software Radio Systems Limited
2017-06-02 03:46:06 -07: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
*
*/
2021-03-19 03:45:56 -07:00
#ifndef SRSRAN_INTERFACES_COMMON_H
#define SRSRAN_INTERFACES_COMMON_H
2021-03-19 03:45:56 -07:00
#include "srsran/common/byte_buffer.h"
#include "srsran/common/security.h"
#include "srsran/phy/common/phy_common.h"
#include <string>
2017-07-06 07:42:16 -07:00
2021-03-19 03:45:56 -07:00
namespace srsran {
typedef struct {
std::string phy_level = "none";
std::string phy_lib_level = "none";
int phy_hex_limit = -1;
} phy_log_args_t;
typedef struct {
float min;
float max;
} rf_args_band_t;
// RF/radio args
typedef struct {
std::string type;
std::string log_level;
double srate_hz;
float dl_freq;
float ul_freq;
float freq_offset;
float rx_gain;
2021-03-19 03:45:56 -07:00
float rx_gain_ch[SRSRAN_MAX_CARRIERS];
float tx_gain;
2021-03-19 03:45:56 -07:00
float tx_gain_ch[SRSRAN_MAX_CARRIERS];
float tx_max_power;
float tx_gain_offset;
float rx_gain_offset;
uint32_t nof_carriers; // Number of RF channels
uint32_t nof_antennas; // Number of antennas per RF channel
std::string device_name;
std::string device_args;
std::string time_adv_nsamples;
std::string continuous_tx;
2021-03-19 03:45:56 -07:00
std::array<rf_args_band_t, SRSRAN_MAX_CARRIERS> ch_rx_bands;
std::array<rf_args_band_t, SRSRAN_MAX_CARRIERS> ch_tx_bands;
} 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;
};
2021-03-19 03:45:56 -07:00
class srsran_gw_config_t
2018-01-17 07:45:07 -08:00
{
public:
2021-03-19 03:45:56 -07:00
explicit srsran_gw_config_t(uint32_t lcid_ = 0) : lcid(lcid_) {}
2018-01-17 07:45:07 -08:00
uint32_t lcid;
};
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;
};
2020-05-20 12:16:06 -07:00
class stack_interface_phy_nr
{};
2021-03-19 03:45:56 -07:00
} // namespace srsran
2021-03-19 03:45:56 -07:00
#endif // SRSRAN_INTERFACES_COMMON_H