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");
void SetAttribute(std::string n1, const AttributeValue &v1)
Set an attribute in the underlying TapBridge net device when these devices are automatically created...
Smart pointer class similar to boost::intrusive_ptr.
AttributeValue implementation for Boolean.
Hold variables of type string.
Make it easy to create and manage PHY objects for the YANS model.
static YansWifiChannelHelper Default(void)
Create a channel helper in a default working state.
static void Run(void)
Run the simulation.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
static YansWifiPhyHelper Default(void)
Create a PHY helper in a default working state.
helps to create WifiNetDevice objects
Ptr< YansWifiChannel > Create(void) const
void SetChannel(Ptr< YansWifiChannel > channel)
holds a vector of ns3::NetDevice pointers
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...
Parse command-line arguments.
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
OFDM PHY for the 5 GHz band (Clause 17)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
manage and create wifi channel objects for the YANS model.
create MAC layers for a ns3::WifiNetDevice.
virtual void SetType(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(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue())
Helper class used to assign positions and mobility models to nodes.
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...
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
Time Seconds(double value)
Construct a Time in the indicated unit.
void Add(Vector v)
Add a position to the list of positions.
build TapBridge to allow ns-3 simulations to interact with Linux tap devices and processes on the Lin...