AccessNet.h File Reference


Detailed Description

Author:
Markus Mauch

Definition in file AccessNet.h.

#include <omnetpp.h>
#include <InitStages.h>

Go to the source code of this file.

Classes

class  NodeInfo
 Information about a getNode(usually a router). More...
class  TerminalInfo
 Information about a terminal. More...
class  AccessNet
 Configuration module for access networks. More...

Functions

cGate * firstUnusedGate (cModule *owner, const char *name, cGate::Type type=cGate::NONE)
 Returns a module's fist unconnected gate.


Function Documentation

cGate* firstUnusedGate ( cModule *  owner,
const char *  name,
cGate::Type  type = cGate::NONE 
)

Returns a module's fist unconnected gate.

Parameters:
owner gate owner module
name name of the gate vector
type gate type (input or output)

Definition at line 348 of file AccessNet.cc.

Referenced by AccessNet::addOverlayNode().

00349 {
00350     int index;
00351     for (index = 0; index < owner->gateSize(name); index++) {
00352         cGate *gate = type == cGate::NONE ? owner->gate(name, index) : owner->gateHalf(name, type, index);
00353         if (!gate->isConnectedOutside()) {
00354             return gate;
00355         }
00356     }
00357 
00358     owner->setGateSize(name, index + 2);
00359     return type == cGate::NONE ? owner->gate(name, index + 1) : owner->gateHalf(name, type, index + 1);
00360 }


Generated on Wed Mar 25 16:32:50 2009 for OverSim by  doxygen 1.5.5