aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlc.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-14 11:54:29 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-16 19:37:08 +0100
commit784a0bd0001e4e81167eda6e3bb4a2001d24d1f6 (patch)
treee6d706f5d17c8d3a96db89d8eddec13e953fc55d /src/rlc.cpp
parentd87e1d6ab747423d3668c74d16201a5d967accf0 (diff)
edge: Add is_received and invalidate_bsn to gprs_rlc_ul_window
These methods will be needed for EGPRS decoding. The is_received method returns true iff a block with the given BSN has already been received in the current window. A call to invalidate_bsn marks the block as not received. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/rlc.cpp')
-rw-r--r--src/rlc.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rlc.cpp b/src/rlc.cpp
index bafc56e7..227fa362 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -224,5 +224,12 @@ void gprs_rlc_ul_window::receive_bsn(const uint16_t bsn)
{
m_v_n.mark_received(bsn);
raise_v_r(bsn);
+}
+
+bool gprs_rlc_ul_window::invalidate_bsn(const uint16_t bsn)
+{
+ bool was_valid = m_v_n.is_received(bsn);
+ m_v_n.mark_missing(bsn);
+ return was_valid;
}