26 #include "ns3/callback.h"
27 #include "ns3/event-id.h"
28 #include "ns3/mobility-model.h"
29 #include "ns3/random-variable-stream.h"
30 #include "ns3/channel.h"
34 #include "ns3/string.h"
45 class WifiPhyStateHelper;
50 class FrameCaptureModel;
1272 uint16_t channelFreqMhz,
1297 uint16_t channelFreqMhz,
1314 uint16_t channelFreqMhz,
1331 uint16_t channelFreqMhz,
1524 static bool Is2_4Ghz (
double frequency);
1529 static bool Is5Ghz (
double frequency);
static WifiMode GetVhtMcs6()
Return MCS 6 from VHT MCS values.
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for OFDM at 9Mbps with 5MHz channel spacing.
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
The trace source fired when a packet begins the reception process from the medium.
Ptr< NetDevice > m_device
Pointer to the device.
static WifiMode GetErpOfdmRate24Mbps()
Return a WifiMode for ERP-OFDM at 24Mbps.
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
uint8_t GetChannelNumber(void) const
Return current channel number.
uint32_t GetNBssMembershipSelectors(void) const
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
Simulation virtual time values and global simulation resolution.
static WifiMode GetHeMcs7()
Return MCS 7 from HE MCS values.
std::pair< uint8_t, WifiPhyStandard > ChannelNumberStandardPair
A pair of a ChannelNumber and WifiPhyStandard.
static WifiMode GetErpOfdmRate36Mbps()
Return a WifiMode for ERP-OFDM at 36Mbps.
The MPDU is not part of an A-MPDU.
uint8_t m_channelNumber
Operating channel number.
double m_rxGainDb
Reception gain (dB)
static WifiMode GetVhtMcs8()
Return MCS 8 from VHT MCS values.
double GetTxGain(void) const
Return the transmission gain (dB).
double GetRxNoiseFigure(void) const
Return the RX noise figure (dBm).
void SetShortPlcpPreambleSupported(bool preamble)
Enable or disable short PLCP preamble.
bool IsMcsSupported(WifiMode mcs) const
Check if the given WifiMode is supported by the PHY.
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for OFDM at 9Mbps.
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.
virtual void NotifyTxStart(Time duration, double txPowerDbm)=0
std::vector< uint8_t > m_supportedChannelWidthSet
Supported channel width.
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo, SignalNoiseDbm > m_phyMonitorSniffRxTrace
A trace source that emulates a wifi device in monitor mode sniffing a packet being received...
double m_txGainDb
Transmission gain (dB)
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for OFDM at 3Mbps with 5MHz channel spacing.
static WifiMode GetVhtMcs0()
Return MCS 0 from VHT MCS values.
virtual void NotifyWakeup(void)=0
Notify listeners that we woke up.
void MaybeCcaBusyDuration(void)
Eventually switch to CCA busy.
void SetLdpc(bool ldpc)
Enable or disable LDPC.
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
bool m_ldpc
Flag if LDPC is used.
void ResumeFromSleep(void)
Resume from sleep mode.
bool GetGreenfield(void) const
Return whether Greenfield is supported.
static WifiMode GetHeMcs5()
Return MCS 5 from HE MCS values.
static WifiMode GetErpOfdmRate18Mbps()
Return a WifiMode for ERP-OFDM at 18Mbps.
void SetTxGain(double gain)
Sets the transmission gain (dB).
The PHY layer has sense the medium busy through the CCA mechanism.
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.
virtual void DoDispose(void)
Destructor implementation.
Forward calls to a chain of Callback.
void SetStbc(bool stbc)
Enable or disable STBC.
static Time GetPlcpHtSigHeaderDuration(WifiPreamble preamble)
static WifiMode GetVhtMcs5()
Return MCS 5 from VHT MCS values.
static WifiMode GetHtMcs22()
Return MCS 22 from HT MCS values.
std::vector< uint32_t > m_bssMembershipSelectorSet
the BSS membership selector set
uint8_t GetMaxSupportedRxSpatialStreams(void) const
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.
void EndReceive(Ptr< Packet > packet, WifiPreamble preamble, MpduType mpdutype, Ptr< InterferenceHelper::Event > event)
The last bit of the packet has arrived.
void SetReceiveErrorCallback(RxErrorCallback callback)
static WifiMode GetHtMcs31()
Return MCS 31 from HT MCS values.
static WifiMode GetHtMcs21()
Return MCS 21 from HT MCS values.
uint8_t m_channelWidth
Channel width.
static WifiMode GetHtMcs30()
Return MCS 30 from HT MCS values.
static WifiMode GetHtMcs10()
Return MCS 10 from HT MCS values.
void StartReceivePreambleAndHeader(Ptr< Packet > packet, double rxPowerW, Time rxDuration)
Starting receiving the plcp of a packet (i.e.
The MPDU is the last aggregate in an A-MPDU.
Ptr< ErrorRateModel > GetErrorRateModel(void) const
Return the error rate model this PHY is using.
static WifiMode GetHtMcs26()
Return MCS 26 from HT MCS values.
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for OFDM at 1.5Mbps with 5MHz channel spacing.
The PHY layer is sleeping.
static WifiMode GetHtMcs17()
Return MCS 17 from HT MCS values.
static WifiMode GetHtMcs24()
Return MCS 24 from HT MCS values.
bool GetShortGuardInterval(void) const
Return whether short guard interval is supported.
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.
static WifiMode GetHeMcs4()
Return MCS 4 from HE MCS values.
void SendPacket(Ptr< const Packet > packet, WifiTxVector txVector, MpduType mpdutype=NORMAL_MPDU)
void ConfigureHolland(void)
Configure WifiPhy with appropriate channel frequency and supported rates for holland.
uint8_t GetNMcs(void) const
The WifiPhy::GetNMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of t...
void NotifyTxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyTxDrop trace.
uint64_t m_rxMpduReferenceNumber
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU...
void SetGreenfield(bool greenfield)
Enable or disable Greenfield support.
void Configure80211_10Mhz(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10...
static WifiMode GetHtMcs8()
Return MCS 8 from HT MCS values.
static WifiMode GetHtMcs18()
Return MCS 18 from HT MCS values.
void NotifyTxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyTxBegin trace.
virtual void SetFrequency(uint16_t freq)
Ptr< FrameCaptureModel > GetFrameCaptureModel(void) const
Return the frame capture model this PHY is using.
static WifiMode GetVhtMcs4()
Return MCS 4 from VHT MCS values.
static WifiMode GetHtMcs27()
Return MCS 27 from HT MCS values.
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo > m_phyMonitorSniffTxTrace
A trace source that emulates a wifi device in monitor mode sniffing a packet being transmitted...
uint16_t GetFrequency(void) const
std::vector< uint8_t > GetSupportedChannelWidthSet(void) const
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
bool IsModeSupported(WifiMode mode) const
Check if the given WifiMode is supported by the PHY.
static WifiMode GetOfdmRate36Mbps()
Return a WifiMode for OFDM at 36Mbps.
uint8_t m_initialChannelNumber
Initial channel number.
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 GetStbc(void) const
Return whether STBC is supported.
static WifiMode GetVhtMcs3()
Return MCS 3 from VHT MCS values.
void ConfigureDefaultsForStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
uint32_t GetBssMembershipSelector(uint32_t selector) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
static Time GetPlcpSigA1Duration(WifiPreamble preamble)
virtual void NotifySwitchingStart(Time duration)=0
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.
bool GetLdpc(void) const
Return if LDPC is supported.
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-OFDM at 54Mbps.
uint16_t m_mpdusNum
carries the number of expected mpdus that are part of an A-MPDU
static bool Is2_4Ghz(double frequency)
static WifiMode GetHtMcs29()
Return MCS 29 from HT MCS values.
static WifiMode GetHtMcs11()
Return MCS 11 from HT MCS values.
void NotifyRxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyRxDrop trace.
Time CalculateTxDuration(uint32_t size, WifiTxVector txVector, uint16_t frequency)
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
void SetNTxPower(uint32_t n)
Sets the number of transmission power levels available between the minimum level and the maximum leve...
static ChannelToFrequencyWidthMap m_channelToFrequencyWidth
the channel to frequency width map
double GetPowerDbm(uint8_t power) const
Get the power of the given power level in dBm.
double GetEdThreshold(void) const
Return the energy detection threshold (dBm).
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
static Time GetPlcpSigA2Duration(WifiPreamble preamble)
virtual void NotifyRxEndOk(void)=0
We have received the last bit of a packet for which NotifyRxStart was invoked first and...
bool DoFrequencySwitch(uint16_t frequency)
The default implementation does nothing and returns true.
void SetFrameCaptureModel(const Ptr< FrameCaptureModel > rate)
Sets the frame capture model.
static WifiMode GetHtMcs2()
Return MCS 2 from HT MCS values.
Ptr< MobilityModel > m_mobility
Pointer to the mobility model.
virtual void StartTx(Ptr< Packet > packet, WifiTxVector txVector, Time txDuration)=0
static Time GetPlcpPreambleDuration(WifiTxVector txVector)
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.
void NotifyMonitorSniffRx(Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise)
Public method used to fire a MonitorSniffer trace for a wifi packet being received.
bool m_shortPreamble
Flag if short PLCP preamble is supported.
static WifiMode GetHeMcs3()
Return MCS 3 from HE MCS values.
void(* MonitorSnifferTxCallback)(const Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu)
TracedCallback signature for monitor mode transmit events.
static Time GetPlcpSigBDuration(WifiPreamble preamble)
EventId m_endPlcpRxEvent
the end PLCP receive event
static WifiMode GetHtMcs12()
Return MCS 12 from HT MCS values.
static WifiMode GetErpOfdmRate48Mbps()
Return a WifiMode for ERP-OFDM at 48Mbps.
static Time CalculatePlcpPreambleAndHeaderDuration(WifiTxVector txVector)
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
Time GetGuardInterval(void) const
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing.
static WifiMode GetHeMcs11()
Return MCS 11 from HE MCS values.
Time GetDelayUntilIdle(void)
The PHY layer is receiving a packet.
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
The trace source fired when the phy layer drops a packet it has received.
uint8_t m_numberOfTransmitters
Number of transmitters (DEPRECATED)
double m_edThresholdW
Energy detection threshold in watts.
void Configure80211_5Mhz()
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5M...
void StartReceivePacket(Ptr< Packet > packet, WifiTxVector txVector, MpduType mpdutype, Ptr< InterferenceHelper::Event > event)
Starting receiving the payload of a packet (i.e.
virtual ~WifiPhyListener()
uint64_t mpduRefNumber
MPDU ref number.
void NotifyRxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyRxBegin trace.
The PHY layer is sending a packet.
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for OFDM at 18Mbps.
uint32_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
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(* MonitorSnifferRxCallback)(Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise)
TracedCallback signature for monitor mode receive events.
WifiModeList GetMembershipSelectorModes(uint32_t selector)
The WifiPhy::GetMembershipSelectorModes() method is used (e.g., by a WifiRemoteStationManager) to det...
The PHY layer is switching to other channel.
void AbortCurrentReception(void)
Due to newly arrived signal, the current reception cannot be continued and has to be aborted...
TracedCallback< Ptr< const Packet > > m_phyTxBeginTrace
The trace source fired when a packet begins the transmission process on the medium.
uint32_t GetNTxPower(void) const
Return the number of available transmission power levels.
static WifiMode GetVhtMcs1()
Return MCS 1 from VHT MCS values.
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for OFDM at 48Mbps.
void SetErrorRateModel(const Ptr< ErrorRateModel > rate)
Sets the error rate model.
virtual void NotifySleep(void)=0
Notify listeners that we went to sleep.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
static WifiMode GetHeMcs9()
Return MCS 9 from HE MCS values.
static WifiMode GetHtMcs0()
Return MCS 0 from HT MCS values.
WifiMode GetMcs(uint8_t mcs) const
The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of tr...
Callback< void, Ptr< Packet >, double > RxErrorCallback
arg1: packet received unsuccessfully arg2: snr of packet
static TypeId GetTypeId(void)
Get the type ID.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void SetChannelWidth(uint8_t channelwidth)
double GetTxPowerEnd(void) const
Return the maximum available transmission power level (dBm).
Time m_guardInterval
Supported HE guard interval.
static bool IsValidTxVector(WifiTxVector txVector)
The standard disallows certain combinations of WifiMode, number of spatial streams, and channel widths.
uint64_t m_txMpduReferenceNumber
A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU...
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for OFDM at 24Mbps.
static WifiMode GetHeMcs1()
Return MCS 1 from HE MCS values.
std::pair< uint16_t, uint8_t > FrequencyWidthPair
A pair of a center Frequency and a ChannelWidth.
void SetShortGuardInterval(bool shortGuardInterval)
Enable or disable support for HT/VHT short guard interval.
static WifiMode GetHtMcs13()
Return MCS 13 from HT MCS values.
static WifiMode GetHeMcs0()
Return MCS 0 from HE MCS values.
double CalculateSnr(WifiTxVector txVector, double ber) const
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 WifiMode GetHtMcs5()
Return MCS 5 from HT MCS values.
void SetMaxSupportedRxSpatialStreams(uint8_t streams)
void SetCcaMode1Threshold(double threshold)
Sets the CCA threshold (dBm).
Time GetLastRxStartTime(void) const
Return the start time of the last received packet.
static WifiMode GetVhtMcs2()
Return MCS 2 from VHT MCS values.
FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard(uint8_t channelNumber, WifiPhyStandard standard) const
Lookup frequency/width pair for channelNumber/standard pair.
virtual void SetChannelNumber(uint8_t id)
Set channel number.
bool IsStateCcaBusy(void)
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
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.
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
WifiPhyStandard m_standard
WifiPhyStandard.
void SetGuardInterval(Time guardInterval)
static WifiMode GetErpOfdmRate9Mbps()
Return a WifiMode for ERP-OFDM at 9Mbps.
void NotifyTxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyTxEnd trace.
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
Time GetStateDuration(void)
uint8_t m_txSpatialStreams
Number of supported TX spatial streams.
virtual void NotifyRxStart(Time duration)=0
virtual void NotifyRxEndError(void)=0
We have received the last bit of a packet for which NotifyRxStart was invoked first and...
uint8_t GetMaxSupportedTxSpatialStreams(void) const
void InitializeFrequencyChannelNumber(void)
post-construction setting of frequency and/or channel number
Ptr< FrameCaptureModel > m_frameCaptureModel
Frame capture model.
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
void SetRxGain(double gain)
Sets the reception gain (dB).
uint8_t GetChannelWidth(void) const
void Configure80211b(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard...
void SetReceiveOkCallback(RxOkCallback callback)
static WifiMode GetErpOfdmRate6Mbps()
Return a WifiMode for ERP-OFDM at 6Mbps.
void RegisterListener(WifiPhyListener *listener)
void ConfigureChannelForStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
static bool Is5Ghz(double frequency)
void SetMaxSupportedTxSpatialStreams(uint8_t streams)
static WifiMode GetErpOfdmRate12Mbps()
Return a WifiMode for ERP-OFDM at 12Mbps.
bool m_plcpSuccess
Flag if the PLCP of the packet or the first MPDU in an A-MPDU has been received.
bool m_greenfield
Flag if GreenField format is supported.
EventId m_endRxEvent
the end reeive event
Ptr< WifiPhyStateHelper > m_state
Pointer to WifiPhyStateHelper.
void SetEdThreshold(double threshold)
Sets the energy detection threshold (dBm).
void NotifyRxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyRxEnd trace.
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)
An identifier for simulation events.
bool IsStateSwitching(void)
SignalNoiseDbm structure.
bool m_frequencyChannelNumberInitialized
Store initialization state.
static WifiMode GetHtMcs19()
Return MCS 19 from HT MCS values.
InterferenceHelper m_interference
Pointer to InterferenceHelper.
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...
static WifiMode GetVhtPlcpHeaderMode()
double m_totalAmpduNumSymbols
Number of symbols previously transmitted for the MPDUs in an A-MPDU, used for the computation of the ...
static WifiMode GetHtMcs28()
Return MCS 28 from HT MCS values.
static WifiMode GetHtMcs9()
Return MCS 9 from HT MCS values.
Ptr< MobilityModel > GetMobility(void) const
Return the mobility model this PHY is associated with.
Time GetChannelSwitchDelay(void) const
static WifiMode GetHtMcs4()
Return MCS 4 from HT MCS values.
static WifiMode GetHtMcs25()
Return MCS 25 from HT MCS values.
static WifiMode GetHeMcs8()
Return MCS 8 from HE MCS values.
void Configure80211g(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard...
static WifiMode GetHePlcpHeaderMode()
bool DefineChannelNumber(uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint8_t channelWidth)
Add a channel definition to the WifiPhy.
void SetSleepMode(void)
Put in sleep mode.
uint32_t m_totalAmpduSize
Total size of the previously transmitted MPDUs in an A-MPDU, used for the computation of the number o...
void StartRx(Ptr< Packet > packet, WifiTxVector txVector, MpduType mpdutype, double rxPowerW, Time rxDuration, Ptr< InterferenceHelper::Event > event)
Starting receiving the packet after having detected the medium is idle or after a reception switch...
WifiModeList m_deviceRateSet
This vector holds the set of transmission modes that this WifiPhy(-derived class) can support...
void NotifyMonitorSniffTx(Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu)
Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted.
Time GetPayloadDuration(uint32_t size, WifiTxVector txVector, uint16_t frequency)
void SetNumberOfAntennas(uint8_t antennas)
static WifiMode GetHtMcs1()
Return MCS 1 from HT MCS values.
Callback< void, Ptr< Packet >, double, WifiTxVector > RxOkCallback
arg1: packet received successfully arg2: snr of packet arg3: TXVECTOR of packet arg4: type of preambl...
static WifiMode GetHtMcs23()
Return MCS 23 from HT MCS values.
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.
virtual void ConfigureStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
void AddSupportedChannelWidth(uint8_t channelwidth)
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for OFDM at 6Mbps with 10MHz channel spacing.
double GetEdThresholdW(void) const
Return the energy detection threshold.
double m_txPowerEndDbm
Maximum transmission power (dBm)
uint8_t GetNumberOfAntennas(void) const
The MPDU is part of an A-MPDU, but is not the last aggregate.
bool GetShortPlcpPreambleSupported(void) const
Return whether short PLCP preamble is supported.
State
The state of the PHY layer.
static WifiMode GetPlcpHeaderMode(WifiTxVector txVector)
static Time GetPlcpTrainingSymbolDuration(WifiTxVector txVector)
Ptr< InterferenceHelper::Event > m_currentEvent
Hold the current event.
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.
double m_ccaMode1ThresholdW
Clear channel assessment (CCA) threshold in watts.
double GetCcaMode1Threshold(void) const
Return the CCA threshold (dBm).
uint8_t FindChannelNumberForFrequencyWidth(uint16_t frequency, uint8_t width) const
Look for channel number matching the frequency and width.
uint8_t m_numberOfAntennas
Number of transmitters.
static Time GetPlcpHeaderDuration(WifiTxVector txVector)
a unique identifier for an interface.
MpduType
This enumeration defines the type of an MPDU.
static WifiMode GetHtMcs15()
Return MCS 15 from HT MCS values.
static WifiMode GetHtMcs3()
Return MCS 3 from HT MCS values.
uint8_t m_rxSpatialStreams
Number of supported RX spatial streams.
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for OFDM at 6Mbps.
void SwitchMaybeToCcaBusy(void)
Check if Phy state should move to CCA busy state based on current state of interference tracker...
bool m_shortGuardInterval
Flag if HT/VHT short guard interval is supported.
WifiPhyStandard GetStandard(void) const
Get the configured Wi-Fi standard.
double GetRxGain(void) const
Return the reception gain (dB).
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
static WifiMode GetHeMcs6()
Return MCS 6 from HE MCS values.
static WifiMode GetHtPlcpHeaderMode()
double GetTxPowerStart(void) const
Return the minimum available transmission power level (dBm).
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for OFDM at 4.5Mbps with 5MHz channel spacing.
uint32_t m_nTxPower
Number of available transmission power levels.
bool m_stbc
Flag if STBC is used.
void Configure80211a(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard...
uint8_t m_numberOfReceivers
Number of receivers (DEPRECATED)
std::map< ChannelNumberStandardPair, FrequencyWidthPair > ChannelToFrequencyWidthMap
channel to frequency width map typedef
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.
WifiMode GetMode(uint32_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
virtual void NotifyMaybeCcaBusyStart(Time duration)=0
bool DoChannelSwitch(uint8_t id)
The default implementation does nothing and returns true.