You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.5 KiB
C

/**
5 years ago
*
* \section COPYRIGHT
5 years ago
*
* Copyright 2013-2021 Software Radio Systems Limited
5 years ago
*
* 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.
5 years ago
*
*/
#ifndef SRSGNB_NR_VNF_PHY_H
#define SRSGNB_NR_VNF_PHY_H
#include "srsenb/hdr/phy/enb_phy_base.h"
#include "srsenb/hdr/phy/phy_common.h"
#include "srsran/common/basic_vnf.h"
#include "srsran/interfaces/enb_metrics_interface.h"
#include "srsran/interfaces/gnb_interfaces.h"
#include "srsran/interfaces/radio_interfaces.h"
5 years ago
namespace srsenb {
struct nr_phy_cfg_t {
// TODO: add cell and RRC configs
};
class vnf_phy_nr : public srsenb::enb_phy_base, public srsenb::phy_interface_stack_nr
{
public:
vnf_phy_nr() = default;
5 years ago
~vnf_phy_nr();
int init(const srsenb::phy_args_t& args, const nr_phy_cfg_t& cfg, srsenb::stack_interface_phy_nr* stack_);
void stop() override;
5 years ago
std::string get_type() override { return "vnf"; };
5 years ago
void start_plot() override;
5 years ago
void get_metrics(std::vector<srsenb::phy_metrics_t>& metrics) override;
5 years ago
// MAC interface
int dl_config_request(const dl_config_request_t& request) override;
int tx_request(const tx_request_t& request) override;
void cmd_cell_gain(uint32_t cell_idx, float gain_db) override
{
// Do nothing
}
5 years ago
private:
std::unique_ptr<srsran::srsran_basic_vnf> vnf = nullptr;
5 years ago
bool initialized = false;
void parse_config(const nr_phy_cfg_t& cfg);
};
} // namespace srsenb
#endif // SRSGNB_NR_VNF_PHY_H