diff options
Diffstat (limited to 'src/rlc.h')
-rw-r--r-- | src/rlc.h | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -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]; +} |