LteRlcAm: trigger a STATUS report when T_reordering expires

This commit is contained in:
Nicola Baldo
2013-11-22 20:33:30 +01:00
parent b6565284f7
commit 3d75fe5639
3 changed files with 27 additions and 7 deletions

View File

@@ -76,6 +76,8 @@ LteRlcAm::LteRlcAm ()
// Timers
m_pollRetransmitTimerValue = MilliSeconds (100);
m_reorderingTimerValue = MilliSeconds (20);
m_statusProhibitTimerValue = MilliSeconds (20);
}
LteRlcAm::~LteRlcAm ()
@@ -247,6 +249,8 @@ LteRlcAm::DoNotifyTxOpportunity (uint32_t bytes, uint8_t layer, uint8_t harqId)
m_statusPduRequested = false;
m_statusPduBufferSize = 0;
m_statusProhibitTimer = Simulator::Schedule (m_statusProhibitTimerValue,
&LteRlcAm::ExpireStatusProhibitTimer, this);
return;
}
else if ( m_retxBufferSize > 0 )
@@ -293,7 +297,7 @@ LteRlcAm::DoNotifyTxOpportunity (uint32_t bytes, uint8_t layer, uint8_t harqId)
NS_LOG_LOGIC ("Sending data from Transmission Buffer");
}
else if ( m_txedBufferSize > 0 )
/* else if ( m_txedBufferSize > 0 )
{
NS_LOG_LOGIC ("Sending data from Transmitted Buffer");
@@ -335,7 +339,7 @@ LteRlcAm::DoNotifyTxOpportunity (uint32_t bytes, uint8_t layer, uint8_t harqId)
NS_LOG_LOGIC ("Waiting for bigger TxOpportunity");
return;
}
}
}*/
else
{
NS_LOG_LOGIC ("No data pending");
@@ -905,7 +909,7 @@ LteRlcAm::DoReceivePdu (Ptr<Packet> p)
if ( m_vrH > m_vrR )
{
NS_LOG_LOGIC ("Start reordering timer");
m_reorderingTimer = Simulator::Schedule (Time ("0.1s"),
m_reorderingTimer = Simulator::Schedule (m_reorderingTimerValue,
&LteRlcAm::ExpireReorderingTimer ,this);
m_vrX = m_vrH;
NS_LOG_LOGIC ("New VR(X) = " << m_vrX);
@@ -997,7 +1001,7 @@ LteRlcAm::DoReceivePdu (Ptr<Packet> p)
// {
// NS_LOG_LOGIC ("VR(UX) > VR(UR). " << m_vrUx << " > " << m_vrUr);
// NS_LOG_LOGIC ("Start reordering timer");
// m_reorderingTimer = Simulator::Schedule (Time ("1.0s"),
// m_reorderingTimer = Simulator::Schedule (m_reorderingTimerValue),
// &LteRlcAm::ExpireReorderingTimer ,this);
// m_vrUx = m_vrUh;
// NS_LOG_LOGIC ("New VR(UX) = " << m_vrUx);
@@ -1699,11 +1703,16 @@ LteRlcAm::ExpireReorderingTimer (void)
if ( m_vrH > m_vrMs )
{
NS_LOG_LOGIC ("Start reordering timer");
m_reorderingTimer = Simulator::Schedule (Time ("0.1s"),
m_reorderingTimer = Simulator::Schedule (m_reorderingTimerValue,
&LteRlcAm::ExpireReorderingTimer ,this);
m_vrX = m_vrH;
NS_LOG_LOGIC ("New VR(MS) = " << m_vrMs);
}
// Section 5.2.3 Status Reporting:
// - The receiving side of an AM RLC entity shall trigger a
// STATUS report when T_reordering expires.
m_statusPduRequested = true;
}
void
@@ -1721,5 +1730,10 @@ LteRlcAm::ExpirePollRetransmitTimer (void)
}
void
LteRlcAm::ExpireStatusProhibitTimer (void)
{
NS_LOG_FUNCTION (this);
}
} // namespace ns3

View File

@@ -62,6 +62,12 @@ private:
void ExpireReorderingTimer (void);
void ExpirePollRetransmitTimer (void);
/**
* method called when the T_status_prohibit timer expires
*
*/
void ExpireStatusProhibitTimer (void);
bool IsInsideReceivingWindow (SequenceNumber10 seqNumber);
//
// void ReassembleOutsideWindow (void);
@@ -142,7 +148,9 @@ private:
EventId m_pollRetransmitTimer;
Time m_pollRetransmitTimerValue;
EventId m_reorderingTimer;
Time m_reorderingTimerValue;
EventId m_statusProhibitTimer;
Time m_statusProhibitTimerValue;
/**
* Configurable parameters. See section 7.4 in TS 36.322

View File

@@ -55,8 +55,6 @@ LteRlcAmE2eTestSuite::LteRlcAmE2eTestSuite ()
{
// NS_LOG_INFO ("Creating LteRlcAmE2eTestSuite");
AddTestCase (new LteRlcAmE2eTestCase ("the one that fails", 6666, 0.25), TestCase::QUICK);
double losses[] = {0.0, 0.10, 0.25, 0.50, 0.75, 0.90, 0.95};
uint32_t runs[] = {1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 10101};