equal
deleted
inserted
replaced
272 Time now = Simulator::Now (); |
272 Time now = Simulator::Now (); |
273 m_queue.push_front (Item (packet, hdr, now)); |
273 m_queue.push_front (Item (packet, hdr, now)); |
274 m_size++; |
274 m_size++; |
275 } |
275 } |
276 |
276 |
|
277 uint32_t |
|
278 WifiMacQueue::GetNPacketsByTidAndAddress (uint8_t tid, WifiMacHeader::AddressType type, |
|
279 Mac48Address addr) |
|
280 { |
|
281 Cleanup (); |
|
282 uint32_t nPackets = 0; |
|
283 if (!m_queue.empty ()) |
|
284 { |
|
285 PacketQueueI it; |
|
286 NS_ASSERT (type <= 4); |
|
287 for (it = m_queue.begin (); it != m_queue.end (); it++) |
|
288 { |
|
289 if (GetAddressForPacket (type, it) == addr) |
|
290 { |
|
291 if (it->hdr.IsQosData () && it->hdr.GetQosTid () == tid) |
|
292 { |
|
293 nPackets++; |
|
294 } |
|
295 } |
|
296 } |
|
297 } |
|
298 return nPackets; |
|
299 } |
|
300 |
277 } // namespace ns3 |
301 } // namespace ns3 |