72 #include "ns3/core-module.h"
73 #include "ns3/network-module.h"
74 #include "ns3/mobility-module.h"
75 #include "ns3/wifi-module.h"
76 #include "ns3/tap-bridge-module.h"
83 main (
int argc,
char *argv[])
86 cmd.Parse (argc, argv);
109 wifi.SetRemoteStationManager (
"ns3::ConstantRateWifiManager",
"DataMode",
StringValue (
"OfdmRate54Mbps"));
115 wifiMac.
SetType (
"ns3::AdhocWifiMac");
135 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
136 positionAlloc->Add (Vector (5.0, 0.0, 0.0));
137 mobility.SetPositionAllocator (positionAlloc);
138 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
AttributeValue implementation for Boolean.
Parse command-line arguments.
static void Bind(std::string name, const AttributeValue &value)
Iterate over the set of GlobalValues until a matching name is found and then set its value with Globa...
Helper class used to assign positions and mobility models to nodes.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
Smart pointer class similar to boost::intrusive_ptr.
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
static void Run(void)
Run the simulation.
Hold variables of type string.
build TapBridge to allow ns-3 simulations to interact with Linux tap devices and processes on the Lin...
Ptr< NetDevice > Install(Ptr< Node > node, Ptr< NetDevice > nd)
This method installs a TapBridge on the specified Node and forms the bridge with the NetDevice specif...
void SetAttribute(std::string n1, const AttributeValue &v1)
Set an attribute in the underlying TapBridge net device when these devices are automatically created.
helps to create WifiNetDevice objects
create MAC layers for a ns3::WifiNetDevice.
void SetType(std::string type, Args &&... args)
manage and create wifi channel objects for the YANS model.
Ptr< YansWifiChannel > Create(void) const
static YansWifiChannelHelper Default(void)
Create a channel helper in a default working state.
Make it easy to create and manage PHY objects for the YANS model.
void SetChannel(Ptr< YansWifiChannel > channel)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.