ns-3
ns3::YansWifiChannel Class Reference

A Yans wifi channelThis wifi channel implements the propagation model described in "Yet Another Network Simulator", (http://cutebugs.net/files/wns2-yans.pdf). More...

#include <yans-wifi-channel.h>

Inheritance diagram for ns3::YansWifiChannel:
Collaboration diagram for ns3::YansWifiChannel:

List of all members.

Public Member Functions

virtual uint32_t GetNDevices (void) const
virtual Ptr< NetDeviceGetDevice (uint32_t i) const
void Add (Ptr< YansWifiPhy > phy)
void SetPropagationLossModel (Ptr< PropagationLossModel > loss)
void SetPropagationDelayModel (Ptr< PropagationDelayModel > delay)
void Send (Ptr< YansWifiPhy > sender, Ptr< const Packet > packet, double txPowerDbm, WifiMode wifiMode, WifiPreamble preamble) const

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::YansWifiChannel.

Detailed Description

A Yans wifi channel

This wifi channel implements the propagation model described in "Yet Another Network Simulator", (http://cutebugs.net/files/wns2-yans.pdf).

This class is expected to be used in tandem with the ns3::YansWifiPhy class and contains a ns3::PropagationLossModel and a ns3::PropagationDelayModel. By default, no propagation models are set so, it is the caller's responsability to set them before using the channel.


Member Function Documentation

Ptr< NetDevice > ns3::YansWifiChannel::GetDevice ( uint32_t  i) const [virtual]
Parameters:
iindex of NetDevice to retrieve
Returns:
one of the NetDevices connected to this channel.

This method must be implemented by subclasses.

Implements ns3::Channel.

uint32_t ns3::YansWifiChannel::GetNDevices ( void  ) const [virtual]
Returns:
the number of NetDevices connected to this Channel.

This method must be implemented by subclasses.

Implements ns3::Channel.

This method returns the TypeId associated to ns3::YansWifiChannel.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Channel/$ns3::WifiChannel/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Channel/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::WifiChannel/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::WifiChannel/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::WifiNetDevice/Channel/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Channel/$ns3::WifiChannel/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Channel/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::WifiChannel/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::WifiChannel/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::WifiNetDevice/Channel/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::YansWifiChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Channel/$ns3::YansWifiChannel

Attributes defined for this type:

Attributes defined in parent class ns3::Channel:

No TraceSources defined for this type.

Reimplemented from ns3::WifiChannel.

References ns3::TypeId::SetParent().

void ns3::YansWifiChannel::Send ( Ptr< YansWifiPhy sender,
Ptr< const Packet packet,
double  txPowerDbm,
WifiMode  wifiMode,
WifiPreamble  preamble 
) const
Parameters:
senderthe device from which the packet is originating.
packetthe packet to send
txPowerDbmthe tx power associated to the packet
wifiModethe tx mode associated to the packet
preamblethe preamble associated to the packet

This method should not be invoked by normal users. It is currently invoked only from WifiPhy::Send. YansWifiChannel delivers packets only between PHYs with the same m_channelNumber, e.g. PHYs that are operating on the same channel.

References ns3::PropagationLossModel::CalcRxPower(), ns3::Packet::Copy(), ns3::PropagationDelayModel::GetDelay(), ns3::MobilityModel::GetDistanceFrom(), ns3::Object::GetObject(), NS_ASSERT, NS_LOG_DEBUG, and ns3::Simulator::ScheduleWithContext().

Referenced by ns3::YansWifiPhy::SendPacket().

Parameters:
delaythe new propagation delay model.

Referenced by ns3::YansWifiChannelHelper::Create().

Parameters:
lossthe new propagation loss model.

Referenced by ns3::YansWifiChannelHelper::Create().


The documentation for this class was generated from the following files: