22 #include "ns3/pointer.h" 23 #include "ns3/packet.h" 58 m_low = CreateObject<MacLow> ();
65 m_txop = CreateObject<Txop> ();
93 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
95 i->second->Initialize ();
116 for (EdcaQueues::iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
133 m_low->SetWifiRemoteStationManager (stationManager);
135 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
137 i->second->SetWifiRemoteStationManager (stationManager);
166 bool greenfieldSupported = htConfiguration->GetGreenfieldSupported ();
167 bool sgiSupported = htConfiguration->GetShortGuardIntervalSupported ();
177 if (maxAmsduSize <= 3839)
188 maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
193 uint64_t maxSupportedRate = 0;
205 if (dataRate > maxSupportedRate)
207 maxSupportedRate = dataRate;
208 NS_LOG_DEBUG (
"Updating maxSupportedRate to " << maxSupportedRate);
230 bool sgiSupported = htConfiguration->GetShortGuardIntervalSupported ();
243 if (maxAmsduSize <= 3839)
247 else if (maxAmsduSize <= 7935)
258 maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
284 uint64_t maxSupportedRateLGI = 0;
295 NS_LOG_DEBUG (
"Updating maxSupportedRateLGI to " << maxSupportedRateLGI);
316 uint8_t channelWidthSet = 0;
319 channelWidthSet |= 0x01;
323 channelWidthSet |= 0x02;
327 channelWidthSet |= 0x04;
331 if (heConfiguration->GetGuardInterval () <=
NanoSeconds (1600))
336 if (heConfiguration->GetGuardInterval () ==
NanoSeconds (800))
344 maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
436 edca->SetAccessCategory (ac);
437 edca->CompleteConfig ();
439 m_edca.insert (std::make_pair (ac, edca));
446 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
448 i->second->SetTypeOfStation (type);
623 m_low->SetCtsToSelfSupported (enable);
631 m_low->SetSlotTime (slotTime);
637 return m_low->GetSlotTime ();
645 m_low->SetSifs (sifs);
651 return m_low->GetSifs ();
671 m_low->SetRifs (rifs);
677 return m_low->GetRifs ();
684 m_low->SetPifs (pifs);
690 return m_low->GetPifs ();
697 m_low->SetAckTimeout (ackTimeout);
703 return m_low->GetAckTimeout ();
710 m_low->SetCtsTimeout (ctsTimeout);
716 return m_low->GetCtsTimeout ();
723 m_low->SetBasicBlockAckTimeout (blockAckTimeout);
729 return m_low->GetBasicBlockAckTimeout ();
736 m_low->SetCompressedBlockAckTimeout (blockAckTimeout);
742 return m_low->GetCompressedBlockAckTimeout ();
755 return m_low->GetAddress ();
775 m_low->SetBssid (bssid);
781 return m_low->GetBssid ();
787 m_low->SetPromisc ();
813 htConfiguration->SetRifsSupported (enable);
828 return htConfiguration->GetRifsSupported ();
843 <<
") does not support Enqueue() with from address");
917 m_edca[ac]->GotAddBaResponse (&respHdr, from);
932 m_low->DestroyBlockAckAgreement (from, delBaHdr.
GetTid ());
940 m_edca[ac]->GotDelBaFrame (&delBaHdr, from);
946 NS_FATAL_ERROR (
"Unsupported Action field in Block Ack Action frame");
963 i != packets.end (); ++i)
965 ForwardUp ((*i).first, (*i).second.GetSourceAddr (),
966 (*i).second.GetDestinationAddr ());
1001 if (heConfiguration && heConfiguration->GetMpduBufferSize () > 64)
1022 m_low->CreateBlockAckAgreement (&respHdr, originator,
1036 .SetGroupName (
"Wifi")
1037 .AddAttribute (
"QosSupported",
1038 "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA.",
1043 .AddAttribute (
"HtSupported",
1044 "This Boolean attribute is set to enable 802.11n support at this STA.",
1050 .AddAttribute (
"VhtSupported",
1051 "This Boolean attribute is set to enable 802.11ac support at this STA.",
1057 .AddAttribute (
"HeSupported",
1058 "This Boolean attribute is set to enable 802.11ax support at this STA.",
1064 .AddAttribute (
"CtsToSelfSupported",
1065 "Use CTS to Self when using a rate that is not in the basic rate set.",
1069 .AddAttribute (
"VO_MaxAmsduSize",
1070 "Maximum length in bytes of an A-MSDU for AC_VO access class " 1071 "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). " 1072 "Value 0 means A-MSDU aggregation is disabled for that AC.",
1075 MakeUintegerChecker<uint16_t> (0, 11398))
1076 .AddAttribute (
"VI_MaxAmsduSize",
1077 "Maximum length in bytes of an A-MSDU for AC_VI access class " 1078 "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). " 1079 "Value 0 means A-MSDU aggregation is disabled for that AC.",
1082 MakeUintegerChecker<uint16_t> (0, 11398))
1083 .AddAttribute (
"BE_MaxAmsduSize",
1084 "Maximum length in bytes of an A-MSDU for AC_BE access class " 1085 "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). " 1086 "Value 0 means A-MSDU aggregation is disabled for that AC.",
1089 MakeUintegerChecker<uint16_t> (0, 11398))
1090 .AddAttribute (
"BK_MaxAmsduSize",
1091 "Maximum length in bytes of an A-MSDU for AC_BK access class " 1092 "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). " 1093 "Value 0 means A-MSDU aggregation is disabled for that AC.",
1096 MakeUintegerChecker<uint16_t> (0, 11398))
1097 .AddAttribute (
"VO_MaxAmpduSize",
1098 "Maximum length in bytes of an A-MPDU for AC_VO access class " 1099 "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 8388607 for HE PPDUs). " 1100 "Value 0 means A-MPDU aggregation is disabled for that AC.",
1103 MakeUintegerChecker<uint32_t> ())
1104 .AddAttribute (
"VI_MaxAmpduSize",
1105 "Maximum length in bytes of an A-MPDU for AC_VI access class " 1106 "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 8388607 for HE PPDUs). " 1107 "Value 0 means A-MPDU aggregation is disabled for that AC.",
1110 MakeUintegerChecker<uint32_t> ())
1111 .AddAttribute (
"BE_MaxAmpduSize",
1112 "Maximum length in bytes of an A-MPDU for AC_BE access class " 1113 "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 8388607 for HE PPDUs). " 1114 "Value 0 means A-MPDU aggregation is disabled for that AC.",
1117 MakeUintegerChecker<uint32_t> ())
1118 .AddAttribute (
"BK_MaxAmpduSize",
1119 "Maximum length in bytes of an A-MPDU for AC_BK access class " 1120 "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 8388607 for HE PPDUs). " 1121 "Value 0 means A-MPDU aggregation is disabled for that AC.",
1124 MakeUintegerChecker<uint32_t> ())
1125 .AddAttribute (
"VO_BlockAckThreshold",
1126 "If number of packets in VO queue reaches this value, " 1127 "block ack mechanism is used. If this value is 0, block ack is never used." 1128 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1131 MakeUintegerChecker<uint8_t> (0, 64))
1132 .AddAttribute (
"VI_BlockAckThreshold",
1133 "If number of packets in VI queue reaches this value, " 1134 "block ack mechanism is used. If this value is 0, block ack is never used." 1135 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1138 MakeUintegerChecker<uint8_t> (0, 64))
1139 .AddAttribute (
"BE_BlockAckThreshold",
1140 "If number of packets in BE queue reaches this value, " 1141 "block ack mechanism is used. If this value is 0, block ack is never used." 1142 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1145 MakeUintegerChecker<uint8_t> (0, 64))
1146 .AddAttribute (
"BK_BlockAckThreshold",
1147 "If number of packets in BK queue reaches this value, " 1148 "block ack mechanism is used. If this value is 0, block ack is never used." 1149 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1152 MakeUintegerChecker<uint8_t> (0, 64))
1153 .AddAttribute (
"VO_BlockAckInactivityTimeout",
1154 "Represents max time (blocks of 1024 micro seconds) allowed for block ack" 1155 "inactivity for AC_VO. If this value isn't equal to 0 a timer start after that a" 1156 "block ack setup is completed and will be reset every time that a block ack" 1157 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1160 MakeUintegerChecker<uint16_t> ())
1161 .AddAttribute (
"VI_BlockAckInactivityTimeout",
1162 "Represents max time (blocks of 1024 micro seconds) allowed for block ack" 1163 "inactivity for AC_VI. If this value isn't equal to 0 a timer start after that a" 1164 "block ack setup is completed and will be reset every time that a block ack" 1165 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1168 MakeUintegerChecker<uint16_t> ())
1169 .AddAttribute (
"BE_BlockAckInactivityTimeout",
1170 "Represents max time (blocks of 1024 micro seconds) allowed for block ack" 1171 "inactivity for AC_BE. 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 (
"BK_BlockAckInactivityTimeout",
1178 "Represents max time (blocks of 1024 micro seconds) allowed for block ack" 1179 "inactivity for AC_BK. 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 (
"ShortSlotTimeSupported",
1186 "Whether or not short slot time is supported (only used by ERP APs or STAs).",
1191 .AddAttribute (
"RifsSupported",
1192 "Whether or not RIFS is supported (only used by HT APs or STAs).",
1198 .AddAttribute (
"Txop",
1202 MakePointerChecker<Txop> ())
1203 .AddAttribute (
"VO_Txop",
1204 "Queue that manages packets belonging to AC_VO access class.",
1207 MakePointerChecker<QosTxop> ())
1208 .AddAttribute (
"VI_Txop",
1209 "Queue that manages packets belonging to AC_VI access class.",
1212 MakePointerChecker<QosTxop> ())
1213 .AddAttribute (
"BE_Txop",
1214 "Queue that manages packets belonging to AC_BE access class.",
1217 MakePointerChecker<QosTxop> ())
1218 .AddAttribute (
"BK_Txop",
1219 "Queue that manages packets belonging to AC_BK access class.",
1222 MakePointerChecker<QosTxop> ())
1223 .AddTraceSource (
"TxOkHeader",
1224 "The header of successfully transmitted packet.",
1226 "ns3::WifiMacHeader::TracedCallback")
1227 .AddTraceSource (
"TxErrHeader",
1228 "The header of unsuccessfully transmitted packet.",
1230 "ns3::WifiMacHeader::TracedCallback")
1282 NS_FATAL_ERROR (
"Unsupported WifiPhyStandard in RegularWifiMac::FinishConfigureStandard ()");
1297 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
1299 ConfigureDcf (i->second, cwMin, cwMax, isDsssOnly, i->first);
1321 if (
m_low->GetMsduAggregator () == 0)
1324 msduAggregator->SetEdcaQueues (
m_edca);
1325 m_low->SetMsduAggregator (msduAggregator);
1327 if (
m_low->GetMpduAggregator () == 0)
1330 mpduAggregator->SetEdcaQueues (
m_edca);
1331 m_low->SetMpduAggregator (mpduAggregator);
1339 m_low->SetMsduAggregator (0);
1340 m_low->SetMpduAggregator (0);
virtual 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.
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
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.
Ptr< HeConfiguration > GetHeConfiguration(void) const
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)
AttributeValue implementation for Boolean.
bool GetHeSupported() const
Return whether the device supports HE.
void SetGreenfield(uint8_t greenfield)
Set the green field.
HT PHY for the 5 GHz band (clause 20)
Ptr< Txop > m_txop
This holds a pointer to the TXOP instance for this WifiMac - used for transmission of frames to non-Q...
WifiMode GetMcs(uint8_t mcs) const
The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of tr...
#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
Time GetCtsTimeout(void) const
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
void SetHtSupported(uint8_t htsupported)
Set the HT supported field.
bool GetQosSupported() const
Return whether the device supports QoS.
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...
uint16_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
bool Is2_4Ghz(double frequency)
uint32_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE
void SetErpSupported(bool enable)
Enable or disable ERP support for the device.
void SetChannelAccessManager(const Ptr< ChannelAccessManager > manager)
Set ChannelAccessManager this Txop is associated to.
bool IsAllowed(uint16_t channelWidth, uint8_t nss) const
void SetCompressedBlockAckTimeout(Time blockAckTimeout)
void SetTxDroppedCallback(TxDropped callback)
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities of the device.
The Extended Capabilities Information ElementThis class knows how to serialise and deserialise the Ex...
void SetupPhyListener(Ptr< WifiPhy > phy)
Set up listener for Phy events.
#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)
bool GetRifsSupported(void) const
#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)
void SetBlockAckInactivityTimeout(uint16_t timeout)
Set the Block Ack inactivity timeout.
void RemovePhyListener(Ptr< WifiPhy > phy)
Remove current registered listener for Phy events.
void SetMaxAmpduLength(uint32_t maxampdulength)
Set the maximum AMPDU length.
static DeaggregatedMsdus Deaggregate(Ptr< Packet > aggregatedPacket)
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
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)
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
Ptr< ChannelAccessManager > m_channelAccessManager
channel access manager
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Time GetCompressedBlockAckTimeout(void) const
void ConfigureDcf(Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, bool isDsss, AcIndex ac)
virtual void Enqueue(Ptr< const Packet > packet, Mac48Address to, Mac48Address from)
bool GetShortSlotTimeSupported(void) const
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
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.
void Receive(Ptr< Packet > packet, const WifiMacHeader *hdr)
Receive a packet.
bool GetDsssSupported() const
Return whether the device supports DSSS.
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.
bool m_rifsSupported
flag whether RIFS is supported (deprecated)
void SetVoBlockAckThreshold(uint8_t threshold)
Set the Block ACK threshold for AC_VO.
uint16_t GetChannelWidth(void) const
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)
void SetLSigProtectionSupport(uint8_t lsigprotection)
Set the LSIG protection support.
uint8_t GetNMcs(void) const
The WifiPhy::GetNMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of t...
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 bool SupportsSendFrom(void) const
void SetForwardUpCallback(ForwardUpCallback upCallback)
void SetSuccess(void)
Set success bit to 0 (success).
Ptr< HtConfiguration > GetHtConfiguration(void) const
HE PHY for the 5 GHz band (clause 26)
void EnableAggregation(void)
Enable aggregation function.
Time GetBasicBlockAckTimeout(void) const
void SetEifsNoDifs(Time eifsNoDifs)
void SetMaxAmpduLength(uint32_t maxampdulength)
Set the maximum AMPDU length.
void SetBkBlockAckThreshold(uint8_t threshold)
Set the Block ACK threshold for AC_BK.
bool GetErpSupported() const
Return whether the device supports ERP.
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)
Time GetEifsNoDifs(void) const
void SetTypeOfStation(TypeOfStation type)
This method is invoked by a subclass to specify what type of station it is implementing.
void SetShortGuardInterval20(uint8_t shortguardinterval)
Set the short guard interval 20 field.
void SetHighestMcsSupported(uint8_t mcs)
Set highest MCS supported.
Time GetEifsNoDifs(void) const
void SetEifsNoDifs(Time eifsNoDifs)
bool GetVhtSupported() const
Return whether the device supports VHT.
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)
base class for all MAC-level wifi objects.
void NotifyTxDrop(Ptr< const Packet > packet)
void SetMaxAmpduLength(uint32_t maxampdulength)
Set the maximum AMPDU length.
Hold an unsigned integer type.
void SetTxHighestSupportedLgiDataRate(uint16_t supporteddatarate)
Set the transmit highest supported LGI data rate.
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Maps TID (Traffic ID) to Access classes.
void SetAddress(Mac48Address address)
Ptr< MacRxMiddle > m_rxMiddle
RX middle (de-fragmentation etc.)
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
virtual void DoDispose()
Destructor implementation.
Ptr< QosTxop > GetVOQueue(void) const
Accessor for the AC_VO channel access function.
uint16_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI
Mac48Address GetBssid(void) const
uint16_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities of the device.
void ResetWifiPhy(void)
removes attached WifiPhy device from this MAC.
void SetMaxAmsduLength(uint16_t maxamsdulength)
Set the maximum AMSDU length.
WifiModulationClass GetModulationClass() const
Ptr< MacLow > m_low
MacLow (RTS, CTS, DATA, ACK etc.)
void SetBeBlockAckThreshold(uint8_t threshold)
Set the Block ACK threshold for AC_BE.
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(void) const
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.
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
Time GetAckTimeout(void) const
void SetRxHighestSupportedDataRate(uint16_t maxsupportedrate)
Set the receive highest supported data rate.
Status code for association response.
virtual void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > stationManager)
void SetLinkUpCallback(Callback< void > linkUp)
virtual void DoDispose()
Destructor implementation.
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.
Hold objects of type Ptr<T>.
void DisableAggregation(void)
Disable aggregation function.
uint16_t GetFrequency(void) const
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)
void SetTxUnequalModulation(uint8_t txunequalmodulation)
Set the transmit unequal modulation.
void SetMaxMpduLength(uint16_t length)
Set the maximum MPDU length.
void SetMacLow(const Ptr< MacLow > low)
Set MacLow associated with this Txop.
Ptr< QosTxop > GetVIQueue(void) const
Accessor for the AC_VI channel access function.
void SetRxStbc(uint8_t rxstbc)
Set the receive STBC.
void SetCtsTimeout(Time ctsTimeout)
virtual ~RegularWifiMac()
void SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ACK mechanism.
The IEEE 802.11 SSID Information Element.
void SetViBlockAckInactivityTimeout(uint16_t timeout)
Set VI block ack inactivity timeout.
Mac48Address GetAddress(void) const
void SetRxMcsMap(uint8_t mcs, uint8_t nss)
void SetRxHighestSupportedLgiDataRate(uint16_t supporteddatarate)
Set the receive highest supported LGI data rate.
void SetHtSupported(uint8_t htsupported)
Set the HT Supported flag.
Ptr< QosTxop > GetBEQueue(void) const
Accessor for the AC_BE channel access function.
Ptr< Txop > GetTxop(void) const
Accessor for the DCF object.
void SetViBlockAckThreshold(uint8_t threshold)
Set the Block ACK threshold for AC_VI.
Ptr< VhtConfiguration > GetVhtConfiguration(void) const
bool GetHtSupported() const
Return whether the device supports HT.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void SetHeSupported(uint8_t hesupported)
Set HE supported.
void SetTxMiddle(const Ptr< MacTxMiddle > txMiddle)
Set MacTxMiddle this Txop is associated to.
Attribute or trace source is deprecated; user is warned.
virtual void DoInitialize()
Initialize() implementation.
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.
virtual void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > remoteManager)
Set WifiRemoteStationsManager this Txop is associated to.
void SetSlot(Time slotTime)
bool m_shortSlotTimeSupported
flag whether short slot time is supported
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.
Ptr< QosTxop > GetBKQueue(void) const
Accessor for the AC_BK channel access function.
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 SetTxFailedCallback(TxFailed callback)
void SetPromisc(void)
Sets the interface in promiscuous mode.
Ptr< WifiPhy > GetWifiPhy(void) const
void SetTxOkCallback(TxOk callback)
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities of the device.
void SetupLow(Ptr< MacLow > low)
Set up listener for MacLow events.
The IEEE 802.11ax HE Capabilities.
uint8_t GetMcsValue(void) const
Ptr< HtConfiguration > GetHtConfiguration(void) const
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.
void SetBeBlockAckInactivityTimeout(uint16_t timeout)
Set BE block ack inactivity timeout.
uint8_t GetMaxSupportedTxSpatialStreams(void) const
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)
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 ...
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
void AddHeader(const Header &header)
Add header to this packet.
void SetSupportedChannelWidth(uint8_t supportedchannelwidth)
Set the supported channel width field.
void SetVhtSupported(uint8_t vhtsupported)
Set the VHT Supported flag.
uint8_t GetMaxSupportedRxSpatialStreams(void) const
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities of the device.
virtual void TxFailed(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver (i.e.