A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
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 "
wifi-mac-header.h
"
29
30
namespace
ns3
{
31
32
class
QosBlockedDestinations;
33
class
Packet;
34
41
class
WifiMacQueueItem
:
public
SimpleRefCount
<WifiMacQueueItem>
42
{
43
public
:
49
WifiMacQueueItem
(
Ptr<const Packet>
p,
const
WifiMacHeader
& header);
50
57
WifiMacQueueItem
(
Ptr<const Packet>
p,
const
WifiMacHeader
& header,
Time
tstamp);
58
59
virtual
~WifiMacQueueItem
();
60
65
Ptr<const Packet>
GetPacket
(
void
)
const
;
66
71
const
WifiMacHeader
&
GetHeader
(
void
)
const
;
72
77
WifiMacHeader
&
GetHeader
(
void
);
78
83
Mac48Address
GetDestinationAddress
(
void
)
const
;
84
89
Time
GetTimeStamp
(
void
)
const
;
90
97
uint32_t
GetSize
(
void
)
const
;
98
103
virtual
void
Print
(std::ostream &os)
const
;
104
105
private
:
106
Ptr<const Packet>
m_packet
;
107
WifiMacHeader
m_header
;
108
Time
m_tstamp
;
109
};
110
118
std::ostream&
operator<<
(std::ostream& os,
const
WifiMacQueueItem
&item);
119
120
}
//namespace ns3
121
122
#endif
/* WIFI_MAC_QUEUE_ITEM_H */
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:102
ns3::Ptr< const Packet >
ns3::WifiMacQueueItem::Print
virtual void Print(std::ostream &os) const
Print the item contents.
Definition:
wifi-mac-queue-item.cc:87
ns3::WifiMacQueueItem::GetSize
uint32_t GetSize(void) const
Return the size of the packet stored by this item, including header size and trailer size...
Definition:
wifi-mac-queue-item.cc:81
ns3::WifiMacQueueItem::GetTimeStamp
Time GetTimeStamp(void) const
Get the timestamp included in this item.
Definition:
wifi-mac-queue-item.cc:75
ns3::WifiMacQueueItem::GetDestinationAddress
Mac48Address GetDestinationAddress(void) const
Return the destination address present in the header.
Definition:
wifi-mac-queue-item.cc:69
ns3::WifiMacQueueItem::m_packet
Ptr< const Packet > m_packet
The packet contained in this queue item.
Definition:
wifi-mac-queue-item.h:106
ns3::WifiMacQueueItem
WifiMacQueueItem stores (const) packets along with their Wifi MAC headers and the time when they were...
Definition:
wifi-mac-queue-item.h:41
ns3::WifiMacQueueItem::GetHeader
const WifiMacHeader & GetHeader(void) const
Get the header stored in this item.
Definition:
wifi-mac-queue-item.cc:57
ns3::WifiMacQueueItem::m_tstamp
Time m_tstamp
timestamp when the packet arrived at the queue
Definition:
wifi-mac-queue-item.h:108
wifi-mac-header.h
ns3::WifiMacQueueItem::m_header
WifiMacHeader m_header
Wifi MAC header associated with the packet.
Definition:
wifi-mac-queue-item.h:107
ns3::WifiMacQueueItem::~WifiMacQueueItem
virtual ~WifiMacQueueItem()
Definition:
wifi-mac-queue-item.cc:46
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition:
angles.cc:42
ns3::WifiMacQueueItem::GetPacket
Ptr< const Packet > GetPacket(void) const
Get the packet stored in this item.
Definition:
wifi-mac-queue-item.cc:51
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiMacQueueItem::WifiMacQueueItem
WifiMacQueueItem(Ptr< const Packet > p, const WifiMacHeader &header)
Create a Wifi MAC queue item containing a packet and a Wifi MAC header.
Definition:
wifi-mac-queue-item.cc:34
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:43
ns3::SimpleRefCount
A template-based reference counting class.
Definition:
simple-ref-count.h:73
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition:
wifi-mac-header.h:83
src
wifi
model
wifi-mac-queue-item.h
Generated on Wed Aug 21 2019 03:38:35 for ns-3 by
1.8.14