802.11 PHY layer modelThis PHY implements a model of 802.11a. More...
#include "yans-wifi-phy.h"
Public Member Functions | |
YansWifiPhy () | |
virtual | ~YansWifiPhy () |
virtual Ptr< WifiChannel > | GetChannel (void) const |
Return the WifiChannel this WifiPhy is connected to. More... | |
virtual void | RegisterListener (WifiPhyListener *listener) |
virtual void | ResumeFromSleep (void) |
Resume from sleep mode. More... | |
virtual void | SendPacket (Ptr< const Packet > packet, WifiTxVector txVector, enum WifiPreamble preamble) |
virtual void | SendPacket (Ptr< const Packet > packet, WifiTxVector txVector, enum WifiPreamble preamble, enum mpduType mpdutype) |
void | SetChannel (Ptr< YansWifiChannel > channel) |
Set the YansWifiChannel this YansWifiPhy is to be connected to. More... | |
virtual void | SetReceiveErrorCallback (WifiPhy::RxErrorCallback callback) |
virtual void | SetReceiveOkCallback (WifiPhy::RxOkCallback callback) |
virtual void | SetSleepMode (void) |
Put in sleep mode. More... | |
void | StartReceivePacket (Ptr< Packet > packet, WifiTxVector txVector, WifiPreamble preamble, enum mpduType mpdutype, Ptr< InterferenceHelper::Event > event) |
Starting receiving the payload of a packet (i.e. More... | |
void | StartReceivePreambleAndHeader (Ptr< Packet > packet, double rxPowerDbm, WifiTxVector txVector, WifiPreamble preamble, enum mpduType mpdutype, Time rxDuration) |
Starting receiving the plcp of a packet (i.e. More... | |
virtual void | UnregisterListener (WifiPhyListener *listener) |
![]() | |
WifiPhy () | |
virtual | ~WifiPhy () |
virtual void | AddSupportedChannelWidth (uint32_t channelwidth) |
virtual int64_t | AssignStreams (int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. More... | |
Time | CalculatePlcpPreambleAndHeaderDuration (WifiTxVector txVector, enum WifiPreamble preamble) |
virtual double | CalculateSnr (WifiTxVector txVector, double ber) const |
Time | CalculateTxDuration (uint32_t size, WifiTxVector txVector, enum WifiPreamble preamble, double frequency) |
Time | CalculateTxDuration (uint32_t size, WifiTxVector txVector, enum WifiPreamble preamble, double frequency, enum mpduType mpdutype, uint8_t incFlag) |
virtual void | ConfigureStandard (enum WifiPhyStandard standard) |
Configure the PHY-level parameters for different Wi-Fi standard. More... | |
double | DbmToW (double dbm) const |
Convert from dBm to Watts. More... | |
double | DbToRatio (double db) const |
Convert from dB to ratio. More... | |
bool | DefineChannelNumber (uint16_t channelNumber, enum WifiPhyStandard standard, uint32_t frequency, uint32_t channelWidth) |
Add a channel definition to the WifiPhy. 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 BssMembershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet. More... | |
double | GetCcaMode1Threshold (void) const |
Return the CCA threshold (dBm). More... | |
virtual uint16_t | GetChannelNumber (void) const |
Return current channel number. More... | |
virtual Time | GetChannelSwitchDelay (void) const |
virtual uint32_t | GetChannelWidth (void) const |
virtual Time | GetDelayUntilIdle (void) |
Ptr< NetDevice > | GetDevice (void) const |
Return the device this PHY is associated with. More... | |
double | GetEdThreshold (void) const |
Return the energy detection threshold (dBm). More... | |
double | GetEdThresholdW (void) const |
Return the energy detection threshold. 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 WifiMode | 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 BssMembershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet. More... | |
Ptr< MobilityModel > | 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 BssMembershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet. More... | |
virtual uint8_t | GetNMcs (void) const |
The WifiPhy::GetNMcs() 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 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 |
Time | GetPayloadDuration (uint32_t size, WifiTxVector txVector, WifiPreamble preamble, double frequency) |
Time | GetPayloadDuration (uint32_t size, WifiTxVector txVector, WifiPreamble preamble, double frequency, enum mpduType mpdutype, uint8_t incFlag) |
double | GetRxGain (void) const |
Return the reception gain (dB). More... | |
double | GetRxNoiseFigure (void) const |
Return the RX noise figure (dBm). More... | |
virtual bool | GetShortPlcpPreambleSupported (void) const |
Return whether short PLCP preamble is supported. More... | |
virtual enum WifiPhyStandard | GetStandard (void) const |
Get the configured Wi-Fi standard. More... | |
virtual Time | GetStateDuration (void) |
virtual bool | GetStbc (void) const |
Return whether STBC is supported. More... | |
virtual std::vector< uint32_t > | GetSupportedChannelWidthSet (void) const |
virtual uint8_t | GetSupportedRxSpatialStreams (void) const |
virtual uint8_t | GetSupportedTxSpatialStreams (void) const |
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 | IsMcsSupported (WifiMode mcs) const |
Check if the given WifiMode is supported by the PHY. More... | |
virtual bool | IsModeSupported (WifiMode mode) const |
Check if the given WifiMode is supported by the PHY. More... | |
virtual bool | IsStateBusy (void) |
virtual bool | IsStateCcaBusy (void) |
virtual bool | IsStateIdle (void) |
virtual bool | IsStateRx (void) |
virtual bool | IsStateSleep (void) |
virtual bool | IsStateSwitching (void) |
virtual bool | IsStateTx (void) |
void | NotifyMonitorSniffRx (Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu, struct signalNoiseDbm signalNoise) |
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, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu) |
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... | |
double | RatioToDb (double ratio) const |
Convert from ratio to dB. More... | |
void | SetCcaMode1Threshold (double threshold) |
Sets the CCA threshold (dBm). More... | |
virtual void | SetChannelNumber (uint16_t id) |
Set channel number. More... | |
virtual void | SetChannelWidth (uint32_t channelwidth) |
void | SetDevice (Ptr< NetDevice > 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< MobilityModel > mobility) |
assign a mobility model to this device 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) |
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 | SetShortPlcpPreambleSupported (bool preamble) |
Enable or disable short PLCP preamble. 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... | |
double | WToDbm (double w) const |
Convert from Watts to dBm. More... | |
![]() | |
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 |
Implement the GetInstanceTypeId method defined in ObjectBase. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. 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... | |
![]() | |
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... | |
![]() | |
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 TypeId | GetTypeId (void) |
![]() | |
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-OFDM at 12Mbps. More... | |
static WifiMode | GetErpOfdmRate18Mbps () |
Return a WifiMode for ERP-OFDM at 18Mbps. More... | |
static WifiMode | GetErpOfdmRate24Mbps () |
Return a WifiMode for ERP-OFDM at 24Mbps. More... | |
static WifiMode | GetErpOfdmRate36Mbps () |
Return a WifiMode for ERP-OFDM at 36Mbps. More... | |
static WifiMode | GetErpOfdmRate48Mbps () |
Return a WifiMode for ERP-OFDM at 48Mbps. More... | |
static WifiMode | GetErpOfdmRate54Mbps () |
Return a WifiMode for ERP-OFDM at 54Mbps. More... | |
static WifiMode | GetErpOfdmRate6Mbps () |
Return a WifiMode for ERP-OFDM at 6Mbps. More... | |
static WifiMode | GetErpOfdmRate9Mbps () |
Return a WifiMode for ERP-OFDM at 9Mbps. More... | |
static WifiMode | GetHtMcs0 () |
Return MCS 0 from HT MCS values. More... | |
static WifiMode | GetHtMcs1 () |
Return MCS 1 from HT MCS values. More... | |
static WifiMode | GetHtMcs10 () |
Return MCS 10 from HT MCS values. More... | |
static WifiMode | GetHtMcs11 () |
Return MCS 11 from HT MCS values. More... | |
static WifiMode | GetHtMcs12 () |
Return MCS 12 from HT MCS values. More... | |
static WifiMode | GetHtMcs13 () |
Return MCS 13 from HT MCS values. More... | |
static WifiMode | GetHtMcs14 () |
Return MCS 14 from HT MCS values. More... | |
static WifiMode | GetHtMcs15 () |
Return MCS 15 from HT MCS values. More... | |
static WifiMode | GetHtMcs16 () |
Return MCS 16 from HT MCS values. More... | |
static WifiMode | GetHtMcs17 () |
Return MCS 17 from HT MCS values. More... | |
static WifiMode | GetHtMcs18 () |
Return MCS 18 from HT MCS values. More... | |
static WifiMode | GetHtMcs19 () |
Return MCS 19 from HT MCS values. More... | |
static WifiMode | GetHtMcs2 () |
Return MCS 2 from HT MCS values. More... | |
static WifiMode | GetHtMcs20 () |
Return MCS 20 from HT MCS values. More... | |
static WifiMode | GetHtMcs21 () |
Return MCS 21 from HT MCS values. More... | |
static WifiMode | GetHtMcs22 () |
Return MCS 22 from HT MCS values. More... | |
static WifiMode | GetHtMcs23 () |
Return MCS 23 from HT MCS values. More... | |
static WifiMode | GetHtMcs24 () |
Return MCS 24 from HT MCS values. More... | |
static WifiMode | GetHtMcs25 () |
Return MCS 25 from HT MCS values. More... | |
static WifiMode | GetHtMcs26 () |
Return MCS 26 from HT MCS values. More... | |
static WifiMode | GetHtMcs27 () |
Return MCS 27 from HT MCS values. More... | |
static WifiMode | GetHtMcs28 () |
Return MCS 28 from HT MCS values. More... | |
static WifiMode | GetHtMcs29 () |
Return MCS 29 from HT MCS values. More... | |
static WifiMode | GetHtMcs3 () |
Return MCS 3 from HT MCS values. More... | |
static WifiMode | GetHtMcs30 () |
Return MCS 30 from HT MCS values. More... | |
static WifiMode | GetHtMcs31 () |
Return MCS 31 from HT MCS values. More... | |
static WifiMode | GetHtMcs4 () |
Return MCS 4 from HT MCS values. More... | |
static WifiMode | GetHtMcs5 () |
Return MCS 5 from HT MCS values. More... | |
static WifiMode | GetHtMcs6 () |
Return MCS 6 from HT MCS values. More... | |
static WifiMode | GetHtMcs7 () |
Return MCS 7 from HT MCS values. More... | |
static WifiMode | GetHtMcs8 () |
Return MCS 8 from HT MCS values. More... | |
static WifiMode | GetHtMcs9 () |
Return MCS 9 from HT MCS values. More... | |
static WifiMode | GetHtPlcpHeaderMode (WifiMode payloadMode) |
static WifiMode | GetOfdmRate12Mbps () |
Return a WifiMode for OFDM at 12Mbps. More... | |
static WifiMode | GetOfdmRate12MbpsBW10MHz () |
Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate12MbpsBW5MHz () |
Return a WifiMode for OFDM at 12Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate13_5MbpsBW5MHz () |
Return a WifiMode for OFDM at 13.5Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate18Mbps () |
Return a WifiMode for OFDM at 18Mbps. More... | |
static WifiMode | GetOfdmRate18MbpsBW10MHz () |
Return a WifiMode for OFDM at 18Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate1_5MbpsBW5MHz () |
Return a WifiMode for OFDM at 1.5Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate24Mbps () |
Return a WifiMode for OFDM at 24Mbps. More... | |
static WifiMode | GetOfdmRate24MbpsBW10MHz () |
Return a WifiMode for OFDM at 24Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate27MbpsBW10MHz () |
Return a WifiMode for OFDM at 27Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate2_25MbpsBW5MHz () |
Return a WifiMode for OFDM at 2.25Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate36Mbps () |
Return a WifiMode for OFDM at 36Mbps. More... | |
static WifiMode | GetOfdmRate3MbpsBW10MHz () |
Return a WifiMode for OFDM at 3Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate3MbpsBW5MHz () |
Return a WifiMode for OFDM at 3Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate48Mbps () |
Return a WifiMode for OFDM at 48Mbps. More... | |
static WifiMode | GetOfdmRate4_5MbpsBW10MHz () |
Return a WifiMode for OFDM at 4.5Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate4_5MbpsBW5MHz () |
Return a WifiMode for OFDM at 4.5Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate54Mbps () |
Return a WifiMode for OFDM at 54Mbps. More... | |
static WifiMode | GetOfdmRate6Mbps () |
Return a WifiMode for OFDM at 6Mbps. More... | |
static WifiMode | GetOfdmRate6MbpsBW10MHz () |
Return a WifiMode for OFDM at 6Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate6MbpsBW5MHz () |
Return a WifiMode for OFDM at 6Mbps with 5MHz channel spacing. More... | |
static WifiMode | GetOfdmRate9Mbps () |
Return a WifiMode for OFDM at 9Mbps. More... | |
static WifiMode | GetOfdmRate9MbpsBW10MHz () |
Return a WifiMode for OFDM at 9Mbps with 10MHz channel spacing. More... | |
static WifiMode | GetOfdmRate9MbpsBW5MHz () |
Return a WifiMode for OFDM at 9Mbps with 5MHz channel spacing. More... | |
static Time | GetPlcpHeaderDuration (WifiTxVector txVector, WifiPreamble preamble) |
static WifiMode | GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble, WifiTxVector txVector) |
static Time | GetPlcpHtSigHeaderDuration (WifiPreamble preamble) |
static Time | GetPlcpHtTrainingSymbolDuration (WifiPreamble preamble, WifiTxVector txVector) |
static Time | GetPlcpPreambleDuration (WifiTxVector txVector, WifiPreamble preamble) |
static Time | GetPlcpVhtSigA1Duration (WifiPreamble preamble) |
static Time | GetPlcpVhtSigA2Duration (WifiPreamble preamble) |
static Time | GetPlcpVhtSigBDuration (WifiPreamble preamble) |
static TypeId | GetTypeId (void) |
static WifiMode | GetVhtMcs0 () |
Return MCS 0 from VHT MCS values. More... | |
static WifiMode | GetVhtMcs1 () |
Return MCS 1 from VHT MCS values. More... | |
static WifiMode | GetVhtMcs2 () |
Return MCS 2 from VHT MCS values. More... | |
static WifiMode | GetVhtMcs3 () |
Return MCS 3 from VHT MCS values. More... | |
static WifiMode | GetVhtMcs4 () |
Return MCS 4 from VHT MCS values. More... | |
static WifiMode | GetVhtMcs5 () |
Return MCS 5 from VHT MCS values. More... | |
static WifiMode | GetVhtMcs6 () |
Return MCS 6 from VHT MCS values. More... | |
static WifiMode | GetVhtMcs7 () |
Return MCS 7 from VHT MCS values. More... | |
static WifiMode | GetVhtMcs8 () |
Return MCS 8 from VHT MCS values. More... | |
static WifiMode | GetVhtMcs9 () |
Return MCS 9 from VHT MCS values. More... | |
static WifiMode | GetVhtPlcpHeaderMode (WifiMode payloadMode) |
static bool | IsValidTxVector (WifiTxVector txVector) |
The standard disallows certain combinations of WifiMode, number of spatial streams, and channel widths. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
![]() | |
static void | Cleanup (void) |
Noop. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Protected Member Functions | |
virtual bool | DoChannelSwitch (uint16_t id) |
The default implementation does nothing and returns true. More... | |
virtual void | DoDispose (void) |
Destructor implementation. More... | |
virtual bool | DoFrequencySwitch (uint32_t frequency) |
The default implementation does nothing and returns true. More... | |
![]() | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
double | GetPowerDbm (uint8_t power) const |
Get the power of the given power level in dBm. More... | |
![]() | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
![]() | |
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... | |
Private Member Functions | |
void | EndReceive (Ptr< Packet > packet, enum WifiPreamble preamble, enum mpduType mpdutype, Ptr< InterferenceHelper::Event > event) |
The last bit of the packet has arrived. More... | |
Private Attributes | |
Ptr< YansWifiChannel > | m_channel |
YansWifiChannel that this YansWifiPhy is connected to. More... | |
Additional Inherited Members | |
![]() | |
typedef std::pair< uint16_t, enum WifiPhyStandard > | ChannelNumberStandardPair |
A pair of a ChannelNumber and WifiPhyStandard. More... | |
typedef std::pair< uint32_t, uint32_t > | FrequencyWidthPair |
A pair of a center Frequency and a ChannelWidth. More... | |
typedef void(* | MonitorSnifferRxCallback) (Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu, struct signalNoiseDbm signalNoise) |
TracedCallback signature for monitor mode receive events. More... | |
typedef void(* | MonitorSnifferTxCallback) (const Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu) |
TracedCallback signature for monitor mode transmit events. More... | |
typedef Callback< void, Ptr< Packet >, double > | RxErrorCallback |
arg1: packet received unsuccessfully arg2: snr of packet More... | |
typedef Callback< void, Ptr< Packet >, double, WifiTxVector, enum WifiPreamble > | RxOkCallback |
arg1: packet received successfully arg2: snr of packet arg3: TXVECTOR of packet arg4: type of preamble used for packet. More... | |
enum | State { IDLE, CCA_BUSY, TX, RX, SWITCHING, SLEEP } |
The state of the PHY layer. More... | |
![]() | |
EventId | m_endPlcpRxEvent |
EventId | m_endRxEvent |
InterferenceHelper | m_interference |
Pointer to InterferenceHelper. More... | |
uint16_t | m_mpdusNum |
carries the number of expected mpdus that are part of an A-MPDU More... | |
bool | m_plcpSuccess |
Flag if the PLCP of the packet or the first MPDU in an A-MPDU has been received. 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... | |
![]() | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. 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 Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 544 bytes (on a 64-bit architecture).
Definition at line 47 of file yans-wifi-phy.h.
ns3::YansWifiPhy::YansWifiPhy | ( | ) |
Definition at line 51 of file yans-wifi-phy.cc.
References NS_LOG_FUNCTION.
|
virtual |
Definition at line 56 of file yans-wifi-phy.cc.
References NS_LOG_FUNCTION.
|
protectedvirtual |
The default implementation does nothing and returns true.
This method is typically called internally by SetChannelNumber ().
Perform any actions necessary when user changes channel number
id | channel number to try to switch to |
Reimplemented from ns3::WifiPhy.
Definition at line 69 of file yans-wifi-phy.cc.
References ns3::EventId::Cancel(), ns3::WifiPhy::CCA_BUSY, ns3::InterferenceHelper::EraseEvents(), ns3::WifiPhy::GetChannelNumber(), ns3::WifiPhy::GetChannelSwitchDelay(), ns3::WifiPhy::GetDelayUntilIdle(), ns3::WifiPhy::IDLE, ns3::Object::IsInitialized(), ns3::WifiPhy::IsStateSwitching(), ns3::WifiPhy::m_endPlcpRxEvent, ns3::WifiPhy::m_endRxEvent, ns3::WifiPhy::m_interference, ns3::WifiPhy::m_state, NS_ASSERT, NS_LOG_DEBUG, ns3::WifiPhy::RX, ns3::Simulator::Schedule(), ns3::WifiPhy::SetChannelNumber(), ns3::WifiPhy::SLEEP, and ns3::WifiPhy::TX.
|
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 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::WifiPhy.
Definition at line 62 of file yans-wifi-phy.cc.
References m_channel, and NS_LOG_FUNCTION.
|
protectedvirtual |
The default implementation does nothing and returns true.
This method is typically called internally by SetFrequency ().
Perform any actions necessary when user changes frequency
frequency | frequency to try to switch to |
Reimplemented from ns3::WifiPhy.
Definition at line 121 of file yans-wifi-phy.cc.
References ns3::EventId::Cancel(), ns3::WifiPhy::CCA_BUSY, ns3::InterferenceHelper::EraseEvents(), ns3::WifiPhy::GetChannelSwitchDelay(), ns3::WifiPhy::GetDelayUntilIdle(), ns3::WifiPhy::GetFrequency(), ns3::WifiPhy::IDLE, ns3::Object::IsInitialized(), ns3::WifiPhy::IsStateSwitching(), ns3::WifiPhy::m_endPlcpRxEvent, ns3::WifiPhy::m_endRxEvent, ns3::WifiPhy::m_interference, ns3::WifiPhy::m_state, NS_ASSERT, NS_LOG_DEBUG, ns3::WifiPhy::RX, ns3::Simulator::Schedule(), ns3::WifiPhy::SetFrequency(), ns3::WifiPhy::SLEEP, and ns3::WifiPhy::TX.
|
private |
The last bit of the packet has arrived.
packet | the packet that the last bit has arrived |
preamble | the preamble of the arriving packet |
mpdutype | the type of the MPDU as defined in WifiPhy::mpduType. |
event | the corresponding event of the first time the packet arrives |
Definition at line 528 of file yans-wifi-phy.cc.
References ns3::InterferenceHelper::CalculatePlcpPayloadSnrPer(), ns3::WifiPhy::GetChannelNumber(), ns3::WifiPhy::GetFrequency(), ns3::WifiPhy::GetRxNoiseFigure(), ns3::Packet::GetSize(), ns3::UniformRandomVariable::GetValue(), ns3::WifiPhy::IsStateRx(), ns3::LAST_MPDU_IN_AGGREGATE, ns3::WifiPhy::m_interference, ns3::WifiPhy::m_plcpSuccess, ns3::WifiPhy::m_random, ns3::WifiPhy::m_rxMpduReferenceNumber, ns3::WifiPhy::m_state, ns3::mpduInfo::mpduRefNumber, ns3::signalNoiseDbm::noise, ns3::WifiPhy::NotifyMonitorSniffRx(), ns3::WifiPhy::NotifyRxDrop(), ns3::InterferenceHelper::NotifyRxEnd(), ns3::WifiPhy::NotifyRxEnd(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WifiPhy::RatioToDb(), ns3::signalNoiseDbm::signal, ns3::mpduInfo::type, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_VHT, and ns3::WIFI_PREAMBLE_NONE.
Referenced by StartReceivePreambleAndHeader().
|
virtual |
Return the WifiChannel this WifiPhy is connected to.
Implements ns3::WifiPhy.
Definition at line 173 of file yans-wifi-phy.cc.
References m_channel.
|
static |
Definition at line 41 of file yans-wifi-phy.cc.
References ns3::TypeId::SetParent().
|
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 516 of file yans-wifi-phy.cc.
References ns3::WifiPhy::m_state.
|
virtual |
Resume from sleep mode.
Implements ns3::WifiPhy.
Definition at line 218 of file yans-wifi-phy.cc.
References ns3::WifiPhy::CCA_BUSY, ns3::WifiPhy::DbmToW(), ns3::WifiPhy::GetCcaMode1Threshold(), ns3::InterferenceHelper::GetEnergyDuration(), ns3::WifiPhy::IDLE, ns3::WifiPhy::m_interference, ns3::WifiPhy::m_state, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WifiPhy::RX, ns3::WifiPhy::SLEEP, ns3::WifiPhy::SWITCHING, and ns3::WifiPhy::TX.
|
virtual |
packet | the packet to send |
txVector | the TXVECTOR that has tx parameters such as mode, the transmission mode to use to send this packet, and txPowerLevel, a power level to use to send this packet. The real transmission power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels |
preamble | the type of preamble to use to send this packet. |
Implements ns3::WifiPhy.
Definition at line 457 of file yans-wifi-phy.cc.
References ns3::NORMAL_MPDU.
|
virtual |
packet | the packet to send |
txVector | the TXVECTOR that has tx parameters such as mode, the transmission mode to use to send this packet, and txPowerLevel, a power level to use to send this packet. The real transmission power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels |
preamble | the type of preamble to use to send this packet. |
mpdutype | the type of the MPDU as defined in WifiPhy::mpduType. |
Implements ns3::WifiPhy.
Definition at line 463 of file yans-wifi-phy.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::EventId::Cancel(), ns3::WifiPhy::GetChannelNumber(), ns3::WifiTxVector::GetChannelWidth(), ns3::WifiMode::GetDataRate(), ns3::WifiPhy::GetFrequency(), ns3::WifiMode::GetMcsValue(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::WifiTxVector::GetNss(), ns3::WifiPhy::GetPowerDbm(), ns3::Packet::GetSize(), ns3::WifiPhy::GetTxGain(), ns3::WifiTxVector::GetTxPowerLevel(), ns3::WifiTxVector::IsShortGuardInterval(), m_channel, ns3::WifiPhy::m_endPlcpRxEvent, ns3::WifiPhy::m_endRxEvent, ns3::WifiPhy::m_interference, ns3::WifiPhy::m_state, ns3::WifiPhy::m_txMpduReferenceNumber, ns3::MPDU_IN_AGGREGATE, ns3::mpduInfo::mpduRefNumber, ns3::NanoSeconds(), ns3::WifiPhy::NotifyMonitorSniffTx(), ns3::InterferenceHelper::NotifyRxEnd(), ns3::WifiPhy::NotifyTxBegin(), ns3::WifiPhy::NotifyTxDrop(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::mpduInfo::type, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_VHT, and ns3::WIFI_PREAMBLE_NONE.
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 179 of file yans-wifi-phy.cc.
References third::channel, and m_channel.
Referenced by ns3::YansWifiPhyHelper::Create(), PsrExperiment::Run(), InterferenceExperiment::Run(), and CollisionExperiment::Run().
|
virtual |
callback | the callback to invoke upon erroneous packet reception. |
Implements ns3::WifiPhy.
Definition at line 254 of file yans-wifi-phy.cc.
References ns3::WifiPhy::m_state.
|
virtual |
callback | the callback to invoke upon successful packet reception. |
Implements ns3::WifiPhy.
Definition at line 248 of file yans-wifi-phy.cc.
References ns3::WifiPhy::m_state.
|
virtual |
Put in sleep mode.
Implements ns3::WifiPhy.
Definition at line 186 of file yans-wifi-phy.cc.
References ns3::WifiPhy::CCA_BUSY, ns3::WifiPhy::GetDelayUntilIdle(), ns3::WifiPhy::IDLE, ns3::WifiPhy::m_state, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WifiPhy::RX, ns3::Simulator::Schedule(), ns3::WifiPhy::SLEEP, ns3::WifiPhy::SWITCHING, and ns3::WifiPhy::TX.
void ns3::YansWifiPhy::StartReceivePacket | ( | Ptr< Packet > | packet, |
WifiTxVector | txVector, | ||
WifiPreamble | preamble, | ||
enum mpduType | mpdutype, | ||
Ptr< InterferenceHelper::Event > | event | ||
) |
Starting receiving the payload of a packet (i.e.
the first bit of the packet has arrived).
packet | the arriving packet |
txVector | the TXVECTOR of the arriving packet |
preamble | the preamble of the arriving packet |
mpdutype | the type of the MPDU as defined in WifiPhy::mpduType. |
event | the corresponding event of the first time the packet arrives |
Definition at line 418 of file yans-wifi-phy.cc.
References ns3::InterferenceHelper::CalculatePlcpHeaderSnrPer(), ns3::WifiTxVector::GetMode(), ns3::UniformRandomVariable::GetValue(), ns3::EventId::IsExpired(), ns3::WifiPhy::IsMcsSupported(), ns3::WifiPhy::IsModeSupported(), ns3::WifiPhy::IsStateRx(), ns3::WifiPhy::m_endPlcpRxEvent, ns3::WifiPhy::m_interference, ns3::WifiPhy::m_plcpSuccess, ns3::WifiPhy::m_random, ns3::WifiPhy::NotifyRxDrop(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::WifiPhy::RatioToDb().
Referenced by StartReceivePreambleAndHeader().
void ns3::YansWifiPhy::StartReceivePreambleAndHeader | ( | Ptr< Packet > | packet, |
double | rxPowerDbm, | ||
WifiTxVector | txVector, | ||
WifiPreamble | preamble, | ||
enum mpduType | mpdutype, | ||
Time | rxDuration | ||
) |
Starting receiving the plcp of a 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 |
mpdutype | the type of the MPDU as defined in WifiPhy::mpduType. |
rxDuration | the duration needed for the reception of the packet |
Definition at line 260 of file yans-wifi-phy.cc.
References ns3::InterferenceHelper::Add(), ns3::WifiPhy::CalculatePlcpPreambleAndHeaderDuration(), ns3::WifiPhy::CCA_BUSY, ns3::WifiPhy::DbmToW(), EndReceive(), ns3::WifiPhy::GetCcaMode1Threshold(), ns3::WifiPhy::GetEdThresholdW(), ns3::InterferenceHelper::GetEnergyDuration(), ns3::WifiTxVector::GetMode(), ns3::AmpduTag::GetRemainingNbOfMpdus(), ns3::WifiPhy::GetRxGain(), ns3::Packet::GetSize(), ns3::WifiPhy::IDLE, ns3::EventId::IsExpired(), ns3::Time::IsZero(), ns3::WifiPhy::m_endPlcpRxEvent, ns3::WifiPhy::m_endRxEvent, ns3::WifiPhy::m_interference, ns3::WifiPhy::m_mpdusNum, ns3::WifiPhy::m_plcpSuccess, ns3::WifiPhy::m_rxMpduReferenceNumber, ns3::WifiPhy::m_state, ns3::WifiPhy::NotifyRxBegin(), ns3::WifiPhy::NotifyRxDrop(), ns3::InterferenceHelper::NotifyRxStart(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Packet::PeekPacketTag(), ns3::WifiPhy::RX, ns3::Simulator::Schedule(), ns3::WifiPhy::SLEEP, StartReceivePacket(), ns3::WifiPhy::SWITCHING, ns3::WifiPhy::TX, and ns3::WIFI_PREAMBLE_NONE.
|
virtual |
listener | the listener to be unregistered |
Remove the input listener from the list of objects to be notified of PHY-level events.
Implements ns3::WifiPhy.
Definition at line 522 of file yans-wifi-phy.cc.
References ns3::WifiPhy::m_state.
|
private |
YansWifiChannel that this YansWifiPhy is connected to.
Definition at line 120 of file yans-wifi-phy.h.
Referenced by DoDispose(), GetChannel(), SendPacket(), and SetChannel().