00001 // ===================================================================== 00002 // $Id: TSoftwareInterruptRegisterModule.hh,v 1.2 2003/07/30 16:19:11 goiwai Exp $ 00003 // $Name: CLDAQ-1-07-01 $ 00004 // 00005 // $Log: TSoftwareInterruptRegisterModule.hh,v $ 00006 // Revision 1.2 2003/07/30 16:19:11 goiwai 00007 // ファイルにコミットログをつけることにしました. 00008 // 00009 // ===================================================================== 00010 #ifndef __TSOFTWAREINTERRUPTREGISTERMODULE_HH 00011 #define __TSOFTWAREINTERRUPTREGISTERMODULE_HH 00012 00013 #include "Tglobals.h" 00014 #include "TSoftwareModule.hh" 00015 00016 class TDataSegment; 00017 class TDataElement; 00018 00019 class TSoftwareInterruptRegisterModule 00020 : public TSoftwareModule 00021 { 00022 00023 private: 00024 Tint theInterruptRegister; 00025 Tint theInterruptMaskRegister; 00026 Tint theFrequency; 00027 00028 public: 00029 TSoftwareInterruptRegisterModule( Tint nch = 2, Tint frequency = 1 ); 00030 TSoftwareInterruptRegisterModule( const TSoftwareInterruptRegisterModule& right ); 00031 ~TSoftwareInterruptRegisterModule(); 00032 00033 public: 00034 const TSoftwareInterruptRegisterModule& operator=( const TSoftwareInterruptRegisterModule& right ); 00035 Tbool operator==( const TSoftwareInterruptRegisterModule& right ) const; 00036 Tbool operator!=( const TSoftwareInterruptRegisterModule& right ) const; 00037 00038 public: 00039 Tint Clear(); 00040 Tint Update(); 00041 Tint Initialize(); 00042 Tint ReadInterruptRegister(); 00043 Tvoid FillData( TDataElement& element, Tint channel ); 00044 00045 public: 00046 Tint GetInterruptRegister() const; 00047 Tint GetInterruptMaskRegister() const; 00048 Tint GetFrequency() const; 00049 Tvoid SetInterruptRegister( Tint val ); 00050 Tvoid SetInterruptMaskRegister( Tint val ); 00051 Tvoid SetFrequency( Tint frequency ); 00052 00053 }; 00054 00055 inline Tint TSoftwareInterruptRegisterModule::GetInterruptRegister() const 00056 { 00057 return( theInterruptRegister ); 00058 } 00059 00060 inline Tint TSoftwareInterruptRegisterModule::GetInterruptMaskRegister() const 00061 { 00062 return( theInterruptMaskRegister ); 00063 } 00064 00065 inline Tint TSoftwareInterruptRegisterModule::GetFrequency() const 00066 { 00067 return( theFrequency ); 00068 } 00069 00070 inline Tvoid TSoftwareInterruptRegisterModule::SetInterruptRegister( Tint val ) 00071 { 00072 theInterruptRegister = val; 00073 return; 00074 } 00075 00076 inline Tvoid TSoftwareInterruptRegisterModule::SetInterruptMaskRegister( Tint val ) 00077 { 00078 theInterruptMaskRegister = val; 00079 return; 00080 } 00081 00082 inline Tvoid TSoftwareInterruptRegisterModule::SetFrequency( Tint frequency ) 00083 { 00084 theFrequency = frequency; 00085 return; 00086 } 00087 00088 #endif