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

#include <RMTPort.h>

Inheritance diagram for RMTPort:

Public Member Functions

bool isOutputReady ()
 
bool isInputReady ()
 
void blockOutput ()
 
void unblockOutput ()
 
void blockInput ()
 
void unblockInput ()
 
bool hasBlockedInput ()
 
long getInputRate ()
 
void setInputRate (long pdusPerSecond)
 
const FlowgetFlow () const
 
RMTQueuegetFirstQueue (RMTQueueType type) const
 
RMTQueuegetLongestQueue (RMTQueueType type) const
 
RMTQueuegetQueueById (RMTQueueType type, const char *queueId) const
 
RMTQueuesgetInputQueues ()
 
RMTQueuesgetOutputQueues ()
 
unsigned long getWaiting (RMTQueueType direction)
 

Protected Member Functions

virtual void initialize ()
 
virtual void handleMessage (cMessage *msg)
 
void addWaiting (RMTQueueType direction)
 
void substractWaiting (RMTQueueType direction)
 

Private Member Functions

void setOutputReady ()
 
void setOutputBusy ()
 
void setInputReady ()
 
void setInputBusy ()
 
void postInitialize ()
 
void setFlow (Flow *flow)
 
void registerInputQueue (RMTQueue *queue)
 
void registerOutputQueue (RMTQueue *queue)
 
void unregisterInputQueue (RMTQueue *queue)
 
void unregisterOutputQueue (RMTQueue *queue)
 
cGate * getSouthInputGate () const
 
cGate * getSouthOutputGate () const
 
void scheduleNextRead ()
 
void scheduleNextWrite ()
 
void redrawGUI (bool redrawParent=false)
 

Private Attributes

bool inputReady
 
bool outputReady
 
bool blockedInput
 
bool blockedOutput
 
unsigned long waitingOnInput
 
unsigned long waitingOnOutput
 
long inputReadRate
 
double postReadDelay
 
std::string dstAppAddr
 
std::string dstAppQoS
 
Flowflow
 
QueueIDGenBasequeueIdGen
 
std::set< cGate * > northInputGates
 
cGate * southInputGate
 
cGate * southOutputGate
 
cGate * protectIn
 
cGate * protectOut
 
cGate * unprotectIn
 
cGate * unprotectOut
 
cChannel * outputChannel
 
RMTQueues outputQueues
 
RMTQueues inputQueues
 
simsignal_t sigRMTPortReadyForRead
 
simsignal_t sigRMTPortReadyToWrite
 
simsignal_t sigStatRMTPortUp
 
simsignal_t sigStatRMTPortDown
 

Friends

class RA
 
class RMT
 
class RMTModuleAllocator
 

Detailed Description

Definition at line 36 of file RMTPort.h.

Member Function Documentation

void RMTPort::addWaiting ( RMTQueueType  direction)
protected

Increments number of waiting PDUs.

Parameters
directionof transfer (read/serve)

Definition at line 320 of file RMTPort.cc.

void RMTPort::blockInput ( )

