28 #include "ns3/simulator.h"
29 #include "ns3/packet.h"
30 #include "ns3/assert.h"
32 #include "ns3/double.h"
33 #include "ns3/uinteger.h"
35 #include "ns3/pointer.h"
36 #include "ns3/net-device.h"
37 #include "ns3/trace-source-accessor.h"
38 #include "ns3/boolean.h"
53 .AddConstructor<YansWifiPhy> ()
54 .AddAttribute (
"EnergyDetectionThreshold",
55 "The energy of a received signal should be higher than "
56 "this threshold (dbm) to allow the PHY layer to detect the signal.",
60 MakeDoubleChecker<double> ())
61 .AddAttribute (
"CcaMode1Threshold",
62 "The energy of a received signal should be higher than "
63 "this threshold (dbm) to allow the PHY layer to declare CCA BUSY state",
67 MakeDoubleChecker<double> ())
68 .AddAttribute (
"TxGain",
69 "Transmission gain (dB).",
73 MakeDoubleChecker<double> ())
74 .AddAttribute (
"RxGain",
75 "Reception gain (dB).",
79 MakeDoubleChecker<double> ())
80 .AddAttribute (
"TxPowerLevels",
81 "Number of transmission power levels available between "
82 "TxPowerStart and TxPowerEnd included.",
85 MakeUintegerChecker<uint32_t> ())
86 .AddAttribute (
"TxPowerEnd",
87 "Maximum available transmission level (dbm).",
91 MakeDoubleChecker<double> ())
92 .AddAttribute (
"TxPowerStart",
93 "Minimum available transmission level (dbm).",
97 MakeDoubleChecker<double> ())
98 .AddAttribute (
"RxNoiseFigure",
99 "Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver."
100 " According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "
101 "\"the difference in decibels (dB) between"
102 " the noise output of the actual receiver to the noise output of an "
103 " ideal receiver with the same overall gain and bandwidth when the receivers "
104 " are connected to sources at the standard noise temperature T0 (usually 290 K)\"."
109 MakeDoubleChecker<double> ())
110 .AddAttribute (
"State",
"The state of the PHY layer",
113 MakePointerChecker<WifiPhyStateHelper> ())
114 .AddAttribute (
"ChannelSwitchDelay",
115 "Delay between two short frames transmitted on different frequencies.",
119 .AddAttribute (
"ChannelNumber",
120 "Channel center frequency = Channel starting frequency + 5 MHz * nch",
124 MakeUintegerChecker<uint16_t> ())
125 .AddAttribute (
"Frequency",
"The operating frequency.",
129 MakeUintegerChecker<uint32_t> ())
130 .AddAttribute (
"Transmitters",
"The number of transmitters.",
134 MakeUintegerChecker<uint32_t> ())
135 .AddAttribute (
"Recievers",
"The number of recievers.",
139 MakeUintegerChecker<uint32_t> ())
140 .AddAttribute (
"ShortGuardEnabled",
"Whether or not short guard interval is enabled.",
144 MakeBooleanChecker ())
145 .AddAttribute (
"LdpcEnabled",
"Whether or not LDPC is enabled.",
149 MakeBooleanChecker ())
150 .AddAttribute (
"STBCEnabled",
"Whether or not STBC is enabled.",
154 MakeBooleanChecker ())
155 .AddAttribute (
"GreenfieldEnabled",
"Whether or not STBC is enabled.",
159 MakeBooleanChecker ())
160 .AddAttribute (
"ChannelBonding",
"Whether 20MHz or 40MHz.",
164 MakeBooleanChecker ())
172 : m_channelNumber (1),
174 m_channelStartingFrequency (0)
177 m_random = CreateObject<UniformRandomVariable> ();
178 m_state = CreateObject<WifiPhyStateHelper> ();
389 NS_LOG_DEBUG (
"drop packet because of channel switching while reception");
394 NS_LOG_DEBUG (
"channel switching postponed until end of current transmission");
438 m_state->SetReceiveOkCallback (callback);
443 m_state->SetReceiveErrorCallback (callback);
453 double rxPowerW =
DbmToW (rxPowerDbm);
469 NS_LOG_DEBUG (
"drop packet because of channel switching");
487 NS_LOG_DEBUG (
"drop packet because already in Rx (power=" <<
498 NS_LOG_DEBUG (
"drop packet because already in Tx (power=" <<
512 NS_LOG_DEBUG (
"sync to signal (power=" << rxPowerW <<
"W)");
514 m_state->SwitchToRx (rxDuration);
524 NS_LOG_DEBUG (
"drop packet because signal power too Small (" <<
541 if (!delayUntilCcaEnd.
IsZero ())
543 m_state->SwitchMaybeToCcaBusy (delayUntilCcaEnd);
685 m_state->RegisterListener (listener);
691 return m_state->IsStateCcaBusy ();
697 return m_state->IsStateIdle ();
702 return m_state->IsStateBusy ();
717 return m_state->IsStateSwitching ();
723 return m_state->GetStateDuration ();
728 return m_state->GetDelayUntilIdle ();
734 return m_state->GetLastRxStartTime ();
740 double ratio = std::pow (10.0, dB / 10.0);
747 double mW = std::pow (10.0, dBm / 10.0);
754 return 10.0 * std::log10 (w * 1000.0);
760 return 10.0 * std::log10 (ratio);
798 NS_LOG_DEBUG (
"mode=" << (event->GetPayloadMode ().GetDataRate ()) <<
799 ", snr=" << snrPer.snr <<
", per=" << snrPer.per <<
", size=" << packet->
GetSize ());
803 uint32_t dataRate500KbpsUnits =
event->GetPayloadMode ().GetDataRate () *
event->GetTxVector().GetNss()/ 500000;
805 double signalDbm =
RatioToDb (event->GetRxPowerW ()) + 30;
808 m_state->SwitchFromRxEndOk (packet, snrPer.snr, event->GetPayloadMode (),
event->GetPreambleType ());
814 m_state->SwitchFromRxEndError (packet, snrPer.snr);
929 for (uint8_t i=0; i <8; i++)
962 return supportedmodes;
ERP-OFDM PHY (Clause 19, Section 19.5)
uint16_t m_channelNumber
Operating channel number.
bool m_channelBonding
Flag if channel conding is used.
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for ODFM at 9Mbps with 5MHz channel spacing.
static WifiMode GetErpOfdmRate24Mbps()
Return a WifiMode for ERP-ODFM at 24Mbps.
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
Ptr< Object > m_mobility
Pointer to the mobility model.
virtual bool IsStateBusy(void)
keep track of time values and allow control of global simulation resolution
static WifiMode GetErpOfdmRate36Mbps()
Return a WifiMode for ERP-ODFM at 36Mbps.
A struct for both SNR and PER.
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
OFDM PHY for the 5 GHz band (Clause 17 with 5 MHz channel bandwidth)
void Configure80211b(void)
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11b standard.
void SetStream(int64_t stream)
Specifies the stream number for this RNG stream.
virtual uint32_t GetFrequency(void) const
static WifiMode GetOfdmRate26MbpsBW20MHz()
Return a WifiMode for ODFM at 26Mbps with 20MHz channel spacing.
virtual WifiModeList GetMembershipSelectorModes(uint32_t selector)
The WifiPhy::GetMembershipSelectorModes() method is used (e.g., by a WifiRemoteStationManager) to det...
Ptr< ErrorRateModel > GetErrorRateModel(void) const
Return the error rate model.
double DbmToW(double dbm) const
Convert from dBm to Watts.
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for ODFM at 9Mbps.
double DbToRatio(double db) const
Convert from dB to ratio.
static WifiMode GetOfdmRate7_2MbpsBW20MHz()
Return a WifiMode for ODFM at 7.2Mbps with 20MHz channel spacing.
static WifiMode GetOfdmRate18MbpsBW10MHz()
Return a WifiMode for ODFM 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 ODFM at 27Mbps with 10MHz channel spacing.
void SetErrorRateModel(Ptr< ErrorRateModel > rate)
Sets the error rate model.
virtual bool IsStateSwitching(void)
virtual bool IsStateTx(void)
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for ODFM at 3Mbps with 5MHz channel spacing.
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
void NotifyMonitorSniffTx(Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, uint8_t txPower)
Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted.
void Configure80211n(void)
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11n standard.
Ptr< YansWifiChannel > m_channel
YansWifiChannel that this YansWifiPhy is connected to.
static WifiMode GetOfdmRate81MbpsBW40MHz()
Return a WifiMode for ODFM at 81Mbps with 40MHz channel spacing.
void SetTxGain(double gain)
Sets the transmission gain (dB).
static WifiMode GetErpOfdmRate18Mbps()
Return a WifiMode for ERP-ODFM at 18Mbps.
virtual void SetGuardInterval(bool guardInterval)
Enable or disable short/long guard interval.
static WifiMode GetOfdmRate12Mbps()
Return a WifiMode for ODFM at 12Mbps.
virtual void SetLdpc(bool ldpc)
Enable or disable LDPC.
#define NS_ASSERT(condition)
static WifiMode GetOfdmRate43_3MbpsBW20MHz()
Return a WifiMode for ODFM at 43.3Mbps with 20MHz channel spacing.
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
Time GetEnergyDuration(double energyW)
virtual void RegisterListener(WifiPhyListener *listener)
static WifiMode GetOfdmRate60MbpsBW40MHz()
Return a WifiMode for ODFM at 60Mbps with 40MHz channel spacing.
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for ODFM at 1.5Mbps with 5MHz channel spacing.
uint32_t GetSize(void) const
OFDM PHY for the 5 GHz band (Clause 17 with 10 MHz channel bandwidth)
double m_txPowerBaseDbm
Minimum transmission power (dBm)
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
Return a WifiMode for ODFM at 4.5Mbps with 10MHz channel spacing.
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for ODFM at 54Mbps.
uint16_t GetChannelNumber() const
Return the current channel number.
void SetChannelNumber(uint16_t id)
Set the current channel number.
virtual void SendPacket(Ptr< const Packet > packet, WifiMode mode, enum WifiPreamble preamble, WifiTxVector txvector)
static WifiMode GetOfdmRate108MbpsBW40MHz()
Return a WifiMode for ODFM at 108Mbps with 40MHz channel spacing.
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
static WifiMode GetOfdmRate21_7MbpsBW20MHz()
Return a WifiMode for ODFM at 21.7Mbps with 20MHz channel spacing.
void NotifyTxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyTxBegin trace.
Ptr< Object > GetDevice(void) const
Return the device this PHY is associated with.
double m_edThresholdW
Energy detection threshold in watts.
void Configure80211_5Mhz()
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5MHz channel spacing.
virtual Time GetDelayUntilIdle(void)
void Configure80211a(void)
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
void Configure80211g(void)
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11g standard.
static WifiMode GetOfdmRate135MbpsBW40MHz()
Return a WifiMode for ODFM at 135Mbps with 40MHz channel spacing.
static WifiMode GetOfdmRate36Mbps()
Return a WifiMode for ODFM at 36Mbps.
static WifiMode GetOfdmRate6MbpsBW5MHz()
Return a WifiMode for ODFM at 6Mbps with 5MHz channel spacing.
virtual Time GetStateDuration(void)
virtual uint32_t GetNBssMembershipSelectors(void) const
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
double m_rxGainDb
Reception gain (dB)
uint8_t GetTxPowerLevel(void) const
double GetTxGain(void) const
Return the transmission gain (dB).
virtual bool GetChannelBonding(void) const
Return whether channel bonding is supported.
std::vector< uint32_t > m_bssMembershipSelectorSet
The PHY layer is switching to other channel.
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-ODFM at 54Mbps.
virtual void SetReceiveErrorCallback(WifiPhy::RxErrorCallback callback)
void NotifyRxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyRxDrop trace.
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
void SetErrorRateModel(Ptr< ErrorRateModel > rate)
Set the error rate model for this interference helper.
virtual uint32_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
static WifiMode GetOfdmRate6_5MbpsBW20MHz()
Return a WifiMode for ODFM at 6.5Mbps with 20MHz channel spacing.
virtual bool IsStateRx(void)
virtual uint8_t GetNMcs(void) const
virtual double GetTxPowerStart(void) const
Return the minimum available transmission power level (dBm).
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
virtual WifiMode GetMode(uint32_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
double m_channelStartingFrequency
Standard-dependent center frequency of 0-th channel in MHz.
void SetEdThreshold(double threshold)
Sets the energy detection threshold (dBm).
static WifiMode GetOfdmRate135MbpsBW40MHzShGi()
Return a WifiMode for ODFM at 135Mbps with 40MHz channel spacing.
bool m_ldpc
Flag if LDPC is used.
virtual uint8_t GetMcs(uint8_t mcs) const
The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of tr...
hold objects of type ns3::Time
receive notifications about phy events.
virtual bool GetStbc(void) const
Return whether STBC is supported.
bool m_stbc
Flag if STBC is used.
Hold an unsigned integer type.
Ptr< Object > m_device
Pointer to the device.
WifiModeList m_deviceRateSet
This vector holds the set of transmission modes that this WifiPhy(-derived class) can support...
static WifiMode GetErpOfdmRate48Mbps()
Return a WifiMode for ERP-ODFM at 48Mbps.
double m_ccaMode1ThresholdW
Clear channel assessment (CCA) threshold in watts.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
virtual void SetStbc(bool stbc)
Enable or disable STBC.
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for ODFM at 12Mbps with 10MHz channel spacing.
virtual uint32_t GetBssMembershipSelector(uint32_t selector) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
std::string GetUniqueName(void) const
double GetRxGain(void) const
Return the reception gain (dB).
Ptr< InterferenceHelper::Event > Add(uint32_t size, WifiMode payloadMode, enum WifiPreamble preamble, Time duration, double rxPower, WifiTxVector txvector)
Add the packet-related signal to interference helper.
void NotifyRxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyRxBegin trace.
static WifiMode GetOfdmRate19_5MbpsBW20MHz()
Return a WifiMode for ODFM at 19.5Mbps with 20MHz channel spacing.
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for ODFM at 18Mbps.
double GetChannelFrequencyMhz() const
Return current center channel frequency in MHz.
static WifiMode GetOfdmRate9MbpsBW10MHz()
Return a WifiMode for ODFM at 9Mbps with 10MHz channel spacing.
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for ODFM at 12Mbps with 5MHz channel spacing.
static WifiMode GetOfdmRate52MbpsBW20MHz()
Return a WifiMode for ODFM at 52Mbps with 20MHz channel spacing.
double WToDbm(double w) const
Convert from Watts to dBm.
static WifiMode GetOfdmRate40_5MbpsBW40MHz()
Return a WifiMode for ODFM at 40.5Mbps with 40MHz channel spacing.
void SetChannel(Ptr< YansWifiChannel > channel)
Set the YansWifiChannel this YansWifiPhy is to be connected to.
void SetNTxPower(uint32_t n)
Sets the number of transmission power levels available between the minimum level and the maximum leve...
virtual bool IsStateCcaBusy(void)
static WifiMode GetOfdmRate72_2MbpsBW20MHz()
Return a WifiMode for ODFM at 72.2Mbps with 20MHz channel spacing.
static WifiMode GetOfdmRate65MbpsBW20MHzShGi()
Return a WifiMode for ODFM at 65Mbps with 20MHz channel spacing.
void SetDevice(Ptr< Object > device)
Sets the device this PHY is associated with.
struct InterferenceHelper::SnrPer CalculateSnrPer(Ptr< InterferenceHelper::Event > event)
Calculate the SNIR at the start of the packet and accumulate all SNIR changes in the snir vector...
This is intended to be the configuration used in this paper: Gavin Holland, Nitin Vaidya and Paramvir...
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for ODFM at 48Mbps.
void NotifyMonitorSniffRx(Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm)
Public method used to fire a MonitorSniffer trace for a wifi packet being received.
double m_txPowerEndDbm
Maximum transmission power (dBm)
virtual void SetReceiveOkCallback(WifiPhy::RxOkCallback callback)
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
double GetCcaMode1Threshold(void) const
Return the CCA threshold (dBm).
OFDM PHY for the 5 GHz band (Clause 17)
void NotifyRxStart()
Notify that RX has started.
static WifiMode GetOfdmRate57_8MbpsBW20MHz()
Return a WifiMode for ODFM at 57.8Mbps with 20MHz channel spacing.
void EraseEvents(void)
Erase all events.
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for ODFM at 24Mbps.
double GetEdThreshold(void) const
Return the energy detection threshold (dBm).
static TypeId GetTypeId(void)
static WifiMode GetOfdmRate13MbpsBW20MHz()
Return a WifiMode for ODFM at 13Mbps with 20MHz channel spacing.
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
virtual uint32_t GetNumberOfTransmitAntennas(void) const
virtual uint32_t WifiModeToMcs(WifiMode mode)
For a given WifiMode finds the corresponding MCS value and returns it as defined in the IEEE 802...
static WifiMode GetOfdmRate65MbpsBW20MHz()
Return a WifiMode for ODFM at 65Mbps with 20MHz channel spacing.
virtual uint32_t GetNumberOfReceiveAntennas(void) const
static WifiMode GetOfdmRate58_5MbpsBW20MHz()
Return a WifiMode for ODFM at 58.5Mbps with 20MHz channel spacing.
uint32_t m_nTxPower
Number of available transmission power levels.
void SetRxGain(double gain)
Sets the reception gain (dB).
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
Return a WifiMode for ODFM 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...
static Time Now(void)
Return the "current simulation time".
static WifiMode GetErpOfdmRate9Mbps()
Return a WifiMode for ERP-ODFM at 9Mbps.
virtual WifiMode McsToWifiMode(uint8_t mcs)
For a given MCS finds the corresponding WifiMode and returns it as defined in the IEEE 802...
void SetTxPowerStart(double start)
Sets the minimum available transmission power level (dBm).
double RatioToDb(double ratio) const
Convert from ratio to dB.
virtual void SetNumberOfTransmitAntennas(uint32_t tx)
static WifiMode GetOfdmRate15MbpsBW40MHz()
Return a WifiMode for ODFM at 15Mbps with 40MHz channel spacing.
static WifiMode GetOfdmRate121_5MbpsBW40MHz()
Return a WifiMode for ODFM at 121.5Mbps with 40MHz channel spacing.
#define NS_ASSERT_MSG(condition, message)
static WifiMode GetOfdmRate28_9MbpsBW20MHz()
Return a WifiMode for ODFM at 28.9Mbps with 20MHz channel spacing.
virtual bool IsStateIdle(void)
void StartReceivePacket(Ptr< Packet > packet, double rxPowerDbm, WifiTxVector txVector, WifiPreamble preamble)
Starting receiving the packet (i.e.
virtual Time GetLastRxStartTime(void) const
Return the start time of the last received packet.
virtual double CalculateSnr(WifiMode txMode, double ber) const
virtual bool GetGreenfield(void) const
Return whether Greenfield is supported.
static WifiMode GetErpOfdmRate6Mbps()
Return a WifiMode for ERP-ODFM at 6Mbps.
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
static Time CalculateTxDuration(uint32_t size, WifiTxVector txvector, enum WifiPreamble preamble)
uint8_t GetNss(void) const
InterferenceHelper m_interference
Pointer to InterferenceHelper.
static WifiMode GetErpOfdmRate12Mbps()
Return a WifiMode for ERP-ODFM at 12Mbps.
virtual bool GetGuardInterval(void) const
Return whether guard interval is being used.
void NotifyRxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyRxEnd trace.
void SetMobility(Ptr< Object > mobility)
Sets the mobility model.
void NotifyRxEnd()
Notify that RX has ended.
void SetNoiseFigure(double value)
Set the noise figure.
Time m_channelSwitchDelay
Time required to switch between channel.
virtual void ConfigureStandard(enum WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
static WifiMode GetOfdmRate13_5MbpsBW40MHz()
Return a WifiMode for ODFM at 13.5Mbps with 40MHz channel spacing.
static WifiMode GetOfdmRate30MbpsBW40MHz()
Return a WifiMode for ODFM at 30Mbps with 40MHz channel spacing.
#define NS_LOG_DEBUG(msg)
static WifiMode GetOfdmRate54MbpsBW40MHz()
Return a WifiMode for ODFM at 54Mbps with 40MHz channel spacing.
virtual bool GetLdpc(void) const
Return if LDPC is supported.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::cancel method.
std::vector< uint8_t > m_deviceMcsSet
double m_txGainDb
Transmission gain (dB)
bool m_greenfield
Flag if GreenField format is supported.
double GetPowerDbm(uint8_t power) const
Get the power of the given power level in dBm.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
bool m_guardInterval
Flag if short guard interval is used.
void EndReceive(Ptr< Packet > packet, Ptr< InterferenceHelper::Event > event)
The last bit of the packet has arrived.
static WifiMode GetOfdmRate90MbpsBW40MHz()
Return a WifiMode for ODFM at 90Mbps with 40MHz channel spacing.
virtual void SetNumberOfReceiveAntennas(uint32_t rx)
static WifiMode GetOfdmRate45MbpsBW40MHz()
Return a WifiMode for ODFM at 45Mbps with 40MHz channel spacing.
uint32_t m_numberOfTransmitters
Number of transmitters.
static WifiMode GetOfdmRate120MbpsBW40MHz()
Return a WifiMode for ODFM at 120Mbps with 40MHz channel spacing.
double GetEdThresholdW(void) const
Return the energy detection threshold.
static WifiMode GetOfdmRate39MbpsBW20MHz()
Return a WifiMode for ODFM at 39Mbps with 20MHz channel spacing.
virtual Ptr< WifiChannel > GetChannel(void) const
Return the WifiChannel this WifiPhy is connected to.
static WifiMode GetDsssRate2Mbps()
Return a WifiMode for DSSS at 2Mbps.
void SetCcaMode1Threshold(double threshold)
Sets the CCA threshold (dBm).
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for ODFM at 6Mbps with 10MHz channel spacing.
WifiMode GetMode(void) const
The PHY layer is receiving a packet.
void ConfigureHolland(void)
double GetNoiseFigure(void) const
Return the noise figure.
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
Hold a floating point type.
double GetRxNoiseFigure(void) const
Return the RX noise figure (dBm).
static WifiMode GetOfdmRate24MbpsBW10MHz()
Return a WifiMode for ODFM at 24Mbps with 10MHz channel spacing.
The PHY layer has sense the medium busy through the CCA mechanism.
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
Return a WifiMode for ODFM at 13.5Mbps with 5MHz channel spacing.
virtual double GetTxPowerEnd(void) const
Return the maximum available transmission power level (dBm).
bool IsExpired(void) const
This method is syntactic sugar for the ns3::Simulator::isExpired method.
a unique identifier for an interface.
uint32_t m_numberOfReceivers
Number of receivers.
The PHY layer is sending a packet.
uint64_t GetDataRate(void) const
virtual void SetChannelBonding(bool channelbonding)
Enable or disable channel bonding support.
TypeId SetParent(TypeId tid)
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for ODFM at 6Mbps.
static WifiMode GetOfdmRate27MbpsBW40MHz()
Return a WifiMode for ODFM at 27Mbps with 40MHz channel spacing.
virtual void SetFrequency(uint32_t freq)
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for ODFM at 4.5Mbps with 5MHz channel spacing.
static WifiMode GetOfdmRate14_4MbpsBW20MHz()
Return a WifiMode for ODFM at 14.4Mbps with 20MHz channel spacing.
void Configure80211_10Mhz(void)
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10MHz channel spacing.
virtual uint32_t GetNTxPower(void) const
Return the number of available transmission power levels.
void SetRxNoiseFigure(double noiseFigureDb)
Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
static WifiMode GetOfdmRate3MbpsBW10MHz()
Return a WifiMode for ODFM at 3Mbps with 10MHz channel spacing.
Ptr< ErrorRateModel > GetErrorRateModel(void) const
Return the error rate model this PHY is using.
Ptr< Object > GetMobility(void)
Return the mobility model this PHY is associated with.
Ptr< WifiPhyStateHelper > m_state
Pointer to WifiPhyStateHelper.
NS_LOG_COMPONENT_DEFINE("YansWifiPhy")
static WifiMode GetOfdmRate150MbpsBW40MHz()
Return a WifiMode for ODFM at 150Mbps with 40MHz channel spacing.
virtual void SetGreenfield(bool greenfield)
Enable or disable Greenfield support.