NicEntry is used by ConnectionManager to store the necessary information for each nic. More...
#include <NicEntry.h>
Inherited by NicEntryDebug, and NicEntryDirect.
Classes | |
class | NicEntryComparator |
Public Types | |
typedef std::map< const NicEntry *, cGate *, NicEntryComparator > | GateList |
Type for map from NicEntry pointer to a gate. | |
Public Member Functions | |
NicEntry (bool debug) | |
Constructor, initializes all members. | |
virtual | ~NicEntry () |
Destructor -- needs to be there... | |
virtual void | connectTo (NicEntry *)=0 |
Connect two nics. | |
virtual void | disconnectFrom (NicEntry *)=0 |
Disconnect two nics. | |
const GateList & | getGateList () |
return the actual gateList | |
bool | isConnected (const NicEntry *other) |
Checks if this nic is connected to the "other" nic. | |
const cGate * | getOutGateTo (const NicEntry *to) |
Public Attributes | |
int | nicId |
module id of the nic for which information is stored | |
cModule * | nicPtr |
Pointer to the NIC module. | |
int | hostId |
Module id of the host module this nic belongs to. | |
Coord | pos |
Geographic location of the nic. | |
ChannelAccess * | chAccess |
Points to this nics ChannelAccess module. | |
Protected Attributes | |
bool | coreDebug |
Debug output switch. | |
GateList | outConns |
Outgoing connections of this nic. |
NicEntry is used by ConnectionManager to store the necessary information for each nic.
Definition at line 41 of file NicEntry.h.
const cGate* NicEntry::getOutGateTo | ( | const NicEntry * | to | ) | [inline] |
Called by P2PPhyLayer. Needed to send a packet directly to a certain nic without other nodes 'hearing' it. This is only useful for physical layers that work with bit error probability like P2PPhyLayer.
to | pointer to the NicEntry to which the packet is about to be sent |
Definition at line 119 of file NicEntry.h.
References outConns.
Referenced by BaseConnectionManager::getOutGateTo().
{ return outConns[to]; };
GateList NicEntry::outConns [protected] |
Outgoing connections of this nic.
This map stores all connection for this nic to other nics
The first entry is the module id of the nic the connection is going to and the second the gate to send the msg to
Definition at line 80 of file NicEntry.h.
Referenced by NicEntryDirect::connectTo(), NicEntryDebug::connectTo(), NicEntryDirect::disconnectFrom(), NicEntryDebug::disconnectFrom(), getGateList(), getOutGateTo(), and isConnected().