Changeset 3623 in Sophya for trunk/AddOn/TAcq/pciewrap.h


Ignore:
Timestamp:
May 22, 2009, 9:59:38 AM (16 years ago)
Author:
ansari
Message:

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:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/pciewrap.h

    r3538 r3623  
    11#ifndef  PCIEWRAP_H_SEEN
    22#define  PCIEWRAP_H_SEEN
    3 
     3#include "brtypes.h"
    44#include "machdefs.h"
     5#include "racqumem.h"
     6#include "brpaqu.h"
    57#include <string>
    68
     
    1719  explicit PCIEWException(const char * m) { msg = m; }
    1820  explicit PCIEWException(const string& m) { msg = m; }
     21  virtual ~PCIEWException() { }
    1922  virtual string const& Msg() const  {return msg;}
    2023  virtual const char* what() {return msg.c_str(); }
     
    2427
    2528
     29// Classe definissant l'interface des operations transfert DMA/PCIExpress
    2630class PCIEWrapper {
    27 public:
    28 // Constructeur - fait l'initialisation
    29           PCIEWrapper();
    30 // destructeur - libere la memoire allouee
    31   virtual ~PCIEWrapper();
     31 public:
     32  // Constructeur - fait l'initialisation
     33  PCIEWrapper() { }
     34  // destructeur - libere la memoire allouee
     35  virtual ~PCIEWrapper() { }
    3236
    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;
    3841};
    3942
     43// Classe de test Implementant l'interface PCIEWrapper sans DMA
     44class TestPCIWrapperNODMA : public PCIEWrapper {
     45public:
     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 
     54protected:
     55  Byte* data_;
     56  UInt32 size_;
     57  UInt32 frame_counter_;
     58  UInt64 timetag_;     
     59  UInt64 tottransfer_;
     60  BRPaqChecker pchk_;
     61};
    4062
    4163#endif
Note: See TracChangeset for help on using the changeset viewer.