@@ -251,7 +251,7 @@ void rlc_am_lte_tx::get_buffer_state_nolock(uint32_t& n_bytes_newtx, uint32_t& n
251251 }
252252
253253 // Bytes needed for tx SDUs
254- if (tx_window. size () < 1024 ) {
254+ if (not window_full () ) {
255255 n_sdus = tx_sdu_queue.get_n_sdus ();
256256 n_bytes_newtx += tx_sdu_queue.size_bytes ();
257257 if (tx_sdu != NULL ) {
@@ -299,7 +299,7 @@ uint32_t rlc_am_lte_tx::read_pdu(uint8_t* payload, uint32_t nof_bytes)
299299 }
300300
301301 // Section 5.2.2.3 in TS 36.311, if tx_window is full and retx_queue empty, retransmit PDU
302- if (tx_window. size () >= RLC_AM_WINDOW_SIZE && retx_queue.empty ()) {
302+ if (window_full () && retx_queue.empty ()) {
303303 retransmit_pdu (vt_a);
304304 }
305305
@@ -323,7 +323,7 @@ void rlc_am_lte_tx::timer_expired(uint32_t timeout_id)
323323 // Section 5.2.2.3 in TS 36.322, schedule PDU for retransmission if
324324 // (a) both tx and retx buffer are empty (excluding tx'ed PDU waiting for ack), or
325325 // (b) no new data PDU can be transmitted (tx window is full)
326- if ((retx_queue.empty () && tx_sdu_queue.size () == 0 ) || tx_window. size () >= RLC_AM_WINDOW_SIZE ) {
326+ if ((retx_queue.empty () && tx_sdu_queue.size () == 0 ) || window_full () ) {
327327 retransmit_pdu (vt_a); // TODO: TS says to send vt_s - 1 here
328328 }
329329 } else if (status_prohibit_timer.is_valid () && status_prohibit_timer.id () == timeout_id) {
@@ -368,6 +368,11 @@ void rlc_am_lte_tx::retransmit_pdu(uint32_t sn)
368368 * Helper functions
369369 ***************************************************************************/
370370
371+ bool rlc_am_lte_tx::window_full ()
372+ {
373+ return TX_MOD_BASE (vt_s) >= RLC_AM_WINDOW_SIZE;
374+ };
375+
371376/* *
372377 * Called when building a RLC PDU for checking whether the poll bit needs
373378 * to be set.
@@ -394,7 +399,7 @@ bool rlc_am_lte_tx::poll_required()
394399 return true ;
395400 }
396401
397- if (tx_window. size () >= RLC_AM_WINDOW_SIZE ) {
402+ if (window_full () ) {
398403 RlcDebug (" Poll required. Cause: TX window full." );
399404 return true ;
400405 }
@@ -699,7 +704,7 @@ int rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_bytes)
699704 }
700705
701706 // do not build any more PDU if window is already full
702- if (tx_window. size () >= RLC_AM_WINDOW_SIZE ) {
707+ if (window_full () ) {
703708 RlcInfo (" Cannot build data PDU - Tx window full." );
704709 return 0 ;
705710 }
@@ -1165,7 +1170,8 @@ rlc_am_lte_rx::rlc_am_lte_rx(rlc_am* parent_) :
11651170 pool(byte_buffer_pool::get_instance()),
11661171 reordering_timer(parent_->timers->get_unique_timer ()),
11671172 rlc_am_base_rx(parent_, parent_->logger)
1168- {}
1173+ {
1174+ }
11691175
11701176bool rlc_am_lte_rx::configure (const rlc_config_t & cfg_)
11711177{
0 commit comments