#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. |
Definition in file AccessNet.h.
cGate* firstUnusedGate | ( | cModule * | owner, | |
const char * | name, | |||
cGate::Type | type = cGate::NONE | |||
) |
Returns a module's fist unconnected gate.
owner | gate owner module | |
name | name of the gate vector | |
type | gate type (input or output) |
Definition at line 361 of file AccessNet.cc.
Referenced by AccessNet::addOverlayNode().
00362 { 00363 int index; 00364 for (index = 0; index < owner->gateSize(name); index++) { 00365 cGate *gate = type == cGate::NONE ? owner->gate(name, index) : owner->gateHalf(name, type, index); 00366 if (!gate->isConnectedOutside()) { 00367 return gate; 00368 } 00369 } 00370 00371 owner->setGateSize(name, index + 2); 00372 return type == cGate::NONE ? owner->gate(name, index + 1) : owner->gateHalf(name, type, index + 1); 00373 }