|
Last change
on this file since 3624 was 3623, checked in by ansari, 16 years ago |
Modifications et ameliorations diverses pour programme acquisition/traitement multifibres
Reza 22/05/2009
1- Extension/amelioration classe BRPaquet et BRPaqChecker
2- Correction BUG dans RAcqMemZoneMgr bloquant l'utilisation a une seule zone memoire
3- Classe PCIEWrapper devenue virtuelle pure et introduction de la classe TestPCIWrapperNODMA
pour les smulations.
|
|
File size:
1.5 KB
|
| Rev | Line | |
|---|
| [3537] | 1 | #ifndef PCIEWRAP_H_SEEN
|
|---|
| 2 | #define PCIEWRAP_H_SEEN
|
|---|
| [3623] | 3 | #include "brtypes.h"
|
|---|
| [3537] | 4 | #include "machdefs.h"
|
|---|
| [3623] | 5 | #include "racqumem.h"
|
|---|
| 6 | #include "brpaqu.h"
|
|---|
| [3537] | 7 | #include <string>
|
|---|
| 8 |
|
|---|
| 9 | /*
|
|---|
| 10 | Classe interface aux fonctions d'I/O PCIExpress
|
|---|
| 11 | pour la carte de reception optique BAORadio
|
|---|
| 12 | R. Ansari Juin 2008
|
|---|
| 13 | */
|
|---|
| 14 |
|
|---|
| 15 | using namespace std;
|
|---|
| 16 |
|
|---|
| 17 | class PCIEWException {
|
|---|
| 18 | public:
|
|---|
| 19 | explicit PCIEWException(const char * m) { msg = m; }
|
|---|
| 20 | explicit PCIEWException(const string& m) { msg = m; }
|
|---|
| [3623] | 21 | virtual ~PCIEWException() { }
|
|---|
| [3537] | 22 | virtual string const& Msg() const {return msg;}
|
|---|
| 23 | virtual const char* what() {return msg.c_str(); }
|
|---|
| 24 | private:
|
|---|
| 25 | string msg;
|
|---|
| 26 | };
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| [3623] | 29 | // Classe definissant l'interface des operations transfert DMA/PCIExpress
|
|---|
| [3537] | 30 | class PCIEWrapper {
|
|---|
| [3623] | 31 | public:
|
|---|
| 32 | // Constructeur - fait l'initialisation
|
|---|
| 33 | PCIEWrapper() { }
|
|---|
| 34 | // destructeur - libere la memoire allouee
|
|---|
| 35 | virtual ~PCIEWrapper() { }
|
|---|
| [3537] | 36 |
|
|---|
| [3623] | 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;
|
|---|
| 41 | };
|
|---|
| [3537] | 42 |
|
|---|
| [3623] | 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_;
|
|---|
| [3537] | 61 | };
|
|---|
| 62 |
|
|---|
| 63 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.