TBF-UL: add simpler test helper

Add function to set both V_R and V_Q values to 0 which is useful for TBF
test.
Related: OS#1759
Change-Id: I719abfbd5b88c694cbbd69d5c4dcb42baaca91b2
This commit is contained in:
Max 2017-12-15 11:08:58 +01:00
parent 58818585bc
commit 2617bf2016
2 changed files with 9 additions and 4 deletions

View File

@ -342,6 +342,7 @@ struct gprs_rlc_ul_window: public gprs_rlc_window {
const void set_v_r(int);
const void set_v_q(int);
void reset_state();
const uint16_t ssn() const;
@ -573,6 +574,12 @@ inline bool gprs_rlc_ul_window::is_received(uint16_t bsn) const
return is_in_window(bsn) && m_v_n.is_received(bsn) && offset_v_r < ws();
}
inline void gprs_rlc_ul_window::reset_state()
{
m_v_r = 0;
m_v_q = 0;
}
inline const void gprs_rlc_ul_window::set_v_r(int v_r)
{
m_v_r = v_r;

View File

@ -1722,8 +1722,7 @@ static void test_tbf_egprs_two_phase_puan(void)
"Got MS: TLLI = 0x%08x, TA = %d\n", ms->tlli(), ms->ta());
send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data));
ul_tbf->m_window.set_v_r(0);
ul_tbf->m_window.set_v_q(0);
ul_tbf->m_window.reset_state();
/* Function to generate URBB with length */
ul_tbf = establish_ul_tbf_two_phase_puan_URBB_with_length(&the_bts, ts_no, tlli, &fn,
qta, ms_class, egprs_ms_class, ul_tbf);
@ -1735,8 +1734,7 @@ static void test_tbf_egprs_two_phase_puan(void)
send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data));
ul_tbf->m_window.set_v_r(0);
ul_tbf->m_window.set_v_q(0);
ul_tbf->m_window.reset_state();
/* Function to generate CRBB */
bts->ws_base = 128;
bts->ws_pdch = 64;