mirror of https://github.com/pvnis/srsRAN_4G.git
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.
87 lines
2.8 KiB
C
87 lines
2.8 KiB
C
4 years ago
|
/**
|
||
5 years ago
|
*
|
||
4 years ago
|
* \section COPYRIGHT
|
||
5 years ago
|
*
|
||
4 years ago
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||
5 years ago
|
*
|
||
4 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 SRSUE_DUMMY_CLASSES_H
|
||
|
#define SRSUE_DUMMY_CLASSES_H
|
||
|
|
||
4 years ago
|
#include "srsran/common/task_scheduler.h"
|
||
|
#include "srsran/interfaces/phy_interface_types.h"
|
||
|
#include "srsran/interfaces/ue_interfaces.h"
|
||
|
#include "srsran/interfaces/ue_phy_interfaces.h"
|
||
|
#include "srsran/interfaces/ue_rlc_interfaces.h"
|
||
5 years ago
|
|
||
|
namespace srsue {
|
||
|
|
||
5 years ago
|
class stack_test_dummy : public stack_interface_rrc
|
||
5 years ago
|
{
|
||
|
public:
|
||
5 years ago
|
stack_test_dummy() {}
|
||
5 years ago
|
|
||
4 years ago
|
srsran::tti_point get_current_tti() override
|
||
5 years ago
|
{
|
||
4 years ago
|
return srsran::tti_point{task_sched.get_timer_handler()->get_cur_time() % 10240};
|
||
5 years ago
|
}
|
||
5 years ago
|
|
||
|
// Testing utility functions
|
||
|
void run_tti()
|
||
|
{
|
||
5 years ago
|
// update clock and run internal tasks
|
||
|
task_sched.tic();
|
||
|
|
||
5 years ago
|
task_sched.run_pending_tasks();
|
||
5 years ago
|
}
|
||
5 years ago
|
|
||
5 years ago
|
// run pending tasks without updating timers
|
||
|
void run_pending_tasks() { task_sched.run_pending_tasks(); }
|
||
|
|
||
4 years ago
|
srsran::task_scheduler task_sched{512, 100};
|
||
5 years ago
|
};
|
||
|
|
||
|
class rlc_dummy_interface : public rlc_interface_mac
|
||
|
{
|
||
|
public:
|
||
5 years ago
|
bool has_data_locked(const uint32_t lcid) override { return false; }
|
||
5 years ago
|
uint32_t get_buffer_state(const uint32_t lcid) override { return 0; }
|
||
|
int read_pdu(uint32_t lcid, uint8_t* payload, uint32_t nof_bytes) override { return 0; }
|
||
|
void write_pdu(uint32_t lcid, uint8_t* payload, uint32_t nof_bytes) override {}
|
||
4 years ago
|
void write_pdu_bcch_bch(srsran::unique_byte_buffer_t payload) override {}
|
||
5 years ago
|
void write_pdu_bcch_dlsch(uint8_t* payload, uint32_t nof_bytes) override {}
|
||
4 years ago
|
void write_pdu_pcch(srsran::unique_byte_buffer_t payload) override {}
|
||
5 years ago
|
void write_pdu_mch(uint32_t lcid, uint8_t* payload, uint32_t nof_bytes) override {}
|
||
5 years ago
|
};
|
||
|
|
||
5 years ago
|
class phy_dummy_interface : public phy_interface_rrc_lte
|
||
|
{
|
||
4 years ago
|
bool set_config(srsran::phy_cfg_t config, uint32_t cc_idx) override { return true; }
|
||
|
bool set_scell(srsran_cell_t cell_info, uint32_t cc_idx, uint32_t earfcn) override { return true; }
|
||
|
void set_config_tdd(srsran_tdd_config_t& tdd_config) override {}
|
||
|
void set_config_mbsfn_sib2(srsran::mbsfn_sf_cfg_t* cfg_list, uint32_t nof_cfgs) override {}
|
||
|
void set_config_mbsfn_sib13(const srsran::sib13_t& sib13) override {}
|
||
|
void set_config_mbsfn_mcch(const srsran::mcch_msg_t& mcch) override {}
|
||
4 years ago
|
void deactivate_scells() override {}
|
||
5 years ago
|
|
||
|
/* Measurements interface */
|
||
4 years ago
|
void set_cells_to_meas(uint32_t earfcn, const std::set<uint32_t>& pci) override {}
|
||
|
void meas_stop() override {}
|
||
5 years ago
|
|
||
|
/* Cell search and selection procedures */
|
||
4 years ago
|
bool cell_search() override { return true; }
|
||
|
bool cell_select(phy_cell_t cell) override { return true; }
|
||
|
bool cell_is_camping() override { return false; }
|
||
5 years ago
|
|
||
4 years ago
|
void enable_pregen_signals(bool enable) override {}
|
||
5 years ago
|
};
|
||
|
|
||
5 years ago
|
} // namespace srsue
|
||
|
|
||
|
#endif // SRSUE_DUMMY_CLASSES_H
|