lib,rlc_am_nr: status PDU to string prints NACK range

master
Robert Falkenberg 3 years ago
parent 68695078f0
commit eec4a395d0

@ -150,6 +150,18 @@ void log_rlc_am_nr_status_pdu_to_string(srslog::log_channel& log_ch,
if (status->nacks.size() > 0) { if (status->nacks.size() > 0) {
fmt::format_to(buffer, ", NACK_SN = "); fmt::format_to(buffer, ", NACK_SN = ");
for (uint32_t i = 0; i < status->nacks.size(); ++i) { for (uint32_t i = 0; i < status->nacks.size(); ++i) {
if (status->nacks[i].has_nack_range) {
if (status->nacks[i].has_so) {
fmt::format_to(buffer,
"[{} {}:{} r{}]",
status->nacks[i].nack_sn,
status->nacks[i].so_start,
status->nacks[i].so_end,
status->nacks[i].nack_range);
} else {
fmt::format_to(buffer, "[{} r{}]", status->nacks[i].nack_sn, status->nacks[i].nack_range);
}
} else {
if (status->nacks[i].has_so) { if (status->nacks[i].has_so) {
fmt::format_to( fmt::format_to(
buffer, "[{} {}:{}]", status->nacks[i].nack_sn, status->nacks[i].so_start, status->nacks[i].so_end); buffer, "[{} {}:{}]", status->nacks[i].nack_sn, status->nacks[i].so_start, status->nacks[i].so_end);
@ -158,6 +170,7 @@ void log_rlc_am_nr_status_pdu_to_string(srslog::log_channel& log_ch,
} }
} }
} }
}
log_ch(fmt_str, std::forward<Args>(args)..., to_c_str(buffer)); log_ch(fmt_str, std::forward<Args>(args)..., to_c_str(buffer));
} }

Loading…
Cancel
Save