Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

common::Node Class Reference

Implementation of a simple WDM node. More...

#include <node.h>

Inheritance diagram for common::Node:

common::GroomerNode List of all members.

Public Member Functions

bool addLink (u_int dest, u_int chCount)
 Add a new Link to the node with the provided information.

const int getNodeId ()
 Get the node identifier.

bool isLinkPresent (u_int dest)
 Checks if a link is already present in the link map.

 Node (u_int nodeId)
 Construct a new Node object from the provided node identifier.

int removeLightpath (long lightpath)
 Remove a lightpath by searching any traces of it on all the possible links of this node.

int scheduleLightpath (long lightpath, u_int dest, int wavelength)
 Scedule a lightpath on the pre-specified link.

int scheduleLightpath (long lightpath, u_int dest)
 Scedule a lightpath on the pre-specified link.

void setNodeId (u_int nodeId)
 Set the node identifier.

virtual std::string & toString ()
 Convert the representation of this object to a string form.

virtual ~Node ()
 Default destructor.


Protected Attributes

std::string _descStr
 String representation of this object is used here.

LinkMap _lm
 A Link map consists of a set of links associated with the node indexed by a unique integer destination id.

u_int _nodeId
 Represents the node identifier for this node.


Detailed Description

Implementation of a simple WDM node.

The basic Node class maintains a set of outgoing Link objects, indexed by the destination (or next-hop) addresses. The main functionality of the Node is to manage setup and teardown functions only on it associated links.

Version:
1.0 05/20/2004
Author:
Rama Shenai


Constructor & Destructor Documentation

common::Node::Node u_int  nodeId  ) 
 

Construct a new Node object from the provided node identifier.

Parameters:
nodeId The unique node identifier

virtual common::Node::~Node  )  [virtual]
 

Default destructor.


Member Function Documentation

const int common::Node::getNodeId  )  [inline]
 

Get the node identifier.

Returns:
the node identifier

void common::Node::setNodeId u_int  nodeId  )  [inline]
 

Set the node identifier.

Parameters:
A node identifier

bool common::Node::addLink u_int  dest,
u_int  chCount
 

Add a new Link to the node with the provided information.

Parameters:
dest The destination node
chCount The number of channels/wavelengths in the link
Returns:
True on a successful add, false otherwise.

int common::Node::scheduleLightpath long  lightpath,
u_int  dest
 

Scedule a lightpath on the pre-specified link.

Parameters:
lightpath A specified lightpath identifier (unique)
dest Represents the next hop from that node.
Returns:
The wavelength the lightpath is scheduled or -1 in case of lack of schedule, -2 if the lightpath is already present, -3 if the link is not present -4 input lightpath is faulty

int common::Node::scheduleLightpath long  lightpath,
u_int  dest,
int  wavelength
 

Scedule a lightpath on the pre-specified link.

Parameters:
lightpath A specified lightpath identifier (unique)
dest Represents the next hop from that node.
wavelength Represents the wavelength on that specific link.
Returns:
The wavelength the lightpath is scheduled or -1 in case of lack of schedule, -2 if the lightpath is already present, -3 if the link is not present -4 input lightpath is faulty

int common::Node::removeLightpath long  lightpath  ) 
 

Remove a lightpath by searching any traces of it on all the possible links of this node.

Parameters:
lightpath The lightpath identifier
Returns:
A positive integer on a successful removal, -1 if not found.

bool common::Node::isLinkPresent u_int  dest  ) 
 

Checks if a link is already present in the link map.

Parameters:
dest A link to the destination
Returns:
a true is returned if a link is present false otherwise.

virtual std::string& common::Node::toString  )  [virtual]
 

Convert the representation of this object to a string form.

Returns:
A String object

Reimplemented in common::GroomerNode.


Member Data Documentation

LinkMap common::Node::_lm [protected]
 

A Link map consists of a set of links associated with the node indexed by a unique integer destination id.

u_int common::Node::_nodeId [protected]
 

Represents the node identifier for this node.

std::string common::Node::_descStr [protected]
 

String representation of this object is used here.


The documentation for this class was generated from the following file:
Generated on Fri May 21 15:23:21 2004 for Optical Network Simulation (Build) by doxygen 1.3.7