|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
25 #include "ns3/vht-phy.h"
26 #include "ns3/wifi-phy-band.h"
27 #include "ns3/callback.h"
76 HePhy (
bool buildModeList =
true);
89 uint8_t nExtensionLtf = 0)
const override;
94 Time ppduDuration)
override;
98 Time rxDuration)
override;
318 static uint64_t
GetPhyRate (uint8_t mcsValue, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss);
349 static uint64_t
GetDataRate (uint8_t mcsValue, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss);
368 static bool IsModeAllowed (uint16_t channelWidth, uint8_t nss);
uint64_t m_currentHeTbPpduUid
UID of the HE TB PPDU being received.
std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
A map of PPDU field elements per preamble type.
PhyFieldRxStatus ProcessSigA(Ptr< Event > event, PhyFieldRxStatus status) override
Process SIG-A, perform amendment-specific actions, and provide an updated status of the reception.
Ptr< const WifiPsdu > GetAddressedPsduInPpdu(Ptr< const WifiPpdu > ppdu) const override
Get the PSDU addressed to that PHY in a PPDU (useful for MU PPDU).
uint16_t GetNonOfdmaWidth(HeRu::RuSpec ru) const
Get the width in MHz of the non-OFDMA portion of an HE TB PPDU.
WifiSpectrumBand GetNonOfdmaBand(const WifiTxVector &txVector, uint16_t staId) const
Get the band used to transmit the non-OFDMA part of an HE TB PPDU.
WifiMode GetSigMode(WifiPpduField field, const WifiTxVector &txVector) const override
Get the WifiMode for the SIG field specified by the PPDU field.
uint8_t bssColor
BSS color.
WifiMode GetSigAMode(void) const override
static WifiMode GetHeMcs11(void)
Return MCS 11 from HE MCS values.
bool IsConfigSupported(Ptr< const WifiPpdu > ppdu) const override
Checks if the signaled configuration (excluding bandwidth) is supported by the PHY.
Time CalculateNonOfdmaDurationForHeTb(const WifiTxVector &txVector) const
std::pair< uint32_t, uint32_t > WifiSpectrumBand
typedef for a pair of start and stop sub-band indexes
An identifier for simulation events.
void StartReceiveOfdmaPayload(Ptr< Event > event)
Start receiving the PSDU (i.e.
Time GetTrainingDuration(const WifiTxVector &txVector, uint8_t nDataLtf, uint8_t nExtensionLtf=0) const override
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< void, HeSigAParameters > EndOfHeSigACallback
Callback upon end of HE-SIG-A.
static bool IsModeAllowed(uint16_t channelWidth, uint8_t nss)
Check whether the combination of <MCS, channel width, NSS> is allowed.
static const PpduFormats m_hePpduFormats
HE PPDU formats.
static WifiMode GetHeMcs0(void)
Return MCS 0 from HE MCS values.
void BuildModeList(void) override
Build mode list.
static WifiMode GetHeMcs10(void)
Return MCS 10 from HE MCS values.
uint32_t GetMaxPsduSize(void) const override
Get the maximum PSDU size in bytes.
PhyFieldRxStatus ProcessSigB(Ptr< Event > event, PhyFieldRxStatus status) override
Process SIG-B, perform amendment-specific actions, and provide an updated status of the reception.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Time GetLSigDuration(WifiPreamble preamble) const override
void CancelAllEvents(void) override
Cancel and clear all running events.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
static WifiCodeRate GetCodeRate(uint8_t mcsValue)
Return the coding rate corresponding to the supplied HE MCS index.
WifiSpectrumBand GetRuBandForTx(const WifiTxVector &txVector, uint16_t staId) const
Get the band in the TX spectrum associated with the RU used by the PSDU transmitted to/by a given STA...
static uint64_t CalculateNonHtReferenceRate(WifiCodeRate codeRate, uint16_t constellationSize)
Return the rate (in bps) of the non-HT Reference Rate which corresponds to the supplied code rate and...
uint64_t m_previouslyTxPpduUid
UID of the previously sent PPDU, used by AP to recognize response HE TB PPDUs.
std::pair< uint16_t, WifiSpectrumBand > GetChannelWidthAndBand(const WifiTxVector &txVector, uint16_t staId) const override
Get the channel width and band to use (will be overloaded by child classes).
static WifiMode GetHeMcs5(void)
Return MCS 5 from HE MCS values.
Smart pointer class similar to boost::intrusive_ptr.
static uint16_t ConvertHeTbPpduDurationToLSigLength(Time ppduDuration, WifiPhyBand band)
static WifiMode GetHeMcs1(void)
Return MCS 1 from HE MCS values.
uint16_t WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
EndOfHeSigACallback m_endOfHeSigACallback
end of HE-SIG-A callback
WifiPhyRxfailureReason
Enumeration of the possible reception failure reasons.
void DoEndReceivePayload(Ptr< const WifiPpdu > ppdu) override
Perform amendment-specific actions at the end of the reception of the payload.
uint16_t GetStaId(const Ptr< const WifiPpdu > ppdu) const override
Return the STA ID that has been assigned to the station this PHY belongs to.
void StartTx(Ptr< WifiPpdu > ppdu) override
This function is called by SpectrumWifiPhy to send the PPDU while performing amendment-specific actio...
void SetEndOfHeSigACallback(EndOfHeSigACallback callback)
Set a callback for a end of HE-SIG-A.
represent a single transmission mode
Status of the reception of the PPDU field.
static uint64_t GetPhyRateFromTxVector(const WifiTxVector &txVector, uint16_t staId=SU_STA_ID)
Return the PHY rate corresponding to the supplied TXVECTOR for the STA-ID.
static WifiMode GetHeMcs4(void)
Return MCS 4 from HE MCS values.
uint8_t GetBssColor(void) const
uint64_t GetCurrentHeTbPpduUid(void) const
uint64_t ObtainNextUid(const WifiTxVector &txVector) override
Obtain the next UID for the PPDU to transmit.
Time CalculateTxDuration(WifiConstPsduMap psduMap, const WifiTxVector &txVector, WifiPhyBand band) const override
HePhy(bool buildModeList=true)
Constructor for HE PHY.
Ptr< SpectrumValue > GetTxPowerSpectralDensity(double txPowerW, Ptr< const WifiPpdu > ppdu) const override
static WifiMode GetHeMcs9(void)
Return MCS 9 from HE MCS values.
Time GetSigBDuration(const WifiTxVector &txVector) const override
static Time ConvertLSigLengthToHeTbPpduDuration(uint16_t length, const WifiTxVector &txVector, WifiPhyBand band)
void StartReceivePreamble(Ptr< WifiPpdu > ppdu, RxPowerWattPerChannelBand &rxPowersW, Time rxDuration) override
Start receiving the PHY preamble of a PPDU (i.e.
WifiSpectrumBand GetRuBandForRx(const WifiTxVector &txVector, uint16_t staId) const
Get the band in the RX spectrum associated with the RU used by the PSDU transmitted to/by a given STA...
void DoStartReceivePayload(Ptr< Event > event) override
Start receiving the PSDU (i.e.
static WifiMode GetHeMcs6(void)
Return MCS 6 from HE MCS values.
Simulation virtual time values and global simulation resolution.
static WifiMode GetHeMcs3(void)
Return MCS 3 from HE MCS values.
static WifiMode GetHeMcs2(void)
Return MCS 2 from HE MCS values.
WifiPpduField
The type of PPDU field (grouped for convenience)
void NotifyEndOfHeSigA(HeSigAParameters params)
Fire a EndOfHeSigA callback (if connected) once HE-SIG-A field has been received.
static WifiMode GetHeMcs7(void)
Return MCS 7 from HE MCS values.
static WifiMode GetHeMcs8(void)
Return MCS 8 from HE MCS values.
Time GetSymbolDuration(const WifiTxVector &txVector) const override
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
const PpduFormats & GetPpduFormats(void) const override
Return the PPDU formats of the PHY.
void DoAbortCurrentReception(WifiPhyRxfailureReason reason) override
Perform amendment-specific actions before aborting the current reception.
static uint16_t GetConstellationSize(uint8_t mcsValue)
Return the constellation size corresponding to the supplied HE MCS index.
std::map< uint16_t, EventId > m_beginOfdmaPayloadRxEvents
the beginning of the OFDMA payload reception events (indexed by STA-ID)
Ptr< WifiPpdu > BuildPpdu(const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
Build amendment-specific PPDU.
static uint64_t GetDataRateFromTxVector(const WifiTxVector &txVector, uint16_t staId=SU_STA_ID)
Return the data rate corresponding to the supplied TXVECTOR for the STA-ID.
uint8_t GetNumberBccEncoders(const WifiTxVector &txVector) const override
static void InitializeModes(void)
Initialize all HE modes.
Ptr< Event > DoGetEvent(Ptr< const WifiPpdu > ppdu, RxPowerWattPerChannelBand &rxPowersW) override
Get the event corresponding to the incoming PPDU.
virtual ~HePhy()
Destructor for HE PHY.
static uint64_t GetPhyRate(uint8_t mcsValue, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
Return the PHY rate corresponding to the supplied HE MCS index, channel width, guard interval,...
std::map< WifiSpectrumBand, double > RxPowerWattPerChannelBand
A map of the received power (Watts) for each band.
PHY entity for VHT (11ac)
static uint16_t GetUsableSubcarriers(uint16_t channelWidth)
static uint64_t GetNonHtReferenceRate(uint8_t mcsValue)
Calculate the rate in bps of the non-HT Reference Rate corresponding to the supplied HE MCS index.
WifiPhyBand
Identifies the PHY band.
uint16_t GetCenterFrequencyForNonOfdmaPart(const WifiTxVector &txVector, uint16_t staId) const
Get the center frequency of the non-OFDMA part of the current TxVector for the given STA-ID.
Parameters for received HE-SIG-A for OBSS_PD based SR.
static uint64_t GetDataRate(uint8_t mcsValue, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
Return the data rate corresponding to the supplied HE MCS index, channel width, guard interval,...
uint16_t GetMeasurementChannelWidth(const Ptr< const WifiPpdu > ppdu) const override
Return the channel width used to measure the RSSI.
Time GetSigADuration(WifiPreamble preamble) const override
static WifiMode CreateHeMcs(uint8_t index)
Create and return the HE MCS corresponding to the provided index.
WifiConstPsduMap GetWifiConstPsduMap(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) const override
Get a WifiConstPsduMap from a PSDU and the TXVECTOR to use to send the PSDU.
WifiMode GetSigBMode(const WifiTxVector &txVector) const override
static WifiMode GetHeMcs(uint8_t index)
Return the HE MCS corresponding to the provided index.
void DoResetReceive(Ptr< Event > event) override
Perform amendment-specific actions before resetting PHY at the end of the PPDU under reception after ...