802.11 PHY layer model More...
#include "wifi-phy.h"
Public Types | |
using | ChannelTuple = std::tuple< uint8_t, uint16_t, int, uint8_t > |
Tuple identifying an operating channel. More... | |
typedef void(* | MonitorSnifferRxCallback) (Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise, uint16_t staId) |
TracedCallback signature for monitor mode receive events. More... | |
typedef void(* | MonitorSnifferTxCallback) (const Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, uint16_t staId) |
TracedCallback signature for monitor mode transmit events. More... | |
typedef void(* | PhyRxBeginTracedCallback) (Ptr< const Packet > packet, RxPowerWattPerChannelBand rxPowersW) |
TracedCallback signature for PhyRxBegin trace source. More... | |
typedef void(* | PhyRxPayloadBeginTracedCallback) (WifiTxVector txVector, Time psduDuration) |
TracedCallback signature for start of PSDU reception events. More... | |
typedef void(* | PhyTxBeginTracedCallback) (Ptr< const Packet > packet, double txPowerW) |
TracedCallback signature for Phy transmit events. More... | |
typedef void(* | PsduTxBeginCallback) (WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) |
TracedCallback signature for PSDU transmit events. More... | |
Public Member Functions | |
WifiPhy () | |
virtual | ~WifiPhy () |
void | AddSupportedChannelWidth (uint16_t width) |
virtual int64_t | AssignStreams (int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. More... | |
double | CalculateSnr (const WifiTxVector &txVector, double ber) const |
virtual void | ConfigureStandard (WifiStandard standard) |
Configure the PHY-level parameters for different Wi-Fi standard. More... | |
virtual WifiSpectrumBand | ConvertHeRuSubcarriers (uint16_t bandWidth, uint16_t guardBandwidth, HeRu::SubcarrierRange range, uint8_t bandIndex=0) const |
void | EndReceiveInterBss (void) |
For HE receptions only, check and possibly modify the transmit power restriction state at the end of PPDU reception. More... | |
Time | GetAckTxTime (void) const |
Return the estimated Ack TX time for this PHY. More... | |
Time | GetBlockAckTxTime (void) const |
Return the estimated BlockAck TX time for this PHY. More... | |
std::list< uint8_t > | GetBssMembershipSelectorList (void) const |
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception modes that this WifiPhy(-derived class) can support - a set of WifiMode objects which we call the BssMembershipSelectorSet, and which is stored inside HT PHY (and above) instances. More... | |
double | GetCcaEdThreshold (void) const |
Return the CCA threshold (dBm). More... | |
virtual Ptr< Channel > | GetChannel (void) const =0 |
Return the Channel this WifiPhy is connected to. More... | |
uint8_t | GetChannelNumber (void) const |
Return current channel number. More... | |
Time | GetChannelSwitchDelay (void) const |
uint16_t | GetChannelWidth (void) const |
WifiMode | GetDefaultMode (void) const |
Get the default WifiMode supported by the PHY. More... | |
Time | GetDelayUntilIdle (void) |
Ptr< WifiNetDevice > | GetDevice (void) const |
Return the device this PHY is associated with. More... | |
uint16_t | GetFrequency (void) const |
virtual uint16_t | GetGuardBandwidth (uint16_t currentChannelWidth) const =0 |
Time | GetLastRxEndTime (void) const |
Return the end time of the last received packet. More... | |
Time | GetLastRxStartTime (void) const |
Return the start time of the last received packet. More... | |
uint8_t | GetMaxSupportedRxSpatialStreams (void) const |
uint8_t | GetMaxSupportedTxSpatialStreams (void) const |
WifiMode | GetMcs (WifiModulationClass modulation, uint8_t mcs) const |
Get the WifiMode object corresponding to the given MCS of the given modulation class. More... | |
std::list< WifiMode > | GetMcsList (void) const |
The WifiPhy::GetMcsList() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception MCS indices that this WifiPhy(-derived class) can support - a set of MCS indices which is stored by each HT PHY (and above). More... | |
std::list< WifiMode > | GetMcsList (WifiModulationClass modulation) const |
Get the list of supported MCSs for the given modulation class (i.e. More... | |
Ptr< MobilityModel > | GetMobility (void) const |
Return the mobility model this PHY is associated with. More... | |
std::list< WifiMode > | GetModeList (void) const |
The WifiPhy::GetModeList() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception (non-MCS) modes that this WifiPhy(-derived class) can support - a set of modes which is stored by each non-HT PHY. More... | |
std::list< WifiMode > | GetModeList (WifiModulationClass modulation) const |
Get the list of supported (non-MCS) modes for the given modulation class (i.e. More... | |
uint16_t | GetNMcs (void) const |
uint8_t | GetNTxPower (void) const |
Return the number of available transmission power levels. More... | |
uint8_t | GetNumberOfAntennas (void) const |
const WifiPhyOperatingChannel & | GetOperatingChannel (void) const |
Get a const reference to the operating channel. More... | |
WifiPhyBand | GetPhyBand (void) const |
Get the configured Wi-Fi band. More... | |
Ptr< PhyEntity > | GetPhyEntity (WifiModulationClass modulation) const |
Get the supported PHY entity corresponding to the modulation class, for the WifiPhy instance. More... | |
Time | GetPifs (void) const |
Return the PCF Interframe Space (PIFS) for this PHY. More... | |
double | GetPowerDbm (uint8_t power) const |
Get the power of the given power level in dBm. More... | |
uint64_t | GetPreviouslyRxPpduUid (void) const |
uint8_t | GetPrimary20Index (void) const |
uint8_t | GetPrimaryChannelNumber (uint16_t primaryChannelWidth) const |
Get channel number of the primary channel. More... | |
double | GetRxGain (void) const |
Return the reception gain (dB). More... | |
double | GetRxSensitivity (void) const |
Return the receive sensitivity threshold (dBm). More... | |
bool | GetShortPhyPreambleSupported (void) const |
Return whether short PHY preamble is supported. More... | |
Time | GetSifs (void) const |
Return the Short Interframe Space (SIFS) for this PHY. More... | |
Time | GetSlot (void) const |
Return the slot duration for this PHY. More... | |
WifiStandard | GetStandard (void) const |
Get the configured Wi-Fi standard. More... | |
Ptr< WifiPhyStateHelper > | GetState (void) const |
Return the WifiPhyStateHelper of this PHY. More... | |
std::vector< uint16_t > | GetSupportedChannelWidthSet (void) const |
double | GetTxGain (void) const |
Return the transmission gain (dB). More... | |
virtual std::tuple< double, double, double > | GetTxMaskRejectionParams (void) const =0 |
double | GetTxPowerEnd (void) const |
Return the maximum available transmission power level (dBm). More... | |
double | GetTxPowerForTransmission (Ptr< const WifiPpdu > ppdu) const |
Compute the transmit power for the next transmission. More... | |
double | GetTxPowerStart (void) const |
Return the minimum available transmission power level (dBm). More... | |
bool | IsMcsSupported (WifiModulationClass modulation, uint8_t mcs) const |
Check if the given MCS of the given modulation class is supported by the PHY. More... | |
bool | IsModeSupported (WifiMode mode) const |
Check if the given WifiMode is supported by the PHY. More... | |
bool | IsStateCcaBusy (void) const |
bool | IsStateIdle (void) const |
bool | IsStateOff (void) const |
bool | IsStateRx (void) const |
bool | IsStateSleep (void) const |
bool | IsStateSwitching (void) const |
bool | IsStateTx (void) const |
void | NotifyChannelAccessRequested (void) |
Notify the PHY that an access to the channel was requested. More... | |
void | NotifyMonitorSniffRx (Ptr< const WifiPsdu > psdu, uint16_t channelFreqMhz, WifiTxVector txVector, SignalNoiseDbm signalNoise, std::vector< bool > statusPerMpdu, uint16_t staId=SU_STA_ID) |
Public method used to fire a MonitorSniffer trace for a wifi PSDU being received. More... | |
void | NotifyMonitorSniffTx (Ptr< const WifiPsdu > psdu, uint16_t channelFreqMhz, WifiTxVector txVector, uint16_t staId=SU_STA_ID) |
Public method used to fire a MonitorSniffer trace for a wifi PSDU being transmitted. More... | |
void | NotifyRxBegin (Ptr< const WifiPsdu > psdu, const RxPowerWattPerChannelBand &rxPowersW) |
Public method used to fire a PhyRxBegin trace. More... | |
void | NotifyRxDrop (Ptr< const WifiPsdu > psdu, WifiPhyRxfailureReason reason) |
Public method used to fire a PhyRxDrop trace. More... | |
void | NotifyRxEnd (Ptr< const WifiPsdu > psdu) |
Public method used to fire a PhyRxEnd trace. More... | |
void | NotifyTxBegin (WifiConstPsduMap psdus, double txPowerW) |
Public method used to fire a PhyTxBegin trace. More... | |
void | NotifyTxDrop (Ptr< const WifiPsdu > psdu) |
Public method used to fire a PhyTxDrop trace. More... | |
void | NotifyTxEnd (WifiConstPsduMap psdus) |
Public method used to fire a PhyTxEnd trace. More... | |
void | RegisterListener (WifiPhyListener *listener) |
void | ResetCca (bool powerRestricted, double txPowerMaxSiso=0, double txPowerMaxMimo=0) |
Reset PHY to IDLE, with some potential TX power restrictions for the next transmission. More... | |
void | ResetReceive (Ptr< Event > event) |
Reset PHY at the end of the packet under reception after it has failed the PHY header. More... | |
void | ResumeFromOff (void) |
Resume from off mode. More... | |
void | ResumeFromSleep (void) |
Resume from sleep mode. More... | |
void | Send (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) |
This function is a wrapper for the Send variant that accepts a WifiConstPsduMap as first argument. More... | |
void | Send (WifiConstPsduMap psdus, const WifiTxVector &txVector) |
void | SetCapabilitiesChangedCallback (Callback< void > callback) |
void | SetCcaEdThreshold (double threshold) |
Sets the CCA threshold (dBm). More... | |
void | SetDevice (const Ptr< WifiNetDevice > device) |
Sets the device this PHY is associated with. More... | |
void | SetErrorRateModel (const Ptr< ErrorRateModel > model) |
Sets the error rate model. More... | |
void | SetFrameCaptureModel (const Ptr< FrameCaptureModel > frameCaptureModel) |
Sets the frame capture model. More... | |
virtual void | SetInterferenceHelper (const Ptr< InterferenceHelper > helper) |
Sets the interference helper. More... | |
void | SetMaxSupportedRxSpatialStreams (uint8_t streams) |
void | SetMaxSupportedTxSpatialStreams (uint8_t streams) |
void | SetMobility (const Ptr< MobilityModel > mobility) |
assign a mobility model to this device More... | |
void | SetNTxPower (uint8_t n) |
Sets the number of transmission power levels available between the minimum level and the maximum level. More... | |
void | SetNumberOfAntennas (uint8_t antennas) |
void | SetOffMode (void) |
Put in off mode. More... | |
void | SetOperatingChannel (const ChannelTuple &channelTuple) |
If the standard for this object has not been set yet, store the given channel settings. More... | |
void | SetPifs (Time pifs) |
Set the PCF Interframe Space (PIFS) for this PHY. More... | |
void | SetPostReceptionErrorModel (const Ptr< ErrorModel > em) |
Attach a receive ErrorModel to the WifiPhy. More... | |
void | SetPreambleDetectionModel (const Ptr< PreambleDetectionModel > preambleDetectionModel) |
Sets the preamble detection model. More... | |
void | SetReceiveErrorCallback (RxErrorCallback callback) |
void | SetReceiveOkCallback (RxOkCallback callback) |
void | SetRxGain (double gain) |
Sets the reception gain (dB). More... | |
void | SetRxNoiseFigure (double noiseFigureDb) |
Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver. More... | |
void | SetRxSensitivity (double threshold) |
Sets the receive sensitivity threshold (dBm). More... | |
void | SetShortPhyPreambleSupported (bool preamble) |
Enable or disable short PHY preamble. More... | |
void | SetSifs (Time sifs) |
Set the Short Interframe Space (SIFS) for this PHY. More... | |
void | SetSleepMode (void) |
Put in sleep mode. More... | |
void | SetSlot (Time slot) |
Set the slot duration for this PHY. More... | |
void | SetTxGain (double gain) |
Sets the transmission gain (dB). More... | |
void | SetTxPowerEnd (double end) |
Sets the maximum available transmission power level (dBm). More... | |
void | SetTxPowerStart (double start) |
Sets the minimum available transmission power level (dBm). More... | |
void | SetWifiRadioEnergyModel (const Ptr< WifiRadioEnergyModel > wifiRadioEnergyModel) |
Sets the wifi radio energy model. More... | |
void | StartReceivePreamble (Ptr< WifiPpdu > ppdu, RxPowerWattPerChannelBand &rxPowersW, Time rxDuration) |
Start receiving the PHY preamble of a PPDU (i.e. More... | |
virtual void | StartTx (Ptr< WifiPpdu > ppdu)=0 |
void | UnregisterListener (WifiPhyListener *listener) |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose (void) |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator (void) const |
Get an iterator to the Objects aggregated to this one. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the most derived TypeId for this Object. More... | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized (void) const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= ([[maybe_unused]] const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static void | AddStaticPhyEntity (WifiModulationClass modulation, Ptr< PhyEntity > phyEntity) |
Add the PHY entity to the map of implemented PHY entities for the given modulation class. More... | |
static Time | CalculatePhyPreambleAndHeaderDuration (const WifiTxVector &txVector) |
static Time | CalculateTxDuration (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, WifiPhyBand band) |
This function is a wrapper for the CalculateTxDuration variant that accepts a WifiConstPsduMap as first argument. More... | |
static Time | CalculateTxDuration (uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, uint16_t staId=SU_STA_ID) |
static Time | CalculateTxDuration (WifiConstPsduMap psduMap, const WifiTxVector &txVector, WifiPhyBand band) |
static uint32_t | GetMaxPsduSize (WifiModulationClass modulation) |
Get the maximum PSDU size in bytes for the given modulation class. More... | |
static Time | GetPayloadDuration (uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols, uint16_t staId) |
static Time | GetPayloadDuration (uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype=NORMAL_MPDU, uint16_t staId=SU_STA_ID) |
static Time | GetPreambleDetectionDuration (void) |
static Time | GetStartOfPacketDuration (const WifiTxVector &txVector) |
static const Ptr< const PhyEntity > | GetStaticPhyEntity (WifiModulationClass modulation) |
Get the implemented PHY entity corresponding to the modulation class. More... | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
static WifiConstPsduMap | GetWifiConstPsduMap (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) |
Get a WifiConstPsduMap from a PSDU and the TXVECTOR to use to send the PSDU. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Protected Member Functions | |
void | AddPhyEntity (WifiModulationClass modulation, Ptr< PhyEntity > phyEntity) |
Add the PHY entity to the map of supported PHY entities for the given modulation class for the WifiPhy instance. More... | |
virtual void | DoChannelSwitch (void) |
Actually switch channel based on the stored channel settings. More... | |
virtual void | DoDispose (void) |
Destructor implementation. More... | |
virtual WifiSpectrumBand | GetBand (uint16_t bandWidth, uint8_t bandIndex=0) |
Get the start band index and the stop band index for a given band. More... | |
Time | GetDelayUntilChannelSwitch (void) |
Perform any actions necessary when user changes operating channel after initialization. More... | |
uint16_t | GetMeasurementChannelWidth (const Ptr< const WifiPpdu > ppdu) const |
Return the channel width used to measure the RSSI. More... | |
WifiSpectrumBand | GetPrimaryBand (uint16_t bandWidth) |
If the operating channel width is a multiple of 20 MHz, return the start band index and the stop band index for the primary channel of the given bandwidth (which must be a multiple of 20 MHz and not exceed the operating channel width). More... | |
void | Reset (void) |
Reset data upon end of TX or RX. More... | |
void | SwitchMaybeToCcaBusy (uint16_t channelWidth) |
Check if PHY state should move to CCA busy state based on current state of interference tracker. More... | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
Protected Attributes | |
Ptr< Event > | m_currentEvent |
Hold the current event. More... | |
std::map< std::pair< uint64_t, WifiPreamble >, Ptr< Event > > | m_currentPreambleEvents |
store event associated to a PPDU (that has a unique ID and preamble combination) whose preamble is being received More... | |
EventId | m_endPhyRxEvent |
the end of PHY receive event More... | |
EventId | m_endTxEvent |
the end of transmit event More... | |
Ptr< InterferenceHelper > | m_interference |
Pointer to a helper responsible for interference computations. More... | |
std::map< WifiModulationClass, Ptr< PhyEntity > > | m_phyEntities |
This map holds the supported PHY entities. More... | |
uint64_t | m_previouslyRxPpduUid |
UID of the previously received PPDU, reset to UINT64_MAX upon transmission. More... | |
Ptr< UniformRandomVariable > | m_random |
Provides uniform random variables. More... | |
uint32_t | m_rxMpduReferenceNumber |
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU. More... | |
Ptr< WifiPhyStateHelper > | m_state |
Pointer to WifiPhyStateHelper. More... | |
uint32_t | m_txMpduReferenceNumber |
A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU. More... | |
Private Member Functions | |
void | AbortCurrentReception (WifiPhyRxfailureReason reason) |
Due to newly arrived signal, the current reception cannot be continued and has to be aborted. More... | |
void | Configure80211a (void) |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard. More... | |
void | Configure80211ac (void) |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard. More... | |
void | Configure80211ax (void) |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard. More... | |
void | Configure80211b (void) |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard. More... | |
void | Configure80211g (void) |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard. More... | |
void | Configure80211n (void) |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard. More... | |
void | Configure80211p (void) |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11p standard. More... | |
void | ConfigureHtDeviceMcsSet (void) |
Configure the device MCS set with the appropriate HtMcs modes for the number of available transmit spatial streams. More... | |
Ptr< const WifiPsdu > | GetAddressedPsduInPpdu (Ptr< const WifiPpdu > ppdu) const |
Get the PSDU addressed to that PHY in a PPDU (useful for MU PPDU). More... | |
void | PushMcs (WifiMode mode) |
Add the given MCS to the device MCS set. More... | |
void | RebuildMcsMap (void) |
Rebuild the mapping of MCS values to indices in the device MCS set. More... | |
Static Private Member Functions | |
static std::map< WifiModulationClass, Ptr< PhyEntity > > & | GetStaticPhyEntities (void) |
Private Attributes | |
Time | m_ackTxTime |
estimated Ack TX time More... | |
WifiPhyBand | m_band |
WifiPhyBand. More... | |
Time | m_blockAckTxTime |
estimated BlockAck TX time More... | |
Callback< void > | m_capabilitiesChangedCallback |
Callback when PHY capabilities changed. More... | |
double | m_ccaEdThresholdW |
Clear channel assessment (CCA) threshold in watts. More... | |
bool | m_channelAccessRequested |
Flag if channels access has been requested (used for OBSS_PD SR) More... | |
ChannelTuple | m_channelSettings |
Store operating channel settings until initialization. More... | |
Time | m_channelSwitchDelay |
Time required to switch between channel. More... | |
Ptr< WifiNetDevice > | m_device |
Pointer to the device. More... | |
Ptr< FrameCaptureModel > | m_frameCaptureModel |
Frame capture model. More... | |
Ptr< MobilityModel > | m_mobility |
Pointer to the mobility model. More... | |
double | m_noiseFigureDb |
The noise figure in dB. More... | |
uint8_t | m_nTxPower |
Number of available transmission power levels. More... | |
uint8_t | m_numberOfAntennas |
Number of transmitters. More... | |
WifiPhyOperatingChannel | m_operatingChannel |
Operating channel. More... | |
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo, SignalNoiseDbm, uint16_t > | m_phyMonitorSniffRxTrace |
A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being received. More... | |
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo, uint16_t > | m_phyMonitorSniffTxTrace |
A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being transmitted. More... | |
TracedCallback< Ptr< const Packet >, RxPowerWattPerChannelBand > | m_phyRxBeginTrace |
The trace source fired when a packet begins the reception process from the medium. More... | |
TracedCallback< Ptr< const Packet >, WifiPhyRxfailureReason > | m_phyRxDropTrace |
The trace source fired when the PHY layer drops a packet it has received. More... | |
TracedCallback< Ptr< const Packet > > | m_phyRxEndTrace |
The trace source fired when a packet ends the reception process from the medium. More... | |
TracedCallback< WifiTxVector, Time > | m_phyRxPayloadBeginTrace |
The trace source fired when the reception of the PHY payload (PSDU) begins. More... | |
TracedCallback< Ptr< const Packet >, double > | m_phyTxBeginTrace |
The trace source fired when a packet begins the transmission process on the medium. More... | |
TracedCallback< Ptr< const Packet > > | m_phyTxDropTrace |
The trace source fired when the PHY layer drops a packet as it tries to transmit it. More... | |
TracedCallback< Ptr< const Packet > > | m_phyTxEndTrace |
The trace source fired when a packet ends the transmission process on the medium. More... | |
TracedCallback< WifiConstPsduMap, WifiTxVector, double > | m_phyTxPsduBeginTrace |
The trace source fired when a PSDU map begins the transmission process on the medium. More... | |
Time | m_pifs |
PCF Interframe Space (PIFS) duration. More... | |
Ptr< ErrorModel > | m_postReceptionErrorModel |
Error model for receive packet events. More... | |
double | m_powerDensityLimit |
the power density limit (dBm/MHz) More... | |
bool | m_powerRestricted |
Flag whether transmit power is restricted by OBSS PD SR. More... | |
Ptr< PreambleDetectionModel > | m_preambleDetectionModel |
Preamble detection model. More... | |
double | m_rxGainDb |
Reception gain (dB) More... | |
double | m_rxSensitivityW |
Receive sensitivity threshold in watts. More... | |
uint8_t | m_rxSpatialStreams |
Number of supported RX spatial streams. More... | |
bool | m_shortPreamble |
Flag if short PHY preamble is supported. More... | |
Time | m_sifs |
Short Interframe Space (SIFS) duration. More... | |
Time | m_slot |
Slot duration. More... | |
WifiStandard | m_standard |
WifiStandard. More... | |
std::vector< uint16_t > | m_supportedChannelWidthSet |
Supported channel width set (MHz) More... | |
Time | m_timeLastPreambleDetected |
Record the time the last preamble was detected. More... | |
double | m_txGainDb |
Transmission gain (dB) More... | |
double | m_txPowerBaseDbm |
Minimum transmission power (dBm) More... | |
double | m_txPowerEndDbm |
Maximum transmission power (dBm) More... | |
double | m_txPowerMaxMimo |
MIMO maximum transmit power due to OBSS PD SR power restriction (dBm) More... | |
double | m_txPowerMaxSiso |
SISO maximum transmit power due to OBSS PD SR power restriction (dBm) More... | |
uint8_t | m_txSpatialStreams |
Number of supported TX spatial streams. More... | |
Ptr< WifiRadioEnergyModel > | m_wifiRadioEnergyModel |
Wifi radio energy model. More... | |
Friends | |
class | PhyEntity |
Additional Inherited Members | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
802.11 PHY layer model
ns3::WifiPhy is accessible through the following paths with Config::Set and Config::Connect:
Size of this type is 752 bytes (on a 64-bit architecture).
Definition at line 49 of file wifi-phy.h.
using ns3::WifiPhy::ChannelTuple = std::tuple<uint8_t , uint16_t , int , uint8_t > |
Tuple identifying an operating channel.
Definition at line 830 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::MonitorSnifferRxCallback) (Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise, uint16_t staId) |
TracedCallback signature for monitor mode receive events.
packet | the packet being received |
channelFreqMhz | the frequency in MHz at which the packet is received. Note that in real devices this is normally the frequency to which the receiver is tuned, and this can be different than the frequency at which the packet was originally transmitted. This is because it is possible to have the receiver tuned on a given channel and still to be able to receive packets on a nearby channel. |
txVector | the TXVECTOR that holds RX parameters |
aMpdu | the type of the packet (0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU) and the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU) |
signalNoise | signal power and noise power in dBm |
staId | the STA-ID |
Definition at line 612 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::MonitorSnifferTxCallback) (const Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, uint16_t staId) |
TracedCallback signature for monitor mode transmit events.
packet | the packet being transmitted |
channelFreqMhz | the frequency in MHz at which the packet is transmitted. |
txVector | the TXVECTOR that holds TX parameters |
aMpdu | the type of the packet (0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU) and the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU) |
staId | the STA-ID |
Definition at line 650 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::PhyRxBeginTracedCallback) (Ptr< const Packet > packet, RxPowerWattPerChannelBand rxPowersW) |
TracedCallback signature for PhyRxBegin trace source.
packet | the packet being received |
rxPowersW | the receive power per channel band in Watts |
Definition at line 679 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::PhyRxPayloadBeginTracedCallback) (WifiTxVector txVector, Time psduDuration) |
TracedCallback signature for start of PSDU reception events.
txVector | the TXVECTOR decoded from the PHY header |
psduDuration | the duration of the PSDU |
Definition at line 687 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::PhyTxBeginTracedCallback) (Ptr< const Packet > packet, double txPowerW) |
TracedCallback signature for Phy transmit events.
packet | the packet being transmitted |
txPowerW | the transmit power in Watts |
Definition at line 662 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::PsduTxBeginCallback) (WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) |
TracedCallback signature for PSDU transmit events.
psduMap | the PSDU map being transmitted |
txVector | the TXVECTOR holding the TX parameters |
txPowerW | the transmit power in Watts |
Definition at line 671 of file wifi-phy.h.
ns3::WifiPhy::WifiPhy | ( | ) |
Definition at line 307 of file wifi-phy.cc.
References m_random, m_state, and NS_LOG_FUNCTION.
|
virtual |
Definition at line 333 of file wifi-phy.cc.
References NS_LOG_FUNCTION.
|
private |
Due to newly arrived signal, the current reception cannot be continued and has to be aborted.
reason | the reason the reception is aborted |
Definition at line 1885 of file wifi-phy.cc.
References ns3::EventId::Cancel(), GetAddressedPsduInPpdu(), ns3::EventId::IsRunning(), m_currentEvent, m_currentPreambleEvents, m_endPhyRxEvent, m_interference, m_phyEntities, m_state, NotifyRxDrop(), ns3::Simulator::Now(), NS_LOG_FUNCTION, and ns3::OBSS_PD_CCA_RESET.
Referenced by ns3::PhyEntity::AbortCurrentReception(), ResetCca(), and Send().
|
protected |
Add the PHY entity to the map of supported PHY entities for the given modulation class for the WifiPhy instance.
This is a wrapper method used to check that the PHY entity is in the static map of implemented PHY entities (
modulation | the modulation class |
phyEntity | the PHY entity |
Definition at line 660 of file wifi-phy.cc.
References GetStaticPhyEntities(), m_phyEntities, NS_ABORT_MSG_IF, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by Configure80211a(), Configure80211ac(), Configure80211ax(), Configure80211b(), Configure80211g(), Configure80211n(), and Configure80211p().
|
static |
Add the PHY entity to the map of implemented PHY entities for the given modulation class.
Through this method, child classes can add their own PHY entities in a static manner.
modulation | the modulation class |
phyEntity | the PHY entity |
Definition at line 652 of file wifi-phy.cc.
References GetStaticPhyEntities(), NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by anonymous_namespace{dsss-phy.cc}::ConstructorDsss::ConstructorDsss(), anonymous_namespace{erp-ofdm-phy.cc}::ConstructorErpOfdm::ConstructorErpOfdm(), anonymous_namespace{he-phy.cc}::ConstructorHe::ConstructorHe(), anonymous_namespace{ht-phy.cc}::ConstructorHt::ConstructorHt(), anonymous_namespace{ofdm-phy.cc}::ConstructorOfdm::ConstructorOfdm(), and anonymous_namespace{vht-phy.cc}::ConstructorVht::ConstructorVht().
void ns3::WifiPhy::AddSupportedChannelWidth | ( | uint16_t | width | ) |
width | the channel width (in MHz) to support |
Definition at line 1159 of file wifi-phy.cc.
References m_supportedChannelWidthSet, and NS_LOG_FUNCTION.
Referenced by DoChannelSwitch().
|
virtual |
Assign a fixed random variable stream number to the random variables used by this model.
Return the number of streams (possibly zero) that have been assigned.
stream | first stream index to use |
Definition at line 2012 of file wifi-phy.cc.
References m_interference, m_random, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().
Referenced by TestUlOfdmaPpduUid::DoRun(), TestMultipleHeTbPreambles::DoRun(), TestThresholdPreambleDetectionWithoutFrameCapture::DoRun(), TestThresholdPreambleDetectionWithFrameCapture::DoRun(), TestSimpleFrameCaptureModel::DoRun(), TestPhyHeadersReception::DoRun(), TestAmpduReception::DoRun(), TestPhyPaddingExclusion::DoSetup(), TestDlOfdmaPhyTransmission::RunOne(), TestUlOfdmaPhyTransmission::RunOne(), and TestUlOfdmaPowerControl::RunOne().
|
static |
txVector | the transmission parameters used for this packet |
Definition at line 1321 of file wifi-phy.cc.
References ns3::WifiTxVector::GetModulationClass(), and GetStaticPhyEntity().
Referenced by ns3::DsssPpdu::DsssPpdu(), ns3::VhtPpdu::VhtPpdu(), ns3::MinstrelHtWifiManager::CalculateMpduTxDuration(), ns3::InterferenceHelper::CalculatePayloadPer(), CalculateTxDuration(), ns3::HePpdu::GetTxDuration(), ns3::DsssPpdu::GetTxDuration(), ns3::VhtPpdu::GetTxDuration(), ns3::FrameExchangeManager::SendMpdu(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SendPsduMap(), ns3::FrameExchangeManager::SendRts(), and ns3::FrameExchangeManager::UpdateNav().
double ns3::WifiPhy::CalculateSnr | ( | const WifiTxVector & | txVector, |
double | ber | ||
) | const |
txVector | the transmission vector |
ber | the probability of bit error rate |
Definition at line 630 of file wifi-phy.cc.
References m_interference.
|
static |
This function is a wrapper for the CalculateTxDuration variant that accepts a WifiConstPsduMap as first argument.
This function inserts the given PSDU in a WifiConstPsduMap along with a STA-ID value that is determined based on whether the given PSDU has to be transmitted as a DL or UL frame, thus allowing to properly calculate the TX duration in case the PSDU has to be transmitted as an UL frame.
psdu | the PSDU to transmit |
txVector | the TXVECTOR used for the transmission of the PSDU |
band | the frequency band |
Definition at line 1336 of file wifi-phy.cc.
References CalculateTxDuration(), and GetWifiConstPsduMap().
|
static |
size | the number of bytes in the packet to send |
txVector | the TXVECTOR used for the transmission of this packet |
band | the frequency band being used |
staId | the STA-ID of the recipient (only used for MU) |
Definition at line 1327 of file wifi-phy.cc.
References CalculatePhyPreambleAndHeaderDuration(), GetPayloadDuration(), ns3::Time::IsStrictlyPositive(), ns3::NORMAL_MPDU, and NS_ASSERT.
Referenced by ns3::FrameExchangeManager::CalculateAcknowledgmentTime(), ns3::HtFrameExchangeManager::CalculateAcknowledgmentTime(), ns3::FrameExchangeManager::CalculateProtectionTime(), CalculateTxDuration(), ns3::PhyEntity::CalculateTxDuration(), ns3::HePhy::CalculateTxDuration(), ns3::FrameExchangeManager::DoSendCtsAfterRts(), ns3::QosFrameExchangeManager::GetCtsToSelfDurationId(), ns3::FrameExchangeManager::GetFrameDurationId(), ns3::QosFrameExchangeManager::GetFrameDurationId(), ns3::FrameExchangeManager::GetRtsDurationId(), ns3::QosFrameExchangeManager::GetRtsDurationId(), ns3::FrameExchangeManager::GetTxDuration(), ns3::HtPpdu::GetTxDuration(), ns3::OfdmPpdu::GetTxDuration(), SpectrumWifiPhyBasicTest::MakeSignal(), WifiPhyThresholdsTest::MakeWifiSignal(), TestMultipleHeTbPreambles::RxHeTbPpdu(), Send(), TestAmpduReception::SendAmpduWithThreeMpdus(), ns3::HtFrameExchangeManager::SendBlockAck(), ns3::QosFrameExchangeManager::SendCfEndIfNeeded(), ns3::FrameExchangeManager::SendCtsToSelf(), ns3::FrameExchangeManager::SendMpdu(), ns3::HtFrameExchangeManager::SendMpduFromBaManager(), TestUlOfdmaPowerControl::SendMuBar(), ns3::FrameExchangeManager::SendNormalAck(), TestThresholdPreambleDetectionWithoutFrameCapture::SendPacket(), TestThresholdPreambleDetectionWithFrameCapture::SendPacket(), TestPhyHeadersReception::SendPacket(), TestSimpleFrameCaptureModel::SendPacket(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SendPsduMap(), ns3::FrameExchangeManager::SendRts(), TestUlOfdmaPpduUid::SendTbPpdu(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), ns3::RrMultiUserScheduler::TrySendingBsrpTf(), and ns3::FrameExchangeManager::UpdateNav().
|
static |
psduMap | the PSDU(s) to transmit indexed by STA-ID |
txVector | the TXVECTOR used for the transmission of the PPDU |
band | the frequency band being used |
Definition at line 1342 of file wifi-phy.cc.
References ns3::WifiTxVector::GetModulationClass(), and GetStaticPhyEntity().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard.
Definition at line 718 of file wifi-phy.cc.
References AddPhyEntity(), GetSifs(), GetSlot(), m_ackTxTime, ns3::MicroSeconds(), NS_LOG_FUNCTION, SetPifs(), SetSifs(), SetSlot(), and ns3::WIFI_MOD_CLASS_OFDM.
Referenced by Configure80211n(), and ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard.
Definition at line 812 of file wifi-phy.cc.
References AddPhyEntity(), Configure80211n(), NS_LOG_FUNCTION, and ns3::WIFI_MOD_CLASS_VHT.
Referenced by Configure80211ax(), and ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard.
Definition at line 820 of file wifi-phy.cc.
References AddPhyEntity(), Configure80211ac(), Configure80211n(), m_band, NS_LOG_FUNCTION, ns3::WIFI_MOD_CLASS_HE, and ns3::WIFI_PHY_BAND_2_4GHZ.
Referenced by ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard.
Definition at line 733 of file wifi-phy.cc.
References AddPhyEntity(), GetSifs(), GetSlot(), m_ackTxTime, ns3::MicroSeconds(), NS_LOG_FUNCTION, SetPifs(), SetSifs(), SetSlot(), ns3::WIFI_MOD_CLASS_DSSS, and ns3::WIFI_MOD_CLASS_HR_DSSS.
Referenced by Configure80211g(), and ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard.
Definition at line 750 of file wifi-phy.cc.
References AddPhyEntity(), Configure80211b(), NS_LOG_FUNCTION, and ns3::WIFI_MOD_CLASS_ERP_OFDM.
Referenced by Configure80211n(), and ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard.
Definition at line 793 of file wifi-phy.cc.
References AddPhyEntity(), Configure80211a(), Configure80211g(), m_band, m_blockAckTxTime, m_txSpatialStreams, ns3::MicroSeconds(), NS_LOG_FUNCTION, ns3::WIFI_MOD_CLASS_HT, and ns3::WIFI_PHY_BAND_2_4GHZ.
Referenced by Configure80211ac(), Configure80211ax(), and ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11p standard.
Definition at line 763 of file wifi-phy.cc.
References AddPhyEntity(), GetChannelWidth(), GetSifs(), GetSlot(), m_ackTxTime, ns3::MicroSeconds(), NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::OFDM_PHY_10_MHZ, ns3::OFDM_PHY_5_MHZ, SetPifs(), SetSifs(), SetSlot(), and ns3::WIFI_MOD_CLASS_OFDM.
Referenced by ConfigureStandard().
|
private |
Configure the device MCS set with the appropriate HtMcs modes for the number of available transmit spatial streams.
|
virtual |
Configure the PHY-level parameters for different Wi-Fi standard.
standard | the Wi-Fi standard |
Definition at line 835 of file wifi-phy.cc.
References Configure80211a(), Configure80211ac(), Configure80211ax(), Configure80211b(), Configure80211g(), Configure80211n(), Configure80211p(), ns3::WifiPhyOperatingChannel::IsSet(), m_channelSettings, m_operatingChannel, m_phyEntities, m_standard, NS_ABORT_MSG_IF, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, SetOperatingChannel(), ns3::WIFI_STANDARD_80211a, ns3::WIFI_STANDARD_80211ac, ns3::WIFI_STANDARD_80211ax, ns3::WIFI_STANDARD_80211b, ns3::WIFI_STANDARD_80211g, ns3::WIFI_STANDARD_80211n, ns3::WIFI_STANDARD_80211p, and ns3::WIFI_STANDARD_UNSPECIFIED.
Referenced by DoChannelSwitch(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), DcfImmediateAccessBroadcastTestCase::DoRun(), Bug2831TestCase::DoRun(), HeAggregationTest::DoRunSubTest(), SpectrumWifiPhyBasicTest::DoSetup(), SpectrumWifiPhyFilterTest::DoSetup(), TestDlOfdmaPhyTransmission::DoSetup(), TestUlOfdmaPpduUid::DoSetup(), TestMultipleHeTbPreambles::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestThresholdPreambleDetectionWithoutFrameCapture::DoSetup(), TestThresholdPreambleDetectionWithFrameCapture::DoSetup(), TestSimpleFrameCaptureModel::DoSetup(), TestPhyHeadersReception::DoSetup(), TestAmpduReception::DoSetup(), WifiPhyThresholdsTest::DoSetup(), and InterferenceExperiment::Run().
|
virtual |
bandWidth | the width (MHz) of the band used for the OFDMA transmission. Must be a multiple of 20 MHz |
guardBandwidth | width of the guard band (MHz) |
range | the subcarrier range of the HE RU |
bandIndex | the index (starting at 0) of the band within the operating channel |
This is a helper function to convert HE RU subcarriers, which are relative to the center frequency subcarrier, to the indexes used by the Spectrum model.
Reimplemented in ns3::SpectrumWifiPhy.
Definition at line 1642 of file wifi-phy.cc.
References NS_ASSERT_MSG.
Referenced by ns3::HePhy::GetNonOfdmaBand(), ns3::HePhy::GetRuBandForRx(), and ns3::HePhy::GetRuBandForTx().
|
protectedvirtual |
Actually switch channel based on the stored channel settings.
Reimplemented in ns3::SpectrumWifiPhy.
Definition at line 1021 of file wifi-phy.cc.
References AddSupportedChannelWidth(), ConfigureStandard(), GetChannelSwitchDelay(), GetChannelWidth(), ns3::WifiPhyOperatingChannel::GetDefaultChannelNumber(), ns3::GetDefaultChannelWidth(), ns3::GetDefaultPhyBand(), ns3::Object::IsInitialized(), m_band, m_channelSettings, m_interference, m_operatingChannel, m_standard, m_state, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WifiPhyOperatingChannel::Set(), ns3::WifiPhyOperatingChannel::SetPrimary20Index(), and ns3::WIFI_PHY_BAND_UNSPECIFIED.
Referenced by ns3::SpectrumWifiPhy::DoChannelSwitch(), and SetOperatingChannel().
|
protectedvirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Reimplemented in OfdmaSpectrumWifiPhy, ns3::YansWifiPhy, and ns3::SpectrumWifiPhy.
Definition at line 339 of file wifi-phy.cc.
References ns3::EventId::Cancel(), m_currentEvent, m_currentPreambleEvents, m_device, m_endPhyRxEvent, m_endTxEvent, m_frameCaptureModel, m_interference, m_mobility, m_phyEntities, m_postReceptionErrorModel, m_preambleDetectionModel, m_random, m_state, m_supportedChannelWidthSet, m_wifiRadioEnergyModel, and NS_LOG_FUNCTION.
Referenced by ns3::SpectrumWifiPhy::DoDispose(), and ns3::YansWifiPhy::DoDispose().
void ns3::WifiPhy::EndReceiveInterBss | ( | void | ) |
For HE receptions only, check and possibly modify the transmit power restriction state at the end of PPDU reception.
Definition at line 1651 of file wifi-phy.cc.
References m_channelAccessRequested, m_powerRestricted, and NS_LOG_FUNCTION.
Referenced by ResetCca().
Time ns3::WifiPhy::GetAckTxTime | ( | void | ) | const |
Return the estimated Ack TX time for this PHY.
Definition at line 706 of file wifi-phy.cc.
References m_ackTxTime.
Referenced by ns3::MinstrelWifiManager::CalculateTimeUnicastPacket(), and ns3::ChannelAccessManager::GetEifsNoDifs().
|
private |
Get the PSDU addressed to that PHY in a PPDU (useful for MU PPDU).
ppdu | the PPDU to extract the PSDU from |
Definition at line 1973 of file wifi-phy.cc.
References GetPhyEntity().
Referenced by AbortCurrentReception().
|
protectedvirtual |
Get the start band index and the stop band index for a given band.
bandWidth | the width of the band to be returned (MHz) |
bandIndex | the index of the band to be returned |
Reimplemented in ns3::SpectrumWifiPhy.
Definition at line 1992 of file wifi-phy.cc.
Referenced by GetPrimaryBand().
Time ns3::WifiPhy::GetBlockAckTxTime | ( | void | ) | const |
Return the estimated BlockAck TX time for this PHY.
Definition at line 712 of file wifi-phy.cc.
References m_blockAckTxTime.
Referenced by ns3::MinstrelHtWifiManager::CalculateRetransmits().
std::list< uint8_t > ns3::WifiPhy::GetBssMembershipSelectorList | ( | void | ) | const |
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception modes that this WifiPhy(-derived class) can support - a set of WifiMode objects which we call the BssMembershipSelectorSet, and which is stored inside HT PHY (and above) instances.
Definition at line 1144 of file wifi-phy.cc.
References list, and m_phyEntities.
Referenced by ns3::StaWifiMac::Receive().
double ns3::WifiPhy::GetCcaEdThreshold | ( | void | ) | const |
Return the CCA threshold (dBm).
Definition at line 440 of file wifi-phy.cc.
References m_ccaEdThresholdW, and ns3::WToDbm().
Referenced by GetTypeId().
Return the Channel this WifiPhy is connected to.
Implemented in ns3::YansWifiPhy, and ns3::SpectrumWifiPhy.
Referenced by ns3::WaveNetDevice::GetChannel(), and ns3::WifiNetDevice::GetChannel().
uint8_t ns3::WifiPhy::GetChannelNumber | ( | void | ) | const |
Return current channel number.
Definition at line 912 of file wifi-phy.cc.
References ns3::WifiPhyOperatingChannel::GetNumber(), and m_operatingChannel.
Referenced by SetChannelFrequencyTest::DoRun(), ns3::MeshWifiInterfaceMac::GetFrequencyChannel(), GetTypeId(), ns3::YansWifiChannel::Send(), ns3::WaveFrameExchangeManager::StartTransmission(), ns3::DefaultChannelScheduler::SwitchToNextChannel(), and ns3::PhyEntity::Transmit().
Time ns3::WifiPhy::GetChannelSwitchDelay | ( | void | ) | const |
Definition at line 624 of file wifi-phy.cc.
References m_channelSwitchDelay.
Referenced by ns3::DefaultChannelScheduler::AssignDefaultCchAccess(), DoChannelSwitch(), and ns3::DefaultChannelScheduler::SwitchToNextChannel().
uint16_t ns3::WifiPhy::GetChannelWidth | ( | void | ) | const |
Definition at line 918 of file wifi-phy.cc.
References ns3::WifiPhyOperatingChannel::GetWidth(), and m_operatingChannel.
Referenced by ns3::IdealWifiManager::BuildSnrThresholds(), Configure80211p(), DoChannelSwitch(), ns3::IdealWifiManager::DoReportRtsOk(), SetChannelFrequencyTest::DoRun(), ns3::WifiRemoteStationManager::GetAckTxVector(), ns3::SpectrumWifiPhy::GetBand(), ns3::SpectrumWifiPhy::GetBandBandwidth(), ns3::WifiRemoteStationManager::GetBlockAckTxVector(), ns3::WifiRemoteStationManager::GetCtsToSelfTxVector(), ns3::WifiRemoteStationManager::GetCtsTxVector(), ns3::WifiRemoteStationManager::GetDataTxVector(), ns3::WifiMac::GetHeCapabilities(), GetMeasurementChannelWidth(), ns3::HePhy::GetNonOfdmaBand(), GetPrimaryBand(), ns3::WifiRemoteStationManager::GetRtsTxVector(), ns3::HePhy::GetRuBandForRx(), ns3::PhyEntity::GetRxChannelWidth(), ns3::DsssPhy::GetRxChannelWidth(), ns3::SpectrumWifiPhy::GetRxSpectrumModel(), GetTypeId(), ns3::WifiMac::GetVhtCapabilities(), ns3::ApWifiMac::GetVhtOperation(), ns3::ThompsonSamplingWifiManager::InitializeStation(), ns3::OfdmPhy::IsChannelWidthSupported(), ns3::WifiRemoteStationManager::LookupState(), ns3::SpectrumWifiPhy::ResetSpectrumModel(), ns3::SpectrumWifiPhy::StartRx(), and ns3::SpectrumWifiPhy::UpdateInterferenceHelperBands().
WifiMode ns3::WifiPhy::GetDefaultMode | ( | void | ) | const |
Get the default WifiMode supported by the PHY.
This is the first mode to be added (i.e. the lowest one over all supported PHY entities).
Definition at line 1692 of file wifi-phy.cc.
References m_phyEntities, and NS_ASSERT_MSG.
|
protected |
Perform any actions necessary when user changes operating channel after initialization.
Definition at line 970 of file wifi-phy.cc.
References ns3::EventId::Cancel(), CCA_BUSY, GetDelayUntilIdle(), IDLE, ns3::Object::IsInitialized(), IsStateSwitching(), m_channelAccessRequested, m_currentEvent, m_currentPreambleEvents, m_endPhyRxEvent, m_phyEntities, m_powerRestricted, m_state, NS_ASSERT, NS_LOG_DEBUG, RX, ns3::Seconds(), SLEEP, and TX.
Referenced by SetOperatingChannel().
Time ns3::WifiPhy::GetDelayUntilIdle | ( | void | ) |
The PHY will never become WifiPhy::IDLE before the delay returned by this method but it could become really idle later.
Definition at line 1851 of file wifi-phy.cc.
References m_state.
Referenced by GetDelayUntilChannelSwitch(), ns3::StaWifiMac::MissedBeacons(), and SetSleepMode().
Ptr< WifiNetDevice > ns3::WifiPhy::GetDevice | ( | void | ) | const |
Return the device this PHY is associated with.
Definition at line 541 of file wifi-phy.cc.
References m_device.
Referenced by ns3::HePhy::DoStartReceivePayload(), ns3::WifiRemoteStationManager::GetAckTxVector(), ns3::WifiRemoteStationManager::GetBlockAckTxVector(), ns3::HePhy::GetBssColor(), ns3::WifiRemoteStationManager::GetCtsToSelfTxVector(), ns3::WifiRemoteStationManager::GetCtsTxVector(), ns3::WifiRemoteStationManager::GetDataTxVector(), ns3::WifiRemoteStationManager::GetGuardInterval(), ns3::WifiRemoteStationManager::GetHeSupported(), ns3::WifiRemoteStationManager::GetHtSupported(), ns3::WifiRemoteStationManager::GetLdpcSupported(), ns3::WifiRemoteStationManager::GetRtsTxVector(), ns3::WifiRemoteStationManager::GetShortGuardIntervalSupported(), ns3::HePhy::GetStaId(), and ns3::WifiRemoteStationManager::GetVhtSupported().
uint16_t ns3::WifiPhy::GetFrequency | ( | void | ) | const |
Definition at line 906 of file wifi-phy.cc.
References ns3::WifiPhyOperatingChannel::GetFrequency(), and m_operatingChannel.
Referenced by SetChannelFrequencyTest::DoRun(), ns3::PhyEntity::EndReceivePayload(), ns3::SpectrumWifiPhy::GetRxSpectrumModel(), GetTypeId(), ns3::SpectrumWifiPhy::ResetSpectrumModel(), and Send().
|
pure virtual |
currentChannelWidth | channel width of the current transmission (MHz) |
Note: in order to properly model out of band transmissions for OFDM, the guard band has been configured so as to expand the modeled spectrum up to the outermost referenced point in "Transmit spectrum mask" sections' PSDs of each PHY specification of 802.11-2016 standard. It thus ultimately corresponds to the current channel bandwidth (which can be different from devices max channel width).
This method is only relevant for SpectrumWifiPhy.
Implemented in OfdmaSpectrumWifiPhy, ns3::YansWifiPhy, and ns3::SpectrumWifiPhy.
Referenced by ns3::PhyEntity::GetGuardBandwidth().
Time ns3::WifiPhy::GetLastRxEndTime | ( | void | ) | const |
Return the end time of the last received packet.
Definition at line 1863 of file wifi-phy.cc.
References m_state.
Referenced by ns3::PhyEntity::DoEndReceivePayload(), and ns3::HePhy::DoEndReceivePayload().
Time ns3::WifiPhy::GetLastRxStartTime | ( | void | ) | const |
Return the start time of the last received packet.
Definition at line 1857 of file wifi-phy.cc.
References m_state.
|
static |
Get the maximum PSDU size in bytes for the given modulation class.
modulation | the modulation class |
Definition at line 1348 of file wifi-phy.cc.
References GetStaticPhyEntity().
Referenced by ns3::QosFrameExchangeManager::IsWithinSizeAndTimeLimits().
uint8_t ns3::WifiPhy::GetMaxSupportedRxSpatialStreams | ( | void | ) | const |
Definition at line 1138 of file wifi-phy.cc.
References m_rxSpatialStreams.
Referenced by ns3::ApWifiMac::GetHeOperation(), GetTypeId(), ns3::WifiMac::GetVhtCapabilities(), ns3::ApWifiMac::GetVhtOperation(), ns3::HePhy::IsConfigSupported(), and ns3::HtPhy::IsConfigSupported().
uint8_t ns3::WifiPhy::GetMaxSupportedTxSpatialStreams | ( | void | ) | const |
Definition at line 1120 of file wifi-phy.cc.
References m_txSpatialStreams.
Referenced by ns3::IdealWifiManager::BuildSnrThresholds(), ns3::WifiMac::GetHeCapabilities(), ns3::ApWifiMac::GetHtOperation(), GetTypeId(), ns3::WifiMac::GetVhtCapabilities(), ns3::ThompsonSamplingWifiManager::InitializeStation(), and Send().
WifiMode ns3::WifiPhy::GetMcs | ( | WifiModulationClass | modulation, |
uint8_t | mcs | ||
) | const |
Get the WifiMode object corresponding to the given MCS of the given modulation class.
modulation | the modulation class |
mcs | the MCS value |
Definition at line 1802 of file wifi-phy.cc.
References IsMcsSupported(), m_phyEntities, and NS_ASSERT_MSG.
The WifiPhy::GetMcsList() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception MCS indices that this WifiPhy(-derived class) can support - a set of MCS indices which is stored by each HT PHY (and above).
Definition at line 1767 of file wifi-phy.cc.
References list, and m_phyEntities.
Referenced by ns3::WifiRemoteStationManager::AddAllSupportedMcs(), ns3::WifiRemoteStationManager::GetControlAnswerMode(), ns3::WifiMac::GetHeCapabilities(), ns3::WifiMac::GetHtCapabilities(), ns3::ApWifiMac::GetHtOperation(), ns3::WifiMac::GetVhtCapabilities(), and ns3::ThompsonSamplingWifiManager::InitializeStation().
std::list< WifiMode > ns3::WifiPhy::GetMcsList | ( | WifiModulationClass | modulation | ) | const |
Get the list of supported MCSs for the given modulation class (i.e.
corresponding to a given PHY entity).
modulation | the modulation class |
Definition at line 1784 of file wifi-phy.cc.
References list, and m_phyEntities.
|
protected |
Return the channel width used to measure the RSSI.
This corresponds to the primary channel unless it corresponds to the HE TB PPDU solicited by the AP.
ppdu | the PPDU that is being received |
Definition at line 1980 of file wifi-phy.cc.
References GetChannelWidth(), and GetPhyEntity().
Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod(), Reset(), ResetReceive(), ResumeFromOff(), ResumeFromSleep(), ns3::PhyEntity::StartReceivePreamble(), StartReceivePreamble(), and ns3::SpectrumWifiPhy::StartRx().
Ptr< MobilityModel > ns3::WifiPhy::GetMobility | ( | void | ) | const |
Return the mobility model this PHY is associated with.
This method will return either the mobility model that has been explicitly set by a call to YansWifiPhy::SetMobility(), or else will return the mobility model (if any) that has been aggregated to the node.
Definition at line 553 of file wifi-phy.cc.
References ns3::WifiNetDevice::GetNode(), ns3::Object::GetObject(), m_device, and m_mobility.
Referenced by ns3::WifiSpectrumPhyInterface::GetMobility(), and ns3::YansWifiChannel::Send().
The WifiPhy::GetModeList() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception (non-MCS) modes that this WifiPhy(-derived class) can support - a set of modes which is stored by each non-HT PHY.
It is important to note that this list is a superset (not necessarily proper) of the OperationalRateSet (which is logically, if not actually, a property of the associated WifiRemoteStationManager), which itself is a superset (again, not necessarily proper) of the BSSBasicRateSet.
Definition at line 1718 of file wifi-phy.cc.
References list, and m_phyEntities.
Referenced by ns3::WifiRemoteStationManager::AddAllSupportedModes(), and ns3::WifiRemoteStationManager::GetControlAnswerMode().
std::list< WifiMode > ns3::WifiPhy::GetModeList | ( | WifiModulationClass | modulation | ) | const |
Get the list of supported (non-MCS) modes for the given modulation class (i.e.
corresponding to a given PHY entity).
modulation | the modulation class |
Definition at line 1735 of file wifi-phy.cc.
References list, and m_phyEntities.
uint16_t ns3::WifiPhy::GetNMcs | ( | void | ) | const |
Definition at line 1753 of file wifi-phy.cc.
References m_phyEntities.
uint8_t ns3::WifiPhy::GetNTxPower | ( | void | ) | const |
Return the number of available transmission power levels.
Definition at line 490 of file wifi-phy.cc.
References m_nTxPower.
uint8_t ns3::WifiPhy::GetNumberOfAntennas | ( | void | ) | const |
Definition at line 1089 of file wifi-phy.cc.
References m_numberOfAntennas.
Referenced by GetTypeId(), SetMaxSupportedRxSpatialStreams(), and SetMaxSupportedTxSpatialStreams().
const WifiPhyOperatingChannel & ns3::WifiPhy::GetOperatingChannel | ( | void | ) | const |
Get a const reference to the operating channel.
Definition at line 900 of file wifi-phy.cc.
References m_operatingChannel.
Referenced by ns3::HePhy::BuildPpdu(), SetChannelFrequencyTest::DoRun(), ns3::PhyEntity::GetCenterFrequencyForChannelWidth(), ns3::HePhy::GetCenterFrequencyForNonOfdmaPart(), ns3::HePhy::GetNonOfdmaBand(), ns3::HePhy::GetRuBandForRx(), ns3::WifiMac::SetWifiPhy(), ns3::SpectrumWifiPhy::StartRx(), and ns3::SpectrumWifiPhy::UpdateInterferenceHelperBands().
|
static |
size | the number of bytes in the packet to send |
txVector | the TXVECTOR used for the transmission of this packet |
band | the frequency band |
mpdutype | the type of the MPDU as defined in WifiPhy::MpduType. |
incFlag | this flag is used to indicate that the variables need to be update or not This function is called a couple of times for the same packet so variables should not be increased each time. |
totalAmpduSize | the total size of the previously transmitted MPDUs for the concerned A-MPDU. If incFlag is set, this parameter will be updated. |
totalAmpduNumSymbols | the number of symbols previously transmitted for the MPDUs in the concerned A-MPDU, used for the computation of the number of symbols needed for the last MPDU. If incFlag is set, this parameter will be updated. |
staId | the STA-ID of the PSDU (only used for MU PPDUs) |
Definition at line 1311 of file wifi-phy.cc.
References ns3::WifiTxVector::GetModulationClass(), and GetStaticPhyEntity().
|
static |
size | the number of bytes in the packet to send |
txVector | the TXVECTOR used for the transmission of this packet |
band | the frequency band |
mpdutype | the type of the MPDU as defined in WifiPhy::MpduType. |
staId | the STA-ID of the PSDU (only used for MU PPDUs) |
Definition at line 1303 of file wifi-phy.cc.
Referenced by ns3::MinstrelHtWifiManager::CalculateMpduTxDuration(), CalculateTxDuration(), and ns3::PhyEntity::ScheduleEndOfMpdus().
WifiPhyBand ns3::WifiPhy::GetPhyBand | ( | void | ) | const |
Get the configured Wi-Fi band.
Definition at line 887 of file wifi-phy.cc.
References m_band.
Referenced by ns3::HePhy::BuildPpdu(), ns3::HtPhy::BuildPpdu(), ns3::ErpOfdmPhy::BuildPpdu(), ns3::OfdmPhy::BuildPpdu(), ns3::VhtPhy::BuildPpdu(), ns3::FrameExchangeManager::CalculateAcknowledgmentTime(), ns3::HtFrameExchangeManager::CalculateAcknowledgmentTime(), ns3::FrameExchangeManager::CalculateProtectionTime(), ns3::WifiMac::ConfigurePhyDependentParameters(), ns3::FrameExchangeManager::DoSendCtsAfterRts(), ns3::QosFrameExchangeManager::GetCtsToSelfDurationId(), ns3::FrameExchangeManager::GetFrameDurationId(), ns3::QosFrameExchangeManager::GetFrameDurationId(), ns3::WifiMac::GetHeCapabilities(), ns3::FrameExchangeManager::GetRtsDurationId(), ns3::QosFrameExchangeManager::GetRtsDurationId(), ns3::FrameExchangeManager::GetTxDuration(), ns3::WifiNetDevice::GetVhtConfiguration(), SpectrumWifiPhyBasicTest::MakeSignal(), WifiPhyThresholdsTest::MakeWifiSignal(), TestMultipleHeTbPreambles::RxHeTbPpdu(), ns3::PhyEntity::ScheduleEndOfMpdus(), Send(), TestAmpduReception::SendAmpduWithThreeMpdus(), ns3::HtFrameExchangeManager::SendBlockAck(), ns3::QosFrameExchangeManager::SendCfEndIfNeeded(), ns3::FrameExchangeManager::SendCtsToSelf(), ns3::FrameExchangeManager::SendMpdu(), ns3::HtFrameExchangeManager::SendMpduFromBaManager(), ns3::FrameExchangeManager::SendNormalAck(), TestThresholdPreambleDetectionWithoutFrameCapture::SendPacket(), TestThresholdPreambleDetectionWithFrameCapture::SendPacket(), TestPhyHeadersReception::SendPacket(), TestSimpleFrameCaptureModel::SendPacket(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SendPsduMap(), ns3::FrameExchangeManager::SendRts(), TestUlOfdmaPpduUid::SendTbPpdu(), TestPhyPaddingExclusion::SetTrigVector(), TestUlOfdmaPhyTransmission::SetTrigVector(), ns3::MeshWifiInterfaceMac::SwitchFrequencyChannel(), and ns3::FrameExchangeManager::UpdateNav().
Ptr< PhyEntity > ns3::WifiPhy::GetPhyEntity | ( | WifiModulationClass | modulation | ) | const |
Get the supported PHY entity corresponding to the modulation class, for the WifiPhy instance.
modulation | the modulation class |
Definition at line 644 of file wifi-phy.cc.
References m_phyEntities, and NS_ABORT_MSG_IF.
Referenced by GetAddressedPsduInPpdu(), OfdmaSpectrumWifiPhy::GetHePhy(), GetMeasurementChannelWidth(), TestMultipleHeTbPreambles::RxHeTbPpdu(), Send(), ns3::HeFrameExchangeManager::SendPsduMap(), TestPhyPaddingExclusion::SetTrigVector(), TestUlOfdmaPhyTransmission::SetTrigVector(), and ns3::SpectrumWifiPhy::StartTx().
Time ns3::WifiPhy::GetPifs | ( | void | ) | const |
Return the PCF Interframe Space (PIFS) for this PHY.
Definition at line 700 of file wifi-phy.cc.
References m_pifs.
Referenced by ns3::QosFrameExchangeManager::PifsRecovery(), and ns3::QosFrameExchangeManager::TransmissionFailed().
double ns3::WifiPhy::GetPowerDbm | ( | uint8_t | power | ) | const |
Get the power of the given power level in dBm.
In SpectrumWifiPhy implementation, the power levels are equally spaced (in dBm).
power | the power level |
Definition at line 606 of file wifi-phy.cc.
References m_nTxPower, m_txPowerBaseDbm, m_txPowerEndDbm, NS_ASSERT, and NS_ASSERT_MSG.
Referenced by ns3::AparfWifiManager::CheckInit(), ns3::ParfWifiManager::CheckInit(), ns3::RrpaaWifiManager::CheckInit(), ns3::AparfWifiManager::DoGetDataTxVector(), ns3::ParfWifiManager::DoGetDataTxVector(), ns3::RrpaaWifiManager::DoGetDataTxVector(), GetTxPowerForTransmission(), Send(), and ns3::YansWifiPhy::StartTx().
|
static |
Definition at line 1291 of file wifi-phy.cc.
References ns3::MicroSeconds().
Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod(), and ns3::PhyEntity::StartPreambleDetectionPeriod().
uint64_t ns3::WifiPhy::GetPreviouslyRxPpduUid | ( | void | ) | const |
Definition at line 1605 of file wifi-phy.cc.
References m_previouslyRxPpduUid.
Referenced by ns3::HePhy::ObtainNextUid().
uint8_t ns3::WifiPhy::GetPrimary20Index | ( | void | ) | const |
Definition at line 924 of file wifi-phy.cc.
References ns3::WifiPhyOperatingChannel::GetPrimaryChannelIndex(), and m_operatingChannel.
Referenced by GetTypeId().
|
protected |
If the operating channel width is a multiple of 20 MHz, return the start band index and the stop band index for the primary channel of the given bandwidth (which must be a multiple of 20 MHz and not exceed the operating channel width).
Otherwise, this call is equivalent to GetBand with bandIndex equal to zero.
bandWidth | the width of the band to be returned (MHz) |
Definition at line 2001 of file wifi-phy.cc.
References GetBand(), GetChannelWidth(), ns3::WifiPhyOperatingChannel::GetPrimaryChannelIndex(), and m_operatingChannel.
Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod(), ns3::PhyEntity::GetChannelWidthAndBand(), ns3::PhyEntity::GetPhyHeaderSnrPer(), ns3::PhyEntity::GetRxPowerWForPpdu(), and SwitchMaybeToCcaBusy().
uint8_t ns3::WifiPhy::GetPrimaryChannelNumber | ( | uint16_t | primaryChannelWidth | ) | const |
Get channel number of the primary channel.
primaryChannelWidth | the width of the primary channel (MHz) |
Definition at line 2029 of file wifi-phy.cc.
References ns3::WifiPhyOperatingChannel::GetPrimaryChannelNumber(), m_operatingChannel, and m_standard.
double ns3::WifiPhy::GetRxGain | ( | void | ) | const |
Return the reception gain (dB).
Definition at line 516 of file wifi-phy.cc.
References m_rxGainDb.
Referenced by GetTypeId(), and ns3::SpectrumWifiPhy::StartRx().
double ns3::WifiPhy::GetRxSensitivity | ( | void | ) | const |
Return the receive sensitivity threshold (dBm).
Definition at line 427 of file wifi-phy.cc.
References m_rxSensitivityW, and ns3::WToDbm().
Referenced by GetTypeId(), and ns3::SpectrumWifiPhy::StartRx().
bool ns3::WifiPhy::GetShortPhyPreambleSupported | ( | void | ) | const |
Return whether short PHY preamble is supported.
Definition at line 529 of file wifi-phy.cc.
References m_shortPreamble.
Referenced by GetTypeId().
Time ns3::WifiPhy::GetSifs | ( | void | ) | const |
Return the Short Interframe Space (SIFS) for this PHY.
Definition at line 676 of file wifi-phy.cc.
References m_sifs.
Referenced by ns3::FrameExchangeManager::CalculateAcknowledgmentTime(), ns3::HtFrameExchangeManager::CalculateAcknowledgmentTime(), ns3::FrameExchangeManager::CalculateProtectionTime(), ns3::MinstrelHtWifiManager::CalculateRetransmits(), ns3::MinstrelWifiManager::CalculateTimeUnicastPacket(), Configure80211a(), Configure80211b(), Configure80211p(), ns3::FrameExchangeManager::DoSendCtsAfterRts(), ns3::HtFrameExchangeManager::EndReceiveAmpdu(), ns3::FrameExchangeManager::GetCtsToSelfDurationId(), ns3::ChannelAccessManager::GetEifsNoDifs(), ns3::FrameExchangeManager::GetFrameDurationId(), ns3::FrameExchangeManager::GetRtsDurationId(), ns3::ChannelAccessManager::GetSifs(), ns3::QosFrameExchangeManager::PifsRecovery(), ns3::FrameExchangeManager::ReceiveMpdu(), ns3::HtFrameExchangeManager::ReceiveMpdu(), ns3::QosFrameExchangeManager::ReceiveMpdu(), ns3::HtFrameExchangeManager::SendBlockAck(), ns3::FrameExchangeManager::SendCtsToSelf(), ns3::FrameExchangeManager::SendMpdu(), ns3::HtFrameExchangeManager::SendMpduFromBaManager(), TestUlOfdmaPowerControl::SendMuBar(), ns3::FrameExchangeManager::SendNormalAck(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SendPsduMap(), ns3::FrameExchangeManager::SendRts(), ns3::FrameExchangeManager::TransmissionSucceeded(), ns3::HtFrameExchangeManager::TransmissionSucceeded(), ns3::QosFrameExchangeManager::TransmissionSucceeded(), and ns3::FrameExchangeManager::UpdateNav().
Time ns3::WifiPhy::GetSlot | ( | void | ) | const |
Return the slot duration for this PHY.
Definition at line 688 of file wifi-phy.cc.
References m_slot.
Referenced by ns3::MinstrelHtWifiManager::CalculateRetransmits(), ns3::MinstrelWifiManager::CalculateTimeUnicastPacket(), Configure80211a(), Configure80211b(), Configure80211p(), ns3::ChannelAccessManager::GetSlot(), ns3::FrameExchangeManager::SendMpdu(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SendPsduMap(), ns3::FrameExchangeManager::SendRts(), and ns3::FrameExchangeManager::UpdateNav().
WifiStandard ns3::WifiPhy::GetStandard | ( | void | ) | const |
Get the configured Wi-Fi standard.
Definition at line 894 of file wifi-phy.cc.
References m_standard.
Referenced by ns3::WifiMac::ConfigurePhyDependentParameters(), ns3::SpectrumWifiPhy::GetBandBandwidth(), ns3::SpectrumWifiPhy::StartRx(), and ns3::SpectrumWifiPhy::UpdateInterferenceHelperBands().
|
static |
txVector | the transmission parameters used for this packet |
Definition at line 1297 of file wifi-phy.cc.
References ns3::MicroSeconds().
Ptr< WifiPhyStateHelper > ns3::WifiPhy::GetState | ( | void | ) | const |
Return the WifiPhyStateHelper of this PHY.
Definition at line 384 of file wifi-phy.cc.
References m_state.
Referenced by WifiPhyThresholdsTest::DoSetup().
|
staticprivate |
Definition at line 377 of file wifi-phy.cc.
Referenced by AddPhyEntity(), AddStaticPhyEntity(), and GetStaticPhyEntity().
|
static |
Get the implemented PHY entity corresponding to the modulation class.
This is used to compute the different amendment-specific parameters within calling static methods.
modulation | the modulation class |
Definition at line 636 of file wifi-phy.cc.
References GetStaticPhyEntities(), and NS_ABORT_MSG_IF.
Referenced by ns3::InterferenceHelper::CalculatePayloadSnrPer(), CalculatePhyPreambleAndHeaderDuration(), CalculateTxDuration(), GetMaxPsduSize(), GetPayloadDuration(), ns3::HePhy::GetValidPpduDuration(), and GetWifiConstPsduMap().
std::vector< uint16_t > ns3::WifiPhy::GetSupportedChannelWidthSet | ( | void | ) | const |
Definition at line 1174 of file wifi-phy.cc.
References m_supportedChannelWidthSet.
double ns3::WifiPhy::GetTxGain | ( | void | ) | const |
Return the transmission gain (dB).
Definition at line 503 of file wifi-phy.cc.
References m_txGainDb.
Referenced by GetTxPowerForTransmission(), GetTypeId(), Send(), ns3::YansWifiPhy::StartTx(), and ns3::PhyEntity::Transmit().
|
pure virtual |
This method is only relevant for SpectrumWifiPhy.
Implemented in ns3::YansWifiPhy, and ns3::SpectrumWifiPhy.
Referenced by ns3::PhyEntity::GetTxMaskRejectionParams().
double ns3::WifiPhy::GetTxPowerEnd | ( | void | ) | const |
Return the maximum available transmission power level (dBm).
Definition at line 477 of file wifi-phy.cc.
References m_txPowerEndDbm.
Referenced by GetTypeId().
Compute the transmit power for the next transmission.
The returned power will satisfy the power density constraints after addition of antenna gain.
ppdu | the PPDU to transmit |
Definition at line 1940 of file wifi-phy.cc.
References ns3::WifiTxVector::GetNssMax(), GetPowerDbm(), GetTxGain(), ns3::WifiTxVector::GetTxPowerLevel(), m_powerDensityLimit, m_powerRestricted, m_txPowerMaxMimo, m_txPowerMaxSiso, min, NS_LOG_FUNCTION, NS_LOG_INFO, and ns3::RatioToDb().
Referenced by Send(), ns3::YansWifiPhy::StartTx(), and ns3::PhyEntity::Transmit().
double ns3::WifiPhy::GetTxPowerStart | ( | void | ) | const |
Return the minimum available transmission power level (dBm).
Definition at line 464 of file wifi-phy.cc.
References m_txPowerBaseDbm.
Referenced by GetTypeId().
|
static |
Get the type ID.
Definition at line 57 of file wifi-phy.cc.
References GetCcaEdThreshold(), GetChannelNumber(), GetChannelWidth(), GetFrequency(), GetMaxSupportedRxSpatialStreams(), GetMaxSupportedTxSpatialStreams(), GetNumberOfAntennas(), GetPrimary20Index(), GetRxGain(), GetRxSensitivity(), GetShortPhyPreambleSupported(), GetTxGain(), GetTxPowerEnd(), GetTxPowerStart(), m_channelSwitchDelay, m_frameCaptureModel, m_nTxPower, m_phyMonitorSniffRxTrace, m_phyMonitorSniffTxTrace, m_phyRxBeginTrace, m_phyRxDropTrace, m_phyRxEndTrace, m_phyRxPayloadBeginTrace, m_phyTxBeginTrace, m_phyTxDropTrace, m_phyTxEndTrace, m_phyTxPsduBeginTrace, m_pifs, m_postReceptionErrorModel, m_powerDensityLimit, m_preambleDetectionModel, m_sifs, m_slot, m_state, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeDoubleAccessor(), ns3::MakeEnumChecker(), ns3::MakePointerAccessor(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeTraceSourceAccessor(), ns3::MakeUintegerAccessor(), ns3::MicroSeconds(), SetCcaEdThreshold(), SetMaxSupportedRxSpatialStreams(), SetMaxSupportedTxSpatialStreams(), SetNumberOfAntennas(), SetOperatingChannel(), ns3::TypeId::SetParent(), SetRxGain(), SetRxNoiseFigure(), SetRxSensitivity(), SetShortPhyPreambleSupported(), SetTxGain(), SetTxPowerEnd(), SetTxPowerStart(), ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PHY_BAND_5GHZ, ns3::WIFI_PHY_BAND_6GHZ, and ns3::WIFI_PHY_BAND_UNSPECIFIED.
|
static |
Get a WifiConstPsduMap from a PSDU and the TXVECTOR to use to send the PSDU.
The STA-ID value is properly determined based on whether the given PSDU has to be transmitted as a DL or UL frame.
psdu | the given PSDU |
txVector | the TXVECTOR to use to send the PSDU |
Definition at line 1500 of file wifi-phy.cc.
References ns3::WifiTxVector::GetModulationClass(), and GetStaticPhyEntity().
Referenced by CalculateTxDuration(), and Send().
bool ns3::WifiPhy::IsMcsSupported | ( | WifiModulationClass | modulation, |
uint8_t | mcs | ||
) | const |
Check if the given MCS of the given modulation class is supported by the PHY.
modulation | the modulation class |
mcs | the MCS value |
Definition at line 1707 of file wifi-phy.cc.
References m_phyEntities.
Referenced by GetMcs().
bool ns3::WifiPhy::IsModeSupported | ( | WifiMode | mode | ) | const |
Check if the given WifiMode is supported by the PHY.
mode | the wifi mode to check |
Definition at line 1679 of file wifi-phy.cc.
References m_phyEntities.
bool ns3::WifiPhy::IsStateCcaBusy | ( | void | ) | const |
Definition at line 1809 of file wifi-phy.cc.
References m_state.
bool ns3::WifiPhy::IsStateIdle | ( | void | ) | const |
Definition at line 1815 of file wifi-phy.cc.
References m_state.
bool ns3::WifiPhy::IsStateOff | ( | void | ) | const |
Definition at line 1845 of file wifi-phy.cc.
References m_state.
bool ns3::WifiPhy::IsStateRx | ( | void | ) | const |
Definition at line 1821 of file wifi-phy.cc.
References m_state.
Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod(), and ResetReceive().
bool ns3::WifiPhy::IsStateSleep | ( | void | ) | const |
Definition at line 1839 of file wifi-phy.cc.
References m_state.
bool ns3::WifiPhy::IsStateSwitching | ( | void | ) | const |
Definition at line 1833 of file wifi-phy.cc.
References m_state.
Referenced by GetDelayUntilChannelSwitch().
bool ns3::WifiPhy::IsStateTx | ( | void | ) | const |
Definition at line 1827 of file wifi-phy.cc.
References m_state.
void ns3::WifiPhy::NotifyChannelAccessRequested | ( | void | ) |
Notify the PHY that an access to the channel was requested.
This is typically called by the channel access manager to to notify the PHY about an ongoing transmission. The PHY will use this information to determine whether it should use power restriction as imposed by OBSS_PD SR.
Definition at line 1672 of file wifi-phy.cc.
References m_channelAccessRequested, and NS_LOG_FUNCTION.
Referenced by ns3::ChannelAccessManager::RequestAccess().
void ns3::WifiPhy::NotifyMonitorSniffRx | ( | Ptr< const WifiPsdu > | psdu, |
uint16_t | channelFreqMhz, | ||
WifiTxVector | txVector, | ||
SignalNoiseDbm | signalNoise, | ||
std::vector< bool > | statusPerMpdu, | ||
uint16_t | staId = SU_STA_ID |
||
) |
Public method used to fire a MonitorSniffer trace for a wifi PSDU being received.
Implemented for encapsulation purposes. This method will extract all MPDUs if packet is an A-MPDU and will fire tracedCallback. The A-MPDU reference number (RX side) is set within the method. It must be a different value for each A-MPDU but the same for each subframe within one A-MPDU.
psdu | the PSDU being received |
channelFreqMhz | the frequency in MHz at which the packet is received. Note that in real devices this is normally the frequency to which the receiver is tuned, and this can be different than the frequency at which the packet was originally transmitted. This is because it is possible to have the receiver tuned on a given channel and still to be able to receive packets on a nearby channel. |
txVector | the TXVECTOR that holds RX parameters |
signalNoise | signal power and noise power in dBm (noise power includes the noise figure) |
statusPerMpdu | reception status per MPDU |
staId | the STA-ID |
Definition at line 1432 of file wifi-phy.cc.
References ns3::FIRST_MPDU_IN_AGGREGATE, ns3::WifiPsdu::GetAmpduSubframe(), ns3::WifiPsdu::GetNMpdus(), ns3::WifiPsdu::GetPacket(), ns3::WifiPsdu::IsAggregate(), ns3::WifiTxVector::IsAggregation(), ns3::WifiPsdu::IsSingle(), ns3::LAST_MPDU_IN_AGGREGATE, m_phyMonitorSniffRxTrace, m_rxMpduReferenceNumber, ns3::MIDDLE_MPDU_IN_AGGREGATE, ns3::MpduInfo::mpduRefNumber, ns3::NORMAL_MPDU, NS_ASSERT_MSG, ns3::SINGLE_MPDU, and ns3::MpduInfo::type.
Referenced by ns3::PhyEntity::EndReceivePayload().
void ns3::WifiPhy::NotifyMonitorSniffTx | ( | Ptr< const WifiPsdu > | psdu, |
uint16_t | channelFreqMhz, | ||
WifiTxVector | txVector, | ||
uint16_t | staId = SU_STA_ID |
||
) |
Public method used to fire a MonitorSniffer trace for a wifi PSDU being transmitted.
Implemented for encapsulation purposes. This method will extract all MPDUs if packet is an A-MPDU and will fire tracedCallback. The A-MPDU reference number (RX side) is set within the method. It must be a different value for each A-MPDU but the same for each subframe within one A-MPDU.
psdu | the PSDU being received |
channelFreqMhz | the frequency in MHz at which the packet is transmitted. |
txVector | the TXVECTOR that holds TX parameters |
staId | the STA-ID |
Definition at line 1469 of file wifi-phy.cc.
References ns3::FIRST_MPDU_IN_AGGREGATE, ns3::WifiPsdu::GetAmpduSubframe(), ns3::WifiPsdu::GetNMpdus(), ns3::WifiPsdu::GetPacket(), ns3::WifiPsdu::IsAggregate(), ns3::WifiTxVector::IsAggregation(), ns3::WifiPsdu::IsSingle(), ns3::LAST_MPDU_IN_AGGREGATE, m_phyMonitorSniffTxTrace, m_rxMpduReferenceNumber, ns3::MIDDLE_MPDU_IN_AGGREGATE, ns3::MpduInfo::mpduRefNumber, ns3::NORMAL_MPDU, NS_ASSERT_MSG, ns3::SINGLE_MPDU, and ns3::MpduInfo::type.
Referenced by Send().
void ns3::WifiPhy::NotifyRxBegin | ( | Ptr< const WifiPsdu > | psdu, |
const RxPowerWattPerChannelBand & | rxPowersW | ||
) |
Public method used to fire a PhyRxBegin trace.
Implemented for encapsulation purposes.
psdu | the PSDU being transmitted |
rxPowersW | the receive power per channel band in Watts |
Definition at line 1396 of file wifi-phy.cc.
References m_phyRxBeginTrace, and ns3::PeekPointer().
Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod().
void ns3::WifiPhy::NotifyRxDrop | ( | Ptr< const WifiPsdu > | psdu, |
WifiPhyRxfailureReason | reason | ||
) |
Public method used to fire a PhyRxDrop trace.
Implemented for encapsulation purposes.
psdu | the PSDU being transmitted |
reason | the reason the packet was dropped |
Definition at line 1420 of file wifi-phy.cc.
References m_phyRxDropTrace, and ns3::PeekPointer().
Referenced by AbortCurrentReception(), ns3::HePhy::DoGetEvent(), ns3::PhyEntity::DropPreambleEvent(), ns3::PhyEntity::EndPreambleDetectionPeriod(), and ns3::PhyEntity::EndReceiveField().
Public method used to fire a PhyRxEnd trace.
Implemented for encapsulation purposes.
psdu | the PSDU being transmitted |
Definition at line 1408 of file wifi-phy.cc.
References ns3::TracedCallback< Ts >::IsEmpty(), m_phyRxEndTrace, and ns3::PeekPointer().
Referenced by ns3::PhyEntity::EndReceivePayload().
void ns3::WifiPhy::NotifyTxBegin | ( | WifiConstPsduMap | psdus, |
double | txPowerW | ||
) |
Public method used to fire a PhyTxBegin trace.
Implemented for encapsulation purposes.
psdus | the PSDUs being transmitted (only one unless DL MU transmission) |
txPowerW | the transmit power in Watts |
Definition at line 1354 of file wifi-phy.cc.
References m_phyTxBeginTrace, and ns3::PeekPointer().
Referenced by Send().
Public method used to fire a PhyTxDrop trace.
Implemented for encapsulation purposes.
psdu | the PSDU being transmitted |
Definition at line 1384 of file wifi-phy.cc.
References ns3::TracedCallback< Ts >::IsEmpty(), m_phyTxDropTrace, and ns3::PeekPointer().
Referenced by Send().
void ns3::WifiPhy::NotifyTxEnd | ( | WifiConstPsduMap | psdus | ) |
Public method used to fire a PhyTxEnd trace.
Implemented for encapsulation purposes.
psdus | the PSDUs being transmitted (only one unless DL MU transmission) |
Definition at line 1369 of file wifi-phy.cc.
References ns3::TracedCallback< Ts >::IsEmpty(), m_phyTxEndTrace, and ns3::PeekPointer().
Referenced by Send().
|
private |
Add the given MCS to the device MCS set.
mode | the MCS to add to the device MCS set |
|
private |
Rebuild the mapping of MCS values to indices in the device MCS set.
void ns3::WifiPhy::RegisterListener | ( | WifiPhyListener * | listener | ) |
listener | the new listener |
Add the input listener to the list of objects to be notified of PHY-level events.
Definition at line 402 of file wifi-phy.cc.
References m_state.
Referenced by ns3::WifiRadioEnergyModelHelper::DoInstall(), and SpectrumWifiPhyListenerTest::DoSetup().
|
protected |
Reset data upon end of TX or RX.
Definition at line 1611 of file wifi-phy.cc.
References GetMeasurementChannelWidth(), m_currentEvent, m_currentPreambleEvents, m_phyEntities, NS_LOG_FUNCTION, and SwitchMaybeToCcaBusy().
Referenced by ns3::PhyEntity::ErasePreambleEvent(), ns3::PhyEntity::NotifyInterferenceRxEndAndClear(), TestMultipleHeTbPreambles::Reset(), and Send().
void ns3::WifiPhy::ResetCca | ( | bool | powerRestricted, |
double | txPowerMaxSiso = 0 , |
||
double | txPowerMaxMimo = 0 |
||
) |
Reset PHY to IDLE, with some potential TX power restrictions for the next transmission.
powerRestricted | flag whether the transmit power is restricted for the next transmission |
txPowerMaxSiso | the SISO transmit power restriction for the next transmission in dBm |
txPowerMaxMimo | the MIMO transmit power restriction for the next transmission in dBm |
Definition at line 1921 of file wifi-phy.cc.
References AbortCurrentReception(), EndReceiveInterBss(), m_currentEvent, m_powerRestricted, m_txPowerMaxMimo, m_txPowerMaxSiso, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, ns3::OBSS_PD_CCA_RESET, ns3::Simulator::Schedule(), and ns3::Simulator::ScheduleNow().
Reset PHY at the end of the packet under reception after it has failed the PHY header.
event | the corresponding event of the first time the packet arrives (also storing packet and TxVector information) |
Definition at line 1661 of file wifi-phy.cc.
References GetMeasurementChannelWidth(), IsStateRx(), m_currentEvent, m_currentPreambleEvents, m_interference, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, and SwitchMaybeToCcaBusy().
Referenced by ns3::PhyEntity::ResetReceive().
void ns3::WifiPhy::ResumeFromOff | ( | void | ) |
Resume from off mode.
Definition at line 1260 of file wifi-phy.cc.
References CCA_BUSY, GetMeasurementChannelWidth(), IDLE, m_state, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, OFF, RX, SLEEP, SWITCHING, SwitchMaybeToCcaBusy(), and TX.
Referenced by ns3::WifiRadioEnergyModelHelper::DoInstall().
void ns3::WifiPhy::ResumeFromSleep | ( | void | ) |
Resume from sleep mode.
Definition at line 1229 of file wifi-phy.cc.
References CCA_BUSY, GetMeasurementChannelWidth(), IDLE, m_currentPreambleEvents, m_state, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, RX, SLEEP, SWITCHING, SwitchMaybeToCcaBusy(), and TX.
void ns3::WifiPhy::Send | ( | Ptr< const WifiPsdu > | psdu, |
const WifiTxVector & | txVector | ||
) |
This function is a wrapper for the Send variant that accepts a WifiConstPsduMap as first argument.
This function inserts the given PSDU in a WifiConstPsduMap along with a STA-ID value that is determined based on whether the given PSDU has to be transmitted as a DL or UL frame.
psdu | the PSDU to send (in a SU PPDU) |
txVector | the TXVECTOR that has TX parameters such as mode, the transmission mode to use to send this PSDU, and txPowerLevel, a power level to use to send the whole PPDU. The real transmission power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels |
Definition at line 1506 of file wifi-phy.cc.
References GetWifiConstPsduMap(), and NS_LOG_FUNCTION.
Referenced by ns3::FrameExchangeManager::ForwardMpduDown(), ns3::HtFrameExchangeManager::ForwardPsduDown(), ns3::QosFrameExchangeManager::SendCfEndIfNeeded(), TestUlOfdmaPowerControl::SendMuBar(), TestDlOfdmaPhyTransmission::SendMuPpdu(), TestUlOfdmaPpduUid::SendMuPpdu(), SpectrumWifiPhyFilterTest::SendPpdu(), TestUlOfdmaPpduUid::SendSuPpdu(), and TestUlOfdmaPpduUid::SendTbPpdu().
void ns3::WifiPhy::Send | ( | WifiConstPsduMap | psdus, |
const WifiTxVector & | txVector | ||
) |
psdus | the PSDUs to send |
txVector | the TXVECTOR that has tx parameters such as mode, the transmission mode to use to send this PSDU, and txPowerLevel, a power level to use to send the whole PPDU. The real transmission power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels |
Definition at line 1513 of file wifi-phy.cc.
References AbortCurrentReception(), ns3::Time::As(), CalculateTxDuration(), ns3::EventId::Cancel(), ns3::DbmToW(), GetFrequency(), GetMaxSupportedTxSpatialStreams(), ns3::WifiTxVector::GetModulationClass(), ns3::WifiTxVector::GetNssMax(), GetPhyBand(), GetPhyEntity(), GetPowerDbm(), GetTxGain(), GetTxPowerForTransmission(), ns3::WifiTxVector::GetTxPowerLevel(), ns3::EventId::IsExpired(), m_channelAccessRequested, m_currentEvent, m_currentPreambleEvents, m_endPhyRxEvent, m_endTxEvent, m_phyEntities, m_phyTxPsduBeginTrace, m_powerRestricted, m_previouslyRxPpduUid, m_state, m_wifiRadioEnergyModel, NotifyMonitorSniffTx(), NotifyTxBegin(), NotifyTxDrop(), NotifyTxEnd(), ns3::Simulator::Now(), ns3::Time::NS, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, OFF, ns3::RECEPTION_ABORTED_BY_TX, Reset(), ns3::Simulator::Schedule(), StartTx(), and TX.
void ns3::WifiPhy::SetCapabilitiesChangedCallback | ( | Callback< void > | callback | ) |
callback | the callback to invoke when PHY capabilities have changed. |
Definition at line 414 of file wifi-phy.cc.
References m_capabilitiesChangedCallback.
Referenced by ns3::StaWifiMac::SetWifiPhy().
void ns3::WifiPhy::SetCcaEdThreshold | ( | double | threshold | ) |
Sets the CCA threshold (dBm).
The energy of a received signal should be higher than this threshold to allow the PHY layer to declare CCA BUSY state.
threshold | the CCA threshold in dBm |
Definition at line 433 of file wifi-phy.cc.
References ns3::DbmToW(), m_ccaEdThresholdW, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::WifiPhy::SetDevice | ( | const Ptr< WifiNetDevice > | device | ) |
Sets the device this PHY is associated with.
device | the device this PHY is associated with |
Definition at line 535 of file wifi-phy.cc.
References m_device.
Referenced by AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), DcfImmediateAccessBroadcastTestCase::DoRun(), Bug2831TestCase::DoRun(), HeAggregationTest::DoRunSubTest(), SpectrumWifiPhyFilterTest::DoSetup(), TestDlOfdmaPhyTransmission::DoSetup(), TestUlOfdmaPpduUid::DoSetup(), TestMultipleHeTbPreambles::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), TestPhyPaddingExclusion::DoSetup(), and InterferenceExperiment::Run().
void ns3::WifiPhy::SetErrorRateModel | ( | const Ptr< ErrorRateModel > | model | ) |
Sets the error rate model.
model | the error rate model |
Definition at line 574 of file wifi-phy.cc.
References m_interference, and NS_ASSERT.
Referenced by DcfImmediateAccessBroadcastTestCase::DoRun(), Bug2831TestCase::DoRun(), SpectrumWifiPhyBasicTest::DoSetup(), SpectrumWifiPhyFilterTest::DoSetup(), TestDlOfdmaPhyTransmission::DoSetup(), TestUlOfdmaPpduUid::DoSetup(), TestMultipleHeTbPreambles::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestThresholdPreambleDetectionWithoutFrameCapture::DoSetup(), TestThresholdPreambleDetectionWithFrameCapture::DoSetup(), TestSimpleFrameCaptureModel::DoSetup(), TestPhyHeadersReception::DoSetup(), TestAmpduReception::DoSetup(), WifiPhyThresholdsTest::DoSetup(), and InterferenceExperiment::Run().
void ns3::WifiPhy::SetFrameCaptureModel | ( | const Ptr< FrameCaptureModel > | frameCaptureModel | ) |
Sets the frame capture model.
frameCaptureModel | the frame capture model |
Definition at line 588 of file wifi-phy.cc.
References m_frameCaptureModel.
Referenced by TestThresholdPreambleDetectionWithFrameCapture::DoSetup(), TestSimpleFrameCaptureModel::DoSetup(), TestAmpduReception::DoSetup(), and InterferenceExperiment::Run().
|
virtual |
Sets the interference helper.
helper | the interference helper |
Reimplemented in ns3::YansWifiPhy.
Definition at line 566 of file wifi-phy.cc.
References ns3::DbToRatio(), m_interference, m_noiseFigureDb, and m_numberOfAntennas.
Referenced by SpectrumWifiPhyBasicTest::DoSetup(), SpectrumWifiPhyFilterTest::DoSetup(), TestDlOfdmaPhyTransmission::DoSetup(), TestUlOfdmaPpduUid::DoSetup(), TestMultipleHeTbPreambles::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestThresholdPreambleDetectionWithoutFrameCapture::DoSetup(), TestThresholdPreambleDetectionWithFrameCapture::DoSetup(), TestSimpleFrameCaptureModel::DoSetup(), TestPhyHeadersReception::DoSetup(), TestAmpduReception::DoSetup(), WifiPhyThresholdsTest::DoSetup(), InterferenceExperiment::Run(), and ns3::YansWifiPhy::SetInterferenceHelper().
void ns3::WifiPhy::SetMaxSupportedRxSpatialStreams | ( | uint8_t | streams | ) |
streams | the maximum number of supported RX spatial streams. |
Definition at line 1126 of file wifi-phy.cc.
References GetNumberOfAntennas(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_capabilitiesChangedCallback, m_rxSpatialStreams, and NS_ASSERT.
Referenced by GetTypeId().
void ns3::WifiPhy::SetMaxSupportedTxSpatialStreams | ( | uint8_t | streams | ) |
streams | the maximum number of supported TX spatial streams. |
Definition at line 1095 of file wifi-phy.cc.
References GetNumberOfAntennas(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_capabilitiesChangedCallback, m_phyEntities, m_txSpatialStreams, NS_ASSERT, and ns3::WIFI_MOD_CLASS_HT.
Referenced by GetTypeId().
void ns3::WifiPhy::SetMobility | ( | const Ptr< MobilityModel > | mobility | ) |
assign a mobility model to this device
This method allows a user to specify a mobility model that should be associated with this physical layer. Calling this method is optional and only necessary if the user wants to override the mobility model that is aggregated to the node.
mobility | the mobility model this PHY is associated with |
Definition at line 547 of file wifi-phy.cc.
References m_mobility, and third::mobility.
Referenced by DcfImmediateAccessBroadcastTestCase::DoRun(), Bug2831TestCase::DoRun(), SpectrumWifiPhyFilterTest::DoSetup(), TestDlOfdmaPhyTransmission::DoSetup(), TestUlOfdmaPpduUid::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), TestPhyPaddingExclusion::DoSetup(), InterferenceExperiment::Run(), and ns3::WifiSpectrumPhyInterface::SetMobility().
void ns3::WifiPhy::SetNTxPower | ( | uint8_t | n | ) |
Sets the number of transmission power levels available between the minimum level and the maximum level.
Transmission power levels are equally separated (in dBm) with the minimum and the maximum included.
n | the number of available levels |
Definition at line 483 of file wifi-phy.cc.
References m_nTxPower, and NS_LOG_FUNCTION.
void ns3::WifiPhy::SetNumberOfAntennas | ( | uint8_t | antennas | ) |
antennas | the number of antennas on this node. |
Definition at line 1077 of file wifi-phy.cc.
References m_interference, m_numberOfAntennas, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::WifiPhy::SetOffMode | ( | void | ) |
Put in off mode.
Definition at line 1214 of file wifi-phy.cc.
References ns3::EventId::Cancel(), m_channelAccessRequested, m_endPhyRxEvent, m_endTxEvent, m_phyEntities, m_powerRestricted, m_state, and NS_LOG_FUNCTION.
Referenced by ns3::WifiRadioEnergyModelHelper::DoInstall().
void ns3::WifiPhy::SetOperatingChannel | ( | const ChannelTuple & | channelTuple | ) |
If the standard for this object has not been set yet, store the given channel settings.
Otherwise, check if a channel switch can be performed now. If not, schedule another call to this method when channel switch can be performed. Otherwise, set the operating channel based on the given channel settings and call ConfigureStandard if the PHY band has changed.
channelTuple | the given channel settings |
Definition at line 930 of file wifi-phy.cc.
References DoChannelSwitch(), GetDelayUntilChannelSwitch(), ns3::Object::IsInitialized(), ns3::Time::IsStrictlyNegative(), ns3::Time::IsStrictlyPositive(), m_channelSettings, m_standard, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), ns3::Seconds(), and ns3::WIFI_STANDARD_UNSPECIFIED.
Referenced by ns3::DefaultChannelScheduler::AssignDefaultCchAccess(), Bug2831TestCase::ChangeSupportedChannelWidth(), ConfigureStandard(), SetChannelFrequencyTest::DoRun(), Bug2831TestCase::DoRun(), SpectrumWifiPhyBasicTest::DoSetup(), TestUlOfdmaPpduUid::DoSetup(), TestMultipleHeTbPreambles::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestThresholdPreambleDetectionWithoutFrameCapture::DoSetup(), TestThresholdPreambleDetectionWithFrameCapture::DoSetup(), TestSimpleFrameCaptureModel::DoSetup(), TestPhyHeadersReception::DoSetup(), TestAmpduReception::DoSetup(), WifiPhyThresholdsTest::DoSetup(), GetTypeId(), InterferenceExperiment::Run(), SpectrumWifiPhyFilterTest::RunOne(), TestDlOfdmaPhyTransmission::RunOne(), TestUlOfdmaPhyTransmission::RunOne(), InterferenceHelperSequenceTest::SwitchCh(), ns3::MeshWifiInterfaceMac::SwitchFrequencyChannel(), and ns3::DefaultChannelScheduler::SwitchToNextChannel().
void ns3::WifiPhy::SetPifs | ( | Time | pifs | ) |
Set the PCF Interframe Space (PIFS) for this PHY.
pifs | the PIFS duration |
Definition at line 694 of file wifi-phy.cc.
References m_pifs.
Referenced by Configure80211a(), Configure80211b(), and Configure80211p().
void ns3::WifiPhy::SetPostReceptionErrorModel | ( | const Ptr< ErrorModel > | em | ) |
Attach a receive ErrorModel to the WifiPhy.
The WifiPhy may optionally include an ErrorModel in the packet receive chain. The error model is additive to any modulation-based error model based on SNR, and is typically used to force specific packet losses or for testing purposes.
em | Pointer to the ErrorModel. |
Definition at line 581 of file wifi-phy.cc.
References m_postReceptionErrorModel, and NS_LOG_FUNCTION.
void ns3::WifiPhy::SetPreambleDetectionModel | ( | const Ptr< PreambleDetectionModel > | preambleDetectionModel | ) |
Sets the preamble detection model.
preambleDetectionModel | the preamble detection model |
Definition at line 594 of file wifi-phy.cc.
References m_preambleDetectionModel.
Referenced by TestMultipleHeTbPreambles::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), TestThresholdPreambleDetectionWithoutFrameCapture::DoSetup(), TestThresholdPreambleDetectionWithFrameCapture::DoSetup(), TestSimpleFrameCaptureModel::DoSetup(), and TestAmpduReception::DoSetup().
void ns3::WifiPhy::SetReceiveErrorCallback | ( | RxErrorCallback | callback | ) |
callback | the callback to invoke upon erroneous packet reception. |
Definition at line 396 of file wifi-phy.cc.
References m_state.
Referenced by SpectrumWifiPhyBasicTest::DoSetup(), TestDlOfdmaPhyTransmission::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestThresholdPreambleDetectionWithoutFrameCapture::DoSetup(), TestThresholdPreambleDetectionWithFrameCapture::DoSetup(), TestAmpduReception::DoSetup(), and WifiPhyThresholdsTest::DoSetup().
void ns3::WifiPhy::SetReceiveOkCallback | ( | RxOkCallback | callback | ) |
callback | the callback to invoke upon successful packet reception. |
Definition at line 390 of file wifi-phy.cc.
References m_state.
Referenced by SpectrumWifiPhyBasicTest::DoSetup(), TestDlOfdmaPhyTransmission::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestThresholdPreambleDetectionWithoutFrameCapture::DoSetup(), TestThresholdPreambleDetectionWithFrameCapture::DoSetup(), TestSimpleFrameCaptureModel::DoSetup(), TestAmpduReception::DoSetup(), WifiPhyThresholdsTest::DoSetup(), TestUlOfdmaPowerControl::ReplaceReceiveOkCallbackOfAp(), ns3::FrameExchangeManager::ResetPhy(), and ns3::FrameExchangeManager::SetWifiPhy().
void ns3::WifiPhy::SetRxGain | ( | double | gain | ) |
Sets the reception gain (dB).
gain | the reception gain in dB |
Definition at line 509 of file wifi-phy.cc.
References m_rxGainDb, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::WifiPhy::SetRxNoiseFigure | ( | double | noiseFigureDb | ) |
Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
noiseFigureDb | noise figure in dB |
Definition at line 446 of file wifi-phy.cc.
References ns3::DbToRatio(), m_interference, m_noiseFigureDb, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::WifiPhy::SetRxSensitivity | ( | double | threshold | ) |
Sets the receive sensitivity threshold (dBm).
The energy of a received signal should be higher than this threshold to allow the PHY layer to detect the signal.
threshold | the receive sensitivity threshold in dBm |
Definition at line 420 of file wifi-phy.cc.
References ns3::DbmToW(), m_rxSensitivityW, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::WifiPhy::SetShortPhyPreambleSupported | ( | bool | preamble | ) |
Enable or disable short PHY preamble.
preamble | sets whether short PHY preamble is supported or not |
Definition at line 522 of file wifi-phy.cc.
References m_shortPreamble, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::WifiPhy::SetSifs | ( | Time | sifs | ) |
Set the Short Interframe Space (SIFS) for this PHY.
sifs | the SIFS duration |
Definition at line 670 of file wifi-phy.cc.
References m_sifs.
Referenced by Configure80211a(), Configure80211b(), and Configure80211p().
void ns3::WifiPhy::SetSleepMode | ( | void | ) |
Put in sleep mode.
Definition at line 1180 of file wifi-phy.cc.
References CCA_BUSY, GetDelayUntilIdle(), IDLE, m_channelAccessRequested, m_powerRestricted, m_state, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, RX, ns3::Simulator::Schedule(), SLEEP, SWITCHING, and TX.
void ns3::WifiPhy::SetSlot | ( | Time | slot | ) |
Set the slot duration for this PHY.
slot | the slot duration |
Definition at line 682 of file wifi-phy.cc.
References m_slot.
Referenced by Configure80211a(), Configure80211b(), Configure80211p(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::UpdateApInfoFromAssocResp(), ns3::StaWifiMac::UpdateApInfoFromBeacon(), and ns3::StaWifiMac::UpdateApInfoFromProbeResp().
void ns3::WifiPhy::SetTxGain | ( | double | gain | ) |
Sets the transmission gain (dB).
gain | the transmission gain in dB |
Definition at line 496 of file wifi-phy.cc.
References m_txGainDb, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::WifiPhy::SetTxPowerEnd | ( | double | end | ) |
Sets the maximum available transmission power level (dBm).
end | the maximum transmission power level (dBm) |
Definition at line 470 of file wifi-phy.cc.
References m_txPowerEndDbm, and NS_LOG_FUNCTION.
Referenced by GetTypeId(), and InterferenceExperiment::Run().
void ns3::WifiPhy::SetTxPowerStart | ( | double | start | ) |
Sets the minimum available transmission power level (dBm).
start | the minimum transmission power level (dBm) |
Definition at line 457 of file wifi-phy.cc.
References m_txPowerBaseDbm, NS_LOG_FUNCTION, and visualizer.core::start().
Referenced by GetTypeId(), and InterferenceExperiment::Run().
void ns3::WifiPhy::SetWifiRadioEnergyModel | ( | const Ptr< WifiRadioEnergyModel > | wifiRadioEnergyModel | ) |
Sets the wifi radio energy model.
wifiRadioEnergyModel | the wifi radio energy model |
Definition at line 600 of file wifi-phy.cc.
References m_wifiRadioEnergyModel.
Referenced by ns3::WifiRadioEnergyModelHelper::DoInstall().
void ns3::WifiPhy::StartReceivePreamble | ( | Ptr< WifiPpdu > | ppdu, |
RxPowerWattPerChannelBand & | rxPowersW, | ||
Time | rxDuration | ||
) |
Start receiving the PHY preamble of a PPDU (i.e.
the first bit of the preamble has arrived).
ppdu | the arriving PPDU |
rxPowersW | the receive power in W per band |
rxDuration | the duration of the PPDU |
Definition at line 1624 of file wifi-phy.cc.
References GetMeasurementChannelWidth(), m_interference, m_phyEntities, NS_LOG_DEBUG, and SwitchMaybeToCcaBusy().
Referenced by ns3::SpectrumWifiPhy::StartRx().
ppdu | the PPDU to send |
Implemented in OfdmaSpectrumWifiPhy, ns3::YansWifiPhy, and ns3::SpectrumWifiPhy.
Referenced by Send().
|
protected |
Check if PHY state should move to CCA busy state based on current state of interference tracker.
In this model, CCA becomes busy when the aggregation of all signals as tracked by the InterferenceHelper class is higher than the CcaEdThreshold
channelWidth | the channel width in MHz used for RSSI measurement |
Definition at line 1869 of file wifi-phy.cc.
References ns3::Time::As(), GetPrimaryBand(), ns3::Time::IsZero(), m_ccaEdThresholdW, m_interference, m_state, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::Time::S.
Referenced by ns3::PhyEntity::DropPreambleEvent(), ns3::PhyEntity::EndReceiveField(), ns3::PhyEntity::EndReceivePayload(), ns3::PhyEntity::ErasePreambleEvent(), Reset(), ResetReceive(), ResumeFromOff(), ResumeFromSleep(), ns3::PhyEntity::StartReceivePreamble(), StartReceivePreamble(), and ns3::SpectrumWifiPhy::StartRx().
void ns3::WifiPhy::UnregisterListener | ( | WifiPhyListener * | listener | ) |
listener | the listener to be unregistered |
Remove the input listener from the list of objects to be notified of PHY-level events.
Definition at line 408 of file wifi-phy.cc.
References m_state.
|
friend |
Definition at line 52 of file wifi-phy.h.
|
private |
estimated Ack TX time
Definition at line 1361 of file wifi-phy.h.
Referenced by Configure80211a(), Configure80211b(), Configure80211p(), and GetAckTxTime().
|
private |
WifiPhyBand.
Definition at line 1353 of file wifi-phy.h.
Referenced by Configure80211ax(), Configure80211n(), DoChannelSwitch(), and GetPhyBand().
|
private |
estimated BlockAck TX time
Definition at line 1362 of file wifi-phy.h.
Referenced by Configure80211n(), and GetBlockAckTxTime().
|
private |
Callback when PHY capabilities changed.
Definition at line 1396 of file wifi-phy.h.
Referenced by SetCapabilitiesChangedCallback(), SetMaxSupportedRxSpatialStreams(), and SetMaxSupportedTxSpatialStreams().
|
private |
Clear channel assessment (CCA) threshold in watts.
Definition at line 1365 of file wifi-phy.h.
Referenced by GetCcaEdThreshold(), SetCcaEdThreshold(), and SwitchMaybeToCcaBusy().
|
private |
Flag if channels access has been requested (used for OBSS_PD SR)
Definition at line 1376 of file wifi-phy.h.
Referenced by EndReceiveInterBss(), GetDelayUntilChannelSwitch(), NotifyChannelAccessRequested(), Send(), SetOffMode(), and SetSleepMode().
|
private |
Store operating channel settings until initialization.
Definition at line 1354 of file wifi-phy.h.
Referenced by ConfigureStandard(), DoChannelSwitch(), and SetOperatingChannel().
|
private |
Time required to switch between channel.
Definition at line 1385 of file wifi-phy.h.
Referenced by GetChannelSwitchDelay(), and GetTypeId().
Hold the current event.
Definition at line 1153 of file wifi-phy.h.
Referenced by AbortCurrentReception(), ns3::PhyEntity::DoAbortCurrentReception(), DoDispose(), ns3::PhyEntity::DoEndReceivePayload(), ns3::PhyEntity::EndPreambleDetectionPeriod(), OfdmaSpectrumWifiPhy::GetCurrentEvent(), ns3::PhyEntity::GetCurrentEvent(), GetDelayUntilChannelSwitch(), Reset(), ResetCca(), ResetReceive(), Send(), and ns3::PhyEntity::StartReceivePreamble().
|
protected |
store event associated to a PPDU (that has a unique ID and preamble combination) whose preamble is being received
Definition at line 1154 of file wifi-phy.h.
Referenced by AbortCurrentReception(), ns3::PhyEntity::AddPreambleEvent(), DoDispose(), ns3::PhyEntity::DoEndReceivePayload(), ns3::PhyEntity::DoEndReceivePreamble(), ns3::PhyEntity::DoGetEvent(), ns3::PhyEntity::DropPreambleEvent(), ns3::PhyEntity::EndPreambleDetectionPeriod(), ns3::PhyEntity::ErasePreambleEvent(), OfdmaSpectrumWifiPhy::GetCurrentPreambleEvents(), ns3::PhyEntity::GetCurrentPreambleEvents(), GetDelayUntilChannelSwitch(), Reset(), ResetReceive(), ResumeFromSleep(), Send(), and ns3::PhyEntity::StartReceivePreamble().
|
private |
Pointer to the device.
Definition at line 1387 of file wifi-phy.h.
Referenced by DoDispose(), GetDevice(), GetMobility(), and SetDevice().
|
protected |
the end of PHY receive event
Definition at line 1150 of file wifi-phy.h.
Referenced by AbortCurrentReception(), DoDispose(), ns3::PhyEntity::EndPreambleDetectionPeriod(), ns3::PhyEntity::EndReceiveField(), GetDelayUntilChannelSwitch(), Send(), SetOffMode(), ns3::PhyEntity::StartReceiveField(), and ns3::PhyEntity::StartReceivePayload().
|
protected |
the end of transmit event
Definition at line 1151 of file wifi-phy.h.
Referenced by DoDispose(), Send(), and SetOffMode().
|
private |
Frame capture model.
Definition at line 1390 of file wifi-phy.h.
Referenced by DoDispose(), GetTypeId(), SetFrameCaptureModel(), and ns3::PhyEntity::StartReceivePreamble().
|
protected |
Pointer to a helper responsible for interference computations.
Definition at line 1142 of file wifi-phy.h.
Referenced by AbortCurrentReception(), AssignStreams(), CalculateSnr(), ns3::PhyEntity::CreateInterferenceEvent(), DoChannelSwitch(), DoDispose(), ns3::PhyEntity::EndPreambleDetectionPeriod(), ns3::PhyEntity::EndReceivePayload(), OfdmaSpectrumWifiPhy::GetEnergyDuration(), ns3::PhyEntity::GetPhyHeaderSnrPer(), ns3::PhyEntity::GetReceptionStatus(), ns3::PhyEntity::NotifyInterferenceRxEndAndClear(), ResetReceive(), SetErrorRateModel(), SetInterferenceHelper(), ns3::YansWifiPhy::SetInterferenceHelper(), SetNumberOfAntennas(), SetRxNoiseFigure(), ns3::PhyEntity::StartPreambleDetectionPeriod(), StartReceivePreamble(), ns3::SpectrumWifiPhy::StartRx(), SwitchMaybeToCcaBusy(), ns3::PhyEntity::UpdateInterferenceEvent(), and ns3::SpectrumWifiPhy::UpdateInterferenceHelperBands().
|
private |
Pointer to the mobility model.
Definition at line 1388 of file wifi-phy.h.
Referenced by DoDispose(), GetMobility(), and SetMobility().
|
private |
The noise figure in dB.
Definition at line 1383 of file wifi-phy.h.
Referenced by SetInterferenceHelper(), and SetRxNoiseFigure().
|
private |
Number of available transmission power levels.
Definition at line 1370 of file wifi-phy.h.
Referenced by GetNTxPower(), GetPowerDbm(), GetTypeId(), and SetNTxPower().
|
private |
Number of transmitters.
Definition at line 1379 of file wifi-phy.h.
Referenced by GetNumberOfAntennas(), SetInterferenceHelper(), and SetNumberOfAntennas().
|
private |
Operating channel.
Definition at line 1355 of file wifi-phy.h.
Referenced by ConfigureStandard(), DoChannelSwitch(), GetChannelNumber(), GetChannelWidth(), GetFrequency(), GetOperatingChannel(), GetPrimary20Index(), GetPrimaryBand(), and GetPrimaryChannelNumber().
|
protected |
This map holds the supported PHY entities.
The set of parameters (e.g. mode) that this WifiPhy(-derived class) can support can be obtained through it.
When it comes to modes, in conversation we call this set the DeviceRateSet (not a term you'll find in the standard), and it is a superset of standard-defined parameters such as the OperationalRateSet, and the BSSBasicRateSet (which, themselves, have a superset/subset relationship).
Mandatory rates relevant to this WifiPhy can be found by iterating over the elements of this map, for each modulation class, looking for WifiMode objects for which WifiMode::IsMandatory() is true.
Definition at line 1175 of file wifi-phy.h.
Referenced by AbortCurrentReception(), AddPhyEntity(), ConfigureStandard(), DoDispose(), OfdmaSpectrumWifiPhy::DoInitialize(), ns3::PhyEntity::EndPreambleDetectionPeriod(), GetBssMembershipSelectorList(), GetDefaultMode(), GetDelayUntilChannelSwitch(), GetMcs(), GetMcsList(), GetModeList(), GetNMcs(), GetPhyEntity(), IsMcsSupported(), IsModeSupported(), Reset(), Send(), SetMaxSupportedTxSpatialStreams(), SetOffMode(), and StartReceivePreamble().
|
private |
A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being received.
As a reference with the real world, firing this trace corresponds in the madwifi driver to calling the function ieee80211_input_monitor()
Definition at line 1327 of file wifi-phy.h.
Referenced by GetTypeId(), and NotifyMonitorSniffRx().
|
private |
A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being transmitted.
As a reference with the real world, firing this trace corresponds in the madwifi driver to calling the function ieee80211_input_monitor()
Definition at line 1341 of file wifi-phy.h.
Referenced by GetTypeId(), and NotifyMonitorSniffTx().
|
private |
The trace source fired when a packet begins the reception process from the medium.
Definition at line 1282 of file wifi-phy.h.
Referenced by GetTypeId(), and NotifyRxBegin().
|
private |
The trace source fired when the PHY layer drops a packet it has received.
Definition at line 1313 of file wifi-phy.h.
Referenced by GetTypeId(), and NotifyRxDrop().
|
private |
The trace source fired when a packet ends the reception process from the medium.
Definition at line 1306 of file wifi-phy.h.
Referenced by GetTypeId(), and NotifyRxEnd().
|
private |
The trace source fired when the reception of the PHY payload (PSDU) begins.
This traced callback models the behavior of the PHY-RXSTART primitive which is launched upon correct decoding of the PHY header and support of modes within. We thus assume that it is sent just before starting the decoding of the payload, since it's there that support of the header's content is checked. In addition, it's also at that point that the correct decoding of HT-SIG, VHT-SIGs, and HE-SIGs are checked.
Definition at line 1298 of file wifi-phy.h.
Referenced by ns3::PhyEntity::EndReceiveField(), GetTypeId(), ns3::PhyEntity::NotifyPayloadBegin(), and ns3::PhyEntity::StartReceivePayload().
|
private |
The trace source fired when a packet begins the transmission process on the medium.
Definition at line 1251 of file wifi-phy.h.
Referenced by GetTypeId(), and NotifyTxBegin().
|
private |
The trace source fired when the PHY layer drops a packet as it tries to transmit it.
Definition at line 1274 of file wifi-phy.h.
Referenced by GetTypeId(), and NotifyTxDrop().
|
private |
The trace source fired when a packet ends the transmission process on the medium.
Definition at line 1266 of file wifi-phy.h.
Referenced by GetTypeId(), and NotifyTxEnd().
|
private |
The trace source fired when a PSDU map begins the transmission process on the medium.
Definition at line 1258 of file wifi-phy.h.
Referenced by GetTypeId(), and Send().
|
private |
PCF Interframe Space (PIFS) duration.
Definition at line 1360 of file wifi-phy.h.
Referenced by GetPifs(), GetTypeId(), and SetPifs().
|
private |
Error model for receive packet events.
Definition at line 1393 of file wifi-phy.h.
Referenced by DoDispose(), ns3::PhyEntity::GetReceptionStatus(), GetTypeId(), and SetPostReceptionErrorModel().
|
private |
the power density limit (dBm/MHz)
Definition at line 1371 of file wifi-phy.h.
Referenced by GetTxPowerForTransmission(), and GetTypeId().
|
private |
Flag whether transmit power is restricted by OBSS PD SR.
Definition at line 1373 of file wifi-phy.h.
Referenced by EndReceiveInterBss(), GetDelayUntilChannelSwitch(), GetTxPowerForTransmission(), ResetCca(), Send(), SetOffMode(), and SetSleepMode().
|
private |
Preamble detection model.
Definition at line 1391 of file wifi-phy.h.
Referenced by DoDispose(), ns3::PhyEntity::EndPreambleDetectionPeriod(), GetTypeId(), and SetPreambleDetectionModel().
|
protected |
UID of the previously received PPDU, reset to UINT64_MAX upon transmission.
Definition at line 1156 of file wifi-phy.h.
Referenced by ns3::PhyEntity::EndReceivePayload(), GetPreviouslyRxPpduUid(), Send(), OfdmaSpectrumWifiPhy::SetPpduUid(), and OfdmaSpectrumWifiPhy::SetTriggerFrameUid().
|
protected |
Provides uniform random variables.
Definition at line 1144 of file wifi-phy.h.
Referenced by WifiPhy(), AssignStreams(), DoDispose(), and ns3::PhyEntity::GetRandomValue().
|
private |
Reception gain (dB)
Definition at line 1367 of file wifi-phy.h.
Referenced by GetRxGain(), and SetRxGain().
|
protected |
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU.
Definition at line 1148 of file wifi-phy.h.
Referenced by NotifyMonitorSniffRx(), and NotifyMonitorSniffTx().
|
private |
Receive sensitivity threshold in watts.
Definition at line 1364 of file wifi-phy.h.
Referenced by GetRxSensitivity(), and SetRxSensitivity().
|
private |
Number of supported RX spatial streams.
Definition at line 1381 of file wifi-phy.h.
Referenced by GetMaxSupportedRxSpatialStreams(), and SetMaxSupportedRxSpatialStreams().
|
private |
Flag if short PHY preamble is supported.
Definition at line 1378 of file wifi-phy.h.
Referenced by GetShortPhyPreambleSupported(), and SetShortPhyPreambleSupported().
|
private |
Short Interframe Space (SIFS) duration.
Definition at line 1358 of file wifi-phy.h.
Referenced by GetSifs(), GetTypeId(), and SetSifs().
|
private |
Slot duration.
Definition at line 1359 of file wifi-phy.h.
Referenced by GetSlot(), GetTypeId(), and SetSlot().
|
private |
WifiStandard.
Definition at line 1352 of file wifi-phy.h.
Referenced by ConfigureStandard(), DoChannelSwitch(), GetPrimaryChannelNumber(), GetStandard(), and SetOperatingChannel().
|
protected |
Pointer to WifiPhyStateHelper.
Definition at line 1145 of file wifi-phy.h.
Referenced by WifiPhy(), AbortCurrentReception(), DoChannelSwitch(), DoDispose(), GetDelayUntilChannelSwitch(), GetDelayUntilIdle(), GetLastRxEndTime(), GetLastRxStartTime(), GetState(), GetTypeId(), IsStateCcaBusy(), IsStateIdle(), IsStateOff(), IsStateRx(), IsStateSleep(), IsStateSwitching(), IsStateTx(), RegisterListener(), ResumeFromOff(), ResumeFromSleep(), Send(), SetOffMode(), ns3::PhyEntity::SetOwner(), SetReceiveErrorCallback(), SetReceiveOkCallback(), SetSleepMode(), SwitchMaybeToCcaBusy(), and UnregisterListener().
|
private |
Supported channel width set (MHz)
Definition at line 1356 of file wifi-phy.h.
Referenced by AddSupportedChannelWidth(), DoDispose(), and GetSupportedChannelWidthSet().
|
private |
Record the time the last preamble was detected.
Definition at line 1394 of file wifi-phy.h.
Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod(), and ns3::PhyEntity::StartReceivePreamble().
|
private |
Transmission gain (dB)
Definition at line 1366 of file wifi-phy.h.
Referenced by GetTxGain(), and SetTxGain().
|
protected |
A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU.
Definition at line 1147 of file wifi-phy.h.
|
private |
Minimum transmission power (dBm)
Definition at line 1368 of file wifi-phy.h.
Referenced by GetPowerDbm(), GetTxPowerStart(), and SetTxPowerStart().
|
private |
Maximum transmission power (dBm)
Definition at line 1369 of file wifi-phy.h.
Referenced by GetPowerDbm(), GetTxPowerEnd(), and SetTxPowerEnd().
|
private |
MIMO maximum transmit power due to OBSS PD SR power restriction (dBm)
Definition at line 1375 of file wifi-phy.h.
Referenced by GetTxPowerForTransmission(), and ResetCca().
|
private |
SISO maximum transmit power due to OBSS PD SR power restriction (dBm)
Definition at line 1374 of file wifi-phy.h.
Referenced by GetTxPowerForTransmission(), and ResetCca().
|
private |
Number of supported TX spatial streams.
Definition at line 1380 of file wifi-phy.h.
Referenced by Configure80211n(), GetMaxSupportedTxSpatialStreams(), and SetMaxSupportedTxSpatialStreams().
|
private |
Wifi radio energy model.
Definition at line 1392 of file wifi-phy.h.
Referenced by DoDispose(), Send(), and SetWifiRadioEnergyModel().