|
|
|
@ -42,6 +42,8 @@ enb_stack_lte::enb_stack_lte(srslog::sink& log_sink) :
|
|
|
|
|
{
|
|
|
|
|
get_background_workers().set_nof_workers(2);
|
|
|
|
|
enb_task_queue = task_sched.make_task_queue();
|
|
|
|
|
enb_task_queue.set_notify_mode();
|
|
|
|
|
metrics_task_queue = task_sched.make_task_queue();
|
|
|
|
|
// sync_queue is added in init()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -96,7 +98,7 @@ int enb_stack_lte::init(const stack_args_t& args_, const rrc_cfg_t& rrc_cfg_)
|
|
|
|
|
|
|
|
|
|
// Set up pcap and trace
|
|
|
|
|
if (args.mac_pcap.enable) {
|
|
|
|
|
mac_pcap.open(args.mac_pcap.filename.c_str());
|
|
|
|
|
mac_pcap.open(args.mac_pcap.filename);
|
|
|
|
|
mac.start_pcap(&mac_pcap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -115,6 +117,7 @@ int enb_stack_lte::init(const stack_args_t& args_, const rrc_cfg_t& rrc_cfg_)
|
|
|
|
|
|
|
|
|
|
// add sync queue
|
|
|
|
|
sync_task_queue = task_sched.make_task_queue(args.sync_queue_size);
|
|
|
|
|
sync_task_queue.set_notify_mode();
|
|
|
|
|
|
|
|
|
|
// Init all layers
|
|
|
|
|
if (!mac.init(args.mac, rrc_cfg.cell_list, phy, &rlc, &rrc)) {
|
|
|
|
@ -202,7 +205,7 @@ void enb_stack_lte::stop_impl()
|
|
|
|
|
bool enb_stack_lte::get_metrics(stack_metrics_t* metrics)
|
|
|
|
|
{
|
|
|
|
|
// use stack thread to query metrics
|
|
|
|
|
auto ret = enb_task_queue.try_push([this]() {
|
|
|
|
|
auto ret = metrics_task_queue.try_push([this]() {
|
|
|
|
|
stack_metrics_t metrics{};
|
|
|
|
|
mac.get_metrics(metrics.mac);
|
|
|
|
|
if (not metrics.mac.ues.empty()) {
|
|
|
|
|