802.11 PHY layer model
More...
#include <yans-wifi-phy.h>
List of all members.
Public Member Functions |
void | SetChannel (Ptr< YansWifiChannel > channel) |
void | SetChannelNumber (uint16_t id) |
| Set channel number.
|
uint16_t | GetChannelNumber () const |
| Return current channel number, see SetChannelNumber().
|
double | GetChannelFrequencyMhz () const |
| Return current center channel frequency in MHz, see SetChannelNumber().
|
void | StartReceivePacket (Ptr< Packet > packet, double rxPowerDbm, WifiMode mode, WifiPreamble preamble) |
void | SetRxNoiseFigure (double noiseFigureDb) |
void | SetTxPowerStart (double start) |
void | SetTxPowerEnd (double end) |
void | SetNTxPower (uint32_t n) |
void | SetTxGain (double gain) |
void | SetRxGain (double gain) |
void | SetEdThreshold (double threshold) |
void | SetCcaMode1Threshold (double threshold) |
void | SetErrorRateModel (Ptr< ErrorRateModel > rate) |
void | SetDevice (Ptr< Object > device) |
void | SetMobility (Ptr< Object > mobility) |
double | GetRxNoiseFigure (void) const |
double | GetTxGain (void) const |
double | GetRxGain (void) const |
double | GetEdThreshold (void) const |
double | GetCcaMode1Threshold (void) const |
Ptr< ErrorRateModel > | GetErrorRateModel (void) const |
Ptr< Object > | GetDevice (void) const |
Ptr< Object > | GetMobility (void) |
virtual double | GetTxPowerStart (void) const |
virtual double | GetTxPowerEnd (void) const |
virtual uint32_t | GetNTxPower (void) const |
virtual void | SetReceiveOkCallback (WifiPhy::RxOkCallback callback) |
virtual void | SetReceiveErrorCallback (WifiPhy::RxErrorCallback callback) |
virtual void | SendPacket (Ptr< const Packet > packet, WifiMode mode, enum WifiPreamble preamble, uint8_t txPowerLevel) |
virtual void | RegisterListener (WifiPhyListener *listener) |
virtual bool | IsStateCcaBusy (void) |
virtual bool | IsStateIdle (void) |
virtual bool | IsStateBusy (void) |
virtual bool | IsStateRx (void) |
virtual bool | IsStateTx (void) |
virtual bool | IsStateSwitching (void) |
virtual Time | GetStateDuration (void) |
virtual Time | GetDelayUntilIdle (void) |
virtual Time | GetLastRxStartTime (void) const |
virtual Time | CalculateTxDuration (uint32_t size, WifiMode payloadMode, enum WifiPreamble preamble) const |
virtual uint32_t | GetNModes (void) const |
virtual WifiMode | GetMode (uint32_t mode) const |
virtual double | CalculateSnr (WifiMode txMode, double ber) const |
virtual Ptr< WifiChannel > | GetChannel (void) const |
virtual void | ConfigureStandard (enum WifiPhyStandard standard) |
Static Public Member Functions |
static TypeId | GetTypeId (void) |
| This method returns the TypeId associated to ns3::YansWifiPhy.
|
Detailed Description
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.
Member Function Documentation
virtual double ns3::YansWifiPhy::CalculateSnr |
( |
WifiMode |
txMode, |
|
|
double |
ber | |
|
) |
| | const [virtual] |
- Parameters:
-
| txMode | the transmission mode |
| ber | the probability of bit error rate |
- Returns:
- the minimum snr which is required to achieve the requested ber for the specified transmission mode. (W/W)
Implements ns3::WifiPhy.
virtual Time ns3::YansWifiPhy::CalculateTxDuration |
( |
uint32_t |
size, |
|
|
WifiMode |
payloadMode, |
|
|
enum WifiPreamble |
preamble | |
|
) |
| | const [virtual] |
- Parameters:
-
| size | the number of bytes in the packet to send |
| payloadMode | the transmission mode to use for this packet |
| preamble | the type of preamble to use for this packet. |
- Returns:
- the total amount of time this PHY will stay busy for the transmission of these bytes.
Implements ns3::WifiPhy.
virtual Time ns3::YansWifiPhy::GetDelayUntilIdle |
( |
void |
|
) |
[virtual] |
- Returns:
- the predicted delay until this PHY can become WifiPhy::IDLE.
The PHY will never become WifiPhy::IDLE _before_ the delay returned by this method but it could become really idle later.
Implements ns3::WifiPhy.
virtual WifiMode ns3::YansWifiPhy::GetMode |
( |
uint32_t |
mode |
) |
const [virtual] |
- Parameters:
-
| mode | index in array of supported modes |
- Returns:
- the mode whose index is specified.
Implements ns3::WifiPhy.
virtual uint32_t ns3::YansWifiPhy::GetNModes |
( |
void |
|
) |
const [virtual] |
- Returns:
- the number of transmission modes supported by this PHY.
Implements ns3::WifiPhy.
virtual uint32_t ns3::YansWifiPhy::GetNTxPower |
( |
void |
|
) |
const [virtual] |
- Returns:
- the number of tx power levels available for this PHY.
Implements ns3::WifiPhy.
virtual Time ns3::YansWifiPhy::GetStateDuration |
( |
void |
|
) |
[virtual] |
- Returns:
- the amount of time since the current state has started.
Implements ns3::WifiPhy.
static TypeId ns3::YansWifiPhy::GetTypeId |
( |
void |
|
) |
[static] |
This method returns the TypeId associated to ns3::YansWifiPhy.
This object is accessible through the following paths with Config::Set and Config::Connect:
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::WifiPhy/$ns3::YansWifiPhy
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::YansWifiPhy
Attributes defined for this type:
-
EnergyDetectionThreshold: The energy of a received signal should be higher than this threshold (dbm) to allow the PHY layer to detect the signal.
-
Set with class: ns3::DoubleValue
-
Underlying type: double -1.79769e+308:1.79769e+308
-
Initial value: -96
-
Flags: construct write read
-
CcaMode1Threshold: The energy of a received signal should be higher than this threshold (dbm) to allow the PHY layer to declare CCA BUSY state
-
Set with class: ns3::DoubleValue
-
Underlying type: double -1.79769e+308:1.79769e+308
-
Initial value: -99
-
Flags: construct write read
-
TxGain: Transmission gain (dB).
-
Set with class: ns3::DoubleValue
-
Underlying type: double -1.79769e+308:1.79769e+308
-
Initial value: 1
-
Flags: construct write read
-
RxGain: Reception gain (dB).
-
Set with class: ns3::DoubleValue
-
Underlying type: double -1.79769e+308:1.79769e+308
-
Initial value: 1
-
Flags: construct write read
-
TxPowerLevels: Number of transmission power levels available between TxPowerBase and TxPowerEnd included.
-
TxPowerEnd: Maximum available transmission level (dbm).
-
Set with class: ns3::DoubleValue
-
Underlying type: double -1.79769e+308:1.79769e+308
-
Initial value: 16.0206
-
Flags: construct write read
-
TxPowerStart: Minimum available transmission level (dbm).
-
Set with class: ns3::DoubleValue
-
Underlying type: double -1.79769e+308:1.79769e+308
-
Initial value: 16.0206
-
Flags: construct write read
-
RxNoiseFigure: Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver. According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "the difference in decibels (dB) between the noise output of the actual receiver to the noise output of an ideal receiver with the same overall gain and bandwidth when the receivers are connected to sources at the standard noise temperature T0 (usually 290 K)". For
-
Set with class: ns3::DoubleValue
-
Underlying type: double -1.79769e+308:1.79769e+308
-
Initial value: 7
-
Flags: construct write read
-
State: The state of the PHY layer
-
ChannelSwitchDelay: Delay between two short frames transmitted on different frequencies. NOTE: Unused now.
-
Set with class: TimeValue
-
Underlying type: Time
-
Initial value: 250000ns
-
Flags: construct write read
-
ChannelNumber: Channel center frequency = Channel starting frequency + 5 MHz * (nch - 1)
No TraceSources defined for this type.
TraceSources defined in parent class ns3::WifiPhy:
-
PhyTxBegin: Trace source indicating a packet has begun transmitting over the channel medium
-
PhyTxEnd: Trace source indicating a packet has been completely transmitted over the channel. NOTE: the only official WifiPhy implementation available to this date (YansWifiPhy) never fires this trace source.
-
PhyTxDrop: Trace source indicating a packet has been dropped by the device during transmission
-
PhyRxBegin: Trace source indicating a packet has begun being received from the channel medium by the device
-
PhyRxEnd: Trace source indicating a packet has been completely received from the channel medium by the device
-
PhyRxDrop: Trace source indicating a packet has been dropped by the device during reception
-
PromiscSnifferRx: Trace source simulating a wifi device in monitor mode sniffing all received frames
-
PromiscSnifferTx: Trace source simulating the capability of a wifi device in monitor mode to sniff all frames being transmitted
Reimplemented from ns3::WifiPhy.
virtual bool ns3::YansWifiPhy::IsStateBusy |
( |
void |
|
) |
[virtual] |
virtual bool ns3::YansWifiPhy::IsStateCcaBusy |
( |
void |
|
) |
[virtual] |
virtual bool ns3::YansWifiPhy::IsStateIdle |
( |
void |
|
) |
[virtual] |
virtual bool ns3::YansWifiPhy::IsStateRx |
( |
void |
|
) |
[virtual] |
virtual bool ns3::YansWifiPhy::IsStateSwitching |
( |
void |
|
) |
[virtual] |
virtual bool ns3::YansWifiPhy::IsStateTx |
( |
void |
|
) |
[virtual] |
virtual void ns3::YansWifiPhy::RegisterListener |
( |
WifiPhyListener * |
listener |
) |
[virtual] |
- Parameters:
-
| listener | the new listener |
Add the input listener to the list of objects to be notified of PHY-level events.
Implements ns3::WifiPhy.
virtual void ns3::YansWifiPhy::SendPacket |
( |
Ptr< const Packet > |
packet, |
|
|
WifiMode |
mode, |
|
|
enum WifiPreamble |
preamble, |
|
|
uint8_t |
txPowerLevel | |
|
) |
| | [virtual] |
- Parameters:
-
| 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. |
| 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.
void ns3::YansWifiPhy::SetChannelNumber |
( |
uint16_t |
id |
) |
[virtual] |
Set channel number.
Channel center frequency = Channel starting frequency + 5 MHz * (nch - 1)
where Starting channel frequency is standard-dependent, see SetStandard() as defined in IEEE 802.11-2007 17.3.8.3.2.
YansWifiPhy can switch among different channels. Basically, YansWifiPhy has a private attribute m_channelNumber that identifies the channel the PHY operates on. Channel switching cannot interrupt an ongoing transmission. When PHY is in TX state, the channel switching is postponed until the end of the current transmission. When the PHY is in RX state, the channel switching causes the drop of the synchronized packet.
Implements ns3::WifiPhy.
- Parameters:
-
| callback | the callback to invoke upon erroneous packet reception. |
Implements ns3::WifiPhy.
- Parameters:
-
| callback | the callback to invoke upon successful packet reception. |
Implements ns3::WifiPhy.
The documentation for this class was generated from the following files:
- src/devices/wifi/yans-wifi-phy.h
- doc/introspected-doxygen.h