aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlc.cpp
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2013-12-28 13:59:24 +0100
committerDaniel Willmann <daniel@totalueberwachung.de>2014-01-15 15:23:21 +0100
commit7c3751b10bff1887e4981aa787c913aa4c812da2 (patch)
tree725302590546aa3ffb712200ef63863db3ecc209 /src/rlc.cpp
parentf4a1ec6ce7bd38b829309fe7e04ef3d534d24581 (diff)
rlc/tbf: Move v_n into gprs_rlc_ul_window and adapt the tests
v_n is part of the UL window handling so move it inside the ul_window
Diffstat (limited to 'src/rlc.cpp')
-rw-r--r--src/rlc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rlc.cpp b/src/rlc.cpp
index 0f481af..9094465 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -151,11 +151,11 @@ void gprs_rlc_v_n::reset()
}
/* Update the receive block bitmap */
-void gprs_rlc_ul_window::update_rbb(const gprs_rlc_v_n *v_n, char *rbb)
+void gprs_rlc_ul_window::update_rbb(char *rbb)
{
int i;
for (i=0; i < ws(); i++) {
- if (v_n->is_received(ssn()-1-i))
+ if (m_v_n.is_received(ssn()-1-i))
rbb[ws()-1-i] = 'R';
else
rbb[ws()-1-i] = 'I';
@@ -163,7 +163,7 @@ void gprs_rlc_ul_window::update_rbb(const gprs_rlc_v_n *v_n, char *rbb)
}
/* Raise V(R) to highest received sequence number not received. */
-void gprs_rlc_ul_window::raise_v_r(const uint16_t bsn, gprs_rlc_v_n *v_n)
+void gprs_rlc_ul_window::raise_v_r(const uint16_t bsn)
{
uint16_t offset_v_r;
offset_v_r = (bsn + 1 - v_r()) & mod_sns();
@@ -171,7 +171,7 @@ void gprs_rlc_ul_window::raise_v_r(const uint16_t bsn, gprs_rlc_v_n *v_n)
if (offset_v_r < (sns() >> 1)) {
while (offset_v_r--) {
if (offset_v_r) /* all except the received block */
- v_n->mark_missing(v_r());
+ m_v_n.mark_missing(v_r());
raise_v_r_to(1);
}
LOGP(DRLCMACUL, LOGL_DEBUG, "- Raising V(R) to %d\n", v_r());
@@ -182,12 +182,12 @@ void gprs_rlc_ul_window::raise_v_r(const uint16_t bsn, gprs_rlc_v_n *v_n)
* Raise V(Q) if possible. This is looped until there is a gap
* (non received block) or the window is empty.
*/
-uint16_t gprs_rlc_ul_window::raise_v_q(gprs_rlc_v_n *v_n)
+uint16_t gprs_rlc_ul_window::raise_v_q()
{
uint16_t count = 0;
while (v_q() != v_r()) {
- if (!v_n->is_received(v_q()))
+ if (!m_v_n.is_received(v_q()))
break;
LOGP(DRLCMACUL, LOGL_DEBUG, "- Taking block %d out, raising "
"V(Q) to %d\n", v_q(), (v_q() + 1) & mod_sns());