23 #include "ns3/pointer.h"
51 m_low = CreateObject<MacLow> ();
57 m_dca = CreateObject<DcaTxop> ();
58 m_dca->SetLow (m_low);
85 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
87 i->second->Initialize ();
108 for (EdcaQueues::iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
110 i->second->Dispose ();
128 m_dca->SetWifiRemoteStationManager (stationManager);
130 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
132 i->second->SetWifiRemoteStationManager (stationManager);
183 NS_ASSERT (maxAmpduLengthExponent >= 0 && maxAmpduLengthExponent <= 255);
184 capabilities.
SetMaxAmpduLength (std::max<uint8_t> (3, static_cast<uint8_t> (maxAmpduLengthExponent)));
185 uint64_t maxSupportedRate = 0;
197 if (dataRate > maxSupportedRate)
199 maxSupportedRate = dataRate;
200 NS_LOG_DEBUG (
"Updating maxSupportedRate to " << maxSupportedRate);
230 capabilities.
SetMaxMpduLength (uint8_t (maxMpduLength > 3895) + uint8_t (maxMpduLength > 7991));
235 NS_ASSERT (maxAmpduLengthExponent >= 0 && maxAmpduLengthExponent <= 255);
256 uint64_t maxSupportedRateLGI = 0;
267 NS_LOG_DEBUG (
"Updating maxSupportedRateLGI to " << maxSupportedRateLGI);
287 uint8_t channelWidthSet = 0;
290 channelWidthSet |= 0x01;
294 channelWidthSet |= 0x02;
298 channelWidthSet |= 0x04;
317 NS_ASSERT (maxAmpduLengthExponent >= 0 && maxAmpduLengthExponent <= 255);
471 edca->SetAccessCategory (ac);
472 edca->CompleteConfig ();
474 m_edca.insert (std::make_pair (ac, edca));
481 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
483 i->second->SetTypeOfStation (type);
893 <<
") does not support Enqueue() with from address");
967 m_edca[ac]->GotAddBaResponse (&respHdr, from);
990 m_edca[ac]->GotDelBaFrame (&delBaHdr, from);
996 NS_FATAL_ERROR (
"Unsupported Action field in Block Ack Action frame");
1013 i != packets.end (); ++i)
1015 ForwardUp ((*i).first, (*i).second.GetSourceAddr (),
1016 (*i).second.GetDestinationAddr ());
1083 .SetGroupName (
"Wifi")
1084 .AddAttribute (
"QosSupported",
1085 "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA.",
1090 .AddAttribute (
"HtSupported",
1091 "This Boolean attribute is set to enable 802.11n support at this STA.",
1096 .AddAttribute (
"VhtSupported",
1097 "This Boolean attribute is set to enable 802.11ac support at this STA.",
1102 .AddAttribute (
"HeSupported",
1103 "This Boolean attribute is set to enable 802.11ax support at this STA.",
1108 .AddAttribute (
"CtsToSelfSupported",
1109 "Use CTS to Self when using a rate that is not in the basic rate set.",
1114 .AddAttribute (
"VO_MaxAmsduSize",
1115 "Maximum length in bytes of an A-MSDU for AC_VO access class. "
1116 "Value 0 means A-MSDU is disabled for that AC.",
1119 MakeUintegerChecker<uint16_t> (0, 11426))
1120 .AddAttribute (
"VI_MaxAmsduSize",
1121 "Maximum length in bytes of an A-MSDU for AC_VI access class."
1122 "Value 0 means A-MSDU is disabled for that AC.",
1125 MakeUintegerChecker<uint16_t> (0, 11426))
1126 .AddAttribute (
"BE_MaxAmsduSize",
1127 "Maximum length in bytes of an A-MSDU for AC_BE access class."
1128 "Value 0 means A-MSDU is disabled for that AC.",
1131 MakeUintegerChecker<uint16_t> (0, 11426))
1132 .AddAttribute (
"BK_MaxAmsduSize",
1133 "Maximum length in bytes of an A-MSDU for AC_BK access class."
1134 "Value 0 means A-MSDU is disabled for that AC.",
1137 MakeUintegerChecker<uint16_t> (0, 11426))
1138 .AddAttribute (
"VO_MaxAmpduSize",
1139 "Maximum length in bytes of an A-MPDU for AC_VO access class."
1140 "Value 0 means A-MPDU is disabled for that AC.",
1143 MakeUintegerChecker<uint16_t> ())
1144 .AddAttribute (
"VI_MaxAmpduSize",
1145 "Maximum length in bytes of an A-MPDU for AC_VI access class."
1146 "Value 0 means A-MPDU is disabled for that AC.",
1149 MakeUintegerChecker<uint16_t> ())
1150 .AddAttribute (
"BE_MaxAmpduSize",
1151 "Maximum length in bytes of an A-MPDU for AC_BE access class."
1152 "Value 0 means A-MPDU is disabled for that AC.",
1155 MakeUintegerChecker<uint16_t> ())
1156 .AddAttribute (
"BK_MaxAmpduSize",
1157 "Maximum length in bytes of an A-MPDU for AC_BK access class."
1158 "Value 0 means A-MPDU is disabled for that AC.",
1161 MakeUintegerChecker<uint16_t> ())
1162 .AddAttribute (
"VO_BlockAckThreshold",
1163 "If number of packets in VO 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 (
"VI_BlockAckThreshold",
1170 "If number of packets in VI queue reaches this value, "
1171 "block ack mechanism is used. If this value is 0, block ack is never used."
1172 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1175 MakeUintegerChecker<uint8_t> (0, 64))
1176 .AddAttribute (
"BE_BlockAckThreshold",
1177 "If number of packets in BE queue reaches this value, "
1178 "block ack mechanism is used. If this value is 0, block ack is never used."
1179 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1182 MakeUintegerChecker<uint8_t> (0, 64))
1183 .AddAttribute (
"BK_BlockAckThreshold",
1184 "If number of packets in BK queue reaches this value, "
1185 "block ack mechanism is used. If this value is 0, block ack is never used."
1186 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1189 MakeUintegerChecker<uint8_t> (0, 64))
1190 .AddAttribute (
"VO_BlockAckInactivityTimeout",
1191 "Represents max time (blocks of 1024 micro seconds) allowed for block ack"
1192 "inactivity for AC_VO. If this value isn't equal to 0 a timer start after that a"
1193 "block ack setup is completed and will be reset every time that a block ack"
1194 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1197 MakeUintegerChecker<uint16_t> ())
1198 .AddAttribute (
"VI_BlockAckInactivityTimeout",
1199 "Represents max time (blocks of 1024 micro seconds) allowed for block ack"
1200 "inactivity for AC_VI. If this value isn't equal to 0 a timer start after that a"
1201 "block ack setup is completed and will be reset every time that a block ack"
1202 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1205 MakeUintegerChecker<uint16_t> ())
1206 .AddAttribute (
"BE_BlockAckInactivityTimeout",
1207 "Represents max time (blocks of 1024 micro seconds) allowed for block ack"
1208 "inactivity for AC_BE. If this value isn't equal to 0 a timer start after that a"
1209 "block ack setup is completed and will be reset every time that a block ack"
1210 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1213 MakeUintegerChecker<uint16_t> ())
1214 .AddAttribute (
"BK_BlockAckInactivityTimeout",
1215 "Represents max time (blocks of 1024 micro seconds) allowed for block ack"
1216 "inactivity for AC_BK. If this value isn't equal to 0 a timer start after that a"
1217 "block ack setup is completed and will be reset every time that a block ack"
1218 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1221 MakeUintegerChecker<uint16_t> ())
1222 .AddAttribute (
"ShortSlotTimeSupported",
1223 "Whether or not short slot time is supported (only used by ERP APs or STAs).",
1228 .AddAttribute (
"RifsSupported",
1229 "Whether or not RIFS is supported (only used by HT APs or STAs).",
1234 .AddAttribute (
"DcaTxop",
1235 "The DcaTxop object.",
1238 MakePointerChecker<DcaTxop> ())
1239 .AddAttribute (
"VO_EdcaTxopN",
1240 "Queue that manages packets belonging to AC_VO access class.",
1243 MakePointerChecker<EdcaTxopN> ())
1244 .AddAttribute (
"VI_EdcaTxopN",
1245 "Queue that manages packets belonging to AC_VI access class.",
1248 MakePointerChecker<EdcaTxopN> ())
1249 .AddAttribute (
"BE_EdcaTxopN",
1250 "Queue that manages packets belonging to AC_BE access class.",
1253 MakePointerChecker<EdcaTxopN> ())
1254 .AddAttribute (
"BK_EdcaTxopN",
1255 "Queue that manages packets belonging to AC_BK access class.",
1258 MakePointerChecker<EdcaTxopN> ())
1259 .AddTraceSource (
"TxOkHeader",
1260 "The header of successfully transmitted packet.",
1262 "ns3::WifiMacHeader::TracedCallback")
1263 .AddTraceSource (
"TxErrHeader",
1264 "The header of unsuccessfully transmitted packet.",
1266 "ns3::WifiMacHeader::TracedCallback")
1307 NS_FATAL_ERROR (
"Unsupported WifiPhyStandard in RegularWifiMac::FinishConfigureStandard ()");
1322 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
1324 ConfigureDcf (i->second, cwMin, cwMax, isDsssOnly, i->first);
1346 if (
GetVOQueue ()->GetMsduAggregator () != 0)
1350 if (
GetVIQueue ()->GetMsduAggregator () != 0)
1354 if (
GetBEQueue ()->GetMsduAggregator () != 0)
1358 if (
GetBKQueue ()->GetMsduAggregator () != 0)
1362 if (
GetVOQueue ()->GetMpduAggregator () != 0)
1366 if (
GetVIQueue ()->GetMpduAggregator () != 0)
1370 if (
GetBEQueue ()->GetMpduAggregator () != 0)
1374 if (
GetBKQueue ()->GetMpduAggregator () != 0)
1384 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
1386 if (i->second->GetMsduAggregator () == 0)
1389 i->second->SetMsduAggregator (msduAggregator);
1391 if (i->second->GetMpduAggregator () == 0)
1394 i->second->SetMpduAggregator (mpduAggregator);
1404 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
1406 i->second->SetMsduAggregator (0);
1407 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.
uint16_t m_voMaxAmsduSize
maximum A-MSDU size for AC_VO
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.
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.
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities of the device.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
void SetPromisc(void)
Enable promiscuous mode.
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
void SetHtSupported(uint8_t htsupported)
Set the HT supported field.
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.
void SetBkMaxAmsduSize(uint16_t size)
Set the maximum A-MSDU size for AC_BK.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
uint16_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK
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.
bool Is2_4Ghz(double frequency)
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)
The Extended Capabilities Information ElementThis class knows how to serialise and deserialise the Ex...
#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)
void SetVoMaxAmsduSize(uint16_t size)
Set the maximum A-MSDU size for AC_VO.
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...
bool Is5Ghz(double frequency)
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.
void SetVoMaxAmpduSize(uint16_t size)
Set the maximum A-MPDU size for AC_VO.
Time GetCtsTimeout(void) const
Return CTS timeout of this MacLow.
void SetViMaxAmsduSize(uint16_t size)
Set the maximum A-MSDU size for AC_VI.
uint16_t GetFrequency(void) const
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities 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 capabilities of the device.
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 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 SetHeLtfAndGiForHePpdus(uint8_t heLtfAndGiForHePpdus)
Set HE LTF and GI for HE PDPUs.
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.
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 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.
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.
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 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.
void SetTxHighestSupportedLgiDataRate(uint16_t supporteddatarate)
Set the transmit highest supported LGI data rate.
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.
uint16_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI
uint16_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE
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 capabilities 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 SetTxUnequalModulation(uint8_t txunequalmodulation)
Set the transmit unequal modulation.
void SetEifsNoDifs(Time eifsNoDifs)
void SetRxStbc(uint8_t rxstbc)
Set the receive STBC.
uint16_t m_bkMaxAmpduSize
maximum A-MPDU size for AC_BK
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.
void SetRxMcsMap(uint8_t mcs, uint8_t nss)
uint16_t m_voMaxAmpduSize
maximum A-MPDU size for AC_VO
Mac48Address GetBssid(void) const
void SetLow(const Ptr< MacLow > low)
Set MacLow associated with this DcaTxop.
void SetMaxAmpduSize(uint16_t maxSize)
Sets the maximum A-MPDU size in bytes.
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 SetHtSupported(uint8_t htsupported)
Set the HT Supported flag.
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.
uint16_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE
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
uint16_t m_viMaxAmpduSize
maximum A-MPDU size for AC_VI
void SetViMaxAmpduSize(uint16_t size)
Set the maximum A-MPDU size for AC_VI.
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.
void SetTxRxMcsSetUnequal(uint8_t txrxmcssetunequal)
Set the transmit / receive MCS set unequal.
Time GetAckTimeout(void) const
Return ACK timeout of this MacLow.
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.
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 SetBeMaxAmpduSize(uint16_t size)
Set the maximum A-MPDU size for AC_BE.
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.
void SetTxMcsMap(uint8_t mcs, uint8_t nss)
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.
void SetTxStbc(uint8_t txstbc)
Set the transmit STBC.
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.
virtual void SetWifiPhy(const Ptr< WifiPhy > phy)
void SetBkMaxAmpduSize(uint16_t size)
Set the maximum A-MPDU size for AC_BK.
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 SetBeMaxAmsduSize(uint16_t size)
Set the maximum A-MSDU size for AC_BE.
void SetCompressedBlockAckTimeout(Time blockAckTimeout)
Set Compressed Block ACK timeout of this MacLow.
void SetVhtSupported(uint8_t vhtsupported)
Set the VHT Supported flag.
void SetMaxAmsduSize(uint16_t maxSize)
Sets the maximum A-MSDU size in bytes.
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.