• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

plugin/roc/BoardsVector.h (r4864/r3024)

Go to the documentation of this file.
00001 #ifndef ROC_BOARDSVECTOR_H
00002 #define ROC_BOARDSVECTOR_H
00003 
00004 #include <vector>
00005 
00006 #include <string>
00007 
00008 #include "roc/Message.h"
00009 #include "roc/Board.h"
00010 #include "nxyter/FebBase.h"
00011 
00012 namespace roc {
00013   
00019    typedef std::vector<roc::Message> MessagesVector;
00020 
00021 
00022    struct BoardRec {
00023       roc::Board*      brd;
00024       std::string      devname;
00025       std::string      rocname;
00026       std::string      febskind;
00027       nxyter::FebBase* feb0;
00028       nxyter::FebBase* feb1;
00029       bool             get4;
00030       uint32_t         gpio_mask_save;
00031       uint32_t         gpio_mask_on;
00032       uint32_t         gpio_mask_off;
00033       BoardRec(roc::Board* _brd = 0) :
00034          brd(_brd), devname(), rocname(), febskind(), feb0(0), feb1(0), get4(false),
00035          gpio_mask_save(0), gpio_mask_on(0), gpio_mask_off(0) {}
00036       BoardRec(const BoardRec& rec) :
00037          brd(rec.brd), devname(rec.devname), 
00038          rocname(rec.rocname), febskind(rec.febskind),
00039          feb0(rec.feb0), feb1(rec.feb1), get4(rec.get4),
00040          gpio_mask_save(rec.gpio_mask_save), gpio_mask_on(rec.gpio_mask_on), gpio_mask_off(rec.gpio_mask_off) {}
00041    };
00042 
00043 
00044    class BoardsVector : public std::vector<BoardRec> {
00045       protected:
00046          std::vector<std::string> fDLMDevs;
00047       public:
00048          BoardsVector() : std::vector<BoardRec>() {}
00049          virtual ~BoardsVector() {}
00050 
00051          void addRoc(const std::string& roc, const std::string& febs);
00052          bool setBoard(unsigned n, roc::Board* brd, std::string devname);
00053          void addDLMDev(const std::string& dlm) { fDLMDevs.push_back(dlm); }
00054  
00055          void returnBoards();
00056 
00057          void produceSystemMessage(uint32_t id);
00058 
00059          roc::Board* brd(unsigned n) { return at(n).brd; }
00060          
00061          // returns number of adc channels on the feb
00062          int numAdc(unsigned n, unsigned nfeb);
00063 
00064          MessagesVector* readoutExtraMessages();
00065 
00066          void autoped_switch(bool on);
00067          
00068          void issueDLM(int code);
00069 
00070          bool isAnyGet4();
00071 
00072          void ResetAllGet4();
00073 
00074       protected:
00075 
00076          void autoped_issue_system_message(roc::Board* brd, uint32_t type);
00077          void autoped_setnxmode(nxyter::FebBase* feb, bool testtrig);
00078 
00079          void readFeb(uint32_t rocid, uint32_t febid, nxyter::FebBase* feb, MessagesVector* vect);
00080 
00081    };
00082 }
00083 
00084 #endif

Generated on Tue Dec 10 2013 04:52:23 for ROCsoft by  doxygen 1.7.1