A Yans wifi channel. More...
#include <yans-wifi-channel.h>
Public Member Functions | |
YansWifiChannel () | |
virtual | ~YansWifiChannel () |
virtual uint32_t | GetNDevices (void) const |
virtual Ptr< NetDevice > | GetDevice (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::WifiChannel. | |
Private Types | |
typedef std::vector< Ptr < YansWifiPhy > > | PhyList |
Private Member Functions | |
void | Receive (uint32_t i, Ptr< Packet > packet, double rxPowerDbm, WifiMode txMode, WifiPreamble preamble) const |
Private Attributes | |
PhyList | m_phyList |
Ptr< PropagationLossModel > | m_loss |
Ptr< PropagationDelayModel > | m_delay |
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.
Definition at line 48 of file yans-wifi-channel.h.
typedef std::vector<Ptr<YansWifiPhy> > ns3::YansWifiChannel::PhyList [private] |
Definition at line 85 of file yans-wifi-channel.h.
ns3::YansWifiChannel::YansWifiChannel | ( | ) |
Definition at line 55 of file yans-wifi-channel.cc.
ns3::YansWifiChannel::~YansWifiChannel | ( | ) | [virtual] |
Definition at line 57 of file yans-wifi-channel.cc.
References m_phyList.
void ns3::YansWifiChannel::Add | ( | Ptr< YansWifiPhy > | phy | ) |
Definition at line 116 of file yans-wifi-channel.cc.
References m_phyList.
i | index of NetDevice to retrieve |
This method must be implemented by subclasses.
Implements ns3::Channel.
Definition at line 110 of file yans-wifi-channel.cc.
References m_phyList.
uint32_t ns3::YansWifiChannel::GetNDevices | ( | void | ) | const [virtual] |
This method must be implemented by subclasses.
Implements ns3::Channel.
Definition at line 105 of file yans-wifi-channel.cc.
References m_phyList.
TypeId ns3::YansWifiChannel::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::WifiChannel.
/*! /*! /*! /*! /*!
This object is accessible through the following paths with Config::Set and Config::Connect:
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::WifiChannel.
Definition at line 38 of file yans-wifi-channel.cc.
References ns3::TypeId::AddAttribute(), m_delay, m_loss, and ns3::TypeId::SetParent().
void ns3::YansWifiChannel::Receive | ( | uint32_t | i, | |
Ptr< Packet > | packet, | |||
double | rxPowerDbm, | |||
WifiMode | txMode, | |||
WifiPreamble | preamble | |||
) | const [private] |
void ns3::YansWifiChannel::Send | ( | Ptr< YansWifiPhy > | sender, | |
Ptr< const Packet > | packet, | |||
double | txPowerDbm, | |||
WifiMode | wifiMode, | |||
WifiPreamble | preamble | |||
) | const |
sender | the device from which the packet is originating. | |
packet | the packet to send | |
txPowerDbm | the tx power associated to the packet | |
wifiMode | the tx mode associated to the packet | |
preamble | the preamble associated to the packet |
This method should not be invoked by normal users. It is currently invoked only from WifiPhy::Send.
Definition at line 74 of file yans-wifi-channel.cc.
References m_delay, m_loss, m_phyList, NS_ASSERT, NS_LOG_DEBUG, Receive(), and ns3::Simulator::Schedule().
void ns3::YansWifiChannel::SetPropagationDelayModel | ( | Ptr< PropagationDelayModel > | delay | ) |
delay | the new propagation delay model. |
Definition at line 68 of file yans-wifi-channel.cc.
References m_delay.
void ns3::YansWifiChannel::SetPropagationLossModel | ( | Ptr< PropagationLossModel > | loss | ) |
loss | the new propagation loss model. |
Definition at line 63 of file yans-wifi-channel.cc.
References m_loss.
Definition at line 92 of file yans-wifi-channel.h.
Referenced by GetTypeId(), Send(), and SetPropagationDelayModel().
Ptr<PropagationLossModel> ns3::YansWifiChannel::m_loss [private] |
Definition at line 91 of file yans-wifi-channel.h.
Referenced by GetTypeId(), Send(), and SetPropagationLossModel().
PhyList ns3::YansWifiChannel::m_phyList [private] |
Definition at line 90 of file yans-wifi-channel.h.
Referenced by Add(), GetDevice(), GetNDevices(), Receive(), Send(), and ~YansWifiChannel().