22 #include "ns3/simulator.h"
23 #include "ns3/mesh-point-device.h"
24 #include "ns3/wifi-net-device.h"
25 #include "ns3/minstrel-wifi-manager.h"
26 #include "ns3/mesh-wifi-interface-mac.h"
31 m_spreadChannelPolicy (ZERO_CHANNEL),
102 mp->AddInterface (iface);
104 if (!
m_stack->InstallStack (mp))
177 mac->SetSsid (
Ssid ());
184 device->SetMac (mac);
185 device->SetPhy (phy);
186 device->SetRemoteStationManager (manager);
188 mac->SwitchFrequencyChannel (channelId);
197 std::vector<Ptr<NetDevice> > ifaces = mp->GetInterfaces ();
201 os <<
"</MeshPointDevice>\n";
214 int64_t currentStream = stream;
225 std::vector<Ptr<NetDevice> > ifaces = mpd->GetInterfaces ();
226 for (std::vector<
Ptr<NetDevice> >::iterator i = ifaces.begin (); i != ifaces.end (); i++)
228 wifi = DynamicCast<WifiNetDevice> (*i);
231 currentStream += wifi->GetPhy ()->AssignStreams (currentStream);
238 currentStream += minstrel->AssignStreams (currentStream);
241 mac = DynamicCast<MeshWifiInterfaceMac> (wifi->GetMac ());
244 currentStream += mac->AssignStreams (currentStream);
249 return (currentStream - stream);
Iterator Begin(void) const
Get an iterator which refers to the first NetDevice in the container.
virtual void ConfigureStandard(enum WifiPhyStandard standard)=0
std::vector< Ptr< Node > >::const_iterator Iterator
Hold a value for an Attribute.
void SetRemoteStationManager(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
ChannelPolicy m_spreadChannelPolicy
#define NS_ASSERT(condition)
void SetTypeId(TypeId tid)
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
Ptr< WifiNetDevice > CreateInterface(const WifiPhyHelper &phyHelper, Ptr< Node > node, uint16_t channelId) const
void Report(const ns3::Ptr< ns3::NetDevice > &, std::ostream &)
Print statistics.
void SetNumberOfInterfaces(uint32_t nInterfaces)
Set a number of interfaces in a mesh network.
Prototype for class, which helps to install MAC-layer routing stack to ns3::MeshPointDevice.
#define NS_FATAL_ERROR(msg)
fatal error handling
double GetSeconds(void) const
static Mac48Address Allocate(void)
Ptr< Object > Create(void) const
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
holds a vector of ns3::NetDevice pointers
ObjectFactory m_stackFactory
hold a list of per-remote-station state.
void SetMacType(std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
static Mac48Address ConvertFrom(const Address &address)
ChannelPolicy
Spread/not spread frequency channels of MP interfaces.
keep track of a set of node pointers.
ObjectFactory m_stationManager
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
void Set(std::string name, const AttributeValue &value)
virtual Ptr< WifiPhy > Create(Ptr< Node > node, Ptr< WifiNetDevice > device) const =0
void SetSpreadInterfaceChannels(ChannelPolicy)
set the channel policy
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
void SetStackInstaller(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
void ResetStats(const ns3::Ptr< ns3::NetDevice > &)
Reset statistics.
Virtual net device modeling mesh point.
void SetStandard(enum WifiPhyStandard standard)
instantiate subclasses of ns3::Object.
uint32_t AddDevice(Ptr< NetDevice > device)
NetDeviceContainer Install(const WifiPhyHelper &phyHelper, NodeContainer c) const
Install 802.11s mesh device & protocols on given node list.
std::vector< Ptr< NetDevice > >::const_iterator Iterator
static MeshHelper Default()
Set the helper to the default values for the MAC type, remote station manager and channel policy...
Helper to create IEEE 802.11s mesh networks.
enum WifiPhyStandard m_standard
Iterator End(void) const
Get an iterator which indicates past-the-last NetDevice in the container.
Ptr< T > GetObject(void) const
Basic MAC of mesh point Wi-Fi interface. Its function is extendable through plugins mechanism...