|
|
@ -23,11 +23,11 @@
|
|
|
|
#include "srslte/common/buffer_pool.h"
|
|
|
|
#include "srslte/common/buffer_pool.h"
|
|
|
|
#include "srslte/common/log_filter.h"
|
|
|
|
#include "srslte/common/log_filter.h"
|
|
|
|
#include "srslte/common/test_common.h"
|
|
|
|
#include "srslte/common/test_common.h"
|
|
|
|
|
|
|
|
#include "srslte/test/ue_test_interfaces.h"
|
|
|
|
#include "srslte/upper/pdcp.h"
|
|
|
|
#include "srslte/upper/pdcp.h"
|
|
|
|
#include "srsue/hdr/stack/rrc/rrc.h"
|
|
|
|
#include "srsue/hdr/stack/rrc/rrc.h"
|
|
|
|
#include "srsue/hdr/stack/rrc/rrc_meas.h"
|
|
|
|
#include "srsue/hdr/stack/rrc/rrc_meas.h"
|
|
|
|
#include "srsue/hdr/stack/upper/nas.h"
|
|
|
|
#include "srsue/hdr/stack/upper/nas.h"
|
|
|
|
#include "srsue/test/common/dummy_classes.h"
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
|
|
|
using namespace asn1::rrc;
|
|
|
|
using namespace asn1::rrc;
|
|
|
@ -108,14 +108,14 @@ private:
|
|
|
|
class nas_test : public srsue::nas
|
|
|
|
class nas_test : public srsue::nas
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
nas_test(srsue::stack_interface_nas* t) : srsue::nas(t) {}
|
|
|
|
nas_test(srslte::task_handler_interface* t) : srsue::nas(t) {}
|
|
|
|
bool is_attached() override { return false; }
|
|
|
|
bool is_attached() override { return false; }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class pdcp_test : public srslte::pdcp
|
|
|
|
class pdcp_test : public srslte::pdcp
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
pdcp_test(const char* logname, srslte::timer_handler* t) : srslte::pdcp(t, logname) {}
|
|
|
|
pdcp_test(const char* logname, srslte::task_handler_interface* t) : srslte::pdcp(t, logname) {}
|
|
|
|
void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu, bool blocking = false) override
|
|
|
|
void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu, bool blocking = false) override
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ul_dcch_msg_s ul_dcch_msg;
|
|
|
|
ul_dcch_msg_s ul_dcch_msg;
|
|
|
@ -167,14 +167,14 @@ private:
|
|
|
|
|
|
|
|
|
|
|
|
class rrc_test : public rrc
|
|
|
|
class rrc_test : public rrc
|
|
|
|
{
|
|
|
|
{
|
|
|
|
srsue::stack_dummy_interface* stack = nullptr;
|
|
|
|
srsue::stack_test_dummy* stack = nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
rrc_test(srslte::log_ref log_, stack_dummy_interface* stack_) : rrc(stack_), stack(stack_)
|
|
|
|
rrc_test(srslte::log_ref log_, stack_test_dummy* stack_) : rrc(stack_), stack(stack_)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
pool = srslte::byte_buffer_pool::get_instance();
|
|
|
|
pool = srslte::byte_buffer_pool::get_instance();
|
|
|
|
nastest = std::unique_ptr<nas_test>(new nas_test(stack));
|
|
|
|
nastest = std::unique_ptr<nas_test>(new nas_test(stack));
|
|
|
|
pdcptest = std::unique_ptr<pdcp_test>(new pdcp_test(log_->get_service_name().c_str(), &stack->timers));
|
|
|
|
pdcptest = std::unique_ptr<pdcp_test>(new pdcp_test(log_->get_service_name().c_str(), stack));
|
|
|
|
};
|
|
|
|
};
|
|
|
|
void init() { rrc::init(&phytest, nullptr, nullptr, pdcptest.get(), nastest.get(), nullptr, nullptr, {}); }
|
|
|
|
void init() { rrc::init(&phytest, nullptr, nullptr, pdcptest.get(), nastest.get(), nullptr, nullptr, {}); }
|
|
|
|
|
|
|
|
|
|
|
@ -273,7 +273,7 @@ int cell_select_test()
|
|
|
|
printf("====== Cell Select Testing ===============\n");
|
|
|
|
printf("====== Cell Select Testing ===============\n");
|
|
|
|
printf("==========================================================\n");
|
|
|
|
printf("==========================================================\n");
|
|
|
|
|
|
|
|
|
|
|
|
stack_dummy_interface stack;
|
|
|
|
stack_test_dummy stack;
|
|
|
|
rrc_test rrctest(log1, &stack);
|
|
|
|
rrc_test rrctest(log1, &stack);
|
|
|
|
rrctest.init();
|
|
|
|
rrctest.init();
|
|
|
|
rrctest.connect();
|
|
|
|
rrctest.connect();
|
|
|
@ -303,7 +303,7 @@ int meas_obj_test()
|
|
|
|
printf("====== Object Configuration Testing ===============\n");
|
|
|
|
printf("====== Object Configuration Testing ===============\n");
|
|
|
|
printf("==========================================================\n");
|
|
|
|
printf("==========================================================\n");
|
|
|
|
|
|
|
|
|
|
|
|
stack_dummy_interface stack;
|
|
|
|
stack_test_dummy stack;
|
|
|
|
rrc_test rrctest(log1, &stack);
|
|
|
|
rrc_test rrctest(log1, &stack);
|
|
|
|
rrctest.init();
|
|
|
|
rrctest.init();
|
|
|
|
rrctest.connect();
|
|
|
|
rrctest.connect();
|
|
|
@ -728,7 +728,7 @@ int a1event_report_test(uint32_t a1_rsrp_th,
|
|
|
|
printf("============ Report Testing A1 ===============\n");
|
|
|
|
printf("============ Report Testing A1 ===============\n");
|
|
|
|
printf("==========================================================\n");
|
|
|
|
printf("==========================================================\n");
|
|
|
|
|
|
|
|
|
|
|
|
stack_dummy_interface stack;
|
|
|
|
stack_test_dummy stack;
|
|
|
|
rrc_test rrctest(log1, &stack);
|
|
|
|
rrc_test rrctest(log1, &stack);
|
|
|
|
rrctest.init();
|
|
|
|
rrctest.init();
|
|
|
|
rrctest.connect();
|
|
|
|
rrctest.connect();
|
|
|
@ -862,7 +862,7 @@ int a3event_report_test(uint32_t a3_offset, uint32_t hyst, bool report_on_leave)
|
|
|
|
printf("============ Report Testing A3 ===============\n");
|
|
|
|
printf("============ Report Testing A3 ===============\n");
|
|
|
|
printf("==========================================================\n");
|
|
|
|
printf("==========================================================\n");
|
|
|
|
|
|
|
|
|
|
|
|
stack_dummy_interface stack;
|
|
|
|
stack_test_dummy stack;
|
|
|
|
rrc_test rrctest(log1, &stack);
|
|
|
|
rrc_test rrctest(log1, &stack);
|
|
|
|
rrctest.init();
|
|
|
|
rrctest.init();
|
|
|
|
rrctest.connect();
|
|
|
|
rrctest.connect();
|
|
|
|