OverSim
AccessNet.cc File Reference
#include <vector>
#include <iostream>
#include <omnetpp.h>
#include <IRoutingTable.h>
#include <IInterfaceTable.h>
#include <RoutingTable6.h>
#include <IPAddressResolver.h>
#include <IPv4InterfaceData.h>
#include <IPv6InterfaceData.h>
#include "AccessNet.h"

Go to the source code of this file.

Functions

 Define_Module (AccessNet)
std::ostream & operator<< (std::ostream &os, NodeInfo &n)
cGate * firstUnusedGate (cModule *owner, const char *name, cGate::Type type)
 Returns a module's fist unconnected gate.

Detailed Description

Author
Markus Mauch

Definition in file AccessNet.cc.

Function Documentation

Define_Module ( AccessNet  )
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);
}
std::ostream& operator<< ( std::ostream &  os,
NodeInfo n 
)
Parameters
osthe output stream
nthe node info
Returns
the stream

Definition at line 40 of file AccessNet.cc.

{
os << n.IPAddress;
return os;
}