| 1 | #ifndef  RACQUPROC_H_SEEN
 | 
|---|
| 2 | #define  RACQUPROC_H_SEEN
 | 
|---|
| 3 | 
 | 
|---|
| 4 | //----------------------------------------------------------------
 | 
|---|
| 5 | // ---- classe de thread de traitememt  acquisition BAORadio -----
 | 
|---|
| 6 | // LAL -      R. Ansari - Juin/Juillet 2008 
 | 
|---|
| 7 | //----------------------------------------------------------------
 | 
|---|
| 8 | 
 | 
|---|
| 9 | 
 | 
|---|
| 10 | #include "racqumem.h"
 | 
|---|
| 11 | #include <string>
 | 
|---|
| 12 | #include <vector>
 | 
|---|
| 13 | #include <iostream>
 | 
|---|
| 14 | #include "sopnamsp.h"
 | 
|---|
| 15 | #include "zthread.h"
 | 
|---|
| 16 | 
 | 
|---|
| 17 | #include "brtypes.h"
 | 
|---|
| 18 | 
 | 
|---|
| 19 | using namespace std;
 | 
|---|
| 20 | 
 | 
|---|
| 21 | 
 | 
|---|
| 22 | //-------------------------------------------------------------------
 | 
|---|
| 23 | // Classe thread de traitement avec 1 voie par frame (donnees brutes)
 | 
|---|
| 24 | //-------------------------------------------------------------------
 | 
|---|
| 25 | class DataProc : public ZThread {
 | 
|---|
| 26 | public: 
 | 
|---|
| 27 |   DataProc(RAcqMemZoneMgr& mem, string& path, uint_4 nmean=1, uint_4 step=1, uint_4 nmax=100);
 | 
|---|
| 28 |   virtual void run(); 
 | 
|---|
| 29 |   void Stop();
 | 
|---|
| 30 |   inline void STOP() { stop_ = true; }  
 | 
|---|
| 31 | 
 | 
|---|
| 32 | protected:
 | 
|---|
| 33 |   RAcqMemZoneMgr& memgr;
 | 
|---|
| 34 |   bool stop_;  
 | 
|---|
| 35 |   uint_4 nmax_;  // Nombre maxi de blocs MemZone traites
 | 
|---|
| 36 |   uint_4 step_;  // 1/step_ frame traite ds chaque bloc
 | 
|---|
| 37 |   uint_4 nmean_;  // Nombre de blocs pour le calcul des moyennes 
 | 
|---|
| 38 |   string path_;  
 | 
|---|
| 39 |   struct sigaction act; 
 | 
|---|
| 40 | };
 | 
|---|
| 41 | 
 | 
|---|
| 42 | //---------------------------------------------------------------------
 | 
|---|
| 43 | // Classe thread de traitement avec 2 voies par frame (donnees brutes)
 | 
|---|
| 44 | //---------------------------------------------------------------------
 | 
|---|
| 45 | class DataProc2C : public ZThread {
 | 
|---|
| 46 | public: 
 | 
|---|
| 47 |   DataProc2C(RAcqMemZoneMgr& mem, string& path, uint_4 nmean=1, uint_4 step=1, uint_4 nmax=100);
 | 
|---|
| 48 |   virtual void run(); 
 | 
|---|
| 49 |   void Stop();
 | 
|---|
| 50 |   inline void STOP() { stop_ = true; }  
 | 
|---|
| 51 | protected:
 | 
|---|
| 52 |   RAcqMemZoneMgr& memgr;
 | 
|---|
| 53 |   bool stop_;  
 | 
|---|
| 54 |   uint_4 nmax_;  // Nombre maxi de blocs MemZone traites
 | 
|---|
| 55 |   uint_4 step_;  // 1/step_ frame traite ds chaque bloc
 | 
|---|
| 56 |   uint_4 nmean_;  // Nombre de blocs pour le calcul des moyennes 
 | 
|---|
| 57 |   string path_;  
 | 
|---|
| 58 | };
 | 
|---|
| 59 | 
 | 
|---|
| 60 | //---------------------------------------------------------------------
 | 
|---|
| 61 | // Classe thread de traitement donnees FFT avec 2 voies par frame 
 | 
|---|
| 62 | //---------------------------------------------------------------------
 | 
|---|
| 63 | class DataProcFFT2C : public ZThread {
 | 
|---|
| 64 | public: 
 | 
|---|
| 65 |   DataProcFFT2C(RAcqMemZoneMgr& mem, string& path, uint_4 nmean=1, uint_4 step=1, uint_4 nmax=100);
 | 
|---|
| 66 |   virtual void run(); 
 | 
|---|
| 67 |   void Stop();
 | 
|---|
| 68 |   inline void STOP() { stop_ = true; }  
 | 
|---|
| 69 | protected:
 | 
|---|
| 70 |   RAcqMemZoneMgr& memgr;
 | 
|---|
| 71 |   bool stop_;  
 | 
|---|
| 72 |   uint_4 nmax_;  // Nombre maxi de blocs MemZone traites
 | 
|---|
| 73 |   uint_4 step_;  // 1/step_ frame traite ds chaque bloc
 | 
|---|
| 74 |   uint_4 nmean_;  // Nombre de blocs pour le calcul des moyennes 
 | 
|---|
| 75 |   string path_;  
 | 
|---|
| 76 | };
 | 
|---|
| 77 | 
 | 
|---|
| 78 | #endif
 | 
|---|