00001 // ===================================================================== 00021 // ===================================================================== 00022 #ifndef __TSOFTWAREFLASHADCMODULE_HH 00023 #define __TSOFTWAREFLASHADCMODULE_HH 00024 00025 #include "Tglobals.h" 00026 #include "TSoftwareModule.hh" 00027 00028 class TDataSegment; 00029 class TDataElement; 00030 00031 00051 class TSoftwareFlashAdcModule 00052 : public TSoftwareModule 00053 { 00054 00055 private: 00056 enum { tDefaultSampling = 62500 }; 00057 enum { tDefaultChannel = 1 }; 00058 00059 private: 00060 Tint theNumberOfSampling; 00061 00062 public: 00063 TSoftwareFlashAdcModule( Tint nchannel = tDefaultChannel, Tint nsampling = tDefaultSampling ); 00064 TSoftwareFlashAdcModule( const TSoftwareFlashAdcModule& right ); 00065 ~TSoftwareFlashAdcModule(); 00066 00067 public: 00068 Tint Clear(); 00069 Tint Update(); 00070 Tint Initialize(); 00071 Tvoid FillData( TDataElement& element, Tint channel ); 00072 00073 public: 00074 const TSoftwareFlashAdcModule& operator=( const TSoftwareFlashAdcModule& right ); 00075 Tbool operator==( const TSoftwareFlashAdcModule& right ) const; 00076 Tbool operator!=( const TSoftwareFlashAdcModule& right ) const; 00077 00078 public: 00079 Tint GetNumberOfSampling() const; 00080 Tvoid SetNumberOfSampling( Tint nsampling ); 00081 00082 protected: 00083 Tvoid setParameters(); 00084 Tvoid fillValue(); 00085 00086 }; 00087 00088 inline Tint TSoftwareFlashAdcModule::GetNumberOfSampling() const 00089 { 00090 return theNumberOfSampling; 00091 } 00092 00093 inline Tvoid TSoftwareFlashAdcModule::SetNumberOfSampling( Tint nsampling ) 00094 { 00095 theNumberOfSampling = nsampling; 00096 return; 00097 } 00098 00099 #endif