|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #include "ns3/abort.h"
23 #include "ns3/simulator.h"
24 #include "ns3/object-factory.h"
25 #include "ns3/queue.h"
26 #include "ns3/net-device-queue-interface.h"
27 #include "ns3/simple-net-device.h"
28 #include "ns3/simple-channel.h"
29 #include "ns3/config.h"
30 #include "ns3/packet.h"
31 #include "ns3/names.h"
32 #include "ns3/boolean.h"
34 #include "ns3/trace-helper.h"
142 device->SetQueue (queue);
146 ndqi->GetTxQueue (0)->ConnectQueueTraces (queue);
147 device->AggregateObject (ndqi);
holds a vector of ns3::NetDevice pointers
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
ObjectFactory m_deviceFactory
NetDevice factory.
AttributeValue implementation for Boolean.
void SetQueue(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())
Each net device must have a queue to pass packets through.
void SetChannel(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())
Each net device must have a channel to pass packets through.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Hold a value for an Attribute.
static void AppendItemTypeIfNotPresent(std::string &typeId, const std::string &itemType)
Append the item type to the provided type ID if the latter does not end with '>'.
ObjectFactory m_channelFactory
Channel factory.
void SetChannelAttribute(std::string n1, const AttributeValue &v1)
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
static Mac48Address Allocate(void)
Allocate a new Mac48Address.
SimpleNetDeviceHelper()
Construct a SimpleNetDeviceHelper.
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
NetDeviceContainer Install(Ptr< Node > node) const
This method creates an ns3::SimpleChannel with the attributes configured by SimpleNetDeviceHelper::Se...
This device assumes 48-bit mac addressing; there is also the possibility to add an ErrorModel if you ...
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
ObjectFactory m_queueFactory
Queue factory.
A simple channel, for simple things and testing.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
Ptr< NetDevice > InstallPriv(Ptr< Node > node, Ptr< SimpleChannel > channel) const
This method creates an ns3::SimpleNetDevice with the attributes configured by SimpleNetDeviceHelper::...
keep track of a set of node pointers.
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
bool m_pointToPointMode
Install PointToPoint SimpleNetDevice or Broadcast ones.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
void SetNetDevicePointToPointMode(bool pointToPointMode)
SimpleNetDevice is Broadcast capable and ARP needing.