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"
83main (
int argc,
char *argv[])
86 cmd.Parse (argc, argv);
93 GlobalValue::Bind (
"SimulatorImplementationType",
StringValue (
"ns3::RealtimeSimulatorImpl"));
94 GlobalValue::Bind (
"ChecksumEnabled",
BooleanValue (
true));
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");
164 Simulator::Stop (
Seconds (600.));
166 Simulator::Destroy ();
AttributeValue implementation for Boolean.
Parse command-line arguments.
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.
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.
Vector3D Vector
Vector alias typedef for compatibility with mobility models.
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
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.