Marks the port as blocked for reading (e.g. when other (N-1)-ports aren't keeping up).

Definition at line 416 of file RMTPort.cc.

void RMTPort::blockOutput ( )

Marks the port as blocked for sending (e.g. when (N-1)-EFCPI isn't keeping up).

Definition at line 397 of file RMTPort.cc.

Referenced by RA::blockNM1PortOutput().

RMTQueue * RMTPort::getFirstQueue ( RMTQueueType  type) const

Returns the first queue available on this port. Note: this excludes the temporary management queues

Parameters
typedirection of data
Returns
queue

Definition at line 219 of file RMTPort.cc.

const Flow * RMTPort::getFlow ( ) const

Returns the (N-1)-flow this port is assigned to.

Returns
(N-1)-flow object

Definition at line 369 of file RMTPort.cc.

RMTQueues & RMTPort::getInputQueues ( )

Returns a list of available input queues.

Returns
set of queues

Definition at line 174 of file RMTPort.cc.

Referenced by NM1FlowTableItem::getRMTInputQueues(), RMTModuleAllocator::lookup(), and RMTModuleAllocator::removePort().

long RMTPort::getInputRate ( )

Definition at line 330 of file RMTPort.cc.

RMTQueue * RMTPort::getLongestQueue ( RMTQueueType  type) const

Returns the longest queue attached to this port.

Parameters
typedirection of data
Returns
queue

Definition at line 226 of file RMTPort.cc.

Referenced by LongestQFirst::processQueues(), FWQ::WeightedFairQ::processQueues(), and IterativeScheduling::IterativeScheduling::processQueues().

RMTQueues & RMTPort::getOutputQueues ( )

Returns a list of available output queues.

Returns
set of queues

Definition at line 179 of file RMTPort.cc.

Referenced by NM1FlowTableItem::getRMTOutputQueues(), RMTModuleAllocator::lookup(), and RMTModuleAllocator::removePort().

RMTQueue * RMTPort::getQueueById ( RMTQueueType  type,
const char *  queueId 
) const

Returns the queue that matches given ID.

Parameters
typedirection of data
queueIdqueue ID
Returns
queue

Definition at line 244 of file RMTPort.cc.

Referenced by handleMessage(), and RMT::relayPDUToPort().

cGate * RMTPort::getSouthInputGate ( ) const
private

Definition at line 209 of file RMTPort.cc.

cGate * RMTPort::getSouthOutputGate ( ) const
private

Definition at line 214 of file RMTPort.cc.

Referenced by RA::removeNM1FlowBindings().

unsigned long RMTPort::getWaiting ( RMTQueueType  direction)

Returns number of PDUs waiting to be read.

Parameters
directionof transfer (read/serve)
Returns
PDUs count accross queues

Definition at line 315 of file RMTPort.cc.

Referenced by DQSch::processQueues(), LongestQFirst::processQueues(), FWQ::WeightedFairQ::processQueues(), IterativeScheduling::IterativeScheduling::processQueues(), and DumbSch::processQueues().

void RMTPort::handleMessage ( cMessage *  msg)
protectedvirtual

Definition at line 76 of file RMTPort.cc.

bool RMTPort::hasBlockedInput ( )
inline

Returns input block status.

Definition at line 82 of file RMTPort.h.

void RMTPort::initialize ( )
protectedvirtual

Definition at line 30 of file RMTPort.cc.

bool RMTPort::isInputReady ( )

Returns the port state (ready to receive data/busy).

Returns
port state

Definition at line 282 of file RMTPort.cc.

Referenced by DQSch::processQueues(), LongestQFirst::processQueues(), FWQ::WeightedFairQ::processQueues(), IterativeScheduling::IterativeScheduling::processQueues(), and DumbSch::processQueues().

bool RMTPort::isOutputReady ( )

Returns the port state (ready to send out data/busy).

Returns
port state

Definition at line 261 of file RMTPort.cc.

Referenced by DQSch::processQueues(), LongestQFirst::processQueues(), FWQ::WeightedFairQ::processQueues(), IterativeScheduling::IterativeScheduling::processQueues(), DumbSch::processQueues(), and redrawGUI().

void RMTPort::postInitialize ( )
private

Definition at line 65 of file RMTPort.cc.

Referenced by RA::bindMediumToRMT().

void RMTPort::redrawGUI ( bool  redrawParent = false)
private
void RMTPort::registerInputQueue ( RMTQueue queue)
private

Definition at line 184 of file RMTPort.cc.

Referenced by RMTModuleAllocator::addQueue().

void RMTPort::registerOutputQueue ( RMTQueue queue)
private

Definition at line 190 of file RMTPort.cc.

Referenced by RMTModuleAllocator::addQueue().

void RMTPort::scheduleNextRead ( )
private

Definition at line 308 of file RMTPort.cc.

Referenced by RMT::postQueueDeparture().

void RMTPort::scheduleNextWrite ( )
private

Definition at line 303 of file RMTPort.cc.

Referenced by handleMessage().

void RMTPort::setFlow ( Flow flow)
private

Definition at line 374 of file RMTPort.cc.

Referenced by RMTModuleAllocator::addPort(), and RA::postNM1FlowAllocation().

void RMTPort::setInputBusy ( )
private

Marks the port as busy (e.g. when sending data through it).

Definition at line 297 of file RMTPort.cc.

Referenced by scheduleNextRead().

void RMTPort::setInputRate ( long  pdusPerSecond)

Definition at line 335 of file RMTPort.cc.

void RMTPort::setInputReady ( )
private

Marks the port as ready to receive data.

Definition at line 287 of file RMTPort.cc.

Referenced by RA::bindMediumToRMT(), RA::createNM1FlowWithoutAllocate(), handleMessage(), RA::postNM1FlowAllocation(), and unblockInput().

void RMTPort::setOutputBusy ( )
private

Marks the port as busy (e.g. when sending data through it).

Definition at line 276 of file RMTPort.cc.

Referenced by blockOutput(), handleMessage(), and RMT::postQueueDeparture().

void RMTPort::setOutputReady ( )
private

Marks the port as ready to receive data.

Definition at line 266 of file RMTPort.cc.

Referenced by RA::bindMediumToRMT(), RA::createNM1FlowWithoutAllocate(), handleMessage(), RA::postNM1FlowAllocation(), and unblockOutput().

void RMTPort::substractWaiting ( RMTQueueType  direction)
protected

Decrements number of waiting PDUs.

Parameters
directionof transfer (read/serve)
Returns
PDUs count accross queues

Definition at line 325 of file RMTPort.cc.

Referenced by RMT::postQueueDeparture().

void RMTPort::unblockInput ( )

Unmarks the port as blocked for reading (e.g. when other (N-1)-ports are keeping up again).

Definition at line 423 of file RMTPort.cc.

void RMTPort::unblockOutput ( )

Unmarks the port as blocked for sending (e.g. when (N-1)-EFCPI is keeping up again).

Definition at line 408 of file RMTPort.cc.

Referenced by RA::unblockNM1PortOutput().

void RMTPort::unregisterInputQueue ( RMTQueue queue)
private

Definition at line 196 of file RMTPort.cc.

void RMTPort::unregisterOutputQueue ( RMTQueue queue)
private

Definition at line 202 of file RMTPort.cc.

Friends And Related Function Documentation

friend class RA
friend

Definition at line 39 of file RMTPort.h.

friend class RMT
friend

Definition at line 40 of file RMTPort.h.

friend class RMTModuleAllocator
friend

Definition at line 41 of file RMTPort.h.

Member Data Documentation

bool RMTPort::blockedInput
private
bool RMTPort::blockedOutput
private

Definition at line 172 of file RMTPort.h.

Referenced by blockOutput(), initialize(), redrawGUI(), setOutputReady(), and unblockOutput().

std::string RMTPort::dstAppAddr
private

Definition at line 177 of file RMTPort.h.

Referenced by redrawGUI(), and setFlow().

std::string RMTPort::dstAppQoS
private

Definition at line 178 of file RMTPort.h.

Referenced by redrawGUI(), and setFlow().

Flow* RMTPort::flow
private

Definition at line 180 of file RMTPort.h.

Referenced by getFlow(), initialize(), and setFlow().

RMTQueues RMTPort::inputQueues
private
long RMTPort::inputReadRate
private

Definition at line 175 of file RMTPort.h.

Referenced by getInputRate(), initialize(), and setInputRate().

bool RMTPort::inputReady
private

Definition at line 169 of file RMTPort.h.

Referenced by initialize(), isInputReady(), setInputBusy(), and setInputReady().

std::set<cGate*> RMTPort::northInputGates
private

Definition at line 183 of file RMTPort.h.

Referenced by handleMessage(), registerOutputQueue(), and unregisterOutputQueue().

cChannel* RMTPort::outputChannel
private

Definition at line 190 of file RMTPort.h.

Referenced by handleMessage(), and postInitialize().

RMTQueues RMTPort::outputQueues
private
bool RMTPort::outputReady
private

Definition at line 170 of file RMTPort.h.

Referenced by blockOutput(), initialize(), isOutputReady(), setOutputBusy(), and setOutputReady().

double RMTPort::postReadDelay
private

Definition at line 176 of file RMTPort.h.

Referenced by initialize(), scheduleNextRead(), and setInputRate().

cGate* RMTPort::protectIn
private

Definition at line 186 of file RMTPort.h.

Referenced by handleMessage(), and postInitialize().

cGate* RMTPort::protectOut
private

Definition at line 187 of file RMTPort.h.

Referenced by handleMessage(), and postInitialize().

QueueIDGenBase* RMTPort::queueIdGen
private

Definition at line 181 of file RMTPort.h.

Referenced by handleMessage(), and initialize().

simsignal_t RMTPort::sigRMTPortReadyForRead
private

Definition at line 228 of file RMTPort.h.

Referenced by initialize(), and setInputReady().

simsignal_t RMTPort::sigRMTPortReadyToWrite
private

Definition at line 229 of file RMTPort.h.

Referenced by handleMessage(), initialize(), and setOutputReady().

simsignal_t RMTPort::sigStatRMTPortDown
private

Definition at line 231 of file RMTPort.h.

Referenced by handleMessage(), and initialize().

simsignal_t RMTPort::sigStatRMTPortUp
private

Definition at line 230 of file RMTPort.h.

Referenced by handleMessage(), and initialize().

cGate* RMTPort::southInputGate
private

Definition at line 184 of file RMTPort.h.

Referenced by getSouthInputGate(), handleMessage(), and initialize().

cGate* RMTPort::southOutputGate
private

Definition at line 185 of file RMTPort.h.

Referenced by getSouthOutputGate(), handleMessage(), initialize(), and postInitialize().

cGate* RMTPort::unprotectIn
private

Definition at line 188 of file RMTPort.h.

Referenced by handleMessage(), and postInitialize().

cGate* RMTPort::unprotectOut
private

Definition at line 189 of file RMTPort.h.

Referenced by handleMessage(), and postInitialize().

unsigned long RMTPort::waitingOnInput
private

Definition at line 173 of file RMTPort.h.

Referenced by addWaiting(), getWaiting(), initialize(), and substractWaiting().

unsigned long RMTPort::waitingOnOutput
private

Definition at line 174 of file RMTPort.h.

Referenced by addWaiting(), getWaiting(), initialize(), and substractWaiting().


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