aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rlc.h')
-rw-r--r--src/rlc.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/rlc.h b/src/rlc.h
index e08a5d70..d9e0e6cc 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -129,6 +129,16 @@ private:
char m_v_b[RLC_MAX_SNS/2]; /* acknowledge state array */
};
+struct gprs_rlc_v_n {
+ void mark_received(int index);
+ void mark_missing(int index);
+
+ bool is_received(int index) const;
+
+ char state(int index) const;
+private:
+ char m_v_n[RLC_MAX_SNS/2]; /* receive state array */
+};
extern "C" {
/* TS 04.60 10.2.2 */
@@ -329,3 +339,23 @@ inline void gprs_rlc_ul_window::increment_q(int incr)
{
m_v_q = (m_v_q + incr) & mod_sns();
}
+
+inline void gprs_rlc_v_n::mark_received(int index)
+{
+ m_v_n[index] = 'R';
+}
+
+inline void gprs_rlc_v_n::mark_missing(int index)
+{
+ m_v_n[index] = 'N';
+}
+
+inline bool gprs_rlc_v_n::is_received(int index) const
+{
+ return m_v_n[index] == 'R';
+}
+
+inline char gprs_rlc_v_n::state(int index) const
+{
+ return m_v_n[index];
+}