22 #include "ns3/uinteger.h"
23 #include "ns3/trace-source-accessor.h"
34 return Seconds (1000.0 / 300000000.0);
99 return blockAckTimeout;
108 return blockAckTimeout;
142 .SetGroupName (
"Wifi")
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 "ns3::Packet::TracedCallback")
203 .AddTraceSource (
"MacTxDrop",
204 "A packet has been dropped in the MAC layer before being queued for transmission.",
206 "ns3::Packet::TracedCallback")
207 .AddTraceSource (
"MacPromiscRx",
208 "A packet has been received by this device, has been passed up from the physical layer "
209 "and is being forwarded up the local protocol stack. This is a promiscuous trace,",
211 "ns3::Packet::TracedCallback")
212 .AddTraceSource (
"MacRx",
213 "A packet has been received by this device, has been passed up from the physical layer "
214 "and is being forwarded up the local protocol stack. This is a non-promiscuous trace,",
216 "ns3::Packet::TracedCallback")
217 .AddTraceSource (
"MacRxDrop",
218 "A packet has been dropped in the MAC layer after it has been passed up from the physical "
221 "ns3::Packet::TracedCallback")
224 .AddTraceSource (
"Sniffer",
225 "Trace source simulating a non-promiscuous packet sniffer attached to the device",
396 dcf->SetMinCw ((cwmin + 1) / 4 - 1);
397 dcf->SetMaxCw ((cwmin + 1) / 2 - 1);
401 dcf->SetMinCw ((cwmin + 1) / 2 - 1);
402 dcf->SetMaxCw (cwmin);
406 dcf->SetMinCw (cwmin);
407 dcf->SetMaxCw (cwmax);
411 dcf->SetMinCw (cwmin);
412 dcf->SetMaxCw (cwmax);
416 dcf->SetMinCw (cwmin);
417 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)
Simulation virtual time values and 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)
This method sets 802.11b standards-compliant defaults for following attributes: Sifs, Slot, EifsNoDifs, Pifs, CtsTimeout, and AckTimeout.
virtual void SetPifs(Time pifs)=0
virtual void SetCompressedBlockAckTimeout(Time blockAckTimeout)
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
virtual void SetAckTimeout(Time ackTimeout)=0
virtual Time GetCompressedBlockAckTimeout(void) const
static Time GetDefaultMaxPropagationDelay(void)
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
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)
#define NS_FATAL_ERROR(msg)
Fatal error handling.
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
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
virtual Ssid GetSsid(void) const =0
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
AttributeValue implementation for 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)
This method sets 802.11n 5 GHz standards-compliant defaults for following attributes: Sifs...
void Configure80211_10Mhz(void)
This method sets 802.11 with 10Mhz channel spacing standards-compliant defaults for following attribu...
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)
This method sets 802.11n 2.4 GHz standards-compliant defaults for following attributes: Sifs...
OFDM PHY for the 5 GHz band (Clause 17)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
static Time GetDefaultSlot(void)
Ptr< const AttributeAccessor > MakeSsidAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual void SetEifsNoDifs(Time eifsNoDifs)=0
void Configure80211g(void)
This method sets 802.11g standards-compliant defaults for following attributes: Sifs, Slot, EifsNoDifs, Pifs, CtsTimeout, and AckTimeout.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
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)
This method sets 802.11a standards-compliant defaults for following attributes: Sifs, Slot, EifsNoDifs, Pifs, CtsTimeout, and AckTimeout.
Ptr< const AttributeChecker > MakeSsidChecker(void)
void Configure80211_5Mhz()
This method sets 802.11 with 5Mhz channel spacing standards-compliant defaults for following attribut...
virtual void SetSifs(Time sifs)=0
Time Seconds(double value)
Construct a Time in the indicated unit.
AttributeValue implementation for Ssid.
virtual Time GetSifs(void) const =0
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
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