fix Bug 836: Delay is incremented over time with BsUplinkSchedulerSimple and BsUplinkSchedulerRtps
This commit is contained in:
@@ -182,6 +182,7 @@ BandwidthManager::ProcessBandwidthRequest (const BandwidthRequestHeader &bwReque
|
||||
else
|
||||
{
|
||||
serviceFlow->GetRecord ()->SetRequestedBandwidth (bwRequestHdr.GetBr ());
|
||||
bs->GetUplinkScheduler()->OnSetRequestedBandwidth(serviceFlow->GetRecord());
|
||||
}
|
||||
bs->GetUplinkScheduler ()->ProcessBandwidthRequest (bwRequestHdr);
|
||||
// update backlogged
|
||||
|
||||
@@ -576,8 +576,9 @@ UplinkSchedulerSimple::ProcessBandwidthRequest (const BandwidthRequestHeader &bw
|
||||
void
|
||||
UplinkSchedulerSimple::OnSetRequestedBandwidth (ServiceFlowRecord *sfr)
|
||||
{
|
||||
// virtual function on UplinkScheduler
|
||||
// this is not necessary on this implementation
|
||||
// m_grantedBandwidth must be reset to zero
|
||||
uint32_t grantedBandwidth = 0;
|
||||
sfr->SetGrantedBandwidth (grantedBandwidth);
|
||||
}
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
@@ -251,6 +251,7 @@ ServiceFlow::GetRecord (void) const
|
||||
Ptr<WimaxMacQueue>
|
||||
ServiceFlow::GetQueue (void) const
|
||||
{
|
||||
if (!m_connection) return 0;
|
||||
return m_connection->GetQueue ();
|
||||
}
|
||||
|
||||
@@ -263,12 +264,14 @@ ServiceFlow::GetSchedulingType (void) const
|
||||
bool
|
||||
ServiceFlow::HasPackets (void) const
|
||||
{
|
||||
if (!m_connection) return false;
|
||||
return m_connection->HasPackets ();
|
||||
}
|
||||
|
||||
bool
|
||||
ServiceFlow::HasPackets (MacHeaderType::HeaderType packetType) const
|
||||
{
|
||||
if (!m_connection) return false;
|
||||
return m_connection->HasPackets (packetType);
|
||||
}
|
||||
|
||||
@@ -279,19 +282,20 @@ ServiceFlow::CleanUpQueue (void)
|
||||
Time timeStamp;
|
||||
Ptr<Packet> packet;
|
||||
Time currentTime = Simulator::Now ();
|
||||
if (m_connection){
|
||||
while (m_connection->HasPackets ())
|
||||
{
|
||||
packet = m_connection->GetQueue ()->Peek (hdr, timeStamp);
|
||||
|
||||
while (m_connection->HasPackets ())
|
||||
{
|
||||
packet = m_connection->GetQueue ()->Peek (hdr, timeStamp);
|
||||
|
||||
if (currentTime - timeStamp > MilliSeconds (GetMaximumLatency ()))
|
||||
{
|
||||
m_connection->Dequeue ();
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (currentTime - timeStamp > MilliSeconds (GetMaximumLatency ()))
|
||||
{
|
||||
m_connection->Dequeue ();
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user