RINASim  October 2016
Documentation of framework for OMNeT++
RMTModuleAllocator Class Reference

#include <RMTModuleAllocator.h>

Inheritance diagram for RMTModuleAllocator:

Public Member Functions

RMTPortaddPort (Flow *flow)
 
RMTQueueaddQueue (RMTQueueType type, RMTPort *port, const char *queueId="0")
 
void removePort (RMTPort *port)
 
void removeQueue (RMTQueue *queue)
 
void removeQueues (RMTQueues &queues)
 
RMTPortgetQueueToPortMapping (RMTQueue *queue)
 
RMTPortgetPort (const char *name)
 
RMTPortgetInterfacePort ()
 

Protected Member Functions

virtual void initialize ()
 
virtual void handleMessage (cMessage *msg)
 

Private Member Functions

RMTQueuelookup (RMTPort *port, RMTQueueType type, const char *queueName)
 

Private Attributes

RMTQMonitorBaseqMonPolicy
 
RMTPortinterfacePort
 
std::map< RMTQueue *, RMTPort * > queueToPort
 
unsigned int portCount
 
std::map< RMTPort *, unsigned int > portQueueCount
 
unsigned int portXCoord
 
unsigned int portYCoord
 

Detailed Description

A control unit for RMTPort & RMTQueue instances that provides an API for adding and deleting RMT ports and queues.

Definition at line 42 of file RMTModuleAllocator.h.

Member Function Documentation

RMTPort * RMTModuleAllocator::addPort ( Flow flow)

Instantiates a new RMTPort instance.

Parameters
flow(N-1)-flow
Returns
pointer to the new port

Definition at line 109 of file RMTModuleAllocator.cc.

Referenced by RA::bindMediumToRMT(), and RA::bindNM1FlowToRMT().

RMTQueue * RMTModuleAllocator::addQueue ( RMTQueueType  type,
RMTPort port,
const char *  queueId = "0" 
)

Instantiates a new queue and binds it to the given port.

Parameters
typequeue type (in/out)
port(N-1)-port
queueIdqueue ID (determined by QueueIDGen policy)
Returns
pointer to the new queue

Definition at line 43 of file RMTModuleAllocator.cc.

Referenced by QueuePerNFlow::onNFlowAlloc(), SingleQueue::onNM1PortInit(), QueuePerNQoS::onNM1PortInit(), QueuePerNFlow::onNM1PortInit(), and QueuePerNCU::onNM1PortInit().

RMTPort * RMTModuleAllocator::getInterfacePort ( )

Returns the mock inteface (N-1)-port. Only to be used in the bottom DIFs.

Returns
(N-1)-port (nullptr if this isn't the bottom DIF)

Definition at line 228 of file RMTModuleAllocator.cc.

Referenced by RMT::fwTableLookup(), and RA::postNFlowAllocation().

RMTPort * RMTModuleAllocator::getPort ( const char *  name)

Returns (N-1)-port by its name.

Parameters
nameport name
Returns
(N-1)-port

Definition at line 233 of file RMTModuleAllocator.cc.

Referenced by RMTSchedulingBase::handleMessage().

RMTPort * RMTModuleAllocator::getQueueToPortMapping ( RMTQueue queue)

Returns (N-1)-port the given queue is assigned to.

Parameters
queueRMT queue
Returns
(N-1)-port

Definition at line 223 of file RMTModuleAllocator.cc.

Referenced by PortsLoadMonitor::postPDUInsertion(), RMT::postQueueArrival(), RMT::postQueueDeparture(), and PortsLoadMonitor::prePDURelease().

virtual void RMTModuleAllocator::handleMessage ( cMessage *  msg)
inlineprotectedvirtual

Definition at line 110 of file RMTModuleAllocator.h.

void RMTModuleAllocator::initialize ( )
protectedvirtual

Definition at line 27 of file RMTModuleAllocator.cc.

RMTQueue * RMTModuleAllocator::lookup ( RMTPort port,
RMTQueueType  type,
const char *  queueName 
)
private

Definition at line 200 of file RMTModuleAllocator.cc.

Referenced by addQueue().

void RMTModuleAllocator::removePort ( RMTPort port)

Removes the specified port.

Parameters
port(N-1)-port

Definition at line 214 of file RMTModuleAllocator.cc.

Referenced by RA::removeNM1FlowBindings().

void RMTModuleAllocator::removeQueue ( RMTQueue queue)

Removes the specified queue.

Parameters
queuequeue

Definition at line 159 of file RMTModuleAllocator.cc.

Referenced by removeQueues().

void RMTModuleAllocator::removeQueues ( RMTQueues queues)

Removes each queue from given vector.

Parameters
queuesvector of queues

Definition at line 191 of file RMTModuleAllocator.cc.

Referenced by removePort().

Member Data Documentation

RMTPort* RMTModuleAllocator::interfacePort
private

Definition at line 114 of file RMTModuleAllocator.h.

Referenced by addPort(), getInterfacePort(), and initialize().

unsigned int RMTModuleAllocator::portCount
private

Definition at line 120 of file RMTModuleAllocator.h.

Referenced by addPort(), and initialize().

std::map<RMTPort*, unsigned int> RMTModuleAllocator::portQueueCount
private

Definition at line 121 of file RMTModuleAllocator.h.

unsigned int RMTModuleAllocator::portXCoord
private

Definition at line 122 of file RMTModuleAllocator.h.

Referenced by addPort(), and initialize().

unsigned int RMTModuleAllocator::portYCoord
private

Definition at line 122 of file RMTModuleAllocator.h.

Referenced by addPort(), and initialize().

RMTQMonitorBase* RMTModuleAllocator::qMonPolicy
private

Definition at line 110 of file RMTModuleAllocator.h.

Referenced by addQueue(), initialize(), and removeQueue().

std::map<RMTQueue*, RMTPort*> RMTModuleAllocator::queueToPort
private

Definition at line 115 of file RMTModuleAllocator.h.

Referenced by addQueue(), getQueueToPortMapping(), and removeQueue().


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