Changeset 3623 in Sophya for trunk/AddOn/TAcq/pciewrap.h
- Timestamp:
- May 22, 2009, 9:59:38 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/pciewrap.h
r3538 r3623 1 1 #ifndef PCIEWRAP_H_SEEN 2 2 #define PCIEWRAP_H_SEEN 3 3 #include "brtypes.h" 4 4 #include "machdefs.h" 5 #include "racqumem.h" 6 #include "brpaqu.h" 5 7 #include <string> 6 8 … … 17 19 explicit PCIEWException(const char * m) { msg = m; } 18 20 explicit PCIEWException(const string& m) { msg = m; } 21 virtual ~PCIEWException() { } 19 22 virtual string const& Msg() const {return msg;} 20 23 virtual const char* what() {return msg.c_str(); } … … 24 27 25 28 29 // Classe definissant l'interface des operations transfert DMA/PCIExpress 26 30 class PCIEWrapper { 27 public:28 // Constructeur - fait l'initialisation29 PCIEWrapper();30 // destructeur - libere la memoire allouee31 virtual ~PCIEWrapper() ;31 public: 32 // Constructeur - fait l'initialisation 33 PCIEWrapper() { } 34 // destructeur - libere la memoire allouee 35 virtual ~PCIEWrapper() { } 32 36 33 // Retourne le nombre d'octets a lire 34 uint_4 NBytesToRead(); 35 36 // Lecture du buffer de la carte 37 uint_4 Read(uint_1* buff, uint_4 nbytes); 37 virtual UInt32 TransferSize() = 0; 38 virtual Byte* DoTransferData(int numbuff=0) = 0; 39 virtual UInt64 TotTransferBytes() = 0; 40 virtual void PrintStatus(ostream& os) = 0; 38 41 }; 39 42 43 // Classe de test Implementant l'interface PCIEWrapper sans DMA 44 class TestPCIWrapperNODMA : public PCIEWrapper { 45 public: 46 TestPCIWrapperNODMA(UInt32 sz); 47 virtual ~TestPCIWrapperNODMA(); 48 49 virtual UInt32 TransferSize() ; 50 virtual Byte* DoTransferData(int numbuff=0) ; 51 virtual UInt64 TotTransferBytes() ; 52 virtual void PrintStatus(ostream& os) ; 53 54 protected: 55 Byte* data_; 56 UInt32 size_; 57 UInt32 frame_counter_; 58 UInt64 timetag_; 59 UInt64 tottransfer_; 60 BRPaqChecker pchk_; 61 }; 40 62 41 63 #endif
Note:
See TracChangeset
for help on using the changeset viewer.