#include <yans-wifi-phy.h>
Public Member Functions | |
virtual uint32_t | GetNTxPower (void) const |
virtual void | SetReceiveOkCallback (WifiPhy::SyncOkCallback callback) |
virtual void | SetReceiveErrorCallback (WifiPhy::SyncErrorCallback 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 | IsStateSync (void) |
virtual bool | IsStateTx (void) |
virtual Time | GetStateDuration (void) |
virtual Time | GetDelayUntilIdle (void) |
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 |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::YansWifiPhy. | |
Private Member Functions | |
virtual void | DoDispose (void) |
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.
virtual double ns3::YansWifiPhy::CalculateSnr | ( | WifiMode | txMode, | |
double | ber | |||
) | const [virtual] |
txMode | the transmission mode | |
ber | the probability of bit error rate |
Implements ns3::WifiPhy.
virtual Time ns3::YansWifiPhy::CalculateTxDuration | ( | uint32_t | size, | |
WifiMode | payloadMode, | |||
enum WifiPreamble | preamble | |||
) | const [virtual] |
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. |
Implements ns3::WifiPhy.
virtual void ns3::YansWifiPhy::DoDispose | ( | void | ) | [private, virtual] |
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.
Reimplemented from ns3::Object.
virtual Time ns3::YansWifiPhy::GetDelayUntilIdle | ( | void | ) | [virtual] |
Implements ns3::WifiPhy.
virtual WifiMode ns3::YansWifiPhy::GetMode | ( | uint32_t | mode | ) | const [virtual] |
mode | index in array of supported modes |
Implements ns3::WifiPhy.
virtual uint32_t ns3::YansWifiPhy::GetNModes | ( | void | ) | const [virtual] |
virtual uint32_t ns3::YansWifiPhy::GetNTxPower | ( | void | ) | const [virtual] |
virtual Time ns3::YansWifiPhy::GetStateDuration | ( | void | ) | [virtual] |
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:
Reimplemented from ns3::WifiPhy.
virtual bool ns3::YansWifiPhy::IsStateBusy | ( | void | ) | [virtual] |
Implements ns3::WifiPhy.
virtual bool ns3::YansWifiPhy::IsStateCcaBusy | ( | void | ) | [virtual] |
Implements ns3::WifiPhy.
virtual bool ns3::YansWifiPhy::IsStateIdle | ( | void | ) | [virtual] |
Implements ns3::WifiPhy.
virtual bool ns3::YansWifiPhy::IsStateSync | ( | void | ) | [virtual] |
Implements ns3::WifiPhy.
virtual bool ns3::YansWifiPhy::IsStateTx | ( | void | ) | [virtual] |
Implements ns3::WifiPhy.
virtual void ns3::YansWifiPhy::RegisterListener | ( | WifiPhyListener * | listener | ) | [virtual] |
listener | the new listener |
Implements ns3::WifiPhy.
virtual void ns3::YansWifiPhy::SendPacket | ( | Ptr< const Packet > | packet, | |
WifiMode | mode, | |||
enum WifiPreamble | preamble, | |||
uint8_t | txPowerLevel | |||
) | [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. | |
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.
virtual void ns3::YansWifiPhy::SetReceiveErrorCallback | ( | WifiPhy::SyncErrorCallback | callback | ) | [virtual] |
callback | the callback to invoke upon erronous packet reception. |
Implements ns3::WifiPhy.
virtual void ns3::YansWifiPhy::SetReceiveOkCallback | ( | WifiPhy::SyncOkCallback | callback | ) | [virtual] |
callback | the callback to invoke upon successful packet reception. |
Implements ns3::WifiPhy.