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

trx.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 trx.h - description 00003 ------------------- 00004 begin : Tue May 18 2004 00005 copyright : (C) 2004 by Ramakrishna Shenai 00006 email : shenai1@cs.umbc.edu 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 00019 #ifndef _trx_h 00020 #define _trx_h 00021 00022 #include <cstdlib> 00023 #include <string> 00024 #include <sstream> 00025 00026 #define NONE -1 00027 00028 using namespace std; 00029 00030 namespace common { 00031 class TRX; 00039 class TunableTRXArray { 00040 public: 00047 TunableTRXArray( u_int count, int lowRange, int highRange ); 00048 00055 bool assignTRX( long lightpath, int wavelength ); 00056 00061 bool resetTRX( long lightpath ); 00062 00067 std::string& toString(); 00068 00069 private: 00070 TRX *_array; 00074 u_int _count; 00075 00079 std::string _descStr; 00080 }; 00081 00090 class TRX { 00091 public: 00095 TRX() : _lightpath( NONE ) , _lowRange( 0 ) , _highRange( 0 ) {;} 00096 00103 void init( int lowRange, int highRange ); 00104 00113 bool isAvailable( long lightpath, int wvlen ); 00114 00123 long reset( long lightpath ); 00124 00131 long reset(); 00132 00137 std::string& toString(); 00138 private: 00142 long _lightpath; 00143 00147 int _lowRange; 00148 00152 int _highRange; 00153 00157 std::string _descStr; 00158 }; 00159 }; 00160 00161 #endif

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