A Discrete-Event Network Simulator
API
ns3::TrafficControlHelper Class Reference

Build a set of QueueDisc objects. More...

#include "traffic-control-helper.h"

+ Collaboration diagram for ns3::TrafficControlHelper:

Public Types

typedef std::vector< uint16_t > ClassIdList
 Container type for Class IDs. More...
 
typedef std::vector< uint16_t > HandleList
 Container type for Handlers. More...
 

Public Member Functions

 TrafficControlHelper ()
 Create a TrafficControlHelper to make life easier when creating QueueDisc objects. More...
 
virtual ~TrafficControlHelper ()
 
uint16_t AddChildQueueDisc (uint16_t handle, uint16_t classId, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue(), std::string n09="", const AttributeValue &v09=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue(), std::string n11="", const AttributeValue &v11=EmptyAttributeValue(), std::string n12="", const AttributeValue &v12=EmptyAttributeValue(), std::string n13="", const AttributeValue &v13=EmptyAttributeValue(), std::string n14="", const AttributeValue &v14=EmptyAttributeValue(), std::string n15="", const AttributeValue &v15=EmptyAttributeValue())
 Helper function used to attach a child queue disc (of the given type and with the given attributes) to a given class (included in the queue disc having the given handle). More...
 
HandleList AddChildQueueDiscs (uint16_t handle, const ClassIdList &classes, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue(), std::string n09="", const AttributeValue &v09=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue(), std::string n11="", const AttributeValue &v11=EmptyAttributeValue(), std::string n12="", const AttributeValue &v12=EmptyAttributeValue(), std::string n13="", const AttributeValue &v13=EmptyAttributeValue(), std::string n14="", const AttributeValue &v14=EmptyAttributeValue(), std::string n15="", const AttributeValue &v15=EmptyAttributeValue())
 Helper function used to attach a child queue disc (of the given type and with the given attributes) to each of the given classes (included in the queue disc having the given handle). More...
 
void AddInternalQueues (uint16_t handle, uint16_t count, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue())
 Helper function used to add the given number of internal queues (of the given type and with the given attributes) to the queue disc having the given handle. More...
 
void AddPacketFilter (uint16_t handle, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue())
 Helper function used to add a packet filter (of the given type and with the given attributes) to the queue disc having the given handle. More...
 
ClassIdList AddQueueDiscClasses (uint16_t handle, uint16_t count, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue())
 Helper function used to add the given number of queue disc classes (of the given type and with the given attributes) to the queue disc having the given handle. More...
 
QueueDiscContainer Install (NetDeviceContainer c)
 
QueueDiscContainer Install (Ptr< NetDevice > d)
 
void SetQueueLimits (std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue())
 Helper function used to add a queue limits object to the transmission queues of the devices. More...
 
uint16_t SetRootQueueDisc (std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue(), std::string n09="", const AttributeValue &v09=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue(), std::string n11="", const AttributeValue &v11=EmptyAttributeValue(), std::string n12="", const AttributeValue &v12=EmptyAttributeValue(), std::string n13="", const AttributeValue &v13=EmptyAttributeValue(), std::string n14="", const AttributeValue &v14=EmptyAttributeValue(), std::string n15="", const AttributeValue &v15=EmptyAttributeValue())
 Helper function used to set a root queue disc of the given type and with the given attributes. More...
 
void Uninstall (NetDeviceContainer c)
 
void Uninstall (Ptr< NetDevice > d)
 

Static Public Member Functions

static TrafficControlHelper Default (std::size_t nTxQueues=1)
 

Private Attributes

std::vector< QueueDiscFactorym_queueDiscFactory
 QueueDisc factory, stores the configuration of all the queue discs. More...
 
std::vector< Ptr< QueueDisc > > m_queueDiscs
 Vector of all the created queue discs. More...
 
ObjectFactory m_queueLimitsFactory
 Factory to create a queue limits object. More...
 

Detailed Description

Build a set of QueueDisc objects.

