A Discrete-Event Network Simulator
API
mixed-wired-wireless.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License version 2 as
5  * published by the Free Software Foundation;
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15  *
16  */
17 
18 //
19 // This ns-3 example demonstrates the use of helper functions to ease
20 // the construction of simulation scenarios.
21 //
22 // The simulation topology consists of a mixed wired and wireless
23 // scenario in which a hierarchical mobility model is used.
24 //
25 // The simulation layout consists of N backbone routers interconnected
26 // by an ad hoc wifi network.
27 // Each backbone router also has a local 802.11 network and is connected
28 // to a local LAN. An additional set of (K-1) nodes are connected to
29 // this backbone. Finally, a local LAN is connected to each router
30 // on the backbone, with L-1 additional hosts.
31 //
32 // The nodes are populated with TCP/IP stacks, and OLSR unicast routing
33 // on the backbone. An example UDP transfer is shown. The simulator
34 // be configured to output tcpdumps or traces from different nodes.
35 //
36 //
37 // +--------------------------------------------------------+
38 // | |
39 // | 802.11 ad hoc, ns-2 mobility |
40 // | |
41 // +--------------------------------------------------------+
42 // | o o o (N backbone routers) |
43 // +--------+ +--------+
44 // wired LAN | mobile | wired LAN | mobile |
45 // -----------| router | -----------| router |
46 // --------- ---------
47 // | |
48 // +----------------+ +----------------+
49 // | 802.11 | | 802.11 |
50 // | infra net | | infra net |
51 // | K-1 hosts | | K-1 hosts |
52 // +----------------+ +----------------+
53 //
54 // We'll send data from the first wired LAN node on the first wired LAN
55 // to the last wireless STA on the last infrastructure net, thereby
56 // causing packets to traverse CSMA to adhoc to infrastructure links
57 //
58 // Note that certain mobility patterns may cause packet forwarding
59 // to fail (if nodes become disconnected)
60 
61 #include "ns3/command-line.h"
62 #include "ns3/string.h"
63 #include "ns3/yans-wifi-helper.h"
64 #include "ns3/ssid.h"
65 #include "ns3/mobility-helper.h"
66 #include "ns3/internet-stack-helper.h"
67 #include "ns3/ipv4-address-helper.h"
68 #include "ns3/on-off-helper.h"
69 #include "ns3/yans-wifi-channel.h"
70 #include "ns3/qos-txop.h"
71 #include "ns3/packet-sink-helper.h"
72 #include "ns3/olsr-helper.h"
73 #include "ns3/csma-helper.h"
74 #include "ns3/animation-interface.h"
75 
76 using namespace ns3;
77 
78 //
79 // Define logging keyword for this file
80 //
81 NS_LOG_COMPONENT_DEFINE ("MixedWireless");
82 
83 //
84 // This function will be used below as a trace sink, if the command-line
85 // argument or default value "useCourseChangeCallback" is set to true
86 //
87 static void
89 {
90  Vector position = model->GetPosition ();
91  std::cout << "CourseChange " << path << " x=" << position.x << ", y=" << position.y << ", z=" << position.z << std::endl;
92 }
93 
94 int
95 main (int argc, char *argv[])
96 {
97  //
98  // First, we declare and initialize a few local variables that control some
99  // simulation parameters.
100  //
101  uint32_t backboneNodes = 10;
102  uint32_t infraNodes = 2;
103  uint32_t lanNodes = 2;
104  uint32_t stopTime = 20;
105  bool useCourseChangeCallback = false;
106 
107  //
108  // Simulation defaults are typically set next, before command line
109  // arguments are parsed.
110  //
111  Config::SetDefault ("ns3::OnOffApplication::PacketSize", StringValue ("1472"));
112  Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("100kb/s"));
113 
114  //
115  // For convenience, we add the local variables to the command line argument
116  // system so that they can be overridden with flags such as
117  // "--backboneNodes=20"
118  //
119  CommandLine cmd (__FILE__);
120  cmd.AddValue ("backboneNodes", "number of backbone nodes", backboneNodes);
121  cmd.AddValue ("infraNodes", "number of leaf nodes", infraNodes);
122  cmd.AddValue ("lanNodes", "number of LAN nodes", lanNodes);
123  cmd.AddValue ("stopTime", "simulation stop time (seconds)", stopTime);
124  cmd.AddValue ("useCourseChangeCallback", "whether to enable course change tracing", useCourseChangeCallback);
125 
126  //
127  // The system global variables and the local values added to the argument
128  // system can be overridden by command line arguments by using this call.
129  //
130  cmd.Parse (argc, argv);
131 
132  if (stopTime < 10)
133  {
134  std::cout << "Use a simulation stop time >= 10 seconds" << std::endl;
135  exit (1);
136  }
138  // //
139  // Construct the backbone //
140  // //
142 
143  //
144  // Create a container to manage the nodes of the adhoc (backbone) network.
145  // Later we'll create the rest of the nodes we'll need.
146  //
147  NodeContainer backbone;
148  backbone.Create (backboneNodes);
149  //
150  // Create the backbone wifi net devices and install them into the nodes in
151  // our container
152  //
155  mac.SetType ("ns3::AdhocWifiMac");
156  wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
157  "DataMode", StringValue ("OfdmRate54Mbps"));
158  YansWifiPhyHelper wifiPhy;
161  wifiPhy.SetChannel (wifiChannel.Create ());
162  NetDeviceContainer backboneDevices = wifi.Install (wifiPhy, mac, backbone);
163 
164  // We enable OLSR (which will be consulted at a higher priority than
165  // the global routing) on the backbone ad hoc nodes
166  NS_LOG_INFO ("Enabling OLSR routing on all backbone nodes");
168  //
169  // Add the IPv4 protocol stack to the nodes in our container
170  //
171  InternetStackHelper internet;
172  internet.SetRoutingHelper (olsr); // has effect on the next Install ()
173  internet.Install (backbone);
174 
175  //
176  // Assign IPv4 addresses to the device drivers (actually to the associated
177  // IPv4 interfaces) we just created.
178  //
179  Ipv4AddressHelper ipAddrs;
180  ipAddrs.SetBase ("192.168.0.0", "255.255.255.0");
181  ipAddrs.Assign (backboneDevices);
182 
183  //
184  // The ad-hoc network nodes need a mobility model so we aggregate one to
185  // each of the nodes we just finished building.
186  //
188  mobility.SetPositionAllocator ("ns3::GridPositionAllocator",
189  "MinX", DoubleValue (20.0),
190  "MinY", DoubleValue (20.0),
191  "DeltaX", DoubleValue (20.0),
192  "DeltaY", DoubleValue (20.0),
193  "GridWidth", UintegerValue (5),
194  "LayoutType", StringValue ("RowFirst"));
195  mobility.SetMobilityModel ("ns3::RandomDirection2dMobilityModel",
196  "Bounds", RectangleValue (Rectangle (-500, 500, -500, 500)),
197  "Speed", StringValue ("ns3::ConstantRandomVariable[Constant=2]"),
198  "Pause", StringValue ("ns3::ConstantRandomVariable[Constant=0.2]"));
199  mobility.Install (backbone);
200 
202  // //
203  // Construct the LANs //
204  // //
206 
207  // Reset the address base-- all of the CSMA networks will be in
208  // the "172.16 address space
209  ipAddrs.SetBase ("172.16.0.0", "255.255.255.0");
210 
211 
212  for (uint32_t i = 0; i < backboneNodes; ++i)
213  {
214  NS_LOG_INFO ("Configuring local area network for backbone node " << i);
215  //
216  // Create a container to manage the nodes of the LAN. We need
217  // two containers here; one with all of the new nodes, and one
218  // with all of the nodes including new and existing nodes
219  //
220  NodeContainer newLanNodes;
221  newLanNodes.Create (lanNodes - 1);
222  // Now, create the container with all nodes on this link
223  NodeContainer lan (backbone.Get (i), newLanNodes);
224  //
225  // Create the CSMA net devices and install them into the nodes in our
226  // collection.
227  //
229  csma.SetChannelAttribute ("DataRate",
230  DataRateValue (DataRate (5000000)));
231  csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
232  NetDeviceContainer lanDevices = csma.Install (lan);
233  //
234  // Add the IPv4 protocol stack to the new LAN nodes
235  //
236  internet.Install (newLanNodes);
237  //
238  // Assign IPv4 addresses to the device drivers (actually to the
239  // associated IPv4 interfaces) we just created.
240  //
241  ipAddrs.Assign (lanDevices);
242  //
243  // Assign a new network prefix for the next LAN, according to the
244  // network mask initialized above
245  //
246  ipAddrs.NewNetwork ();
247  //
248  // The new LAN nodes need a mobility model so we aggregate one
249  // to each of the nodes we just finished building.
250  //
251  MobilityHelper mobilityLan;
252  Ptr<ListPositionAllocator> subnetAlloc =
253  CreateObject<ListPositionAllocator> ();
254  for (uint32_t j = 0; j < newLanNodes.GetN (); ++j)
255  {
256  subnetAlloc->Add (Vector (0.0, j * 10 + 10, 0.0));
257  }
258  mobilityLan.PushReferenceMobilityModel (backbone.Get (i));
259  mobilityLan.SetPositionAllocator (subnetAlloc);
260  mobilityLan.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
261  mobilityLan.Install (newLanNodes);
262  }
263 
265  // //
266  // Construct the mobile networks //
267  // //
269 
270  // Reset the address base-- all of the 802.11 networks will be in
271  // the "10.0" address space
272  ipAddrs.SetBase ("10.0.0.0", "255.255.255.0");
273 
274  for (uint32_t i = 0; i < backboneNodes; ++i)
275  {
276  NS_LOG_INFO ("Configuring wireless network for backbone node " << i);
277  //
278  // Create a container to manage the nodes of the LAN. We need
279  // two containers here; one with all of the new nodes, and one
280  // with all of the nodes including new and existing nodes
281  //
282  NodeContainer stas;
283  stas.Create (infraNodes - 1);
284  // Now, create the container with all nodes on this link
285  NodeContainer infra (backbone.Get (i), stas);
286  //
287  // Create an infrastructure network
288  //
289  WifiHelper wifiInfra;
290  WifiMacHelper macInfra;
291  wifiPhy.SetChannel (wifiChannel.Create ());
292  // Create unique ssids for these networks
293  std::string ssidString ("wifi-infra");
294  std::stringstream ss;
295  ss << i;
296  ssidString += ss.str ();
297  Ssid ssid = Ssid (ssidString);
298  wifiInfra.SetRemoteStationManager ("ns3::ArfWifiManager");
299  // setup stas
300  macInfra.SetType ("ns3::StaWifiMac",
301  "Ssid", SsidValue (ssid));
302  NetDeviceContainer staDevices = wifiInfra.Install (wifiPhy, macInfra, stas);
303  // setup ap.
304  macInfra.SetType ("ns3::ApWifiMac",
305  "Ssid", SsidValue (ssid));
306  NetDeviceContainer apDevices = wifiInfra.Install (wifiPhy, macInfra, backbone.Get (i));
307  // Collect all of these new devices
308  NetDeviceContainer infraDevices (apDevices, staDevices);
309 
310  // Add the IPv4 protocol stack to the nodes in our container
311  //
312  internet.Install (stas);
313  //
314  // Assign IPv4 addresses to the device drivers (actually to the associated
315  // IPv4 interfaces) we just created.
316  //
317  ipAddrs.Assign (infraDevices);
318  //
319  // Assign a new network prefix for each mobile network, according to
320  // the network mask initialized above
321  //
322  ipAddrs.NewNetwork ();
323  //
324  // The new wireless nodes need a mobility model so we aggregate one
325  // to each of the nodes we just finished building.
326  //
327  Ptr<ListPositionAllocator> subnetAlloc =
328  CreateObject<ListPositionAllocator> ();
329  for (uint32_t j = 0; j < infra.GetN (); ++j)
330  {
331  subnetAlloc->Add (Vector (0.0, j, 0.0));
332  }
333  mobility.PushReferenceMobilityModel (backbone.Get (i));
334  mobility.SetPositionAllocator (subnetAlloc);
335  mobility.SetMobilityModel ("ns3::RandomDirection2dMobilityModel",
336  "Bounds", RectangleValue (Rectangle (-10, 10, -10, 10)),
337  "Speed", StringValue ("ns3::ConstantRandomVariable[Constant=3]"),
338  "Pause", StringValue ("ns3::ConstantRandomVariable[Constant=0.4]"));
339  mobility.Install (stas);
340  }
341 
343  // //
344  // Application configuration //
345  // //
347 
348  // Create the OnOff application to send UDP datagrams of size
349  // 210 bytes at a rate of 10 Kb/s, between two nodes
350  // We'll send data from the first wired LAN node on the first wired LAN
351  // to the last wireless STA on the last infrastructure net, thereby
352  // causing packets to traverse CSMA to adhoc to infrastructure links
353 
354  NS_LOG_INFO ("Create Applications.");
355  uint16_t port = 9; // Discard port (RFC 863)
356 
357  // Let's make sure that the user does not define too few nodes
358  // to make this example work. We need lanNodes > 1 and infraNodes > 1
359  NS_ASSERT (lanNodes > 1 && infraNodes > 1);
360  // We want the source to be the first node created outside of the backbone
361  // Conveniently, the variable "backboneNodes" holds this node index value
362  Ptr<Node> appSource = NodeList::GetNode (backboneNodes);
363  // We want the sink to be the last node created in the topology.
364  uint32_t lastNodeIndex = backboneNodes + backboneNodes * (lanNodes - 1) + backboneNodes * (infraNodes - 1) - 1;
365  Ptr<Node> appSink = NodeList::GetNode (lastNodeIndex);
366  // Let's fetch the IP address of the last node, which is on Ipv4Interface 1
367  Ipv4Address remoteAddr = appSink->GetObject<Ipv4> ()->GetAddress (1, 0).GetLocal ();
368 
369  OnOffHelper onoff ("ns3::UdpSocketFactory",
370  Address (InetSocketAddress (remoteAddr, port)));
371 
372  ApplicationContainer apps = onoff.Install (appSource);
373  apps.Start (Seconds (3));
374  apps.Stop (Seconds (stopTime - 1));
375 
376  // Create a packet sink to receive these packets
377  PacketSinkHelper sink ("ns3::UdpSocketFactory",
379  apps = sink.Install (appSink);
380  apps.Start (Seconds (3));
381 
383  // //
384  // Tracing configuration //
385  // //
387 
388  NS_LOG_INFO ("Configure Tracing.");
390 
391  //
392  // Let's set up some ns-2-like ascii traces, using another helper class
393  //
394  AsciiTraceHelper ascii;
395  Ptr<OutputStreamWrapper> stream = ascii.CreateFileStream ("mixed-wireless.tr");
396  wifiPhy.EnableAsciiAll (stream);
397  csma.EnableAsciiAll (stream);
398  internet.EnableAsciiIpv4All (stream);
399 
400  // Csma captures in non-promiscuous mode
401  csma.EnablePcapAll ("mixed-wireless", false);
402  // pcap captures on the backbone wifi devices
403  wifiPhy.EnablePcap ("mixed-wireless", backboneDevices, false);
404  // pcap trace on the application data sink
405  wifiPhy.EnablePcap ("mixed-wireless", appSink->GetId (), 0);
406 
407  if (useCourseChangeCallback == true)
408  {
409  Config::Connect ("/NodeList/*/$ns3::MobilityModel/CourseChange", MakeCallback (&CourseChangeCallback));
410  }
411 
412  AnimationInterface anim ("mixed-wireless.xml");
413 
415  // //
416  // Run simulation //
417  // //
419 
420  NS_LOG_INFO ("Run Simulation.");
422  Simulator::Run ();
424 }
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition: net-device-container.h:42
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::InetSocketAddress
an Inet address class
Definition: inet-socket-address.h:41
ns3::DataRateValue
AttributeValue implementation for DataRate.
Definition: data-rate.h:298
ns3::YansWifiChannelHelper::Default
static YansWifiChannelHelper Default(void)
Create a channel helper in a default working state.
Definition: yans-wifi-helper.cc:41
ns3::YansWifiPhyHelper
Make it easy to create and manage PHY objects for the YANS model.
Definition: yans-wifi-helper.h:161
ns3::CommandLine
Parse command-line arguments.
Definition: command-line.h:228
ns3::AsciiTraceHelperForDevice::EnableAsciiAll
void EnableAsciiAll(std::string prefix)
Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes c...
Definition: trace-helper.cc:586
ns3::ListPositionAllocator::Add
void Add(Vector v)
Add a position to the list of positions.
Definition: position-allocator.cc:70
stopTime
Time stopTime
Definition: tcp-linux-reno.cc:52
third.staDevices
staDevices
Definition: third.py:103
NS_ASSERT
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:67
ns3::PcapHelperForDevice::EnablePcap
void EnablePcap(std::string prefix, Ptr< NetDevice > nd, bool promiscuous=false, bool explicitFilename=false)
Enable pcap output the indicated net device.
Definition: trace-helper.cc:401
ns3::Ipv4AddressHelper::NewNetwork
Ipv4Address NewNetwork(void)
Increment the network number and reset the IP address counter to the base value provided in the SetBa...
Definition: ipv4-address-helper.cc:126
ns3::Node::GetId
uint32_t GetId(void) const
Definition: node.cc:109
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::ApplicationContainer::Stop
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter.
Definition: application-container.cc:107
ns3::WifiHelper
helps to create WifiNetDevice objects
Definition: wifi-helper.h:327
ns3::Ipv4AddressHelper
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Definition: ipv4-address-helper.h:48
ns3::MobilityHelper::SetMobilityModel
void SetMobilityModel(std::string type, 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(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
Definition: mobility-helper.cc:79
ns3::MobilityHelper::Install
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
Definition: mobility-helper.cc:130
ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4All
void EnableAsciiIpv4All(std::string prefix)
Enable ascii trace output on all Ipv4 and interface pairs existing in the set of all nodes created in...
Definition: internet-trace-helper.cc:234
ns3::Object::GetObject
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:470
ns3::RectangleValue
AttributeValue implementation for Rectangle.
Definition: rectangle.h:97
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:41
ns3::NodeContainer::GetN
uint32_t GetN(void) const
Get the number of Ptr<Node> stored in this container.
Definition: node-container.cc:88
ns3::AnimationInterface
Interface to network animator.
Definition: animation-interface.h:76
ns3::WifiPhyHelper::DLT_IEEE802_11_RADIO
@ DLT_IEEE802_11_RADIO
Include Radiotap link layer information.
Definition: wifi-helper.h:180
third.mac
mac
Definition: third.py:99
ns3::YansWifiPhyHelper::SetChannel
void SetChannel(Ptr< YansWifiChannel > channel)
Definition: yans-wifi-helper.cc:134
ns3::DoubleValue
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:41
ns3::NodeContainer::Create
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Definition: node-container.cc:98
ns3::SsidValue
AttributeValue implementation for Ssid.
Definition: ssid.h:105
ns3::CsmaHelper
build a set of CsmaNetDevice objects
Definition: csma-helper.h:47
ns3::Ssid
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:36
ns3::MobilityHelper::PushReferenceMobilityModel
void PushReferenceMobilityModel(Ptr< Object > reference)
Definition: mobility-helper.cc:103
third.apDevices
apDevices
Definition: third.py:106
ns3::Ipv4AddressHelper::SetBase
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Definition: ipv4-address-helper.cc:64
ns3::Ipv4
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:77
third.wifi
wifi
Definition: third.py:96
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::DataRate
Class for representing data rates.
Definition: data-rate.h:89
ns3::YansWifiChannelHelper::Create
Ptr< YansWifiChannel > Create(void) const
Definition: yans-wifi-helper.cc:98
ns3::OlsrHelper
Helper class that adds OLSR routing to nodes.
Definition: olsr-helper.h:41
ns3::Simulator::Stop
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
Definition: simulator.cc:180
ns3::MobilityHelper::SetPositionAllocator
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
Definition: mobility-helper.cc:47
ns3::Address
a polymophic address class
Definition: address.h:91
ns3::InternetStackHelper::Install
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
Definition: internet-stack-helper.cc:366
ns3::OnOffHelper
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
Definition: on-off-helper.h:43
NS_LOG_INFO
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:281
ns3::AsciiTraceHelper::CreateFileStream
Ptr< OutputStreamWrapper > CreateFileStream(std::string filename, std::ios::openmode filemode=std::ios::out)
Create and initialize an output stream object we'll use to write the traced bits.
Definition: trace-helper.cc:191
ns3::MilliSeconds
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1297
ns3::NodeContainer::Get
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Definition: node-container.cc:93
second.cmd
cmd
Definition: second.py:35
ns3::Rectangle
a 2d rectangle
Definition: rectangle.h:35
sink
Ptr< PacketSink > sink
Definition: wifi-tcp.cc:56
ns3::MakeCallback
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:1642
ns3::Simulator::Run
static void Run(void)
Run the simulation.
Definition: simulator.cc:172
ns3::WifiHelper::SetRemoteStationManager
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())
Definition: wifi-helper.cc:721
ns3::StringValue
Hold variables of type string.
Definition: string.h:41
ns3::PacketSinkHelper
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
Definition: packet-sink-helper.h:36
ns3::AsciiTraceHelper
Manage ASCII trace files for device models.
Definition: trace-helper.h:163
ns3::WifiPhyHelper::SetPcapDataLinkType
void SetPcapDataLinkType(SupportedPcapDataLinkTypes dlt)
Set the data link type of PCAP traces to be used.
Definition: wifi-helper.cc:573
ns3::Config::Connect
void Connect(std::string path, const CallbackBase &cb)
Definition: config.cc:920
ns3::Ipv4Address::GetAny
static Ipv4Address GetAny(void)
Definition: ipv4-address.cc:395
ns3::ApplicationContainer::Start
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter.
Definition: application-container.cc:87
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
ns3::InternetStackHelper::SetRoutingHelper
void SetRoutingHelper(const Ipv4RoutingHelper &routing)
Definition: internet-stack-helper.cc:175
ns3::Ipv4AddressHelper::Assign
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Definition: ipv4-address-helper.cc:135
ns3::Simulator::Destroy
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:136
ns3::ApplicationContainer
holds a vector of ns3::Application pointers.
Definition: application-container.h:43
third.ssid
ssid
Definition: third.py:100
ns3::TimeValue
AttributeValue implementation for Time.
Definition: nstime.h:1353
ns3::NodeContainer
keep track of a set of node pointers.
Definition: node-container.h:39
ns3::WifiMacHelper::SetType
void SetType(std::string type, Args &&... args)
Definition: wifi-mac-helper.h:130
olsr
Definition: olsr.py:1
ns3::UintegerValue
Hold an unsigned integer type.
Definition: uinteger.h:44
CourseChangeCallback
static void CourseChangeCallback(std::string path, Ptr< const MobilityModel > model)
Definition: mixed-wired-wireless.cc:88
ns3::YansWifiChannelHelper
manage and create wifi channel objects for the YANS model.
Definition: yans-wifi-helper.h:37
ns3::WifiMacHelper
create MAC layers for a ns3::WifiNetDevice.
Definition: wifi-mac-helper.h:48
ns3::Config::SetDefault
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:849
ns3::InternetStackHelper
aggregate IP/TCP/UDP functionality to existing Nodes.
Definition: internet-stack-helper.h:88
ns3::MobilityModel::GetPosition
Vector GetPosition(void) const
Definition: mobility-model.cc:64
second.csma
csma
Definition: second.py:63
ns3::NodeList::GetNode
static Ptr< Node > GetNode(uint32_t n)
Definition: node-list.cc:241
ns3::MobilityHelper
Helper class used to assign positions and mobility models to nodes.
Definition: mobility-helper.h:43
third.mobility
mobility
Definition: third.py:108
port
uint16_t port
Definition: dsdv-manet.cc:45
ns3::WifiHelper::Install
virtual NetDeviceContainer Install(const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer::Iterator first, NodeContainer::Iterator last) const
Definition: wifi-helper.cc:779