23 #include "ns3/pointer.h"
50 m_low = CreateObject<MacLow> ();
56 m_dca = CreateObject<DcaTxop> ();
57 m_dca->SetLow (m_low);
84 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
86 i->second->Initialize ();
107 for (EdcaQueues::iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
109 i->second->Dispose ();
127 m_dca->SetWifiRemoteStationManager (stationManager);
129 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
131 i->second->SetWifiRemoteStationManager (stationManager);
163 NS_ASSERT (maxAmpduLengthExponent >= 0 && maxAmpduLengthExponent <= 255);
164 capabilities.
SetMaxAmpduLength (std::max<uint8_t> (3, static_cast<uint8_t> (maxAmpduLengthExponent)));
165 uint64_t maxSupportedRate = 0;
177 if (dataRate > maxSupportedRate)
179 maxSupportedRate = dataRate;
180 NS_LOG_DEBUG (
"Updating maxSupportedRate to " << maxSupportedRate);
207 capabilities.
SetMaxMpduLength (uint8_t (maxMpduLength > 3895) + uint8_t (maxMpduLength > 7991));
216 NS_ASSERT (maxAmpduLengthExponent >= 0 && maxAmpduLengthExponent <= 255);
237 uint64_t maxSupportedRateLGI = 0;
248 NS_LOG_DEBUG (
"Updating maxSupportedRateLGI to " << maxSupportedRateLGI);
264 uint8_t channelWidthSet = 0;
267 channelWidthSet |= 0x01;
271 channelWidthSet |= 0x02;
275 channelWidthSet |= 0x04;
294 NS_ASSERT (maxAmpduLengthExponent >= 0 && maxAmpduLengthExponent <= 255);
448 edca->SetAccessCategory (ac);
449 edca->CompleteConfig ();
451 m_edca.insert (std::make_pair (ac, edca));
458 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
460 i->second->SetTypeOfStation (type);
870 <<
") does not support Enqueue() with from address");
944 m_edca[ac]->GotAddBaResponse (&respHdr, from);
967 m_edca[ac]->GotDelBaFrame (&delBaHdr, from);
973 NS_FATAL_ERROR (
"Unsupported Action field in Block Ack Action frame");
992 i != packets.end (); ++i)
994 ForwardUp ((*i).first, (*i).second.GetSourceAddr (),
995 (*i).second.GetDestinationAddr ());
1062 .SetGroupName (
"Wifi")
1063 .AddAttribute (
"QosSupported",
1064 "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA.",
1069 .AddAttribute (
"HtSupported",
1070 "This Boolean attribute is set to enable 802.11n support at this STA.",
1075 .AddAttribute (
"VhtSupported",
1076 "This Boolean attribute is set to enable 802.11ac support at this STA.",
1081 .AddAttribute (
"HeSupported",
1082 "This Boolean attribute is set to enable 802.11ax support at this STA.",
1087 .AddAttribute (
"CtsToSelfSupported",
1088 "Use CTS to Self when using a rate that is not in the basic rate set.",
1093 .AddAttribute (
"VO_MaxAmsduSize",
1094 "Maximum length in bytes of an A-MSDU for AC_VO access class. "
1095 "Value 0 means A-MSDU is disabled for that AC.",
1098 MakeUintegerChecker<uint32_t> (0, 11426))
1099 .AddAttribute (
"VI_MaxAmsduSize",
1100 "Maximum length in bytes of an A-MSDU for AC_VI access class."
1101 "Value 0 means A-MSDU is disabled for that AC.",
1104 MakeUintegerChecker<uint32_t> (0, 11426))
1105 .AddAttribute (
"BE_MaxAmsduSize",
1106 "Maximum length in bytes of an A-MSDU for AC_BE access class."
1107 "Value 0 means A-MSDU is disabled for that AC.",
1110 MakeUintegerChecker<uint32_t> (0, 11426))
1111 .AddAttribute (
"BK_MaxAmsduSize",
1112 "Maximum length in bytes of an A-MSDU for AC_BK access class."
1113 "Value 0 means A-MSDU is disabled for that AC.",
1116 MakeUintegerChecker<uint32_t> (0, 11426))
1117 .AddAttribute (
"VO_MaxAmpduSize",
1118 "Maximum length in bytes of an A-MPDU for AC_VO access class."
1119 "Value 0 means A-MPDU is disabled for that AC.",
1122 MakeUintegerChecker<uint32_t> (0, 65535))
1123 .AddAttribute (
"VI_MaxAmpduSize",
1124 "Maximum length in bytes of an A-MPDU for AC_VI access class."
1125 "Value 0 means A-MPDU is disabled for that AC.",
1128 MakeUintegerChecker<uint32_t> (0, 65535))
1129 .AddAttribute (
"BE_MaxAmpduSize",
1130 "Maximum length in bytes of an A-MPDU for AC_BE access class."
1131 "Value 0 means A-MPDU is disabled for that AC.",
1134 MakeUintegerChecker<uint32_t> (0, 65535))
1135 .AddAttribute (
"BK_MaxAmpduSize",
1136 "Maximum length in bytes of an A-MPDU for AC_BK access class."
1137 "Value 0 means A-MPDU is disabled for that AC.",
1140 MakeUintegerChecker<uint32_t> (0, 65535))
1141 .AddAttribute (
"VO_BlockAckThreshold",
1142 "If number of packets in VO queue reaches this value, "
1143 "block ack mechanism is used. If this value is 0, block ack is never used."
1144 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1147 MakeUintegerChecker<uint8_t> (0, 64))
1148 .AddAttribute (
"VI_BlockAckThreshold",
1149 "If number of packets in VI queue reaches this value, "
1150 "block ack mechanism is used. If this value is 0, block ack is never used."
1151 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1154 MakeUintegerChecker<uint8_t> (0, 64))
1155 .AddAttribute (
"BE_BlockAckThreshold",
1156 "If number of packets in BE queue reaches this value, "
1157 "block ack mechanism is used. If this value is 0, block ack is never used."
1158 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1161 MakeUintegerChecker<uint8_t> (0, 64))
1162 .AddAttribute (
"BK_BlockAckThreshold",
1163 "If number of packets in BK queue reaches this value, "
1164 "block ack mechanism is used. If this value is 0, block ack is never used."
1165 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1168 MakeUintegerChecker<uint8_t> (0, 64))
1169 .AddAttribute (
"VO_BlockAckInactivityTimeout",
1170 "Represents max time (blocks of 1024 micro seconds) allowed for block ack"
1171 "inactivity for AC_VO. If this value isn't equal to 0 a timer start after that a"
1172 "block ack setup is completed and will be reset every time that a block ack"
1173 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1176 MakeUintegerChecker<uint16_t> ())
1177 .AddAttribute (
"VI_BlockAckInactivityTimeout",
1178 "Represents max time (blocks of 1024 micro seconds) allowed for block ack"
1179 "inactivity for AC_VI. If this value isn't equal to 0 a timer start after that a"
1180 "block ack setup is completed and will be reset every time that a block ack"
1181 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1184 MakeUintegerChecker<uint16_t> ())
1185 .AddAttribute (
"BE_BlockAckInactivityTimeout",
1186 "Represents max time (blocks of 1024 micro seconds) allowed for block ack"
1187 "inactivity for AC_BE. If this value isn't equal to 0 a timer start after that a"
1188 "block ack setup is completed and will be reset every time that a block ack"
1189 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1192 MakeUintegerChecker<uint16_t> ())
1193 .AddAttribute (
"BK_BlockAckInactivityTimeout",
1194 "Represents max time (blocks of 1024 micro seconds) allowed for block ack"
1195 "inactivity for AC_BK. If this value isn't equal to 0 a timer start after that a"
1196 "block ack setup is completed and will be reset every time that a block ack"
1197 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1200 MakeUintegerChecker<uint16_t> ())
1201 .AddAttribute (
"ShortSlotTimeSupported",
1202 "Whether or not short slot time is supported (only used by ERP APs or STAs).",
1207 .AddAttribute (
"RifsSupported",
1208 "Whether or not RIFS is supported (only used by HT APs or STAs).",
1213 .AddAttribute (
"DcaTxop",
1214 "The DcaTxop object.",
1217 MakePointerChecker<DcaTxop> ())
1218 .AddAttribute (
"VO_EdcaTxopN",
1219 "Queue that manages packets belonging to AC_VO access class.",
1222 MakePointerChecker<EdcaTxopN> ())
1223 .AddAttribute (
"VI_EdcaTxopN",
1224 "Queue that manages packets belonging to AC_VI access class.",
1227 MakePointerChecker<EdcaTxopN> ())
1228 .AddAttribute (
"BE_EdcaTxopN",
1229 "Queue that manages packets belonging to AC_BE access class.",
1232 MakePointerChecker<EdcaTxopN> ())
1233 .AddAttribute (
"BK_EdcaTxopN",
1234 "Queue that manages packets belonging to AC_BK access class.",
1237 MakePointerChecker<EdcaTxopN> ())
1238 .AddTraceSource (
"TxOkHeader",
1239 "The header of successfully transmitted packet.",
1241 "ns3::WifiMacHeader::TracedCallback")
1242 .AddTraceSource (
"TxErrHeader",
1243 "The header of unsuccessfully transmitted packet.",
1245 "ns3::WifiMacHeader::TracedCallback")
1286 NS_FATAL_ERROR (
"Unsupported WifiPhyStandard in RegularWifiMac::FinishConfigureStandard ()");
1301 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
1303 ConfigureDcf (i->second, cwMin, cwMax, isDsssOnly, i->first);
1325 if (
GetVOQueue ()->GetMsduAggregator () != 0)
1329 if (
GetVIQueue ()->GetMsduAggregator () != 0)
1333 if (
GetBEQueue ()->GetMsduAggregator () != 0)
1337 if (
GetBKQueue ()->GetMsduAggregator () != 0)
1341 if (
GetVOQueue ()->GetMpduAggregator () != 0)
1345 if (
GetVIQueue ()->GetMpduAggregator () != 0)
1349 if (
GetBEQueue ()->GetMpduAggregator () != 0)
1353 if (
GetBKQueue ()->GetMpduAggregator () != 0)
1363 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
1365 if (i->second->GetMsduAggregator () == 0)
1368 i->second->SetMsduAggregator (msduAggregator);
1370 if (i->second->GetMpduAggregator () == 0)
1373 i->second->SetMpduAggregator (mpduAggregator);
1383 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
1385 i->second->SetMsduAggregator (0);
1386 i->second->SetMpduAggregator (0);
void SetQosSupported(bool enable)
Enable or disable QoS support for the device.
ERP-OFDM PHY (Clause 19, Section 19.5)
void SetHeSupported(bool enable)
Enable or disable HE support for the device.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
void Dispose(void)
Dispose of this Object.
Time GetPifs(void) const
Return PCF Interframe Space (PIFS) of this MacLow.
Ptr< DcfManager > m_dcfManager
DCF manager (access to channel)
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
void SetPifs(Time pifs)
Set PCF Interframe Space (PIFS) of this MacLow.
uint32_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI
void SetupEdcaQueue(AcIndex ac)
This method is a private utility invoked to configure the channel access function for the specified A...
void SetTxMcsSetDefined(uint8_t txmcssetdefined)
Set the transmit MCS set defined.
void SetShortGuardIntervalFor80Mhz(uint8_t shortguardinterval)
Set the short guard interval 80 Mhz.
Simulation virtual time values and global simulation resolution.
void ConfigureAggregation(void)
Configure aggregation function.
#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)
AttributeValue implementation for Boolean.
void SetGreenfield(uint8_t greenfield)
Set the green field.
HT PHY for the 5 GHz band (clause 20)
bool GetDsssSupported() const
Return whether the device supports DSSS.
bool GetVhtSupported() const
Return whether the device supports VHT.
void SetBlockAckInactivityTimeout(uint16_t timeout)
Set the Block Ack inactivity timeout.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
uint32_t m_bkMaxAmpduSize
maximum A-MPDU size for AC_BK
void SetPromisc(void)
Enable promiscuous mode.
void SetTxMcsMap(uint16_t map)
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
void SetHtSupported(uint8_t htsupported)
Set the HT Supported field in the HT Supported information element.
bool GetGreenfield(void) const
Return whether Greenfield is supported.
bool GetCtsToSelfSupported() const
Return whether the device supports CTS-to-self capability.
static TypeId GetTypeId(void)
Get the type ID.
void SetRxMcsBitmask(uint8_t index)
Set the receive MCS bitmask.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void SetMaxMpduLength(uint8_t length)
Set the maximum MPDU length.
void SetPhy(const Ptr< WifiPhy > phy)
Set up WifiPhy associated with this MacLow.
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
uint32_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE
void SetErpSupported(bool enable)
Enable or disable ERP support for the device.
Mac48Address GetBssid(void) const
Return the Basic Service Set Identification.
void SetSifs(Time sifs)
Set Short Interframe Space (SIFS) of this MacLow.
uint8_t GetMaxSupportedRxSpatialStreams(void) const
void SetCompressedBlockAckTimeout(Time blockAckTimeout)
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Callback< void > m_linkUp
Callback when a link is up.
void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
The HT Capabilities Information ElementThis class knows how to serialise and deserialise the HT Capab...
HE PHY for the 2.4 GHz band (clause 26)
std::list< std::pair< Ptr< Packet >, AmsduSubframeHeader > >::const_iterator DeaggregatedMsdusCI
DeaggregatedMsdusCI typedef.
void SetHighestNssSupported(uint8_t nss)
Set highest NSS supported.
OFDM PHY for the 5 GHz band (Clause 17 with 10 MHz channel bandwidth)
void SetSlot(Time slotTime)
Time GetCompressedBlockAckTimeout(void) const
bool GetShortGuardInterval(void) const
Return whether short guard interval is supported.
static DeaggregatedMsdus Deaggregate(Ptr< Packet > aggregatedPacket)
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
bool GetQosSupported() const
Return whether the device supports QoS.
void SetRxCallback(Callback< void, Ptr< Packet >, const WifiMacHeader * > callback)
virtual void DeaggregateAmsduAndForward(Ptr< Packet > aggregatedPacket, const WifiMacHeader *hdr)
This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack...
Time GetCompressedBlockAckTimeout() const
Return Compressed Block ACK timeout of this MacLow.
uint8_t GetNMcs(void) const
The WifiPhy::GetNMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of t...
void SetLinkDownCallback(Callback< void > linkDown)
void SetHtSupported(bool enable)
Enable or disable HT support for the device.
HT PHY for the 2.4 GHz band (clause 20)
void SetRifsSupported(bool enable)
Enable or disable RIFS feature.
void SetVhtSupported(uint8_t vhtsupported)
Set the VHT supported field.
Ptr< WifiPhy > m_phy
Wifi PHY.
void SetRxLdpc(uint8_t rxldpc)
Set the receive LDPC.
uint32_t m_voMaxAmpduSize
maximum A-MPDU size for AC_VO
Time GetCtsTimeout(void) const
Return CTS timeout of this MacLow.
uint16_t GetFrequency(void) const
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
uint32_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capability of the device.
virtual void Enqueue(Ptr< const Packet > packet, Mac48Address to, Mac48Address from)
virtual void Receive(Ptr< Packet > packet, const WifiMacHeader *hdr)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
void SetShortGuardIntervalFor160Mhz(uint8_t shortguardinterval)
Set the short guard interval 160 Mhz.
HeCapabilities GetHeCapabilities(void) const
Return the HE capability of the device.
void SetViMaxAmpduSize(uint32_t size)
Set the maximum A-MPDU size for AC_VI.
void Receive(Ptr< Packet > packet, const WifiMacHeader *hdr)
Receive a packet.
TracedCallback< const WifiMacHeader & > m_txErrCallback
transmit error callback
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self capability.
bool m_rifsSupported
flag whether RIFS is supported
void SetBasicBlockAckTimeout(Time blockAckTimeout)
Set Basic Block ACK timeout of this MacLow.
void SetBkMaxAmsduSize(uint32_t size)
Set the maximum A-MSDU size for AC_BK.
void SetVoMaxAmpduSize(uint32_t size)
Set the maximum A-MPDU size for AC_VO.
void SetVoBlockAckThreshold(uint8_t threshold)
Set the Block ACK threshold for AC_VO.
bool GetLdpc(void) const
Return if LDPC is supported.
void SetChannelWidthSet(uint8_t channelWidthSet)
Set channel width set.
void SetBeMaxAmpduSize(uint32_t size)
Set the maximum A-MPDU size for AC_BE.
void SetHeLtfAndGiForHePpdus(uint8_t heLtfAndGiForHePpdus)
Set HE LTF and GI for HE PDPUs.
static bool Is2_4Ghz(double frequency)
void SetBssid(Mac48Address bssid)
Ptr< EdcaTxopN > GetVOQueue(void) const
Accessor for the AC_VO channel access function.
void SetLSigProtectionSupport(uint8_t lsigprotection)
Set the LSIG protection support.
uint32_t m_voMaxAmsduSize
maximum A-MSDU size for AC_VO
void ForwardUp(Ptr< Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
virtual void SetVhtSupported(bool enable)
Enable or disable VHT capability support.
void DestroyBlockAckAgreement(Mac48Address originator, uint8_t tid)
Time GetCtsTimeout(void) const
void SetForwardUpCallback(ForwardUpCallback upCallback)
void SetBeMaxAmsduSize(uint32_t size)
Set the maximum A-MSDU size for AC_BE.
void SetSuccess(void)
Set success bit to 0 (success).
HE PHY for the 5 GHz band (clause 26)
void EnableAggregation(void)
Enable aggregation function.
void SetEifsNoDifs(Time eifsNoDifs)
void SetBkBlockAckThreshold(uint8_t threshold)
Set the Block ACK threshold for AC_BK.
bool m_qosSupported
This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service...
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void SetBasicBlockAckTimeout(Time blockAckTimeout)
void SetTypeOfStation(TypeOfStation type)
This method is invoked by a subclass to specify what type of station it is implementing.
void CreateBlockAckAgreement(const MgtAddBaResponseHeader *respHdr, Mac48Address originator, uint16_t startingSeq)
void SetShortGuardInterval20(uint8_t shortguardinterval)
Set the short guard interval 20 field.
void SetHighestMcsSupported(uint8_t mcs)
Set highest MCS supported.
Ptr< DcaTxop > m_dca
This holds a pointer to the DCF instance for this WifiMac - used for transmission of frames to non-Qo...
Ptr< EdcaTxopN > GetBEQueue(void) const
Accessor for the AC_BE channel access function.
void SetVoMaxAmsduSize(uint32_t size)
Set the maximum A-MSDU size for AC_VO.
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
void FinishConfigureStandard(WifiPhyStandard standard)
The IEEE 802.11ac VHT Capabilities.
Ssid m_ssid
Service Set ID (SSID)
Ptr< DcaTxop > GetDcaTxop(void) const
Accessor for the DCF object.
base class for all MAC-level wifi objects.
void NotifyTxDrop(Ptr< const Packet > packet)
Hold an unsigned integer type.
void RemovePhyListener(Ptr< WifiPhy > phy)
Remove current registered listener for Phy events.
virtual void SetMaxAmpduSize(uint32_t maxSize)=0
Sets the maximum A-MPDU size in bytes.
Time GetAckTimeout(void) const
void SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ACK mechanism.
void SetupPhyListener(Ptr< WifiPhy > phy)
Set up listener for Phy events.
void SetViMaxAmsduSize(uint32_t size)
Set the maximum A-MSDU size for AC_VI.
void SetMaxAmsduLength(uint8_t maxamsdulength)
Set the maximum AMSDU length.
uint64_t GetDataRate(uint8_t channelWidth, uint16_t guardInterval, uint8_t nss) const
void SetAckTimeout(Time ackTimeout)
Set ACK timeout of this MacLow.
bool m_vhtSupported
This Boolean is set true iff this WifiMac is to model 802.11ac.
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Maps TID (Traffic ID) to Access classes.
Time GetGuardInterval(void) const
void SetAddress(Mac48Address address)
Time GetRifs(void) const
Return Reduced Interframe Space (RIFS) of this MacLow.
uint8_t GetMcsValue(void) const
void SetMaxAmpduLength(uint8_t maxampdulength)
Set the maximum AMPDU length.
Ptr< MacRxMiddle > m_rxMiddle
RX middle (de-fragmentation etc.)
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Mac48Address GetAddress(void) const
Return the MAC address of this MacLow.
void SetupLow(Ptr< MacLow > low)
Set up listener for MacLow events.
void ResetWifiPhy(void)
removes attached WifiPhy device from this MAC.
bool m_heSupported
This Boolean is set true iff this WifiMac is to model 802.11ax.
bool GetHeSupported() const
Return whether the device supports HE.
bool GetErpSupported() const
Return whether the device supports ERP.
Ptr< MacLow > m_low
MacLow (RTS, CTS, DATA, ACK etc.)
void SetBeBlockAckThreshold(uint8_t threshold)
Set the Block ACK threshold for AC_BE.
HtCapabilities GetHtCapabilities(void) const
Return the HT capability of the device.
void SendAddBaResponse(const MgtAddBaRequestHeader *reqHdr, Mac48Address originator)
This method can be called to accept a received ADDBA Request.
void SetSupportedChannelWidthSet(uint8_t channelwidthset)
Set the supported channel width set.
void SetMaxAmpduLengthExponent(uint8_t exponent)
Set maximum AMPDU length exponent.
Callback< void > m_linkDown
Callback when a link is down.
This is intended to be the configuration used in this paper: Gavin Holland, Nitin Vaidya and Paramvir...
TracedCallback< const WifiMacHeader & > m_txOkCallback
transmit OK callback
virtual void SetHtSupported(bool enable)
Enable or disable HT capability support.
void SetRxHighestSupportedDataRate(uint16_t maxsupportedrate)
Set the receive highest supported data rate.
Status code for association response.
WifiMode GetMcs(uint8_t mcs) const
The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of tr...
Ptr< EdcaTxopN > GetVIQueue(void) const
Accessor for the AC_VI channel access function.
virtual void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > stationManager)
void SetLinkUpCallback(Callback< void > linkUp)
virtual void DoDispose()
Destructor implementation.
Ptr< MpduAggregator > GetMpduAggregator(void) const
Returns the aggregator used to construct A-MPDU subframes.
std::list< std::pair< Ptr< Packet >, AmsduSubframeHeader > > DeaggregatedMsdus
DeaggregatedMsdus typedef.
OFDM PHY for the 5 GHz band (Clause 17)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< MsduAggregator > GetMsduAggregator(void) const
Returns the aggregator used to construct A-MSDU subframes.
Hold objects of type Ptr.
void SetBssid(Mac48Address ad)
Set the Basic Service Set Identification.
void DisableAggregation(void)
Disable aggregation function.
Ptr< const AttributeChecker > MakeBooleanChecker(void)
void SetVhtSupported(bool enable)
Enable or disable VHT support for the device.
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
bool IsAllowed(uint8_t channelWidth, uint8_t nss) const
Ptr< WifiPhy > GetWifiPhy(void) const
void SetEifsNoDifs(Time eifsNoDifs)
virtual void SetMaxAmsduSize(uint32_t maxSize)=0
Sets the maximum A-MSDU size in bytes.
void SetCtsTimeout(Time ctsTimeout)
virtual ~RegularWifiMac()
virtual bool SupportsSendFrom(void) const
The IEEE 802.11 SSID Information Element.
uint8_t GetMaxSupportedTxSpatialStreams(void) const
void SetViBlockAckInactivityTimeout(uint16_t timeout)
Set VI block ack inactivity timeout.
Time GetSlotTime(void) const
Return slot duration of this MacLow.
bool m_htSupported
This Boolean is set true iff this WifiMac is to model 802.11n.
Mac48Address GetBssid(void) const
void SetLow(const Ptr< MacLow > low)
Set MacLow associated with this DcaTxop.
void SetSlot(Time slotTime)
uint8_t GetChannelWidth(void) const
void ConfigureDcf(Ptr< DcaTxop > dcf, uint32_t cwmin, uint32_t cwmax, bool isDsss, AcIndex ac)
void SetRxHighestSupportedLgiDataRate(uint16_t supporteddatarate)
Set the receive highest supported LGI data rate.
void SetRxMcsMap(uint16_t map)
static bool Is5Ghz(double frequency)
void SetRifs(Time rifs)
Set Reduced Interframe Space (RIFS) of this MacLow.
Ptr< EdcaTxopN > GetBKQueue(void) const
Accessor for the AC_BK channel access function.
void SetViBlockAckThreshold(uint8_t threshold)
Set the Block ACK threshold for AC_VI.
Time GetBasicBlockAckTimeout(void) const
void SetSlotTime(Time slotTime)
Set slot duration of this MacLow.
Time GetSifs(void) const
Return Short Interframe Space (SIFS) of this MacLow.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void SetHeSupported(uint8_t hesupported)
Set HE supported.
Mac48Address GetAddress(void) const
bool GetCtsToSelfSupported() const
Return whether CTS-to-self capability is supported.
Time GetEifsNoDifs() const
virtual void DoInitialize()
Initialize() implementation.
void SetCtsTimeout(Time ctsTimeout)
Set CTS timeout of this MacLow.
void SetLdpc(uint8_t ldpc)
Set the LDPC field.
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
Time GetAckTimeout(void) const
Return ACK timeout of this MacLow.
uint32_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK
bool GetHtSupported() const
Return whether the device supports HT.
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(void) const
virtual void SetHeSupported(bool enable)
Enable or disable HE capability support.
bool m_shortSlotTimeSupported
flag whether short slot time is supported
void SetAddress(Mac48Address ad)
Set MAC address of this MacLow.
bool GetShortSlotTimeSupported(void) const
void SetTxMaxNSpatialStreams(uint8_t maxtxspatialstreams)
Set the transmit maximum N spatial streams.
virtual void TxOk(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver (i.e.
uint32_t m_viMaxAmpduSize
maximum A-MPDU size for AC_VI
bool m_erpSupported
This Boolean is set true iff this WifiMac is to model 802.11g.
TypeOfStation
Enumeration for type of station.
bool GetRifsSupported(void) const
WifiModulationClass GetModulationClass() const
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
void SetShortSlotTimeSupported(bool enable)
Enable or disable short slot time feature.
void SetDsssSupported(bool enable)
Enable or disable DSSS support for the device.
Ptr< WifiRemoteStationManager > m_stationManager
Remote station manager (rate control, RTS/CTS/fragmentation thresholds etc.)
void SetPromisc(void)
Sets the interface in promiscuous mode.
void ResetPhy(void)
Remove WifiPhy associated with this MacLow.
The IEEE 802.11ax HE Capabilities.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void SetShortGuardInterval40(uint8_t shortguardinterval)
Set the short guard interval 40 field.
Time GetBasicBlockAckTimeout() const
Return Basic Block ACK timeout of this MacLow.
void SetBeBlockAckInactivityTimeout(uint16_t timeout)
Set BE block ack inactivity timeout.
a unique identifier for an interface.
bool m_dsssSupported
This Boolean is set true iff this WifiMac is to model 802.11b.
void SetWifiPhy(const Ptr< WifiPhy > phy)
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void SetAckTimeout(Time ackTimeout)
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
void AddHeader(const Header &header)
Add header to this packet.
void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > manager)
Set up WifiRemoteStationManager associated with this MacLow.
void SetSupportedChannelWidth(uint8_t supportedchannelwidth)
Set the supported channel width field.
void SetCompressedBlockAckTimeout(Time blockAckTimeout)
Set Compressed Block ACK timeout of this MacLow.
void SetBkMaxAmpduSize(uint32_t size)
Set the maximum A-MPDU size for AC_BK.
virtual void TxFailed(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver (i.e.
Time GetEifsNoDifs(void) const
void SetMaxAmpduLengthExponent(uint8_t exponent)
Set the maximum AMPDU length exponent.