|
|
|
@ -49,63 +49,58 @@ public:
|
|
|
|
|
|
|
|
|
|
int init(const phy_args_t& args_, stack_interface_phy_lte* stack_, syssim_interface_phy* syssim_);
|
|
|
|
|
|
|
|
|
|
int init(const phy_args_t& args_, stack_interface_phy_lte* stack_, radio_interface_phy* radio_);
|
|
|
|
|
int init(const phy_args_t& args_, stack_interface_phy_lte* stack_, srslte::radio_interface_phy* radio_) override;
|
|
|
|
|
|
|
|
|
|
// ue_phy_base interface
|
|
|
|
|
int init(const phy_args_t& args_);
|
|
|
|
|
void stop();
|
|
|
|
|
void set_earfcn(std::vector<uint32_t> earfcns);
|
|
|
|
|
void force_freq(float dl_freq, float ul_freq);
|
|
|
|
|
void wait_initialize();
|
|
|
|
|
void start_plot();
|
|
|
|
|
void get_metrics(phy_metrics_t* m);
|
|
|
|
|
std::string get_type();
|
|
|
|
|
int init(const phy_args_t& args_) override;
|
|
|
|
|
void stop() override;
|
|
|
|
|
void wait_initialize() override;
|
|
|
|
|
void start_plot() override;
|
|
|
|
|
void get_metrics(phy_metrics_t* m) override;
|
|
|
|
|
std::string get_type() override;
|
|
|
|
|
|
|
|
|
|
// The interface for the SS
|
|
|
|
|
void set_cell_map(const cell_list_t& cells_);
|
|
|
|
|
|
|
|
|
|
// phy_interface_rrc_lte
|
|
|
|
|
uint32_t get_current_earfcn();
|
|
|
|
|
uint32_t get_current_pci();
|
|
|
|
|
void set_config_scell(asn1::rrc::scell_to_add_mod_r10_s* scell_config);
|
|
|
|
|
void enable_pregen_signals(bool enable);
|
|
|
|
|
void set_activation_deactivation_scell(uint32_t cmd);
|
|
|
|
|
void
|
|
|
|
|
set_config(srslte::phy_cfg_t& config, uint32_t cc_idx = 0, uint32_t earfcn = 0, srslte_cell_t* cell_info = nullptr);
|
|
|
|
|
void set_config_tdd(srslte_tdd_config_t& tdd_config);
|
|
|
|
|
void set_config_mbsfn_sib2(srslte::mbsfn_sf_cfg_t* cfg_list, uint32_t nof_cfgs){};
|
|
|
|
|
void set_config_mbsfn_sib13(const srslte::sib13_t& sib13){};
|
|
|
|
|
void set_config_mbsfn_mcch(const srslte::mcch_msg_t& mcch){};
|
|
|
|
|
void enable_pregen_signals(bool enable) override;
|
|
|
|
|
void set_activation_deactivation_scell(uint32_t cmd) override;
|
|
|
|
|
void set_config(srslte::phy_cfg_t& config,
|
|
|
|
|
uint32_t cc_idx = 0,
|
|
|
|
|
uint32_t earfcn = 0,
|
|
|
|
|
srslte_cell_t* cell_info = nullptr) override;
|
|
|
|
|
void set_config_tdd(srslte_tdd_config_t& tdd_config) override;
|
|
|
|
|
void set_config_mbsfn_sib2(srslte::mbsfn_sf_cfg_t* cfg_list, uint32_t nof_cfgs) override{};
|
|
|
|
|
void set_config_mbsfn_sib13(const srslte::sib13_t& sib13) override{};
|
|
|
|
|
void set_config_mbsfn_mcch(const srslte::mcch_msg_t& mcch) override{};
|
|
|
|
|
|
|
|
|
|
// Measurements interface
|
|
|
|
|
void meas_stop();
|
|
|
|
|
int meas_start(uint32_t earfcn, int pci = -1);
|
|
|
|
|
int meas_stop(uint32_t earfcn, int pci = -1);
|
|
|
|
|
void meas_stop() override;
|
|
|
|
|
|
|
|
|
|
// phy_interface_mac_lte
|
|
|
|
|
void set_mch_period_stop(uint32_t stop){};
|
|
|
|
|
void set_mch_period_stop(uint32_t stop) override{};
|
|
|
|
|
|
|
|
|
|
// Cell search and selection procedures
|
|
|
|
|
cell_search_ret_t cell_search(phy_cell_t* found_cell);
|
|
|
|
|
cell_search_ret_t cell_search(phy_cell_t* found_cell) override;
|
|
|
|
|
bool cell_select(const phy_cell_t* cell) override;
|
|
|
|
|
bool cell_is_camping();
|
|
|
|
|
void reset();
|
|
|
|
|
bool cell_is_camping() override;
|
|
|
|
|
void reset() override;
|
|
|
|
|
|
|
|
|
|
// phy_interface_mac_lte
|
|
|
|
|
void configure_prach_params();
|
|
|
|
|
void prach_send(uint32_t preamble_idx, int allowed_subframe, float target_power_dbm, float ta_base_sec);
|
|
|
|
|
prach_info_t prach_get_info();
|
|
|
|
|
void sr_send();
|
|
|
|
|
int sr_last_tx_tti();
|
|
|
|
|
void configure_prach_params() override;
|
|
|
|
|
void prach_send(uint32_t preamble_idx, int allowed_subframe, float target_power_dbm, float ta_base_sec) override;
|
|
|
|
|
prach_info_t prach_get_info() override;
|
|
|
|
|
void sr_send() override;
|
|
|
|
|
int sr_last_tx_tti() override;
|
|
|
|
|
|
|
|
|
|
// phy_interface_mac_common
|
|
|
|
|
void set_crnti(uint16_t rnti);
|
|
|
|
|
void set_timeadv_rar(uint32_t ta_cmd);
|
|
|
|
|
void set_timeadv(uint32_t ta_cmd);
|
|
|
|
|
void set_rar_grant(uint8_t grant_payload[SRSLTE_RAR_GRANT_LEN], uint16_t rnti);
|
|
|
|
|
uint32_t get_current_tti();
|
|
|
|
|
float get_phr();
|
|
|
|
|
float get_pathloss_db();
|
|
|
|
|
void set_crnti(uint16_t rnti) override;
|
|
|
|
|
void set_timeadv_rar(uint32_t ta_cmd) override;
|
|
|
|
|
void set_timeadv(uint32_t ta_cmd) override;
|
|
|
|
|
void set_rar_grant(uint8_t grant_payload[SRSLTE_RAR_GRANT_LEN], uint16_t rnti) override;
|
|
|
|
|
uint32_t get_current_tti() override;
|
|
|
|
|
float get_phr() override;
|
|
|
|
|
float get_pathloss_db() override;
|
|
|
|
|
|
|
|
|
|
// phy_interface_syssim
|
|
|
|
|
void set_current_tti(uint32_t tti);
|
|
|
|
@ -114,14 +109,12 @@ public:
|
|
|
|
|
void new_tb(const srsue::mac_interface_phy_lte::mac_grant_dl_t, const uint8_t* data);
|
|
|
|
|
|
|
|
|
|
// Radio interface
|
|
|
|
|
void radio_overflow();
|
|
|
|
|
void radio_failure();
|
|
|
|
|
void radio_overflow() override;
|
|
|
|
|
void radio_failure() override;
|
|
|
|
|
|
|
|
|
|
void run_tti();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void select_pcell();
|
|
|
|
|
|
|
|
|
|
srslte::logger* logger = nullptr;
|
|
|
|
|
srslte::log_filter log;
|
|
|
|
|
|
|
|
|
@ -133,10 +126,9 @@ private:
|
|
|
|
|
cell_t pcell = {};
|
|
|
|
|
bool pcell_set = false;
|
|
|
|
|
|
|
|
|
|
phy_cfg_t phy_cfg = {};
|
|
|
|
|
srslte::phy_cfg_t phy_cfg = {};
|
|
|
|
|
|
|
|
|
|
uint32_t current_tti = 0;
|
|
|
|
|
uint16_t current_temp_rnti = 0;
|
|
|
|
|
uint32_t cc_idx = 0;
|
|
|
|
|
|
|
|
|
|
int prach_tti_tx = -1;
|
|
|
|
|