aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlc.h
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.h
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.h')
-rw-r--r--src/rlc.h38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/rlc.h b/src/rlc.h
index 42b1ab03..42ec6edd 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -81,6 +81,21 @@ struct gprs_rlc_dl_window {
uint16_t m_v_a; /* ack state */
};
+struct gprs_rlc_v_n {
+ void reset();
+
+ void mark_received(int bsn);
+ void mark_missing(int bsn);
+
+ bool is_received(int bsn) const;
+
+ char state(int bsn) const;
+private:
+ bool is_state(int bsn, const char state) const;
+ void mark(int bsn, const char state);
+ char m_v_n[RLC_MAX_SNS/2]; /* receive state array */
+};
+
struct gprs_rlc_ul_window {
const uint16_t mod_sns() const;
const uint16_t sns() const;
@@ -93,15 +108,17 @@ struct gprs_rlc_ul_window {
bool is_in_window(uint8_t bsn) const;
- void update_rbb(const gprs_rlc_v_n *v_n, char *rbb);
+ void update_rbb(char *rbb);
void raise_v_r_to(int moves);
- void raise_v_r(const uint16_t bsn, gprs_rlc_v_n *v_n);
- uint16_t raise_v_q(gprs_rlc_v_n *v_n);
+ void raise_v_r(const uint16_t bsn);
+ uint16_t raise_v_q();
void raise_v_q(int);
uint16_t m_v_r; /* receive state */
uint16_t m_v_q; /* receive window state */
+
+ gprs_rlc_v_n m_v_n;
};
/**
@@ -141,21 +158,6 @@ private:
char m_v_b[RLC_MAX_SNS/2]; /* acknowledge state array */
};
-struct gprs_rlc_v_n {
- void reset();
-
- void mark_received(int bsn);
- void mark_missing(int bsn);
-
- bool is_received(int bsn) const;
-
- char state(int bsn) const;
-private:
- bool is_state(int bsn, const char state) const;
- void mark(int bsn, const char state);
- char m_v_n[RLC_MAX_SNS/2]; /* receive state array */
-};
-
extern "C" {
/* TS 04.60 10.2.2 */
struct rlc_ul_header {