00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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