This class can help to create QueueDisc objects and map them to the corresponding devices. This map is stored at the Traffic Control layer.

Definition at line 118 of file traffic-control-helper.h.

Member Typedef Documentation

◆ ClassIdList

typedef std::vector<uint16_t> ns3::TrafficControlHelper::ClassIdList

Container type for Class IDs.

Definition at line 262 of file traffic-control-helper.h.

◆ HandleList

typedef std::vector<uint16_t> ns3::TrafficControlHelper::HandleList

Container type for Handlers.

Definition at line 359 of file traffic-control-helper.h.

Constructor & Destructor Documentation

◆ TrafficControlHelper()

ns3::TrafficControlHelper::TrafficControlHelper ( )

Create a TrafficControlHelper to make life easier when creating QueueDisc objects.

Definition at line 106 of file traffic-control-helper.cc.

◆ ~TrafficControlHelper()

virtual ns3::TrafficControlHelper::~TrafficControlHelper ( )
inlinevirtual

Definition at line 126 of file traffic-control-helper.h.

Member Function Documentation

◆ AddChildQueueDisc()

uint16_t ns3::TrafficControlHelper::AddChildQueueDisc ( uint16_t  handle,
uint16_t  classId,
std::string  type,
std::string  n01 = "",
const AttributeValue v01 = EmptyAttributeValue (),
std::string  n02 = "",
const AttributeValue v02 = EmptyAttributeValue (),
std::string  n03 = "",
const AttributeValue v03 = EmptyAttributeValue (),
std::string  n04 = "",
const AttributeValue v04 = EmptyAttributeValue (),
std::string  n05 = "",
const AttributeValue v05 = EmptyAttributeValue (),
std::string  n06 = "",
const AttributeValue v06 = EmptyAttributeValue (),
std::string  n07 = "",
const AttributeValue v07 = EmptyAttributeValue (),
std::string  n08 = "",
const AttributeValue v08 = EmptyAttributeValue (),
std::string  n09 = "",
const AttributeValue v09 = EmptyAttributeValue (),
std::string  n10 = "",
const AttributeValue v10 = EmptyAttributeValue (),
std::string  n11 = "",
const AttributeValue v11 = EmptyAttributeValue (),
std::string  n12 = "",
const AttributeValue v12 = EmptyAttributeValue (),
std::string  n13 = "",
const AttributeValue v13 = EmptyAttributeValue (),
std::string  n14 = "",
const AttributeValue v14 = EmptyAttributeValue (),
std::string  n15 = "",
const AttributeValue v15 = EmptyAttributeValue () 
)

Helper function used to attach a child queue disc (of the given type and with the given attributes) to a given class (included in the queue disc having the given handle).

Parameters
handlethe handle of the parent queue disc
classIdthe class ID of the class to attach the queue disc to
typethe type of queue disc
n01the name of the attribute to set on the queue disc
v01the value of the attribute to set on the queue disc
n02the name of the attribute to set on the queue disc
v02the value of the attribute to set on the queue disc
n03the name of the attribute to set on the queue disc
v03the value of the attribute to set on the queue disc
n04the name of the attribute to set on the queue disc
v04the value of the attribute to set on the queue disc
n05the name of the attribute to set on the queue disc
v05the value of the attribute to set on the queue disc
n06the name of the attribute to set on the queue disc
v06the value of the attribute to set on the queue disc
n07the name of the attribute to set on the queue disc
v07the value of the attribute to set on the queue disc
n08the name of the attribute to set on the queue disc
v08the value of the attribute to set on the queue disc
n09the name of the attribute to set on the queue disc
v09the value of the attribute to set on the queue disc
n10the name of the attribute to set on the queue disc
v10the value of the attribute to set on the queue disc
n11the name of the attribute to set on the queue disc
v11the value of the attribute to set on the queue disc
n12the name of the attribute to set on the queue disc
v12the value of the attribute to set on the queue disc
n13the name of the attribute to set on the queue disc
v13the value of the attribute to set on the queue disc
n14the name of the attribute to set on the queue disc
v14the value of the attribute to set on the queue disc
n15the name of the attribute to set on the queue disc
v15the value of the attribute to set on the queue disc
Returns
the handle of the created child queue disc

