00001 // ===================================================================== 00002 // $Id: TSoftwareInterruptRegisterModule.hh,v 1.1.1.1 2003/06/27 02:56:41 goiwai Exp $ 00003 // $Name: CLDAQ-1-06-00 $ 00004 // ===================================================================== 00005 #ifndef __TSOFTWAREINTERRUPTREGISTERMODULE_HH 00006 #define __TSOFTWAREINTERRUPTREGISTERMODULE_HH 00007 00008 #include "Tglobals.h" 00009 #include "TSoftwareModule.hh" 00010 00011 class TDataSegment; 00012 class TDataElement; 00013 00014 class TSoftwareInterruptRegisterModule 00015 : public TSoftwareModule 00016 { 00017 00018 private: 00019 Tint theInterruptRegister; 00020 Tint theInterruptMaskRegister; 00021 Tint theFrequency; 00022 00023 public: 00024 TSoftwareInterruptRegisterModule( Tint nch = 2, Tint frequency = 1 ); 00025 TSoftwareInterruptRegisterModule( const TSoftwareInterruptRegisterModule& right ); 00026 ~TSoftwareInterruptRegisterModule(); 00027 00028 public: 00029 const TSoftwareInterruptRegisterModule& operator=( const TSoftwareInterruptRegisterModule& right ); 00030 Tbool operator==( const TSoftwareInterruptRegisterModule& right ) const; 00031 Tbool operator!=( const TSoftwareInterruptRegisterModule& right ) const; 00032 00033 public: 00034 Tint Clear(); 00035 Tint Update(); 00036 Tint Initialize(); 00037 Tint ReadInterruptRegister(); 00038 Tvoid FillData( TDataElement& element, Tint channel ); 00039 00040 public: 00041 Tint GetInterruptRegister() const; 00042 Tint GetInterruptMaskRegister() const; 00043 Tint GetFrequency() const; 00044 Tvoid SetInterruptRegister( Tint val ); 00045 Tvoid SetInterruptMaskRegister( Tint val ); 00046 Tvoid SetFrequency( Tint frequency ); 00047 00048 }; 00049 00050 inline Tint TSoftwareInterruptRegisterModule::GetInterruptRegister() const 00051 { 00052 return( theInterruptRegister ); 00053 } 00054 00055 inline Tint TSoftwareInterruptRegisterModule::GetInterruptMaskRegister() const 00056 { 00057 return( theInterruptMaskRegister ); 00058 } 00059 00060 inline Tint TSoftwareInterruptRegisterModule::GetFrequency() const 00061 { 00062 return( theFrequency ); 00063 } 00064 00065 inline Tvoid TSoftwareInterruptRegisterModule::SetInterruptRegister( Tint val ) 00066 { 00067 theInterruptRegister = val; 00068 return; 00069 } 00070 00071 inline Tvoid TSoftwareInterruptRegisterModule::SetInterruptMaskRegister( Tint val ) 00072 { 00073 theInterruptMaskRegister = val; 00074 return; 00075 } 00076 00077 inline Tvoid TSoftwareInterruptRegisterModule::SetFrequency( Tint frequency ) 00078 { 00079 theFrequency = frequency; 00080 return; 00081 } 00082 00083 #endif