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;
};
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
#endif // SRSRAN_DUMMY_NR_CLASSES_H

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

Loading…
Cancel
Save