Definition at line 270 of file traffic-control-helper.cc.

References m_queueDiscFactory, NS_ABORT_MSG_IF, and ns3::ObjectFactory::SetTypeId().

Referenced by AddChildQueueDiscs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddChildQueueDiscs()

TrafficControlHelper::HandleList ns3::TrafficControlHelper::AddChildQueueDiscs ( uint16_t  handle,
const ClassIdList classes,
std::string  type,
std::string  n01 = "",
const AttributeValue v01 = EmptyAttributeValue (),
std::string  n02 = "",
const AttributeValue v02 = EmptyAttributeValue (),
std::string  n03 = "",
const AttributeValue v03 = EmptyAttributeValue (),
std::string  n04 = "",
const AttributeValue v04 = EmptyAttributeValue (),
std::string  n05 = "",
const AttributeValue v05 = EmptyAttributeValue (),
std::string  n06 = "",
const AttributeValue v06 = EmptyAttributeValue (),
std::string  n07 = "",
const AttributeValue v07 = EmptyAttributeValue (),
std::string  n08 = "",
const AttributeValue v08 = EmptyAttributeValue (),
std::string  n09 = "",
const AttributeValue v09 = EmptyAttributeValue (),
std::string  n10 = "",
const AttributeValue v10 = EmptyAttributeValue (),
std::string  n11 = "",
const AttributeValue v11 = EmptyAttributeValue (),
std::string  n12 = "",
const AttributeValue v12 = EmptyAttributeValue (),
std::string  n13 = "",
const AttributeValue v13 = EmptyAttributeValue (),
std::string  n14 = "",
const AttributeValue v14 = EmptyAttributeValue (),
std::string  n15 = "",
const AttributeValue v15 = EmptyAttributeValue () 
)

Helper function used to attach a child queue disc (of the given type and with the given attributes) to each of the given classes (included in the queue disc having the given handle).

Parameters
handlethe handle of the parent queue disc
classesthe class IDs of the classes to attach a queue disc to
typethe type of queue disc
n01the name of the attribute to set on the queue disc
v01the value of the attribute to set on the queue disc
n02the name of the attribute to set on the queue disc
v02the value of the attribute to set on the queue disc
n03the name of the attribute to set on the queue disc
v03the value of the attribute to set on the queue disc
n04the name of the attribute to set on the queue disc
v04the value of the attribute to set on the queue disc
n05the name of the attribute to set on the queue disc
v05the value of the attribute to set on the queue disc
n06the name of the attribute to set on the queue disc
v06the value of the attribute to set on the queue disc
n07the name of the attribute to set on the queue disc
v07the value of the attribute to set on the queue disc
n08the name of the attribute to set on the queue disc
v08the value of the attribute to set on the queue disc
n09the name of the attribute to set on the queue disc
v09the value of the attribute to set on the queue disc
n10the name of the attribute to set on the queue disc
v10the value of the attribute to set on the queue disc
n11the name of the attribute to set on the queue disc
v11the value of the attribute to set on the queue disc
n12the name of the attribute to set on the queue disc
v12the value of the attribute to set on the queue disc
n13the name of the attribute to set on the queue disc
v13the value of the attribute to set on the queue disc
n14the name of the attribute to set on the queue disc
v14the value of the attribute to set on the queue disc
n15the name of the attribute to set on the queue disc
v15the value of the attribute to set on the queue disc
Returns
the list of handles of the created child queue discs

Definition at line 316 of file traffic-control-helper.cc.

References AddChildQueueDisc(), and list.

Referenced by Default(), and WifiAcMappingTest::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddInternalQueues()

