22 #include "ns3/uinteger.h"
23 #include "ns3/trace-source-accessor.h"
35 return Seconds (1000.0 / 300000000.0);
41 return MicroSeconds (9);
47 return MicroSeconds (16);
53 return MicroSeconds (2);
64 return MicroSeconds (44);
84 return MicroSeconds (250);
91 return MicroSeconds (76);
100 return blockAckTimeout;
109 return blockAckTimeout;
122 return MicroSeconds (0);
135 return MicroSeconds (0);
143 .AddAttribute (
"CtsTimeout",
"When this timeout expires, the RTS/CTS handshake has failed.",
148 .AddAttribute (
"AckTimeout",
"When this timeout expires, the DATA/ACK handshake has failed.",
153 .AddAttribute (
"BasicBlockAckTimeout",
"When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed.",
158 .AddAttribute (
"CompressedBlockAckTimeout",
"When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed.",
163 .AddAttribute (
"Sifs",
"The value of the SIFS constant.",
168 .AddAttribute (
"EifsNoDifs",
"The value of EIFS-DIFS",
173 .AddAttribute (
"Slot",
"The duration of a Slot.",
178 .AddAttribute (
"Pifs",
"The value of the PIFS constant.",
183 .AddAttribute (
"Rifs",
"The value of the RIFS constant.",
189 .AddAttribute (
"MaxPropagationDelay",
"The maximum propagation delay. Unused for now.",
193 .AddAttribute (
"Ssid",
"The ssid we want to belong to.",
198 .AddTraceSource (
"MacTx",
199 "A packet has been received from higher layers and is being processed in preparation for "
200 "queueing for transmission.",
202 .AddTraceSource (
"MacTxDrop",
203 "A packet has been dropped in the MAC layer before being queued for transmission.",
205 .AddTraceSource (
"MacPromiscRx",
206 "A packet has been received by this device, has been passed up from the physical layer "
207 "and is being forwarded up the local protocol stack. This is a promiscuous trace,",
209 .AddTraceSource (
"MacRx",
210 "A packet has been received by this device, has been passed up from the physical layer "
211 "and is being forwarded up the local protocol stack. This is a non-promiscuous trace,",
213 .AddTraceSource (
"MacRxDrop",
214 "A packet has been dropped in the MAC layer after it has been passed up from the physical "
219 .AddTraceSource (
"Sniffer",
220 "Trace source simulating a non-promiscuous packet sniffer attached to the device",
317 SetPifs (MicroSeconds (16 + 9));
328 SetPifs (MicroSeconds (10 + 20));
340 SetPifs (MicroSeconds (10 + 20));
351 SetPifs (MicroSeconds (32 + 13));
362 SetPifs (MicroSeconds (64 + 21));
391 dcf->SetMinCw ((cwmin + 1) / 4 - 1);
392 dcf->SetMaxCw ((cwmin + 1) / 2 - 1);
396 dcf->SetMinCw ((cwmin + 1) / 2 - 1);
397 dcf->SetMaxCw (cwmin);
401 dcf->SetMinCw (cwmin);
402 dcf->SetMaxCw (cwmax);
406 dcf->SetMinCw (cwmin);
407 dcf->SetMaxCw (cwmax);
411 dcf->SetMinCw (cwmin);
412 dcf->SetMaxCw (cwmax);
ERP-OFDM PHY (Clause 19, Section 19.5)
virtual void FinishConfigureStandard(enum WifiPhyStandard standard)=0
virtual Time GetPifs(void) const =0
virtual void SetBasicBlockAckTimeout(Time blockAckTimeout)
keep track of time values and allow control of global simulation resolution
OFDM PHY for the 5 GHz band (Clause 17 with 5 MHz channel bandwidth)
virtual Time GetRifs(void) const =0
void Configure80211b(void)
Configure appropriate timing parameters for 802.11b.
virtual void SetPifs(Time pifs)=0
virtual void SetCompressedBlockAckTimeout(Time blockAckTimeout)
virtual void SetAckTimeout(Time ackTimeout)=0
virtual Time GetCompressedBlockAckTimeout(void) const
static Time GetDefaultMaxPropagationDelay(void)
#define NS_ASSERT(condition)
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
void ConfigureStandard(enum WifiPhyStandard standard)
TracedCallback< Ptr< const Packet > > m_macRxDropTrace
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer ...
virtual Time GetAckTimeout(void) const =0
static Time GetDefaultCtsAckDelay(void)
TracedCallback< Ptr< const Packet > > m_macTxDropTrace
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer ...
OFDM PHY for the 5 GHz band (Clause 17 with 10 MHz channel bandwidth)
void NotifyRxDrop(Ptr< const Packet > packet)
TracedCallback< Ptr< const Packet > > m_macPromiscRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
static Time GetDefaultSifs(void)
virtual void SetSsid(Ssid ssid)=0
#define NS_FATAL_ERROR(msg)
fatal error handling
virtual Ssid GetSsid(void) const =0
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
hold objects of type ns3::Time
TracedCallback< Ptr< const Packet > > m_macTxTrace
The trace source fired when packets come into the "top" of the device at the L3/L2 transition...
void NotifyTxDrop(Ptr< const Packet > packet)
void ConfigureDcf(Ptr< Dcf > dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac)
virtual Time GetSlot(void) const =0
void NotifyPromiscRx(Ptr< const Packet > packet)
void Configure80211n_5Ghz(void)
Configure appropriate timing parameters for 802.11n operating at 5Ghz.
void Configure80211_10Mhz(void)
Configure appropriate timing parameters for 802.11 with 10Mhz channel spacing.
void NotifyTx(Ptr< const Packet > packet)
virtual void SetRifs(Time rifs)=0
This is intended to be the configuration used in this paper: Gavin Holland, Nitin Vaidya and Paramvir...
void Configure80211n_2_4Ghz(void)
Configure appropriate timing parameters for 802.11n operating at 2.4Ghz.
OFDM PHY for the 5 GHz band (Clause 17)
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
static Time GetDefaultSlot(void)
virtual void SetEifsNoDifs(Time eifsNoDifs)=0
void Configure80211g(void)
Configure appropriate timing parameters for 802.11g.
virtual void SetCtsTimeout(Time ctsTimeout)=0
The IEEE 802.11 SSID Information Element.
Time GetMaxPropagationDelay(void) const
void NotifyRx(Ptr< const Packet > packet)
static Time GetDefaultBasicBlockAckDelay(void)
Return the default basic block ACK delay.
static Time GetDefaultCompressedBlockAckDelay(void)
Return the default compressed block ACK delay.
TracedCallback< Ptr< const Packet > > m_macRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
void SetMaxPropagationDelay(Time delay)
void Configure80211a(void)
Configure appropriate timing parameters for 802.11a.
void Configure80211_5Mhz()
Configure appropriate timing parameters for 802.11 with 5Mhz channel spacing.
virtual void SetSifs(Time sifs)=0
hold objects of type ns3::Ssid
virtual Time GetSifs(void) const =0
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
static Time GetDefaultCompressedBlockAckTimeout(void)
Return the default compressed block ACK timeout.
static Time GetDefaultCtsAckTimeout(void)
Time m_maxPropagationDelay
a base class which provides memory management and object aggregation
static Time GetDefaultEifsNoDifs(void)
static Time GetDefaultRifs(void)
static Time GetDefaultBasicBlockAckTimeout(void)
Return the default basic block ACK timeout.
Time GetMsduLifetime(void) const
virtual Time GetCtsTimeout(void) const =0
a unique identifier for an interface.
static TypeId GetTypeId(void)
TypeId SetParent(TypeId tid)
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
virtual Time GetBasicBlockAckTimeout(void) const
virtual Time GetEifsNoDifs(void) const =0
virtual void SetSlot(Time slotTime)=0