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
diff --git a/src/rlc.cpp b/src/rlc.cpp
index bafc56e..227fa36 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -224,5 +224,12 @@
{
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;
}