void ns3::TrafficControlHelper::AddInternalQueues ( uint16_t  handle,
uint16_t  count,
std::string  type,
std::string  n01 = "",
const AttributeValue v01 = EmptyAttributeValue (),
std::string  n02 = "",
const AttributeValue v02 = EmptyAttributeValue (),
std::string  n03 = "",
const AttributeValue v03 = EmptyAttributeValue (),
std::string  n04 = "",
const AttributeValue v04 = EmptyAttributeValue (),
std::string  n05 = "",
const AttributeValue v05 = EmptyAttributeValue (),
std::string  n06 = "",
const AttributeValue v06 = EmptyAttributeValue (),
std::string  n07 = "",
const AttributeValue v07 = EmptyAttributeValue (),
std::string  n08 = "",
const AttributeValue v08 = EmptyAttributeValue () 
)

Helper function used to add the given number of internal queues (of the given type and with the given attributes) to the queue disc having the given handle.

Parameters
handlethe handle of the parent queue disc
countthe number of queues to add
typethe type of queue
n01the name of the attribute to set on the queue
v01the value of the attribute to set on the queue
n02the name of the attribute to set on the queue
v02the value of the attribute to set on the queue
n03the name of the attribute to set on the queue
v03the value of the attribute to set on the queue
n04the name of the attribute to set on the queue
v04the value of the attribute to set on the queue
n05the name of the attribute to set on the queue
v05the value of the attribute to set on the queue
n06the name of the attribute to set on the queue
v06the value of the attribute to set on the queue
n07the name of the attribute to set on the queue
v07the value of the attribute to set on the queue
n08the name of the attribute to set on the queue
v08the value of the attribute to set on the queue

Definition at line 173 of file traffic-control-helper.cc.

References ns3::QueueBase::AppendItemTypeIfNotPresent(), m_queueDiscFactory, NS_ABORT_MSG_IF, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().

Referenced by experiment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddPacketFilter()

void ns3::TrafficControlHelper::AddPacketFilter ( uint16_t  handle,
std::string  type,
std::string  n01 = "",
const AttributeValue v01 = EmptyAttributeValue (),
std::string  n02 = "",
const AttributeValue v02 = EmptyAttributeValue (),
std::string  n03 = "",
const AttributeValue v03 = EmptyAttributeValue (),
std::string  n04 = "",
const AttributeValue v04 = EmptyAttributeValue (),
std::string  n05 = "",
const AttributeValue v05 = EmptyAttributeValue (),
std::string  n06 = "",
const AttributeValue v06 = EmptyAttributeValue (),
std::string  n07 = "",
const AttributeValue v07 = EmptyAttributeValue (),
std::string  n08 = "",
const AttributeValue v08 = EmptyAttributeValue () 
)

Helper function used to add a packet filter (of the given type and with the given attributes) to the queue disc having the given handle.

Parameters
handlethe handle of the parent queue disc
typethe type of packet filter
n01the name of the attribute to set on the packet filter
v01the value of the attribute to set on the packet filter
n02the name of the attribute to set on the packet filter
v02the value of the attribute to set on the packet filter
n03the name of the attribute to set on the packet filter
v03the value of the attribute to set on the packet filter
n04the name of the attribute to set on the packet filter
v04the value of the attribute to set on the packet filter
n05the name of the attribute to set on the packet filter
v05the value of the attribute to set on the packet filter
n06the name of the attribute to set on the packet filter
v06the value of the attribute to set on the packet filter
n07the name of the attribute to set on the packet filter
v07the value of the attribute to set on the packet filter
n08the name of the attribute to set on the packet filter
v08the value of the attribute to set on the packet filter

Definition at line 206 of file traffic-control-helper.cc.

References m_queueDiscFactory, NS_ABORT_MSG_IF, and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ AddQueueDiscClasses()

