00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
#ifndef _node_h
00019
#define _node_h
00020
00021
#include <cstdlib>
00022
#include <iostream>
00023
#include <map>
00024
#include <sstream>
00025
#include <string>
00026
00027
#include "link.h"
00028
#include "trx.h"
00029
00030
using namespace std;
00031
using namespace common;
00032
00033 typedef map<int, Link*>
LinkMap;
00034
00035
namespace common {
00046 class Node {
00047
public:
00054
Node( u_int nodeId );
00055
00059
virtual ~Node();
00060
00061
00066 const int getNodeId() {
return _nodeId; }
00067
00072 void setNodeId( u_int nodeId ) {
_nodeId = nodeId; }
00073
00081
bool addLink( u_int dest, u_int chCount );
00082
00093
int scheduleLightpath(
long lightpath, u_int dest );
00094
00106
int scheduleLightpath(
long lightpath, u_int dest,
int wavelength );
00107
00115
int removeLightpath(
long lightpath );
00116
00117
00124
bool isLinkPresent( u_int dest );
00125
00131
virtual std::string &
toString();
00132
00133
protected:
00138 LinkMap _lm;
00139
00143 u_int
_nodeId;
00144
00148 std::string
_descStr;
00149 };
00150 }
00151
00152
#endif