OverSim
AccessNet.h File Reference
#include <omnetpp.h>
#include <InitStages.h>
#include <IPvXAddress.h>

Go to the source code of this file.

Classes

struct  IPv6Words
 Structure to manipulate IPv6 addresses easily. More...
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.

Detailed Description

Author
Markus Mauch

Definition in file AccessNet.h.

Function Documentation

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

Returns a module's fist unconnected gate.

Parameters
ownergate owner module
namename of the gate vector
typegate type (input or output)

Definition at line 453 of file AccessNet.cc.

Referenced by AccessNet::addOverlayNode().

{
int index;
for (index = 0; index < owner->gateSize(name); index++) {
cGate *gate = type == cGate::NONE ? owner->gate(name, index) : owner->gateHalf(name, type, index);
if (!gate->isConnectedOutside()) {
return gate;
}
}
owner->setGateSize(name, index + 2);
return type == cGate::NONE ? owner->gate(name, index + 1) : owner->gateHalf(name, type, index + 1);
}