TrafficControlHelper::ClassIdList ns3::TrafficControlHelper::AddQueueDiscClasses ( uint16_t  handle,
uint16_t  count,
std::string  type,
std::string  n01 = "",
const AttributeValue v01 = EmptyAttributeValue (),
std::string  n02 = "",
const AttributeValue v02 = EmptyAttributeValue (),
std::string  n03 = "",
const AttributeValue v03 = EmptyAttributeValue (),
std::string  n04 = "",
const AttributeValue v04 = EmptyAttributeValue (),
std::string  n05 = "",
const AttributeValue v05 = EmptyAttributeValue (),
std::string  n06 = "",
const AttributeValue v06 = EmptyAttributeValue (),
std::string  n07 = "",
const AttributeValue v07 = EmptyAttributeValue (),
std::string  n08 = "",
const AttributeValue v08 = EmptyAttributeValue () 
)

Helper function used to add the given number of queue disc classes (of the given type and with the given attributes) to the queue disc having the given handle.

Parameters
handlethe handle of the parent queue disc
countthe number of queue disc classes to add
typethe type of queue disc class
n01the name of the attribute to set on the queue disc class
v01the value of the attribute to set on the queue disc class
n02the name of the attribute to set on the queue disc class
v02the value of the attribute to set on the queue disc class
n03the name of the attribute to set on the queue disc class
v03the value of the attribute to set on the queue disc class
n04the name of the attribute to set on the queue disc class
v04the value of the attribute to set on the queue disc class
n05the name of the attribute to set on the queue disc class
v05the value of the attribute to set on the queue disc class
n06the name of the attribute to set on the queue disc class
v06the value of the attribute to set on the queue disc class
n07the name of the attribute to set on the queue disc class
v07the value of the attribute to set on the queue disc class
n08the name of the attribute to set on the queue disc class
v08the value of the attribute to set on the queue disc class
Returns
the list of class IDs

Definition at line 234 of file traffic-control-helper.cc.

References list, m_queueDiscFactory, NS_ABORT_MSG_IF, and ns3::ObjectFactory::SetTypeId().

Referenced by Default(), and WifiAcMappingTest::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Default()

TrafficControlHelper ns3::TrafficControlHelper::Default ( std::size_t  nTxQueues = 1)
static
Returns
a new TrafficControlHelper with a default configuration

The default configuration is an FqCoDelQueueDisc, if the device has a single queue, or an MqQueueDisc with as many FqCoDelQueueDiscs as the number of device queues, otherwise.

Definition at line 111 of file traffic-control-helper.cc.

References AddChildQueueDiscs(), AddQueueDiscClasses(), NS_ABORT_MSG_IF, NS_LOG_FUNCTION, and SetRootQueueDisc().

Referenced by ns3::Ipv6AddressHelper::Assign(), ns3::Ipv4AddressHelper::Assign(), ns3::DhcpHelper::InstallDhcpClientPriv(), ns3::DhcpHelper::InstallDhcpServer(), and ns3::DhcpHelper::InstallFixedAddress().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Install() [1/2]

QueueDiscContainer ns3::TrafficControlHelper::Install ( NetDeviceContainer  c)
Parameters
cset of devices
Returns
a QueueDisc container with the root queue discs installed on the devices

This method creates a QueueDisc object of the type and with the attributes configured by TrafficControlHelper::SetQueueDisc for each device in the container. Then, stores the mapping between a device and the associated queue disc into the traffic control layer of the corresponding node. This method creates the queue discs (along with their packet filters, internal queues, classes) configured with the methods provided by this class and installs them on each device in the given container. Additionally, if configured, a queue limits object is installed on each transmission queue of the devices.

Definition at line 413 of file traffic-control-helper.cc.

References ns3::QueueDiscContainer::Add(), ns3::NetDeviceContainer::Begin(), and ns3::NetDeviceContainer::End().

Referenced by ns3::Ipv6AddressHelper::Assign(), ns3::Ipv4AddressHelper::Assign(), WifiAcMappingTest::DoRun(), Ns3TcpStateTestCase::DoRun(), TcFlowControlTestCase::DoRun(), UdpSocketImplTest::DoRun(), experiment(), ns3::DhcpHelper::InstallDhcpClientPriv(), ns3::DhcpHelper::InstallDhcpServer(), and ns3::DhcpHelper::InstallFixedAddress().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Install() [2/2]

