802.11 PHY layer modelThis PHY implements a model of 802.11a. More...
#include <yans-wifi-phy.h>
Public Member Functions | |
YansWifiPhy () | |
virtual | ~YansWifiPhy () |
int64_t | AssignStreams (int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. More... | |
virtual double | CalculateSnr (WifiMode txMode, double ber) const |
virtual void | ConfigureStandard (enum WifiPhyStandard standard) |
Configure the PHY-level parameters for different Wi-Fi standard. More... | |
virtual uint32_t | GetBssMembershipSelector (uint32_t selector) 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 BssMemebershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet. More... | |
double | GetCcaMode1Threshold (void) const |
Return the CCA threshold (dBm). More... | |
virtual Ptr< WifiChannel > | GetChannel (void) const |
Return the WifiChannel this WifiPhy is connected to. More... | |
virtual bool | GetChannelBonding (void) const |
Return whether channel bonding is supported. More... | |
double | GetChannelFrequencyMhz () const |
Return current center channel frequency in MHz. More... | |
uint16_t | GetChannelNumber () const |
Return the current channel number. More... | |
virtual Time | GetDelayUntilIdle (void) |
Ptr< Object > | GetDevice (void) const |
Return the device this PHY is associated with. More... | |
double | GetEdThreshold (void) const |
Return the energy detection threshold (dBm). More... | |
Ptr< ErrorRateModel > | GetErrorRateModel (void) const |
Return the error rate model this PHY is using. More... | |
virtual uint32_t | GetFrequency (void) const |
virtual bool | GetGreenfield (void) const |
Return whether Greenfield is supported. More... | |
virtual bool | GetGuardInterval (void) const |
Return whether guard interval is being used. More... | |
virtual Time | GetLastRxStartTime (void) const |
Return the start time of the last received packet. More... | |
virtual bool | GetLdpc (void) const |
Return if LDPC is supported. More... | |
virtual uint8_t | GetMcs (uint8_t mcs) const |
The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception MCS indexes that this WifiPhy(-derived class) can support - a set of Mcs indexes which we call the DeviceMcsSet, and which is stored as WifiPhy::m_deviceMcsSet. More... | |
virtual WifiModeList | GetMembershipSelectorModes (uint32_t selector) |
The WifiPhy::GetMembershipSelectorModes() 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 BssMemebershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet. More... | |
Ptr< Object > | GetMobility (void) |
Return the mobility model this PHY is associated with. More... | |
virtual WifiMode | GetMode (uint32_t mode) const |
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are 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 DeviceRateSet, and which is stored as WifiPhy::m_deviceRateSet. More... | |
virtual uint32_t | GetNBssMembershipSelectors (void) const |
The WifiPhy::NBssMembershipSelectors() 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 BssMemebershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet. More... | |
virtual uint8_t | GetNMcs (void) const |
virtual uint32_t | GetNModes (void) const |
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are 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 DeviceRateSet, and which is stored as WifiPhy::m_deviceRateSet. More... | |
virtual uint32_t | GetNTxPower (void) const |
Return the number of available transmission power levels. More... | |
virtual uint32_t | GetNumberOfReceiveAntennas (void) const |
virtual uint32_t | GetNumberOfTransmitAntennas (void) const |
double | GetRxGain (void) const |
Return the reception gain (dB). More... | |
double | GetRxNoiseFigure (void) const |
Return the RX noise figure (dBm). More... | |
virtual Time | GetStateDuration (void) |
virtual bool | GetStbc (void) const |
Return whether STBC is supported. More... | |
double | GetTxGain (void) const |
Return the transmission gain (dB). More... | |
virtual double | GetTxPowerEnd (void) const |
Return the maximum available transmission power level (dBm). More... | |
virtual double | GetTxPowerStart (void) const |
Return the minimum available transmission power level (dBm). More... | |
virtual bool | IsStateBusy (void) |
virtual bool | IsStateCcaBusy (void) |
virtual bool | IsStateIdle (void) |
virtual bool | IsStateRx (void) |
virtual bool | IsStateSwitching (void) |
virtual bool | IsStateTx (void) |
virtual WifiMode | McsToWifiMode (uint8_t mcs) |
For a given MCS finds the corresponding WifiMode and returns it as defined in the IEEE 802.11n standard. More... | |
virtual void | RegisterListener (WifiPhyListener *listener) |
virtual void | SendPacket (Ptr< const Packet > packet, WifiMode mode, enum WifiPreamble preamble, WifiTxVector txvector) |
void | SetCcaMode1Threshold (double threshold) |
Sets the CCA threshold (dBm). More... | |
void | SetChannel (Ptr< YansWifiChannel > channel) |
Set the YansWifiChannel this YansWifiPhy is to be connected to. More... | |
virtual void | SetChannelBonding (bool channelbonding) |
Enable or disable channel bonding support. More... | |
void | SetChannelNumber (uint16_t id) |
Set the current channel number. More... | |
void | SetDevice (Ptr< Object > device) |
Sets the device this PHY is associated with. More... | |
void | SetEdThreshold (double threshold) |
Sets the energy detection threshold (dBm). More... | |
void | SetErrorRateModel (Ptr< ErrorRateModel > rate) |
Sets the error rate model. More... | |
virtual void | SetFrequency (uint32_t freq) |
virtual void | SetGreenfield (bool greenfield) |
Enable or disable Greenfield support. More... | |
virtual void | SetGuardInterval (bool guardInterval) |
Enable or disable short/long guard interval. More... | |
virtual void | SetLdpc (bool ldpc) |
Enable or disable LDPC. More... | |
void | SetMobility (Ptr< Object > mobility) |
Sets the mobility model. More... | |
void | SetNTxPower (uint32_t n) |
Sets the number of transmission power levels available between the minimum level and the maximum level. More... | |
virtual void | SetNumberOfReceiveAntennas (uint32_t rx) |
virtual void | SetNumberOfTransmitAntennas (uint32_t tx) |
virtual void | SetReceiveErrorCallback (WifiPhy::RxErrorCallback callback) |
virtual void | SetReceiveOkCallback (WifiPhy::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... | |
virtual void | SetStbc (bool stbc) |
Enable or disable STBC. 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 | StartReceivePacket (Ptr< Packet > packet, double rxPowerDbm, WifiTxVector txVector, WifiPreamble preamble) |
Starting receiving the packet (i.e. More... | |
virtual uint32_t | WifiModeToMcs (WifiMode mode) |
For a given WifiMode finds the corresponding MCS value and returns it as defined in the IEEE 802.11n standard. More... | |
Public Member Functions inherited from ns3::WifiPhy | |
WifiPhy () | |
virtual | ~WifiPhy () |
void | NotifyMonitorSniffRx (Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm) |
Public method used to fire a MonitorSniffer trace for a wifi packet being received. More... | |
void | NotifyMonitorSniffTx (Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, uint8_t txPower) |
Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted. More... | |
void | NotifyRxBegin (Ptr< const Packet > packet) |
Public method used to fire a PhyRxBegin trace. More... | |
void | NotifyRxDrop (Ptr< const Packet > packet) |
Public method used to fire a PhyRxDrop trace. More... | |
void | NotifyRxEnd (Ptr< const Packet > packet) |
Public method used to fire a PhyRxEnd trace. More... | |
void | NotifyTxBegin (Ptr< const Packet > packet) |
Public method used to fire a PhyTxBegin trace. More... | |
void | NotifyTxDrop (Ptr< const Packet > packet) |
Public method used to fire a PhyTxDrop trace. More... | |
void | NotifyTxEnd (Ptr< const Packet > packet) |
Public method used to fire a PhyTxEnd trace. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
virtual | ~Object () |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
Run the DoDispose methods of this object and all the objects aggregated to it. More... | |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Initialize (void) |
This method calls the virtual DoInitialize method on all the objects aggregated to this object. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment. 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 |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::WifiPhy | |
static Time | CalculateTxDuration (uint32_t size, WifiTxVector txvector, enum WifiPreamble preamble) |
static WifiMode | GetDsssRate11Mbps () |
Return a WifiMode for DSSS at 11Mbps. More... | |
static WifiMode | GetDsssRate1Mbps () |
Return a WifiMode for DSSS at 1Mbps. More... | |
static WifiMode | GetDsssRate2Mbps () |
Return a WifiMode for DSSS at 2Mbps. More... | |
static WifiMode | GetDsssRate5_5Mbps () |
Return a WifiMode for DSSS at 5.5Mbps. More... | |
static WifiMode | GetErpOfdmRate12Mbps () |
Return a WifiMode for ERP-ODFM at 12Mbps. More... | |
static WifiMode | GetErpOfdmRate18Mbps () |
Return a WifiMode for ERP-ODFM at 18Mbps. More... | |
static WifiMode | GetErpOfdmRate24Mbps () |
Return a WifiMode for ERP-ODFM at 24Mbps. More... | |
static WifiMode | GetErpOfdmRate36Mbps () |
Return a WifiMode for ERP-ODFM at 36Mbps. More... | |
static WifiMode | GetErpOfdmRate48Mbps () |
Return a WifiMode for ERP-ODFM at 48Mbps. More... | |
static WifiMode | GetErpOfdmRate54Mbps () |
Return a WifiMode for ERP-ODFM at 54Mbps. More... | |
static WifiMode | GetErpOfdmRate6Mbps () |
Return a WifiMode for ERP-ODFM at 6Mbps. More... | |
static WifiMode | GetErpOfdmRate9Mbps () |
Return a WifiMode for ERP-ODFM at 9Mbps. More... | |
static WifiMode | GetMFPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble) |
static WifiMode | GetOfdmRate108MbpsBW40MHz () |
Return a WifiMode for ODFM at 108Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate120MbpsBW40MHz () |
Return a WifiMode for ODFM at 120Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate121_5MbpsBW40MHz () |
Return a WifiMode for ODFM at 121.5Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate12Mbps () |
Return a WifiMode for ODFM at 12Mbps. More... | |
static WifiMode | GetOfdmRate12MbpsBW10MHz () |
Return a WifiMode for ODFM at 12Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate12MbpsBW5MHz () |
Return a WifiMode for ODFM at 12Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate135MbpsBW40MHz () |
Return a WifiMode for ODFM at 135Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate135MbpsBW40MHzShGi () |
Return a WifiMode for ODFM at 135Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate13_5MbpsBW40MHz () |
Return a WifiMode for ODFM at 13.5Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate13_5MbpsBW5MHz () |
Return a WifiMode for ODFM at 13.5Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate13MbpsBW20MHz () |
Return a WifiMode for ODFM at 13Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate14_4MbpsBW20MHz () |
Return a WifiMode for ODFM at 14.4Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate150MbpsBW40MHz () |
Return a WifiMode for ODFM at 150Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate15MbpsBW40MHz () |
Return a WifiMode for ODFM at 15Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate18Mbps () |
Return a WifiMode for ODFM at 18Mbps. More... | |
static WifiMode | GetOfdmRate18MbpsBW10MHz () |
Return a WifiMode for ODFM at 18Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate19_5MbpsBW20MHz () |
Return a WifiMode for ODFM at 19.5Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate1_5MbpsBW5MHz () |
Return a WifiMode for ODFM at 1.5Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate21_7MbpsBW20MHz () |
Return a WifiMode for ODFM at 21.7Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate24Mbps () |
Return a WifiMode for ODFM at 24Mbps. More... | |
static WifiMode | GetOfdmRate24MbpsBW10MHz () |
Return a WifiMode for ODFM at 24Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate26MbpsBW20MHz () |
Return a WifiMode for ODFM at 26Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate27MbpsBW10MHz () |
Return a WifiMode for ODFM at 27Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate27MbpsBW40MHz () |
Return a WifiMode for ODFM at 27Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate28_9MbpsBW20MHz () |
Return a WifiMode for ODFM at 28.9Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate2_25MbpsBW5MHz () |
Return a WifiMode for ODFM at 2.25Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate30MbpsBW40MHz () |
Return a WifiMode for ODFM at 30Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate36Mbps () |
Return a WifiMode for ODFM at 36Mbps. More... | |
static WifiMode | GetOfdmRate39MbpsBW20MHz () |
Return a WifiMode for ODFM at 39Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate3MbpsBW10MHz () |
Return a WifiMode for ODFM at 3Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate3MbpsBW5MHz () |
Return a WifiMode for ODFM at 3Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate40_5MbpsBW40MHz () |
Return a WifiMode for ODFM at 40.5Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate43_3MbpsBW20MHz () |
Return a WifiMode for ODFM at 43.3Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate45MbpsBW40MHz () |
Return a WifiMode for ODFM at 45Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate48Mbps () |
Return a WifiMode for ODFM at 48Mbps. More... | |
static WifiMode | GetOfdmRate4_5MbpsBW10MHz () |
Return a WifiMode for ODFM at 4.5Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate4_5MbpsBW5MHz () |
Return a WifiMode for ODFM at 4.5Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate52MbpsBW20MHz () |
Return a WifiMode for ODFM at 52Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate54Mbps () |
Return a WifiMode for ODFM at 54Mbps. More... | |
static WifiMode | GetOfdmRate54MbpsBW40MHz () |
Return a WifiMode for ODFM at 54Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate57_8MbpsBW20MHz () |
Return a WifiMode for ODFM at 57.8Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate58_5MbpsBW20MHz () |
Return a WifiMode for ODFM at 58.5Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate60MbpsBW40MHz () |
Return a WifiMode for ODFM at 60Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate65MbpsBW20MHz () |
Return a WifiMode for ODFM at 65Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate65MbpsBW20MHzShGi () |
Return a WifiMode for ODFM at 65Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate6_5MbpsBW20MHz () |
Return a WifiMode for ODFM at 6.5Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate6Mbps () |
Return a WifiMode for ODFM at 6Mbps. More... | |
static WifiMode | GetOfdmRate6MbpsBW10MHz () |
Return a WifiMode for ODFM at 6Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate6MbpsBW5MHz () |
Return a WifiMode for ODFM at 6Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate72_2MbpsBW20MHz () |
Return a WifiMode for ODFM at 72.2Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate7_2MbpsBW20MHz () |
Return a WifiMode for ODFM at 7.2Mbps with 20MHz channel spacing. More... | |
static WifiMode | GetOfdmRate81MbpsBW40MHz () |
Return a WifiMode for ODFM at 81Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate90MbpsBW40MHz () |
Return a WifiMode for ODFM at 90Mbps with 40MHz channel spacing. More... | |
static WifiMode | GetOfdmRate9Mbps () |
Return a WifiMode for ODFM at 9Mbps. More... | |
static WifiMode | GetOfdmRate9MbpsBW10MHz () |
Return a WifiMode for ODFM at 9Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate9MbpsBW5MHz () |
Return a WifiMode for ODFM at 9Mbps with 5MHz channel spacing. More... | |
static double | GetPayloadDurationMicroSeconds (uint32_t size, WifiTxVector txvector) |
static uint32_t | GetPlcpHeaderDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble) |
static WifiMode | GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble) |
static uint32_t | GetPlcpHtSigHeaderDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble) |
static uint32_t | GetPlcpHtTrainingSymbolDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble, WifiTxVector txvector) |
static uint32_t | GetPlcpPreambleDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble) |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
static void | Cleanup (void) |
Noop. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
void | Configure80211_10Mhz (void) |
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10MHz channel spacing. More... | |
void | Configure80211_5Mhz () |
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5MHz channel spacing. More... | |
void | Configure80211a (void) |
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard. More... | |
void | Configure80211b (void) |
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11b standard. More... | |
void | Configure80211g (void) |
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11g standard. More... | |
void | Configure80211n (void) |
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11n standard. More... | |
void | ConfigureHolland (void) |
double | DbmToW (double dbm) const |
Convert from dBm to Watts. More... | |
double | DbToRatio (double db) const |
Convert from dB to ratio. More... | |
virtual void | DoDispose (void) |
This method is called by Object::Dispose or by the object's destructor, whichever comes first. More... | |
void | EndReceive (Ptr< Packet > packet, Ptr< InterferenceHelper::Event > event) |
The last bit of the packet has arrived. More... | |
double | GetEdThresholdW (void) const |
Return the energy detection threshold. More... | |
double | GetPowerDbm (uint8_t power) const |
Get the power of the given power level in dBm. More... | |
double | RatioToDb (double ratio) const |
Convert from ratio to dB. More... | |
double | WToDbm (double w) const |
Convert from Watts to dBm. More... | |
Private Attributes | |
std::vector< uint32_t > | m_bssMembershipSelectorSet |
double | m_ccaMode1ThresholdW |
Clear channel assessment (CCA) threshold in watts. More... | |
Ptr< YansWifiChannel > | m_channel |
YansWifiChannel that this YansWifiPhy is connected to. More... | |
bool | m_channelBonding |
Flag if channel conding is used. More... | |
uint16_t | m_channelNumber |
Operating channel number. More... | |
double | m_channelStartingFrequency |
Standard-dependent center frequency of 0-th channel in MHz. More... | |
Time | m_channelSwitchDelay |
Time required to switch between channel. More... | |
Ptr< Object > | m_device |
Pointer to the device. More... | |
std::vector< uint8_t > | m_deviceMcsSet |
WifiModeList | m_deviceRateSet |
This vector holds the set of transmission modes that this WifiPhy(-derived class) can support. More... | |
double | m_edThresholdW |
Energy detection threshold in watts. More... | |
EventId | m_endRxEvent |
bool | m_greenfield |
Flag if GreenField format is supported. More... | |
bool | m_guardInterval |
Flag if short guard interval is used. More... | |
InterferenceHelper | m_interference |
Pointer to InterferenceHelper. More... | |
bool | m_ldpc |
Flag if LDPC is used. More... | |
Ptr< Object > | m_mobility |
Pointer to the mobility model. More... | |
uint32_t | m_nTxPower |
Number of available transmission power levels. More... | |
uint32_t | m_numberOfReceivers |
Number of receivers. More... | |
uint32_t | m_numberOfTransmitters |
Number of transmitters. More... | |
Ptr< UniformRandomVariable > | m_random |
Provides uniform random variables. More... | |
double | m_rxGainDb |
Reception gain (dB) More... | |
Ptr< WifiPhyStateHelper > | m_state |
Pointer to WifiPhyStateHelper. More... | |
bool | m_stbc |
Flag if STBC is used. More... | |
double | m_txGainDb |
Transmission gain (dB) More... | |
double | m_txPowerBaseDbm |
Minimum transmission power (dBm) More... | |
double | m_txPowerEndDbm |
Maximum transmission power (dBm) More... | |
Additional Inherited Members | |
Public Types inherited from ns3::WifiPhy | |
typedef Callback< void, Ptr < const Packet >, double > | RxErrorCallback |
arg1: packet received unsuccessfully arg2: snr of packet More... | |
typedef Callback< void, Ptr < Packet >, double, WifiMode, enum WifiPreamble > | RxOkCallback |
arg1: packet received successfully arg2: snr of packet arg3: mode of packet arg4: type of preamble used for packet. More... | |
enum | State { IDLE, CCA_BUSY, TX, RX, SWITCHING } |
The state of the PHY layer. More... | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
virtual void | DoInitialize (void) |
This method is called only once by Object::Initialize. More... | |
virtual void | NotifyNewAggregate (void) |
This method is invoked whenever two sets of objects are aggregated together. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
This method is invoked once all member attributes have been initialized. More... | |
802.11 PHY layer model
This PHY implements a model of 802.11a.
The model implemented here is based on the model described in "Yet Another Network Simulator", (http://cutebugs.net/files/wns2-yans.pdf).
This PHY model depends on a channel loss and delay model as provided by the ns3::PropagationLossModel and ns3::PropagationDelayModel classes, both of which are members of the ns3::YansWifiChannel class.
ns3::YansWifiPhy is accessible through the following paths with Config::Set and Config::Connect:
No TraceSources are defined for this type.
Definition at line 64 of file yans-wifi-phy.h.
ns3::YansWifiPhy::YansWifiPhy | ( | ) |
Definition at line 171 of file yans-wifi-phy.cc.
References m_random, m_state, and NS_LOG_FUNCTION.
|
virtual |
Definition at line 181 of file yans-wifi-phy.cc.
References NS_LOG_FUNCTION.
|
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 |
Implements ns3::WifiPhy.
Definition at line 819 of file yans-wifi-phy.cc.
References m_random, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().
|
virtual |
txMode | the transmission mode |
ber | the probability of bit error rate |
Implements ns3::WifiPhy.
Definition at line 357 of file yans-wifi-phy.cc.
References ns3::InterferenceHelper::GetErrorRateModel(), and m_interference.
|
private |
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10MHz channel spacing.
Definition at line 639 of file yans-wifi-phy.cc.
References ns3::WifiPhy::GetOfdmRate12MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate18MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate24MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate27MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate3MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate4_5MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate6MbpsBW10MHz(), ns3::WifiPhy::GetOfdmRate9MbpsBW10MHz(), m_channelStartingFrequency, m_deviceRateSet, and NS_LOG_FUNCTION.
Referenced by ConfigureStandard().
|
private |
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5MHz channel spacing.
Definition at line 655 of file yans-wifi-phy.cc.
References ns3::WifiPhy::GetOfdmRate12MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate13_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate1_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate2_25MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate3MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate4_5MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate6MbpsBW5MHz(), ns3::WifiPhy::GetOfdmRate9MbpsBW5MHz(), m_channelStartingFrequency, m_deviceRateSet, and NS_LOG_FUNCTION.
Referenced by ConfigureStandard().
|
private |
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard.
Definition at line 590 of file yans-wifi-phy.cc.
References ns3::WifiPhy::GetOfdmRate12Mbps(), ns3::WifiPhy::GetOfdmRate18Mbps(), ns3::WifiPhy::GetOfdmRate24Mbps(), ns3::WifiPhy::GetOfdmRate36Mbps(), ns3::WifiPhy::GetOfdmRate48Mbps(), ns3::WifiPhy::GetOfdmRate54Mbps(), ns3::WifiPhy::GetOfdmRate6Mbps(), ns3::WifiPhy::GetOfdmRate9Mbps(), m_channelStartingFrequency, m_deviceRateSet, and NS_LOG_FUNCTION.
Referenced by ConfigureStandard().
|
private |
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11b standard.
Definition at line 607 of file yans-wifi-phy.cc.
References ns3::WifiPhy::GetDsssRate11Mbps(), ns3::WifiPhy::GetDsssRate1Mbps(), ns3::WifiPhy::GetDsssRate2Mbps(), ns3::WifiPhy::GetDsssRate5_5Mbps(), m_channelStartingFrequency, m_deviceRateSet, and NS_LOG_FUNCTION.
Referenced by ConfigureStandard().
|
private |
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11g standard.
Definition at line 619 of file yans-wifi-phy.cc.
References ns3::WifiPhy::GetDsssRate11Mbps(), ns3::WifiPhy::GetDsssRate1Mbps(), ns3::WifiPhy::GetDsssRate2Mbps(), ns3::WifiPhy::GetDsssRate5_5Mbps(), ns3::WifiPhy::GetErpOfdmRate12Mbps(), ns3::WifiPhy::GetErpOfdmRate18Mbps(), ns3::WifiPhy::GetErpOfdmRate24Mbps(), ns3::WifiPhy::GetErpOfdmRate36Mbps(), ns3::WifiPhy::GetErpOfdmRate48Mbps(), ns3::WifiPhy::GetErpOfdmRate54Mbps(), ns3::WifiPhy::GetErpOfdmRate6Mbps(), ns3::WifiPhy::GetErpOfdmRate9Mbps(), m_channelStartingFrequency, m_deviceRateSet, and NS_LOG_FUNCTION.
Referenced by ConfigureStandard().
|
private |
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11n standard.
Definition at line 918 of file yans-wifi-phy.cc.
References ns3::WifiPhy::GetDsssRate11Mbps(), ns3::WifiPhy::GetDsssRate1Mbps(), ns3::WifiPhy::GetDsssRate2Mbps(), ns3::WifiPhy::GetDsssRate5_5Mbps(), ns3::WifiPhy::GetErpOfdmRate12Mbps(), ns3::WifiPhy::GetErpOfdmRate24Mbps(), ns3::WifiPhy::GetErpOfdmRate6Mbps(), HT_PHY, m_bssMembershipSelectorSet, m_deviceMcsSet, m_deviceRateSet, and NS_LOG_FUNCTION.
Referenced by ConfigureStandard().
|
private |
Definition at line 671 of file yans-wifi-phy.cc.
References ns3::WifiPhy::GetOfdmRate12Mbps(), ns3::WifiPhy::GetOfdmRate18Mbps(), ns3::WifiPhy::GetOfdmRate36Mbps(), ns3::WifiPhy::GetOfdmRate54Mbps(), ns3::WifiPhy::GetOfdmRate6Mbps(), m_channelStartingFrequency, m_deviceRateSet, and NS_LOG_FUNCTION.
Referenced by ConfigureStandard().
|
virtual |
Configure the PHY-level parameters for different Wi-Fi standard.
standard | the Wi-Fi standard |
Implements ns3::WifiPhy.
Definition at line 199 of file yans-wifi-phy.cc.
References Configure80211_10Mhz(), Configure80211_5Mhz(), Configure80211a(), Configure80211b(), Configure80211g(), Configure80211n(), ConfigureHolland(), m_channelStartingFrequency, NS_ASSERT, NS_LOG_FUNCTION, ns3::WIFI_PHY_STANDARD_80211_10MHZ, ns3::WIFI_PHY_STANDARD_80211_5MHZ, ns3::WIFI_PHY_STANDARD_80211a, ns3::WIFI_PHY_STANDARD_80211b, ns3::WIFI_PHY_STANDARD_80211g, ns3::WIFI_PHY_STANDARD_80211n_2_4GHZ, ns3::WIFI_PHY_STANDARD_80211n_5GHZ, and ns3::WIFI_PHY_STANDARD_holland.
|
private |
Convert from dBm to Watts.
dbm | the power in dBm |
Definition at line 745 of file yans-wifi-phy.cc.
Referenced by SetCcaMode1Threshold(), SetEdThreshold(), and StartReceivePacket().
|
private |
Convert from dB to ratio.
db |
Definition at line 738 of file yans-wifi-phy.cc.
Referenced by SetRxNoiseFigure().
|
privatevirtual |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden 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.
Definition at line 187 of file yans-wifi-phy.cc.
References m_channel, m_device, m_deviceMcsSet, m_deviceRateSet, m_mobility, m_state, and NS_LOG_FUNCTION.
|
private |
The last bit of the packet has arrived.
packet | the packet that the last bit has arrived |
event | the corresponding event of the first time the packet arrives |
Definition at line 788 of file yans-wifi-phy.cc.
References ns3::InterferenceHelper::CalculateSnrPer(), GetChannelFrequencyMhz(), GetChannelNumber(), GetRxNoiseFigure(), ns3::Packet::GetSize(), ns3::UniformRandomVariable::GetValue(), IsStateRx(), m_interference, m_random, m_state, ns3::WifiPhy::NotifyMonitorSniffRx(), ns3::WifiPhy::NotifyRxDrop(), ns3::InterferenceHelper::NotifyRxEnd(), ns3::WifiPhy::NotifyRxEnd(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, RatioToDb(), and ns3::WIFI_PREAMBLE_SHORT.
Referenced by StartReceivePacket().
|
virtual |
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 BssMemebershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet.
This was introduced with 11n
selector | index in array of supported memeberships |
Implements ns3::WifiPhy.
Definition at line 941 of file yans-wifi-phy.cc.
References m_bssMembershipSelectorSet.
Referenced by GetMembershipSelectorModes().
double ns3::YansWifiPhy::GetCcaMode1Threshold | ( | void | ) | const |
Return the CCA threshold (dBm).
Definition at line 335 of file yans-wifi-phy.cc.
References m_ccaMode1ThresholdW, and WToDbm().
Referenced by GetTypeId().
|
virtual |
Return the WifiChannel this WifiPhy is connected to.
Implements ns3::WifiPhy.
Definition at line 363 of file yans-wifi-phy.cc.
References m_channel.
|
virtual |
Return whether channel bonding is supported.
Implements ns3::WifiPhy.
Definition at line 906 of file yans-wifi-phy.cc.
References m_channelBonding.
Referenced by GetTypeId(), and McsToWifiMode().
double ns3::YansWifiPhy::GetChannelFrequencyMhz | ( | ) | const |
Return current center channel frequency in MHz.
Definition at line 430 of file yans-wifi-phy.cc.
References GetChannelNumber(), and m_channelStartingFrequency.
Referenced by EndReceive(), and SendPacket().
|
virtual |
Return the current channel number.
Implements ns3::WifiPhy.
Definition at line 424 of file yans-wifi-phy.cc.
References m_channelNumber.
Referenced by EndReceive(), GetChannelFrequencyMhz(), ns3::MeshWifiInterfaceMac::GetFrequencyChannel(), GetTypeId(), ns3::YansWifiChannel::Send(), and SendPacket().
|
virtual |
The PHY will never become WifiPhy::IDLE before the delay returned by this method but it could become really idle later.
Implements ns3::WifiPhy.
Definition at line 726 of file yans-wifi-phy.cc.
References m_state.
Referenced by SetChannelNumber().
Return the device this PHY is associated with.
Definition at line 346 of file yans-wifi-phy.cc.
References m_device.
double ns3::YansWifiPhy::GetEdThreshold | ( | void | ) | const |
Return the energy detection threshold (dBm).
Definition at line 329 of file yans-wifi-phy.cc.
References m_edThresholdW, and WToDbm().
Referenced by GetTypeId().
|
private |
Return the energy detection threshold.
Definition at line 764 of file yans-wifi-phy.cc.
References m_edThresholdW.
Ptr< ErrorRateModel > ns3::YansWifiPhy::GetErrorRateModel | ( | void | ) | const |
Return the error rate model this PHY is using.
Definition at line 341 of file yans-wifi-phy.cc.
References ns3::InterferenceHelper::GetErrorRateModel(), and m_interference.
|
virtual |
Implements ns3::WifiPhy.
Definition at line 872 of file yans-wifi-phy.cc.
References m_channelStartingFrequency.
Referenced by GetTypeId().
|
virtual |
Return whether Greenfield is supported.
Implements ns3::WifiPhy.
Definition at line 900 of file yans-wifi-phy.cc.
References m_greenfield.
Referenced by GetTypeId().
|
virtual |
Return whether guard interval is being used.
Implements ns3::WifiPhy.
Definition at line 861 of file yans-wifi-phy.cc.
References m_guardInterval.
Referenced by GetTypeId(), and McsToWifiMode().
|
virtual |
Return the start time of the last received packet.
Implements ns3::WifiPhy.
Definition at line 732 of file yans-wifi-phy.cc.
References m_state.
|
virtual |
Return if LDPC is supported.
Implements ns3::WifiPhy.
Definition at line 889 of file yans-wifi-phy.cc.
References m_ldpc.
Referenced by GetTypeId().
|
virtual |
The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception MCS indexes that this WifiPhy(-derived class) can support - a set of Mcs indexes which we call the DeviceMcsSet, and which is stored as WifiPhy::m_deviceMcsSet.
This was introduced with 11n
mcs | index in array of supported Mcs |
Implements ns3::WifiPhy.
Definition at line 970 of file yans-wifi-phy.cc.
References m_deviceMcsSet.
|
virtual |
The WifiPhy::GetMembershipSelectorModes() 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 BssMemebershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet.
This was introduced with 11n
selector | index in array of supported memeberships |
Implements ns3::WifiPhy.
Definition at line 946 of file yans-wifi-phy.cc.
References GetBssMembershipSelector(), ns3::WifiPhy::GetOfdmRate13MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate19_5MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate26MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate39MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate52MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate58_5MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate65MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate6_5MbpsBW20MHz(), and HT_PHY.
Return the mobility model this PHY is associated with.
Definition at line 351 of file yans-wifi-phy.cc.
References m_mobility.
Referenced by ns3::YansWifiChannel::Send().
|
virtual |
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are 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 DeviceRateSet, and which is stored as WifiPhy::m_deviceRateSet.
It is important to note that the DeviceRateSet 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.
mode | index in array of supported modes |
Implements ns3::WifiPhy.
Definition at line 579 of file yans-wifi-phy.cc.
References m_deviceRateSet.
|
virtual |
The WifiPhy::NBssMembershipSelectors() 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 BssMemebershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet.
This was introduced with 11n
Implements ns3::WifiPhy.
Definition at line 936 of file yans-wifi-phy.cc.
References m_bssMembershipSelectorSet.
|
virtual |
Implements ns3::WifiPhy.
Definition at line 965 of file yans-wifi-phy.cc.
References m_deviceMcsSet.
|
virtual |
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are 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 DeviceRateSet, and which is stored as WifiPhy::m_deviceRateSet.
It is important to note that the DeviceRateSet 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.
Implements ns3::WifiPhy.
Definition at line 574 of file yans-wifi-phy.cc.
References m_deviceRateSet.
|
virtual |
Return the number of available transmission power levels.
Implements ns3::WifiPhy.
Definition at line 584 of file yans-wifi-phy.cc.
References m_nTxPower.
|
virtual |
Implements ns3::WifiPhy.
Definition at line 883 of file yans-wifi-phy.cc.
References m_numberOfReceivers.
Referenced by GetTypeId().
|
virtual |
Implements ns3::WifiPhy.
Definition at line 878 of file yans-wifi-phy.cc.
References m_numberOfTransmitters.
Referenced by GetTypeId().
|
private |
Get the power of the given power level in dBm.
In YansWifiPhy implementation, the power levels are equally spaced (in dBm).
power | the power level |
Definition at line 770 of file yans-wifi-phy.cc.
References m_nTxPower, m_txPowerBaseDbm, m_txPowerEndDbm, NS_ASSERT, and NS_ASSERT_MSG.
Referenced by SendPacket().
double ns3::YansWifiPhy::GetRxGain | ( | void | ) | const |
Return the reception gain (dB).
Definition at line 323 of file yans-wifi-phy.cc.
References m_rxGainDb.
Referenced by GetTypeId().
double ns3::YansWifiPhy::GetRxNoiseFigure | ( | void | ) | const |
Return the RX noise figure (dBm).
Definition at line 303 of file yans-wifi-phy.cc.
References ns3::InterferenceHelper::GetNoiseFigure(), m_interference, and RatioToDb().
Referenced by EndReceive(), and GetTypeId().
|
virtual |
Implements ns3::WifiPhy.
Definition at line 721 of file yans-wifi-phy.cc.
References m_state.
|
virtual |
Return whether STBC is supported.
Implements ns3::WifiPhy.
Definition at line 894 of file yans-wifi-phy.cc.
References m_stbc.
Referenced by GetTypeId().
double ns3::YansWifiPhy::GetTxGain | ( | void | ) | const |
Return the transmission gain (dB).
Definition at line 318 of file yans-wifi-phy.cc.
References m_txGainDb.
Referenced by GetTypeId().
|
virtual |
Return the maximum available transmission power level (dBm).
Implements ns3::WifiPhy.
Definition at line 313 of file yans-wifi-phy.cc.
References m_txPowerEndDbm.
Referenced by GetTypeId().
|
virtual |
Return the minimum available transmission power level (dBm).
Implements ns3::WifiPhy.
Definition at line 308 of file yans-wifi-phy.cc.
References m_txPowerBaseDbm.
Referenced by GetTypeId().
|
static |
Definition at line 49 of file yans-wifi-phy.cc.
References GetCcaMode1Threshold(), GetChannelBonding(), GetChannelNumber(), GetEdThreshold(), GetFrequency(), GetGreenfield(), GetGuardInterval(), GetLdpc(), GetNumberOfReceiveAntennas(), GetNumberOfTransmitAntennas(), GetRxGain(), GetRxNoiseFigure(), GetStbc(), GetTxGain(), GetTxPowerEnd(), GetTxPowerStart(), m_channelSwitchDelay, m_nTxPower, m_state, ns3::MakeTimeChecker(), SetCcaMode1Threshold(), SetChannelBonding(), SetChannelNumber(), SetEdThreshold(), SetFrequency(), SetGreenfield(), SetGuardInterval(), SetLdpc(), SetNumberOfReceiveAntennas(), SetNumberOfTransmitAntennas(), ns3::TypeId::SetParent(), SetRxGain(), SetRxNoiseFigure(), SetStbc(), SetTxGain(), SetTxPowerEnd(), and SetTxPowerStart().
|
virtual |
Implements ns3::WifiPhy.
Definition at line 700 of file yans-wifi-phy.cc.
References m_state.
|
virtual |
Implements ns3::WifiPhy.
Definition at line 689 of file yans-wifi-phy.cc.
References m_state.
|
virtual |
Implements ns3::WifiPhy.
Definition at line 695 of file yans-wifi-phy.cc.
References m_state.
|
virtual |
Implements ns3::WifiPhy.
Definition at line 705 of file yans-wifi-phy.cc.
References m_state.
Referenced by EndReceive().
|
virtual |
Implements ns3::WifiPhy.
Definition at line 715 of file yans-wifi-phy.cc.
References m_state.
Referenced by SetChannelNumber().
|
virtual |
Implements ns3::WifiPhy.
Definition at line 710 of file yans-wifi-phy.cc.
References m_state.
|
virtual |
For a given MCS finds the corresponding WifiMode and returns it as defined in the IEEE 802.11n standard.
mcs | the MCS number |
Implements ns3::WifiPhy.
Definition at line 1037 of file yans-wifi-phy.cc.
References GetChannelBonding(), GetGuardInterval(), ns3::WifiPhy::GetOfdmRate108MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate120MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate121_5MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate135MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate135MbpsBW40MHzShGi(), ns3::WifiPhy::GetOfdmRate13_5MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate13MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate14_4MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate150MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate15MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate19_5MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate21_7MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate26MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate27MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate28_9MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate30MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate39MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate40_5MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate43_3MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate45MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate52MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate54MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate57_8MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate58_5MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate60MbpsBW40MHz(), ns3::WifiPhy::GetOfdmRate65MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate65MbpsBW20MHzShGi(), ns3::WifiPhy::GetOfdmRate6_5MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate72_2MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate7_2MbpsBW20MHz(), ns3::WifiPhy::GetOfdmRate81MbpsBW40MHz(), and ns3::WifiPhy::GetOfdmRate90MbpsBW40MHz().
|
private |
Convert from ratio to dB.
ratio |
Definition at line 758 of file yans-wifi-phy.cc.
Referenced by EndReceive(), and GetRxNoiseFigure().
|
virtual |
listener | the new listener |
Add the input listener to the list of objects to be notified of PHY-level events.
Implements ns3::WifiPhy.
Definition at line 683 of file yans-wifi-phy.cc.
References m_state.
|
virtual |
packet | the packet to send |
mode | the transmission mode to use to send this packet |
preamble | the type of preamble to use to send this packet. |
txvector | the txvector that has tx parameters as txPowerLevel a power level to use to send this packet. The real transmission power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels |
Implements ns3::WifiPhy.
Definition at line 548 of file yans-wifi-phy.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::EventId::Cancel(), GetChannelFrequencyMhz(), GetChannelNumber(), ns3::WifiMode::GetDataRate(), ns3::WifiTxVector::GetMode(), ns3::WifiTxVector::GetNss(), GetPowerDbm(), ns3::Packet::GetSize(), ns3::WifiTxVector::GetTxPowerLevel(), m_channel, m_endRxEvent, m_interference, m_state, m_txGainDb, ns3::WifiPhy::NotifyMonitorSniffTx(), ns3::InterferenceHelper::NotifyRxEnd(), ns3::WifiPhy::NotifyTxBegin(), NS_ASSERT, NS_LOG_FUNCTION, and ns3::WIFI_PREAMBLE_SHORT.
void ns3::YansWifiPhy::SetCcaMode1Threshold | ( | 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 281 of file yans-wifi-phy.cc.
References DbmToW(), m_ccaMode1ThresholdW, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::YansWifiPhy::SetChannel | ( | Ptr< YansWifiChannel > | channel | ) |
Set the YansWifiChannel this YansWifiPhy is to be connected to.
channel | the YansWifiChannel this YansWifiPhy is to be connected to |
Definition at line 368 of file yans-wifi-phy.cc.
References m_channel.
Referenced by ns3::YansWifiPhyHelper::Create().
|
virtual |
Enable or disable channel bonding support.
channelbonding | Enable or disable channel bonding |
Implements ns3::WifiPhy.
Definition at line 912 of file yans-wifi-phy.cc.
References m_channelBonding.
Referenced by GetTypeId().
|
virtual |
Set the current channel number.
id | the channel number |
Implements ns3::WifiPhy.
Definition at line 375 of file yans-wifi-phy.cc.
References ns3::EventId::Cancel(), ns3::WifiPhy::CCA_BUSY, ns3::InterferenceHelper::EraseEvents(), GetDelayUntilIdle(), ns3::WifiPhy::IDLE, IsStateSwitching(), m_channelNumber, m_channelSwitchDelay, m_endRxEvent, m_interference, m_state, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, ns3::WifiPhy::RX, ns3::Simulator::Schedule(), and ns3::WifiPhy::TX.
Referenced by GetTypeId(), and ns3::MeshWifiInterfaceMac::SwitchFrequencyChannel().
Sets the device this PHY is associated with.
device | the device this PHY is associated with |
Definition at line 292 of file yans-wifi-phy.cc.
References m_device.
Referenced by ns3::YansWifiPhyHelper::Create().
void ns3::YansWifiPhy::SetEdThreshold | ( | double | threshold | ) |
Sets the energy detection threshold (dBm).
The energy of a received signal should be higher than this threshold (dbm) to allow the PHY layer to detect the signal.
threshold | the energy detction threshold in dBm |
Definition at line 275 of file yans-wifi-phy.cc.
References DbmToW(), m_edThresholdW, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::YansWifiPhy::SetErrorRateModel | ( | Ptr< ErrorRateModel > | rate | ) |
Sets the error rate model.
rate | the error rate model |
Definition at line 287 of file yans-wifi-phy.cc.
References m_interference, and ns3::InterferenceHelper::SetErrorRateModel().
Referenced by ns3::YansWifiPhyHelper::Create().
|
virtual |
freq | the operating frequency on this node (2.4 GHz or 5GHz). |
Implements ns3::WifiPhy.
Definition at line 827 of file yans-wifi-phy.cc.
References m_channelStartingFrequency.
Referenced by GetTypeId().
|
virtual |
Enable or disable Greenfield support.
greenfield | Enable or disable Greenfield |
Implements ns3::WifiPhy.
Definition at line 856 of file yans-wifi-phy.cc.
References m_greenfield.
Referenced by GetTypeId().
|
virtual |
Enable or disable short/long guard interval.
guardInterval | Enable or disable guard interval |
Implements ns3::WifiPhy.
Definition at line 866 of file yans-wifi-phy.cc.
References m_guardInterval.
Referenced by GetTypeId().
|
virtual |
Enable or disable LDPC.
ldpc | Enable or disable LDPC |
Implements ns3::WifiPhy.
Definition at line 844 of file yans-wifi-phy.cc.
References m_ldpc.
Referenced by GetTypeId().
Sets the mobility model.
mobility | the mobility model this PHY is associated with |
Definition at line 297 of file yans-wifi-phy.cc.
References m_mobility.
Referenced by ns3::YansWifiPhyHelper::Create().
void ns3::YansWifiPhy::SetNTxPower | ( | uint32_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 257 of file yans-wifi-phy.cc.
References m_nTxPower, and NS_LOG_FUNCTION.
|
virtual |
rx | the number of receivers on this node. |
Implements ns3::WifiPhy.
Definition at line 838 of file yans-wifi-phy.cc.
References m_numberOfReceivers.
Referenced by GetTypeId().
|
virtual |
tx | the number of transmitters on this node. |
Implements ns3::WifiPhy.
Definition at line 833 of file yans-wifi-phy.cc.
References m_numberOfTransmitters.
Referenced by GetTypeId().
|
virtual |
callback | the callback to invoke upon erroneous packet reception. |
Implements ns3::WifiPhy.
Definition at line 441 of file yans-wifi-phy.cc.
References m_state.
|
virtual |
callback | the callback to invoke upon successful packet reception. |
Implements ns3::WifiPhy.
Definition at line 436 of file yans-wifi-phy.cc.
References m_state.
void ns3::YansWifiPhy::SetRxGain | ( | double | gain | ) |
Sets the reception gain (dB).
gain | the reception gain in dB |
Definition at line 269 of file yans-wifi-phy.cc.
References m_rxGainDb, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::YansWifiPhy::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 239 of file yans-wifi-phy.cc.
References DbToRatio(), m_interference, NS_LOG_FUNCTION, and ns3::InterferenceHelper::SetNoiseFigure().
Referenced by GetTypeId().
|
virtual |
Enable or disable STBC.
stbc | Enable or disable STBC |
Implements ns3::WifiPhy.
Definition at line 850 of file yans-wifi-phy.cc.
References m_stbc.
Referenced by GetTypeId().
void ns3::YansWifiPhy::SetTxGain | ( | double | gain | ) |
Sets the transmission gain (dB).
gain | the transmission gain in dB |
Definition at line 263 of file yans-wifi-phy.cc.
References m_txGainDb, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::YansWifiPhy::SetTxPowerEnd | ( | double | end | ) |
Sets the maximum available transmission power level (dBm).
end | the maximum transmission power level (dBm) |
Definition at line 251 of file yans-wifi-phy.cc.
References m_txPowerEndDbm, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::YansWifiPhy::SetTxPowerStart | ( | double | start | ) |
Sets the minimum available transmission power level (dBm).
start | the minimum transmission power level (dBm) |
Definition at line 245 of file yans-wifi-phy.cc.
References m_txPowerBaseDbm, NS_LOG_FUNCTION, and visualizer.core::start().
Referenced by GetTypeId().
void ns3::YansWifiPhy::StartReceivePacket | ( | Ptr< Packet > | packet, |
double | rxPowerDbm, | ||
WifiTxVector | txVector, | ||
WifiPreamble | preamble | ||
) |
Starting receiving the packet (i.e.
the first bit of the preamble has arrived).
packet | the arriving packet |
rxPowerDbm | the receive power in dBm |
txVector | the TXVECTOR of the arriving packet |
preamble | the preamble of the arriving packet |
Definition at line 446 of file yans-wifi-phy.cc.
References ns3::InterferenceHelper::Add(), ns3::WifiPhy::CalculateTxDuration(), ns3::WifiPhy::CCA_BUSY, DbmToW(), EndReceive(), ns3::InterferenceHelper::GetEnergyDuration(), ns3::WifiTxVector::GetMode(), ns3::Packet::GetSize(), ns3::WifiPhy::IDLE, ns3::EventId::IsExpired(), ns3::Time::IsZero(), m_ccaMode1ThresholdW, m_edThresholdW, m_endRxEvent, m_interference, m_rxGainDb, m_state, ns3::WifiPhy::NotifyRxBegin(), ns3::WifiPhy::NotifyRxDrop(), ns3::InterferenceHelper::NotifyRxStart(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WifiPhy::RX, ns3::Simulator::Schedule(), ns3::WifiPhy::SWITCHING, and ns3::WifiPhy::TX.
|
virtual |
For a given WifiMode finds the corresponding MCS value and returns it as defined in the IEEE 802.11n standard.
mode | the WifiMode |
Implements ns3::WifiPhy.
Definition at line 975 of file yans-wifi-phy.cc.
References ns3::WifiMode::GetDataRate(), and ns3::WifiMode::GetUniqueName().
|
private |
Convert from Watts to dBm.
w | the power in Watts |
Definition at line 752 of file yans-wifi-phy.cc.
Referenced by GetCcaMode1Threshold(), and GetEdThreshold().
|
private |
Definition at line 516 of file yans-wifi-phy.h.
Referenced by Configure80211n(), GetBssMembershipSelector(), and GetNBssMembershipSelectors().
|
private |
Clear channel assessment (CCA) threshold in watts.
Definition at line 457 of file yans-wifi-phy.h.
Referenced by GetCcaMode1Threshold(), SetCcaMode1Threshold(), and StartReceivePacket().
|
private |
YansWifiChannel that this YansWifiPhy is connected to.
Definition at line 464 of file yans-wifi-phy.h.
Referenced by DoDispose(), GetChannel(), SendPacket(), and SetChannel().
|
private |
Flag if channel conding is used.
Definition at line 475 of file yans-wifi-phy.h.
Referenced by GetChannelBonding(), and SetChannelBonding().
|
private |
Operating channel number.
Definition at line 465 of file yans-wifi-phy.h.
Referenced by GetChannelNumber(), and SetChannelNumber().
|
private |
Standard-dependent center frequency of 0-th channel in MHz.
Definition at line 521 of file yans-wifi-phy.h.
Referenced by Configure80211_10Mhz(), Configure80211_5Mhz(), Configure80211a(), Configure80211b(), Configure80211g(), ConfigureHolland(), ConfigureStandard(), GetChannelFrequencyMhz(), GetFrequency(), and SetFrequency().
|
private |
Time required to switch between channel.
Definition at line 524 of file yans-wifi-phy.h.
Referenced by GetTypeId(), and SetChannelNumber().
Pointer to the device.
Definition at line 466 of file yans-wifi-phy.h.
Referenced by DoDispose(), GetDevice(), and SetDevice().
|
private |
Definition at line 517 of file yans-wifi-phy.h.
Referenced by Configure80211n(), DoDispose(), GetMcs(), and GetNMcs().
|
private |
This vector holds the set of transmission modes that this WifiPhy(-derived class) can support.
In conversation we call this 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 this vector looking for WifiMode objects for which WifiMode::IsMandatory() is true.
A quick note is appropriate here (well, here is as good a place as any I can find)...
In the standard there is no text that explicitly precludes production of a device that does not support some rates that are mandatory (according to the standard) for PHYs that the device happens to fully or partially support.
This approach is taken by some devices which choose to only support, for example, 6 and 9 Mbps ERP-OFDM rates for cost and power consumption reasons (i.e., these devices don't need to be designed for and waste current on the increased linearity requirement of higher-order constellations when 6 and 9 Mbps more than meet their data requirements). The wording of the standard allows such devices to have an OperationalRateSet which includes 6 and 9 Mbps ERP-OFDM rates, despite 12 and 24 Mbps being "mandatory" rates for the ERP-OFDM PHY.
Now this doesn't actually have any impact on code, yet. It is, however, something that we need to keep in mind for the future. Basically, the key point is that we can't be making assumptions like "the Operational Rate Set will contain all the mandatory rates".
Definition at line 514 of file yans-wifi-phy.h.
Referenced by Configure80211_10Mhz(), Configure80211_5Mhz(), Configure80211a(), Configure80211b(), Configure80211g(), Configure80211n(), ConfigureHolland(), DoDispose(), GetMode(), and GetNModes().
|
private |
Energy detection threshold in watts.
Definition at line 456 of file yans-wifi-phy.h.
Referenced by GetEdThreshold(), GetEdThresholdW(), SetEdThreshold(), and StartReceivePacket().
|
private |
Definition at line 518 of file yans-wifi-phy.h.
Referenced by SendPacket(), SetChannelNumber(), and StartReceivePacket().
|
private |
Flag if GreenField format is supported.
Definition at line 473 of file yans-wifi-phy.h.
Referenced by GetGreenfield(), and SetGreenfield().
|
private |
Flag if short guard interval is used.
Definition at line 474 of file yans-wifi-phy.h.
Referenced by GetGuardInterval(), and SetGuardInterval().
|
private |
Pointer to InterferenceHelper.
Definition at line 523 of file yans-wifi-phy.h.
Referenced by CalculateSnr(), EndReceive(), GetErrorRateModel(), GetRxNoiseFigure(), SendPacket(), SetChannelNumber(), SetErrorRateModel(), SetRxNoiseFigure(), and StartReceivePacket().
|
private |
Flag if LDPC is used.
Definition at line 471 of file yans-wifi-phy.h.
Pointer to the mobility model.
Definition at line 467 of file yans-wifi-phy.h.
Referenced by DoDispose(), GetMobility(), and SetMobility().
|
private |
Number of available transmission power levels.
Definition at line 462 of file yans-wifi-phy.h.
Referenced by GetNTxPower(), GetPowerDbm(), GetTypeId(), and SetNTxPower().
|
private |
Number of receivers.
Definition at line 470 of file yans-wifi-phy.h.
Referenced by GetNumberOfReceiveAntennas(), and SetNumberOfReceiveAntennas().
|
private |
Number of transmitters.
Definition at line 469 of file yans-wifi-phy.h.
Referenced by GetNumberOfTransmitAntennas(), and SetNumberOfTransmitAntennas().
|
private |
Provides uniform random variables.
Definition at line 520 of file yans-wifi-phy.h.
Referenced by AssignStreams(), EndReceive(), and YansWifiPhy().
|
private |
Reception gain (dB)
Definition at line 459 of file yans-wifi-phy.h.
Referenced by GetRxGain(), SetRxGain(), and StartReceivePacket().
|
private |
Pointer to WifiPhyStateHelper.
Definition at line 522 of file yans-wifi-phy.h.
Referenced by DoDispose(), EndReceive(), GetDelayUntilIdle(), GetLastRxStartTime(), GetStateDuration(), GetTypeId(), IsStateBusy(), IsStateCcaBusy(), IsStateIdle(), IsStateRx(), IsStateSwitching(), IsStateTx(), RegisterListener(), SendPacket(), SetChannelNumber(), SetReceiveErrorCallback(), SetReceiveOkCallback(), StartReceivePacket(), and YansWifiPhy().
|
private |
Flag if STBC is used.
Definition at line 472 of file yans-wifi-phy.h.
|
private |
Transmission gain (dB)
Definition at line 458 of file yans-wifi-phy.h.
Referenced by GetTxGain(), SendPacket(), and SetTxGain().
|
private |
Minimum transmission power (dBm)
Definition at line 460 of file yans-wifi-phy.h.
Referenced by GetPowerDbm(), GetTxPowerStart(), and SetTxPowerStart().
|
private |
Maximum transmission power (dBm)
Definition at line 461 of file yans-wifi-phy.h.
Referenced by GetPowerDbm(), GetTxPowerEnd(), and SetTxPowerEnd().