23 #include "ns3/simulator.h"
25 #include "ns3/boolean.h"
26 #include "ns3/double.h"
27 #include "ns3/uinteger.h"
28 #include "ns3/pointer.h"
151 .SetGroupName (
"Wifi")
152 .AddAttribute (
"Frequency",
153 "The operating center frequency (MHz)",
157 MakeUintegerChecker<uint16_t> ())
158 .AddAttribute (
"ChannelWidth",
159 "Whether 5MHz, 10MHz, 20MHz, 22MHz, 40MHz, 80 MHz or 160 MHz.",
163 MakeUintegerChecker<uint8_t> (5, 160))
164 .AddAttribute (
"ChannelNumber",
165 "If set to non-zero defined value, will control Frequency and ChannelWidth assignment",
169 MakeUintegerChecker<uint8_t> (0, 196))
170 .AddAttribute (
"EnergyDetectionThreshold",
171 "The energy of a received signal should be higher than "
172 "this threshold (dbm) to allow the PHY layer to detect the signal.",
176 MakeDoubleChecker<double> ())
177 .AddAttribute (
"CcaMode1Threshold",
178 "The energy of a received signal should be higher than "
179 "this threshold (dbm) to allow the PHY layer to declare CCA BUSY state.",
183 MakeDoubleChecker<double> ())
184 .AddAttribute (
"TxGain",
185 "Transmission gain (dB).",
189 MakeDoubleChecker<double> ())
190 .AddAttribute (
"RxGain",
191 "Reception gain (dB).",
195 MakeDoubleChecker<double> ())
196 .AddAttribute (
"TxPowerLevels",
197 "Number of transmission power levels available between "
198 "TxPowerStart and TxPowerEnd included.",
201 MakeUintegerChecker<uint8_t> ())
202 .AddAttribute (
"TxPowerEnd",
203 "Maximum available transmission level (dbm).",
207 MakeDoubleChecker<double> ())
208 .AddAttribute (
"TxPowerStart",
209 "Minimum available transmission level (dbm).",
213 MakeDoubleChecker<double> ())
214 .AddAttribute (
"RxNoiseFigure",
215 "Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver."
216 " According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "
217 "\"the difference in decibels (dB) between"
218 " the noise output of the actual receiver to the noise output of an "
219 " ideal receiver with the same overall gain and bandwidth when the receivers "
220 " are connected to sources at the standard noise temperature T0 (usually 290 K)\".",
224 MakeDoubleChecker<double> ())
225 .AddAttribute (
"State",
226 "The state of the PHY layer.",
229 MakePointerChecker<WifiPhyStateHelper> ())
230 .AddAttribute (
"ChannelSwitchDelay",
231 "Delay between two short frames transmitted on different frequencies.",
235 .AddAttribute (
"Antennas",
236 "The number of antennas on the device.",
240 MakeUintegerChecker<uint8_t> (1, 8))
241 .AddAttribute (
"MaxSupportedTxSpatialStreams",
242 "The maximum number of supported TX spatial streams."
243 "This parameter is only valuable for 802.11n/ac/ax STAs and APs.",
247 MakeUintegerChecker<uint8_t> (1, 8))
248 .AddAttribute (
"MaxSupportedRxSpatialStreams",
249 "The maximum number of supported RX spatial streams."
250 "This parameter is only valuable for 802.11n/ac/ax STAs and APs.",
254 MakeUintegerChecker<uint8_t> (1, 8))
255 .AddAttribute (
"ShortGuardEnabled",
256 "Whether or not short guard interval is enabled for HT/VHT transmissions."
257 "This parameter is only valuable for 802.11n/ac/ax STAs and APs.",
262 .AddAttribute (
"GuardInterval",
263 "Whether 800ns, 1600ns or 3200ns guard interval is used for HE transmissions."
264 "This parameter is only valuable for 802.11ax STAs and APs.",
269 .AddAttribute (
"LdpcEnabled",
270 "Whether or not LDPC is enabled (not supported yet!).",
275 .AddAttribute (
"STBCEnabled",
276 "Whether or not STBC is enabled (not supported yet!).",
281 .AddAttribute (
"GreenfieldEnabled",
282 "Whether or not Greenfield is enabled."
283 "This parameter is only valuable for 802.11n STAs and APs.",
288 .AddAttribute (
"ShortPlcpPreambleSupported",
289 "Whether or not short PLCP preamble is supported."
290 "This parameter is only valuable for 802.11b STAs and APs."
291 "Note: 802.11g APs and STAs always support short PLCP preamble.",
296 .AddAttribute (
"FrameCaptureModel",
297 "Ptr to an object that implements the frame capture model",
301 MakePointerChecker <FrameCaptureModel> ())
302 .AddTraceSource (
"PhyTxBegin",
303 "Trace source indicating a packet "
304 "has begun transmitting over the channel medium",
306 "ns3::Packet::TracedCallback")
307 .AddTraceSource (
"PhyTxEnd",
308 "Trace source indicating a packet "
309 "has been completely transmitted over the channel. "
310 "NOTE: the only official WifiPhy implementation "
311 "available to this date never fires "
312 "this trace source.",
314 "ns3::Packet::TracedCallback")
315 .AddTraceSource (
"PhyTxDrop",
316 "Trace source indicating a packet "
317 "has been dropped by the device during transmission",
319 "ns3::Packet::TracedCallback")
320 .AddTraceSource (
"PhyRxBegin",
321 "Trace source indicating a packet "
322 "has begun being received from the channel medium "
325 "ns3::Packet::TracedCallback")
326 .AddTraceSource (
"PhyRxEnd",
327 "Trace source indicating a packet "
328 "has been completely received from the channel medium "
331 "ns3::Packet::TracedCallback")
332 .AddTraceSource (
"PhyRxDrop",
333 "Trace source indicating a packet "
334 "has been dropped by the device during reception",
336 "ns3::Packet::TracedCallback")
337 .AddTraceSource (
"MonitorSnifferRx",
338 "Trace source simulating a wifi device in monitor mode "
339 "sniffing all received frames",
341 "ns3::WifiPhy::MonitorSnifferRxTracedCallback")
342 .AddTraceSource (
"MonitorSnifferTx",
343 "Trace source simulating the capability of a wifi device "
344 "in monitor mode to sniff all frames being transmitted",
346 "ns3::WifiPhy::MonitorSnifferTxTracedCallback")
353 m_plcpSuccess (false),
354 m_txMpduReferenceNumber (0xffffffff),
355 m_rxMpduReferenceNumber (0xffffffff),
359 m_isConstructed (false),
360 m_channelCenterFrequency (0),
361 m_initialFrequency (0),
362 m_frequencyChannelNumberInitialized (false),
364 m_initialChannelNumber (0),
365 m_totalAmpduSize (0),
366 m_totalAmpduNumSymbols (0),
368 m_wifiRadioEnergyModel (0)
371 m_random = CreateObject<UniformRandomVariable> ();
372 m_state = CreateObject<WifiPhyStateHelper> ();
408 m_state->SetReceiveOkCallback (callback);
414 m_state->SetReceiveErrorCallback (callback);
420 m_state->RegisterListener (listener);
426 m_state->UnregisterListener (listener);
818 NS_LOG_WARN (
"Configuring unspecified standard; performing no action");
915 bool htFound =
false;
1044 NS_LOG_FUNCTION (
this << +channelNumber << standard << frequency << +channelWidth);
1046 ChannelToFrequencyWidthMap::const_iterator it;
1050 NS_LOG_DEBUG (
"channel number/standard already defined; returning false");
1067 if (it->second == f)
1076 NS_LOG_DEBUG (
"Found, returning " << +it->first.first);
1077 return (it->first.first);
1097 NS_LOG_DEBUG (
"Frequency set; checking whether a channel number corresponds");
1099 if (channelNumberSearched)
1101 NS_LOG_DEBUG (
"Channel number found; setting to " << +channelNumberSearched);
1106 NS_LOG_DEBUG (
"Channel number not found; setting to zero");
1120 NS_LOG_DEBUG (
"Falling back to check WIFI_PHY_STANDARD_UNSPECIFIED");
1129 NS_LOG_DEBUG (
"Setting frequency to " << f.first <<
"; width to " << +f.second);
1208 NS_LOG_DEBUG (
"Saving frequency configuration for initialization");
1220 NS_LOG_DEBUG (
"Setting frequency and channel number to zero");
1231 NS_LOG_DEBUG (
"Setting frequency " << frequency <<
" corresponds to channel " << +nch);
1234 NS_LOG_DEBUG (
"Channel frequency switched to " << frequency <<
"; channel number to " << +nch);
1240 NS_LOG_DEBUG (
"Suppressing reassignment of frequency");
1245 NS_LOG_DEBUG (
"Channel number is unknown for frequency " << frequency);
1248 NS_LOG_DEBUG (
"Channel frequency switched to " << frequency <<
"; channel number to " << 0);
1254 NS_LOG_DEBUG (
"Suppressing reassignment of frequency");
1269 NS_ASSERT_MSG (channelwidth == 5 || channelwidth == 10 || channelwidth == 20 || channelwidth == 22 || channelwidth == 40 || channelwidth == 80 || channelwidth == 160,
"wrong channel width value");
1288 NS_ASSERT_MSG (antennas > 0 && antennas <= 4,
"unsupported number of antennas");
1395 return supportedmodes;
1409 NS_LOG_FUNCTION (
"Adding " << +width <<
" to supported channel width set");
1413 std::vector<uint8_t>
1433 NS_LOG_DEBUG (
"Saving channel number configuration for initialization");
1464 NS_LOG_DEBUG (
"Setting frequency to " << f.first <<
"; width to " << +f.second);
1477 NS_FATAL_ERROR (
"Frequency not found for channel number " << nch);
1501 NS_LOG_DEBUG (
"drop packet because of channel switching while reception");
1507 NS_LOG_DEBUG (
"channel switching postponed until end of current transmission");
1515 NS_LOG_DEBUG (
"channel switching ignored in sleep mode");
1553 NS_LOG_DEBUG (
"drop packet because of channel/frequency switching while reception");
1556 goto switchFrequency;
1559 NS_LOG_DEBUG (
"channel/frequency switching postponed until end of current transmission");
1564 goto switchFrequency;
1567 NS_LOG_DEBUG (
"frequency switching ignored in sleep mode");
1598 NS_LOG_DEBUG (
"setting sleep mode postponed until end of current transmission");
1602 NS_LOG_DEBUG (
"setting sleep mode postponed until end of current reception");
1606 NS_LOG_DEBUG (
"setting sleep mode postponed until end of channel switching");
1657 NS_LOG_DEBUG (
"not in sleep mode, there is nothing to resume");
1664 m_state->SwitchFromSleep (delayUntilCcaEnd);
1688 NS_LOG_DEBUG (
"not in off mode, there is nothing to resume");
1695 m_state->SwitchFromOff (delayUntilCcaEnd);
1727 uint8_t Ndltf, Neltf;
1730 if (txVector.
GetNss () < 3)
1732 Ndltf = txVector.
GetNss ();
1734 else if (txVector.
GetNss () < 5)
1738 else if (txVector.
GetNss () < 7)
2039 && txVector.
GetNss () == 3
2045 && txVector.
GetNss () == 2
2051 && txVector.
GetNss () == 3
2057 && txVector.
GetNss () == 3
2063 && txVector.
GetNss () == 4
2069 && txVector.
GetNss () == 4
2080 && txVector.
GetNss () == 2
2086 && txVector.
GetNss () == 2
2092 && txVector.
GetNss () == 3
2098 && txVector.
GetNss () == 3
2104 && txVector.
GetNss () == 3
2110 && txVector.
GetNss () == 4
2116 && txVector.
GetNss () == 4
2122 && txVector.
GetNss () == 4
2128 && txVector.
GetNss () == 4
2173 NS_ASSERT (gi == 800 || gi == 1600 || gi == 3200);
2183 double numSymbols = 0;
2187 numSymbols = (stbc * (16 + size * 8.0 + 6 * Nes) / (stbc * numDataBitsPerSymbol));
2197 numSymbols = (stbc * size * 8.0) / (stbc * numDataBitsPerSymbol);
2208 numSymbols = lrint (stbc * ceil ((16 + totalAmpduSize * 8.0 + 6 * Nes) / (stbc * numDataBitsPerSymbol)));
2220 numSymbols = lrint (stbc * ceil ((16 + size * 8.0 + 6.0 * Nes) / (stbc * numDataBitsPerSymbol)));
2224 NS_FATAL_ERROR (
"Wrong combination of preamble and packet type");
2377 NS_LOG_DEBUG (
"Dropping packet because in sleep mode");
2398 aMpdu.
type = mpdutype;
2408 NS_LOG_DEBUG (
"Transmission canceled because device is OFF");
2411 uint8_t isFrameComplete = 1;
2414 isFrameComplete = 0;
2416 WifiPhyTag tag (txVector, mpdutype, isFrameComplete);
2419 StartTx (newPacket, txVector, txDuration);
2444 NS_LOG_DEBUG (
"Cannot start RX because device is OFF");
2452 NS_LOG_DEBUG (
"drop packet because of incomplete frame");
2467 NS_LOG_DEBUG (
"drop packet because not enough RX antennas");
2483 NS_LOG_DEBUG (
"drop packet because of channel switching");
2509 StartRx (packet, txVector, mpdutype, rxPowerW, rxDuration, event);
2513 NS_LOG_DEBUG (
"drop packet because already in Rx (power=" <<
2526 NS_LOG_DEBUG (
"drop packet because already in Tx (power=" <<
2539 StartRx (packet, txVector, mpdutype, rxPowerW, rxDuration, event);
2561 if (!delayUntilCcaEnd.
IsZero ())
2563 m_state->SwitchMaybeToCcaBusy (delayUntilCcaEnd);
2592 NS_LOG_DEBUG (
"drop packet because it was sent using an unsupported mode (" << txMode <<
")");
2599 NS_LOG_DEBUG (
"drop packet because plcp preamble/header reception failed");
2619 NS_LOG_DEBUG (
"mode=" << (event->GetPayloadMode ().GetDataRate (event->GetTxVector ())) <<
2620 ", snr(dB)=" <<
RatioToDb (snrPer.snr) <<
", per=" << snrPer.per <<
", size=" << packet->
GetSize ());
2627 signalNoise.
noise =
RatioToDb (event->GetRxPowerW () / snrPer.snr) + 30;
2629 aMpdu.
type = mpdutype;
2632 m_state->SwitchFromRxEndOk (packet, snrPer.snr, event->GetTxVector ());
2638 m_state->SwitchFromRxEndError (packet, snrPer.snr);
2643 m_state->SwitchFromRxEndError (packet, snrPer.snr);
3546 for (uint8_t i = 0; i <
GetNModes (); i++)
3559 for (uint8_t i = 0; i <
GetNMcs (); i++)
3596 return m_state->IsStateCcaBusy ();
3602 return m_state->IsStateIdle ();
3620 return m_state->IsStateSwitching ();
3626 return m_state->IsStateSleep ();
3632 return m_state->IsStateOff ();
3638 return m_state->GetDelayUntilIdle ();
3644 return m_state->GetLastRxStartTime ();
3657 if (!delayUntilCcaEnd.
IsZero ())
3660 m_state->SwitchMaybeToCcaBusy (delayUntilCcaEnd);
3678 m_state->SwitchFromRxAbort ();
3685 NS_LOG_FUNCTION (
this << packet << txVector << +mpdutype << rxPowerW << rxDuration);
3694 NS_LOG_DEBUG (
"drop packet because no PLCP preamble/header has been received");
3729 NS_LOG_DEBUG (
"sync to signal (power=" << rxPowerW <<
"W)");
3731 m_state->SwitchToRx (rxDuration);
3741 packet, txVector, mpdutype, event);
3746 packet, preamble, mpdutype, event);
3750 NS_LOG_DEBUG (
"drop packet because signal power too Small (" <<
3771 return (os <<
"IDLE");
3773 return (os <<
"CCA_BUSY");
3775 return (os <<
"TX");
3777 return (os <<
"RX");
3779 return (os <<
"SWITCHING");
3781 return (os <<
"SLEEP");
3783 return (os <<
"OFF");
3786 return (os <<
"INVALID");
uint8_t GetNBssMembershipSelectors(void) const
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
static class anonymous_namespace{wifi-phy.cc}::Constructor g_constructor
the constructor
ERP-OFDM PHY (Clause 19, Section 19.5)
uint8_t GetNTxPower(void) const
Return the number of available transmission power levels.
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.
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.
uint8_t GetChannelNumber(void) const
Return current channel number.
uint16_t GetGuardInterval(void) const
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.
A struct for both SNR and PER.
Ptr< InterferenceHelper::Event > Add(Ptr< const Packet > packet, WifiTxVector txVector, Time duration, double rxPower)
Add the packet-related signal to interference helper.
The MPDU is not part of an A-MPDU.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
OFDM PHY for the 5 GHz band (Clause 17 with 5 MHz channel bandwidth)
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
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 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.
AttributeValue implementation for Boolean.
bool IsMcsSupported(WifiMode mcs) const
Check if the given WifiMode is supported by the PHY.
void SetNumberOfReceiveAntennas(uint8_t rx)
Set the number of RX antennas in the receiver corresponding to this interference helper.
Ptr< ErrorRateModel > GetErrorRateModel(void) const
Return the error rate model.
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for OFDM at 9Mbps.
HT PHY for the 5 GHz band (clause 20)
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.
uint8_t GetRemainingNbOfMpdus(void) const
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)
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
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 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 ResumeFromOff(void)
Resume from off mode.
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).
void Configure80211ax(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard...
double DbmToW(double dBm)
Convert from dBm to Watts.
static WifiMode GetHtMcs7()
Return MCS 7 from HT MCS values.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual void DoDispose(void)
Destructor implementation.
bool IsStateRx(void) const
void AddPacketTag(const Tag &tag) const
Add a packet tag.
bool Is2_4Ghz(double frequency)
void SetStbc(bool stbc)
Enable or disable STBC.
static Time GetPlcpHtSigHeaderDuration(WifiPreamble preamble)
static WifiMode GetVhtMcs5()
Return MCS 5 from VHT MCS values.
uint8_t GetFrameComplete(void) const
Getter for frameComplete parameter.
The PHY layer is sleeping.
static WifiMode GetHtMcs22()
Return MCS 22 from HT MCS values.
static WifiMode GetHtMcs14()
Return MCS 14 from HT MCS values.
uint8_t GetMaxSupportedRxSpatialStreams(void) const
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)
bool IsNull(void) const
Check for null implementation.
static WifiMode GetHtMcs31()
Return MCS 31 from HT MCS values.
static WifiMode GetHtMcs21()
Return MCS 21 from HT MCS values.
bool IsStateCcaBusy(void) const
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
uint8_t m_channelWidth
Channel width.
static WifiMode GetHtMcs30()
Return MCS 30 from HT MCS values.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void SetErrorRateModel(const Ptr< ErrorRateModel > rate)
Set the error rate model for this interference helper.
std::vector< uint8_t > m_bssMembershipSelectorSet
the BSS membership selector set
HE PHY for the 2.4 GHz band (clause 26)
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.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
OFDM PHY for the 5 GHz band (Clause 17 with 10 MHz channel bandwidth)
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.
#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 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.
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
bool Is5Ghz(double frequency)
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.
int64_t GetFemtoSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
HT PHY for the 2.4 GHz band (clause 20)
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.
uint8_t m_nTxPower
Number of available transmission power levels.
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.
void SetFrameCaptureModel(const Ptr< FrameCaptureModel > frameCaptureModel)
Sets the frame capture model.
bool IsStateSwitching(void) const
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.
static Time GetPlcpSigA1Duration(WifiPreamble preamble)
uint8_t GetTxPowerLevel(void) const
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
WifiModeList m_deviceMcsSet
the device MCS set
uint8_t GetChannelWidth(void) const
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
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.
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-OFDM at 54Mbps.
bool GetLdpc(void) const
Return if LDPC is supported.
uint16_t m_mpdusNum
carries the number of expected mpdus that are part of an A-MPDU
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.
Keep track of the current position and velocity of an object.
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.
bool PeekPacketTag(Tag &tag) const
Search a matching tag and call Tag::Deserialize if it is found.
static Time GetPlcpSigA2Duration(WifiPreamble preamble)
HE PHY for the 5 GHz band (clause 26)
NS_ASSERT_MSG(false,"Ipv4AddressGenerator::MaskToIndex(): Impossible")
bool DoFrequencySwitch(uint16_t frequency)
The default implementation does nothing and returns true.
static WifiMode GetHtMcs2()
Return MCS 2 from HT MCS values.
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
Ptr< MobilityModel > m_mobility
Pointer to the mobility model.
virtual void StartTx(Ptr< Packet > packet, WifiTxVector txVector, Time txDuration)=0
AttributeValue implementation for Time.
static Time GetPlcpPreambleDuration(WifiTxVector txVector)
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
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.
bool IsStrictlyPositive(void) const
static WifiMode GetHeMcs3()
Return MCS 3 from HE MCS values.
static Time GetPlcpSigBDuration(WifiPreamble preamble)
Hold an unsigned integer type.
static WifiMode CreateWifiMode(std::string uniqueName, WifiModulationClass modClass, bool isMandatory, WifiCodeRate codingRate, uint16_t constellationSize)
EventId m_endPlcpRxEvent
the end PLCP receive 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.
static Time CalculatePlcpPreambleAndHeaderDuration(WifiTxVector txVector)
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
uint64_t GetDataRate(uint8_t channelWidth, uint16_t guardInterval, uint8_t nss) const
uint8_t GetNess(void) const
Time GetGuardInterval(void) const
WifiMode GetMode(uint8_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing.
static WifiMode GetHeMcs11()
Return MCS 11 from HE MCS values.
The PHY layer has sense the medium busy through the CCA mechanism.
Time GetDelayUntilIdle(void)
uint8_t GetMcsValue(void) const
std::string GetUniqueName(void) const
uint32_t m_rxMpduReferenceNumber
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU...
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
The trace source fired when the phy layer drops a packet it has received.
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.
The aim of the AmpduTag is to provide means for a MAC to specify that a packet includes A-MPDU since ...
struct InterferenceHelper::SnrPer CalculatePlcpHeaderSnrPer(Ptr< InterferenceHelper::Event > event) const
Calculate the SNIR at the start of the plcp header and accumulate all SNIR changes in the snir vector...
void NotifyRxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyRxBegin trace.
bool IsStateSleep(void) 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.
bool IsStbc(void) const
Check if STBC is used or not.
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for OFDM at 12Mbps with 5MHz channel spacing.
WifiModeList GetMembershipSelectorModes(uint32_t selector)
The WifiPhy::GetMembershipSelectorModes() method is used (e.g., by a WifiRemoteStationManager) to det...
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.
static WifiMode GetVhtMcs1()
Return MCS 1 from VHT MCS values.
This is intended to be the configuration used in this paper: Gavin Holland, Nitin Vaidya and Paramvir...
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for OFDM at 48Mbps.
void SetErrorRateModel(const Ptr< ErrorRateModel > rate)
Sets the error rate model.
Time GetEnergyDuration(double energyW) const
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
static WifiMode GetHeMcs9()
Return MCS 9 from HE MCS values.
double f(double x, void *params)
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...
static TypeId GetTypeId(void)
Get the type ID.
OFDM PHY for the 5 GHz band (Clause 17)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void NotifyRxStart()
Notify that RX has started.
virtual void SetChannelWidth(uint8_t channelwidth)
Hold objects of type Ptr.
double GetTxPowerEnd(void) const
Return the maximum available transmission power level (dBm).
void SetWifiRadioEnergyModel(const Ptr< WifiRadioEnergyModel > wifiRadioEnergyModel)
Sets the wifi radio energy model.
Time m_guardInterval
Supported HE guard interval.
void EraseEvents(void)
Erase all events.
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for OFDM at 24Mbps.
Ptr< const AttributeChecker > MakeBooleanChecker(void)
WifiPhyState
The state of the PHY layer.
static WifiMode GetHeMcs1()
Return MCS 1 from HE MCS values.
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
std::pair< uint16_t, uint8_t > FrequencyWidthPair
A pair of a center Frequency and a ChannelWidth.
static WifiMode GetHtMcs13()
Return MCS 13 from HT MCS values.
void SetShortGuardInterval(bool shortGuardInterval)
Enable or disable support for HT/VHT short guard interval.
static WifiMode GetHeMcs0()
Return MCS 0 from HE MCS values.
double CalculateSnr(WifiTxVector txVector, double ber) const
bool IsInitialized(void) const
Check if the object has been initialized.
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.
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.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
double WToDbm(double w)
Convert from Watts to dBm.
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
WifiPhyStandard m_standard
WifiPhyStandard.
static Time Now(void)
Return the current simulation virtual time.
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.
double DbToRatio(double dB)
Convert from dB to ratio.
bool IsStateTx(void) const
uint8_t m_txSpatialStreams
Number of supported TX spatial streams.
uint8_t GetMaxSupportedTxSpatialStreams(void) const
double RatioToDb(double ratio)
Convert from ratio to dB.
void InitializeFrequencyChannelNumber(void)
post-construction setting of frequency and/or channel number
WifiPreamble GetPreambleType(void) const
Ptr< FrameCaptureModel > m_frameCaptureModel
Frame capture model.
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
uint8_t GetBssMembershipSelector(uint8_t selector) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
int64_t GetNanoSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
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...
No explicit coding (e.g., DSSS rates)
WifiTxVector GetWifiTxVector(void) const
Getter for WifiTxVector parameter.
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.
uint8_t GetNss(void) const
void SetMaxSupportedTxSpatialStreams(uint8_t streams)
The PHY layer is sending a packet.
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.
TimeWithUnit As(const enum Unit unit) const
Attach a unit to a Time, to facilitate output in a specific unit.
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)
void NotifyRxEnd()
Notify that RX has ended.
void SetNoiseFigure(double value)
Set the noise figure.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
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.
bool RemovePacketTag(Tag &tag)
Remove a packet tag.
static WifiMode GetHtMcs6()
Return MCS 6 from HT MCS values.
bool m_isConstructed
true when ready to set frequency
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void ConfigureHtDeviceMcsSet(void)
Configure the device Mcs set with the appropriate HtMcs modes for the number of available transmit sp...
Time Seconds(double value)
Construct a Time in the indicated unit.
The PHY layer is receiving a packet.
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.
bool IsStateOff(void) const
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.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
static WifiMode GetHtMcs25()
Return MCS 25 from HT MCS values.
static WifiMode GetHeMcs8()
Return MCS 8 from HE MCS values.
Tag for WifiTxVector and WifiPreamble information to be embedded in outgoing transmissions as a Packe...
The PHY layer is switched off.
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.
The PHY layer is switching to other channel.
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...
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
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.
static WifiMode GetHtMcs23()
Return MCS 23 from HT MCS values.
A base class which provides memory management and object aggregation.
Time FemtoSeconds(uint64_t value)
Construct a Time in the indicated unit.
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.
WifiModulationClass GetModulationClass() const
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.
WifiMode GetMode(void) const
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.
double GetNoiseFigure(void) const
Return the noise figure.
static WifiMode GetPlcpHeaderMode(WifiTxVector txVector)
static Time GetPlcpTrainingSymbolDuration(WifiTxVector txVector)
Ptr< InterferenceHelper::Event > m_currentEvent
Hold the current event.
This class can be used to hold variables of floating point type such as 'double' or 'float'...
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).
bool IsExpired(void) const
This method is syntactic sugar for the ns3::Simulator::IsExpired method.
uint8_t FindChannelNumberForFrequencyWidth(uint16_t frequency, uint8_t width) const
Look for channel number matching the frequency and width.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
static WifiMode CreateWifiMcs(std::string uniqueName, uint8_t mcsValue, WifiModulationClass modClass)
bool IsStateIdle(void) const
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.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
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).
struct InterferenceHelper::SnrPer CalculatePlcpPayloadSnrPer(Ptr< InterferenceHelper::Event > event) const
Calculate the SNIR at the start of the plcp payload and accumulate all SNIR changes in the snir vecto...
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.
uint8_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
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.
bool m_stbc
Flag if STBC is used.
Callback< void > m_capabilitiesChangedCallback
Callback when PHY capabilities changed.
MpduType GetMpduType(void) const
Getter for mpduType parameter.
void Configure80211a(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard...
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.
bool DoChannelSwitch(uint8_t id)
The default implementation does nothing and returns true.