18#include "ns3/packet.h"
30 return std::pow(10.0, 0.1 * val);
36 return std::pow(10.0, 0.1 * (val - 30.0));
43 return 10.0 * std::log10(val) + 30.0;
49 return 10.0 * std::log10(ratio);
92 userInfo.SetMuBarTriggerDepUserInfo(bar);
141 else if (constSize == 4)
156 else if (constSize == 4)
171 return ((seq - winstart + 4096) % 4096) < winsize;
178 packet->AddTrailer(fcs);
188 size = packet->GetSize();
201 if (dlLinkMapping.empty() && ulLinkMapping.empty())
207 if (dlLinkMapping.size() != 8 || ulLinkMapping.size() != 8)
213 const auto& linkSet = dlLinkMapping.cbegin()->second;
215 for (
const auto& linkMapping : {std::cref(dlLinkMapping), std::cref(ulLinkMapping)})
217 for (
const auto& [tid, links] : linkMapping.get())
219 if (links != linkSet)
240 return apMac && apMac->UseGcr(hdr);
246 const auto isGcr =
IsGcr(mac, hdr);
253 return apMac->GetGcrManager()->GetIndividuallyAddressedRecipient(addr1);
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Implements the IEEE 802.11 MAC trailer.
uint32_t GetSerializedSize() const override
uint16_t GetConstellationSize() const
uint64_t GetDataRate(MHz_u channelWidth, Time guardInterval, uint8_t nss) const
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiMode GetMode(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the selected payload transmission mode.
WifiPreamble GetPreambleType() const
const HeMuUserInfoMap & GetHeMuUserInfoMap() const
Get a const reference to the map HE MU user-specific transmission information indexed by STA-ID.
WifiModulationClass GetModulationClass() const
Get the modulation class specified by this TXVECTOR.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
@ WIFI_MOD_CLASS_OFDM
OFDM (Clause 17)
@ WIFI_MOD_CLASS_HR_DSSS
HR/DSSS (Clause 16)
@ WIFI_MOD_CLASS_DSSS
DSSS (Clause 15)
@ WIFI_MOD_CLASS_ERP_OFDM
ERP-OFDM (18.4)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
const Time WIFI_TU
Wi-Fi Time Unit (see IEEE 802.11-2020 sec. 3.1)
uint32_t GetRtsSize()
Return the total RTS size (including FCS trailer).
dB_u RatioToDb(double ratio)
Convert from ratio to dB.
dBm_u WToDbm(Watt_u val)
Convert from Watts to dBm.
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
bool IsGroupcast(const Mac48Address &adr)
Check whether a MAC destination address corresponds to a groupcast transmission.
std::map< uint8_t, std::set< uint8_t > > WifiTidLinkMapping
TID-indexed map of the link set to which the TID is mapped.
Time GetEstimatedAckTxTime(const WifiTxVector &txVector)
double dBm_u
dBm weak type
uint32_t GetBlockAckRequestSize(BlockAckReqType type)
Return the total BlockAckRequest size (including FCS trailer).
constexpr int WIFI_TU_US
Wi-Fi Time Unit value in microseconds (see IEEE 802.11-2020 sec.
double DbToRatio(dB_u val)
Convert from dB to ratio.
uint32_t GetMuBarSize(std::list< BlockAckReqType > types)
Return the total MU-BAR size (including FCS trailer).
Watt_u DbmToW(dBm_u val)
Convert from dBm to Watts.
bool TidToLinkMappingValidForNegType1(const WifiTidLinkMapping &dlLinkMapping, const WifiTidLinkMapping &ulLinkMapping)
Check if the given TID-to-Link Mappings are valid for a negotiation type of 1.
uint32_t GetBlockAckSize(BlockAckType type)
Return the total BlockAck size (including FCS trailer).
void AddWifiMacTrailer(Ptr< Packet > packet)
Add FCS trailer to a packet.
uint32_t GetAckSize()
Return the total Ack size (including FCS trailer).
uint32_t GetSize(Ptr< const Packet > packet, const WifiMacHeader *hdr, bool isAmpdu)
Return the total size of the packet after WifiMacHeader and FCS trailer have been added.
static constexpr uint16_t SU_STA_ID
STA_ID to identify a single user (SU)
bool IsGcr(Ptr< WifiMac > mac, const WifiMacHeader &hdr)
Return whether a given packet is transmitted using the GCR service.
double Watt_u
Watt weak type.
uint32_t GetCtsSize()
Return the total CTS size (including FCS trailer).
Mac48Address GetIndividuallyAddressedRecipient(Ptr< WifiMac > mac, const WifiMacHeader &hdr)
Get the MAC address of the individually addressed recipient to use for a given packet.
bool IsInWindow(uint16_t seq, uint16_t winstart, uint16_t winsize)
The different BlockAckRequest variants.
The different BlockAck variants.