| [3683] | 1 | #ifndef  BRBASEPROC_H_SEEN | 
|---|
|  | 2 | #define  BRBASEPROC_H_SEEN | 
|---|
|  | 3 |  | 
|---|
|  | 4 | //---------------------------------------------------------------- | 
|---|
|  | 5 | // Projet BAORadio - (C) LAL/IRFU  2008-2010 | 
|---|
|  | 6 | // Classes de threads de traitememt donnees BAORadio | 
|---|
|  | 7 | //---------------------------------------------------------------- | 
|---|
|  | 8 |  | 
|---|
|  | 9 |  | 
|---|
|  | 10 | #include "racqumem.h" | 
|---|
|  | 11 | #include <string> | 
|---|
|  | 12 | #include <vector> | 
|---|
|  | 13 | #include <iostream> | 
|---|
|  | 14 |  | 
|---|
|  | 15 | #include "brpaqu.h" | 
|---|
|  | 16 |  | 
|---|
|  | 17 | using namespace std; | 
|---|
|  | 18 |  | 
|---|
|  | 19 | //--------------------------------------------------------------------- | 
|---|
|  | 20 | // Classe de base pour l'analyse donnees (paquets acquisition) BAORadio | 
|---|
|  | 21 | // Les classes de traitement des paquets BAORadio peuvent heriter de | 
|---|
|  | 22 | // cette classe de base BRBaseProcessor en redefinissant la methode Process() | 
|---|
|  | 23 | //--------------------------------------------------------------------- | 
|---|
|  | 24 | class BRBaseProcessor : public SOPHYA::ZThread { | 
|---|
|  | 25 | public: | 
|---|
| [3774] | 26 | BRBaseProcessor(RAcqMemZoneMgr& memgr, MemZaction mmact=MemZA_ProcA); | 
|---|
|  | 27 |  | 
|---|
|  | 28 | MemZStatus SetMemZAction(MemZaction mmact=MemZA_ProcA); | 
|---|
| [3703] | 29 |  | 
|---|
| [3683] | 30 | virtual void run(); | 
|---|
|  | 31 | inline void Stop(); | 
|---|
|  | 32 | inline void STOP() { stop_ = true; } | 
|---|
| [3703] | 33 |  | 
|---|
| [3778] | 34 | inline void setNameId(const char* nom, int id) | 
|---|
|  | 35 | { bpnom_=nom;   bpid_=id;  } | 
|---|
|  | 36 | inline void setNameId(string nom, int id) | 
|---|
|  | 37 | { bpnom_=nom;   bpid_=id;  } | 
|---|
|  | 38 |  | 
|---|
| [3683] | 39 | protected: | 
|---|
| [3703] | 40 | // Methode devant etre redefinie pour effectuer le traitement - appele pour chaque trigger | 
|---|
|  | 41 | virtual int Process();  // renvoie 0 si OK, sinon, arret traitement | 
|---|
|  | 42 |  | 
|---|
| [3683] | 43 | RAcqMemZoneMgr& memgr_; | 
|---|
| [3774] | 44 | MemZaction mmact_;    // Definition de l'action sur les paquets (defaut=MemZA_ProcA) | 
|---|
|  | 45 | MemZStatus mmsta_;    // Statut associe a mmact_ (defaut=MemZS_ProcA) | 
|---|
| [3696] | 46 | bool stop_; | 
|---|
|  | 47 | vector<Byte*> fbuff_;      // Vecteur de pointeur de zone memoire pour chaque fibre | 
|---|
| [3683] | 48 | vector<BRPaquet> vpaq_;   // Vecteur de BRPaquet pour chaque fibre | 
|---|
| [3694] | 49 | vector<BRPaqChecker> vpchk_; | 
|---|
| [3683] | 50 | vector<uint_8> vfgok_;    // Vecteur de flag si paquet OK pour chaque fibre | 
|---|
|  | 51 | vector<uint_8> curfc_;    // Vecteur de numero de FrameCounter pour chaque fibre | 
|---|
| [3696] | 52 | vector<uint_8> fcfirst_;  // | 
|---|
|  | 53 | vector<uint_8> ttfirst_; | 
|---|
| [3683] | 54 | bool fgokallfibers_;      // true -> paquets for all fibers OK | 
|---|
| [3694] | 55 |  | 
|---|
| [3683] | 56 | uint_8 totprocnpaq_; | 
|---|
| [3778] | 57 |  | 
|---|
|  | 58 | string bpnom_;    // nom du processeur | 
|---|
|  | 59 | int bpid_;        // numero d'identificateur | 
|---|
| [3683] | 60 | }; | 
|---|
|  | 61 |  | 
|---|
|  | 62 |  | 
|---|
|  | 63 |  | 
|---|
|  | 64 | #endif | 
|---|