63 void Enqueue (Ptr<const Packet> packet, WifiMacHeader const &hdr); |
63 void Enqueue (Ptr<const Packet> packet, WifiMacHeader const &hdr); |
64 Ptr<const Packet> Dequeue (WifiMacHeader *hdr); |
64 Ptr<const Packet> Dequeue (WifiMacHeader *hdr); |
65 Ptr<const Packet> Peek (WifiMacHeader *hdr); |
65 Ptr<const Packet> Peek (WifiMacHeader *hdr); |
66 /** |
66 /** |
67 * Searchs and returns, if is present in this queue, first packet having |
67 * Searchs and returns, if is present in this queue, first packet having |
68 * address indicated by <i>index</i> equals to <i>addr</i>, and tid |
68 * address indicated by <i>type</i> equals to <i>addr</i>, and tid |
69 * equals to <i>tid</i>. This method removes the packet from this queue. |
69 * equals to <i>tid</i>. This method removes the packet from this queue. |
70 * Is typically used by ns3::EdcaTxopN in order to perform correct MSDU |
70 * Is typically used by ns3::EdcaTxopN in order to perform correct MSDU |
71 * aggregation (A-MSDU). |
71 * aggregation (A-MSDU). |
72 */ |
72 */ |
73 Ptr<const Packet> DequeueByTidAndAddress (WifiMacHeader *hdr, |
73 Ptr<const Packet> DequeueByTidAndAddress (WifiMacHeader *hdr, |
74 uint8_t tid, |
74 uint8_t tid, |
75 WifiMacHeader::AddressType index, |
75 WifiMacHeader::AddressType type, |
76 Mac48Address addr); |
76 Mac48Address addr); |
77 /** |
77 /** |
78 * Searchs and returns, if is present in this queue, first packet having |
78 * Searchs and returns, if is present in this queue, first packet having |
79 * address indicated by <i>index</i> equals to <i>addr</i>, and tid |
79 * address indicated by <i>type</i> equals to <i>addr</i>, and tid |
80 * equals to <i>tid</i>. This method doesn't remove the packet from this queue. |
80 * equals to <i>tid</i>. This method doesn't remove the packet from this queue. |
81 * Is typically used by ns3::EdcaTxopN in order to perform correct MSDU |
81 * Is typically used by ns3::EdcaTxopN in order to perform correct MSDU |
82 * aggregation (A-MSDU). |
82 * aggregation (A-MSDU). |
83 */ |
83 */ |
84 Ptr<const Packet> PeekByTidAndAddress (WifiMacHeader *hdr, |
84 Ptr<const Packet> PeekByTidAndAddress (WifiMacHeader *hdr, |
85 uint8_t tid, |
85 uint8_t tid, |
86 WifiMacHeader::AddressType index, |
86 WifiMacHeader::AddressType type, |
87 Mac48Address addr); |
87 Mac48Address addr); |
88 /** |
88 /** |
89 * If exists, removes <i>packet</i> from queue and returns true. Otherwise it |
89 * If exists, removes <i>packet</i> from queue and returns true. Otherwise it |
90 * takes no effects and return false. Deletion of the packet is |
90 * takes no effects and return false. Deletion of the packet is |
91 * performed in linear time (O(n)). |
91 * performed in linear time (O(n)). |
103 typedef std::list<struct Item> PacketQueue; |
103 typedef std::list<struct Item> PacketQueue; |
104 typedef std::list<struct Item>::reverse_iterator PacketQueueRI; |
104 typedef std::list<struct Item>::reverse_iterator PacketQueueRI; |
105 typedef std::list<struct Item>::iterator PacketQueueI; |
105 typedef std::list<struct Item>::iterator PacketQueueI; |
106 |
106 |
107 void Cleanup (void); |
107 void Cleanup (void); |
108 Mac48Address GetAddressForPacket (uint8_t index, PacketQueueI); |
108 Mac48Address GetAddressForPacket (uint8_t type, PacketQueueI); |
109 |
109 |
110 struct Item { |
110 struct Item { |
111 Item (Ptr<const Packet> packet, |
111 Item (Ptr<const Packet> packet, |
112 WifiMacHeader const &hdr, |
112 WifiMacHeader const &hdr, |
113 Time tstamp); |
113 Time tstamp); |