aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2013-12-11 14:25:20 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-12 11:03:50 +0100
commit6f7cb2cb4ff407f0af696eb9ce23bd2290450ef9 (patch)
tree45cfd17c6883a18cb94cf79a8b9d8f9220b16111
parent0f2b5fc749a9954c41f05ca7391ffae705468af3 (diff)
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.
-rw-r--r--src/decoding.cpp2
-rw-r--r--src/rlc.cpp2
-rw-r--r--src/tbf.cpp2
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) */