print build-info during enb startup

master
Andre Puschmann 6 years ago
parent 26ed7fe2ad
commit af5a329fec

@ -222,7 +222,11 @@ private:
int parse_rr(all_args_t *args, rrc_cfg_t *rrc_cfg);
int parse_drb(all_args_t *args, rrc_cfg_t *rrc_cfg);
bool sib_is_present(LIBLTE_RRC_SCHEDULING_INFO_STRUCT *sched_info, uint32_t nof_sched_info, LIBLTE_RRC_SIB_TYPE_ENUM sib_num);
int parse_cell_cfg(all_args_t *args, srslte_cell_t *cell);
int parse_cell_cfg(all_args_t *args, srslte_cell_t *cell);
std::string get_build_mode();
std::string get_build_info();
std::string get_build_string();
};
} // namespace srsenb

@ -26,6 +26,9 @@
#include <boost/algorithm/string.hpp>
#include "srsenb/hdr/enb.h"
#include "srslte/build_info.h"
#include <iostream>
#include <sstream>
namespace srsenb {
@ -54,6 +57,9 @@ void enb::cleanup(void)
}
enb::enb() : started(false) {
// print build info
std::cout << std::endl << get_build_string() << std::endl;
srslte_dft_load();
pool = srslte::byte_buffer_pool::get_instance(ENB_POOL_SIZE);
@ -342,4 +348,24 @@ srslte::LOG_LEVEL_ENUM enb::level(std::string l)
}
}
std::string enb::get_build_mode()
{
return std::string(srslte_get_build_mode());
}
std::string enb::get_build_info()
{
if (std::string(srslte_get_build_info()) == "") {
return std::string(srslte_get_version());
}
return std::string(srslte_get_build_info());
}
std::string enb::get_build_string()
{
std::stringstream ss;
ss << "Built in " << get_build_mode() << " mode using " << get_build_info() << "." << std::endl;
return ss.str();
}
} // namespace srsenb

Loading…
Cancel
Save