25 #include "ns3/event-id.h" 26 #include "ns3/error-model.h" 42 class WifiPhyStateHelper;
43 class FrameCaptureModel;
44 class PreambleDetectionModel;
45 class WifiRadioEnergyModel;
46 class UniformRandomVariable;
83 return (os <<
"UNSUPPORTED_SETTINGS");
85 return (os <<
"CHANNEL_SWITCHING");
87 return (os <<
"RXING");
89 return (os <<
"TXING");
91 return (os <<
"SLEEPING");
93 return (os <<
"BUSY_DECODING_PREAMBLE");
95 return (os <<
"PREAMBLE_DETECT_FAILURE");
97 return (os <<
"RECEPTION_ABORTED_BY_TX");
99 return (os <<
"L_SIG_FAILURE");
101 return (os <<
"SIG_A_FAILURE");
103 return (os <<
"PREAMBLE_DETECTION_PACKET_SWITCH");
105 return (os <<
"FRAME_CAPTURE_PACKET_SWITCH");
107 return (os <<
"OBSS_PD_CCA_RESET");
109 return (os <<
"FILTERED");
113 return (os <<
"UNKNOWN");
462 bool incFlag, uint32_t &totalAmpduSize,
double &totalAmpduNumSymbols,
1364 uint16_t channelFreqMhz,
1367 std::vector<bool> statusPerMpdu,
1391 uint16_t channelFreqMhz,
1411 uint16_t channelFreqMhz,
1429 uint16_t channelFreqMhz,
1723 void ResetCca (
bool powerRestricted,
double txPowerMaxSiso = 0,
double txPowerMaxMimo = 0);
1781 virtual uint16_t
GetStaId (
void)
const;
1943 Time relativeMpduStart,
static WifiMode GetVhtMcs6()
Return MCS 6 from VHT MCS values.
void NotifyRxDrop(Ptr< const WifiPsdu > psdu, WifiPhyRxfailureReason reason)
Public method used to fire a PhyRxDrop trace.
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for OFDM at 9Mbps with 5MHz channel spacing.
Ptr< NetDevice > m_device
Pointer to the device.
static WifiMode GetErpOfdmRate24Mbps()
Return a WifiMode for ERP-OFDM at 24Mbps.
uint8_t GetNTxPower(void) const
Return the number of available transmission power levels.
uint32_t m_txMpduReferenceNumber
A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU...
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
bool IsStateSwitching(void) const
void SetPifs(Time pifs)
Set the PCF Interframe Space (PIFS) for this PHY.
bool IsStateOff(void) const
FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard(uint8_t channelNumber, WifiPhyBand band, WifiPhyStandard standard) const
Lookup frequency/width pair for channelNumber/standard pair.
TracedCallback< Ptr< const Packet >, RxPowerWattPerChannelBand > m_phyRxBeginTrace
The trace source fired when a packet begins the reception process from the medium.
Simulation virtual time values and global simulation resolution.
static WifiMode GetHeMcs7()
Return MCS 7 from HE MCS values.
void NotifyTxBegin(WifiConstPsduMap psdus, double txPowerW)
Public method used to fire a PhyTxBegin trace.
static WifiMode GetErpOfdmRate36Mbps()
Return a WifiMode for ERP-OFDM at 36Mbps.
Smart pointer class similar to boost::intrusive_ptr.
void SetNTxPower(uint8_t n)
Sets the number of transmission power levels available between the minimum level and the maximum leve...
uint8_t m_channelNumber
Operating channel number.
double m_rxGainDb
Reception gain (dB)
static WifiMode GetVhtMcs8()
Return MCS 8 from VHT MCS values.
double GetRxGain(void) const
Return the reception gain (dB).
bool IsModeSupported(WifiMode mode) const
Check if the given WifiMode is supported by the PHY.
void AddSupportedChannelWidth(uint16_t width)
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for OFDM at 9Mbps.
double GetCcaEdThreshold(void) const
Return the CCA threshold (dBm).
void NotifyTxEnd(WifiConstPsduMap psdus)
Public method used to fire a PhyTxEnd trace.
static WifiMode GetOfdmRate18MbpsBW10MHz()
Return a WifiMode for OFDM at 18Mbps with 10MHz channel spacing.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
static WifiMode GetOfdmRate27MbpsBW10MHz()
Return a WifiMode for OFDM at 27Mbps with 10MHz channel spacing.
double m_txGainDb
Transmission gain (dB)
WifiMode GetMcs(uint8_t mcs) const
The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of tr...
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for OFDM at 3Mbps with 5MHz channel spacing.
static WifiMode GetVhtMcs0()
Return MCS 0 from VHT MCS values.
void AbortCurrentReception(WifiPhyRxfailureReason reason)
Due to newly arrived signal, the current reception cannot be continued and has to be aborted...
void MaybeCcaBusyDuration(void)
Eventually switch to CCA busy.
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
void StartReceivePreamble(Ptr< WifiPpdu > ppdu, RxPowerWattPerChannelBand rxPowersW)
Start receiving the PHY preamble of a PPDU (i.e.
void ResumeFromOff(void)
Resume from off mode.
Ptr< WifiPhyStateHelper > GetState(void) const
Return the WifiPhyStateHelper of this PHY.
void ResumeFromSleep(void)
Resume from sleep mode.
double m_rxSensitivityW
Receive sensitivity threshold in watts.
virtual WifiSpectrumBand ConvertHeRuSubcarriers(uint16_t channelWidth, HeRu::SubcarrierRange range) const
void ConfigureDefaultsForStandard(void)
Configure the PHY-level parameters for different Wi-Fi standard.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
virtual uint16_t GetStaId(void) const
Return the STA ID that has been assigned to the station this PHY belongs to.
static WifiMode GetHeMcs5()
Return MCS 5 from HE MCS values.
WifiPhyBand GetPhyBand(void) const
Get the configured Wi-Fi band.
Ptr< const WifiPsdu > GetAddressedPsduInPpdu(Ptr< const WifiPpdu > ppdu) const
Get the PSDU addressed to that PHY in a PPDU (useful for MU PPDU).
Time m_timeLastPreambleDetected
Record the time the last preamble was detected.
static WifiMode GetErpOfdmRate18Mbps()
Return a WifiMode for ERP-OFDM at 18Mbps.
void SetTxGain(double gain)
Sets the transmission gain (dB).
void Configure80211ax(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard...
handles interference calculations
static WifiMode GetHtMcs7()
Return MCS 7 from HT MCS values.
void SetRxSensitivity(double threshold)
Sets the receive sensitivity threshold (dBm).
virtual void ConfigureStandardAndBand(WifiPhyStandard standard, WifiPhyBand band)
Configure the PHY-level parameters for different Wi-Fi standard.
virtual void DoDispose(void)
Destructor implementation.
static WifiMode GetHePhyHeaderMode()
Forward calls to a chain of Callback.
void RebuildMcsMap(void)
Rebuild the mapping of MCS values to indices in the device MCS set.
static WifiMode GetVhtMcs5()
Return MCS 5 from VHT MCS values.
uint8_t GetNBssMembershipSelectors(void) const
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
static WifiMode GetHtMcs22()
Return MCS 22 from HT MCS values.
static WifiMode GetHtMcs14()
Return MCS 14 from HT MCS values.
static WifiMode GetOfdmRate12Mbps()
Return a WifiMode for OFDM at 12Mbps.
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
The trace source fired when a packet ends the reception process from the medium.
bool IsStateCcaBusy(void) const
void SetReceiveErrorCallback(RxErrorCallback callback)
void EndOfMpdu(Ptr< Event > event, Ptr< const WifiPsdu > psdu, size_t mpduIndex, Time relativeStart, Time mpduDuration)
The last symbol of an MPDU in an A-MPDU has arrived.
static WifiMode GetHtMcs31()
Return MCS 31 from HT MCS values.
static WifiMode GetHtMcs21()
Return MCS 21 from HT MCS values.
static WifiMode GetHtMcs30()
Return MCS 30 from HT MCS values.
void SetSlot(Time slot)
Set the slot duration for this PHY.
std::vector< uint8_t > m_bssMembershipSelectorSet
the BSS membership selector set
static WifiMode GetHtMcs10()
Return MCS 10 from HT MCS values.
static Time GetPhyPreambleDuration(WifiTxVector txVector)
void SetShortPhyPreambleSupported(bool preamble)
Enable or disable short PHY preamble.
static WifiMode GetHtMcs26()
Return MCS 26 from HT MCS values.
TracedCallback< WifiTxVector, Time > m_phyRxPayloadBeginTrace
The trace source fired when the reception of the PHY payload (PSDU) begins.
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for OFDM at 1.5Mbps with 5MHz channel spacing.
static WifiMode GetHtMcs17()
Return MCS 17 from HT MCS values.
static WifiMode GetHtMcs24()
Return MCS 24 from HT MCS values.
EventId m_endPhyRxEvent
the end of PHY receive event
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
Return a WifiMode for OFDM at 4.5Mbps with 10MHz channel spacing.
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for OFDM at 54Mbps.
void SetMobility(const Ptr< MobilityModel > mobility)
assign a mobility model to this device
void UnregisterListener(WifiPhyListener *listener)
void SetRxNoiseFigure(double noiseFigureDb)
Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
static WifiMode GetHeMcs4()
Return MCS 4 from HE MCS values.
void ConfigureHolland(void)
Configure WifiPhy with appropriate channel frequency and supported rates for Holland.
bool IsStateIdle(void) const
TracedCallback< Ptr< const Packet >, WifiPhyRxfailureReason > m_phyRxDropTrace
The trace source fired when the PHY layer drops a packet it has received.
std::pair< uint16_t, uint16_t > FrequencyWidthPair
A pair of a center frequency (MHz) and a channel width (MHz)
uint8_t m_nTxPower
Number of available transmission power levels.
static WifiMode GetHtMcs8()
Return MCS 8 from HT MCS values.
static WifiMode GetHtMcs18()
Return MCS 18 from HT MCS values.
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo, SignalNoiseDbm, uint16_t > m_phyMonitorSniffRxTrace
A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being received...
double GetTxPowerForTransmission(WifiTxVector txVector) const
Compute the transmit power (in dBm) for the next transmission.
virtual void SetFrequency(uint16_t freq)
static WifiMode GetVhtMcs4()
Return MCS 4 from VHT MCS values.
static WifiMode GetHtMcs27()
Return MCS 27 from HT MCS values.
WifiSpectrumBand GetRuBand(WifiTxVector txVector, uint16_t staId)
Get the RU band used to transmit a PSDU to a given STA in a HE MU PPDU.
void SetFrameCaptureModel(const Ptr< FrameCaptureModel > frameCaptureModel)
Sets the frame capture model.
void ResetCca(bool powerRestricted, double txPowerMaxSiso=0, double txPowerMaxMimo=0)
Reset PHY to IDLE, with some potential TX power restrictions for the next transmission.
void(* EndOfHePreambleCallback)(HePreambleParameters params)
TracedCallback signature for end of HE-SIG-A events.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
static WifiMode GetOfdmRate36Mbps()
Return a WifiMode for OFDM at 36Mbps.
uint8_t m_initialChannelNumber
Initial channel number.
void NotifyRxEnd(Ptr< const WifiPsdu > psdu)
Public method used to fire a PhyRxEnd trace.
static WifiMode GetVhtMcs7()
Return MCS 7 from VHT MCS values.
static WifiMode GetOfdmRate6MbpsBW5MHz()
Return a WifiMode for OFDM at 6Mbps with 5MHz channel spacing.
bool IsStateSleep(void) const
void NotifyEndOfHePreamble(HePreambleParameters params)
Public method used to fire a EndOfHePreamble trace once both HE SIG fields have been received...
static WifiMode GetVhtMcs3()
Return MCS 3 from VHT MCS values.
MpduType
The type of an MPDU.
std::pair< int16_t, int16_t > SubcarrierRange
(lowest index, highest index) pair defining a subcarrier range
double GetRxSensitivity(void) const
Return the receive sensitivity threshold (dBm).
WifiModeList m_deviceMcsSet
the device MCS set
virtual Ptr< Channel > GetChannel(void) const =0
Return the Channel this WifiPhy is connected to.
uint16_t m_channelCenterFrequency
Center frequency in MHz.
void SetDevice(const Ptr< NetDevice > device)
Sets the device this PHY is associated with.
static WifiMode GetHtMcs16()
Return MCS 16 from HT MCS values.
uint16_t GetChannelWidth(void) const
bool m_powerRestricted
Flag whether transmit power is restricted by OBSS PD SR.
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-OFDM at 54Mbps.
static Time GetPhyHtSigHeaderDuration(WifiPreamble preamble)
static WifiMode GetHtMcs29()
Return MCS 29 from HT MCS values.
void ScheduleEndOfMpdus(Ptr< Event > event)
Schedule end of MPDUs events.
static WifiMode GetHtMcs11()
Return MCS 11 from HT MCS values.
uint8_t GetNMcs(void) const
The WifiPhy::GetNMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of t...
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
static ChannelToFrequencyWidthMap m_channelToFrequencyWidth
the channel to frequency width map
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
The MPDU is not part of an A-MPDU.
uint8_t bssColor
BSS color.
bool DoFrequencySwitch(uint16_t frequency)
The default implementation does nothing and returns true.
static WifiMode GetHtMcs2()
Return MCS 2 from HT MCS values.
std::vector< bool > m_statusPerMpdu
current reception status per MPDU that is filled in as long as MPDUs are being processed by the PHY i...
void StartReceiveHeader(Ptr< Event > event)
Start receiving the PHY header of a PPDU (i.e.
static WifiMode GetHtPhyHeaderMode()
Time m_slot
Slot duration.
Ptr< MobilityModel > m_mobility
Pointer to the mobility model.
Time m_blockAckTxTime
estimated BlockAck TX time
receive notifications about PHY events.
TracedCallback< Ptr< const Packet > > m_phyTxDropTrace
The trace source fired when the PHY layer drops a packet as it tries to transmit it.
double m_txPowerMaxMimo
MIMO maximum transmit power due to OBSS PD SR power restriction (dBm)
bool m_shortPreamble
Flag if short PHY preamble is supported.
static WifiMode GetHeMcs3()
Return MCS 3 from HE MCS values.
static Time GetPayloadDuration(uint32_t size, WifiTxVector txVector, WifiPhyBand band, MpduType mpdutype=NORMAL_MPDU, uint16_t staId=SU_STA_ID)
EventId m_endTxEvent
the end of transmit event
static WifiMode GetHtMcs12()
Return MCS 12 from HT MCS values.
Ptr< WifiRadioEnergyModel > m_wifiRadioEnergyModel
Wifi radio energy model.
static WifiMode GetErpOfdmRate48Mbps()
Return a WifiMode for ERP-OFDM at 48Mbps.
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
void SetPreambleDetectionModel(const Ptr< PreambleDetectionModel > preambleDetectionModel)
Sets the preamble detection model.
std::pair< ChannelNumberBandPair, WifiPhyStandard > ChannelNumberStandardPair
A pair of a ChannelNumberBandPair and a WifiPhyStandard.
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing.
void NotifyChannelAccessRequested(void)
Notify the PHY that an access to the channel was requested.
static WifiMode GetHeMcs11()
Return MCS 11 from HE MCS values.
static WifiMode GetHeMcs(uint8_t mcs)
Get the WifiMode object corresponding to the given MCS of the HE modulation class.
Time GetDelayUntilIdle(void)
uint32_t m_rxMpduReferenceNumber
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU...
TracedCallback< HePreambleParameters > m_phyEndOfHePreambleTrace
A trace source that indicates the end of both HE SIG fields as well as training fields for received 8...
std::pair< uint32_t, uint32_t > WifiSpectrumBand
typedef for a pair of start and stop sub-band indexes
double CalculateSnr(WifiTxVector txVector, double ber) const
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for OFDM at 18Mbps.
void SetCapabilitiesChangedCallback(Callback< void > callback)
void SetOffMode(void)
Put in off mode.
static WifiMode GetOfdmRate9MbpsBW10MHz()
Return a WifiMode for OFDM at 9Mbps with 10MHz channel spacing.
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for OFDM at 12Mbps with 5MHz channel spacing.
void(* PhyRxPayloadBeginTracedCallback)(WifiTxVector txVector, Time psduDuration)
TracedCallback signature for start of PSDU reception events.
Ptr< PreambleDetectionModel > m_preambleDetectionModel
Preamble detection model.
double GetPowerDbm(uint8_t power) const
Get the power of the given power level in dBm.
static WifiMode GetVhtMcs1()
Return MCS 1 from VHT MCS values.
WifiPhyStandard GetPhyStandard(void) const
Get the configured Wi-Fi standard.
EventId m_endPreambleDetectionEvent
the end of preamble detection event
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for OFDM at 48Mbps.
Time GetBlockAckTxTime(void) const
Return the estimated BlockAck TX time for this PHY.
void SetErrorRateModel(const Ptr< ErrorRateModel > rate)
Sets the error rate model.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
static WifiMode GetVhtPhyHeaderMode()
static WifiMode GetHeMcs9()
Return MCS 9 from HE MCS values.
static WifiMode GetHtMcs0()
Return MCS 0 from HT MCS values.
TracedCallback< WifiConstPsduMap, WifiTxVector, double > m_phyTxPsduBeginTrace
The trace source fired when a PSDU map begins the transmission process on the medium.
Ptr< MobilityModel > GetMobility(void) const
Return the mobility model this PHY is associated with.
static Time GetPreambleDetectionDuration(void)
Time m_pifs
PCF Interframe Space (PIFS) duration.
static Time GetPhySigA1Duration(WifiPreamble preamble)
void SetPostReceptionErrorModel(const Ptr< ErrorModel > em)
Attach a receive ErrorModel to the WifiPhy.
void(* PsduTxBeginCallback)(WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
TracedCallback signature for PSDU transmit events.
static TypeId GetTypeId(void)
Get the type ID.
Time GetChannelSwitchDelay(void) const
void(* MonitorSnifferRxCallback)(Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise, uint16_t staId)
TracedCallback signature for monitor mode receive events.
void ContinueReceiveHeader(Ptr< Event > event)
Continue receiving the PHY header of a PPDU (i.e.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiPhyBand m_band
WifiPhyBand.
void SetWifiRadioEnergyModel(const Ptr< WifiRadioEnergyModel > wifiRadioEnergyModel)
Sets the wifi radio energy model.
uint16_t GetFrequency(void) const
uint8_t GetNumberOfAntennas(void) const
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for OFDM at 24Mbps.
void NotifyTxDrop(Ptr< const WifiPsdu > psdu)
Public method used to fire a PhyTxDrop trace.
Time m_sifs
Short Interframe Space (SIFS) duration.
static WifiMode GetHeMcs1()
Return MCS 1 from HE MCS values.
TracedCallback< Ptr< const Packet >, double > m_phyTxBeginTrace
The trace source fired when a packet begins the transmission process on the medium.
virtual void StartTx(Ptr< WifiPpdu > ppdu)=0
static WifiMode GetHtMcs13()
Return MCS 13 from HT MCS values.
static WifiMode GetHeMcs0()
Return MCS 0 from HE MCS values.
std::map< ChannelNumberStandardPair, FrequencyWidthPair > ChannelToFrequencyWidthMap
channel to frequency width map typedef
static WifiMode GetHeMcs10()
Return MCS 10 from HE MCS values.
static WifiMode GetHtMcs20()
Return MCS 20 from HT MCS values.
static WifiMode GetHeMcs2()
Return MCS 2 from HE MCS values.
static Time GetPhyTrainingSymbolDuration(WifiTxVector txVector)
static WifiMode GetHtMcs5()
Return MCS 5 from HT MCS values.
void SetMaxSupportedRxSpatialStreams(uint8_t streams)
bool GetShortPhyPreambleSupported(void) const
Return whether short PHY preamble is supported.
double m_ccaEdThresholdW
Clear channel assessment (CCA) threshold in watts.
static WifiMode GetVhtMcs2()
Return MCS 2 from VHT MCS values.
virtual void SetChannelNumber(uint8_t id)
Set channel number.
Time GetPifs(void) const
Return the PCF Interframe Space (PIFS) for this PHY.
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
Time GetAckTxTime(void) const
Return the estimated Ack TX time for this PHY.
void Configure80211ac(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard...
virtual void DoInitialize(void)
Initialize() implementation.
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
Return a WifiMode for OFDM at 2.25Mbps with 5MHz channel spacing.
uint8_t GetChannelNumber(void) const
Return current channel number.
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
WifiPhyStandard m_standard
WifiPhyStandard.
uint8_t FindChannelNumberForFrequencyWidth(uint16_t frequency, uint16_t width) const
Look for channel number matching the frequency and width.
bool m_channelAccessRequested
Flag if channels access has been requested (used for OBSS_PD SR)
static WifiMode GetErpOfdmRate9Mbps()
Return a WifiMode for ERP-OFDM at 9Mbps.
void EndReceive(Ptr< Event > event)
The last symbol of the PPDU has arrived.
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
uint8_t m_txSpatialStreams
Number of supported TX spatial streams.
double GetTxPowerStart(void) const
Return the minimum available transmission power level (dBm).
Time m_ackTxTime
estimated Ack TX time
Ptr< ErrorModel > m_postReceptionErrorModel
Error model for receive packet events.
static WifiMode GetPhyHeaderMode(WifiTxVector txVector)
void InitializeFrequencyChannelNumber(void)
post-construction setting of frequency and/or channel number
std::vector< uint16_t > GetSupportedChannelWidthSet(void) const
uint8_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Ptr< FrameCaptureModel > m_frameCaptureModel
Frame capture model.
void SetRxGain(double gain)
Sets the reception gain (dB).
void Configure80211b(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard...
WifiPhyBand
Identifies the PHY band.
void SetSifs(Time sifs)
Set the Short Interframe Space (SIFS) for this PHY.
void SetReceiveOkCallback(RxOkCallback callback)
WifiMode GetMode(uint8_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
uint16_t m_channelWidth
Channel width (MHz)
static WifiMode GetErpOfdmRate6Mbps()
Return a WifiMode for ERP-OFDM at 6Mbps.
uint8_t GetBssMembershipSelector(uint8_t selector) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
void RegisterListener(WifiPhyListener *listener)
bool IsStateTx(void) const
std::pair< bool, SignalNoiseDbm > GetReceptionStatus(Ptr< const WifiPsdu > psdu, Ptr< Event > event, uint16_t staId, Time relativeMpduStart, Time mpduDuration)
Get the reception status for the provided MPDU and notify.
void NotifyRxBegin(Ptr< const WifiPsdu > psdu, RxPowerWattPerChannelBand rxPowersW)
Public method used to fire a PhyRxBegin trace.
void SetMaxSupportedTxSpatialStreams(uint8_t streams)
static WifiMode GetErpOfdmRate12Mbps()
Return a WifiMode for ERP-OFDM at 12Mbps.
WifiModulationClass
This enumeration defines the modulation classes per (Table 9-4 "Modulation classes"; IEEE 802...
EventId m_endRxEvent
the end of receive event
Ptr< WifiPhyStateHelper > m_state
Pointer to WifiPhyStateHelper.
void Configure80211n(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard...
void SetTxPowerStart(double start)
Sets the minimum available transmission power level (dBm).
double m_txPowerBaseDbm
Minimum transmission power (dBm)
bool IsMcsSupported(WifiMode mcs) const
Check if the given WifiMode is supported by the PHY.
Time GetSifs(void) const
Return the Short Interframe Space (SIFS) for this PHY.
An identifier for simulation events.
void ResetReceive(Ptr< Event > event)
Reset PHY at the end of the packet under reception after it has failed the PHY header.
SignalNoiseDbm structure.
uint32_t mpduRefNumber
MPDU ref number.
bool m_frequencyChannelNumberInitialized
Store initialization state.
static WifiMode GetHtMcs19()
Return MCS 19 from HT MCS values.
InterferenceHelper m_interference
Pointer to InterferenceHelper.
virtual void SetChannelWidth(uint16_t channelWidth)
bool m_isConstructed
true when ready to set frequency
static WifiMode GetHtMcs6()
Return MCS 6 from HT MCS values.
void ConfigureHtDeviceMcsSet(void)
Configure the device MCS set with the appropriate HtMcs modes for the number of available transmit sp...
void PushMcs(WifiMode mode)
Add the given MCS to the device MCS set.
WifiPhyRxfailureReason
Enumeration of the possible reception failure reasons.
SignalNoiseDbm m_signalNoise
latest signal power and noise power in dBm (noise power includes the noise figure) ...
void(* MonitorSnifferTxCallback)(const Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, uint16_t staId)
TracedCallback signature for monitor mode transmit events.
static Time GetPhySigA2Duration(WifiPreamble preamble)
static WifiMode GetHtMcs28()
Return MCS 28 from HT MCS values.
double GetTxPowerEnd(void) const
Return the maximum available transmission power level (dBm).
static WifiMode GetHtMcs9()
Return MCS 9 from HT MCS values.
Time GetSlot(void) const
Return the slot duration for this PHY.
void EndReceiveInterBss(void)
For HE receptions only, check and possibly modify the transmit power restriction state at the end of ...
void StartRx(Ptr< Event > event)
Starting receiving the PPDU after having detected the medium is idle or after a reception switch...
void NotifyMonitorSniffTx(Ptr< const WifiPsdu > psdu, uint16_t channelFreqMhz, WifiTxVector txVector, uint16_t staId=SU_STA_ID)
Public method used to fire a MonitorSniffer trace for a wifi PSDU being transmitted.
static WifiMode GetHtMcs4()
Return MCS 4 from HT MCS values.
void StartReceivePayload(Ptr< Event > event)
Start receiving the PSDU (i.e.
static WifiMode GetHtMcs25()
Return MCS 25 from HT MCS values.
static WifiMode GetHeMcs8()
Return MCS 8 from HE MCS values.
void Send(Ptr< const WifiPsdu > psdu, WifiTxVector txVector)
void Configure80211g(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard...
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
double GetTxGain(void) const
Return the transmission gain (dB).
void SetSleepMode(void)
Put in sleep mode.
void NotifyMonitorSniffRx(Ptr< const WifiPsdu > psdu, uint16_t channelFreqMhz, WifiTxVector txVector, SignalNoiseDbm signalNoise, std::vector< bool > statusPerMpdu, uint16_t staId=SU_STA_ID)
Public method used to fire a MonitorSniffer trace for a wifi PSDU being received. ...
WifiModeList m_deviceRateSet
This vector holds the set of transmission modes that this WifiPhy(-derived class) can support...
void SetNumberOfAntennas(uint8_t antennas)
static WifiMode GetHtMcs1()
Return MCS 1 from HT MCS values.
std::map< WifiModulationClass, std::map< uint8_t, uint8_t > > m_mcsIndexMap
Maps MCS values to indices in m_deviceMcsSet, for HT, VHT and HE modulation classes.
static WifiMode GetHtMcs23()
Return MCS 23 from HT MCS values.
static Time GetPhyHeaderDuration(WifiTxVector txVector)
A base class which provides memory management and object aggregation.
static WifiMode GetDsssRate2Mbps()
Return a WifiMode for DSSS at 2Mbps.
static WifiMode GetVhtMcs9()
Return MCS 9 from VHT MCS values.
static Time GetStartOfPacketDuration(WifiTxVector txVector)
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for OFDM at 6Mbps with 10MHz channel spacing.
static Time CalculateTxDuration(uint32_t size, WifiTxVector txVector, WifiPhyBand band, uint16_t staId=SU_STA_ID)
double m_txPowerEndDbm
Maximum transmission power (dBm)
std::pair< uint8_t, WifiPhyBand > ChannelNumberBandPair
A pair of a channel number and a WifiPhyBand.
void Configure80211p(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11p standard...
static WifiMode GetOfdmRate24MbpsBW10MHz()
Return a WifiMode for OFDM at 24Mbps with 10MHz channel spacing.
Time m_channelSwitchDelay
Time required to switch between channel.
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
Return a WifiMode for OFDM at 13.5Mbps with 5MHz channel spacing.
Time GetLastRxEndTime(void) const
Return the end time of the last received packet.
uint8_t m_numberOfAntennas
Number of transmitters.
uint8_t GetMaxSupportedTxSpatialStreams(void) const
a unique identifier for an interface.
void ConfigureChannelForStandard(void)
Configure the PHY-level parameters for different Wi-Fi standard.
static WifiMode GetHtMcs15()
Return MCS 15 from HT MCS values.
Ptr< Event > m_currentEvent
Hold the current event.
static Time GetPhySigBDuration(WifiPreamble preamble)
Time GetLastRxStartTime(void) const
Return the start time of the last received packet.
double m_txPowerMaxSiso
SISO maximum transmit power due to OBSS PD SR power restriction (dBm)
bool IsStateRx(void) const
static WifiMode GetHtMcs3()
Return MCS 3 from HT MCS values.
uint8_t m_rxSpatialStreams
Number of supported RX spatial streams.
std::vector< uint16_t > m_supportedChannelWidthSet
Supported channel width set (MHz)
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for OFDM at 6Mbps.
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo, uint16_t > m_phyMonitorSniffTxTrace
A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being transmitted...
void SwitchMaybeToCcaBusy(void)
Check if PHY state should move to CCA busy state based on current state of interference tracker...
void SetCcaEdThreshold(double threshold)
Sets the CCA threshold (dBm).
static WifiMode GetVhtMcs(uint8_t mcs)
Get the WifiMode object corresponding to the given MCS of the VHT modulation class.
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
std::map< WifiSpectrumBand, double > RxPowerWattPerChannelBand
A map of the received power (Watts) for each band.
static WifiMode GetHeMcs6()
Return MCS 6 from HE MCS values.
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for OFDM at 4.5Mbps with 5MHz channel spacing.
Callback< void > m_capabilitiesChangedCallback
Callback when PHY capabilities changed.
void Configure80211a(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard...
uint8_t GetMaxSupportedRxSpatialStreams(void) const
static WifiMode GetHtMcs(uint8_t mcs)
Get the WifiMode object corresponding to the given MCS of the HT modulation class.
static WifiMode GetOfdmRate3MbpsBW10MHz()
Return a WifiMode for OFDM at 3Mbps with 10MHz channel spacing.
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
The trace source fired when a packet ends the transmission process on the medium. ...
uint16_t m_initialFrequency
Store frequency until initialization (MHz)
Parameters for receive HE preamble.
bool DefineChannelNumber(uint8_t channelNumber, WifiPhyBand band, WifiPhyStandard standard, uint16_t frequency, uint16_t channelWidth)
Add a channel definition to the WifiPhy.
static Time CalculatePhyPreambleAndHeaderDuration(WifiTxVector txVector)
virtual WifiSpectrumBand GetBand(uint16_t bandWidth, uint8_t bandIndex=0)
Get the start band index and the stop band index for a given band.
bool DoChannelSwitch(uint8_t id)
The default implementation does nothing and returns true.