A Discrete-Event Network Simulator
API
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ns3::QueueDiscFactory Class Reference

This class stores object factories required to create a queue disc and all of its components (packet filters, internal queues, classes). More...

#include "traffic-control-helper.h"

Public Member Functions

 QueueDiscFactory (ObjectFactory factory)
 Constructor. More...
 
virtual ~QueueDiscFactory ()
 
void AddInternalQueue (ObjectFactory factory)
 Add a factory to create an internal queue. More...
 
void AddPacketFilter (ObjectFactory factory)
 Add a factory to create a packet filter. More...
 
uint16_t AddQueueDiscClass (ObjectFactory factory)
 Add a factory to create a queue disc class. More...
 
Ptr< QueueDiscCreateQueueDisc (const std::vector< Ptr< QueueDisc > > &queueDiscs)
 Create a queue disc with the currently stored configuration. More...
 
void SetChildQueueDisc (uint16_t classId, uint16_t handle)
 Set the (child) queue disc to attach to a class. More...
 

Private Member Functions

 QueueDiscFactory ()
 Default constructor. More...
 

Private Attributes

std::map< uint16_t, uint16_t > m_classIdChildHandleMap
 Map storing the associations between class IDs and child queue disc handles. More...
 
std::vector< ObjectFactorym_internalQueuesFactory
 Vector of factories to create internal queues. More...
 
std::vector< ObjectFactorym_packetFiltersFactory
 Vector of factories to create packet filters. More...
 
std::vector< ObjectFactorym_queueDiscClassesFactory
 Vector of factories to create queue disc classes. More...
 
ObjectFactory m_queueDiscFactory
 Factory to create this queue disc. More...
 

Detailed Description

This class stores object factories required to create a queue disc and all of its components (packet filters, internal queues, classes).

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

Constructor & Destructor Documentation

◆ QueueDiscFactory() [1/2]

ns3::QueueDiscFactory::QueueDiscFactory ( ObjectFactory  factory)

Constructor.

Parameters
factorythe factory used to create this queue disc

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

◆ ~QueueDiscFactory()

virtual ns3::QueueDiscFactory::~QueueDiscFactory ( )
inlinevirtual

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

◆ QueueDiscFactory() [2/2]

ns3::QueueDiscFactory::QueueDiscFactory ( )
private

Default constructor.

Defined and unimplemented to avoid misuse

Member Function Documentation

◆ AddInternalQueue()

void ns3::QueueDiscFactory::AddInternalQueue ( ObjectFactory  factory)

Add a factory to create an internal queue.

Parameters
factorythe factory used to create an internal queue

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

References m_internalQueuesFactory.

◆ AddPacketFilter()

void ns3::QueueDiscFactory::AddPacketFilter ( ObjectFactory  factory)

Add a factory to create a packet filter.

Parameters
factorythe factory used to create a packet filter

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

References m_packetFiltersFactory.

◆ AddQueueDiscClass()

uint16_t ns3::QueueDiscFactory::AddQueueDiscClass ( ObjectFactory  factory)

Add a factory to create a queue disc class.

Parameters
factorythe factory used to create a queue disc class
Returns
the class ID of the created queue disc class

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

References m_queueDiscClassesFactory.

◆ CreateQueueDisc()

Ptr< QueueDisc > ns3::QueueDiscFactory::CreateQueueDisc ( const std::vector< Ptr< QueueDisc > > &  queueDiscs)

Create a queue disc with the currently stored configuration.

Parameters
queueDiscsthe vector of queue discs held by the helper
Returns
the created queue disc

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

References ns3::QueueDisc::AddInternalQueue(), ns3::QueueDisc::AddPacketFilter(), ns3::QueueDisc::AddQueueDiscClass(), ns3::ObjectFactory::Create(), m_classIdChildHandleMap, m_internalQueuesFactory, m_packetFiltersFactory, m_queueDiscClassesFactory, m_queueDiscFactory, and NS_ABORT_MSG_IF.

◆ SetChildQueueDisc()

void ns3::QueueDiscFactory::SetChildQueueDisc ( uint16_t  classId,
uint16_t  handle 
)

Set the (child) queue disc to attach to a class.

Parameters
classIdthe id of the class to attach a child queue disc to
handlethe handle of the child queue disc to attach to the class

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

References m_classIdChildHandleMap, m_queueDiscClassesFactory, and NS_ABORT_MSG_IF.

Member Data Documentation

◆ m_classIdChildHandleMap

std::map<uint16_t, uint16_t> ns3::QueueDiscFactory::m_classIdChildHandleMap
private

Map storing the associations between class IDs and child queue disc handles.

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

Referenced by CreateQueueDisc(), and SetChildQueueDisc().

◆ m_internalQueuesFactory

std::vector<ObjectFactory> ns3::QueueDiscFactory::m_internalQueuesFactory
private

Vector of factories to create internal queues.

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

Referenced by AddInternalQueue(), and CreateQueueDisc().

◆ m_packetFiltersFactory

std::vector<ObjectFactory> ns3::QueueDiscFactory::m_packetFiltersFactory
private

Vector of factories to create packet filters.

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

Referenced by AddPacketFilter(), and CreateQueueDisc().

◆ m_queueDiscClassesFactory

std::vector<ObjectFactory> ns3::QueueDiscFactory::m_queueDiscClassesFactory
private

Vector of factories to create queue disc classes.

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

Referenced by AddQueueDiscClass(), CreateQueueDisc(), and SetChildQueueDisc().

◆ m_queueDiscFactory

ObjectFactory ns3::QueueDiscFactory::m_queueDiscFactory
private

Factory to create this queue disc.

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

Referenced by CreateQueueDisc().


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