2020-11-26 01:25:22 -08:00
|
|
|
/**
|
2022-04-29 00:28:44 -07:00
|
|
|
* Copyright 2013-2022 Software Radio Systems Limited
|
2017-06-02 03:46:06 -07:00
|
|
|
*
|
2021-04-22 01:59:40 -07:00
|
|
|
* This file is part of srsRAN.
|
2017-06-02 03:46:06 -07:00
|
|
|
*
|
2021-04-22 01:59:40 -07:00
|
|
|
* srsRAN is free software: you can redistribute it and/or modify
|
2021-03-28 14:12:42 -07:00
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
2021-04-22 01:59:40 -07:00
|
|
|
* srsRAN is distributed in the hope that it will be useful,
|
2021-03-28 14:12:42 -07:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
2017-06-02 03:46:06 -07:00
|
|
|
*
|
2021-03-28 14:12:42 -07:00
|
|
|
* A copy of the GNU Affero General Public License can be found in
|
|
|
|
* the LICENSE file in the top-level directory of this distribution
|
|
|
|
* and at http://www.gnu.org/licenses/.
|
2017-06-02 03:46:06 -07:00
|
|
|
*
|
|
|
|
*/
|
2017-05-18 03:11:31 -07:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
#ifndef SRSRAN_INTERFACES_COMMON_H
|
|
|
|
#define SRSRAN_INTERFACES_COMMON_H
|
2017-05-18 03:11:31 -07:00
|
|
|
|
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"
|
2018-01-22 10:12:02 -08:00
|
|
|
#include <string>
|
2017-07-06 07:42:16 -07:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
namespace srsran {
|
2017-05-18 03:11:31 -07:00
|
|
|
|
2021-10-08 03:10:01 -07:00
|
|
|
struct phy_log_args_t {
|
2020-02-05 08:54:26 -08:00
|
|
|
std::string phy_level = "none";
|
|
|
|
std::string phy_lib_level = "none";
|
2021-06-21 09:10:41 -07:00
|
|
|
std::string id_preamble = "";
|
2020-02-05 08:54:26 -08:00
|
|
|
int phy_hex_limit = -1;
|
2021-10-08 03:10:01 -07:00
|
|
|
};
|
2019-07-05 07:47:39 -07:00
|
|
|
|
2021-10-08 03:10:01 -07:00
|
|
|
struct rf_args_band_t {
|
2020-03-12 15:06:09 -07:00
|
|
|
float min;
|
|
|
|
float max;
|
2021-10-08 03:10:01 -07:00
|
|
|
};
|
2020-03-12 15:06:09 -07:00
|
|
|
|
2019-07-05 07:47:39 -07:00
|
|
|
// RF/radio args
|
2021-10-08 03:10:01 -07:00
|
|
|
struct rf_args_t {
|
2019-07-05 07:47:39 -07:00
|
|
|
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;
|
2021-03-19 03:45:56 -07:00
|
|
|
float rx_gain_ch[SRSRAN_MAX_CARRIERS];
|
2019-07-05 07:47:39 -07:00
|
|
|
float tx_gain;
|
2021-03-19 03:45:56 -07:00
|
|
|
float tx_gain_ch[SRSRAN_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
|
|
|
|
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;
|
2021-10-06 05:50:30 -07:00
|
|
|
|
|
|
|
FILE** rx_files; // Array of pre-opened FILE* for rx instead of a real device
|
|
|
|
FILE** tx_files; // Array of pre-opened FILE* for tx instead of a real device
|
2021-10-08 03:10:01 -07:00
|
|
|
};
|
2019-07-05 07:47:39 -07:00
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2017-05-18 03:11:31 -07:00
|
|
|
class read_pdu_interface
|
|
|
|
{
|
|
|
|
public:
|
2021-06-03 02:03:58 -07:00
|
|
|
virtual uint32_t 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
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
} // namespace srsran
|
2017-05-18 03:11:31 -07:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
#endif // SRSRAN_INTERFACES_COMMON_H
|