|
|
|
@ -34,7 +34,6 @@ bsr_proc::bsr_proc()
|
|
|
|
|
{
|
|
|
|
|
log_h = NULL;
|
|
|
|
|
initiated = false;
|
|
|
|
|
last_print = 0;
|
|
|
|
|
current_tti = 0;
|
|
|
|
|
trigger_tti = 0;
|
|
|
|
|
triggered_bsr_type = NONE;
|
|
|
|
@ -52,6 +51,24 @@ void bsr_proc::init(rlc_interface_mac* rlc_, srslte::log* log_h_, srslte::timer_
|
|
|
|
|
timer_retx = timers_db->get_unique_timer();
|
|
|
|
|
|
|
|
|
|
reset();
|
|
|
|
|
|
|
|
|
|
// Print periodically the LCID queue status
|
|
|
|
|
auto queue_status_print_task = [this]() {
|
|
|
|
|
char str[128];
|
|
|
|
|
str[0] = '\0';
|
|
|
|
|
int n = 0;
|
|
|
|
|
for (auto& lcg : lcgs) {
|
|
|
|
|
for (auto& iter : lcg) {
|
|
|
|
|
n = srslte_print_check(str, 128, n, "%d: %d ", iter.first, iter.second.old_buffer);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Info("BSR: triggered_bsr_type=%d, LCID QUEUE status: %s\n", triggered_bsr_type, str);
|
|
|
|
|
};
|
|
|
|
|
timers_db->defer_callback(QUEUE_STATUS_PERIOD_MS, [this, queue_status_print_task]() {
|
|
|
|
|
queue_status_print_task();
|
|
|
|
|
timers_db->defer_callback(QUEUE_STATUS_PERIOD_MS, queue_status_print_task);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
initiated = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -269,6 +286,7 @@ void bsr_proc::step(uint32_t tti)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pthread_mutex_lock(&mutex);
|
|
|
|
|
|
|
|
|
|
current_tti = tti;
|
|
|
|
|
|
|
|
|
|
update_new_data();
|
|
|
|
@ -280,18 +298,6 @@ void bsr_proc::step(uint32_t tti)
|
|
|
|
|
|
|
|
|
|
update_buffer_state();
|
|
|
|
|
|
|
|
|
|
if ((tti - last_print) % 10240 > QUEUE_STATUS_PERIOD_MS) {
|
|
|
|
|
char str[128];
|
|
|
|
|
str[0] = '\0';
|
|
|
|
|
int n = 0;
|
|
|
|
|
for (int i = 0; i < NOF_LCG; i++) {
|
|
|
|
|
for (std::map<uint32_t, lcid_t>::iterator iter = lcgs[i].begin(); iter != lcgs[i].end(); ++iter) {
|
|
|
|
|
n = srslte_print_check(str, 128, n, "%d: %d ", iter->first, iter->second.old_buffer);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Info("BSR: triggered_bsr_type=%d, LCID QUEUE status: %s\n", triggered_bsr_type, str);
|
|
|
|
|
last_print = tti;
|
|
|
|
|
}
|
|
|
|
|
pthread_mutex_unlock(&mutex);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|