From: Ron F. <ro...@us...> - 2006-04-14 20:48:38
|
Update of /cvsroot/nscldaq/dashdaq/vme In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30222 Modified Files: Makefile.am Added Files: CVMEPio.cpp CVMEPio.h Log Message: Base class for VME Programmed I/O ops. Index: Makefile.am =================================================================== RCS file: /cvsroot/nscldaq/dashdaq/vme/Makefile.am,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Makefile.am 14 Apr 2006 15:01:26 -0000 1.16 --- Makefile.am 14 Apr 2006 20:48:31 -0000 1.17 *************** *** 7,11 **** CSBSVmeException.cpp CSBSVMEInterface.cpp \ CSBSVMEInterfaceCreator.cpp CVmeDMATransfer.cpp \ ! CSBSVmeDMATransfer.cpp include_HEADERS = parseUtilities.h CVMEInterface.h nullVMEInterface.h \ --- 7,11 ---- CSBSVmeException.cpp CSBSVMEInterface.cpp \ CSBSVMEInterfaceCreator.cpp CVmeDMATransfer.cpp \ ! CSBSVmeDMATransfer.cpp CVMEPio.cpp include_HEADERS = parseUtilities.h CVMEInterface.h nullVMEInterface.h \ *************** *** 14,18 **** CVMEAddressRange.h CSBSVmeAddressRange.h \ CSBSVmeException.h CSBSVMEInterface.h CSBSVMEInterfaceCreator.h \ ! CVmeDMATransfer.h CSBSVmeDMATransfer.h AM_CXXFLAGS=-I. -I@top_srcdir@/exceptions \ --- 14,18 ---- CVMEAddressRange.h CSBSVmeAddressRange.h \ CSBSVmeException.h CSBSVMEInterface.h CSBSVMEInterfaceCreator.h \ ! CVmeDMATransfer.h CSBSVmeDMATransfer.h CVMEPio.h AM_CXXFLAGS=-I. -I@top_srcdir@/exceptions \ --- NEW FILE: CVMEPio.h --- /* This software is Copyright by the Board of Trustees of Michigan State University (c) Copyright 2005. You may use this software under the terms of the GNU public license (GPL). The terms of this license are described at: http://www.gnu.org/licenses/gpl.txt Author: Ron Fox NSCL Michigan State University East Lansing, MI 48824-1321 */ #ifndef __CVMEPIO_H #define __CVMEPIO_h /*! This class is an abstract base class for all programmed I/O accesses to a VME bus. This class supports single shot, most likely expensive accesses to arbitrary locations in VME bus with arbitrary address modifiers. */ class CVMEPio { // Canonicals.. we support all the copy like operations but it's possible // the concrete classes may not. public: CVMEPio(); CVMEPio(const CVMEPio& rhs); virtual ~CVMEPio(); CVMEPio& operator=(const CVMEPio& rhs); int operator==(const CVMEPio& rhs) const; int operator!=(const CVMEPio& rhs) const; // Virtual functions that concrete classes must override: public: virtual void write32(unsigned short modifier, unsigned long address, long value) = 0; virtual void write16(unsigned short modifier, unsigned long address, short value)= 0; virtual void write8(unsigned short modifier, unsigned long address, char value) = 0; virtual unsigned long read32(unsigned short modifier, unsigned long address) = 0; virtual unsigned short read16(unsigned short modifier, unsigned long address) = 0; virtual unsigned char read8 (unsigned short modifier, unsigned long address) = 0; }; #endif --- NEW FILE: CVMEPio.cpp --- /* This software is Copyright by the Board of Trustees of Michigan State University (c) Copyright 2005. You may use this software under the terms of the GNU public license (GPL). The terms of this license are described at: http://www.gnu.org/licenses/gpl.txt Author: Ron Fox NSCL Michigan State University East Lansing, MI 48824-1321 */ #include <config.h> #include "CVMEPio.h" #ifdef HAVE_STD_NAMESPACE using namespace std; #endif // Everything is pretty much a no-op and place holders for either later // or chaining. CVMEPio::CVMEPio() {} CVMEPio::CVMEPIo(const CVMEPio& rhs) {} CVMEPio::~CVMEPio() {} CVMEPio& CVMEPio::operator=(const CVMEPio& rhs) { return *this; } // Any base class is just about as good as any other. // int CVMEPio::operator==(const CVMEPio& rhs) const { return 1; } int CVMEPio::operator!=(const CVMEPio& rhs) const { return 0; } |