|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #include "ns3/pointer.h"
23 #include "ns3/packet.h"
33 #include "ns3/ht-configuration.h"
34 #include "ns3/vht-configuration.h"
35 #include "ns3/he-configuration.h"
38 #include "ns3/he-frame-exchange-manager.h"
61 m_txop = CreateObject<Txop> ();
88 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
90 i->second->Initialize ();
113 for (EdcaQueues::iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
132 m_feManager = CreateObject<HeFrameExchangeManager> ();
136 m_feManager = CreateObject<VhtFrameExchangeManager> ();
140 m_feManager = CreateObject<HtFrameExchangeManager> ();
144 m_feManager = CreateObject<QosFrameExchangeManager> ();
148 m_feManager = CreateObject<FrameExchangeManager> ();
156 m_feManager->GetWifiTxTimer ().SetMpduResponseTimeoutCallback (
MakeCallback (&MpduResponseTimeoutTracedCallback::operator(),
158 m_feManager->GetWifiTxTimer ().SetPsduResponseTimeoutCallback (
MakeCallback (&PsduResponseTimeoutTracedCallback::operator(),
160 m_feManager->GetWifiTxTimer ().SetPsduMapResponseTimeoutCallback (
MakeCallback (&PsduMapResponseTimeoutTracedCallback::operator(),
169 for (
const auto& pair :
m_edca)
171 pair.second->SetQosFrameExchangeManager (DynamicCast<QosFrameExchangeManager> (
m_feManager));
214 bool sgiSupported = htConfiguration->GetShortGuardIntervalSupported ();
216 capabilities.
SetLdpc (htConfiguration->GetLdpcSupported ());
223 if (maxAmsduSize <= 3839)
234 maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
239 uint64_t maxSupportedRate = 0;
243 uint8_t nss = (mcs.GetMcsValue () / 8) + 1;
246 if (dataRate > maxSupportedRate)
248 maxSupportedRate = dataRate;
249 NS_LOG_DEBUG (
"Updating maxSupportedRate to " << maxSupportedRate);
271 bool sgiSupported = htConfiguration->GetShortGuardIntervalSupported ();
284 if (maxAmsduSize <= 3839)
288 else if (maxAmsduSize <= 7935)
299 maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
303 capabilities.
SetRxLdpc (htConfiguration->GetLdpcSupported ());
309 if (mcs.GetMcsValue () > maxMcs)
311 maxMcs = mcs.GetMcsValue ();
323 uint64_t maxSupportedRateLGI = 0;
333 NS_LOG_DEBUG (
"Updating maxSupportedRateLGI to " << maxSupportedRateLGI);
355 uint8_t channelWidthSet = 0;
358 channelWidthSet |= 0x01;
362 channelWidthSet |= 0x02;
366 channelWidthSet |= 0x04;
371 if (heConfiguration->GetGuardInterval () <=
NanoSeconds (1600))
376 if (heConfiguration->GetGuardInterval () ==
NanoSeconds (800))
384 maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
391 if (mcs.GetMcsValue () > maxMcs)
393 maxMcs = mcs.GetMcsValue ();
478 m_edca.insert (std::make_pair (ac, edca));
503 return m_edca.find (ac)->second;
544 return m_edca.find (ac)->second->GetWifiMacQueue ();
747 <<
") does not support Enqueue() with from address");
811 htFem->SendAddBaResponse (&reqHdr, from);
828 m_edca[ac]->GotAddBaResponse (&respHdr, from);
847 htFem->DestroyBlockAckAgreement (from, delBaHdr.
GetTid ());
856 m_edca[ac]->GotDelBaFrame (&delBaHdr, from);
862 NS_FATAL_ERROR (
"Unsupported Action field in Block Ack Action frame");
879 ForwardUp (msduPair.first, msduPair.second.GetSourceAddr (),
880 msduPair.second.GetDestinationAddr ());
889 .SetGroupName (
"Wifi")
890 .AddAttribute (
"QosSupported",
891 "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA.",
896 .AddAttribute (
"CtsToSelfSupported",
897 "Use CTS to Self when using a rate that is not in the basic rate set.",
901 .AddAttribute (
"VO_MaxAmsduSize",
902 "Maximum length in bytes of an A-MSDU for AC_VO access class "
903 "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
904 "Value 0 means A-MSDU aggregation is disabled for that AC.",
907 MakeUintegerChecker<uint16_t> (0, 11398))
908 .AddAttribute (
"VI_MaxAmsduSize",
909 "Maximum length in bytes of an A-MSDU for AC_VI access class "
910 "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
911 "Value 0 means A-MSDU aggregation is disabled for that AC.",
914 MakeUintegerChecker<uint16_t> (0, 11398))
915 .AddAttribute (
"BE_MaxAmsduSize",
916 "Maximum length in bytes of an A-MSDU for AC_BE access class "
917 "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
918 "Value 0 means A-MSDU aggregation is disabled for that AC.",
921 MakeUintegerChecker<uint16_t> (0, 11398))
922 .AddAttribute (
"BK_MaxAmsduSize",
923 "Maximum length in bytes of an A-MSDU for AC_BK access class "
924 "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
925 "Value 0 means A-MSDU aggregation is disabled for that AC.",
928 MakeUintegerChecker<uint16_t> (0, 11398))
929 .AddAttribute (
"VO_MaxAmpduSize",
930 "Maximum length in bytes of an A-MPDU for AC_VO access class "
931 "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
932 "Value 0 means A-MPDU aggregation is disabled for that AC.",
935 MakeUintegerChecker<uint32_t> (0, 6500631))
936 .AddAttribute (
"VI_MaxAmpduSize",
937 "Maximum length in bytes of an A-MPDU for AC_VI access class "
938 "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
939 "Value 0 means A-MPDU aggregation is disabled for that AC.",
942 MakeUintegerChecker<uint32_t> (0, 6500631))
943 .AddAttribute (
"BE_MaxAmpduSize",
944 "Maximum length in bytes of an A-MPDU for AC_BE access class "
945 "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
946 "Value 0 means A-MPDU aggregation is disabled for that AC.",
949 MakeUintegerChecker<uint32_t> (0, 6500631))
950 .AddAttribute (
"BK_MaxAmpduSize",
951 "Maximum length in bytes of an A-MPDU for AC_BK access class "
952 "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
953 "Value 0 means A-MPDU aggregation is disabled for that AC.",
956 MakeUintegerChecker<uint32_t> (0, 6500631))
957 .AddAttribute (
"VO_BlockAckThreshold",
958 "If number of packets in VO queue reaches this value, "
959 "block ack mechanism is used. If this value is 0, block ack is never used."
960 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
963 MakeUintegerChecker<uint8_t> (0, 64))
964 .AddAttribute (
"VI_BlockAckThreshold",
965 "If number of packets in VI queue reaches this value, "
966 "block ack mechanism is used. If this value is 0, block ack is never used."
967 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
970 MakeUintegerChecker<uint8_t> (0, 64))
971 .AddAttribute (
"BE_BlockAckThreshold",
972 "If number of packets in BE queue reaches this value, "
973 "block ack mechanism is used. If this value is 0, block ack is never used."
974 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
977 MakeUintegerChecker<uint8_t> (0, 64))
978 .AddAttribute (
"BK_BlockAckThreshold",
979 "If number of packets in BK queue reaches this value, "
980 "block ack mechanism is used. If this value is 0, block ack is never used."
981 "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
984 MakeUintegerChecker<uint8_t> (0, 64))
985 .AddAttribute (
"VO_BlockAckInactivityTimeout",
986 "Represents max time (blocks of 1024 microseconds) allowed for block ack"
987 "inactivity for AC_VO. If this value isn't equal to 0 a timer start after that a"
988 "block ack setup is completed and will be reset every time that a block ack"
989 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
992 MakeUintegerChecker<uint16_t> ())
993 .AddAttribute (
"VI_BlockAckInactivityTimeout",
994 "Represents max time (blocks of 1024 microseconds) allowed for block ack"
995 "inactivity for AC_VI. If this value isn't equal to 0 a timer start after that a"
996 "block ack setup is completed and will be reset every time that a block ack"
997 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1000 MakeUintegerChecker<uint16_t> ())
1001 .AddAttribute (
"BE_BlockAckInactivityTimeout",
1002 "Represents max time (blocks of 1024 microseconds) allowed for block ack"
1003 "inactivity for AC_BE. If this value isn't equal to 0 a timer start after that a"
1004 "block ack setup is completed and will be reset every time that a block ack"
1005 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1008 MakeUintegerChecker<uint16_t> ())
1009 .AddAttribute (
"BK_BlockAckInactivityTimeout",
1010 "Represents max time (blocks of 1024 microseconds) allowed for block ack"
1011 "inactivity for AC_BK. If this value isn't equal to 0 a timer start after that a"
1012 "block ack setup is completed and will be reset every time that a block ack"
1013 "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1016 MakeUintegerChecker<uint16_t> ())
1017 .AddAttribute (
"ShortSlotTimeSupported",
1018 "Whether or not short slot time is supported (only used by ERP APs or STAs).",
1023 .AddAttribute (
"Txop",
1027 MakePointerChecker<Txop> ())
1028 .AddAttribute (
"VO_Txop",
1029 "Queue that manages packets belonging to AC_VO access class.",
1032 MakePointerChecker<QosTxop> ())
1033 .AddAttribute (
"VI_Txop",
1034 "Queue that manages packets belonging to AC_VI access class.",
1037 MakePointerChecker<QosTxop> ())
1038 .AddAttribute (
"BE_Txop",
1039 "Queue that manages packets belonging to AC_BE access class.",
1042 MakePointerChecker<QosTxop> ())
1043 .AddAttribute (
"BK_Txop",
1044 "Queue that manages packets belonging to AC_BK access class.",
1047 MakePointerChecker<QosTxop> ())
1048 .AddTraceSource (
"TxOkHeader",
1049 "The header of successfully transmitted packet.",
1051 "ns3::WifiMacHeader::TracedCallback",
1053 "Use the AckedMpdu trace instead.")
1054 .AddTraceSource (
"TxErrHeader",
1055 "The header of unsuccessfully transmitted packet.",
1057 "ns3::WifiMacHeader::TracedCallback",
1059 "Depending on the failure type, use the NAckedMpdu trace, the "
1060 "DroppedMpdu trace or one of the traces associated with TX timeouts.")
1061 .AddTraceSource (
"AckedMpdu",
1062 "An MPDU that was successfully acknowledged, via either a "
1063 "Normal Ack or a Block Ack.",
1065 "ns3::WifiMacQueueItem::TracedCallback")
1066 .AddTraceSource (
"NAckedMpdu",
1067 "An MPDU that was negatively acknowledged via a Block Ack.",
1069 "ns3::WifiMacQueueItem::TracedCallback")
1070 .AddTraceSource (
"DroppedMpdu",
1071 "An MPDU that was dropped for the given reason (see WifiMacDropReason).",
1073 "ns3::RegularWifiMac::DroppedMpduCallback")
1074 .AddTraceSource (
"MpduResponseTimeout",
1075 "An MPDU whose response was not received before the timeout, along with "
1076 "an identifier of the type of timeout (see WifiTxTimer::Reason) and the "
1077 "TXVECTOR used to transmit the MPDU. This trace source is fired when a "
1078 "CTS is missing after an RTS or a Normal Ack is missing after an MPDU "
1079 "or after a DL MU PPDU acknowledged in SU format.",
1081 "ns3::RegularWifiMac::MpduResponseTimeoutCallback")
1082 .AddTraceSource (
"PsduResponseTimeout",
1083 "A PSDU whose response was not received before the timeout, along with "
1084 "an identifier of the type of timeout (see WifiTxTimer::Reason) and the "
1085 "TXVECTOR used to transmit the PSDU. This trace source is fired when a "
1086 "BlockAck is missing after an A-MPDU, a BlockAckReq (possibly in the "
1087 "context of the acknowledgment of a DL MU PPDU in SU format) or a TB PPDU "
1088 "(in the latter case the missing BlockAck is a Multi-STA BlockAck).",
1090 "ns3::RegularWifiMac::PsduResponseTimeoutCallback")
1091 .AddTraceSource (
"PsduMapResponseTimeout",
1092 "A PSDU map for which not all the responses were received before the timeout, "
1093 "along with an identifier of the type of timeout (see WifiTxTimer::Reason), "
1094 "the set of MAC addresses of the stations that did not respond and the total "
1095 "number of stations that had to respond. This trace source is fired when not "
1096 "all the addressed stations responded to an MU-BAR Trigger frame (either sent as "
1097 "a SU frame or aggregated to PSDUs in the DL MU PPDU), a Basic Trigger Frame or "
1098 "a BSRP Trigger Frame.",
1100 "ns3::RegularWifiMac::PsduMapResponseTimeoutCallback")
1141 NS_FATAL_ERROR (
"Unsupported WifiPhyStandard in RegularWifiMac::FinishConfigureStandard ()");
1157 for (EdcaQueues::const_iterator i =
m_edca.begin (); i !=
m_edca.end (); ++i)
1159 ConfigureDcf (i->second, cwMin, cwMax, isDsssOnly, i->first);
1166 uint32_t maxSize = 0;
1191 uint16_t maxSize = 0;
void SetupEdcaQueue(AcIndex ac)
This method is a private utility invoked to configure the channel access function for the specified A...
@ WIFI_STANDARD_80211n_5GHZ
virtual void SetDroppedMpduCallback(DroppedMpdu callback)
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< FrameExchangeManager > GetFrameExchangeManager(void) const
Get the Frame Exchange Manager.
The IEEE 802.11ac VHT Capabilities.
void Dispose(void)
Dispose of this Object.
void SetTxMcsSetDefined(uint8_t txMcsSetDefined)
Set the transmit MCS set defined.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Ptr< const Packet > GetPacket(void) const
Get the packet stored in this item.
bool m_erpSupported
This Boolean is set true iff this WifiMac is to model 802.11g.
void SetBeBlockAckInactivityTimeout(uint16_t timeout)
Set BE block ack inactivity timeout.
AttributeValue implementation for Boolean.
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities of the device.
void SetTxUnequalModulation(uint8_t txUnequalModulation)
Set the transmit unequal modulation.
Mac48Address m_address
MAC address of this station.
void SetViBlockAckInactivityTimeout(uint16_t timeout)
Set VI block ack inactivity timeout.
void SetHtSupported(uint8_t htSupported)
Set the HT Supported flag.
Ssid GetSsid(void) const override
void SetHeSupported(uint8_t heSupported)
Set HE supported.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetChannelAccessManager(const Ptr< ChannelAccessManager > manager)
Set ChannelAccessManager this Txop is associated to.
uint32_t m_viMaxAmpduSize
maximum A-MPDU size for AC_VI (in bytes)
@ WIFI_MOD_CLASS_HT
HT (Clause 19)
@ WIFI_MOD_CLASS_HE
HE (Clause 27)
void SetSupportedChannelWidthSet(uint8_t channelWidthSet)
Set the supported channel width set.
void SetHeLtfAndGiForHePpdus(uint8_t heLtfAndGiForHePpdus)
Set HE LTF and GI for HE PDPUs.
virtual void DoDispose()
Destructor implementation.
void SetBssid(Mac48Address bssid)
static TypeId GetTypeId(void)
Get the type ID.
@ WIFI_STANDARD_80211ax_2_4GHZ
void SetHighestNssSupported(uint8_t nss)
Set highest NSS supported.
Ptr< QosTxop > GetQosTxop(AcIndex ac) const
Accessor for a specified EDCA object.
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
@ WIFI_STANDARD_80211ax_5GHZ
bool GetHeSupported() const
Return whether the device supports HE.
void SetRxHighestSupportedDataRate(uint16_t maxSupportedRate)
Set the receive highest supported data rate.
Ptr< BlockAckManager > GetBaManager(void)
Get the Block Ack Manager associated with this QosTxop.
void SetRxMcsMap(uint8_t mcs, uint8_t nss)
The IEEE 802.11ax HE Capabilities.
void SetBlockAckInactivityTimeout(uint16_t timeout)
Set the BlockAck inactivity timeout.
void SetLinkDownCallback(Callback< void > linkDown) override
Ptr< VhtConfiguration > GetVhtConfiguration(void) const
bool m_shortSlotTimeSupported
flag whether short slot time is supported
void SetRxStbc(uint8_t rxStbc)
Set the receive STBC.
Mac48Address GetBssid(void) const override
bool GetErpSupported() const
Return whether the device supports ERP.
Hold objects of type Ptr<T>.
uint32_t GetMaxAmpduSize(AcIndex ac) const
Return the maximum A-MPDU size of the given Access Category.
uint16_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI (in bytes)
void SetTxRxMcsSetUnequal(uint8_t txRxMcsSetUnequal)
Set the transmit / receive MCS set unequal.
void SetRxMcsBitmask(uint8_t index)
Set the receive MCS bitmask.
void SetVhtSupported(uint8_t vhtSupported)
Set the VHT Supported flag.
TypeOfStation
Enumeration for type of station.
Ptr< MacRxMiddle > m_rxMiddle
RX middle (defragmentation etc.)
void SetLinkUpCallback(Callback< void > linkUp) override
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
const WifiMacHeader & GetHeader(void) const
Get the header stored in this item.
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.
uint16_t m_voMaxAmsduSize
maximum A-MSDU size for AC_VO (in bytes)
bool GetQosSupported() const
Return whether the device supports QoS.
U * PeekPointer(const Ptr< U > &p)
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void SetDroppedMpduCallback(DroppedMpdu callback) override
void SetSsid(Ssid ssid) override
uint16_t GetNMcs(void) const
The IEEE 802.11 SSID Information Element.
uint16_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK (in bytes)
TypeOfStation m_typeOfStation
the type of station
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
void SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ack mechanism.
void SetRxLdpc(uint8_t rxLdpc)
Set the receive LDPC.
uint32_t m_bkMaxAmpduSize
maximum A-MPDU size for AC_BK (in bytes)
uint16_t GetMaxAmsduSize(AcIndex ac) const
Return the maximum A-MSDU size of the given Access Category.
void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
Callback< void > m_linkDown
Callback when a link is down.
Mac48Address GetAddress(void) const override
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
Smart pointer class similar to boost::intrusive_ptr.
uint8_t GetMaxSupportedTxSpatialStreams(void) const
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
void SetHighestMcsSupported(uint8_t mcs)
Set highest MCS supported.
bool SupportsSendFrom(void) const override
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
DroppedMpduTracedCallback m_droppedMpduCallback
This trace indicates that an MPDU was dropped for the given reason.
uint32_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE (in bytes)
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
void SetHtSupported(uint8_t htSupported)
Set the HT supported field.
void SetShortGuardIntervalFor80Mhz(uint8_t shortGuardInterval)
Set the short guard interval 80 MHz.
void SetTxMaxNSpatialStreams(uint8_t maxTxSpatialStreams)
Set the transmit maximum N spatial streams.
bool GetVhtSupported() const
Return whether the device supports VHT.
bool m_ctsToSelfSupported
flag indicating whether CTS-To-Self is supported
void ResetWifiPhy(void) override
Remove currently attached WifiPhy device from this MAC.
void SetupFrameExchangeManager(void)
Create a Frame Exchange Manager depending on the supported version of the standard.
void SetAddress(Mac48Address address) override
The HT Capabilities Information Element.
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Maps TID (Traffic ID) to Access classes.
void DoDispose() override
Destructor implementation.
Callback< void > m_linkUp
Callback when a link is up.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Ptr< WifiMacQueue > GetWifiMacQueue() const
Return the packet queue associated with this Txop.
Ptr< Txop > m_txop
This holds a pointer to the TXOP instance for this WifiMac - used for transmission of frames to non-Q...
bool GetShortSlotTimeSupported(void) const override
uint32_t m_voMaxAmpduSize
maximum A-MPDU size for AC_VO (in bytes)
Ptr< Txop > GetTxop(void) const
Accessor for the DCF object.
base class for all MAC-level wifi objects.
Ptr< HeConfiguration > GetHeConfiguration(void) const
Ptr< WifiRemoteStationManager > m_stationManager
Remote station manager (rate control, RTS/CTS/fragmentation thresholds etc.)
Ptr< const AttributeChecker > MakeBooleanChecker(void)
void SetMaxAmsduLength(uint16_t maxAmsduLength)
Set the maximum AMSDU length.
WifiPhyBand GetPhyBand(void) const
Get the configured Wi-Fi band.
void SetVoBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VO.
@ OBSOLETE
Attribute or trace source is not used anymore; simulation fails.
void SetLdpc(uint8_t ldpc)
Set the LDPC field.
MpduTracedCallback m_ackedMpduCallback
ack'ed MPDU callback
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
void SetTypeOfStation(TypeOfStation type) override
This method is invoked by a subclass to specify what type of station it is implementing.
void SetTxMcsMap(uint8_t mcs, uint8_t nss)
@ WIFI_STANDARD_80211ax_6GHZ
MpduResponseTimeoutTracedCallback m_mpduResponseTimeoutCallback
MPDU response timeout traced callback.
void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > stationManager) override
void SetBeBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BE.
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
uint16_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE (in bytes)
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...
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
virtual Ptr< WifiMacQueue > GetTxopQueue(AcIndex ac) const
Get the wifi MAC queue of the (Qos)Txop associated with the given AC.
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
Mac48Address m_bssid
the BSSID
TypeOfStation GetTypeOfStation(void) const override
Return the type of station.
void SetVhtSupported(uint8_t vhtSupported)
Set the VHT supported field.
void SetTxHighestSupportedLgiDataRate(uint16_t supportedDatarate)
Set the transmit highest supported LGI data rate.
TracedCallback< const WifiMacHeader & > m_txErrCallback
transmit error callback
void SetViBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VI.
bool m_dsssSupported
This Boolean is set true iff this WifiMac is to model 802.11b.
The Extended Capabilities Information Element.
virtual void SetQosSupported(bool enable)
Enable or disable QoS support for the device.
@ WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
Ptr< HtConfiguration > GetHtConfiguration(void) const
void ConfigureStandard(WifiStandard standard) override
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities of the device.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void Enqueue(Ptr< Packet > packet, Mac48Address to, Mac48Address from) override
virtual void SetWifiMac(const Ptr< RegularWifiMac > mac)
Set the wifi MAC this Txop is associated to.
void SetLdpcCodingInPayload(uint8_t ldpcCodingInPayload)
Set indication whether the transmission and reception of LDPC encoded packets is supported.
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities of the device.
Ptr< FrameExchangeManager > m_feManager
Frame Exchange Manager.
void SetDsssSupported(bool enable)
Enable or disable DSSS support for the device.
void SetBkBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BK.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
void SetForwardUpCallback(ForwardUpCallback upCallback) override
TracedCallback< const WifiMacHeader & > m_txOkCallback
transmit OK callback
void SetSupportedChannelWidth(uint8_t supportedChannelWidth)
Set the supported channel width field.
void SetWifiPhy(const Ptr< WifiPhy > phy) override
void SetShortGuardInterval20(uint8_t shortGuardInterval)
Set the short guard interval 20 field.
Ptr< QosTxop > GetBKQueue(void) const
Accessor for the AC_BK channel access function.
void SetShortSlotTimeSupported(bool enable) override
Enable or disable short slot time feature.
void SetLSigProtectionSupport(uint8_t lSigProtection)
Set the LSIG protection support.
uint16_t GetChannelWidth(void) const
void DoInitialize() override
Initialize() implementation.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
@ WIFI_PHY_BAND_6GHZ
The 6 GHz band.
uint8_t GetMaxSupportedRxSpatialStreams(void) const
Ptr< ChannelAccessManager > m_channelAccessManager
channel access manager
bool GetDsssSupported() const
Return whether the device supports DSSS.
void ConfigureDcf(Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, bool isDsss, AcIndex ac)
Hold an unsigned integer type.
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(void) const override
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities of the device.
MpduTracedCallback m_nackedMpduCallback
nack'ed MPDU callback
Ptr< QosTxop > GetBEQueue(void) const
Accessor for the AC_BE channel access function.
Ptr< WifiPhy > m_phy
Wifi PHY.
void SetRxHighestSupportedLgiDataRate(uint16_t supportedDatarate)
Set the receive highest supported LGI data rate.
@ WIFI_STANDARD_80211n_2_4GHZ
void SetShortGuardIntervalFor160Mhz(uint8_t shortGuardInterval)
Set the short guard interval 160 MHz.
WifiStandard
Identifies the allowed configurations that a Wifi device is configured to use.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
@ WIFI_MOD_CLASS_VHT
VHT (Clause 22)
void SetMaxMpduLength(uint16_t length)
Set the maximum MPDU length.
void SetPromisc(void) override
Sets the interface in promiscuous mode.
virtual ~RegularWifiMac()
void SetTxStbc(uint8_t txStbc)
Set the transmit STBC.
Ptr< QosTxop > GetVOQueue(void) const
Accessor for the AC_VO channel access function.
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
void SetTxMiddle(const Ptr< MacTxMiddle > txMiddle)
Set MacTxMiddle this Txop is associated to.
std::list< WifiMode > GetMcsList(void) const
The WifiPhy::GetMcsList() method is used (e.g., by a WifiRemoteStationManager) to determine the set o...
bool GetHtSupported() const
Return whether the device supports HT.
bool m_qosSupported
This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service.
Ptr< QosTxop > GetVIQueue(void) const
Accessor for the AC_VI channel access function.
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 SetChannelWidthSet(uint8_t channelWidthSet)
Set channel width set.
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
PsduResponseTimeoutTracedCallback m_psduResponseTimeoutCallback
PSDU response timeout traced callback.
void SetErpSupported(bool enable)
Enable or disable ERP support for the device.
Ssid m_ssid
Service Set ID (SSID)
void SetShortGuardInterval40(uint8_t shortGuardInterval)
Set the short guard interval 40 field.
PsduMapResponseTimeoutTracedCallback m_psduMapResponseTimeoutCallback
PSDU map response timeout traced callback.
Ptr< WifiPhy > GetWifiPhy(void) const override
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.