00001 00002 #ifndef _QPULSER_CONFIG_HH_ 00003 #define _QPULSER_CONFIG_HH_ 00004 00010 class QPulserConfig 00011 { 00012 public: 00014 QPulserConfig(); 00015 00017 QPulserConfig(const QPulserConfig& other); 00018 00020 virtual ~QPulserConfig(); 00021 00027 bool SetMem0(unsigned int mem0); 00028 bool SetMem1(unsigned int mem1); 00029 bool SetMem2(unsigned int mem2); 00030 bool SetMem3(unsigned int mem3); 00035 unsigned int GetMem0() const { return fMem0; } 00036 unsigned int GetMem1() const { return fMem1; } 00037 unsigned int GetMem2() const { return fMem2; } 00038 unsigned int GetMem3() const { return fMem3; } 00042 unsigned int GetLocalId() const { return fLocalId; } 00043 00045 void SetLocalId(unsigned int id) { fLocalId = id; } 00046 00048 unsigned int GetAmplitude() const { return fMem1 + ((fMem2&0x0000000F)<<8);} 00049 00056 unsigned int GetAttenuation(unsigned int hwCh) const; 00057 00059 unsigned int GetDuration() const { return GetMem0(); } 00060 00062 bool operator==(const QPulserConfig& other) const; 00063 00065 QPulserConfig& operator=(const QPulserConfig& other); 00066 00067 private: 00068 unsigned int fLocalId; 00069 unsigned int fMem0; 00070 unsigned int fMem1; 00075 unsigned int fMem2; 00076 unsigned int fMem3; 00077 }; 00078 #endif