|
Lines 274-280
Ptr<const WifiMacQueueItem>
|
Link Here
|
|---|
|
| 274 |
WifiMacQueue::Peek (void) const |
274 |
WifiMacQueue::Peek (void) const |
| 275 |
{ |
275 |
{ |
| 276 |
NS_LOG_FUNCTION (this); |
276 |
NS_LOG_FUNCTION (this); |
| 277 |
return DoPeek (Head ()); |
277 |
|
|
|
278 |
for (auto it = Head (); it != Tail (); it++) |
| 279 |
{ |
| 280 |
// skip packets that stayed in the queue for too long. They will be |
| 281 |
// actually removed from the queue by the next call to a non-const method |
| 282 |
if (Simulator::Now () <= (*it)->GetTimeStamp () + m_maxDelay) |
| 283 |
{ |
| 284 |
return DoPeek (it); |
| 285 |
} |
| 286 |
} |
| 287 |
NS_LOG_DEBUG ("The queue is empty"); |
| 288 |
return 0; |
| 278 |
} |
289 |
} |
| 279 |
|
290 |
|
| 280 |
template<> |
291 |
template<> |