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

link.h

Go to the documentation of this file.
00001 #ifndef _link_h 00002 #define _link_h 00003 00004 #include <cstdlib> 00005 #include <iostream> 00006 #include <sstream> 00007 #include <string> 00008 00009 00010 #define NO_LIGHTPATH -1 00011 00012 namespace common { 00020 class Link { 00021 public: 00029 Link( u_int id, u_int src, u_int dest, u_int chCount ); 00030 00034 ~Link(); 00035 00036 /* Accessor and mutator methods */ 00041 const u_int getId() { return _id; } 00042 00047 const u_int getSrc() { return _src; } 00048 00053 const u_int getDest() { return _dest; } 00054 00059 const u_int getChCount() { return _chCount; } 00060 00065 void getChannels( long *channels ); 00066 00067 /* Wavelength assignment methods */ 00078 int assignChannel( u_long lightpath ); 00079 00088 int assignChannel( u_long lightpath, u_int channel ); 00089 00097 int clearChannel( u_long lightpath ); 00098 00106 bool isPresent( u_long lightpath ); 00107 00113 std::string &toString(); 00114 private: 00118 u_int _id; 00122 u_int _src; 00126 u_int _dest; 00131 long *_chState; 00135 u_int _chCount; 00136 00140 std::string _descStr; 00141 }; 00142 } 00143 00144 00145 #endif 00146 00147

Generated on Fri May 21 15:23:21 2004 for Optical Network Simulation (Build) by doxygen 1.3.7