23#include "ns3/boolean.h"
24#include "ns3/config.h"
27#include "ns3/net-device-queue-interface.h"
28#include "ns3/object-factory.h"
29#include "ns3/packet.h"
30#include "ns3/simple-channel.h"
31#include "ns3/simple-net-device.h"
32#include "ns3/simulator.h"
33#include "ns3/trace-helper.h"
115 node->AddDevice(device);
116 device->SetChannel(channel);
118 device->SetQueue(queue);
120 "Device set to PointToPoint and more than 2 devices on the channel.");
125 ndqi->GetTxQueue(0)->ConnectQueueTraces(queue);
126 device->AggregateObject(ndqi);
Hold a value for an Attribute.
AttributeValue implementation for Boolean.
static Mac48Address Allocate()
Allocate a new Mac48Address.
holds a vector of ns3::NetDevice pointers
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
keep track of a set of node pointers.
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
Iterator End() const
Get an iterator which indicates past-the-last Node in the container.
Iterator Begin() const
Get an iterator which refers to the first Node in the container.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Smart pointer class similar to boost::intrusive_ptr.
Template class for packet Queues.
A simple channel, for simple things and testing.
bool m_enableFlowControl
whether to enable flow control
Ptr< NetDevice > InstallPriv(Ptr< Node > node, Ptr< SimpleChannel > channel) const
This method creates an ns3::SimpleNetDevice with the attributes configured by SimpleNetDeviceHelper::...
ObjectFactory m_deviceFactory
NetDevice factory.
void SetChannelAttribute(std::string n1, const AttributeValue &v1)
ObjectFactory m_channelFactory
Channel factory.
ObjectFactory m_queueFactory
Queue factory.
void SetNetDevicePointToPointMode(bool pointToPointMode)
SimpleNetDevice is Broadcast capable and ARP needing.
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
SimpleNetDeviceHelper()
Construct a SimpleNetDeviceHelper.
void DisableFlowControl()
Disable flow control only if you know what you are doing.
NetDeviceContainer Install(Ptr< Node > node) const
This method creates an ns3::SimpleChannel with the attributes configured by SimpleNetDeviceHelper::Se...
bool m_pointToPointMode
Install PointToPoint SimpleNetDevice or Broadcast ones.
This device assumes 48-bit mac addressing; there is also the possibility to add an ErrorModel if you ...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Every class exported by the ns3 library is enclosed in the ns3 namespace.