srsLTE/srsenb/hdr/phy/vnf_phy_nr.h

64 lines
1.5 KiB
C
Raw Normal View History

/**
2020-06-09 11:58:04 -07:00
*
* \section COPYRIGHT
2020-06-09 11:58:04 -07:00
*
2021-03-19 03:45:56 -07:00
* Copyright 2013-2021 Software Radio Systems Limited
2020-06-09 11:58:04 -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.
2020-06-09 11:58:04 -07:00
*
*/
#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"
2021-03-19 03:45:56 -07:00
#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"
2020-06-09 11:58:04 -07:00
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;
2020-06-09 11:58:04 -07:00
~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;
2020-06-09 11:58:04 -07:00
std::string get_type() override { return "vnf"; };
2020-06-09 11:58:04 -07:00
void start_plot() override;
2020-06-09 11:58:04 -07:00
void get_metrics(std::vector<srsenb::phy_metrics_t>& metrics) override;
2020-06-09 11:58:04 -07:00
// 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
}
2020-06-09 11:58:04 -07:00
private:
2021-03-19 03:45:56 -07:00
std::unique_ptr<srsran::srsran_basic_vnf> vnf = nullptr;
2020-06-09 11:58:04 -07:00
bool initialized = false;
void parse_config(const nr_phy_cfg_t& cfg);
};
} // namespace srsenb
#endif // SRSGNB_NR_VNF_PHY_H