AccessNet.h File Reference

#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.

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:
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 }

Generated on Wed May 26 16:21:15 2010 for OverSim by  doxygen 1.6.3