QueueDiscContainer ns3::TrafficControlHelper::Install ( Ptr< NetDevice d)
Parameters
ddevice
Returns
a QueueDisc container with the root queue disc installed on the device

This method creates the queue discs (along with their packet filters, internal queues, classes) configured with the methods provided by this class and installs them on the given device. Additionally, if configured, a queue limits object is installed on each transmission queue of the device.

Definition at line 368 of file traffic-control-helper.cc.

References ns3::QueueDiscContainer::Add(), ns3::ObjectFactory::Create(), ns3::ObjectFactory::GetTypeId(), ns3::TypeId::GetUid(), m_queueDiscFactory, m_queueDiscs, m_queueLimitsFactory, NS_ABORT_MSG_IF, and NS_ASSERT.

+ Here is the call graph for this function:

◆ SetQueueLimits()

void ns3::TrafficControlHelper::SetQueueLimits ( std::string  type,
std::string  n01 = "",
const AttributeValue v01 = EmptyAttributeValue (),
std::string  n02 = "",
const AttributeValue v02 = EmptyAttributeValue (),
std::string  n03 = "",
const AttributeValue v03 = EmptyAttributeValue (),
std::string  n04 = "",
const AttributeValue v04 = EmptyAttributeValue (),
std::string  n05 = "",
const AttributeValue v05 = EmptyAttributeValue (),
std::string  n06 = "",
const AttributeValue v06 = EmptyAttributeValue (),
std::string  n07 = "",
const AttributeValue v07 = EmptyAttributeValue (),
std::string  n08 = "",
const AttributeValue v08 = EmptyAttributeValue () 
)

Helper function used to add a queue limits object to the transmission queues of the devices.

Parameters
typethe type of queue
n01the name of the attribute to set on the queue limits object
v01the value of the attribute to set on the queue limits object
n02the name of the attribute to set on the queue limits object
v02the value of the attribute to set on the queue limits object
n03the name of the attribute to set on the queue limits object
v03the value of the attribute to set on the queue limits object
n04the name of the attribute to set on the queue limits object
v04the value of the attribute to set on the queue limits object
n05the name of the attribute to set on the queue limits object
v05the value of the attribute to set on the queue limits object
n06the name of the attribute to set on the queue limits object
v06the value of the attribute to set on the queue limits object
n07the name of the attribute to set on the queue limits object
v07the value of the attribute to set on the queue limits object
n08the name of the attribute to set on the queue limits object
v08the value of the attribute to set on the queue limits object

Definition at line 346 of file traffic-control-helper.cc.

References m_queueLimitsFactory, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ SetRootQueueDisc()

uint16_t ns3::TrafficControlHelper::SetRootQueueDisc ( std::string  type,
std::string  n01 = "",
const AttributeValue v01 = EmptyAttributeValue (),
std::string  n02 = "",
const AttributeValue v02 = EmptyAttributeValue (),
std::string  n03 = "",
const AttributeValue v03 = EmptyAttributeValue (),
std::string  n04 = "",
const AttributeValue v04 = EmptyAttributeValue (),
std::string  n05 = "",
const AttributeValue v05 = EmptyAttributeValue (),
std::string  n06 = "",
const AttributeValue v06 = EmptyAttributeValue (),
std::string  n07 = "",
const AttributeValue v07 = EmptyAttributeValue (),
std::string  n08 = "",
const AttributeValue v08 = EmptyAttributeValue (),
std::string  n09 = "",
const AttributeValue v09 = EmptyAttributeValue (),
std::string  n10 = "",
const AttributeValue v10 = EmptyAttributeValue (),
std::string  n11 = "",
const AttributeValue v11 = EmptyAttributeValue (),
std::string  n12 = "",
const AttributeValue v12 = EmptyAttributeValue (),
std::string  n13 = "",
const AttributeValue v13 = EmptyAttributeValue (),
std::string  n14 = "",
const AttributeValue v14 = EmptyAttributeValue (),
std::string  n15 = "",
const AttributeValue v15 = EmptyAttributeValue () 
)

