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.
64 lines
2.7 KiB
C
64 lines
2.7 KiB
C
5 years ago
|
/*
|
||
5 years ago
|
* Copyright 2013-2020 Software Radio Systems Limited
|
||
5 years ago
|
*
|
||
|
* This file is part of srsLTE.
|
||
|
*
|
||
|
* srsLTE is free software: you can redistribute it and/or modify
|
||
|
* 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.
|
||
|
*
|
||
|
* srsLTE is distributed in the hope that it will be useful,
|
||
|
* 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.
|
||
|
*
|
||
|
* 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/.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#ifndef SRSUE_DUMMY_CLASSES_H
|
||
|
#define SRSUE_DUMMY_CLASSES_H
|
||
|
|
||
|
#include "srslte/interfaces/ue_interfaces.h"
|
||
|
|
||
|
namespace srsue {
|
||
|
|
||
5 years ago
|
class stack_test_dummy : public stack_interface_rrc
|
||
5 years ago
|
{
|
||
|
public:
|
||
|
srslte::timer_handler::unique_timer get_unique_timer() override { return timers.get_unique_timer(); }
|
||
5 years ago
|
void start_cell_search() override {}
|
||
|
void start_cell_select(const phy_interface_rrc_lte::phy_cell_t* cell) override {}
|
||
|
srslte::tti_point get_current_tti() override { return srslte::tti_point{timers.get_cur_time() % 10240}; }
|
||
5 years ago
|
srslte::task_multiqueue::queue_handler make_task_queue() final { return pending_tasks.get_queue_handler(); }
|
||
|
void enqueue_background_task(std::function<void(uint32_t)> f) override { f(0); }
|
||
|
void notify_background_task_result(srslte::move_task_t task) override { task(); }
|
||
|
void defer_callback(uint32_t duration_ms, std::function<void()> func) final
|
||
|
{
|
||
|
timers.defer_callback(duration_ms, func);
|
||
|
}
|
||
5 years ago
|
|
||
5 years ago
|
srslte::timer_handler timers{100};
|
||
|
srslte::task_multiqueue pending_tasks;
|
||
|
};
|
||
|
|
||
|
class rlc_dummy_interface : public rlc_interface_mac
|
||
|
{
|
||
|
public:
|
||
|
bool has_data(const uint32_t lcid) override { return false; }
|
||
|
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 {}
|
||
|
void write_pdu_bcch_bch(srslte::unique_byte_buffer_t payload) override {}
|
||
|
void write_pdu_bcch_dlsch(uint8_t* payload, uint32_t nof_bytes) override {}
|
||
|
void write_pdu_pcch(srslte::unique_byte_buffer_t payload) override {}
|
||
|
void write_pdu_mch(uint32_t lcid, uint8_t* payload, uint32_t nof_bytes) override {}
|
||
5 years ago
|
};
|
||
|
|
||
|
} // namespace srsue
|
||
|
|
||
|
#endif // SRSUE_DUMMY_CLASSES_H
|