Classes | Public Types | Public Member Functions | Public Attributes | Protected Attributes

NicEntry Class Reference
[connectionManager - channel and connection related classes]

NicEntry is used by ConnectionManager to store the necessary information for each nic. More...

#include <NicEntry.h>

Inherited by NicEntryDebug, and NicEntryDirect.

Collaboration diagram for NicEntry:
Collaboration graph
[legend]

List of all members.

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 GateListgetGateList ()
 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.
ChannelAccesschAccess
 Points to this nics ChannelAccess module.

Protected Attributes

bool coreDebug
 Debug output switch.
GateList outConns
 Outgoing connections of this nic.

Detailed Description

NicEntry is used by ConnectionManager to store the necessary information for each nic.

Author:
Daniel Willkomm
See also:
ConnectionManager

Definition at line 41 of file NicEntry.h.


Member Function Documentation

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.

Parameters:
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];
    };


Member Data Documentation

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().


The documentation for this class was generated from the following file: