Add phy object to rrc_nr_test.

master
Fabian Eckermann 3 years ago committed by Andre Puschmann
parent 992d1bb02a
commit eb294fd4e3

@ -49,6 +49,12 @@ public:
srsenb::sched_interface::cell_cfg_t cellcfgobj; srsenb::sched_interface::cell_cfg_t cellcfgobj;
}; };
class phy_nr_dummy : public phy_interface_stack_nr
{
public:
int set_common_cfg(const phy_interface_rrc_nr::common_cfg_t& common_cfg_) override { return SRSRAN_SUCCESS; }
};
} // namespace srsenb } // namespace srsenb
#endif // SRSRAN_DUMMY_NR_CLASSES_H #endif // SRSRAN_DUMMY_NR_CLASSES_H

@ -14,6 +14,7 @@
#include "srsenb/test/common/dummy_classes_common.h" #include "srsenb/test/common/dummy_classes_common.h"
#include "srsenb/test/common/dummy_classes_nr.h" #include "srsenb/test/common/dummy_classes_nr.h"
#include "srsran/common/test_common.h" #include "srsran/common/test_common.h"
#include "srsran/interfaces/gnb_rrc_nr_interfaces.h"
#include <iostream> #include <iostream>
using namespace asn1::rrc_nr; using namespace asn1::rrc_nr;
@ -67,15 +68,19 @@ int test_rrc_setup()
{ {
srsran::task_scheduler task_sched; srsran::task_scheduler task_sched;
phy_nr_dummy phy_obj;
mac_nr_dummy mac_obj; mac_nr_dummy mac_obj;
rlc_dummy rlc_obj; rlc_dummy rlc_obj;
pdcp_dummy pdcp_obj; pdcp_dummy pdcp_obj;
rrc_nr rrc_obj(&task_sched); rrc_nr rrc_obj(&task_sched);
// set cfg // set cfg
rrc_nr_cfg_t default_cfg = {}; rrc_nr_cfg_t default_cfg = {};
rrc_nr_cfg_t rrc_cfg = rrc_obj.update_default_cfg(default_cfg); rrc_cell_cfg_nr_t cell_cfg = {};
TESTASSERT(rrc_obj.init(rrc_cfg, nullptr, &mac_obj, &rlc_obj, &pdcp_obj, nullptr, nullptr, nullptr) == rrc_nr_cfg_t rrc_cfg_nr = rrc_obj.update_default_cfg(default_cfg);
rrc_cfg_nr.cell_list.push_back(cell_cfg);
TESTASSERT(rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, nullptr, nullptr, nullptr) ==
SRSRAN_SUCCESS); SRSRAN_SUCCESS);
for (uint32_t n = 0; n < 2; ++n) { for (uint32_t n = 0; n < 2; ++n) {

Loading…
Cancel
Save