Helper function used to set a root queue disc of the given type and with the given attributes.

To set the InternalQueueList, PacketFilterList and ChildQueueDiscList attributes, use the AddInternalQueue, AddPacketFilter and AddChildQueueDisc methods.

Parameters
typethe type of queue disc
n01the name of the attribute to set on the queue disc
v01the value of the attribute to set on the queue disc
n02the name of the attribute to set on the queue disc
v02the value of the attribute to set on the queue disc
n03the name of the attribute to set on the queue disc
v03the value of the attribute to set on the queue disc
n04the name of the attribute to set on the queue disc
v04the value of the attribute to set on the queue disc
n05the name of the attribute to set on the queue disc
v05the value of the attribute to set on the queue disc
n06the name of the attribute to set on the queue disc
v06the value of the attribute to set on the queue disc
n07the name of the attribute to set on the queue disc
v07the value of the attribute to set on the queue disc
n08the name of the attribute to set on the queue disc
v08the value of the attribute to set on the queue disc
n09the name of the attribute to set on the queue disc
v09the value of the attribute to set on the queue disc
n10the name of the attribute to set on the queue disc
v10the value of the attribute to set on the queue disc
n11the name of the attribute to set on the queue disc
v11the value of the attribute to set on the queue disc
n12the name of the attribute to set on the queue disc
v12the value of the attribute to set on the queue disc
n13the name of the attribute to set on the queue disc
v13the value of the attribute to set on the queue disc
n14the name of the attribute to set on the queue disc
v14the value of the attribute to set on the queue disc
n15the name of the attribute to set on the queue disc
v15the value of the attribute to set on the queue disc
Returns
the handle of the root queue disc (zero)

Definition at line 131 of file traffic-control-helper.cc.

References m_queueDiscFactory, NS_ABORT_MSG_UNLESS, and ns3::ObjectFactory::SetTypeId().

Referenced by Default(), WifiAcMappingTest::DoRun(), Ns3TcpStateTestCase::DoRun(), and experiment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Uninstall() [1/2]

void ns3::TrafficControlHelper::Uninstall ( NetDeviceContainer  c)
Parameters
cset of devices

This method removes the root queue discs (and associated filters, classes and queues) installed on the given devices.

Definition at line 444 of file traffic-control-helper.cc.

References ns3::NetDeviceContainer::Begin(), and ns3::NetDeviceContainer::End().

Referenced by Ns3TcpCwndTestCase2::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Uninstall() [2/2]

void ns3::TrafficControlHelper::Uninstall ( Ptr< NetDevice d)
Parameters
ddevice

This method removes the root queue disc (and associated filters, classes and queues) installed on the given device.

Definition at line 426 of file traffic-control-helper.cc.

References NS_ASSERT.

Member Data Documentation

◆ m_queueDiscFactory

std::vector<QueueDiscFactory> ns3::TrafficControlHelper::m_queueDiscFactory
private

QueueDisc factory, stores the configuration of all the queue discs.

Definition at line 496 of file traffic-control-helper.h.

Referenced by AddChildQueueDisc(), AddInternalQueues(), AddPacketFilter(), AddQueueDiscClasses(), Install(), and SetRootQueueDisc().

◆ m_queueDiscs

std::vector<Ptr<QueueDisc> > ns3::TrafficControlHelper::m_queueDiscs
private

Vector of all the created queue discs.

Definition at line 498 of file traffic-control-helper.h.

Referenced by Install().

◆ m_queueLimitsFactory

ObjectFactory ns3::TrafficControlHelper::m_queueLimitsFactory
private

Factory to create a queue limits object.

Definition at line 500 of file traffic-control-helper.h.

Referenced by Install(), and SetQueueLimits().


The documentation for this class was generated from the following files: