Solved compilation warnings and enb_phy_test stop

master
Xavier Arteaga 4 years ago committed by Xavier Arteaga
parent b8f4d03979
commit 080543815f

@ -32,7 +32,7 @@
static uint32_t nof_frames = 10;
static uint32_t num_bits = 1000;
static srslte_mod_t modulation = 10;
static srslte_mod_t modulation = SRSLTE_MOD_NITEMS;
void usage(char* prog)
{
@ -85,7 +85,7 @@ void parse_args(int argc, char** argv)
exit(-1);
}
}
if (modulation == 10) {
if (modulation == SRSLTE_MOD_NITEMS) {
usage(argv[0]);
exit(-1);
}

@ -39,7 +39,7 @@ using namespace srslte;
#define SRSLTE_MAX_RADIOS 3
static std::array<std::string, SRSLTE_MAX_RADIOS> radios_args = {"auto", "auto", "auto"};
static std::array<std::string, SRSLTE_MAX_RADIOS> radios_args = {};
static char radio_device[64];
static log_filter log_h;
@ -331,7 +331,7 @@ int main(int argc, char** argv)
rf_args_t radio_args = {};
radio_args.nof_antennas = nof_ports;
radio_args.nof_carriers = 1;
radio_args.device_args = radios_args[r];
radio_args.device_args = radios_args[r].empty() ? "auto" : radios_args[r];
radio_args.rx_gain = agc_enable ? -1 : rf_gain;
radio_args.device_name = radio_device;

@ -21,14 +21,7 @@
add_executable(enb_phy_test enb_phy_test.cc)
target_link_libraries(enb_phy_test
srsenb_phy
srsenb_stack
srsenb_upper
srsenb_mac
srsenb_rrc
srslte_common
srslte_phy
srslte_radio
srslte_upper
rrc_asn1
${CMAKE_THREAD_LIBS_INIT}
${Boost_LIBRARIES})

@ -193,6 +193,10 @@ public:
{
int err = SRSLTE_SUCCESS;
if (not running) {
return true;
}
// Get number of bytes to write
uint32_t nbytes = static_cast<uint32_t>(sizeof(cf_t)) * buffer.get_nof_samples();
@ -214,6 +218,13 @@ public:
{
int err = SRSLTE_SUCCESS;
if (not running) {
for (uint32_t i = 0; i < buffer.size(); i++) {
srslte_vec_cf_zero(buffer.get(i), buffer.get_nof_samples());
}
return true;
}
log_h.info("rx_now %d\n", buffer.get_nof_samples());
// Get number of bytes to read
@ -1306,12 +1317,14 @@ public:
ue_phy->reconfigure(phy_rrc_cfg);
}
~phy_test_bench()
void stop()
{
radio->stop();
enb_phy->stop();
}
~phy_test_bench() = default;
int run_tti()
{
int ret = SRSLTE_SUCCESS;
@ -1467,6 +1480,8 @@ int main(int argc, char** argv)
TESTASSERT(test_bench->run_tti() >= SRSLTE_SUCCESS);
}
test_bench->stop();
std::cout << "Passed" << std::endl;
return SRSLTE_SUCCESS;

Loading…
Cancel
Save