22 #include "ns3/packet.h" 37 return Seconds (1000.0 / 300000000.0);
110 return blockAckTimeout;
120 return blockAckTimeout;
128 .SetGroupName (
"Wifi")
129 .AddAttribute (
"CtsTimeout",
"When this timeout expires, the RTS/CTS handshake has failed.",
134 .AddAttribute (
"AckTimeout",
"When this timeout expires, the DATA/ACK handshake has failed.",
139 .AddAttribute (
"BasicBlockAckTimeout",
"When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed.",
144 .AddAttribute (
"CompressedBlockAckTimeout",
"When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed.",
149 .AddAttribute (
"Sifs",
"The value of the SIFS constant.",
154 .AddAttribute (
"EifsNoDifs",
"The value of EIFS-DIFS.",
159 .AddAttribute (
"Slot",
"The duration of a Slot.",
164 .AddAttribute (
"Pifs",
"The value of the PIFS constant.",
169 .AddAttribute (
"Rifs",
"The value of the RIFS constant.",
174 .AddAttribute (
"MaxPropagationDelay",
"The maximum propagation delay. Unused for now.",
178 .AddAttribute (
"Ssid",
"The ssid we want to belong to.",
183 .AddTraceSource (
"MacTx",
184 "A packet has been received from higher layers and is being processed in preparation for " 185 "queueing for transmission.",
187 "ns3::Packet::TracedCallback")
188 .AddTraceSource (
"MacTxDrop",
189 "A packet has been dropped in the MAC layer before transmission.",
191 "ns3::Packet::TracedCallback")
192 .AddTraceSource (
"MacPromiscRx",
193 "A packet has been received by this device, has been passed up from the physical layer " 194 "and is being forwarded up the local protocol stack. This is a promiscuous trace.",
196 "ns3::Packet::TracedCallback")
197 .AddTraceSource (
"MacRx",
198 "A packet has been received by this device, has been passed up from the physical layer " 199 "and is being forwarded up the local protocol stack. This is a non-promiscuous trace.",
201 "ns3::Packet::TracedCallback")
202 .AddTraceSource (
"MacRxDrop",
203 "A packet has been dropped in the MAC layer after it has been passed up from the physical layer.",
205 "ns3::Packet::TracedCallback")
406 dcf->
SetMinCw ((cwmin + 1) / 4 - 1);
407 dcf->
SetMaxCw ((cwmin + 1) / 2 - 1);
419 dcf->
SetMinCw ((cwmin + 1) / 2 - 1);
ERP-OFDM PHY (Clause 19, Section 19.5)
virtual Time GetPifs(void) const =0
Simulation virtual time values and global simulation resolution.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
OFDM PHY for the 5 GHz band (Clause 17 with 5 MHz channel bandwidth)
virtual Time GetRifs(void) const =0
virtual void SetCompressedBlockAckTimeout(Time blockAckTimeout)=0
void Configure80211b(void)
This method sets 802.11b standards-compliant defaults for following attributes: Sifs, Slot, EifsNoDifs, Pifs, CtsTimeout, and AckTimeout.
HT PHY for the 5 GHz band (clause 20)
virtual void SetPifs(Time pifs)=0
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
virtual void FinishConfigureStandard(WifiPhyStandard standard)=0
virtual void SetAckTimeout(Time ackTimeout)=0
static Time GetDefaultMaxPropagationDelay(void)
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 ...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
HE PHY for the 2.4 GHz band (clause 26)
virtual Time GetAckTimeout(void) const =0
static Time GetDefaultCtsAckDelay(void)
void Configure80211ac(void)
This method sets 802.11ac standards-compliant defaults for following attributes: Sifs, Slot, EifsNoDifs, Pifs, CtsTimeout, and AckTimeout.
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 ConfigureStandard(WifiPhyStandard standard)
void NotifyRxDrop(Ptr< const Packet > packet)
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
virtual Time GetBasicBlockAckTimeout(void) const =0
TracedCallback< Ptr< const Packet > > m_macPromiscRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
HT PHY for the 2.4 GHz band (clause 20)
static Time GetDefaultSifs(void)
void ConfigureDcf(Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, bool isDsss, AcIndex ac)
virtual void SetSsid(Ssid ssid)=0
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
void Configure80211ax_5Ghz(void)
This method sets 802.11ax 5 GHz standards-compliant defaults for following attributes: Sifs...
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.
HE PHY for the 5 GHz band (clause 26)
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)
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...
virtual void SetBasicBlockAckTimeout(Time blockAckTimeout)=0
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.
virtual Time GetCompressedBlockAckTimeout(void) const =0
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 SetMinCw(uint32_t minCw)
Set the minimum contention window size.
void SetMaxPropagationDelay(Time delay)
void SetMaxCw(uint32_t maxCw)
Set the maximum contention window size.
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 SetTxopLimit(Time txopLimit)
Set the TXOP limit.
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)
void SetAifsn(uint8_t aifsn)
Set the number of slots that make up an AIFS.
Time m_maxPropagationDelay
maximum propagation delay
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.
virtual Time GetCtsTimeout(void) const =0
void Configure80211ax_2_4Ghz(void)
This method sets 802.11ax 2.4 GHz standards-compliant defaults for following attributes: Sifs...
a unique identifier for an interface.
static TypeId GetTypeId(void)
Get the type ID.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
virtual Time GetEifsNoDifs(void) const =0
virtual void SetSlot(Time slotTime)=0