A Discrete-Event Network Simulator
API
wifi-mac-queue-item.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2005, 2009 INRIA
4  * Copyright (c) 2009 MIRKO BANCHI
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20  * Mirko Banchi <mk.banchi@gmail.com>
21  * Stefano Avallone <stavallo@unina.it>
22  */
23 
24 #ifndef WIFI_MAC_QUEUE_ITEM_H
25 #define WIFI_MAC_QUEUE_ITEM_H
26 
27 #include "ns3/nstime.h"
28 #include "ns3/queue.h"
29 #include "wifi-mac-header.h"
30 
31 namespace ns3 {
32 
33 class QosBlockedDestinations;
34 
41 class WifiMacQueueItem : public SimpleRefCount<WifiMacQueueItem>
42 {
43 public:
50 
51  virtual ~WifiMacQueueItem ();
52 
57  Ptr<const Packet> GetPacket (void) const;
58 
63  const WifiMacHeader & GetHeader (void) const;
64 
70 
75  Time GetTimeStamp (void) const;
76 
82  uint32_t GetSize (void) const;
83 
84 private:
104 
108 };
109 
110 
111 // The following explicit template instantiation declaration prevents modules
112 // including this header file from implicitly instantiating Queue<WifiMacQueueItem>.
113 // This would cause python examples using wifi to crash at runtime with the
114 // following error message: "Trying to allocate twice the same uid:
115 // ns3::Queue<WifiMacQueueItem>"
116 extern template class Queue<WifiMacQueueItem>;
117 
118 
119 } //namespace ns3
120 
121 #endif /* WIFI_MAC_QUEUE_ITEM_H */
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
uint32_t GetSize(void) const
Return the size of the packet included in this item.
Time GetTimeStamp(void) const
Get the timestamp included in this item.
Introspection did not find any typical Config paths.
Mac48Address GetDestinationAddress(void) const
Return the destination address present in the header.
Ptr< const Packet > m_packet
The packet contained in this queue item.
WifiMacQueueItem stores (const) packets along with their Wifi MAC headers and the time when they were...
const WifiMacHeader & GetHeader(void) const
Get the header stored in this item.
Time m_tstamp
timestamp when the packet arrived at the queue
WifiMacQueueItem()
Default constructor.
WifiMacHeader m_header
Wifi MAC header associated with the packet.
Ptr< const Packet > GetPacket(void) const
Get the packet stored in this item.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
an EUI-48 address
Definition: mac48-address.h:43
WifiMacQueueItem & operator=(const WifiMacQueueItem &)
Assignment operator.
A template-based reference counting class.
Implements the IEEE 802.11 MAC header.