00001 // ===================================================================== 00021 // ===================================================================== 00022 #ifndef __TVMEMODULE_HH 00023 #define __TVMEMODULE_HH 00024 00025 #include "Tglobals.h" 00026 #include "TModule.hh" 00027 00028 00048 class TVmeModule 00049 : public TModule 00050 { 00051 00052 protected: 00053 Tsize_t theMappedSize; 00054 TvmeTransfer_t theTransferMode; 00055 Tint theFileDescriptor; 00056 Tcaddr_t theBaseAddress; 00057 Toff_t theOffsetAddress; 00058 00059 public: 00060 TVmeModule( Tint nch, Toff_t offset, Tint mapsize, TvmeTransfer_t mode ); 00061 TVmeModule( const TVmeModule& right ); 00062 00063 protected: 00064 virtual ~TVmeModule(); 00065 00066 public: 00067 virtual const TVmeModule& operator=( const TVmeModule& right ); 00068 virtual Tbool operator==( const TVmeModule& right ) const; 00069 virtual Tbool operator!=( const TVmeModule& right ) const; 00070 00071 public: 00072 Tsize_t GetMappedSize() const; 00073 TvmeTransfer_t GetTransferMode() const; 00074 Tint GetFileDescriptor() const; 00075 Tcaddr_t GetBaseAddress() const; 00076 Toff_t GetOffsetAddress() const; 00077 Tvoid SetMappedSize( Tsize_t mapsize ); 00078 Tvoid SetTransferMode( TvmeTransfer_t mode ); 00079 Tvoid SetFileDescriptor( Tint fd ); 00080 Tvoid SetBaseAddress( Tcaddr_t address ); 00081 Tvoid SetOffsetAddress( Toff_t offset ); 00082 00083 protected: 00084 Tvoid showBit( TUshort data, const Tstring comment = "" ) const; 00085 Tvoid setBit( TUshort* ptr, Tint nbit, Tbit bit ); 00086 Tbit getBit( TUshort* ptr, Tint nbit ) const; 00087 00088 }; 00089 00090 inline Tsize_t TVmeModule::GetMappedSize() const 00091 { 00092 return theMappedSize; 00093 } 00094 00095 inline TvmeTransfer_t TVmeModule::GetTransferMode() const 00096 { 00097 return theTransferMode; 00098 } 00099 00100 inline Tint TVmeModule::GetFileDescriptor() const 00101 { 00102 return theFileDescriptor; 00103 } 00104 00105 inline Tcaddr_t TVmeModule::GetBaseAddress() const 00106 { 00107 return theBaseAddress; 00108 } 00109 00110 inline Toff_t TVmeModule::GetOffsetAddress() const 00111 { 00112 return theOffsetAddress; 00113 } 00114 00115 inline Tvoid TVmeModule::SetMappedSize( Tsize_t mapsize ) 00116 { 00117 theMappedSize = mapsize; 00118 return; 00119 } 00120 00121 inline Tvoid TVmeModule::SetTransferMode( TvmeTransfer_t mode ) 00122 { 00123 theTransferMode = mode; 00124 return; 00125 } 00126 00127 inline Tvoid TVmeModule::SetFileDescriptor( Tint fd ) 00128 { 00129 theFileDescriptor = fd; 00130 return; 00131 } 00132 00133 inline Tvoid TVmeModule::SetBaseAddress( Tcaddr_t address ) 00134 { 00135 theBaseAddress = address; 00136 return; 00137 } 00138 00139 inline Tvoid TVmeModule::SetOffsetAddress( Toff_t offset ) 00140 { 00141 theOffsetAddress = offset; 00142 return; 00143 } 00144 00145 #endif