From 6f7cb2cb4ff407f0af696eb9ce23bd2290450ef9 Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Wed, 11 Dec 2013 14:25:20 +0100 Subject: decoding: Use 'I' and 'R' in rbb array for DL We want to match up rbb decoding and encoding so it helps to use the same chars. --- src/decoding.cpp | 2 +- src/rlc.cpp | 2 +- src/tbf.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/decoding.cpp b/src/decoding.cpp index 0f70872a..47c8a844 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -92,7 +92,7 @@ void Decoding::extract_rbb(const uint8_t *rbb, char *show_rbb) uint8_t bit; bit = (rbb[i >> 3] >> (7 - (i&7))) & 1; - show_rbb[i] = bit ? '1' : 'o'; + show_rbb[i] = bit ? 'R' : 'I'; } show_rbb[64] = '\0'; diff --git a/src/rlc.cpp b/src/rlc.cpp index 4ee5f610..c725c4b4 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -96,7 +96,7 @@ void gprs_rlc_v_b::update(BTS *bts, char *show_rbb, uint8_t ssn, i >= 0 && bsn != ((w.v_a() - 1) & w.mod_sns()); i--, bsn = (bsn - 1) & w.mod_sns()) { - if (show_rbb[i] == '1') { + if (show_rbb[i] == 'R') { LOGP(DRLCMACDL, LOGL_DEBUG, "- got ack for BSN=%d\n", bsn); if (!is_acked(bsn)) *received += 1; diff --git a/src/tbf.cpp b/src/tbf.cpp index 3f4da560..8ffafce8 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1348,7 +1348,7 @@ int gprs_rlcmac_tbf::update_window(const uint8_t ssn, const uint8_t *rbb) Decoding::extract_rbb(rbb, show_rbb); /* show received array in debug (bit 64..1) */ LOGP(DRLCMACDL, LOGL_DEBUG, "- ack: (BSN=%d)\"%s\"" - "(BSN=%d) 1=ACK o=NACK\n", (ssn - 64) & mod_sns, + "(BSN=%d) R=ACK I=NACK\n", (ssn - 64) & mod_sns, show_rbb, (ssn - 1) & mod_sns); /* apply received array to receive state (SSN-64..SSN-1) */ -- cgit v1.2.3