Hello.
I am new to ns-3, and I am beginning with a simple simulation of
wireless network with on access point and one station. My goal is to
simulate network performance using 802.11g, 802.11n, and 802.11e
protocols with different parameters and channel conditions.
I have started by following the tutorial, in particular the section on
building a wireless network topology (
http://www.nsnam.org/docs/
release/3.10/tutorial/singlehtml/index.html#building-a-wireless-
network-topology). I am modifying third.cc to setup UDP echo server
and client applications on the ap and sta respectively. My root
problem is accessing the IP address of the interface connected to the
STA node, when I call the UdpEchoClientHelper constructor.
The example code in the tutorial does this by accessing one of the
elements in an Ipv4InterfaceContainer:
Ipv4InterfaceContainer csmaInterfaces;
csmaInterfaces = address.Assign (csmaDevices);
...
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma),
9);
Is there a way that I can access the members of the devices and
interfaces that have been installed on a node? I am wondering if there
is a way to do it without keeping a container class for all the things
installed on a node. What I understand from the documentation is that
installing these things on a node is called 'aggregation', and that
aggregated objects can be accessed through a query interface, but I
don't understand how to use the query interface. The documentation on
the query interface that I could find was reasonably brief (http://
www.nsnam.org/docs/architecture.bak2/node11.html)
In the larger scheme of things I am trying to understand intended
usage patterns for the classes in creating simulations, and what are
'best practice' workflows.
Thanks for your help,
Tim