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->SetBasicBlockAckTimeout (blockAckTimeout);
716 return m_low->GetBasicBlockAckTimeout ();
723 m_low->SetCompressedBlockAckTimeout (blockAckTimeout);
729 return m_low->GetCompressedBlockAckTimeout ();
742 return m_low->GetAddress ();
762 m_low->SetBssid (bssid);
768 return m_low->GetBssid ();
774 m_low->SetPromisc ();
800 htConfiguration->SetRifsSupported (enable);
815 return htConfiguration->GetRifsSupported ();
830 <<
") does not support Enqueue() with from address");
906 m_edca[ac]->GotAddBaResponse (&respHdr, from);
921 m_low->DestroyBlockAckAgreement (from, delBaHdr.
GetTid ());
929 m_edca[ac]->GotDelBaFrame (&delBaHdr, from);
935 NS_FATAL_ERROR (
"Unsupported Action field in Block Ack Action frame");
952 ForwardUp (msduPair.first, msduPair.second.GetSourceAddr (),
953 msduPair.second.GetDestinationAddr ());
988 if (heConfiguration && heConfiguration->GetMpduBufferSize () > 64)
1009 m_low->CreateBlockAckAgreement (&respHdr, originator,
1023 .SetGroupName (
"Wifi")
1024 .AddAttribute (
"QosSupported",
1025 "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA.",
1030 .AddAttribute (
"HtSupported",
1031 "This Boolean attribute is set to enable 802.11n support at this STA.",
1037 .AddAttribute (
"VhtSupported",
1038 "This Boolean attribute is set to enable 802.11ac support at this STA.",
1044 .AddAttribute (
"HeSupported",
1045 "This Boolean attribute is set to enable 802.11ax support at this STA.",
1051 .AddAttribute (
"CtsToSelfSupported",
1052 "Use CTS to Self when using a rate that is not in the basic rate set.",
1056 .AddAttribute (
"VO_MaxAmsduSize",
1057 "Maximum length in bytes of an A-MSDU for AC_VO access class " 1058 "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). " 1059 "Value 0 means A-MSDU aggregation is disabled for that AC.",
1062 MakeUintegerChecker<uint16_t> (0, 11398))
1063 .AddAttribute (
"VI_MaxAmsduSize",
1064 "Maximum length in bytes of an A-MSDU for AC_VI access class " 1065 "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). " 1066 "Value 0 means A-MSDU aggregation is disabled for that AC.",
1069 MakeUintegerChecker<uint16_t> (0, 11398))
1070 .AddAttribute (
"BE_MaxAmsduSize",
1071 "Maximum length in bytes of an A-MSDU for AC_BE access class " 1072 "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). " 1073 "Value 0 means A-MSDU aggregation is disabled for that AC.",
1076 MakeUintegerChecker<uint16_t> (0, 11398))
1077 .AddAttribute (
"BK_MaxAmsduSize",
1078 "Maximum length in bytes of an A-MSDU for AC_BK access class " 1079 "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). " 1080 "Value 0 means A-MSDU aggregation is disabled for that AC.",
1083 MakeUintegerChecker<uint16_t> (0, 11398))
1084 .AddAttribute (
"VO_MaxAmpduSize",
1085 "Maximum length in bytes of an A-MPDU for AC_VO access class " 1086 "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 8388607 for HE PPDUs). " 1087 "Value 0 means A-MPDU aggregation is disabled for that AC.",
1090 MakeUintegerChecker<uint32_t> ())
1091 .AddAttribute (
"VI_MaxAmpduSize",
1092 "Maximum length in bytes of an A-MPDU for AC_VI access class " 1093 "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 8388607 for HE PPDUs). " 1094 "Value 0 means A-MPDU aggregation is disabled for that AC.",
1097 MakeUintegerChecker<uint32_t> ())
1098 .AddAttribute (
"BE_MaxAmpduSize",
1099 "Maximum length in bytes of an A-MPDU for AC_BE access class " 1100 "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 8388607 for HE PPDUs). " 1101 "Value 0 means A-MPDU aggregation is disabled for that AC.",
1104 MakeUintegerChecker<uint32_t> ())
1105 .AddAttribute (
"BK_MaxAmpduSize",
1106 "Maximum length in bytes of an A-MPDU for AC_BK access class " 1107 "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 8388607 for HE PPDUs). " 1108 "Value 0 means A-MPDU aggregation is disabled for that AC.",
1111 MakeUintegerChecker<uint32_t> ())
1112 .AddAttribute (
"VO_BlockAckThreshold",
1113 "If number of packets in VO queue reaches this value, " 1114 "block ack mechanism is used. If this value is 0, block ack is never used." 1115 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1118 MakeUintegerChecker<uint8_t> (0, 64))
1119 .AddAttribute (
"VI_BlockAckThreshold",
1120 "If number of packets in VI queue reaches this value, " 1121 "block ack mechanism is used. If this value is 0, block ack is never used." 1122 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1125 MakeUintegerChecker<uint8_t> (0, 64))
1126 .AddAttribute (
"BE_BlockAckThreshold",
1127 "If number of packets in BE queue reaches this value, " 1128 "block ack mechanism is used. If this value is 0, block ack is never used." 1129 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1132 MakeUintegerChecker<uint8_t> (0, 64))
1133 .AddAttribute (
"BK_BlockAckThreshold",
1134 "If number of packets in BK queue reaches this value, " 1135 "block ack mechanism is used. If this value is 0, block ack is never used." 1136 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1139 MakeUintegerChecker<uint8_t> (0, 64))
1140 .AddAttribute (
"VO_BlockAckInactivityTimeout",
1141 "Represents max time (blocks of 1024 microseconds) allowed for block ack" 1142 "inactivity for AC_VO. If this value isn't equal to 0 a timer start after that a" 1143 "block ack setup is completed and will be reset every time that a block ack" 1144 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1147 MakeUintegerChecker<uint16_t> ())
1148 .AddAttribute (
"VI_BlockAckInactivityTimeout",
1149 "Represents max time (blocks of 1024 microseconds) allowed for block ack" 1150 "inactivity for AC_VI. If this value isn't equal to 0 a timer start after that a" 1151 "block ack setup is completed and will be reset every time that a block ack" 1152 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1155 MakeUintegerChecker<uint16_t> ())
1156 .AddAttribute (
"BE_BlockAckInactivityTimeout",
1157 "Represents max time (blocks of 1024 microseconds) allowed for block ack" 1158 "inactivity for AC_BE. If this value isn't equal to 0 a timer start after that a" 1159 "block ack setup is completed and will be reset every time that a block ack" 1160 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1163 MakeUintegerChecker<uint16_t> ())
1164 .AddAttribute (
"BK_BlockAckInactivityTimeout",
1165 "Represents max time (blocks of 1024 microseconds) allowed for block ack" 1166 "inactivity for AC_BK. If this value isn't equal to 0 a timer start after that a" 1167 "block ack setup is completed and will be reset every time that a block ack" 1168 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1171 MakeUintegerChecker<uint16_t> ())
1172 .AddAttribute (
"ShortSlotTimeSupported",
1173 "Whether or not short slot time is supported (only used by ERP APs or STAs).",
1178 .AddAttribute (
"RifsSupported",
1179 "Whether or not RIFS is supported (only used by HT APs or STAs).",
1185 .AddAttribute (
"Txop",
1189 MakePointerChecker<Txop> ())
1190 .AddAttribute (
"VO_Txop",
1191 "Queue that manages packets belonging to AC_VO access class.",
1194 MakePointerChecker<QosTxop> ())
1195 .AddAttribute (
"VI_Txop",
1196 "Queue that manages packets belonging to AC_VI access class.",
1199 MakePointerChecker<QosTxop> ())
1200 .AddAttribute (
"BE_Txop",
1201 "Queue that manages packets belonging to AC_BE access class.",
1204 MakePointerChecker<QosTxop> ())
1205 .AddAttribute (
"BK_Txop",
1206 "Queue that manages packets belonging to AC_BK access class.",
1209 MakePointerChecker<QosTxop> ())
1210 .AddTraceSource (
"TxOkHeader",
1211 "The header of successfully transmitted packet.",
1213 "ns3::WifiMacHeader::TracedCallback")
1214 .AddTraceSource (
"TxErrHeader",
1215 "The header of unsuccessfully transmitted packet.",
1217 "ns3::WifiMacHeader::TracedCallback")
1269 NS_FATAL_ERROR (
"Unsupported WifiPhyStandard in RegularWifiMac::FinishConfigureStandard ()");
1284 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
1286 ConfigureDcf (i->second, cwMin, cwMax, isDsssOnly, i->first);
1308 if (
m_low->GetMsduAggregator () == 0)
1311 msduAggregator->SetEdcaQueues (
m_edca);
1312 m_low->SetMsduAggregator (msduAggregator);
1314 if (
m_low->GetMpduAggregator () == 0)
1317 mpduAggregator->SetEdcaQueues (
m_edca);
1318 m_low->SetMpduAggregator (mpduAggregator);
1326 m_low->SetMsduAggregator (0);
1327 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 (in bytes)
void Dispose(void)
Dispose of this Object.
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
void SetTxMcsSetDefined(uint8_t txMcsSetDefined)
Set the transmit MCS set defined.
void SetupEdcaQueue(AcIndex ac)
This method is a private utility invoked to configure the channel access function for the specified A...
void SetTxStbc(uint8_t txStbc)
Set the transmit STBC.
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)
void SetHtSupported(uint8_t htSupported)
Set the HT Supported flag.
AttributeValue implementation for Boolean.
bool GetHeSupported() const
Return whether the device supports HE.
void SetGreenfield(uint8_t greenfield)
Set the Greenfield 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...
void SetSupportedChannelWidthSet(uint8_t channelWidthSet)
Set the supported channel width set.
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 (in bytes)
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
virtual void DeaggregateAmsduAndForward(Ptr< WifiMacQueueItem > mpdu)
This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack...
bool GetQosSupported() const
Return whether the device supports QoS.
static TypeId GetTypeId(void)
Get the type ID.
void SetShortGuardInterval40(uint8_t shortGuardInterval)
Set the short guard interval 40 field.
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 SetHeSupported(uint8_t heSupported)
Set HE supported.
uint16_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK (in bytes)
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 (in bytes)
void SetErpSupported(bool enable)
Enable or disable ERP support for the device.
void SetLSigProtectionSupport(uint8_t lSigProtection)
Set the LSIG protection support.
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...
U * PeekPointer(const Ptr< U > &p)
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)
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 BlockAck inactivity timeout.
void RemovePhyListener(Ptr< WifiPhy > phy)
Remove current registered listener for PHY events.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
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.
Ptr< WifiPhy > m_phy
Wifi PHY.
uint32_t m_voMaxAmpduSize
maximum A-MPDU size for AC_VO (in bytes)
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
virtual void Receive(Ptr< WifiMacQueueItem > mpdu)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
void ConfigureDcf(Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, bool isDsss, AcIndex ac)
bool GetShortSlotTimeSupported(void) const
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
bool GetDsssSupported() const
Return whether the device supports DSSS.
TracedCallback< const WifiMacHeader & > m_txErrCallback
transmit error callback
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
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.
void SetVhtSupported(uint8_t vhtSupported)
Set the VHT supported field.
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)
uint8_t GetNMcs(void) const
The WifiPhy::GetNMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of t...
void SetVhtSupported(uint8_t vhtSupported)
Set the VHT Supported flag.
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
virtual bool SupportsSendFrom(void) const
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to, Mac48Address from)
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 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 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)
Hold an unsigned integer type.
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Maps TID (Traffic ID) to Access classes.
void SetAddress(Mac48Address address)
Ptr< MacRxMiddle > m_rxMiddle
RX middle (defragmentation etc.)
virtual void DoDispose()
Destructor implementation.
void SetTxRxMcsSetUnequal(uint8_t txRxMcsSetUnequal)
Set the transmit / receive MCS set unequal.
Ptr< QosTxop > GetVOQueue(void) const
Accessor for the AC_VO channel access function.
uint16_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI (in bytes)
Mac48Address GetBssid(void) const
uint16_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE (in bytes)
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities of the device.
void ResetWifiPhy(void)
Remove currently attached WifiPhy device from this MAC.
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
void SetRxHighestSupportedDataRate(uint16_t maxSupportedRate)
Set the receive highest supported data rate.
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.
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 SetRxStbc(uint8_t rxStbc)
Set the receive STBC.
Status code for association response.
virtual void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > stationManager)
void SetLinkUpCallback(Callback< void > linkUp)
virtual void DoDispose()
Destructor implementation.
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
void SetVhtSupported(bool enable)
Enable or disable VHT support for the device.
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
void SetShortGuardIntervalFor80Mhz(uint8_t shortGuardInterval)
Set the short guard interval 80 MHz.
void SetTxUnequalModulation(uint8_t txUnequalModulation)
Set the transmit unequal modulation.
void SetRxLdpc(uint8_t rxLdpc)
Set the receive LDPC.
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 SetMaxAmsduLength(uint16_t maxAmsduLength)
Set the maximum AMSDU length.
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)
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.
void SetShortGuardIntervalFor160Mhz(uint8_t shortGuardInterval)
Set the short guard interval 160 MHz.
Ptr< VhtConfiguration > GetVhtConfiguration(void) const
bool GetHtSupported() const
Return whether the device supports HT.
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void SetTxMiddle(const Ptr< MacTxMiddle > txMiddle)
Set MacTxMiddle this Txop is associated to.
void SetSupportedChannelWidth(uint8_t supportedChannelWidth)
Set the supported channel width field.
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Attribute or trace source is deprecated; user is warned.
virtual void DoInitialize()
Initialize() implementation.
void SetLdpc(uint8_t ldpc)
Set the LDPC field.
void SetShortGuardInterval20(uint8_t shortGuardInterval)
Set the short guard interval 20 field.
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
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
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 (in bytes)
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 SetTxMaxNSpatialStreams(uint8_t maxTxSpatialStreams)
Set the transmit maximum N spatial streams.
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
void Receive(Ptr< WifiMacQueueItem > mpdu)
Receive a packet.
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 SetRxHighestSupportedLgiDataRate(uint16_t supportedDatarate)
Set the receive highest supported LGI data rate.
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
void SetTxHighestSupportedLgiDataRate(uint16_t supportedDatarate)
Set the transmit highest supported LGI data rate.
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 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 ...
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
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.
uint8_t GetMaxSupportedRxSpatialStreams(void) const
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities of the device.
void SetHtSupported(uint8_t htSupported)
Set the HT supported field.
virtual void TxFailed(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver (i.e.